'use strict'; // -------------- FAKE ELEMENTS GWT ASSUMES EXIST -------------- var $wnd; if (typeof window !== 'undefined') $wnd = window else if (typeof global !== 'undefined') $wnd = global // nodejs else if (typeof self !== 'undefined') $wnd = self // web worker var $moduleName, $moduleBase; // -------------- WORKAROUND STRICT MODE, SEE #127 -------------- var _xblockexpression; // -------------- GENERATED CODE -------------- var $intern_0 = 2147483647, $intern_1 = {3:1}, $intern_2 = {3:1, 4:1, 5:1}, $intern_3 = {204:1, 51:1}, $intern_4 = {204:1, 51:1, 128:1}, $intern_5 = {229:1, 3:1}, $intern_6 = {51:1}, $intern_7 = {85:1}, $intern_8 = {20:1, 31:1, 16:1}, $intern_9 = 2063, $intern_10 = {20:1, 31:1, 16:1, 21:1}, $intern_11 = {85:1, 139:1, 133:1}, $intern_12 = {20:1, 31:1, 16:1, 21:1, 87:1}, $intern_13 = {20:1, 31:1, 16:1, 277:1, 21:1, 87:1}, $intern_14 = {51:1, 128:1}, $intern_15 = {358:1, 44:1}, $intern_16 = {3:1, 6:1, 4:1, 5:1}, $intern_17 = 16384, $intern_18 = {159:1}, $intern_19 = {41:1}, $intern_20 = {202:1}, $intern_21 = {l:4194303, m:4194303, h:524287}, $intern_22 = {253:1, 3:1, 34:1}, $intern_23 = {20:1}, $intern_24 = {20:1, 16:1}, $intern_25 = {3:1, 20:1, 31:1, 16:1}, $intern_26 = {307:1, 3:1, 20:1, 31:1, 16:1, 15:1, 59:1}, $intern_27 = {3:1, 4:1, 5:1, 173:1}, $intern_28 = {3:1, 85:1}, $intern_29 = {20:1, 16:1, 21:1}, $intern_30 = {3:1, 20:1, 31:1, 16:1, 21:1}, $intern_31 = {20:1, 16:1, 21:1, 87:1}, $intern_32 = 461845907, $intern_33 = -862048943, $intern_34 = {3:1, 6:1, 4:1, 5:1, 173:1}, $intern_35 = 1024, $intern_36 = 1073741824, $intern_37 = {3:1, 6:1, 4:1, 9:1, 5:1}, $intern_38 = {20:1, 31:1, 56:1, 16:1, 15:1}, $intern_39 = {20:1, 31:1, 56:1, 16:1, 15:1, 59:1}, $intern_40 = {46:1}, $intern_41 = {380:1}, $intern_42 = 1.0E-4, $intern_43 = -2147483648, $intern_44 = {3:1, 103:1, 63:1, 82:1}, $intern_45 = {201:1, 3:1, 4:1}, $intern_46 = 1000, $intern_47 = 65535, $intern_48 = 1900, $intern_49 = {53:1, 3:1, 4:1}, $intern_50 = {3:1, 4:1, 34:1, 206:1}, $intern_51 = 4194303, $intern_52 = 1048575, $intern_53 = 524288, $intern_54 = 4194304, $intern_55 = 17592186044416, $intern_56 = 1000000000, $intern_57 = -17592186044416, $intern_58 = {3:1, 103:1, 77:1, 63:1, 82:1}, $intern_59 = {3:1, 296:1, 82:1}, $intern_60 = Infinity, $intern_61 = -Infinity, $intern_62 = 4096, $intern_63 = {3:1, 4:1, 376:1}, $intern_64 = 65536, $intern_65 = 55296, $intern_66 = {109:1, 3:1, 4:1}, $intern_67 = 100000, $intern_68 = 0.3010299956639812, $intern_69 = 4294967295, $intern_70 = {44:1}, $intern_71 = {3:1, 4:1, 20:1, 31:1, 56:1, 13:1, 16:1, 15:1, 59:1}, $intern_72 = {3:1, 20:1, 31:1, 56:1, 16:1, 15:1, 59:1}, $intern_73 = {20:1, 16:1, 15:1}, $intern_74 = {3:1, 50:1}, $intern_75 = {189:1}, $intern_76 = {3:1, 4:1, 85:1}, $intern_77 = {3:1, 4:1, 20:1, 31:1, 16:1, 49:1, 21:1}, $intern_78 = 1.4901161193847656E-8, $intern_79 = 1.1102230246251565E-16, $intern_80 = 15525485, $intern_81 = 5.9604644775390625E-8, $intern_82 = 16777216, $intern_83 = 16777215, $intern_84 = {3:1, 4:1, 20:1, 31:1, 56:1, 16:1, 15:1, 59:1}, $intern_85 = {3:1, 34:1, 22:1, 304:1}, $intern_86 = {3:1, 4:1, 5:1, 856:1}, $intern_87 = {533:1, 687:1}, $intern_88 = {50:1}, $intern_89 = {178:1, 46:1}, $intern_90 = {134:1}, $intern_91 = {183:1, 3:1, 4:1}, $intern_92 = {217:1, 336:1}, $intern_93 = {3:1, 4:1, 5:1, 603:1}, $intern_94 = 0.01, $intern_95 = {3:1, 96:1, 137:1}, $intern_96 = {205:1}, $intern_97 = 1.5707963267948966, $intern_98 = 1.7976931348623157E308, $intern_99 = {3:1, 4:1, 5:1, 198:1}, $intern_100 = {3:1, 6:1, 4:1, 5:1, 100:1, 115:1}, $intern_101 = 0.001, $intern_102 = 1.600000023841858, $intern_103 = {3:1, 6:1, 4:1, 9:1, 5:1, 126:1}, $intern_104 = {3:1, 6:1, 4:1, 5:1, 150:1, 100:1, 115:1}, $intern_105 = {47:1}, $intern_106 = {3:1, 6:1, 4:1, 5:1, 483:1, 150:1, 100:1, 115:1}, $intern_107 = {3:1, 6:1, 4:1, 5:1, 150:1, 199:1, 210:1, 100:1, 115:1}, $intern_108 = {3:1, 6:1, 4:1, 5:1, 150:1, 2042:1, 210:1, 100:1, 115:1}, $intern_109 = {3:1, 4:1, 140:1, 214:1, 423:1}, $intern_110 = {3:1, 4:1, 107:1, 214:1, 423:1}, $intern_111 = {230:1}, $intern_112 = {3:1, 4:1, 5:1, 601:1}, $intern_113 = {106:1, 47:1}, $intern_114 = {413:1, 230:1}, $intern_115 = {846:1, 3:1, 4:1}, $intern_116 = {3:1, 4:1, 5:1, 854:1}, $intern_117 = 1.0E-5, $intern_118 = 1.0E-6, $intern_119 = 0.09999999999999998, $intern_120 = 1.0E-8, $intern_121 = 4.71238898038469, $intern_122 = 3.141592653589793, $intern_123 = 0.10000000149011612, $intern_124 = -1.7976931348623157E308, $intern_125 = {3:1, 6:1, 4:1, 5:1, 534:1, 100:1, 115:1}, $intern_126 = 6.283185307179586, $intern_127 = 4.9E-324, $intern_128 = {3:1, 4:1, 5:1, 100:1}, $intern_129 = 5.497787143782138, $intern_130 = 3.9269908169872414, $intern_131 = 2.356194490192345, $intern_132 = {341:1}, $intern_133 = {295:1}, $intern_134 = 0.05, $intern_135 = 1.2999999523162842, $intern_136 = {3:1, 34:1, 22:1, 347:1}, $intern_137 = {94:1, 93:1}, $intern_138 = 32768, $intern_139 = {110:1, 94:1, 93:1, 58:1, 54:1, 99:1}, $intern_140 = {195:1, 3:1, 4:1}, $intern_141 = {3:1, 4:1, 20:1, 31:1, 56:1, 16:1, 15:1, 59:1, 70:1, 66:1, 61:1}, $intern_142 = {3:1, 4:1, 20:1, 31:1, 56:1, 16:1, 51:1, 15:1, 59:1, 70:1, 66:1, 61:1, 596:1}, $intern_143 = {424:1, 686:1}, $intern_144 = {3:1, 4:1, 20:1, 31:1, 56:1, 16:1, 15:1, 70:1, 61:1}, $intern_145 = {378:1, 152:1}, $intern_146 = {3:1, 4:1, 5:1, 129:1}, $intern_147 = {3:1, 4:1, 20:1, 31:1, 56:1, 16:1, 15:1, 59:1, 70:1, 61:1}, $intern_148 = {3:1, 6:1, 4:1, 5:1, 198:1}, $intern_149 = {3:1, 4:1, 5:1, 173:1, 379:1}, $intern_150 = {79:1}, $intern_151 = {3:1, 20:1, 16:1, 15:1, 61:1, 597:1, 79:1, 71:1, 97:1}, $intern_152 = 8192, $intern_153 = 2048, $intern_154 = {3:1, 4:1, 5:1, 254:1}, $intern_155 = {3:1, 4:1, 5:1, 688:1}, $intern_156 = {3:1, 4:1, 20:1, 31:1, 56:1, 16:1, 15:1, 59:1, 70:1, 66:1, 61:1, 71:1}, $intern_157 = {3:1, 4:1, 20:1, 31:1, 56:1, 16:1, 15:1, 59:1, 70:1, 66:1, 61:1, 79:1, 71:1, 97:1}, $intern_158 = {3:1, 4:1, 5:1, 689:1}, $intern_159 = {3:1, 4:1, 20:1, 31:1, 56:1, 16:1, 15:1, 70:1, 61:1, 79:1, 71:1, 97:1}, $intern_160 = {20:1, 31:1, 56:1, 16:1, 15:1, 61:1, 71:1}, $intern_161 = {51:1, 128:1, 287:1}, $intern_162 = {76:1, 343:1}, $intern_163 = 1352, $intern_164 = -32768, $intern_165 = {57:1}, $intern_166 = {3:1, 4:1, 5:1, 124:1}, $intern_167 = {94:1, 93:1, 599:1, 2034:1}, $intern_168 = 1114111, $intern_169 = {3:1, 122:1}, $intern_170 = {3:1, 4:1, 5:1, 381:1}; var _, prototypesByTypeId_0, initFnList_0, permutationId = -1; 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; i < initFnList.length; i++) { initFnList[i](); } } 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; i < arguments.length; i++) { initFnList.push(arguments[i]); } } function typeMarkerFn(){ } function toString_40(object){ var number; if (Array.isArray(object) && object.typeMarker === typeMarkerFn) { return $getName(getClass__Ljava_lang_Class___devirtual$(object)) + '@' + (number = hashCode__I__devirtual$(object) >>> 0 , number.toString(16)); } return object.toString(); } function portableObjCreate(obj){ function F(){ } ; F.prototype = obj || {}; return new F; } function makeLambdaFunction(samMethod, ctor, ctorArguments){ var lambda = function(){ return samMethod.apply(lambda, arguments); } ; ctor.apply(lambda, ctorArguments); return lambda; } 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; !superTypeIdOrPrototype && (_.typeMarker = typeMarkerFn); prototypesByTypeId[typeId] = _; } for (var i = 3; i < arguments.length; ++i) { arguments[i].prototype = _; } clazz && (_.___clazz = clazz); } $wnd.goog = $wnd.goog || {}; $wnd.goog.global = $wnd.goog.global || $wnd; prototypesByTypeId_0 = {}; function $equals(this$static, other){ return maskUndefined(this$static) === maskUndefined(other); } function Object_0(){ } function equals_Ljava_lang_Object__Z__devirtual$(this$static, other){ return instanceOfString(this$static)?$equals_5(this$static, other):instanceOfDouble(this$static)?$equals_4(this$static, other):instanceOfBoolean(this$static)?(checkCriticalNotNull(this$static) , maskUndefined(this$static) === maskUndefined(other)):hasJavaObjectVirtualDispatch(this$static)?this$static.equals_0(other):isJavaArray(this$static)?$equals(this$static, other):$equals_3(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 || Array.isArray(this$static) && getClassLiteralForArray(Lcom_google_gwt_core_client_JavaScriptObject_2_classLit, 1) || Lcom_google_gwt_core_client_JavaScriptObject_2_classLit; } function hashCode__I__devirtual$(this$static){ return instanceOfString(this$static)?$hashCode_2(this$static):instanceOfDouble(this$static)?$hashCode_1(this$static):instanceOfBoolean(this$static)?$hashCode_0(this$static):hasJavaObjectVirtualDispatch(this$static)?this$static.hashCode_1():isJavaArray(this$static)?getObjectIdentityHashCode(this$static):$hashCode(this$static); } defineClass(1, null, {}, Object_0); _.equals_0 = function equals(other){ return $equals(this, other); } ; _.getClass_0 = function getClass_0(){ return this.___clazz; } ; _.hashCode_1 = function hashCode_0(){ return getObjectIdentityHashCode(this); } ; _.toString_0 = function toString_1(){ var number; return $getName(getClass__Ljava_lang_Class___devirtual$(this)) + '@' + (number = hashCode__I__devirtual$(this) >>> 0 , number.toString(16)); } ; _.equals = function(other){ return this.equals_0(other); } ; _.hashCode = function(){ return this.hashCode_1(); } ; _.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 castToArray(src_0){ var elementTypeCategory; checkCriticalType(src_0 == null || Array.isArray(src_0) && (elementTypeCategory = getElementTypeCategory(src_0) , !(elementTypeCategory >= 14 && elementTypeCategory <= 16))); 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 charToString(x_0){ return String.fromCharCode(x_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_int(x_0){ return Math.max(Math.min(x_0, $intern_0), -2147483648) | 0; } 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 $getEnumConstants(this$static){ return this$static.enumConstantsFunc && this$static.enumConstantsFunc(); } function $getName(this$static){ $ensureNamesAreInitialized(this$static); return this$static.typeName; } function $toString_5(this$static){ return ((this$static.modifiers & 2) != 0?'interface ':(this$static.modifiers & 1) != 0?'':'class ') + ($ensureNamesAreInitialized(this$static) , this$static.typeName); } 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, superclass, enumConstantsFunc, enumValueOfFunc){ var clazz; clazz = createClassObject(packageName, compoundClassName); maybeSetClassLiteral(typeId, clazz); clazz.modifiers = enumConstantsFunc?8:0; clazz.enumSuperclass = superclass; clazz.enumConstantsFunc = enumConstantsFunc; clazz.enumValueOfFunc = enumValueOfFunc; 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; return prototypesByTypeId_0[typeId]; } function initializeNames(clazz){ if (clazz.isArray_1()) { var componentType = clazz.componentType; componentType.isPrimitive()?(clazz.typeName = '[' + componentType.typeId):!componentType.isArray_1()?(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; while (!strings[i] || strings[i] == '') { i++; } var result = strings[i++]; for (; i < strings.length; i++) { if (!strings[i] || strings[i] == '') { continue; } result += separator + strings[i]; } 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(297, 1, {297:1, 2124:1}, Class); _.createClassLiteralForArray = function createClassLiteralForArray(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 getCanonicalName(){ $ensureNamesAreInitialized(this); return this.canonicalName; } ; _.getName = function getName(){ return $getName(this); } ; _.getSimpleName = function getSimpleName(){ return $ensureNamesAreInitialized(this) , this.simpleName; } ; _.isArray_1 = function isArray_1(){ return (this.modifiers & 4) != 0; } ; _.isPrimitive = function isPrimitive(){ return (this.modifiers & 1) != 0; } ; _.toString_0 = function toString_44(){ return $toString_5(this); } ; _.modifiers = 0; var nextSequentialId = 1; var Ljava_lang_Object_2_classLit = createForClass('java.lang', 'Object', 1); var Ljava_lang_Class_2_classLit = createForClass('java.lang', 'Class', 297); defineClass(2096, 1, $intern_1); var Lcom_google_common_base_Optional_2_classLit = createForClass('com.google.common.base', 'Optional', 2096); function $clinit_Absent(){ $clinit_Absent = emptyMethod; INSTANCE = new Absent; } function Absent(){ } defineClass(1191, 2096, $intern_1, Absent); _.equals_0 = function equals_0(object){ return object === this; } ; _.hashCode_1 = function hashCode_1(){ return 2040732332; } ; _.toString_0 = function toString_2(){ return 'Optional.absent()'; } ; _.transform = function transform(function_0){ checkNotNull(function_0); return $clinit_Absent() , INSTANCE; } ; var INSTANCE; var Lcom_google_common_base_Absent_2_classLit = createForClass('com.google.common.base', 'Absent', 1191); function $appendTo(this$static, appendable, parts){ checkNotNull(appendable); if (parts.hasNext_0()) { $append_7(appendable, $toString(parts.next_1())); while (parts.hasNext_0()) { $append_7(appendable, this$static.separator); $append_7(appendable, $toString(parts.next_1())); } } return appendable; } function $appendTo_0(this$static, builder, parts){ var impossible; try { $appendTo(this$static, builder, parts); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 606)) { impossible = $e0; throw toJs(new AssertionError_0(impossible)); } else throw toJs($e0); } return builder; } function $join(this$static, parts){ return $appendTo_0(this$static, new StringBuilder, parts).string; } function $toString(part){ requireNonNull(part); return instanceOf(part, 484)?castTo(part, 484):toString_40(part); } function Joiner(){ this.separator = castToString(checkNotNull(', ')); } defineClass(636, 1, {}, Joiner); var Lcom_google_common_base_Joiner_2_classLit = createForClass('com.google.common.base', 'Joiner', 636); function equal(a, b){ return maskUndefined(a) === maskUndefined(b) || a != null && equals_Ljava_lang_Object__Z__devirtual$(a, b); } function badElementIndex(index_0, size_0){ if (index_0 < 0) { return lenientFormat('%s (%s) must not be negative', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, ['index', valueOf_3(index_0)])); } else if (size_0 < 0) { throw toJs(new IllegalArgumentException_0('negative size: ' + size_0)); } else { return lenientFormat('%s (%s) must be less than size (%s)', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, ['index', valueOf_3(index_0), valueOf_3(size_0)])); } } function badPositionIndex(index_0, size_0, desc){ if (index_0 < 0) { return lenientFormat('%s (%s) must not be negative', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, [desc, valueOf_3(index_0)])); } else if (size_0 < 0) { throw toJs(new IllegalArgumentException_0('negative size: ' + size_0)); } else { return lenientFormat('%s (%s) must not be greater than size (%s)', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, [desc, valueOf_3(index_0), valueOf_3(size_0)])); } } function badPositionIndexes(start_0, end, size_0){ if (start_0 < 0 || start_0 > size_0) { return badPositionIndex(start_0, size_0, 'start index'); } if (end < 0 || end > size_0) { return badPositionIndex(end, size_0, 'end index'); } return lenientFormat('end index (%s) must not be less than start index (%s)', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, [valueOf_3(end), valueOf_3(start_0)])); } function checkArgument(expression){ if (!expression) { throw toJs(new IllegalArgumentException); } } function checkArgument_0(expression, errorMessage){ if (!expression) { throw toJs(new IllegalArgumentException_0(errorMessage)); } } function checkArgument_1(b, p1){ if (!b) { throw toJs(new IllegalArgumentException_0(lenientFormat('value already present: %s', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, [p1])))); } } function checkArgument_2(b, errorMessageTemplate, p1, p2){ if (!b) { throw toJs(new IllegalArgumentException_0(lenientFormat(errorMessageTemplate, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, [p1, p2])))); } } function checkElementIndex(index_0, size_0){ if (index_0 < 0 || index_0 >= size_0) { throw toJs(new IndexOutOfBoundsException_0(badElementIndex(index_0, size_0))); } return index_0; } function checkNotNull(reference){ if (reference == null) { throw toJs(new NullPointerException); } return reference; } function checkNotNull_0(reference, errorMessage){ if (reference == null) { throw toJs(new NullPointerException_0(errorMessage)); } return reference; } function checkPositionIndex(index_0, size_0){ if (index_0 < 0 || index_0 > size_0) { throw toJs(new IndexOutOfBoundsException_0(badPositionIndex(index_0, size_0, 'index'))); } return index_0; } function checkPositionIndexes(start_0, end, size_0){ if (start_0 < 0 || end < start_0 || end > size_0) { throw toJs(new IndexOutOfBoundsException_0(badPositionIndexes(start_0, end, size_0))); } } function checkState(expression){ if (!expression) { throw toJs(new IllegalStateException); } } function checkState_0(expression){ if (!expression) { throw toJs(new IllegalStateException_0('no calls to next() since the last call to remove()')); } } var Lcom_google_common_base_Predicate_2_classLit = createForInterface('com.google.common.base', 'Predicate'); function toStringHelper(components){ var builder, first, o, o$iterator; builder = $append_5($append_11(new StringBuilder_1('Predicates.'), 'and'), 40); first = true; for (o$iterator = new AbstractList$IteratorImpl(components); o$iterator.i < o$iterator.this$01_0.size_1();) { o = (checkCriticalElement(o$iterator.i < o$iterator.this$01_0.size_1()) , o$iterator.this$01_0.get_0(o$iterator.last = o$iterator.i++)); first || (builder.string += ',' , builder); builder.string += '' + o; first = false; } return (builder.string += ')' , builder).string; } function $apply(this$static, t){ var i; for (i = 0; i < this$static.components.array.length; i++) { if (!castTo($get_12(this$static.components, i), 178).apply_1(t)) { return false; } } return true; } function Predicates$AndPredicate(components){ this.components = components; } defineClass(589, 1, {178:1, 589:1, 3:1, 46:1}, Predicates$AndPredicate); _.test_0 = function test_0(input_0){ return $apply(this, input_0); } ; _.apply_1 = function apply_1(t){ return $apply(this, t); } ; _.equals_0 = function equals_1(obj){ var that; if (instanceOf(obj, 589)) { that = castTo(obj, 589); return $equals_2(this.components, that.components); } return false; } ; _.hashCode_1 = function hashCode_2(){ return hashCode_49(this.components) + 306654252; } ; _.toString_0 = function toString_3(){ return toStringHelper(this.components); } ; var Lcom_google_common_base_Predicates$AndPredicate_2_classLit = createForClass('com.google.common.base', 'Predicates/AndPredicate', 589); function Present(reference){ this.reference = reference; } defineClass(419, 2096, {419:1, 3:1}, Present); _.equals_0 = function equals_2(object){ var other; if (instanceOf(object, 419)) { other = castTo(object, 419); return equals_Ljava_lang_Object__Z__devirtual$(this.reference, other.reference); } return false; } ; _.hashCode_1 = function hashCode_3(){ return 1502476572 + hashCode__I__devirtual$(this.reference); } ; _.toString_0 = function toString_4(){ return 'Optional.of(' + this.reference + ')'; } ; _.transform = function transform_0(function_0){ return new Present(checkNotNull_0(function_0.apply_0(this.reference), 'the Function passed to Optional.transform() must not return null.')); } ; var Lcom_google_common_base_Present_2_classLit = createForClass('com.google.common.base', 'Present', 419); function lenientFormat(template, args){ var builder, i, i0, placeholderStart, templateStart; template = template == null?'null':(checkCriticalNotNull(template) , template); for (i0 = 0; i0 < args.length; i0++) { args[i0] = lenientToString(args[i0]); } builder = new StringBuilder_0; templateStart = 0; i = 0; while (i < args.length) { placeholderStart = template.indexOf('%s', templateStart); if (placeholderStart == -1) { break; } builder.string += '' + $substring_1(template == null?'null':(checkCriticalNotNull(template) , template), templateStart, placeholderStart); $append_10(builder, args[i++]); templateStart = placeholderStart + 2; } $append_9(builder, template, templateStart, template.length); if (i < args.length) { builder.string += ' ['; $append_10(builder, args[i++]); while (i < args.length) { builder.string += ', '; $append_10(builder, args[i++]); } builder.string += ']'; } return builder.string; } function lenientToString(o){ var e, number, objectToString; if (o == null) { return 'null'; } try { return toString_40(o); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 103)) { e = $e0; objectToString = $getName(getClass__Ljava_lang_Class___devirtual$(o)) + '@' + (number = ($clinit_System() , getIdentityHashCode(o)) >>> 0 , number.toString(16)); $log(getLogger(), ($clinit_Level() , 'Exception during lenientFormat for ' + objectToString), e); return '<' + objectToString + ' threw ' + $getName(e.___clazz) + '>'; } else throw toJs($e0); } } function $forEachRemaining(this$static, consumer){ checkCriticalNotNull(consumer); while (this$static.hasNext_0()) { consumer.accept(this$static.next_1()); } } function $remove_21(){ throw toJs(new UnsupportedOperationException); } function $remove(){ throw toJs(new UnsupportedOperationException); } defineClass(204, 1, $intern_3); _.forEachRemaining = function forEachRemaining(consumer){ $forEachRemaining(this, consumer); } ; _.remove = function remove_0(){ $remove(); } ; var Lcom_google_common_collect_UnmodifiableIterator_2_classLit = createForClass('com.google.common.collect', 'UnmodifiableIterator', 204); defineClass(2076, 204, $intern_4); _.remove = function remove_1(){ $remove(); } ; _.add_1 = function add_1(e){ throw toJs(new UnsupportedOperationException); } ; _.set_1 = function set_1(e){ throw toJs(new UnsupportedOperationException); } ; var Lcom_google_common_collect_UnmodifiableListIterator_2_classLit = createForClass('com.google.common.collect', 'UnmodifiableListIterator', 2076); function AbstractIndexedListIterator(size_0){ AbstractIndexedListIterator_0.call(this, size_0, 0); } function AbstractIndexedListIterator_0(size_0, position){ checkPositionIndex(position, size_0); this.size_0 = size_0; this.position = position; } defineClass(399, 2076, $intern_4); _.hasNext_0 = function hasNext(){ return this.position < this.size_0; } ; _.hasPrevious = function hasPrevious(){ return this.position > 0; } ; _.next_1 = function next_0(){ if (this.position >= this.size_0) { throw toJs(new NoSuchElementException); } return this.get_0(this.position++); } ; _.nextIndex_0 = function nextIndex_0(){ return this.position; } ; _.previous_0 = function previous_0(){ if (this.position <= 0) { throw toJs(new NoSuchElementException); } return this.get_0(--this.position); } ; _.previousIndex = function previousIndex(){ return this.position - 1; } ; _.position = 0; _.size_0 = 0; var Lcom_google_common_collect_AbstractIndexedListIterator_2_classLit = createForClass('com.google.common.collect', 'AbstractIndexedListIterator', 399); function $hasNext(this$static){ checkState(this$static.state != 3); switch (this$static.state) { case 2: return false; case 0: return true; } return $tryToComputeNext(this$static); } function $next(this$static){ var result; if (!$hasNext(this$static)) { throw toJs(new NoSuchElementException); } this$static.state = 1; result = this$static.next_0; this$static.next_0 = null; return result; } function $tryToComputeNext(this$static){ this$static.state = 3; this$static.next_0 = this$static.computeNext(); if (this$static.state != 2) { this$static.state = 0; return true; } return false; } defineClass(713, 204, $intern_3); _.hasNext_0 = function hasNext_0(){ return $hasNext(this); } ; _.next_1 = function next_1(){ return $next(this); } ; _.state = 1; var Lcom_google_common_collect_AbstractIterator_2_classLit = createForClass('com.google.common.collect', 'AbstractIterator', 713); function $containsEntry(this$static, key, value_0){ var collection; collection = castTo(this$static.asMap_0().get_3(key), 16); return !!collection && collection.contains(value_0); } function $containsValue(this$static, value_0){ var collection, collection$iterator; for (collection$iterator = this$static.asMap_0().values_0().iterator_0(); collection$iterator.hasNext_0();) { collection = castTo(collection$iterator.next_1(), 16); if (collection.contains(value_0)) { return true; } } return false; } function $keySet(this$static){ var result; result = this$static.keySet; return !result?(this$static.keySet = this$static.createKeySet()):result; } function $keys(this$static){ var result; result = this$static.keys_0; return !result?(this$static.keys_0 = new Multimaps$Keys(this$static)):result; } function $remove_0(this$static, key, value_0){ var collection; collection = castTo(this$static.asMap_0().get_3(key), 16); return !!collection && collection.remove_1(value_0); } defineClass(2084, 1, {229:1}); _.asMap_0 = function asMap(){ var result; return result = this.asMap , !result?(this.asMap = this.createAsMap()):result; } ; _.equals_0 = function equals_3(object){ return equalsImpl_1(this, object); } ; _.hashCode_1 = function hashCode_4(){ return hashCode__I__devirtual$(this.asMap_0()); } ; _.isEmpty = function isEmpty(){ return this.size_1() == 0; } ; _.keySet_0 = function keySet_0(){ return $keySet(this); } ; _.toString_0 = function toString_5(){ return toString_40(this.asMap_0()); } ; var Lcom_google_common_collect_AbstractMultimap_2_classLit = createForClass('com.google.common.collect', 'AbstractMultimap', 2084); function $clear(this$static){ var collection, collection$iterator; for (collection$iterator = this$static.map_0.values_0().iterator_0(); collection$iterator.hasNext_0();) { collection = castTo(collection$iterator.next_1(), 16); collection.clear_0(); } this$static.map_0.clear_0(); this$static.totalSize = 0; } function $containsKey(this$static, key){ return this$static.map_0.containsKey(key); } function $entries(this$static){ var result; return result = this$static.entries_0 , !result?(this$static.entries_0 = new AbstractMultimap$Entries(this$static)):result; } function $get(this$static, key){ var collection; collection = castTo(this$static.map_0.get_3(key), 16); !collection && (collection = this$static.createCollection_0(key)); return this$static.wrapCollection(key, collection); } function $put(this$static, key, value_0){ var collection; collection = castTo(this$static.map_0.get_3(key), 16); if (!collection) { collection = this$static.createCollection_0(key); if (collection.add_2(value_0)) { ++this$static.totalSize; this$static.map_0.put(key, collection); return true; } else { throw toJs(new AssertionError_0('New Collection violated the Collection spec')); } } else if (collection.add_2(value_0)) { ++this$static.totalSize; return true; } else { return false; } } function $removeAll(this$static, key){ var collection, output; collection = castTo(this$static.map_0.remove_0(key), 16); if (!collection) { return this$static.createUnmodifiableEmptyCollection(); } output = this$static.createCollection(); output.addAll(collection); this$static.totalSize -= collection.size_1(); collection.clear_0(); return this$static.unmodifiableCollectionSubclass(output); } function $removeValuesForKey(this$static, key){ var collection, count; collection = castTo(safeRemove_0(this$static.map_0, key), 16); if (collection) { count = collection.size_1(); collection.clear_0(); this$static.totalSize -= count; } } function $values(this$static){ var result; return result = this$static.values , !result?(this$static.values = new AbstractMultimap$Values(this$static)):result; } function $wrapList(this$static, key, list, ancestor){ return instanceOf(list, 59)?new AbstractMapBasedMultimap$RandomAccessWrappedList(this$static, key, list, ancestor):new AbstractMapBasedMultimap$WrappedList(this$static, key, list, ancestor); } function AbstractMapBasedMultimap(map_0){ checkArgument(map_0.isEmpty()); this.map_0 = map_0; } function iteratorOrListIterator(collection){ return instanceOf(collection, 15)?castTo(collection, 15).listIterator_0():collection.iterator_0(); } function lambda$1(keyToValueCollectionEntry_0){ var key, valueCollection; key = keyToValueCollectionEntry_0.getKey(); valueCollection = castTo(keyToValueCollectionEntry_0.getValue(), 16); return map_2(valueCollection.spliterator_0(), new AbstractMapBasedMultimap$lambda$2$Type(key)); } defineClass(742, 2084, $intern_5); _.clear_0 = function clear_0(){ $clear(this); } ; _.containsKey = function containsKey(key){ return $containsKey(this, key); } ; _.createAsMap = function createAsMap(){ return new AbstractMapBasedMultimap$AsMap(this, this.map_0); } ; _.createCollection_0 = function createCollection(key){ return this.createCollection(); } ; _.createKeySet = function createKeySet(){ return new AbstractMapBasedMultimap$KeySet(this, this.map_0); } ; _.createUnmodifiableEmptyCollection = function createUnmodifiableEmptyCollection(){ return this.unmodifiableCollectionSubclass(this.createCollection()); } ; _.entryIterator = function entryIterator_0(){ return new AbstractMapBasedMultimap$2(this); } ; _.entrySpliterator = function entrySpliterator_0(){ return flatMap(this.map_0.entrySet_0().spliterator_0(), new AbstractMapBasedMultimap$lambda$1$Type, 64, this.totalSize); } ; _.get_1 = function get_0(key){ return $get(this, key); } ; _.removeAll = function removeAll(key){ return $removeAll(this, key); } ; _.size_1 = function size_1(){ return this.totalSize; } ; _.unmodifiableCollectionSubclass = function unmodifiableCollectionSubclass(collection){ return $clinit_Collections() , new Collections$UnmodifiableCollection(collection); } ; _.valueIterator_0 = function valueIterator(){ return new AbstractMapBasedMultimap$1(this); } ; _.valueSpliterator = function valueSpliterator(){ return flatMap(this.map_0.values_0().spliterator_0(), new AbstractMapBasedMultimap$1methodref$spliterator$Type, 64, this.totalSize); } ; _.wrapCollection = function wrapCollection(key, collection){ return new AbstractMapBasedMultimap$WrappedCollection(this, key, collection, null); } ; _.totalSize = 0; var Lcom_google_common_collect_AbstractMapBasedMultimap_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap', 742); function $asMap(this$static){ var result; return result = this$static.asMap , !result?(this$static.asMap = new AbstractMapBasedMultimap$AsMap(this$static, this$static.map_0)):result; } defineClass(1696, 742, $intern_5); _.createCollection = function createCollection_0(){ return new ArrayList_0(this.expectedValuesPerKey); } ; _.createUnmodifiableEmptyCollection = function createUnmodifiableEmptyCollection_0(){ return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } ; _.get_1 = function get_1(key){ return castTo($get(this, key), 15); } ; _.removeAll = function removeAll_0(key){ return castTo($removeAll(this, key), 15); } ; _.asMap_0 = function asMap_0(){ return $asMap(this); } ; _.equals_0 = function equals_4(object){ return equalsImpl_1(this, object); } ; _.get_2 = function get_2(key){ return castTo($get(this, key), 15); } ; _.removeAll_0 = function removeAll_1(key){ return castTo($removeAll(this, key), 15); } ; _.unmodifiableCollectionSubclass = function unmodifiableCollectionSubclass_0(collection){ return unmodifiableList(castTo(collection, 15)); } ; _.wrapCollection = function wrapCollection_0(key, collection){ return $wrapList(this, key, castTo(collection, 15), null); } ; var Lcom_google_common_collect_AbstractListMultimap_2_classLit = createForClass('com.google.common.collect', 'AbstractListMultimap', 1696); function AbstractMapBasedMultimap$Itr(this$0){ this.this$01 = this$0; this.keyIterator = this$0.map_0.entrySet_0().iterator_0(); this.key = null; this.collection = null; this.valueIterator = ($clinit_Iterators$EmptyModifiableIterator() , INSTANCE_2); } defineClass(748, 1, $intern_6); _.forEachRemaining = function forEachRemaining_0(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_1(){ return this.keyIterator.hasNext_0() || this.valueIterator.hasNext_0(); } ; _.next_1 = function next_2(){ var mapEntry; if (!this.valueIterator.hasNext_0()) { mapEntry = castTo(this.keyIterator.next_1(), 44); this.key = mapEntry.getKey(); this.collection = castTo(mapEntry.getValue(), 16); this.valueIterator = this.collection.iterator_0(); } return this.output(this.key, this.valueIterator.next_1()); } ; _.remove = function remove_2(){ this.valueIterator.remove(); castTo(requireNonNull(this.collection), 16).isEmpty() && this.keyIterator.remove(); --this.this$01.totalSize; } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$Itr_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/Itr', 748); function AbstractMapBasedMultimap$1(this$0){ AbstractMapBasedMultimap$Itr.call(this, this$0); } defineClass(1129, 748, $intern_6, AbstractMapBasedMultimap$1); _.output = function output_0(key, value_0){ return value_0; } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$1_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/1', 1129); function AbstractMapBasedMultimap$1methodref$spliterator$Type(){ } defineClass(1130, 1, {}, AbstractMapBasedMultimap$1methodref$spliterator$Type); _.apply_0 = function apply_2(arg0){ return castTo(arg0, 16).spliterator_0(); } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$1methodref$spliterator$Type_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/1methodref$spliterator$Type', 1130); function AbstractMapBasedMultimap$2(this$0){ AbstractMapBasedMultimap$Itr.call(this, this$0); } defineClass(1131, 748, $intern_6, AbstractMapBasedMultimap$2); _.output = function output_1(key, value_0){ return new ImmutableEntry(key, value_0); } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$2_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/2', 1131); function $forEach_2(this$static, consumer){ var entry, entry$iterator; checkCriticalNotNull(consumer); for (entry$iterator = this$static.entrySet_0().iterator_0(); entry$iterator.hasNext_0();) { entry = castTo(entry$iterator.next_1(), 44); consumer.accept_1(entry.getKey(), entry.getValue()); } } function $merge(this$static, key, value_0, remappingFunction){ var currentValue, newValue; checkCriticalNotNull(remappingFunction); checkCriticalNotNull(value_0); currentValue = this$static.get_3(key); newValue = currentValue == null?value_0:addAll_21(castTo(currentValue, 15), castTo(value_0, 16)); newValue == null?this$static.remove_0(key):this$static.put(key, newValue); return newValue; } var Ljava_util_Map_2_classLit = createForInterface('java.util', 'Map'); function $containsEntry_0(this$static, entry){ var key, ourValue, value_0; key = entry.getKey(); value_0 = entry.getValue(); ourValue = this$static.get_3(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 $implFindEntry(this$static, key, remove){ var entry, iter, k; for (iter = this$static.entrySet_0().iterator_0(); iter.hasNext_0();) { entry = castTo(iter.next_1(), 44); 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()); iter.remove(); } return entry; } } return null; } function $putAll(this$static, map_0){ var e, e$iterator; checkCriticalNotNull(map_0); for (e$iterator = map_0.entrySet_0().iterator_0(); e$iterator.hasNext_0();) { e = castTo(e$iterator.next_1(), 44); this$static.put(e.getKey(), e.getValue()); } } function $toString_0(this$static){ var entry, entry$iterator, joiner; joiner = new StringJoiner(', ', '{', '}'); for (entry$iterator = this$static.entrySet_0().iterator_0(); entry$iterator.hasNext_0();) { entry = castTo(entry$iterator.next_1(), 44); $add_9(joiner, $toString_1(this$static, entry.getKey()) + '=' + $toString_1(this$static, entry.getValue())); } return !joiner.builder?joiner.emptyValue:joiner.suffix.length == 0?joiner.builder.string:joiner.builder.string + ('' + joiner.suffix); } function $toString_1(this$static, o){ return maskUndefined(o) === maskUndefined(this$static)?'(this Map)':o == null?'null':toString_40(o); } function getEntryKeyOrNull(entry){ return !entry?null:entry.key; } function getEntryValueOrNull(entry){ return !entry?null:entry.getValue(); } defineClass(2065, 1, $intern_7); _.forEach = function forEach(consumer){ $forEach_2(this, consumer); } ; _.merge = function merge(key, value_0, remappingFunction){ return $merge(this, key, value_0, remappingFunction); } ; _.clear_0 = function clear_1(){ this.entrySet_0().clear_0(); } ; _.containsEntry = function containsEntry(entry){ return $containsEntry_0(this, entry); } ; _.containsKey = function containsKey_0(key){ return !!$implFindEntry(this, key, false); } ; _.containsValue = function containsValue(value_0){ var entry, entry$iterator, v; for (entry$iterator = this.entrySet_0().iterator_0(); entry$iterator.hasNext_0();) { entry = castTo(entry$iterator.next_1(), 44); v = entry.getValue(); if (maskUndefined(value_0) === maskUndefined(v) || value_0 != null && equals_Ljava_lang_Object__Z__devirtual$(value_0, v)) { return true; } } return false; } ; _.equals_0 = function equals_5(obj){ var entry, entry$iterator, otherMap; if (obj === this) { return true; } if (!instanceOf(obj, 85)) { return false; } otherMap = castTo(obj, 85); if (this.size_1() != otherMap.size_1()) { return false; } for (entry$iterator = otherMap.entrySet_0().iterator_0(); entry$iterator.hasNext_0();) { entry = castTo(entry$iterator.next_1(), 44); if (!this.containsEntry(entry)) { return false; } } return true; } ; _.get_3 = function get_3(key){ return getEntryValueOrNull($implFindEntry(this, key, false)); } ; _.hashCode_1 = function hashCode_5(){ return hashCode_48(this.entrySet_0()); } ; _.isEmpty = function isEmpty_0(){ return this.size_1() == 0; } ; _.keySet_0 = function keySet_1(){ return new AbstractMap$1(this); } ; _.put = function put(key, value_0){ throw toJs(new UnsupportedOperationException_0('Put not supported on this map')); } ; _.putAll = function putAll(map_0){ $putAll(this, map_0); } ; _.remove_0 = function remove_3(key){ return getEntryValueOrNull($implFindEntry(this, key, true)); } ; _.size_1 = function size_2(){ return this.entrySet_0().size_1(); } ; _.toString_0 = function toString_6(){ return $toString_0(this); } ; _.values_0 = function values_1(){ return new AbstractMap$2(this); } ; var Ljava_util_AbstractMap_2_classLit = createForClass('java.util', 'AbstractMap', 2065); function $entrySet(this$static){ var result; result = this$static.entrySet; return !result?(this$static.entrySet = this$static.createEntrySet()):result; } defineClass(2085, 2065, $intern_7); _.createKeySet = function createKeySet_0(){ return new Maps$KeySet(this); } ; _.entrySet_0 = function entrySet(){ return $entrySet(this); } ; _.keySet_0 = function keySet_2(){ var result; result = this.keySet; return !result?(this.keySet = this.createKeySet()):result; } ; _.values_0 = function values_2(){ var result; result = this.values; return !result?(this.values = new Maps$Values(this)):result; } ; var Lcom_google_common_collect_Maps$ViewCachingAbstractMap_2_classLit = createForClass('com.google.common.collect', 'Maps/ViewCachingAbstractMap', 2085); function $get_0(this$static, key){ var collection, k; collection = castTo(safeGet(this$static.submap, key), 16); if (!collection) { return null; } k = key; return this$static.this$01_1.wrapCollection(k, collection); } function $remove_1(this$static, key){ var collection, output; collection = castTo(this$static.submap.remove_0(key), 16); if (!collection) { return null; } output = this$static.this$01_1.createCollection(); output.addAll(collection); this$static.this$01_1.totalSize -= collection.size_1(); collection.clear_0(); return output; } function $wrapEntry(this$static, entry){ var key; key = entry.getKey(); return new ImmutableEntry(key, this$static.this$01_1.wrapCollection(key, castTo(entry.getValue(), 16))); } function AbstractMapBasedMultimap$AsMap(this$0, submap){ this.this$01_1 = this$0; this.submap = submap; } defineClass(402, 2085, $intern_7, AbstractMapBasedMultimap$AsMap); _.get_3 = function get_4(key){ return $get_0(this, key); } ; _.remove_0 = function remove_4(key){ return $remove_1(this, key); } ; _.clear_0 = function clear_2(){ this.submap == this.this$01_1.map_0?this.this$01_1.clear_0():clear_20(new AbstractMapBasedMultimap$AsMap$AsMapIterator(this)); } ; _.containsKey = function containsKey_1(key){ return safeContainsKey(this.submap, key); } ; _.createEntrySet_0 = function createEntrySet(){ return new AbstractMapBasedMultimap$AsMap$AsMapEntries(this); } ; _.createEntrySet = function(){ return this.createEntrySet_0(); } ; _.equals_0 = function equals_6(object){ return this === object || equals_Ljava_lang_Object__Z__devirtual$(this.submap, object); } ; _.hashCode_1 = function hashCode_6(){ return hashCode__I__devirtual$(this.submap); } ; _.keySet_0 = function keySet_3(){ return this.this$01_1.keySet_0(); } ; _.size_1 = function size_3(){ return this.submap.size_1(); } ; _.toString_0 = function toString_7(){ return toString_40(this.submap); } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$AsMap_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/AsMap', 402); function $forEach_0(this$static, action){ var t, t$iterator; checkCriticalNotNull(action); for (t$iterator = this$static.iterator_0(); t$iterator.hasNext_0();) { t = t$iterator.next_1(); action.accept(t); } } var Ljava_lang_Iterable_2_classLit = createForInterface('java.lang', 'Iterable'); function $addAll(this$static, c){ var changed, e, e$iterator; checkCriticalNotNull(c); changed = false; for (e$iterator = c.iterator_0(); e$iterator.hasNext_0();) { e = e$iterator.next_1(); changed = changed | this$static.add_2(e); } return changed; } function $advanceToFind(this$static, o, remove){ var e, iter; for (iter = this$static.iterator_0(); 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(); return true; } } return false; } function $clear_0(this$static){ var iter; for (iter = this$static.iterator_0(); iter.hasNext_0();) { iter.next_1(); iter.remove(); } } function $containsAll(this$static, c){ var e, e$iterator; checkCriticalNotNull(c); for (e$iterator = c.iterator_0(); e$iterator.hasNext_0();) { e = e$iterator.next_1(); if (!this$static.contains(e)) { return false; } } return true; } function $removeAll_0(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_6(iter); if (c.contains(o)) { $remove_13(iter); changed = true; } } return changed; } function $toArray(this$static){ return this$static.toArray_0(initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, this$static.size_1(), 5, 1)); } function $toArray_0(this$static, a){ var i, it, result, size_0; size_0 = this$static.size_1(); a.length < size_0 && (a = stampJavaTypeInfo_1(new Array(size_0), a)); result = a; it = this$static.iterator_0(); for (i = 0; i < size_0; ++i) { setCheck(result, i, it.next_1()); } a.length > size_0 && setCheck(a, size_0, null); return a; } function $toString_2(this$static){ var e, e$iterator, joiner; joiner = new StringJoiner(', ', '[', ']'); for (e$iterator = this$static.iterator_0(); e$iterator.hasNext_0();) { e = e$iterator.next_1(); $add_9(joiner, maskUndefined(e) === maskUndefined(this$static)?'(this Collection)':e == null?'null':toString_40(e)); } return !joiner.builder?joiner.emptyValue:joiner.suffix.length == 0?joiner.builder.string:joiner.builder.string + ('' + joiner.suffix); } defineClass(31, 1, $intern_8); _.forEach_0 = function forEach_0(action){ $forEach_0(this, action); } ; _.parallelStream = function parallelStream(){ return this.stream(); } ; _.spliterator_0 = function spliterator_0(){ return new Spliterators$IteratorSpliterator(this, 0); } ; _.stream = function stream_0(){ return new StreamImpl(null, this.spliterator_0()); } ; _.add_2 = function add_2(o){ throw toJs(new UnsupportedOperationException_0('Add not supported on this collection')); } ; _.addAll = function addAll(c){ return $addAll(this, c); } ; _.clear_0 = function clear_3(){ $clear_0(this); } ; _.contains = function contains(o){ return $advanceToFind(this, o, false); } ; _.containsAll = function containsAll(c){ return $containsAll(this, c); } ; _.isEmpty = function isEmpty_1(){ return this.size_1() == 0; } ; _.remove_1 = function remove_5(o){ return $advanceToFind(this, o, true); } ; _.toArray = function toArray(){ return $toArray(this); } ; _.toArray_0 = function toArray_0(a){ return $toArray_0(this, a); } ; _.toString_0 = function toString_8(){ return $toString_2(this); } ; var Ljava_util_AbstractCollection_2_classLit = createForClass('java.util', 'AbstractCollection', 31); var Ljava_util_Set_2_classLit = createForInterface('java.util', 'Set'); function $equals_0(this$static, o){ var other; if (maskUndefined(o) === maskUndefined(this$static)) { return true; } if (!instanceOf(o, 21)) { return false; } other = castTo(o, 21); if (other.size_1() != this$static.size_1()) { return false; } return this$static.containsAll(other); } function $removeAll_1(this$static, c){ var iter, o, o$iterator, size_0; checkCriticalNotNull(c); size_0 = this$static.map_0.size_1(); if (size_0 < c.size_1()) { for (iter = this$static.map_0.keySet_0().iterator_0(); iter.hasNext_0();) { o = iter.next_1(); c.contains(o) && iter.remove(); } } else { for (o$iterator = c.iterator_0(); o$iterator.hasNext_0();) { o = o$iterator.next_1(); this$static.map_0.remove_0(o) != null; } } return size_0 != this$static.map_0.size_1(); } defineClass($intern_9, 31, $intern_10); _.spliterator_0 = function spliterator_1(){ return new Spliterators$IteratorSpliterator(this, 1); } ; _.equals_0 = function equals_7(o){ return $equals_0(this, o); } ; _.hashCode_1 = function hashCode_7(){ return hashCode_48(this); } ; var Ljava_util_AbstractSet_2_classLit = createForClass('java.util', 'AbstractSet', $intern_9); defineClass(2068, $intern_9, $intern_10); var Lcom_google_common_collect_Sets$ImprovedAbstractSet_2_classLit = createForClass('com.google.common.collect', 'Sets/ImprovedAbstractSet', 2068); function $contains(this$static, o){ var entry, key, value_0; if (instanceOf(o, 44)) { entry = castTo(o, 44); key = entry.getKey(); value_0 = safeGet(this$static.map_1(), key); return equal(value_0, entry.getValue()) && (value_0 != null || this$static.map_1().containsKey(key)); } return false; } defineClass(2069, 2068, $intern_10); _.clear_0 = function clear_4(){ this.map_1().clear_0(); } ; _.contains = function contains_0(o){ return $contains(this, o); } ; _.isEmpty = function isEmpty_2(){ return this.map_1().isEmpty(); } ; _.remove_1 = function remove_6(o){ var entry; if (this.contains(o) && instanceOf(o, 44)) { entry = castTo(o, 44); return this.map_1().keySet_0().remove_1(entry.getKey()); } return false; } ; _.size_1 = function size_4(){ return this.map_1().size_1(); } ; var Lcom_google_common_collect_Maps$EntrySet_2_classLit = createForClass('com.google.common.collect', 'Maps/EntrySet', 2069); function AbstractMapBasedMultimap$AsMap$AsMapEntries(this$1){ this.this$11 = this$1; } defineClass(1127, 2069, $intern_10, AbstractMapBasedMultimap$AsMap$AsMapEntries); _.contains = function contains_1(o){ return safeContains(this.this$11.submap.entrySet_0(), o); } ; _.iterator_0 = function iterator_0(){ return new AbstractMapBasedMultimap$AsMap$AsMapIterator(this.this$11); } ; _.map_1 = function map_1(){ return this.this$11; } ; _.remove_1 = function remove_7(o){ var entry; if (!safeContains(this.this$11.submap.entrySet_0(), o)) { return false; } entry = castTo(requireNonNull(castTo(o, 44)), 44); $removeValuesForKey(this.this$11.this$01_1, entry.getKey()); return true; } ; _.spliterator_0 = function spliterator_2(){ return map_2(this.this$11.submap.entrySet_0().spliterator_0(), new AbstractMapBasedMultimap$AsMap$AsMapEntries$0methodref$wrapEntry$Type(this.this$11)); } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$AsMap$AsMapEntries_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/AsMap/AsMapEntries', 1127); function AbstractMapBasedMultimap$AsMap$AsMapEntries$0methodref$wrapEntry$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1128, 1, {}, AbstractMapBasedMultimap$AsMap$AsMapEntries$0methodref$wrapEntry$Type); _.apply_0 = function apply_3(arg0){ return $wrapEntry(this.$$outer_0, castTo(arg0, 44)); } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$AsMap$AsMapEntries$0methodref$wrapEntry$Type_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type', 1128); function AbstractMapBasedMultimap$AsMap$AsMapIterator(this$1){ this.this$11 = this$1; this.delegateIterator = this.this$11.submap.entrySet_0().iterator_0(); } defineClass(746, 1, $intern_6, AbstractMapBasedMultimap$AsMap$AsMapIterator); _.forEachRemaining = function forEachRemaining_1(consumer){ $forEachRemaining(this, consumer); } ; _.next_1 = function next_3(){ var entry; return entry = castTo(this.delegateIterator.next_1(), 44) , this.collection = castTo(entry.getValue(), 16) , $wrapEntry(this.this$11, entry); } ; _.hasNext_0 = function hasNext_2(){ return this.delegateIterator.hasNext_0(); } ; _.remove = function remove_8(){ checkState_0(!!this.collection); this.delegateIterator.remove(); this.this$11.this$01_1.totalSize -= this.collection.size_1(); this.collection.clear_0(); this.collection = null; } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$AsMap$AsMapIterator_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/AsMap/AsMapIterator', 746); function Maps$KeySet(map_0){ this.map_0 = castTo(checkNotNull(map_0), 85); } defineClass(542, 2068, $intern_10, Maps$KeySet); _.clear_0 = function clear_5(){ this.map_0.clear_0(); } ; _.contains = function contains_2(o){ return this.map_0.containsKey(o); } ; _.forEach_0 = function forEach_1(action){ checkNotNull(action); this.map_0.forEach(new Maps$KeySet$lambda$0$Type(action)); } ; _.isEmpty = function isEmpty_3(){ return this.map_0.isEmpty(); } ; _.iterator_0 = function iterator_1(){ return new Maps$1(this.map_0.entrySet_0().iterator_0()); } ; _.remove_1 = function remove_9(o){ if (this.map_0.containsKey(o)) { this.map_0.remove_0(o); return true; } return false; } ; _.size_1 = function size_5(){ return this.map_0.size_1(); } ; var Lcom_google_common_collect_Maps$KeySet_2_classLit = createForClass('com.google.common.collect', 'Maps/KeySet', 542); function AbstractMapBasedMultimap$KeySet(this$0, subMap){ this.this$01 = this$0; Maps$KeySet.call(this, subMap); } defineClass(327, 542, $intern_10, AbstractMapBasedMultimap$KeySet); _.clear_0 = function clear_6(){ var entryIterator; clear_20((entryIterator = this.map_0.entrySet_0().iterator_0() , new AbstractMapBasedMultimap$KeySet$1(this, entryIterator))); } ; _.containsAll = function containsAll_0(c){ return this.map_0.keySet_0().containsAll(c); } ; _.equals_0 = function equals_8(object){ return this === object || equals_Ljava_lang_Object__Z__devirtual$(this.map_0.keySet_0(), object); } ; _.hashCode_1 = function hashCode_8(){ return hashCode__I__devirtual$(this.map_0.keySet_0()); } ; _.iterator_0 = function iterator_2(){ var entryIterator; return entryIterator = this.map_0.entrySet_0().iterator_0() , new AbstractMapBasedMultimap$KeySet$1(this, entryIterator); } ; _.remove_1 = function remove_10(key){ var collection, count; count = 0; collection = castTo(this.map_0.remove_0(key), 16); if (collection) { count = collection.size_1(); collection.clear_0(); this.this$01.totalSize -= count; } return count > 0; } ; _.spliterator_0 = function spliterator_3(){ return this.map_0.keySet_0().spliterator_0(); } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$KeySet_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/KeySet', 327); function AbstractMapBasedMultimap$KeySet$1(this$1, val$entryIterator){ this.this$11 = this$1; this.val$entryIterator2 = val$entryIterator; } defineClass(747, 1, $intern_6, AbstractMapBasedMultimap$KeySet$1); _.forEachRemaining = function forEachRemaining_2(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_3(){ return this.val$entryIterator2.hasNext_0(); } ; _.next_1 = function next_4(){ this.entry = castTo(this.val$entryIterator2.next_1(), 44); return this.entry.getKey(); } ; _.remove = function remove_11(){ var collection; checkState_0(!!this.entry); collection = castTo(this.entry.getValue(), 16); this.val$entryIterator2.remove(); this.this$11.this$01.totalSize -= collection.size_1(); collection.clear_0(); this.entry = null; } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$KeySet$1_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/KeySet/1', 747); function AbstractMapBasedMultimap$SortedAsMap(this$0, submap){ this.this$01_0 = this$0; AbstractMapBasedMultimap$AsMap.call(this, this$0, submap); } defineClass(503, 402, {85:1, 133:1}, AbstractMapBasedMultimap$SortedAsMap); _.createKeySet = function createKeySet_1(){ return this.createKeySet_0(); } ; _.keySet_0 = function keySet_4(){ return this.keySet_1(); } ; _.createKeySet_0 = function createKeySet_2(){ return new AbstractMapBasedMultimap$SortedKeySet(this.this$01_0, this.sortedMap()); } ; _.firstKey = function firstKey(){ return this.sortedMap().firstKey(); } ; _.keySet_1 = function keySet_5(){ var result; return result = this.sortedKeySet , !result?(this.sortedKeySet = this.createKeySet_0()):result; } ; _.lastKey = function lastKey(){ return this.sortedMap().lastKey(); } ; _.sortedMap = function sortedMap(){ return castTo(this.submap, 133); } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$SortedAsMap_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/SortedAsMap', 503); function AbstractMapBasedMultimap$NavigableAsMap(this$0, submap){ this.this$01 = this$0; AbstractMapBasedMultimap$SortedAsMap.call(this, this$0, submap); } defineClass(446, 503, $intern_11, AbstractMapBasedMultimap$NavigableAsMap); _.createKeySet = function createKeySet_3(){ return new AbstractMapBasedMultimap$NavigableKeySet(this.this$01, castTo(castTo(this.submap, 133), 139)); } ; _.createKeySet_0 = function createKeySet_4(){ return new AbstractMapBasedMultimap$NavigableKeySet(this.this$01, castTo(castTo(this.submap, 133), 139)); } ; _.keySet_0 = function keySet_6(){ var result; return result = this.sortedKeySet , castTo(!result?(this.sortedKeySet = new AbstractMapBasedMultimap$NavigableKeySet(this.this$01, castTo(castTo(this.submap, 133), 139))):result, 277); } ; _.keySet_1 = function keySet_7(){ var result; return result = this.sortedKeySet , castTo(!result?(this.sortedKeySet = new AbstractMapBasedMultimap$NavigableKeySet(this.this$01, castTo(castTo(this.submap, 133), 139))):result, 277); } ; _.sortedMap = function sortedMap_0(){ return castTo(castTo(this.submap, 133), 139); } ; _.ceilingKey = function ceilingKey(key){ return castTo(castTo(this.submap, 133), 139).ceilingKey(key); } ; _.floorKey = function floorKey(key){ return castTo(castTo(this.submap, 133), 139).floorKey(key); } ; _.headMap = function headMap(toKey, inclusive){ return new AbstractMapBasedMultimap$NavigableAsMap(this.this$01, castTo(castTo(this.submap, 133), 139).headMap(toKey, inclusive)); } ; _.higherKey = function higherKey(key){ return castTo(castTo(this.submap, 133), 139).higherKey(key); } ; _.lowerKey = function lowerKey(key){ return castTo(castTo(this.submap, 133), 139).lowerKey(key); } ; _.tailMap = function tailMap(fromKey, inclusive){ return new AbstractMapBasedMultimap$NavigableAsMap(this.this$01, castTo(castTo(this.submap, 133), 139).tailMap(fromKey, inclusive)); } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$NavigableAsMap_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/NavigableAsMap', 446); function AbstractMapBasedMultimap$SortedKeySet(this$0, subMap){ AbstractMapBasedMultimap$KeySet.call(this, this$0, subMap); } defineClass(502, 327, $intern_12, AbstractMapBasedMultimap$SortedKeySet); _.spliterator_0 = function spliterator_4(){ return this.map_0.keySet_0().spliterator_0(); } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$SortedKeySet_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/SortedKeySet', 502); function AbstractMapBasedMultimap$NavigableKeySet(this$0, subMap){ AbstractMapBasedMultimap$SortedKeySet.call(this, this$0, subMap); } defineClass(401, 502, $intern_13, AbstractMapBasedMultimap$NavigableKeySet); var Lcom_google_common_collect_AbstractMapBasedMultimap$NavigableKeySet_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/NavigableKeySet', 401); function $addToMap(this$static){ this$static.ancestor?$addToMap(this$static.ancestor):this$static.this$01_0.map_0.put(this$static.key, this$static.delegate); } function $refreshIfEmpty(this$static){ var newDelegate; if (this$static.ancestor) { $refreshIfEmpty(this$static.ancestor); if (this$static.ancestor.delegate != this$static.ancestorDelegate) { throw toJs(new ConcurrentModificationException); } } else if (this$static.delegate.isEmpty()) { newDelegate = castTo(this$static.this$01_0.map_0.get_3(this$static.key), 16); !!newDelegate && (this$static.delegate = newDelegate); } } function $removeIfEmpty(this$static){ this$static.ancestor?$removeIfEmpty(this$static.ancestor):this$static.delegate.isEmpty() && this$static.this$01_0.map_0.remove_0(this$static.key); } function $size(this$static){ $refreshIfEmpty(this$static); return this$static.delegate.size_1(); } function AbstractMapBasedMultimap$WrappedCollection(this$0, key, delegate, ancestor){ this.this$01_0 = this$0; this.key = key; this.delegate = delegate; this.ancestor = ancestor; this.ancestorDelegate = !ancestor?null:ancestor.delegate; } defineClass(551, 31, $intern_8, AbstractMapBasedMultimap$WrappedCollection); _.add_2 = function add_3(value_0){ var changed, wasEmpty; $refreshIfEmpty(this); wasEmpty = this.delegate.isEmpty(); changed = this.delegate.add_2(value_0); if (changed) { ++this.this$01_0.totalSize; wasEmpty && $addToMap(this); } return changed; } ; _.addAll = function addAll_0(collection){ var changed, newSize, oldSize; if (collection.isEmpty()) { return false; } oldSize = ($refreshIfEmpty(this) , this.delegate.size_1()); changed = this.delegate.addAll(collection); if (changed) { newSize = this.delegate.size_1(); this.this$01_0.totalSize += newSize - oldSize; oldSize == 0 && $addToMap(this); } return changed; } ; _.clear_0 = function clear_7(){ var oldSize; oldSize = ($refreshIfEmpty(this) , this.delegate.size_1()); if (oldSize == 0) { return; } this.delegate.clear_0(); this.this$01_0.totalSize -= oldSize; $removeIfEmpty(this); } ; _.contains = function contains_3(o){ $refreshIfEmpty(this); return this.delegate.contains(o); } ; _.containsAll = function containsAll_1(c){ $refreshIfEmpty(this); return this.delegate.containsAll(c); } ; _.equals_0 = function equals_9(object){ if (object === this) { return true; } $refreshIfEmpty(this); return equals_Ljava_lang_Object__Z__devirtual$(this.delegate, object); } ; _.hashCode_1 = function hashCode_9(){ $refreshIfEmpty(this); return hashCode__I__devirtual$(this.delegate); } ; _.iterator_0 = function iterator_3(){ $refreshIfEmpty(this); return new AbstractMapBasedMultimap$WrappedCollection$WrappedIterator(this); } ; _.remove_1 = function remove_12(o){ var changed; $refreshIfEmpty(this); changed = this.delegate.remove_1(o); if (changed) { --this.this$01_0.totalSize; $removeIfEmpty(this); } return changed; } ; _.size_1 = function size_6(){ return $size(this); } ; _.spliterator_0 = function spliterator_5(){ return $refreshIfEmpty(this) , this.delegate.spliterator_0(); } ; _.toString_0 = function toString_9(){ $refreshIfEmpty(this); return toString_40(this.delegate); } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$WrappedCollection_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/WrappedCollection', 551); function $sort_0(this$static, c){ var a, i; a = this$static.toArray(); mergeSort(a, 0, a.length, c); for (i = 0; i < a.length; i++) { this$static.set_2(i, a[i]); } } var Ljava_util_List_2_classLit = createForInterface('java.util', 'List'); function AbstractMapBasedMultimap$WrappedList(this$0, key, delegate, ancestor){ this.this$01 = this$0; AbstractMapBasedMultimap$WrappedCollection.call(this, this$0, key, delegate, ancestor); } defineClass(744, 551, {20:1, 31:1, 16:1, 15:1}, AbstractMapBasedMultimap$WrappedList); _.sort_0 = function sort_0(c){ $sort_0(this, c); } ; _.spliterator_0 = function spliterator_6(){ return $refreshIfEmpty(this) , this.delegate.spliterator_0(); } ; _.add_3 = function add_4(index_0, element){ var wasEmpty; $refreshIfEmpty(this); wasEmpty = this.delegate.isEmpty(); castTo(this.delegate, 15).add_3(index_0, element); ++this.this$01.totalSize; wasEmpty && $addToMap(this); } ; _.addAll_0 = function addAll_1(index_0, c){ var changed, newSize, oldSize; if (c.isEmpty()) { return false; } oldSize = ($refreshIfEmpty(this) , this.delegate.size_1()); changed = castTo(this.delegate, 15).addAll_0(index_0, c); if (changed) { newSize = this.delegate.size_1(); this.this$01.totalSize += newSize - oldSize; oldSize == 0 && $addToMap(this); } return changed; } ; _.get_0 = function get_5(index_0){ $refreshIfEmpty(this); return castTo(this.delegate, 15).get_0(index_0); } ; _.indexOf_0 = function indexOf(o){ $refreshIfEmpty(this); return castTo(this.delegate, 15).indexOf_0(o); } ; _.listIterator_0 = function listIterator(){ $refreshIfEmpty(this); return new AbstractMapBasedMultimap$WrappedList$WrappedListIterator(this); } ; _.listIterator_1 = function listIterator_0(index_0){ $refreshIfEmpty(this); return new AbstractMapBasedMultimap$WrappedList$WrappedListIterator_0(this, index_0); } ; _.remove_2 = function remove_13(index_0){ var value_0; $refreshIfEmpty(this); value_0 = castTo(this.delegate, 15).remove_2(index_0); --this.this$01.totalSize; $removeIfEmpty(this); return value_0; } ; _.set_2 = function set_2(index_0, element){ $refreshIfEmpty(this); return castTo(this.delegate, 15).set_2(index_0, element); } ; _.subList = function subList_0(fromIndex, toIndex){ $refreshIfEmpty(this); return $wrapList(this.this$01, this.key, castTo(this.delegate, 15).subList(fromIndex, toIndex), !this.ancestor?this:this.ancestor); } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$WrappedList_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/WrappedList', 744); function AbstractMapBasedMultimap$RandomAccessWrappedList(this$0, key, delegate, ancestor){ AbstractMapBasedMultimap$WrappedList.call(this, this$0, key, delegate, ancestor); } defineClass(1126, 744, {20:1, 31:1, 16:1, 15:1, 59:1}, AbstractMapBasedMultimap$RandomAccessWrappedList); var Lcom_google_common_collect_AbstractMapBasedMultimap$RandomAccessWrappedList_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/RandomAccessWrappedList', 1126); function $$init(this$static){ this$static.originalDelegate = this$static.this$11_0.delegate; } function $remove_2(this$static){ this$static.delegateIterator.remove(); --this$static.this$11_0.this$01_0.totalSize; $removeIfEmpty(this$static.this$11_0); } function $validateIterator(this$static){ $refreshIfEmpty(this$static.this$11_0); if (this$static.this$11_0.delegate != this$static.originalDelegate) { throw toJs(new ConcurrentModificationException); } } function AbstractMapBasedMultimap$WrappedCollection$WrappedIterator(this$1){ this.this$11_0 = this$1; $$init(this); this.delegateIterator = iteratorOrListIterator(this$1.delegate); } function AbstractMapBasedMultimap$WrappedCollection$WrappedIterator_0(this$1, delegateIterator){ this.this$11_0 = this$1; $$init(this); this.delegateIterator = delegateIterator; } defineClass(628, 1, $intern_6, AbstractMapBasedMultimap$WrappedCollection$WrappedIterator); _.forEachRemaining = function forEachRemaining_3(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_4(){ $validateIterator(this); return this.delegateIterator.hasNext_0(); } ; _.next_1 = function next_5(){ $validateIterator(this); return this.delegateIterator.next_1(); } ; _.remove = function remove_14(){ $remove_2(this); } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$WrappedCollection$WrappedIterator_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/WrappedCollection/WrappedIterator', 628); function AbstractMapBasedMultimap$WrappedList$WrappedListIterator(this$1){ this.this$11 = this$1; AbstractMapBasedMultimap$WrappedCollection$WrappedIterator.call(this, this$1); } function AbstractMapBasedMultimap$WrappedList$WrappedListIterator_0(this$1, index_0){ this.this$11 = this$1; AbstractMapBasedMultimap$WrappedCollection$WrappedIterator_0.call(this, this$1, castTo(this$1.delegate, 15).listIterator_1(index_0)); } defineClass(745, 628, $intern_14, AbstractMapBasedMultimap$WrappedList$WrappedListIterator, AbstractMapBasedMultimap$WrappedList$WrappedListIterator_0); _.remove = function remove_15(){ $remove_2(this); } ; _.add_1 = function add_5(value_0){ var wasEmpty; wasEmpty = $size(this.this$11) == 0; ($validateIterator(this) , castTo(this.delegateIterator, 128)).add_1(value_0); ++this.this$11.this$01.totalSize; wasEmpty && $addToMap(this.this$11); } ; _.hasPrevious = function hasPrevious_0(){ return ($validateIterator(this) , castTo(this.delegateIterator, 128)).hasPrevious(); } ; _.nextIndex_0 = function nextIndex_1(){ return ($validateIterator(this) , castTo(this.delegateIterator, 128)).nextIndex_0(); } ; _.previous_0 = function previous_1(){ return ($validateIterator(this) , castTo(this.delegateIterator, 128)).previous_0(); } ; _.previousIndex = function previousIndex_0(){ return ($validateIterator(this) , castTo(this.delegateIterator, 128)).previousIndex(); } ; _.set_1 = function set_3(value_0){ ($validateIterator(this) , castTo(this.delegateIterator, 128)).set_1(value_0); } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$WrappedList$WrappedListIterator_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/WrappedList/WrappedListIterator', 745); function AbstractMapBasedMultimap$WrappedSortedSet(this$0, key, delegate){ AbstractMapBasedMultimap$WrappedCollection.call(this, this$0, key, delegate, null); } defineClass(743, 551, $intern_12, AbstractMapBasedMultimap$WrappedSortedSet); _.spliterator_0 = function spliterator_7(){ return $refreshIfEmpty(this) , this.delegate.spliterator_0(); } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$WrappedSortedSet_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/WrappedSortedSet', 743); function AbstractMapBasedMultimap$WrappedNavigableSet(this$0, key, delegate){ AbstractMapBasedMultimap$WrappedSortedSet.call(this, this$0, key, delegate); } defineClass(1125, 743, $intern_13, AbstractMapBasedMultimap$WrappedNavigableSet); var Lcom_google_common_collect_AbstractMapBasedMultimap$WrappedNavigableSet_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/WrappedNavigableSet', 1125); function AbstractMapBasedMultimap$WrappedSet(this$0, key, delegate){ AbstractMapBasedMultimap$WrappedCollection.call(this, this$0, key, delegate, null); } defineClass(1124, 551, $intern_10, AbstractMapBasedMultimap$WrappedSet); _.spliterator_0 = function spliterator_8(){ return $refreshIfEmpty(this) , this.delegate.spliterator_0(); } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$WrappedSet_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/WrappedSet', 1124); function AbstractMapBasedMultimap$lambda$1$Type(){ } defineClass(1133, 1, {}, AbstractMapBasedMultimap$lambda$1$Type); _.apply_0 = function apply_4(arg0){ return lambda$1(castTo(arg0, 44)); } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$lambda$1$Type_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/lambda$1$Type', 1133); function AbstractMapBasedMultimap$lambda$2$Type(key_0){ this.key_0 = key_0; } defineClass(1132, 1, {}, AbstractMapBasedMultimap$lambda$2$Type); _.apply_0 = function apply_5(arg0){ return new ImmutableEntry(this.key_0, arg0); } ; var Lcom_google_common_collect_AbstractMapBasedMultimap$lambda$2$Type_2_classLit = createForClass('com.google.common.collect', 'AbstractMapBasedMultimap/lambda$2$Type', 1132); var Ljava_util_Map$Entry_2_classLit = createForInterface('java.util', 'Map/Entry'); defineClass(358, 1, $intern_15); _.equals_0 = function equals_10(object){ var that; if (instanceOf(object, 44)) { that = castTo(object, 44); return equal(this.getKey(), that.getKey()) && equal(this.getValue(), that.getValue()); } return false; } ; _.hashCode_1 = function hashCode_10(){ var k, v; k = this.getKey(); v = this.getValue(); return (k == null?0:hashCode__I__devirtual$(k)) ^ (v == null?0:hashCode__I__devirtual$(v)); } ; _.setValue = function setValue(value_0){ throw toJs(new UnsupportedOperationException); } ; _.toString_0 = function toString_10(){ return this.getKey() + '=' + this.getValue(); } ; var Lcom_google_common_collect_AbstractMapEntry_2_classLit = createForClass('com.google.common.collect', 'AbstractMapEntry', 358); defineClass(2086, 31, $intern_8); _.clear_0 = function clear_8(){ this.multimap_0().clear_0(); } ; _.contains = function contains_4(o){ var entry; if (instanceOf(o, 44)) { entry = castTo(o, 44); return $containsEntry(this.multimap_0(), entry.getKey(), entry.getValue()); } return false; } ; _.remove_1 = function remove_16(o){ var entry; if (instanceOf(o, 44)) { entry = castTo(o, 44); return $remove_0(this.multimap_0(), entry.getKey(), entry.getValue()); } return false; } ; _.size_1 = function size_7(){ return this.multimap_0().totalSize; } ; var Lcom_google_common_collect_Multimaps$Entries_2_classLit = createForClass('com.google.common.collect', 'Multimaps/Entries', 2086); function AbstractMultimap$Entries(this$0){ this.this$01 = this$0; } defineClass(749, 2086, $intern_8, AbstractMultimap$Entries); _.iterator_0 = function iterator_4(){ return this.this$01.entryIterator(); } ; _.multimap_0 = function multimap_0(){ return this.this$01; } ; _.spliterator_0 = function spliterator_9(){ return this.this$01.entrySpliterator(); } ; var Lcom_google_common_collect_AbstractMultimap$Entries_2_classLit = createForClass('com.google.common.collect', 'AbstractMultimap/Entries', 749); function AbstractMultimap$EntrySet(this$0){ AbstractMultimap$Entries.call(this, this$0); } defineClass(750, 749, $intern_10, AbstractMultimap$EntrySet); _.spliterator_0 = function spliterator_10(){ return this.this$01.entrySpliterator(); } ; _.equals_0 = function equals_11(obj){ return equalsImpl_3(this, obj); } ; _.hashCode_1 = function hashCode_11(){ return hashCodeImpl_0(this); } ; var Lcom_google_common_collect_AbstractMultimap$EntrySet_2_classLit = createForClass('com.google.common.collect', 'AbstractMultimap/EntrySet', 750); function AbstractMultimap$Values(this$0){ this.this$01 = this$0; } defineClass(751, 31, $intern_8, AbstractMultimap$Values); _.clear_0 = function clear_9(){ this.this$01.clear_0(); } ; _.contains = function contains_5(o){ return $containsValue(this.this$01, o); } ; _.iterator_0 = function iterator_5(){ return this.this$01.valueIterator_0(); } ; _.size_1 = function size_8(){ return this.this$01.totalSize; } ; _.spliterator_0 = function spliterator_11(){ return this.this$01.valueSpliterator(); } ; var Lcom_google_common_collect_AbstractMultimap$Values_2_classLit = createForClass('com.google.common.collect', 'AbstractMultimap/Values', 751); function lambda$0_1(entry_1){ entry_1.val$backingEntry2.getKey(); castTo(entry_1.val$backingEntry2.getValue(), 16).size_1(); $add(); } function lambda$1_0(action_0, entry_1){ var count, elem, i; elem = entry_1.val$backingEntry2.getKey(); count = castTo(entry_1.val$backingEntry2.getValue(), 16).size_1(); for (i = 0; i < count; i++) { action_0.accept(elem); } } function $add(){ throw toJs(new UnsupportedOperationException); } function $entrySet_0(this$static){ var result; result = this$static.entrySet; !result && (this$static.entrySet = result = new AbstractMultiset$EntrySet(this$static)); return result; } function $forEachEntry(this$static, action){ checkNotNull(action); $entrySet_0(this$static).forEach_0(new Multiset$lambda$0$Type); } defineClass(2087, 31, {849:1, 20:1, 31:1, 16:1}); _.forEach_0 = function forEach_2(action){ checkNotNull(action); $entrySet_0(this).forEach_0(new Multiset$lambda$1$Type(action)); } ; _.spliterator_0 = function spliterator_12(){ var entrySpliterator; return entrySpliterator = $entrySet_0(this).spliterator_0() , flatMap(entrySpliterator, new Multisets$lambda$1$Type, 64 | entrySpliterator.characteristics_0() & 1296, this.multimap.totalSize); } ; _.add_2 = function add_6(element){ $add(); return true; } ; _.addAll = function addAll_2(elementsToAdd){ return checkNotNull(this) , checkNotNull(elementsToAdd) , instanceOf(elementsToAdd, 552)?addAllImpl(castTo(elementsToAdd, 849)):!elementsToAdd.isEmpty() && addAll_7(this, elementsToAdd.iterator_0()); } ; _.contains = function contains_6(element){ var values; return values = castTo(safeGet($asMap(this.multimap), element), 16) , (!values?0:values.size_1()) > 0; } ; _.equals_0 = function equals_12(object){ return equalsImpl_2(this, object); } ; _.hashCode_1 = function hashCode_12(){ return hashCode__I__devirtual$($entrySet_0(this)); } ; _.isEmpty = function isEmpty_4(){ return $entrySet_0(this).isEmpty(); } ; _.remove_1 = function remove_17(element){ return $remove_5(this, element, 1) > 0; } ; _.toString_0 = function toString_11(){ return toString_40($entrySet_0(this)); } ; var Lcom_google_common_collect_AbstractMultiset_2_classLit = createForClass('com.google.common.collect', 'AbstractMultiset', 2087); defineClass(2089, 2068, $intern_10); _.clear_0 = function clear_10(){ $clear(this.this$01.multimap); } ; _.contains = function contains_7(o){ var count, entry; if (instanceOf(o, 504)) { entry = castTo(o, 425); if (castTo(entry.val$backingEntry2.getValue(), 16).size_1() <= 0) { return false; } count = $count(this.this$01, entry.val$backingEntry2.getKey()); return count == castTo(entry.val$backingEntry2.getValue(), 16).size_1(); } return false; } ; _.remove_1 = function remove_18(object){ var element, entry, entryCount, multiset; if (instanceOf(object, 504)) { entry = castTo(object, 425); element = entry.val$backingEntry2.getKey(); entryCount = castTo(entry.val$backingEntry2.getValue(), 16).size_1(); if (entryCount != 0) { multiset = this.this$01; return setCountImpl(multiset, element, entryCount); } } return false; } ; var Lcom_google_common_collect_Multisets$EntrySet_2_classLit = createForClass('com.google.common.collect', 'Multisets/EntrySet', 2089); function AbstractMultiset$EntrySet(this$0){ this.this$01 = this$0; } defineClass(1139, 2089, $intern_10, AbstractMultiset$EntrySet); _.iterator_0 = function iterator_6(){ return new Multimaps$Keys$1($entrySet($asMap(this.this$01.multimap)).iterator_0()); } ; _.size_1 = function size_9(){ return $asMap(this.this$01.multimap).size_1(); } ; var Lcom_google_common_collect_AbstractMultiset$EntrySet_2_classLit = createForClass('com.google.common.collect', 'AbstractMultiset/EntrySet', 1139); function AbstractSetMultimap(map_0){ AbstractMapBasedMultimap.call(this, map_0); } defineClass(627, 742, $intern_5); _.createCollection = function createCollection_1(){ return this.createCollection_1(); } ; _.createUnmodifiableEmptyCollection = function createUnmodifiableEmptyCollection_1(){ return this.createUnmodifiableEmptyCollection_0(); } ; _.get_1 = function get_6(key){ return this.get_4(key); } ; _.removeAll = function removeAll_2(key){ return this.removeAll_1(key); } ; _.asMap_0 = function asMap_1(){ var result; return result = this.asMap , !result?(this.asMap = this.createAsMap()):result; } ; _.createUnmodifiableEmptyCollection_0 = function createUnmodifiableEmptyCollection_2(){ return $clinit_Collections() , $clinit_Collections() , EMPTY_SET; } ; _.equals_0 = function equals_13(object){ return equalsImpl_1(this, object); } ; _.get_4 = function get_7(key){ return castTo($get(this, key), 21); } ; _.removeAll_1 = function removeAll_3(key){ return castTo($removeAll(this, key), 21); } ; _.unmodifiableCollectionSubclass = function unmodifiableCollectionSubclass_1(collection){ return $clinit_Collections() , new Collections$UnmodifiableSet(castTo(collection, 21)); } ; _.wrapCollection = function wrapCollection_1(key, collection){ return new AbstractMapBasedMultimap$WrappedSet(this, key, castTo(collection, 21)); } ; var Lcom_google_common_collect_AbstractSetMultimap_2_classLit = createForClass('com.google.common.collect', 'AbstractSetMultimap', 627); function $values_0(this$static){ var result; return result = this$static.values , !result?(this$static.values = new AbstractMultimap$Values(this$static)):result; } defineClass(1723, 627, $intern_5); _.createCollection = function createCollection_2(){ return new TreeSet_0(this.valueComparator); } ; _.createCollection_1 = function createCollection_3(){ return new TreeSet_0(this.valueComparator); } ; _.createUnmodifiableEmptyCollection = function createUnmodifiableEmptyCollection_3(){ return unmodifiableNavigableSet(new TreeSet_0(this.valueComparator)); } ; _.createUnmodifiableEmptyCollection_0 = function createUnmodifiableEmptyCollection_4(){ return unmodifiableNavigableSet(new TreeSet_0(this.valueComparator)); } ; _.get_1 = function get_8(key){ return castTo(castTo($get(this, key), 21), 87); } ; _.get_4 = function get_9(key){ return castTo(castTo($get(this, key), 21), 87); } ; _.removeAll = function removeAll_4(key){ return castTo(castTo($removeAll(this, key), 21), 87); } ; _.removeAll_1 = function removeAll_5(key){ return castTo(castTo($removeAll(this, key), 21), 87); } ; _.unmodifiableCollectionSubclass = function unmodifiableCollectionSubclass_2(collection){ return instanceOf(collection, 277)?unmodifiableNavigableSet(castTo(collection, 277)):($clinit_Collections() , new Collections$UnmodifiableSortedSet(castTo(collection, 87))); } ; _.asMap_0 = function asMap_2(){ var result; return result = this.asMap , !result?(this.asMap = instanceOf(this.map_0, 139)?new AbstractMapBasedMultimap$NavigableAsMap(this, castTo(this.map_0, 139)):instanceOf(this.map_0, 133)?new AbstractMapBasedMultimap$SortedAsMap(this, castTo(this.map_0, 133)):new AbstractMapBasedMultimap$AsMap(this, this.map_0)):result; } ; _.wrapCollection = function wrapCollection_2(key, collection){ return instanceOf(collection, 277)?new AbstractMapBasedMultimap$WrappedNavigableSet(this, key, castTo(collection, 277)):new AbstractMapBasedMultimap$WrappedSortedSet(this, key, castTo(collection, 87)); } ; var Lcom_google_common_collect_AbstractSortedSetMultimap_2_classLit = createForClass('com.google.common.collect', 'AbstractSortedSetMultimap', 1723); function AbstractSortedKeySortedSetMultimap(map_0){ AbstractSetMultimap.call(this, map_0); } defineClass(1724, 1723, $intern_5); _.asMap_0 = function asMap_3(){ var result; return result = this.asMap , castTo(castTo(!result?(this.asMap = instanceOf(this.map_0, 139)?new AbstractMapBasedMultimap$NavigableAsMap(this, castTo(this.map_0, 139)):instanceOf(this.map_0, 133)?new AbstractMapBasedMultimap$SortedAsMap(this, castTo(this.map_0, 133)):new AbstractMapBasedMultimap$AsMap(this, this.map_0)):result, 133), 139); } ; _.keySet_0 = function keySet_8(){ var result; return result = this.keySet , castTo(castTo(!result?(this.keySet = instanceOf(this.map_0, 139)?new AbstractMapBasedMultimap$NavigableKeySet(this, castTo(this.map_0, 139)):instanceOf(this.map_0, 133)?new AbstractMapBasedMultimap$SortedKeySet(this, castTo(this.map_0, 133)):new AbstractMapBasedMultimap$KeySet(this, this.map_0)):result, 87), 277); } ; _.createKeySet = function createKeySet_5(){ return instanceOf(this.map_0, 139)?new AbstractMapBasedMultimap$NavigableKeySet(this, castTo(this.map_0, 139)):instanceOf(this.map_0, 133)?new AbstractMapBasedMultimap$SortedKeySet(this, castTo(this.map_0, 133)):new AbstractMapBasedMultimap$KeySet(this, this.map_0); } ; var Lcom_google_common_collect_AbstractSortedKeySortedSetMultimap_2_classLit = createForClass('com.google.common.collect', 'AbstractSortedKeySortedSetMultimap', 1724); defineClass(2109, 1, {2046:1}); _.equals_0 = function equals_14(obj){ return equalsImpl_4(this, obj); } ; _.hashCode_1 = function hashCode_13(){ var result; return hashCode_48((result = this.cellSet , !result?(this.cellSet = new AbstractTable$CellSet(this)):result)); } ; _.toString_0 = function toString_12(){ var map_0; return $toString_0((map_0 = this.rowMap , !map_0?(this.rowMap = new ArrayTable$RowMap(this)):map_0)); } ; var Lcom_google_common_collect_AbstractTable_2_classLit = createForClass('com.google.common.collect', 'AbstractTable', 2109); function AbstractTable$CellSet(this$0){ this.this$01 = this$0; } defineClass(679, $intern_9, $intern_10, AbstractTable$CellSet); _.clear_0 = function clear_11(){ $clear_1(); } ; _.contains = function contains_8(o){ var cell, row; if (instanceOf(o, 479)) { cell = castTo(o, 697); row = castTo(safeGet($rowMap(this.this$01), $get_2(cell.this$01.rowList, cell.rowIndex)), 85); return !!row && safeContains(row.entrySet_0(), new ImmutableEntry($get_2(cell.this$01.columnList, cell.columnIndex), $at(cell.this$01, cell.rowIndex, cell.columnIndex))); } return false; } ; _.iterator_0 = function iterator_7(){ return $cellIterator(this.this$01); } ; _.remove_1 = function remove_19(o){ var cell, row; if (instanceOf(o, 479)) { cell = castTo(o, 697); row = castTo(safeGet($rowMap(this.this$01), $get_2(cell.this$01.rowList, cell.rowIndex)), 85); return !!row && safeRemove(row.entrySet_0(), new ImmutableEntry($get_2(cell.this$01.columnList, cell.columnIndex), $at(cell.this$01, cell.rowIndex, cell.columnIndex))); } return false; } ; _.size_1 = function size_10(){ return $size_0(this.this$01); } ; _.spliterator_0 = function spliterator_13(){ return $cellSpliterator(this.this$01); } ; var Lcom_google_common_collect_AbstractTable$CellSet_2_classLit = createForClass('com.google.common.collect', 'AbstractTable/CellSet', 679); function AbstractTable$Values(this$0){ this.this$01 = this$0; } defineClass(2025, 31, $intern_8, AbstractTable$Values); _.clear_0 = function clear_12(){ $clear_1(); } ; _.contains = function contains_9(o){ return $containsValue_0(this.this$01, o); } ; _.iterator_0 = function iterator_8(){ return $valuesIterator(this.this$01); } ; _.size_1 = function size_11(){ return $size_0(this.this$01); } ; _.spliterator_0 = function spliterator_14(){ return $valuesSpliterator(this.this$01); } ; var Lcom_google_common_collect_AbstractTable$Values_2_classLit = createForClass('com.google.common.collect', 'AbstractTable/Values', 2025); function ArrayListMultimapGwtSerializationDependencies(map_0){ AbstractMapBasedMultimap.call(this, map_0); } defineClass(1697, 1696, $intern_5); var Lcom_google_common_collect_ArrayListMultimapGwtSerializationDependencies_2_classLit = createForClass('com.google.common.collect', 'ArrayListMultimapGwtSerializationDependencies', 1697); function ArrayListMultimap(){ ArrayListMultimap_0.call(this, 12, 3); } function ArrayListMultimap_0(expectedKeys, expectedValuesPerKey){ ArrayListMultimapGwtSerializationDependencies.call(this, new HashMap_0(capacity_0(expectedKeys))); checkNonnegative(expectedValuesPerKey, 'expectedValuesPerKey'); this.expectedValuesPerKey = expectedValuesPerKey; } defineClass(520, 1697, $intern_5, ArrayListMultimap, ArrayListMultimap_0); _.createCollection = function createCollection_4(){ return new ArrayList_0(this.expectedValuesPerKey); } ; _.expectedValuesPerKey = 0; var Lcom_google_common_collect_ArrayListMultimap_2_classLit = createForClass('com.google.common.collect', 'ArrayListMultimap', 520); function $at(this$static, rowIndex, columnIndex){ checkElementIndex(rowIndex, this$static.rowList.delegateList_0().size_1()); checkElementIndex(columnIndex, this$static.columnList.delegateList_0().size_1()); return this$static.array[rowIndex][columnIndex]; } function $cellIterator(this$static){ return new ArrayTable$1(this$static, this$static.rowList.delegateList_0().size_1() * this$static.columnList.delegateList_0().size_1()); } function $cellSpliterator(this$static){ return indexed(this$static.rowList.delegateList_0().size_1() * this$static.columnList.delegateList_0().size_1(), 273, new ArrayTable$1methodref$getCell$Type(this$static)); } function $clear_1(){ throw toJs(new UnsupportedOperationException); } function $containsValue_0(this$static, value_0){ var element, element$array, element$index, element$max, row, row$array, row$index, row$max; for (row$array = this$static.array , row$index = 0 , row$max = row$array.length; row$index < row$max; ++row$index) { row = row$array[row$index]; for (element$array = row , element$index = 0 , element$max = element$array.length; element$index < element$max; ++element$index) { element = element$array[element$index]; if (maskUndefined(value_0) === maskUndefined(element) || value_0 != null && equals_Ljava_lang_Object__Z__devirtual$(value_0, element)) { return true; } } } return false; } function $eraseAll(this$static){ var row, row$array, row$index, row$max; for (row$array = this$static.array , row$index = 0 , row$max = row$array.length; row$index < row$max; ++row$index) { row = row$array[row$index]; fill0_2(row, row.length, null); } } function $get_1(this$static, rowKey, columnKey){ var columnIndex, rowIndex; rowIndex = castTo($get_3(this$static.rowKeyToIndex, rowKey), 17); columnIndex = castTo($get_3(this$static.columnKeyToIndex, columnKey), 17); return !rowIndex || !columnIndex?null:$at(this$static, rowIndex.value_0, columnIndex.value_0); } function $getValue(this$static, index_0){ var columnIndex, rowIndex; rowIndex = index_0 / this$static.columnList.delegateList_0().size_1() | 0; columnIndex = index_0 % this$static.columnList.delegateList_0().size_1(); return $at(this$static, rowIndex, columnIndex); } function $put_0(this$static, rowKey, columnKey, value_0){ var columnIndex, rowIndex; checkNotNull(rowKey); checkNotNull(columnKey); rowIndex = castTo($get_3(this$static.rowKeyToIndex, rowKey), 17); checkArgument_2(!!rowIndex, 'Row %s not in %s', rowKey, this$static.rowList); columnIndex = castTo($get_3(this$static.columnKeyToIndex, columnKey), 17); checkArgument_2(!!columnIndex, 'Column %s not in %s', columnKey, this$static.columnList); return $set(this$static, rowIndex.value_0, columnIndex.value_0, value_0); } function $rowMap(this$static){ var map_0; map_0 = this$static.rowMap; return !map_0?(this$static.rowMap = new ArrayTable$RowMap(this$static)):map_0; } function $set(this$static, rowIndex, columnIndex, value_0){ var oldValue; checkElementIndex(rowIndex, this$static.rowList.delegateList_0().size_1()); checkElementIndex(columnIndex, this$static.columnList.delegateList_0().size_1()); oldValue = this$static.array[rowIndex][columnIndex]; setCheck(this$static.array[rowIndex], columnIndex, value_0); return oldValue; } function $size_0(this$static){ return this$static.rowList.delegateList_0().size_1() * this$static.columnList.delegateList_0().size_1(); } function $values_1(this$static){ var result; return result = this$static.values , !result?(this$static.values = new AbstractTable$Values(this$static)):result; } function $valuesIterator(this$static){ return new ArrayTable$3(this$static, this$static.rowList.delegateList_0().size_1() * this$static.columnList.delegateList_0().size_1()); } function $valuesSpliterator(this$static){ return indexed(this$static.rowList.delegateList_0().size_1() * this$static.columnList.delegateList_0().size_1(), 16, new ArrayTable$2methodref$getValue$Type(this$static)); } function ArrayTable(rowKeys, columnKeys){ var tmpArray; this.rowList = ($clinit_ImmutableList() , checkNotNull(rowKeys) , $clinit_ImmutableList() , copyFromCollection(rowKeys)); this.columnList = (checkNotNull(columnKeys) , copyFromCollection(columnKeys)); checkArgument(this.rowList.delegateList_0().isEmpty() == this.columnList.delegateList_0().isEmpty()); this.rowKeyToIndex = indexMap(this.rowList); this.columnKeyToIndex = indexMap(this.columnList); tmpArray = initMultidimensionalArray(Ljava_lang_Object_2_classLit, [$intern_16, $intern_2], [5, 1], 5, [this.rowList.delegateList_0().size_1(), this.columnList.delegateList_0().size_1()], 2); this.array = tmpArray; $eraseAll(this); } defineClass(678, 2109, {678:1, 2046:1, 3:1}, ArrayTable); var Lcom_google_common_collect_ArrayTable_2_classLit = createForClass('com.google.common.collect', 'ArrayTable', 678); function ArrayTable$1(this$0, $anonymous0){ this.this$01 = this$0; AbstractIndexedListIterator.call(this, $anonymous0); } defineClass(2021, 399, $intern_4, ArrayTable$1); _.get_0 = function get_10(index_0){ return new ArrayTable$2(this.this$01, index_0); } ; var Lcom_google_common_collect_ArrayTable$1_2_classLit = createForClass('com.google.common.collect', 'ArrayTable/1', 2021); function ArrayTable$1methodref$getCell$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(2022, 1, {}, ArrayTable$1methodref$getCell$Type); _.apply_2 = function apply_6(arg0){ return new ArrayTable$2(this.$$outer_0, arg0); } ; var Lcom_google_common_collect_ArrayTable$1methodref$getCell$Type_2_classLit = createForClass('com.google.common.collect', 'ArrayTable/1methodref$getCell$Type', 2022); defineClass(2110, 1, {697:1}); _.equals_0 = function equals_15(obj){ var other; if (obj === this) { return true; } if (instanceOf(obj, 479)) { other = castTo(obj, 697); return equal($get_2(this.this$01.rowList, this.rowIndex), $get_2(other.this$01.rowList, other.rowIndex)) && equal($get_2(this.this$01.columnList, this.columnIndex), $get_2(other.this$01.columnList, other.columnIndex)) && equal($at(this.this$01, this.rowIndex, this.columnIndex), $at(other.this$01, other.rowIndex, other.columnIndex)); } return false; } ; _.hashCode_1 = function hashCode_14(){ return hashCode_47(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, [$get_2(this.this$01.rowList, this.rowIndex), $get_2(this.this$01.columnList, this.columnIndex), $at(this.this$01, this.rowIndex, this.columnIndex)])); } ; _.toString_0 = function toString_13(){ return '(' + $get_2(this.this$01.rowList, this.rowIndex) + ',' + $get_2(this.this$01.columnList, this.columnIndex) + ')=' + $at(this.this$01, this.rowIndex, this.columnIndex); } ; var Lcom_google_common_collect_Tables$AbstractCell_2_classLit = createForClass('com.google.common.collect', 'Tables/AbstractCell', 2110); function ArrayTable$2(this$0, val$index){ this.this$01 = this$0; this.val$index2 = val$index; this.rowIndex = this.val$index2 / this.this$01.columnList.delegateList_0().size_1() | 0; this.columnIndex = this.val$index2 % this.this$01.columnList.delegateList_0().size_1(); } defineClass(479, 2110, {479:1, 697:1}, ArrayTable$2); _.columnIndex = 0; _.rowIndex = 0; _.val$index2 = 0; var Lcom_google_common_collect_ArrayTable$2_2_classLit = createForClass('com.google.common.collect', 'ArrayTable/2', 479); function ArrayTable$2methodref$getValue$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(2024, 1, {}, ArrayTable$2methodref$getValue$Type); _.apply_2 = function apply_7(arg0){ return $getValue(this.$$outer_0, arg0); } ; var Lcom_google_common_collect_ArrayTable$2methodref$getValue$Type_2_classLit = createForClass('com.google.common.collect', 'ArrayTable/2methodref$getValue$Type', 2024); function ArrayTable$3(this$0, $anonymous0){ this.this$01 = this$0; AbstractIndexedListIterator.call(this, $anonymous0); } defineClass(2023, 399, $intern_4, ArrayTable$3); _.get_0 = function get_11(index_0){ return $getValue(this.this$01, index_0); } ; var Lcom_google_common_collect_ArrayTable$3_2_classLit = createForClass('com.google.common.collect', 'ArrayTable/3', 2023); function $forEachEntry_0(this$static, action){ this$static.entryIterator().forEachRemaining(action); } defineClass(2077, 2065, $intern_7); _.clear_0 = function clear_13(){ clear_20(this.entryIterator()); } ; _.entrySet_0 = function entrySet_0(){ return new Maps$IteratorBasedAbstractMap$1(this); } ; _.entrySpliterator = function entrySpliterator_1(){ return new Spliterators$IteratorSpliterator_1(this.entryIterator(), this.size_1()); } ; var Lcom_google_common_collect_Maps$IteratorBasedAbstractMap_2_classLit = createForClass('com.google.common.collect', 'Maps/IteratorBasedAbstractMap', 2077); function $getEntry(this$static, index_0){ checkElementIndex(index_0, this$static.keyIndex.delegate.map_0.size_1()); return new ArrayTable$ArrayMap$1(this$static, index_0); } function $getKey(this$static, index_0){ return $keySet_0(this$static.keyIndex).asList_1().get_0(index_0); } function ArrayTable$ArrayMap(keyIndex){ this.keyIndex = keyIndex; } defineClass(842, 2077, $intern_7); _.clear_0 = function clear_14(){ throw toJs(new UnsupportedOperationException); } ; _.containsKey = function containsKey_2(key){ return $containsKey_0(this.keyIndex, key); } ; _.entryIterator = function entryIterator_1(){ return new ArrayTable$ArrayMap$2(this, this.keyIndex.delegate.map_0.size_1()); } ; _.entrySpliterator = function entrySpliterator_2(){ return indexed(this.keyIndex.delegate.map_0.size_1(), 16, new ArrayTable$ArrayMap$0methodref$getEntry$Type(this)); } ; _.get_3 = function get_12(key){ var index_0; index_0 = castTo($get_3(this.keyIndex, key), 17); return !index_0?null:this.getValue_0(index_0.value_0); } ; _.isEmpty = function isEmpty_5(){ return this.keyIndex.delegate.map_0.isEmpty(); } ; _.keySet_0 = function keySet_9(){ return $keySet_0(this.keyIndex); } ; _.put = function put_0(key, value_0){ var index_0; index_0 = castTo($get_3(this.keyIndex, key), 17); if (!index_0) { throw toJs(new IllegalArgumentException_0(this.getKeyRole() + ' ' + key + ' not in ' + $keySet_0(this.keyIndex))); } return this.setValue_0(index_0.value_0, value_0); } ; _.remove_0 = function remove_20(key){ throw toJs(new UnsupportedOperationException); } ; _.size_1 = function size_12(){ return this.keyIndex.delegate.map_0.size_1(); } ; var Lcom_google_common_collect_ArrayTable$ArrayMap_2_classLit = createForClass('com.google.common.collect', 'ArrayTable/ArrayMap', 842); function ArrayTable$ArrayMap$0methodref$getEntry$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(2020, 1, {}, ArrayTable$ArrayMap$0methodref$getEntry$Type); _.apply_2 = function apply_8(arg0){ return $getEntry(this.$$outer_0, arg0); } ; var Lcom_google_common_collect_ArrayTable$ArrayMap$0methodref$getEntry$Type_2_classLit = createForClass('com.google.common.collect', 'ArrayTable/ArrayMap/0methodref$getEntry$Type', 2020); function ArrayTable$ArrayMap$1(this$1, val$index){ this.this$11 = this$1; this.val$index2 = val$index; } defineClass(2018, 358, $intern_15, ArrayTable$ArrayMap$1); _.getKey = function getKey(){ return $getKey(this.this$11, this.val$index2); } ; _.getValue = function getValue(){ return this.this$11.getValue_0(this.val$index2); } ; _.setValue = function setValue_0(value_0){ return this.this$11.setValue_0(this.val$index2, value_0); } ; _.val$index2 = 0; var Lcom_google_common_collect_ArrayTable$ArrayMap$1_2_classLit = createForClass('com.google.common.collect', 'ArrayTable/ArrayMap/1', 2018); function ArrayTable$ArrayMap$2(this$1, $anonymous0){ this.this$11 = this$1; AbstractIndexedListIterator.call(this, $anonymous0); } defineClass(2019, 399, $intern_4, ArrayTable$ArrayMap$2); _.get_0 = function get_13(index_0){ return $getEntry(this.this$11, index_0); } ; var Lcom_google_common_collect_ArrayTable$ArrayMap$2_2_classLit = createForClass('com.google.common.collect', 'ArrayTable/ArrayMap/2', 2019); function ArrayTable$Row(this$0, rowIndex){ this.this$01 = this$0; ArrayTable$ArrayMap.call(this, this$0.columnKeyToIndex); this.rowIndex = rowIndex; } defineClass(2017, 842, $intern_7, ArrayTable$Row); _.getKeyRole = function getKeyRole(){ return 'Column'; } ; _.getValue_0 = function getValue_0(index_0){ return $at(this.this$01, this.rowIndex, index_0); } ; _.setValue_0 = function setValue_1(index_0, newValue){ return $set(this.this$01, this.rowIndex, index_0, newValue); } ; _.rowIndex = 0; var Lcom_google_common_collect_ArrayTable$Row_2_classLit = createForClass('com.google.common.collect', 'ArrayTable/Row', 2017); function $put_1(){ throw toJs(new UnsupportedOperationException); } function $setValue(){ throw toJs(new UnsupportedOperationException); } function ArrayTable$RowMap(this$0){ this.this$01 = this$0; ArrayTable$ArrayMap.call(this, this$0.rowKeyToIndex); } defineClass(843, 842, $intern_7, ArrayTable$RowMap); _.getValue_0 = function getValue_1(index_0){ return new ArrayTable$Row(this.this$01, index_0); } ; _.put = function put_1(key, value_0){ return castTo(value_0, 85) , $put_1(); } ; _.setValue_0 = function setValue_2(index_0, newValue){ return castTo(newValue, 85) , $setValue(); } ; _.getKeyRole = function getKeyRole_0(){ return 'Row'; } ; var Lcom_google_common_collect_ArrayTable$RowMap_2_classLit = createForClass('com.google.common.collect', 'ArrayTable/RowMap', 843); function checkEntryNotNull(key, value_0){ if (key == null) { throw toJs(new NullPointerException_0('null key in entry: null=' + value_0)); } else if (value_0 == null) { throw toJs(new NullPointerException_0('null value in entry: ' + key + '=null')); } } function checkNonnegative(value_0, name_0){ if (value_0 < 0) { throw toJs(new IllegalArgumentException_0(name_0 + ' cannot be negative but was: ' + value_0)); } return value_0; } function flatMap(fromSpliterator, function_0, topCharacteristics, topSize){ checkArgument_0((topCharacteristics & $intern_17) == 0, 'flatMap does not support SUBSIZED characteristic'); checkArgument_0((topCharacteristics & 4) == 0, 'flatMap does not support SORTED characteristic'); checkNotNull(fromSpliterator); checkNotNull(function_0); return new CollectSpliterators$FlatMapSpliteratorOfObject(fromSpliterator, function_0, topCharacteristics, topSize); } function indexed(size_0, extraCharacteristics, function_0){ return new CollectSpliterators$1WithCharacteristics(range_0(size_0).spliterator_1(), function_0, extraCharacteristics); } function map_2(fromSpliterator, function_0){ checkNotNull(fromSpliterator); checkNotNull(function_0); return new CollectSpliterators$1(fromSpliterator, function_0); } function $forEachRemaining_0(this$static, consumer){ while (this$static.tryAdvance(consumer)) ; } function CollectSpliterators$1(val$fromSpliterator, val$function){ this.val$fromSpliterator1 = val$fromSpliterator; this.val$function2 = val$function; } defineClass(1157, 1, $intern_18, CollectSpliterators$1); _.hasCharacteristics = function hasCharacteristics(characteristics){ return (this.val$fromSpliterator1.characteristics_0() & -262 & characteristics) != 0; } ; _.characteristics_0 = function characteristics_0(){ return this.val$fromSpliterator1.characteristics_0() & -262; } ; _.estimateSize_0 = function estimateSize(){ return this.val$fromSpliterator1.estimateSize_0(); } ; _.forEachRemaining = function forEachRemaining_4(action){ this.val$fromSpliterator1.forEachRemaining(new CollectSpliterators$1$lambda$1$Type(action, this.val$function2)); } ; _.tryAdvance = function tryAdvance(action){ return this.val$fromSpliterator1.tryAdvance(new CollectSpliterators$1$lambda$0$Type(action, this.val$function2)); } ; var Lcom_google_common_collect_CollectSpliterators$1_2_classLit = createForClass('com.google.common.collect', 'CollectSpliterators/1', 1157); function CollectSpliterators$1$lambda$0$Type(action_0, function_1){ this.action_0 = action_0; this.function_1 = function_1; } defineClass(1158, 1, $intern_19, CollectSpliterators$1$lambda$0$Type); _.accept = function accept_0(arg0){ this.action_0.accept(this.function_1.apply_0(arg0)); } ; var Lcom_google_common_collect_CollectSpliterators$1$lambda$0$Type_2_classLit = createForClass('com.google.common.collect', 'CollectSpliterators/1/lambda$0$Type', 1158); function CollectSpliterators$1$lambda$1$Type(action_0, function_1){ this.action_0 = action_0; this.function_1 = function_1; } defineClass(1159, 1, $intern_19, CollectSpliterators$1$lambda$1$Type); _.accept = function accept_1(arg0){ this.action_0.accept(this.function_1.apply_0(arg0)); } ; var Lcom_google_common_collect_CollectSpliterators$1$lambda$1$Type_2_classLit = createForClass('com.google.common.collect', 'CollectSpliterators/1/lambda$1$Type', 1159); function CollectSpliterators$1WithCharacteristics(delegate, val$function, val$extraCharacteristics){ this.val$function2 = val$function; this.val$extraCharacteristics3 = val$extraCharacteristics; this.delegate = delegate; } defineClass(1154, 1, $intern_18, CollectSpliterators$1WithCharacteristics); _.hasCharacteristics = function hasCharacteristics_0(characteristics){ return ((16464 | this.val$extraCharacteristics3) & characteristics) != 0; } ; _.characteristics_0 = function characteristics_1(){ return 16464 | this.val$extraCharacteristics3; } ; _.estimateSize_0 = function estimateSize_0(){ return this.delegate.estimateSize_0(); } ; _.forEachRemaining = function forEachRemaining_5(action){ this.delegate.forEachRemaining_0(new CollectSpliterators$1WithCharacteristics$lambda$1$Type(action, this.val$function2)); } ; _.tryAdvance = function tryAdvance_0(action){ return this.delegate.tryAdvance_0(new CollectSpliterators$1WithCharacteristics$lambda$0$Type(action, this.val$function2)); } ; _.val$extraCharacteristics3 = 0; var Lcom_google_common_collect_CollectSpliterators$1WithCharacteristics_2_classLit = createForClass('com.google.common.collect', 'CollectSpliterators/1WithCharacteristics', 1154); function CollectSpliterators$1WithCharacteristics$lambda$0$Type(action_0, function_1){ this.action_0 = action_0; this.function_1 = function_1; } defineClass(1155, 1, $intern_20, CollectSpliterators$1WithCharacteristics$lambda$0$Type); _.accept_0 = function accept_2(arg0){ this.action_0.accept(this.function_1.apply_2(arg0)); } ; var Lcom_google_common_collect_CollectSpliterators$1WithCharacteristics$lambda$0$Type_2_classLit = createForClass('com.google.common.collect', 'CollectSpliterators/1WithCharacteristics/lambda$0$Type', 1155); function CollectSpliterators$1WithCharacteristics$lambda$1$Type(action_0, function_1){ this.action_0 = action_0; this.function_1 = function_1; } defineClass(1156, 1, $intern_20, CollectSpliterators$1WithCharacteristics$lambda$1$Type); _.accept_0 = function accept_3(arg0){ this.action_0.accept(this.function_1.apply_2(arg0)); } ; var Lcom_google_common_collect_CollectSpliterators$1WithCharacteristics$lambda$1$Type_2_classLit = createForClass('com.google.common.collect', 'CollectSpliterators/1WithCharacteristics/lambda$1$Type', 1156); function $lambda$0(this$static, fromElement_0){ return this$static.prefix = castTo(this$static.function_0.apply_0(fromElement_0), 159); } function $lambda$1(this$static, action_1, fromElement_1){ var elements; elements = castTo(this$static.function_0.apply_0(fromElement_1), 159); !!elements && elements.forEachRemaining(action_1); } defineClass(1150, 1, $intern_18); _.hasCharacteristics = function hasCharacteristics_1(characteristics){ return (this.characteristics & characteristics) != 0; } ; _.characteristics_0 = function characteristics_2(){ return this.characteristics; } ; _.estimateSize_0 = function estimateSize_1(){ !!this.prefix && (this.estimatedSize = max_1(this.estimatedSize, this.prefix.estimateSize_0())); return max_1(this.estimatedSize, 0); } ; _.forEachRemaining = function forEachRemaining_6(action){ if (this.prefix) { this.prefix.forEachRemaining(action); this.prefix = null; } this.from.forEachRemaining(new CollectSpliterators$FlatMapSpliterator$lambda$1$Type(this, action)); this.estimatedSize = 0; } ; _.tryAdvance = function tryAdvance_1(action){ while (true) { if (!!this.prefix && this.prefix.tryAdvance(action)) { neq(this.estimatedSize, $intern_21) && (this.estimatedSize = sub_2(this.estimatedSize, 1)); return true; } else { this.prefix = null; } if (!this.from.tryAdvance(new CollectSpliterators$FlatMapSpliterator$lambda$0$Type(this))) { return false; } } } ; _.characteristics = 0; _.estimatedSize = 0; var Lcom_google_common_collect_CollectSpliterators$FlatMapSpliterator_2_classLit = createForClass('com.google.common.collect', 'CollectSpliterators/FlatMapSpliterator', 1150); function CollectSpliterators$FlatMapSpliterator$lambda$0$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1152, 1, $intern_19, CollectSpliterators$FlatMapSpliterator$lambda$0$Type); _.accept = function accept_4(arg0){ $lambda$0(this.$$outer_0, arg0); } ; var Lcom_google_common_collect_CollectSpliterators$FlatMapSpliterator$lambda$0$Type_2_classLit = createForClass('com.google.common.collect', 'CollectSpliterators/FlatMapSpliterator/lambda$0$Type', 1152); function CollectSpliterators$FlatMapSpliterator$lambda$1$Type($$outer_0, action_1){ this.$$outer_0 = $$outer_0; this.action_1 = action_1; } defineClass(1153, 1, $intern_19, CollectSpliterators$FlatMapSpliterator$lambda$1$Type); _.accept = function accept_5(arg0){ $lambda$1(this.$$outer_0, this.action_1, arg0); } ; var Lcom_google_common_collect_CollectSpliterators$FlatMapSpliterator$lambda$1$Type_2_classLit = createForClass('com.google.common.collect', 'CollectSpliterators/FlatMapSpliterator/lambda$1$Type', 1153); function CollectSpliterators$FlatMapSpliteratorOfObject(from, function_0, characteristics, estimatedSize){ this.prefix = null; this.from = from; this.function_0 = function_0; this.characteristics = characteristics; this.estimatedSize = estimatedSize; } defineClass(1151, 1150, $intern_18, CollectSpliterators$FlatMapSpliteratorOfObject); var Lcom_google_common_collect_CollectSpliterators$FlatMapSpliteratorOfObject_2_classLit = createForClass('com.google.common.collect', 'CollectSpliterators/FlatMapSpliteratorOfObject', 1151); function safeContains(collection, object){ checkNotNull(collection); try { return collection.contains(object); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 212) || instanceOf($e0, 169)) { return false; } else throw toJs($e0); } } function safeRemove(collection, object){ checkNotNull(collection); try { return collection.remove_1(object); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 212) || instanceOf($e0, 169)) { return false; } else throw toJs($e0); } } function $equals_1(this$static, obj){ var compareResult, that; if (instanceOf(obj, 253)) { that = castTo(obj, 253); try { compareResult = this$static.compareTo(that); return compareResult == 0; } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 212)) { return false; } else throw toJs($e0); } } return false; } function Cut(endpoint){ this.endpoint = endpoint; } defineClass(253, 1, $intern_22); _.compareTo_0 = function compareTo_0(that){ return this.compareTo(castTo(that, 253)); } ; _.compareTo = function compareTo(that){ var result; if (that == ($clinit_Cut$BelowAll() , INSTANCE_1)) { return 1; } if (that == ($clinit_Cut$AboveAll() , INSTANCE_0)) { return -1; } result = ($clinit_Range() , compareTo_Ljava_lang_Object__I__devirtual$(this.endpoint, that.endpoint)); if (result != 0) { return result; } return instanceOf(this, 526) == instanceOf(that, 526)?0:instanceOf(this, 526)?1:-1; } ; _.endpoint_0 = function endpoint_0(){ return this.endpoint; } ; _.equals_0 = function equals_16(obj){ return $equals_1(this, obj); } ; var Lcom_google_common_collect_Cut_2_classLit = createForClass('com.google.common.collect', 'Cut', 253); function $clinit_Cut$AboveAll(){ $clinit_Cut$AboveAll = emptyMethod; INSTANCE_0 = new Cut$AboveAll; } function Cut$AboveAll(){ Cut.call(this, ''); } defineClass(1823, 253, $intern_22, Cut$AboveAll); _.compareTo = function compareTo_1(o){ return o == this?0:1; } ; _.describeAsLowerBound = function describeAsLowerBound(sb){ throw toJs(new AssertionError); } ; _.describeAsUpperBound = function describeAsUpperBound(sb){ sb.string += '+\u221E)'; } ; _.endpoint_0 = function endpoint_1(){ throw toJs(new IllegalStateException_0('range unbounded on this side')); } ; _.hashCode_1 = function hashCode_15(){ return $clinit_System() , getIdentityHashCode(this); } ; _.isLessThan = function isLessThan(value_0){ return false; } ; _.toString_0 = function toString_14(){ return '+\u221E'; } ; var INSTANCE_0; var Lcom_google_common_collect_Cut$AboveAll_2_classLit = createForClass('com.google.common.collect', 'Cut/AboveAll', 1823); function Cut$AboveValue(endpoint){ Cut.call(this, castTo(checkNotNull(endpoint), 34)); } defineClass(526, 253, {253:1, 526:1, 3:1, 34:1}, Cut$AboveValue); _.describeAsLowerBound = function describeAsLowerBound_0(sb){ $append_10((sb.string += '(' , sb), this.endpoint); } ; _.describeAsUpperBound = function describeAsUpperBound_0(sb){ $append_5($append_10(sb, this.endpoint), 93); } ; _.hashCode_1 = function hashCode_16(){ return ~hashCode__I__devirtual$(this.endpoint); } ; _.isLessThan = function isLessThan_0(value_0){ return $clinit_Range() , compareTo_Ljava_lang_Object__I__devirtual$(this.endpoint, value_0) < 0; } ; _.toString_0 = function toString_15(){ return '/' + this.endpoint + '\\'; } ; var Lcom_google_common_collect_Cut$AboveValue_2_classLit = createForClass('com.google.common.collect', 'Cut/AboveValue', 526); function $clinit_Cut$BelowAll(){ $clinit_Cut$BelowAll = emptyMethod; INSTANCE_1 = new Cut$BelowAll; } function Cut$BelowAll(){ Cut.call(this, ''); } defineClass(1822, 253, $intern_22, Cut$BelowAll); _.compareTo = function compareTo_2(o){ return o == this?0:-1; } ; _.describeAsLowerBound = function describeAsLowerBound_1(sb){ sb.string += '(-\u221E'; } ; _.describeAsUpperBound = function describeAsUpperBound_1(sb){ throw toJs(new AssertionError); } ; _.endpoint_0 = function endpoint_2(){ throw toJs(new IllegalStateException_0('range unbounded on this side')); } ; _.hashCode_1 = function hashCode_17(){ return $clinit_System() , getIdentityHashCode(this); } ; _.isLessThan = function isLessThan_1(value_0){ return true; } ; _.toString_0 = function toString_16(){ return '-\u221E'; } ; var INSTANCE_1; var Lcom_google_common_collect_Cut$BelowAll_2_classLit = createForClass('com.google.common.collect', 'Cut/BelowAll', 1822); function Cut$BelowValue(endpoint){ Cut.call(this, castTo(checkNotNull(endpoint), 34)); } defineClass(1824, 253, $intern_22, Cut$BelowValue); _.describeAsLowerBound = function describeAsLowerBound_2(sb){ $append_10((sb.string += '[' , sb), this.endpoint); } ; _.describeAsUpperBound = function describeAsUpperBound_2(sb){ $append_5($append_10(sb, this.endpoint), 41); } ; _.hashCode_1 = function hashCode_18(){ return hashCode__I__devirtual$(this.endpoint); } ; _.isLessThan = function isLessThan_2(value_0){ return $clinit_Range() , compareTo_Ljava_lang_Object__I__devirtual$(this.endpoint, value_0) <= 0; } ; _.toString_0 = function toString_17(){ return '\\' + this.endpoint + '/'; } ; var Lcom_google_common_collect_Cut$BelowValue_2_classLit = createForClass('com.google.common.collect', 'Cut/BelowValue', 1824); function FluentIterable(){ $clinit_Absent(); } function concatNoDefensiveCopy(inputs){ var input_0, input$array, input$index, input$max; for (input$array = inputs , input$index = 0 , input$max = input$array.length; input$index < input$max; ++input$index) { input_0 = input$array[input$index]; checkNotNull(input_0); } return new FluentIterable$3(inputs); } defineClass(547, 1, $intern_23); _.forEach_0 = function forEach_3(action){ $forEach_0(this, action); } ; _.toString_0 = function toString_18(){ return toString_25(castTo(checkNotNull_0(this, 'use Optional.orNull() instead of Optional.or(null)'), 20).iterator_0()); } ; var Lcom_google_common_collect_FluentIterable_2_classLit = createForClass('com.google.common.collect', 'FluentIterable', 547); function FluentIterable$2(val$inputs){ this.val$inputs1 = val$inputs; FluentIterable.call(this); } defineClass(442, 547, $intern_23, FluentIterable$2); _.iterator_0 = function iterator_9(){ return new Iterators$ConcatenatedIterator(transform_2(this.val$inputs1.iterator_0(), new Iterables$10)); } ; var Lcom_google_common_collect_FluentIterable$2_2_classLit = createForClass('com.google.common.collect', 'FluentIterable/2', 442); function $iterator(this$static){ return new Iterators$ConcatenatedIterator(new FluentIterable$3$1(this$static.val$inputs1.length, this$static.val$inputs1)); } function FluentIterable$3(val$inputs){ this.val$inputs1 = val$inputs; FluentIterable.call(this); } defineClass(1059, 547, $intern_23, FluentIterable$3); _.iterator_0 = function iterator_10(){ return $iterator(this); } ; var Lcom_google_common_collect_FluentIterable$3_2_classLit = createForClass('com.google.common.collect', 'FluentIterable/3', 1059); function FluentIterable$3$1($anonymous0, val$inputs){ this.val$inputs3 = val$inputs; AbstractIndexedListIterator.call(this, $anonymous0); } defineClass(724, 399, $intern_4, FluentIterable$3$1); _.get_0 = function get_14(i){ return this.val$inputs3[i].iterator_0(); } ; var Lcom_google_common_collect_FluentIterable$3$1_2_classLit = createForClass('com.google.common.collect', 'FluentIterable/3/1', 724); defineClass(2070, 1, {}); _.toString_0 = function toString_19(){ return toString_40(this.delegate_0().coll); } ; var Lcom_google_common_collect_ForwardingObject_2_classLit = createForClass('com.google.common.collect', 'ForwardingObject', 2070); defineClass(2071, 2070, $intern_24); _.delegate_0 = function delegate_0(){ return this.delegate_1(); } ; _.forEach_0 = function forEach_4(action){ $forEach_0(this, action); } ; _.parallelStream = function parallelStream_0(){ return this.stream(); } ; _.spliterator_0 = function spliterator_15(){ return new Spliterators$IteratorSpliterator(this, 0); } ; _.stream = function stream_1(){ return new StreamImpl(null, this.spliterator_0()); } ; _.add_2 = function add_7(element){ return this.delegate_1() , $add_4(); } ; _.addAll = function addAll_3(collection){ return this.delegate_1() , $addAll_3(); } ; _.clear_0 = function clear_15(){ this.delegate_1() , $clear_5(); } ; _.contains = function contains_10(object){ return this.delegate_1().contains(object); } ; _.containsAll = function containsAll_2(collection){ return this.delegate_1().containsAll(collection); } ; _.isEmpty = function isEmpty_6(){ return this.delegate_1().coll.isEmpty(); } ; _.iterator_0 = function iterator_11(){ return this.delegate_1().iterator_0(); } ; _.remove_1 = function remove_21(object){ return this.delegate_1() , $remove_14(); } ; _.size_1 = function size_13(){ return this.delegate_1().coll.size_1(); } ; _.toArray = function toArray_1(){ return this.delegate_1().toArray(); } ; _.toArray_0 = function toArray_2(array){ return this.delegate_1().toArray_0(array); } ; var Lcom_google_common_collect_ForwardingCollection_2_classLit = createForClass('com.google.common.collect', 'ForwardingCollection', 2071); function $clinit_ImmutableCollection(){ $clinit_ImmutableCollection = emptyMethod; new ForwardingImmutableCollection(($clinit_Collections() , $clinit_Collections() , EMPTY_LIST)); } defineClass(2078, 31, $intern_25); _.iterator_0 = function iterator_12(){ return this.iterator_1(); } ; _.add_2 = function add_8(e){ throw toJs(new UnsupportedOperationException); } ; _.addAll = function addAll_4(newElements){ throw toJs(new UnsupportedOperationException); } ; _.asList_1 = function asList(){ var list; list = this.asList_0; return !list?(this.asList_0 = this.createAsList()):list; } ; _.clear_0 = function clear_16(){ throw toJs(new UnsupportedOperationException); } ; _.contains = function contains_11(object){ return object != null && $advanceToFind(this, object, false); } ; _.createAsList = function createAsList(){ switch (this.size_1()) { case 0: return $clinit_ImmutableList() , $clinit_ImmutableList() , EMPTY; case 1: return $clinit_ImmutableList() , new SingletonImmutableList(checkNotNull(this.iterator_1().next_1())); default:return new RegularImmutableAsList_0(this, this.toArray()); } } ; _.remove_1 = function remove_22(object){ throw toJs(new UnsupportedOperationException); } ; var Lcom_google_common_collect_ImmutableCollection_2_classLit = createForClass('com.google.common.collect', 'ImmutableCollection', 2078); function ForwardingImmutableCollection(delegate){ $clinit_ImmutableCollection(); this.delegate = delegate; } defineClass(727, 2078, $intern_25, ForwardingImmutableCollection); _.iterator_0 = function iterator_14(){ return unmodifiableIterator(this.delegate.iterator_0()); } ; _.contains = function contains_12(object){ return object != null && this.delegate.contains(object); } ; _.containsAll = function containsAll_3(targets){ return this.delegate.containsAll(targets); } ; _.isEmpty = function isEmpty_7(){ return this.delegate.isEmpty(); } ; _.iterator_1 = function iterator_13(){ return unmodifiableIterator(this.delegate.iterator_0()); } ; _.size_1 = function size_14(){ return this.delegate.size_1(); } ; _.toArray = function toArray_3(){ return this.delegate.toArray(); } ; _.toArray_0 = function toArray_4(other){ return this.delegate.toArray_0(other); } ; _.toString_0 = function toString_20(){ return toString_40(this.delegate); } ; var Lcom_google_common_collect_ForwardingImmutableCollection_2_classLit = createForClass('com.google.common.collect', 'ForwardingImmutableCollection', 727); function $clinit_ImmutableList(){ $clinit_ImmutableList = emptyMethod; $clinit_ImmutableCollection(); EMPTY = new RegularImmutableList(($clinit_Collections() , $clinit_Collections() , EMPTY_LIST)); } function $listIterator(this$static, index_0){ return new ImmutableList$1(this$static, this$static.size_1(), index_0); } function $reverse(this$static){ var list; list = (checkNotNull(this$static) , this$static?new ArrayList_1(this$static):newArrayList_0(this$static.iterator_0())); reverse_2(list); return unsafeDelegateList(list); } function copyFromCollection(collection){ $clinit_ImmutableList(); var elements; elements = collection.toArray(); switch (elements.length) { case 0: return EMPTY; case 1: return new SingletonImmutableList(checkNotNull(elements[0])); default:return new RegularImmutableList(nullCheckedList(elements)); } } function nullCheckedList(array){ var castedArray, i, len; for (i = 0 , len = array.length; i < len; i++) { if (array[i] == null) { throw toJs(new NullPointerException_0('at index ' + i)); } } castedArray = array; return new Arrays$ArrayList(castedArray); } function unsafeDelegateList(list){ var castedList; switch (list.size_1()) { case 0: return EMPTY; case 1: return new SingletonImmutableList(checkNotNull(list.get_0(0))); default:castedList = list; return new RegularImmutableList(castedList); } } defineClass(307, 2078, $intern_26); _.iterator_0 = function iterator_16(){ return this.iterator_1(); } ; _.listIterator_0 = function listIterator_1(){ return this.listIterator_2(0); } ; _.listIterator_1 = function listIterator_3(index_0){ return this.listIterator_2(index_0); } ; _.sort_0 = function sort_1(c){ $sort_0(this, c); } ; _.spliterator_0 = function spliterator_16(){ return new Spliterators$IteratorSpliterator(this, 16); } ; _.subList = function subList_2(fromIndex, toIndex){ return this.subList_0(fromIndex, toIndex); } ; _.add_3 = function add_9(index_0, element){ throw toJs(new UnsupportedOperationException); } ; _.addAll_0 = function addAll_5(index_0, newElements){ throw toJs(new UnsupportedOperationException); } ; _.asList_1 = function asList_0(){ return this; } ; _.equals_0 = function equals_17(obj){ return equalsImpl(this, obj); } ; _.hashCode_1 = function hashCode_19(){ return hashCodeImpl(this); } ; _.indexOf_0 = function indexOf_0(object){ return object == null?-1:indexOfRandomAccess(this, object); } ; _.iterator_1 = function iterator_15(){ return this.listIterator_2(0); } ; _.listIterator_2 = function listIterator_2(index_0){ return $listIterator(this, index_0); } ; _.remove_2 = function remove_23(index_0){ throw toJs(new UnsupportedOperationException); } ; _.set_2 = function set_4(index_0, element){ throw toJs(new UnsupportedOperationException); } ; _.subList_0 = function subList_1(fromIndex, toIndex){ var wrapper; return unsafeDelegateList((wrapper = new Lists$1(this) , new AbstractList$SubList(wrapper, fromIndex, toIndex))); } ; var EMPTY; var Lcom_google_common_collect_ImmutableList_2_classLit = createForClass('com.google.common.collect', 'ImmutableList', 307); function $get_2(this$static, index_0){ return this$static.delegateList_0().get_0(index_0); } defineClass(2105, 307, $intern_26); _.iterator_0 = function iterator_18(){ return unmodifiableIterator(this.delegateList_0().iterator_0()); } ; _.subList = function subList_4(fromIndex, toIndex){ return unsafeDelegateList(this.delegateList_0().subList(fromIndex, toIndex)); } ; _.contains = function contains_13(object){ return object != null && this.delegateList_0().contains(object); } ; _.containsAll = function containsAll_4(targets){ return this.delegateList_0().containsAll(targets); } ; _.equals_0 = function equals_18(obj){ return equals_Ljava_lang_Object__Z__devirtual$(this.delegateList_0(), obj); } ; _.get_0 = function get_15(index_0){ return $get_2(this, index_0); } ; _.hashCode_1 = function hashCode_20(){ return hashCode__I__devirtual$(this.delegateList_0()); } ; _.indexOf_0 = function indexOf_1(object){ return this.delegateList_0().indexOf_0(object); } ; _.isEmpty = function isEmpty_8(){ return this.delegateList_0().isEmpty(); } ; _.iterator_1 = function iterator_17(){ return unmodifiableIterator(this.delegateList_0().iterator_0()); } ; _.size_1 = function size_15(){ return this.delegateList_0().size_1(); } ; _.subList_0 = function subList_3(fromIndex, toIndex){ return unsafeDelegateList(this.delegateList_0().subList(fromIndex, toIndex)); } ; _.toArray = function toArray_5(){ return this.delegateList_0().toArray_0(initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, this.delegateList_0().size_1(), 5, 1)); } ; _.toArray_0 = function toArray_6(other){ return this.delegateList_0().toArray_0(other); } ; _.toString_0 = function toString_21(){ return toString_40(this.delegateList_0()); } ; var Lcom_google_common_collect_ForwardingImmutableList_2_classLit = createForClass('com.google.common.collect', 'ForwardingImmutableList', 2105); function $clinit_ImmutableMap(){ $clinit_ImmutableMap = emptyMethod; EMPTY_0 = new RegularImmutableMap_0(stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Map$Entry_2_classLit, 1), $intern_27, 44, 0, [])); } function $entrySet_1(this$static){ if (this$static.cachedEntrySet) { return this$static.cachedEntrySet; } return this$static.cachedEntrySet = this$static.createEntrySet_1(); } function $keySet_0(this$static){ if (this$static.cachedKeySet) { return this$static.cachedKeySet; } return this$static.cachedKeySet = this$static.createKeySet_1(); } function $put_2(){ throw toJs(new UnsupportedOperationException); } function fromEntryList(entries){ $clinit_ImmutableMap(); var entry, entryArray, size_0; size_0 = entries.array.length; switch (size_0) { case 0: return EMPTY_0; case 1: entry = castTo(getOnlyElement(new ArrayList$1(entries)), 44); return of(entry.getKey(), entry.getValue()); default:entryArray = castTo($toArray_1(entries, initUnidimensionalArray(Ljava_util_Map$Entry_2_classLit, $intern_27, 44, entries.array.length, 0, 1)), 173); return new RegularImmutableMap(entryArray); } } function of(k1, v1){ return $clinit_ImmutableMap() , checkEntryNotNull(k1, v1) , new SingletonImmutableBiMap(k1, v1); } function of_0(k1, v1, k2, v2){ $clinit_ImmutableMap(); return new RegularImmutableMap_0(stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Map$Entry_2_classLit, 1), $intern_27, 44, 0, [(checkEntryNotNull(k1, v1) , new ImmutableEntry(k1, v1)), (checkEntryNotNull(k2, v2) , new ImmutableEntry(k2, v2))])); } defineClass(729, 1, $intern_28); _.entrySet_0 = function entrySet_1(){ return $entrySet_1(this); } ; _.forEach = function forEach_5(consumer){ $forEach_2(this, consumer); } ; _.keySet_0 = function keySet_10(){ return $keySet_0(this); } ; _.merge = function merge_0(key, value_0, remappingFunction){ return $merge(this, key, value_0, remappingFunction); } ; _.values_0 = function values_4(){ return this.values_2(); } ; _.clear_0 = function clear_17(){ throw toJs(new UnsupportedOperationException); } ; _.containsKey = function containsKey_3(key){ return this.get_3(key) != null; } ; _.containsValue = function containsValue_0(value_0){ return this.values_2().contains(value_0); } ; _.createKeySet_1 = function createKeySet_6(){ return new ImmutableMapKeySet(this); } ; _.createValues = function createValues(){ return new ImmutableMapValues(this); } ; _.equals_0 = function equals_19(object){ return equalsImpl_0(this, object); } ; _.hashCode_1 = function hashCode_21(){ return $entrySet_1(this).hashCode_1(); } ; _.isEmpty = function isEmpty_9(){ return this.size_1() == 0; } ; _.put = function put_2(k, v){ return $put_2(); } ; _.remove_0 = function remove_24(o){ throw toJs(new UnsupportedOperationException); } ; _.toString_0 = function toString_22(){ return toStringImpl(this); } ; _.values_2 = function values_3(){ if (this.cachedValues) { return this.cachedValues; } return this.cachedValues = this.createValues(); } ; _.cachedEntrySet = null; _.cachedKeySet = null; _.cachedValues = null; var EMPTY_0; var Lcom_google_common_collect_ImmutableMap_2_classLit = createForClass('com.google.common.collect', 'ImmutableMap', 729); function $containsKey_0(this$static, key){ return safeContainsKey(this$static.delegate, key); } function $get_3(this$static, key){ return key == null?null:safeGet(this$static.delegate, key); } function ForwardingImmutableMap(entries){ var delegate, entry, entry$array, entry$index, entry$max, key, previous; delegate = new LinkedHashMap; for (entry$array = entries , entry$index = 0 , entry$max = entry$array.length; entry$index < entry$max; ++entry$index) { entry = entry$array[entry$index]; key = checkNotNull(entry.getKey()); previous = $put_11(delegate, key, checkNotNull(entry.getValue())); if (previous != null) { throw toJs(new IllegalArgumentException_0('duplicate key: ' + key)); } } this.delegate = ($clinit_Collections() , new Collections$UnmodifiableMap(delegate)); } defineClass(730, 729, $intern_28); _.containsKey = function containsKey_4(key){ return $containsKey_0(this, key); } ; _.containsValue = function containsValue_1(value_0){ return $containsValue_3(this.delegate, value_0); } ; _.createEntrySet_1 = function createEntrySet_0(){ return unsafeDelegate(new ForwardingImmutableMap$1(this)); } ; _.createKeySet_1 = function createKeySet_7(){ return unsafeDelegate($keySet_1(this.delegate)); } ; _.createValues = function createValues_0(){ return $clinit_ImmutableCollection() , new ForwardingImmutableCollection($values_2(this.delegate)); } ; _.equals_0 = function equals_20(object){ return $equals_7(this.delegate, object); } ; _.get_3 = function get_16(key){ return $get_3(this, key); } ; _.hashCode_1 = function hashCode_22(){ return hashCode__I__devirtual$(this.delegate.map_0); } ; _.isEmpty = function isEmpty_10(){ return this.delegate.map_0.isEmpty(); } ; _.size_1 = function size_16(){ return this.delegate.map_0.size_1(); } ; _.toString_0 = function toString_23(){ return toString_40(this.delegate.map_0); } ; var Lcom_google_common_collect_ForwardingImmutableMap_2_classLit = createForClass('com.google.common.collect', 'ForwardingImmutableMap', 730); defineClass(2072, 2071, $intern_29); _.delegate_0 = function delegate_1(){ return this.delegate_2(); } ; _.delegate_1 = function delegate_2(){ return this.delegate_2(); } ; _.spliterator_0 = function spliterator_17(){ return new Spliterators$IteratorSpliterator(this, 1); } ; _.equals_0 = function equals_21(object){ return object === this || this.delegate_2().equals_0(object); } ; _.hashCode_1 = function hashCode_23(){ return this.delegate_2().hashCode_1(); } ; var Lcom_google_common_collect_ForwardingSet_2_classLit = createForClass('com.google.common.collect', 'ForwardingSet', 2072); function ForwardingImmutableMap$1(this$0){ this.this$01 = this$0; } defineClass(1085, 2072, $intern_29, ForwardingImmutableMap$1); _.delegate_0 = function delegate_3(){ return $entrySet_2(this.this$01.delegate); } ; _.delegate_1 = function delegate_4(){ return $entrySet_2(this.this$01.delegate); } ; _.contains = function contains_14(object){ if (instanceOf(object, 44) && castTo(object, 44).getKey() == null) { return false; } try { return $contains_3($entrySet_2(this.this$01.delegate), object); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 212)) { return false; } else throw toJs($e0); } } ; _.delegate_2 = function delegate_5(){ return $entrySet_2(this.this$01.delegate); } ; _.toArray_0 = function toArray_7(array){ var result; result = $toArray_4($entrySet_2(this.this$01.delegate), array); $entrySet_2(this.this$01.delegate).coll.size_1() < result.length && setCheck(result, $entrySet_2(this.this$01.delegate).coll.size_1(), null); return result; } ; var Lcom_google_common_collect_ForwardingImmutableMap$1_2_classLit = createForClass('com.google.common.collect', 'ForwardingImmutableMap/1', 1085); function unsafeDelegate(delegate){ $clinit_ImmutableCollection(); switch (delegate.size_1()) { case 0: return $clinit_RegularImmutableSet() , EMPTY_2; case 1: return new SingletonImmutableSet(delegate.iterator_0().next_1()); default:return new RegularImmutableSet(delegate); } } defineClass(2079, 2078, $intern_30); _.iterator_0 = function iterator_19(){ return this.iterator_1(); } ; _.spliterator_0 = function spliterator_18(){ return new Spliterators$IteratorSpliterator(this, 1); } ; _.equals_0 = function equals_22(obj){ return equalsImpl_3(this, obj); } ; _.hashCode_1 = function hashCode_24(){ return hashCodeImpl_0(this); } ; var Lcom_google_common_collect_ImmutableSet_2_classLit = createForClass('com.google.common.collect', 'ImmutableSet', 2079); function ForwardingImmutableSet(delegate){ $clinit_ImmutableCollection(); this.delegate = ($clinit_Collections() , new Collections$UnmodifiableSet(delegate)); } defineClass(719, 2079, $intern_30); _.iterator_0 = function iterator_21(){ return unmodifiableIterator(new Collections$UnmodifiableCollectionIterator(this.delegate.coll.iterator_0())); } ; _.contains = function contains_15(object){ return object != null && $contains_2(this.delegate, object); } ; _.containsAll = function containsAll_5(targets){ return $containsAll_0(this.delegate, targets); } ; _.hashCode_1 = function hashCode_25(){ return hashCode__I__devirtual$(this.delegate.coll); } ; _.isEmpty = function isEmpty_11(){ return this.delegate.coll.isEmpty(); } ; _.iterator_1 = function iterator_20(){ return unmodifiableIterator(new Collections$UnmodifiableCollectionIterator(this.delegate.coll.iterator_0())); } ; _.size_1 = function size_17(){ return this.delegate.coll.size_1(); } ; _.toArray = function toArray_8(){ return this.delegate.coll.toArray(); } ; _.toArray_0 = function toArray_9(other){ return $toArray_3(this.delegate, other); } ; _.toString_0 = function toString_24(){ return toString_40(this.delegate.coll); } ; var Lcom_google_common_collect_ForwardingImmutableSet_2_classLit = createForClass('com.google.common.collect', 'ForwardingImmutableSet', 719); defineClass(2073, 2072, $intern_31); _.delegate_0 = function delegate_6(){ return this.unmodifiableDelegate; } ; _.delegate_1 = function delegate_7(){ return this.unmodifiableDelegate; } ; _.delegate_2 = function delegate_8(){ return this.unmodifiableDelegate; } ; _.spliterator_0 = function spliterator_19(){ return new SortedSet$1(this); } ; var Lcom_google_common_collect_ForwardingSortedSet_2_classLit = createForClass('com.google.common.collect', 'ForwardingSortedSet', 2073); function $clear_2(this$static){ this$static.size_0 = 0; fill_2(this$static.hashTableKToV, null); fill_2(this$static.hashTableVToK, null); this$static.firstInKeyInsertionOrder = null; this$static.lastInKeyInsertionOrder = null; ++this$static.modCount; } function $containsValue_1(this$static, value_0){ return !!$seekByValue(this$static, value_0, toInt_0(mul_0($intern_32, rotateLeft(toInt_0(mul_0(value_0 == null?0:hashCode__I__devirtual$(value_0), $intern_33)), 15)))); } function $delete(this$static, entry){ var bucketEntry, bucketEntry0, keyBucket, prevBucketEntry, valueBucket; keyBucket = entry.keyHash & this$static.mask; prevBucketEntry = null; for (bucketEntry0 = this$static.hashTableKToV[keyBucket]; true; bucketEntry0 = bucketEntry0.nextInKToVBucket) { if (bucketEntry0 == entry) { !prevBucketEntry?(this$static.hashTableKToV[keyBucket] = entry.nextInKToVBucket):(prevBucketEntry.nextInKToVBucket = entry.nextInKToVBucket); break; } prevBucketEntry = bucketEntry0; } valueBucket = entry.valueHash & this$static.mask; prevBucketEntry = null; for (bucketEntry = this$static.hashTableVToK[valueBucket]; true; bucketEntry = bucketEntry.nextInVToKBucket) { if (bucketEntry == entry) { !prevBucketEntry?(this$static.hashTableVToK[valueBucket] = entry.nextInVToKBucket):(prevBucketEntry.nextInVToKBucket = entry.nextInVToKBucket); break; } prevBucketEntry = bucketEntry; } !entry.prevInKeyInsertionOrder?(this$static.firstInKeyInsertionOrder = entry.nextInKeyInsertionOrder):(entry.prevInKeyInsertionOrder.nextInKeyInsertionOrder = entry.nextInKeyInsertionOrder); !entry.nextInKeyInsertionOrder?(this$static.lastInKeyInsertionOrder = entry.prevInKeyInsertionOrder):(entry.nextInKeyInsertionOrder.prevInKeyInsertionOrder = entry.prevInKeyInsertionOrder); --this$static.size_0; ++this$static.modCount; } function $forEach(this$static, action){ var entry; checkNotNull(action); for (entry = this$static.firstInKeyInsertionOrder; entry; entry = entry.nextInKeyInsertionOrder) { action.accept_1(entry.key, entry.value_0); } } function $get_4(this$static, key){ return valueOrNull($seekByKey(this$static, key, toInt_0(mul_0($intern_32, rotateLeft(toInt_0(mul_0(key == null?0:hashCode__I__devirtual$(key), $intern_33)), 15))))); } function $insert(this$static, entry, oldEntryForKey){ var keyBucket, valueBucket; keyBucket = entry.keyHash & this$static.mask; entry.nextInKToVBucket = this$static.hashTableKToV[keyBucket]; this$static.hashTableKToV[keyBucket] = entry; valueBucket = entry.valueHash & this$static.mask; entry.nextInVToKBucket = this$static.hashTableVToK[valueBucket]; this$static.hashTableVToK[valueBucket] = entry; if (!oldEntryForKey) { entry.prevInKeyInsertionOrder = this$static.lastInKeyInsertionOrder; entry.nextInKeyInsertionOrder = null; !this$static.lastInKeyInsertionOrder?(this$static.firstInKeyInsertionOrder = entry):(this$static.lastInKeyInsertionOrder.nextInKeyInsertionOrder = entry); this$static.lastInKeyInsertionOrder = entry; } else { entry.prevInKeyInsertionOrder = oldEntryForKey.prevInKeyInsertionOrder; !entry.prevInKeyInsertionOrder?(this$static.firstInKeyInsertionOrder = entry):(entry.prevInKeyInsertionOrder.nextInKeyInsertionOrder = entry); entry.nextInKeyInsertionOrder = oldEntryForKey.nextInKeyInsertionOrder; !entry.nextInKeyInsertionOrder?(this$static.lastInKeyInsertionOrder = entry):(entry.nextInKeyInsertionOrder.prevInKeyInsertionOrder = entry); } ++this$static.size_0; ++this$static.modCount; } function $inverse(this$static){ var result; result = this$static.inverse; return !result?(this$static.inverse = new HashBiMap$Inverse(this$static)):result; } function $put_3(this$static, key, value_0){ var keyHash, newEntry, oldEntryForKey, oldEntryForValue, valueHash; keyHash = toInt_0(mul_0($intern_32, rotateLeft(toInt_0(mul_0(key == null?0:hashCode__I__devirtual$(key), $intern_33)), 15))); valueHash = toInt_0(mul_0($intern_32, rotateLeft(toInt_0(mul_0(value_0 == null?0:hashCode__I__devirtual$(value_0), $intern_33)), 15))); oldEntryForKey = $seekByKey(this$static, key, keyHash); if (!!oldEntryForKey && valueHash == oldEntryForKey.valueHash && equal(value_0, oldEntryForKey.value_0)) { return value_0; } oldEntryForValue = $seekByValue(this$static, value_0, valueHash); if (oldEntryForValue) { throw toJs(new IllegalArgumentException_0('value already present: ' + value_0)); } newEntry = new HashBiMap$BiEntry(key, keyHash, value_0, valueHash); if (oldEntryForKey) { $delete(this$static, oldEntryForKey); $insert(this$static, newEntry, oldEntryForKey); oldEntryForKey.prevInKeyInsertionOrder = null; oldEntryForKey.nextInKeyInsertionOrder = null; return oldEntryForKey.value_0; } else { $insert(this$static, newEntry, null); $rehashIfNecessary(this$static); return null; } } function $putInverse(this$static, value_0, key, force){ var keyHash, newEntry, oldEntryForKey, oldEntryForValue, valueHash; valueHash = toInt_0(mul_0($intern_32, rotateLeft(toInt_0(mul_0(value_0 == null?0:hashCode__I__devirtual$(value_0), $intern_33)), 15))); keyHash = toInt_0(mul_0($intern_32, rotateLeft(toInt_0(mul_0(key == null?0:hashCode__I__devirtual$(key), $intern_33)), 15))); oldEntryForValue = $seekByValue(this$static, value_0, valueHash); oldEntryForKey = $seekByKey(this$static, key, keyHash); if (!!oldEntryForValue && keyHash == oldEntryForValue.keyHash && equal(key, oldEntryForValue.key)) { return key; } else if (!!oldEntryForKey && !force) { throw toJs(new IllegalArgumentException_0('key already present: ' + key)); } !!oldEntryForValue && $delete(this$static, oldEntryForValue); !!oldEntryForKey && $delete(this$static, oldEntryForKey); newEntry = new HashBiMap$BiEntry(key, keyHash, value_0, valueHash); $insert(this$static, newEntry, oldEntryForKey); if (oldEntryForKey) { oldEntryForKey.prevInKeyInsertionOrder = null; oldEntryForKey.nextInKeyInsertionOrder = null; } if (oldEntryForValue) { oldEntryForValue.prevInKeyInsertionOrder = null; oldEntryForValue.nextInKeyInsertionOrder = null; } $rehashIfNecessary(this$static); return !oldEntryForValue?null:oldEntryForValue.key; } function $rehashIfNecessary(this$static){ var entry, newTableSize, oldKToV; oldKToV = this$static.hashTableKToV; if (needsResizing(this$static.size_0, oldKToV.length)) { newTableSize = oldKToV.length * 2; this$static.hashTableKToV = initUnidimensionalArray(Lcom_google_common_collect_HashBiMap$BiEntry_2_classLit, $intern_34, 303, newTableSize, 0, 1); this$static.hashTableVToK = initUnidimensionalArray(Lcom_google_common_collect_HashBiMap$BiEntry_2_classLit, $intern_34, 303, newTableSize, 0, 1); this$static.mask = newTableSize - 1; this$static.size_0 = 0; for (entry = this$static.firstInKeyInsertionOrder; entry; entry = entry.nextInKeyInsertionOrder) { $insert(this$static, entry, entry); } ++this$static.modCount; } } function $seekByKey(this$static, key, keyHash){ var entry; for (entry = this$static.hashTableKToV[keyHash & this$static.mask]; entry; entry = entry.nextInKToVBucket) { if (keyHash == entry.keyHash && equal(key, entry.key)) { return entry; } } return null; } function $seekByValue(this$static, value_0, valueHash){ var entry; for (entry = this$static.hashTableVToK[valueHash & this$static.mask]; entry; entry = entry.nextInVToKBucket) { if (valueHash == entry.valueHash && equal(value_0, entry.value_0)) { return entry; } } return null; } function HashBiMap(){ var tableSize; checkNonnegative(16, 'expectedSize'); tableSize = closedTableSize(16); this.hashTableKToV = initUnidimensionalArray(Lcom_google_common_collect_HashBiMap$BiEntry_2_classLit, $intern_34, 303, tableSize, 0, 1); this.hashTableVToK = initUnidimensionalArray(Lcom_google_common_collect_HashBiMap$BiEntry_2_classLit, $intern_34, 303, tableSize, 0, 1); this.firstInKeyInsertionOrder = null; this.lastInKeyInsertionOrder = null; this.size_0 = 0; this.mask = tableSize - 1; this.modCount = 0; } defineClass(543, 2077, $intern_28, HashBiMap); _.putAll = function putAll_0(map_0){ $putAll(this, map_0); } ; _.values_0 = function values_5(){ var result; return result = this.inverse , new HashBiMap$Inverse$InverseKeySet(!result?(this.inverse = new HashBiMap$Inverse(this)):result); } ; _.clear_0 = function clear_18(){ $clear_2(this); } ; _.containsKey = function containsKey_5(key){ return !!$seekByKey(this, key, toInt_0(mul_0($intern_32, rotateLeft(toInt_0(mul_0(key == null?0:hashCode__I__devirtual$(key), $intern_33)), 15)))); } ; _.containsValue = function containsValue_2(value_0){ return $containsValue_1(this, value_0); } ; _.entryIterator = function entryIterator_2(){ return new HashBiMap$1(this, this); } ; _.forEach = function forEach_6(action){ $forEach(this, action); } ; _.get_3 = function get_17(key){ return $get_4(this, key); } ; _.keySet_0 = function keySet_11(){ return new HashBiMap$KeySet(this); } ; _.put = function put_3(key, value_0){ return $put_3(this, key, value_0); } ; _.remove_0 = function remove_25(key){ var entry; entry = $seekByKey(this, key, toInt_0(mul_0($intern_32, rotateLeft(toInt_0(mul_0(key == null?0:hashCode__I__devirtual$(key), $intern_33)), 15)))); if (!entry) { return null; } else { $delete(this, entry); entry.prevInKeyInsertionOrder = null; entry.nextInKeyInsertionOrder = null; return entry.value_0; } } ; _.size_1 = function size_18(){ return this.size_0; } ; _.values_1 = function values_6(){ var result; return result = this.inverse , new HashBiMap$Inverse$InverseKeySet(!result?(this.inverse = new HashBiMap$Inverse(this)):result); } ; _.mask = 0; _.modCount = 0; _.size_0 = 0; var Lcom_google_common_collect_HashBiMap_2_classLit = createForClass('com.google.common.collect', 'HashBiMap', 543); function $hasNext_0(this$static){ if (this$static.this$01.modCount != this$static.expectedModCount) { throw toJs(new ConcurrentModificationException); } return !!this$static.next_0 && this$static.remaining > 0; } function HashBiMap$Itr(this$0){ this.this$01 = this$0; this.next_0 = this.this$01.firstInKeyInsertionOrder; this.expectedModCount = this.this$01.modCount; this.remaining = this.this$01.size_0; } defineClass(544, 1, $intern_6); _.forEachRemaining = function forEachRemaining_7(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_5(){ return $hasNext_0(this); } ; _.next_1 = function next_6(){ var entry; if (!$hasNext_0(this)) { throw toJs(new NoSuchElementException); } entry = castTo(requireNonNull(this.next_0), 303); this.next_0 = entry.nextInKeyInsertionOrder; this.toRemove = entry; --this.remaining; return this.output_0(entry); } ; _.remove = function remove_26(){ if (this.this$01.modCount != this.expectedModCount) { throw toJs(new ConcurrentModificationException); } if (!this.toRemove) { throw toJs(new IllegalStateException_0('no calls to next() since the last call to remove()')); } $delete(this.this$01, this.toRemove); this.expectedModCount = this.this$01.modCount; this.toRemove = null; } ; _.expectedModCount = 0; _.remaining = 0; _.toRemove = null; var Lcom_google_common_collect_HashBiMap$Itr_2_classLit = createForClass('com.google.common.collect', 'HashBiMap/Itr', 544); function HashBiMap$1(this$0, this$0_1){ this.this$02 = this$0_1; HashBiMap$Itr.call(this, this$0); } defineClass(1023, 544, $intern_6, HashBiMap$1); _.output_0 = function output_2(entry){ return new HashBiMap$1$MapEntry(this, entry); } ; var Lcom_google_common_collect_HashBiMap$1_2_classLit = createForClass('com.google.common.collect', 'HashBiMap/1', 1023); function HashBiMap$1$MapEntry(this$1, entry){ this.this$11 = this$1; this.delegate = entry; } defineClass($intern_35, 358, $intern_15, HashBiMap$1$MapEntry); _.getKey = function getKey_0(){ return this.delegate.key; } ; _.getValue = function getValue_2(){ return this.delegate.value_0; } ; _.setValue = function setValue_3(value_0){ var newEntry, oldValue, valueHash; oldValue = this.delegate.value_0; valueHash = toInt_0(mul_0($intern_32, rotateLeft(toInt_0(mul_0(value_0 == null?0:hashCode__I__devirtual$(value_0), $intern_33)), 15))); if (valueHash == this.delegate.valueHash && (maskUndefined(value_0) === maskUndefined(oldValue) || value_0 != null && equals_Ljava_lang_Object__Z__devirtual$(value_0, oldValue))) { return value_0; } checkArgument_1(!$seekByValue(this.this$11.this$02, value_0, valueHash), value_0); $delete(this.this$11.this$02, this.delegate); newEntry = new HashBiMap$BiEntry(this.delegate.key, this.delegate.keyHash, value_0, valueHash); $insert(this.this$11.this$02, newEntry, this.delegate); this.delegate.prevInKeyInsertionOrder = null; this.delegate.nextInKeyInsertionOrder = null; this.this$11.expectedModCount = this.this$11.this$02.modCount; this.this$11.toRemove == this.delegate && (this.this$11.toRemove = newEntry); this.delegate = newEntry; return oldValue; } ; var Lcom_google_common_collect_HashBiMap$1$MapEntry_2_classLit = createForClass('com.google.common.collect', 'HashBiMap/1/MapEntry', $intern_35); function ImmutableEntry(key, value_0){ this.key = key; this.value_0 = value_0; } defineClass(246, 358, {358:1, 246:1, 3:1, 44:1}, ImmutableEntry); _.getKey = function getKey_1(){ return this.key; } ; _.getValue = function getValue_3(){ return this.value_0; } ; _.setValue = function setValue_4(value_0){ throw toJs(new UnsupportedOperationException); } ; var Lcom_google_common_collect_ImmutableEntry_2_classLit = createForClass('com.google.common.collect', 'ImmutableEntry', 246); function HashBiMap$BiEntry(key, keyHash, value_0, valueHash){ ImmutableEntry.call(this, key, value_0); this.keyHash = keyHash; this.valueHash = valueHash; } defineClass(303, 246, {358:1, 303:1, 246:1, 3:1, 44:1}, HashBiMap$BiEntry); _.keyHash = 0; _.valueHash = 0; var Lcom_google_common_collect_HashBiMap$BiEntry_2_classLit = createForClass('com.google.common.collect', 'HashBiMap/BiEntry', 303); function $get_5(this$static, value_0){ return keyOrNull($seekByValue(this$static.this$01, value_0, toInt_0(mul_0($intern_32, rotateLeft(toInt_0(mul_0(value_0 == null?0:hashCode__I__devirtual$(value_0), $intern_33)), 15))))); } function HashBiMap$Inverse(this$0){ this.this$01 = this$0; } function lambda$0(action_0, k_1, v_2){ action_0.accept_1(v_2, k_1); } defineClass(619, 2077, $intern_28, HashBiMap$Inverse); _.putAll = function putAll_1(map_0){ $putAll(this, map_0); } ; _.values_0 = function values_7(){ return new HashBiMap$KeySet(this.this$01); } ; _.clear_0 = function clear_19(){ $clear_2(this.this$01); } ; _.containsKey = function containsKey_6(value_0){ return $containsValue_1(this.this$01, value_0); } ; _.entryIterator = function entryIterator_3(){ return new HashBiMap$Inverse$1(this, this.this$01); } ; _.forEach = function forEach_7(action){ checkNotNull(action); $forEach(this.this$01, new HashBiMap$Inverse$lambda$0$Type(action)); } ; _.get_3 = function get_18(value_0){ return $get_5(this, value_0); } ; _.keySet_0 = function keySet_12(){ return new HashBiMap$Inverse$InverseKeySet(this); } ; _.put = function put_4(value_0, key){ return $putInverse(this.this$01, value_0, key, false); } ; _.remove_0 = function remove_27(value_0){ var entry; entry = $seekByValue(this.this$01, value_0, toInt_0(mul_0($intern_32, rotateLeft(toInt_0(mul_0(value_0 == null?0:hashCode__I__devirtual$(value_0), $intern_33)), 15)))); if (!entry) { return null; } else { $delete(this.this$01, entry); entry.prevInKeyInsertionOrder = null; entry.nextInKeyInsertionOrder = null; return entry.key; } } ; _.size_1 = function size_19(){ return this.this$01.size_0; } ; _.values_1 = function values_8(){ return new HashBiMap$KeySet(this.this$01); } ; var Lcom_google_common_collect_HashBiMap$Inverse_2_classLit = createForClass('com.google.common.collect', 'HashBiMap/Inverse', 619); function HashBiMap$Inverse$1(this$1, this$0){ this.this$11 = this$1; HashBiMap$Itr.call(this, this$0); } defineClass(1020, 544, $intern_6, HashBiMap$Inverse$1); _.output_0 = function output_3(entry){ return new HashBiMap$Inverse$1$InverseEntry(this, entry); } ; var Lcom_google_common_collect_HashBiMap$Inverse$1_2_classLit = createForClass('com.google.common.collect', 'HashBiMap/Inverse/1', 1020); function HashBiMap$Inverse$1$InverseEntry(this$2, entry){ this.this$21 = this$2; this.delegate = entry; } defineClass(1021, 358, $intern_15, HashBiMap$Inverse$1$InverseEntry); _.getKey = function getKey_2(){ return this.delegate.value_0; } ; _.getValue = function getValue_4(){ return this.delegate.key; } ; _.setValue = function setValue_5(key){ var keyHash, newEntry, oldKey; oldKey = this.delegate.key; keyHash = toInt_0(mul_0($intern_32, rotateLeft(toInt_0(mul_0(key == null?0:hashCode__I__devirtual$(key), $intern_33)), 15))); if (keyHash == this.delegate.keyHash && (maskUndefined(key) === maskUndefined(oldKey) || key != null && equals_Ljava_lang_Object__Z__devirtual$(key, oldKey))) { return key; } checkArgument_1(!$seekByKey(this.this$21.this$11.this$01, key, keyHash), key); $delete(this.this$21.this$11.this$01, this.delegate); newEntry = new HashBiMap$BiEntry(key, keyHash, this.delegate.value_0, this.delegate.valueHash); this.delegate = newEntry; $insert(this.this$21.this$11.this$01, newEntry, null); this.this$21.expectedModCount = this.this$21.this$11.this$01.modCount; return oldKey; } ; var Lcom_google_common_collect_HashBiMap$Inverse$1$InverseEntry_2_classLit = createForClass('com.google.common.collect', 'HashBiMap/Inverse/1/InverseEntry', 1021); function HashBiMap$Inverse$InverseKeySet(this$1){ this.this$11 = this$1; Maps$KeySet.call(this, this$1); } defineClass(620, 542, $intern_10, HashBiMap$Inverse$InverseKeySet); _.iterator_0 = function iterator_22(){ return new HashBiMap$Inverse$InverseKeySet$1(this.this$11.this$01); } ; _.remove_1 = function remove_28(o){ var entry; entry = $seekByValue(this.this$11.this$01, o, toInt_0(mul_0($intern_32, rotateLeft(toInt_0(mul_0(o == null?0:hashCode__I__devirtual$(o), $intern_33)), 15)))); if (!entry) { return false; } else { $delete(this.this$11.this$01, entry); return true; } } ; var Lcom_google_common_collect_HashBiMap$Inverse$InverseKeySet_2_classLit = createForClass('com.google.common.collect', 'HashBiMap/Inverse/InverseKeySet', 620); function HashBiMap$Inverse$InverseKeySet$1(this$0){ HashBiMap$Itr.call(this, this$0); } defineClass(1019, 544, $intern_6, HashBiMap$Inverse$InverseKeySet$1); _.output_0 = function output_4(entry){ return entry.value_0; } ; var Lcom_google_common_collect_HashBiMap$Inverse$InverseKeySet$1_2_classLit = createForClass('com.google.common.collect', 'HashBiMap/Inverse/InverseKeySet/1', 1019); function HashBiMap$Inverse$lambda$0$Type(action_0){ this.action_0 = action_0; } defineClass(1022, 1, {}, HashBiMap$Inverse$lambda$0$Type); _.accept_1 = function accept_6(arg0, arg1){ lambda$0(this.action_0, arg0, arg1); } ; var Lcom_google_common_collect_HashBiMap$Inverse$lambda$0$Type_2_classLit = createForClass('com.google.common.collect', 'HashBiMap/Inverse/lambda$0$Type', 1022); function HashBiMap$KeySet(this$0){ this.this$01 = this$0; Maps$KeySet.call(this, this$0); } defineClass(618, 542, $intern_10, HashBiMap$KeySet); _.iterator_0 = function iterator_23(){ return new HashBiMap$KeySet$1(this.this$01); } ; _.remove_1 = function remove_29(o){ var entry; entry = $seekByKey(this.this$01, o, toInt_0(mul_0($intern_32, rotateLeft(toInt_0(mul_0(o == null?0:hashCode__I__devirtual$(o), $intern_33)), 15)))); if (!entry) { return false; } else { $delete(this.this$01, entry); entry.prevInKeyInsertionOrder = null; entry.nextInKeyInsertionOrder = null; return true; } } ; var Lcom_google_common_collect_HashBiMap$KeySet_2_classLit = createForClass('com.google.common.collect', 'HashBiMap/KeySet', 618); function HashBiMap$KeySet$1(this$0){ HashBiMap$Itr.call(this, this$0); } defineClass(1018, 544, $intern_6, HashBiMap$KeySet$1); _.output_0 = function output_5(entry){ return entry.key; } ; var Lcom_google_common_collect_HashBiMap$KeySet$1_2_classLit = createForClass('com.google.common.collect', 'HashBiMap/KeySet/1', 1018); function HashMultimapGwtSerializationDependencies(map_0){ AbstractSetMultimap.call(this, map_0); } defineClass(1123, 627, $intern_5); var Lcom_google_common_collect_HashMultimapGwtSerializationDependencies_2_classLit = createForClass('com.google.common.collect', 'HashMultimapGwtSerializationDependencies', 1123); function HashMultimap(){ HashMultimapGwtSerializationDependencies.call(this, new HashMap_0(capacity_0(12))); checkArgument(true); this.expectedValuesPerKey = 2; } defineClass(271, 1123, $intern_5, HashMultimap); _.createCollection = function createCollection_5(){ return new HashSet_0(capacity_0(this.expectedValuesPerKey)); } ; _.createCollection_1 = function createCollection_6(){ return new HashSet_0(capacity_0(this.expectedValuesPerKey)); } ; _.expectedValuesPerKey = 2; var Lcom_google_common_collect_HashMultimap_2_classLit = createForClass('com.google.common.collect', 'HashMultimap', 271); function closedTableSize(expectedEntries){ var tableSize; expectedEntries = $wnd.Math.max(expectedEntries, 2); tableSize = highestOneBit(expectedEntries); if (expectedEntries > tableSize) { tableSize <<= 1; return tableSize > 0?tableSize:$intern_36; } return tableSize; } function needsResizing(size_0, tableSize){ return size_0 > tableSize && tableSize < $intern_36; } defineClass(2097, 307, $intern_26); _.contains = function contains_16(target){ return this.delegateCollection().contains(target); } ; _.isEmpty = function isEmpty_12(){ return this.delegateCollection().isEmpty(); } ; _.size_1 = function size_20(){ return this.delegateCollection().size_1(); } ; var Lcom_google_common_collect_ImmutableAsList_2_classLit = createForClass('com.google.common.collect', 'ImmutableAsList', 2097); function ImmutableBiMap(delegate){ this.delegate = ($clinit_Collections() , new Collections$UnmodifiableMap(delegate)); } defineClass(2030, 730, $intern_28); _.values_2 = function values_9(){ return $clinit_ImmutableCollection() , new SingletonImmutableSet(this.singleValue); } ; _.values_0 = function values_10(){ return $clinit_ImmutableCollection() , new SingletonImmutableSet(this.singleValue); } ; _.values_1 = function values_11(){ return $clinit_ImmutableCollection() , new SingletonImmutableSet(this.singleValue); } ; var Lcom_google_common_collect_ImmutableBiMap_2_classLit = createForClass('com.google.common.collect', 'ImmutableBiMap', 2030); defineClass(2075, 1, {}); var Lcom_google_common_collect_ImmutableCollection$Builder_2_classLit = createForClass('com.google.common.collect', 'ImmutableCollection/Builder', 2075); function ImmutableEnumSet(delegate){ ForwardingImmutableSet.call(this, delegate); } function asImmutable(delegate){ $clinit_ImmutableCollection(); switch (delegate.size_0) { case 0: return $clinit_RegularImmutableSet() , EMPTY_2; case 1: return new SingletonImmutableSet(getOnlyElement(new EnumSet$EnumSetImpl$IteratorImpl(delegate))); default:return new ImmutableEnumSet(delegate); } } defineClass(1035, 719, $intern_30, ImmutableEnumSet); var Lcom_google_common_collect_ImmutableEnumSet_2_classLit = createForClass('com.google.common.collect', 'ImmutableEnumSet', 1035); function ImmutableList$1(this$0, $anonymous0, $anonymous1){ this.this$01 = this$0; AbstractIndexedListIterator_0.call(this, $anonymous0, $anonymous1); } defineClass(980, 399, $intern_4, ImmutableList$1); _.get_0 = function get_19(index_0){ return this.this$01.get_0(index_0); } ; var Lcom_google_common_collect_ImmutableList$1_2_classLit = createForClass('com.google.common.collect', 'ImmutableList/1', 980); function ImmutableList$Builder(capacity){ this.contents = (checkNonnegative(capacity, 'initialArraySize') , new ArrayList_0(capacity)); } defineClass(979, 2075, {}, ImmutableList$Builder); var Lcom_google_common_collect_ImmutableList$Builder_2_classLit = createForClass('com.google.common.collect', 'ImmutableList/Builder', 979); function ImmutableMap$1(val$entryIterator){ this.val$entryIterator2 = val$entryIterator; } defineClass(623, 204, $intern_3, ImmutableMap$1); _.hasNext_0 = function hasNext_6(){ return this.val$entryIterator2.hasNext_0(); } ; _.next_1 = function next_7(){ return castTo(this.val$entryIterator2.next_1(), 44).getKey(); } ; var Lcom_google_common_collect_ImmutableMap$1_2_classLit = createForClass('com.google.common.collect', 'ImmutableMap/1', 623); function ImmutableMap$2methodref$getKey$Type(){ } defineClass(1054, 1, {}, ImmutableMap$2methodref$getKey$Type); _.apply_0 = function apply_9(arg0){ return castTo(arg0, 44).getKey(); } ; var Lcom_google_common_collect_ImmutableMap$2methodref$getKey$Type_2_classLit = createForClass('com.google.common.collect', 'ImmutableMap/2methodref$getKey$Type', 1054); function $put_4(this$static, key, value_0){ $add_3(this$static.entries_0, ($clinit_ImmutableMap() , checkEntryNotNull(key, value_0) , new ImmutableEntry(key, value_0))); return this$static; } function ImmutableMap$Builder(initCapacity){ this.entries_0 = (checkNonnegative(initCapacity, 'initialArraySize') , new ArrayList_0(initCapacity)); } defineClass(1053, 1, {}, ImmutableMap$Builder); var Lcom_google_common_collect_ImmutableMap$Builder_2_classLit = createForClass('com.google.common.collect', 'ImmutableMap/Builder', 1053); defineClass(2098, 2079, $intern_30); _.asList_1 = function asList_1(){ var result; return result = this.asList , !result?(this.asList = new IndexedImmutableSet$1(this)):result; } ; _.createAsList = function createAsList_0(){ return new RegularImmutableAsList_0(this, $toArray_0(this, initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, this.size_1(), 5, 1))); } ; var Lcom_google_common_collect_ImmutableSet$CachingAsList_2_classLit = createForClass('com.google.common.collect', 'ImmutableSet/CachingAsList', 2098); defineClass(2099, 2098, $intern_30); _.iterator_0 = function iterator_25(){ var entryIterator; return entryIterator = $entrySet_1(this.map_0).iterator_1() , new ImmutableMap$1(entryIterator); } ; _.createAsList = function createAsList_1(){ return new IndexedImmutableSet$1(this); } ; _.forEach_0 = function forEach_8(consumer){ var i, n; checkNotNull(consumer); n = this.size_1(); for (i = 0; i < n; i++) { consumer.accept(castTo($entrySet_1(this.map_0).asList_1().get_0(i), 44).getKey()); } } ; _.iterator_1 = function iterator_24(){ var result; return result = this.asList , $listIterator(!result?(this.asList = new IndexedImmutableSet$1(this)):result, 0); } ; _.spliterator_0 = function spliterator_20(){ return indexed(this.size_1(), 1296, new IndexedImmutableSet$0methodref$get$Type(this)); } ; var Lcom_google_common_collect_IndexedImmutableSet_2_classLit = createForClass('com.google.common.collect', 'IndexedImmutableSet', 2099); function $get_6(this$static, index_0){ return castTo($entrySet_1(this$static.map_0).asList_1().get_0(index_0), 44).getKey(); } function ImmutableMapKeySet(map_0){ $clinit_ImmutableCollection(); this.map_0 = map_0; } defineClass(1230, 2099, $intern_30, ImmutableMapKeySet); _.iterator_0 = function iterator_27(){ var entryIterator; return entryIterator = $entrySet_1(this.map_0).iterator_1() , new ImmutableMap$1(entryIterator); } ; _.contains = function contains_17(object){ return this.map_0.containsKey(object); } ; _.forEach_0 = function forEach_9(action){ checkNotNull(action); $forEach_2(this.map_0, new ImmutableMapKeySet$lambda$0$Type(action)); } ; _.iterator_1 = function iterator_26(){ var entryIterator; return entryIterator = $entrySet_1(this.map_0).iterator_1() , new ImmutableMap$1(entryIterator); } ; _.size_1 = function size_21(){ return this.map_0.size_1(); } ; _.spliterator_0 = function spliterator_21(){ return map_2($entrySet_1(this.map_0).spliterator_0(), new ImmutableMap$2methodref$getKey$Type); } ; var Lcom_google_common_collect_ImmutableMapKeySet_2_classLit = createForClass('com.google.common.collect', 'ImmutableMapKeySet', 1230); function ImmutableMapKeySet$lambda$0$Type(action_0){ this.action_0 = action_0; } defineClass(1231, 1, {}, ImmutableMapKeySet$lambda$0$Type); _.accept_1 = function accept_7(arg0, arg1){ $clinit_ImmutableCollection(); this.action_0.accept(arg0); } ; var Lcom_google_common_collect_ImmutableMapKeySet$lambda$0$Type_2_classLit = createForClass('com.google.common.collect', 'ImmutableMapKeySet/lambda$0$Type', 1231); function ImmutableMapValues(map_0){ $clinit_ImmutableCollection(); this.map_0 = map_0; } defineClass(1227, 2078, $intern_25, ImmutableMapValues); _.iterator_0 = function iterator_29(){ return new ImmutableMapValues$1(this); } ; _.asList_1 = function asList_2(){ var entryList; entryList = $entrySet_1(this.map_0).asList_1(); return new ImmutableMapValues$2(this, entryList); } ; _.contains = function contains_18(object){ return object != null && contains_19(new ImmutableMapValues$1(this), object); } ; _.iterator_1 = function iterator_28(){ return new ImmutableMapValues$1(this); } ; _.size_1 = function size_22(){ return this.map_0.size_1(); } ; _.spliterator_0 = function spliterator_22(){ return map_2($entrySet_1(this.map_0).spliterator_0(), new ImmutableMapValues$0methodref$getValue$Type); } ; var Lcom_google_common_collect_ImmutableMapValues_2_classLit = createForClass('com.google.common.collect', 'ImmutableMapValues', 1227); function ImmutableMapValues$0methodref$getValue$Type(){ } defineClass(1228, 1, {}, ImmutableMapValues$0methodref$getValue$Type); _.apply_0 = function apply_10(arg0){ return castTo(arg0, 44).getValue(); } ; var Lcom_google_common_collect_ImmutableMapValues$0methodref$getValue$Type_2_classLit = createForClass('com.google.common.collect', 'ImmutableMapValues/0methodref$getValue$Type', 1228); function ImmutableMapValues$1(this$0){ this.this$01 = this$0; this.entryItr = $entrySet_1(this.this$01.map_0).iterator_1(); } defineClass(637, 204, $intern_3, ImmutableMapValues$1); _.hasNext_0 = function hasNext_7(){ return this.entryItr.hasNext_0(); } ; _.next_1 = function next_8(){ return castTo(this.entryItr.next_1(), 44).getValue(); } ; var Lcom_google_common_collect_ImmutableMapValues$1_2_classLit = createForClass('com.google.common.collect', 'ImmutableMapValues/1', 637); function ImmutableMapValues$2(this$0, val$entryList){ $clinit_ImmutableList(); this.this$01 = this$0; this.val$entryList2 = val$entryList; } defineClass(1229, 2097, $intern_26, ImmutableMapValues$2); _.delegateCollection = function delegateCollection(){ return this.this$01; } ; _.get_0 = function get_20(index_0){ return castTo(this.val$entryList2.get_0(index_0), 44).getValue(); } ; var Lcom_google_common_collect_ImmutableMapValues$2_2_classLit = createForClass('com.google.common.collect', 'ImmutableMapValues/2', 1229); function IndexedImmutableSet$0methodref$get$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1232, 1, {}, IndexedImmutableSet$0methodref$get$Type); _.apply_2 = function apply_11(arg0){ return $get_6(this.$$outer_0, arg0); } ; var Lcom_google_common_collect_IndexedImmutableSet$0methodref$get$Type_2_classLit = createForClass('com.google.common.collect', 'IndexedImmutableSet/0methodref$get$Type', 1232); function IndexedImmutableSet$1(this$0){ $clinit_ImmutableList(); this.this$01 = this$0; } defineClass(638, 2097, $intern_26, IndexedImmutableSet$1); _.delegateCollection = function delegateCollection_0(){ return this.this$01; } ; _.get_0 = function get_21(index_0){ return $get_6(this.this$01, index_0); } ; _.size_1 = function size_23(){ return this.this$01.map_0.size_1(); } ; var Lcom_google_common_collect_IndexedImmutableSet$1_2_classLit = createForClass('com.google.common.collect', 'IndexedImmutableSet/1', 638); function addAll_6(addTo, elementsToAdd){ var c; if (instanceOf(elementsToAdd, 16)) { c = castTo(elementsToAdd, 16); return addTo.addAll(c); } return addAll_7(addTo, castTo(checkNotNull(elementsToAdd), 20).iterator_0()); } function all_0(iterable, predicate){ return all_1(iterable.iterator_0(), predicate); } function any_0(iterable, predicate){ return indexOf_2(iterable.iterator_0(), predicate) != -1; } function concat_0(inputs){ return checkNotNull(inputs) , new FluentIterable$2(inputs); } function filter_0(unfiltered, retainIfTrue){ checkNotNull(unfiltered); checkNotNull(retainIfTrue); return new Iterables$4(unfiltered, retainIfTrue); } function get_22(iterable){ checkNotNull(iterable); return get_23(new Iterators$ConcatenatedIterator(transform_2(iterable.val$inputs1.iterator_0(), new Iterables$10))); } function getLast(iterable){ var list; if (iterable) { list = iterable; if (list.isEmpty()) { throw toJs(new NoSuchElementException); } return list.get_0(list.size_1() - 1); } return getLast_0(iterable.iterator_0()); } function isEmpty_13(iterable){ if (instanceOf(iterable, 16)) { return castTo(iterable, 16).isEmpty(); } return !iterable.iterator_0().hasNext_0(); } function transform_1(fromIterable, function_0){ checkNotNull(fromIterable); checkNotNull(function_0); return new Iterables$5(fromIterable, function_0); } function Iterables$10(){ } defineClass(43, 1, {}, Iterables$10); _.apply_0 = function apply_12(iterable){ return castTo(iterable, 20).iterator_0(); } ; _.equals_0 = function equals_23(other){ return this === other; } ; var Lcom_google_common_collect_Iterables$10_2_classLit = createForClass('com.google.common.collect', 'Iterables/10', 43); function $iterator_0(this$static){ return filter_1(this$static.val$unfiltered1.iterator_0(), this$static.val$retainIfTrue2); } function Iterables$4(val$unfiltered, val$retainIfTrue){ this.val$unfiltered1 = val$unfiltered; this.val$retainIfTrue2 = val$retainIfTrue; FluentIterable.call(this); } function lambda$0_0(retainIfTrue_0, action_1, a_2){ retainIfTrue_0.test_0(a_2) && action_1.accept(a_2); } defineClass(1055, 547, $intern_23, Iterables$4); _.forEach_0 = function forEach_10(action){ checkNotNull(action); this.val$unfiltered1.forEach_0(new Iterables$4$lambda$0$Type(this.val$retainIfTrue2, action)); } ; _.iterator_0 = function iterator_30(){ return $iterator_0(this); } ; var Lcom_google_common_collect_Iterables$4_2_classLit = createForClass('com.google.common.collect', 'Iterables/4', 1055); function Iterables$4$lambda$0$Type(retainIfTrue_0, action_1){ this.retainIfTrue_0 = retainIfTrue_0; this.action_1 = action_1; } defineClass(1056, 1, $intern_19, Iterables$4$lambda$0$Type); _.accept = function accept_8(arg0){ lambda$0_0(this.retainIfTrue_0, this.action_1, arg0); } ; var Lcom_google_common_collect_Iterables$4$lambda$0$Type_2_classLit = createForClass('com.google.common.collect', 'Iterables/4/lambda$0$Type', 1056); function Iterables$5(val$fromIterable, val$function){ this.val$fromIterable1 = val$fromIterable; this.val$function2 = val$function; FluentIterable.call(this); } defineClass(1057, 547, $intern_23, Iterables$5); _.forEach_0 = function forEach_11(action){ checkNotNull(action); $forEach_0(this.val$fromIterable1, new Iterables$5$lambda$0$Type(action, this.val$function2)); } ; _.iterator_0 = function iterator_31(){ return transform_2(new AbstractEList$EIterator(this.val$fromIterable1), this.val$function2); } ; var Lcom_google_common_collect_Iterables$5_2_classLit = createForClass('com.google.common.collect', 'Iterables/5', 1057); function Iterables$5$lambda$0$Type(action_0, function_1){ this.action_0 = action_0; this.function_1 = function_1; } defineClass(1058, 1, $intern_19, Iterables$5$lambda$0$Type); _.accept = function accept_9(arg0){ this.action_0.accept($apply_27(arg0)); } ; var Lcom_google_common_collect_Iterables$5$lambda$0$Type_2_classLit = createForClass('com.google.common.collect', 'Iterables/5/lambda$0$Type', 1058); function addAll_7(addTo, iterator){ var wasModified; checkNotNull(addTo); checkNotNull(iterator); wasModified = false; while (iterator.hasNext_0()) { wasModified = wasModified | addTo.add_2(iterator.next_1()); } return wasModified; } function advance(iterator){ var i; checkNotNull(iterator); checkArgument_0(true, 'numberToAdvance must be nonnegative'); for (i = 0; i < 0 && $hasNext_1(iterator); i++) { $next_0(iterator); } return i; } function all_1(iterator, predicate){ var element; checkNotNull(predicate); while (iterator.hasNext_0()) { element = iterator.next_1(); if (!$apply_17(castTo(element, 10))) { return false; } } return true; } function clear_20(iterator){ checkNotNull(iterator); while (iterator.hasNext_0()) { iterator.next_1(); iterator.remove(); } } function contains_19(iterator, element){ if (element == null) { while (iterator.entryItr.hasNext_0()) { if (castTo(iterator.entryItr.next_1(), 44).getValue() == null) { return true; } } } else { while (iterator.entryItr.hasNext_0()) { if (equals_Ljava_lang_Object__Z__devirtual$(element, castTo(iterator.entryItr.next_1(), 44).getValue())) { return true; } } } return false; } function elementsEqual(iterator1, iterator2){ var o1, o2; while (iterator1.hasNext_0()) { if (!iterator2.hasNext_0()) { return false; } o1 = iterator1.next_1(); o2 = iterator2.next_1(); if (!(maskUndefined(o1) === maskUndefined(o2) || o1 != null && equals_Ljava_lang_Object__Z__devirtual$(o1, o2))) { return false; } } return !iterator2.hasNext_0(); } function filter_1(unfiltered, retainIfTrue){ checkNotNull(unfiltered); checkNotNull(retainIfTrue); return new Iterators$5(unfiltered, retainIfTrue); } function get_23(iterator){ var skipped; skipped = advance(iterator); if (!$hasNext_1(iterator)) { throw toJs(new IndexOutOfBoundsException_0('position (0) must be less than the number of elements that remained (' + skipped + ')')); } return $next_0(iterator); } function getLast_0(iterator){ var current; while (true) { current = iterator.next_1(); if (!iterator.hasNext_0()) { return current; } } } function getLast_1(iterator){ return $hasNext_5(iterator.val$edgesIter2)?getLast_0(iterator):null; } function getNext(iterator){ return iterator.hasNext_0()?iterator.next_1():null; } function getOnlyElement(iterator){ var first, i, sb; first = iterator.next_1(); if (!iterator.hasNext_0()) { return first; } sb = $append_10($append_11(new StringBuilder, 'expected one element but was: <'), first); for (i = 0; i < 4 && iterator.hasNext_0(); i++) { $append_10((sb.string += ', ' , sb), iterator.next_1()); } iterator.hasNext_0() && (sb.string += ', ...' , sb); sb.string += '>'; throw toJs(new IllegalArgumentException_0(sb.string)); } function indexOf_2(iterator, predicate){ var current, i; checkNotNull_0(predicate, 'predicate'); for (i = 0; iterator.hasNext_0(); i++) { current = iterator.next_1(); if (predicate.apply_1(current)) { return i; } } return -1; } function size_24(iterator){ var count; count = 0; while (iterator.hasNext_0()) { iterator.next_1(); count = add_20(count, 1); } return saturatedCast(count); } function toString_25(iterator){ var first, sb; sb = $append_5(new StringBuilder, 91); first = true; while (iterator.hasNext_0()) { first || (sb.string += ', ' , sb); first = false; $append_10(sb, iterator.next_1()); } return (sb.string += ']' , sb).string; } function transform_2(fromIterator, function_0){ checkNotNull(function_0); return new Iterators$6(fromIterator, function_0); } function unmodifiableIterator(iterator){ var result; checkNotNull(iterator); if (instanceOf(iterator, 204)) { result = castTo(iterator, 204); return result; } return new Iterators$1(iterator); } function Iterators$1(val$iterator){ this.val$iterator1 = val$iterator; } defineClass(1087, 204, $intern_3, Iterators$1); _.hasNext_0 = function hasNext_8(){ return this.val$iterator1.hasNext_0(); } ; _.next_1 = function next_9(){ return this.val$iterator1.next_1(); } ; var Lcom_google_common_collect_Iterators$1_2_classLit = createForClass('com.google.common.collect', 'Iterators/1', 1087); function Iterators$5(val$unfiltered, val$retainIfTrue){ this.val$unfiltered1 = val$unfiltered; this.val$retainIfTrue2 = val$retainIfTrue; } defineClass(1088, 713, $intern_3, Iterators$5); _.computeNext = function computeNext(){ var element; while (this.val$unfiltered1.hasNext_0()) { element = this.val$unfiltered1.next_1(); if (this.val$retainIfTrue2.apply_1(element)) { return element; } } return this.state = 2 , null; } ; var Lcom_google_common_collect_Iterators$5_2_classLit = createForClass('com.google.common.collect', 'Iterators/5', 1088); function TransformedIterator(backingIterator){ this.backingIterator = castTo(checkNotNull(backingIterator), 51); } defineClass(497, 1, $intern_6); _.forEachRemaining = function forEachRemaining_8(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_9(){ return this.backingIterator.hasNext_0(); } ; _.next_1 = function next_10(){ return this.transform_0(this.backingIterator.next_1()); } ; _.remove = function remove_30(){ this.backingIterator.remove(); } ; var Lcom_google_common_collect_TransformedIterator_2_classLit = createForClass('com.google.common.collect', 'TransformedIterator', 497); function Iterators$6($anonymous0, val$function){ this.val$function2 = val$function; TransformedIterator.call(this, $anonymous0); } defineClass(1089, 497, $intern_6, Iterators$6); _.transform_0 = function transform_3(from){ return this.val$function2.apply_0(from); } ; var Lcom_google_common_collect_Iterators$6_2_classLit = createForClass('com.google.common.collect', 'Iterators/6', 1089); function Iterators$9(val$value){ this.val$value1 = val$value; } defineClass(732, 204, $intern_3, Iterators$9); _.hasNext_0 = function hasNext_10(){ return !this.done_0; } ; _.next_1 = function next_11(){ if (this.done_0) { throw toJs(new NoSuchElementException); } this.done_0 = true; return this.val$value1; } ; _.done_0 = false; var Lcom_google_common_collect_Iterators$9_2_classLit = createForClass('com.google.common.collect', 'Iterators/9', 732); function $clinit_Iterators$ArrayItr(){ $clinit_Iterators$ArrayItr = emptyMethod; EMPTY_1 = new Iterators$ArrayItr(initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, 0, 5, 1)); } function Iterators$ArrayItr(array){ AbstractIndexedListIterator_0.call(this, 0, 0); this.array = array; this.offset = 0; } defineClass(1086, 399, $intern_4, Iterators$ArrayItr); _.get_0 = function get_24(index_0){ return this.array[this.offset + index_0]; } ; _.offset = 0; var EMPTY_1; var Lcom_google_common_collect_Iterators$ArrayItr_2_classLit = createForClass('com.google.common.collect', 'Iterators/ArrayItr', 1086); function $getTopMetaIterator(this$static){ while (!this$static.topMetaIterator || !this$static.topMetaIterator.hasNext_0()) { if (!!this$static.metaIterators && !$isEmpty(this$static.metaIterators)) { this$static.topMetaIterator = castTo($removeFirst(this$static.metaIterators), 51); } else { return null; } } return this$static.topMetaIterator; } function $hasNext_1(this$static){ var topConcat; while (!castTo(checkNotNull(this$static.iterator), 51).hasNext_0()) { this$static.topMetaIterator = $getTopMetaIterator(this$static); if (!this$static.topMetaIterator) { return false; } this$static.iterator = castTo(this$static.topMetaIterator.next_1(), 51); if (instanceOf(this$static.iterator, 38)) { topConcat = castTo(this$static.iterator, 38); this$static.iterator = topConcat.iterator; !this$static.metaIterators && (this$static.metaIterators = new ArrayDeque); $addFirst(this$static.metaIterators, this$static.topMetaIterator); if (topConcat.metaIterators) { while (!$isEmpty(topConcat.metaIterators)) { $addFirst(this$static.metaIterators, castTo($removeLast(topConcat.metaIterators), 51)); } } this$static.topMetaIterator = topConcat.topMetaIterator; } } return true; } function $next_0(this$static){ if ($hasNext_1(this$static)) { this$static.toRemove = this$static.iterator; return this$static.iterator.next_1(); } else { throw toJs(new NoSuchElementException); } } function Iterators$ConcatenatedIterator(metaIterator){ this.iterator = ($clinit_Iterators$ArrayItr() , EMPTY_1); this.topMetaIterator = castTo(checkNotNull(metaIterator), 51); } defineClass(38, 1, {38:1, 51:1}, Iterators$ConcatenatedIterator); _.forEachRemaining = function forEachRemaining_9(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_11(){ return $hasNext_1(this); } ; _.next_1 = function next_12(){ return $next_0(this); } ; _.remove = function remove_31(){ if (!this.toRemove) { throw toJs(new IllegalStateException_0('no calls to next() since the last call to remove()')); } this.toRemove.remove(); this.toRemove = null; } ; var Lcom_google_common_collect_Iterators$ConcatenatedIterator_2_classLit = createForClass('com.google.common.collect', 'Iterators/ConcatenatedIterator', 38); function $compareTo(this$static, other){ return this$static.ordinal - other.ordinal; } function $name(this$static){ return this$static.name_0 != null?this$static.name_0:'' + this$static.ordinal; } function $toString_3(this$static){ return this$static.name_0 != null?this$static.name_0:'' + this$static.ordinal; } function Enum(name_0, ordinal){ this.name_0 = name_0; this.ordinal = ordinal; } function createValueOfMap(enumConstants){ var result, value_0, value$array, value$index, value$max; result = {}; for (value$array = enumConstants , value$index = 0 , value$max = value$array.length; value$index < value$max; ++value$index) { value_0 = value$array[value$index]; result[':' + (value_0.name_0 != null?value_0.name_0:'' + 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: ' + name_0); return result; } function valueOf_0(enumType, name_0){ var enumValueOfFunc; enumValueOfFunc = (checkCriticalNotNull(enumType) , enumType).enumValueOfFunc; checkCriticalArgument(!!enumValueOfFunc); checkCriticalNotNull(name_0); return enumValueOfFunc(name_0); } defineClass(22, 1, {3:1, 34:1, 22:1}); _.compareTo_0 = function compareTo_3(other){ return $compareTo(this, castTo(other, 22)); } ; _.equals_0 = function equals_24(other){ return this === other; } ; _.hashCode_1 = function hashCode_26(){ return getObjectIdentityHashCode(this); } ; _.toString_0 = function toString_26(){ return $toString_3(this); } ; _.ordinal = 0; var Ljava_lang_Enum_2_classLit = createForClass('java.lang', 'Enum', 22); function $clinit_Iterators$EmptyModifiableIterator(){ $clinit_Iterators$EmptyModifiableIterator = emptyMethod; INSTANCE_2 = new Iterators$EmptyModifiableIterator; } function Iterators$EmptyModifiableIterator(){ Enum.call(this, 'INSTANCE', 0); } function valueOf_1(name_0){ $clinit_Iterators$EmptyModifiableIterator(); return valueOf(($clinit_Iterators$EmptyModifiableIterator$Map() , $MAP), name_0); } function values_12(){ $clinit_Iterators$EmptyModifiableIterator(); return stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_common_collect_Iterators$EmptyModifiableIterator_2_classLit, 1), $intern_37, 549, 0, [INSTANCE_2]); } defineClass(549, 22, {549:1, 3:1, 34:1, 22:1, 51:1}, Iterators$EmptyModifiableIterator); _.forEachRemaining = function forEachRemaining_10(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_12(){ return false; } ; _.next_1 = function next_13(){ throw toJs(new NoSuchElementException); } ; _.remove = function remove_32(){ checkState_0(false); } ; var INSTANCE_2; var Lcom_google_common_collect_Iterators$EmptyModifiableIterator_2_classLit = createForEnum('com.google.common.collect', 'Iterators/EmptyModifiableIterator', 549, Ljava_lang_Enum_2_classLit, values_12, valueOf_1); function $clinit_Iterators$EmptyModifiableIterator$Map(){ $clinit_Iterators$EmptyModifiableIterator$Map = emptyMethod; $MAP = createValueOfMap(($clinit_Iterators$EmptyModifiableIterator() , stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_common_collect_Iterators$EmptyModifiableIterator_2_classLit, 1), $intern_37, 549, 0, [INSTANCE_2]))); } var $MAP; function LinkedHashMultimapGwtSerializationDependencies(map_0){ AbstractSetMultimap.call(this, map_0); } defineClass(1907, 627, $intern_5); var Lcom_google_common_collect_LinkedHashMultimapGwtSerializationDependencies_2_classLit = createForClass('com.google.common.collect', 'LinkedHashMultimapGwtSerializationDependencies', 1907); function LinkedHashMultimap(){ LinkedHashMultimapGwtSerializationDependencies.call(this, new LinkedHashMap_0(capacity_0(16))); checkNonnegative(2, 'expectedValuesPerKey'); this.valueSetCapacity = 2; this.multimapHeaderEntry = new LinkedHashMultimap$ValueEntry(null, null, 0, null); succeedsInMultimap(this.multimapHeaderEntry, this.multimapHeaderEntry); } function succeedsInMultimap(pred, succ){ pred.successorInMultimap = succ; succ.predecessorInMultimap = pred; } function succeedsInValueSet(pred, succ){ pred.setSuccessorInValueSet(succ); succ.setPredecessorInValueSet(pred); } defineClass(1908, 1907, $intern_5, LinkedHashMultimap); _.createCollection = function createCollection_7(){ return new LinkedHashSet_0(capacity_0(this.valueSetCapacity)); } ; _.clear_0 = function clear_21(){ $clear(this); succeedsInMultimap(this.multimapHeaderEntry, this.multimapHeaderEntry); } ; _.createCollection_1 = function createCollection_8(){ return new LinkedHashSet_0(capacity_0(this.valueSetCapacity)); } ; _.createCollection_0 = function createCollection_9(key){ return new LinkedHashMultimap$ValueSet(this, key, this.valueSetCapacity); } ; _.entryIterator = function entryIterator_4(){ return new LinkedHashMultimap$1(this); } ; _.entrySpliterator = function entrySpliterator_3(){ var result; return new Spliterators$IteratorSpliterator((result = this.entries_0 , castTo(!result?(this.entries_0 = new AbstractMultimap$EntrySet(this)):result, 21)), 17); } ; _.keySet_0 = function keySet_13(){ var result; return result = this.keySet , !result?(this.keySet = new AbstractMapBasedMultimap$KeySet(this, this.map_0)):result; } ; _.valueIterator_0 = function valueIterator_0(){ return new Maps$2(new LinkedHashMultimap$1(this)); } ; _.valueSpliterator = function valueSpliterator_0(){ var result; return map_2(new Spliterators$IteratorSpliterator((result = this.entries_0 , castTo(!result?(this.entries_0 = new AbstractMultimap$EntrySet(this)):result, 21)), 17), new LinkedHashMultimap$0methodref$getValue$Type); } ; _.valueSetCapacity = 2; var Lcom_google_common_collect_LinkedHashMultimap_2_classLit = createForClass('com.google.common.collect', 'LinkedHashMultimap', 1908); function LinkedHashMultimap$0methodref$getValue$Type(){ } defineClass(1911, 1, {}, LinkedHashMultimap$0methodref$getValue$Type); _.apply_0 = function apply_13(arg0){ return castTo(arg0, 44).getValue(); } ; var Lcom_google_common_collect_LinkedHashMultimap$0methodref$getValue$Type_2_classLit = createForClass('com.google.common.collect', 'LinkedHashMultimap/0methodref$getValue$Type', 1911); function $next_1(this$static){ var result; if (this$static.nextEntry == this$static.this$01.multimapHeaderEntry) { throw toJs(new NoSuchElementException); } result = this$static.nextEntry; this$static.toRemove = result; this$static.nextEntry = castTo(requireNonNull(this$static.nextEntry.successorInMultimap), 227); return result; } function LinkedHashMultimap$1(this$0){ this.this$01 = this$0; this.nextEntry = castTo(requireNonNull(this.this$01.multimapHeaderEntry.successorInMultimap), 227); } defineClass(834, 1, $intern_6, LinkedHashMultimap$1); _.forEachRemaining = function forEachRemaining_11(consumer){ $forEachRemaining(this, consumer); } ; _.next_1 = function next_14(){ return $next_1(this); } ; _.hasNext_0 = function hasNext_13(){ return this.nextEntry != this.this$01.multimapHeaderEntry; } ; _.remove = function remove_33(){ checkState_0(!!this.toRemove); $remove_0(this.this$01, this.toRemove.key, this.toRemove.value_0); this.toRemove = null; } ; var Lcom_google_common_collect_LinkedHashMultimap$1_2_classLit = createForClass('com.google.common.collect', 'LinkedHashMultimap/1', 834); function LinkedHashMultimap$ValueEntry(key, value_0, smearedValueHash, nextInValueBucket){ ImmutableEntry.call(this, key, value_0); this.smearedValueHash = smearedValueHash; this.nextInValueBucket = nextInValueBucket; } defineClass(227, 246, {358:1, 246:1, 227:1, 604:1, 3:1, 44:1}, LinkedHashMultimap$ValueEntry); _.getSuccessorInValueSet = function getSuccessorInValueSet(){ return castTo(requireNonNull(this.successorInValueSet), 604); } ; _.setPredecessorInValueSet = function setPredecessorInValueSet(entry){ this.predecessorInValueSet = entry; } ; _.setSuccessorInValueSet = function setSuccessorInValueSet(entry){ this.successorInValueSet = entry; } ; _.smearedValueHash = 0; var Lcom_google_common_collect_LinkedHashMultimap$ValueEntry_2_classLit = createForClass('com.google.common.collect', 'LinkedHashMultimap/ValueEntry', 227); function $rehashIfNecessary_0(this$static){ var bucket, entry, hashTable, mask, valueEntry; if (needsResizing(this$static.size_0, this$static.hashTable.length)) { hashTable = initUnidimensionalArray(Lcom_google_common_collect_LinkedHashMultimap$ValueEntry_2_classLit, $intern_34, 227, this$static.hashTable.length * 2, 0, 1); this$static.hashTable = hashTable; mask = hashTable.length - 1; for (entry = this$static.firstEntry; entry != this$static; entry = entry.getSuccessorInValueSet()) { valueEntry = castTo(entry, 227); bucket = valueEntry.smearedValueHash & mask; valueEntry.nextInValueBucket = hashTable[bucket]; hashTable[bucket] = valueEntry; } } } function $remove_3(this$static, o){ var bucket, entry, prev, smearedHash; smearedHash = toInt_0(mul_0($intern_32, rotateLeft(toInt_0(mul_0(o == null?0:hashCode__I__devirtual$(o), $intern_33)), 15))); bucket = smearedHash & this$static.hashTable.length - 1; prev = null; for (entry = this$static.hashTable[bucket]; entry; prev = entry , entry = entry.nextInValueBucket) { if (entry.smearedValueHash == smearedHash && equal(entry.value_0, o)) { !prev?(this$static.hashTable[bucket] = entry.nextInValueBucket):(prev.nextInValueBucket = entry.nextInValueBucket); succeedsInValueSet(castTo(requireNonNull(entry.predecessorInValueSet), 604), castTo(requireNonNull(entry.successorInValueSet), 604)); succeedsInMultimap(castTo(requireNonNull(entry.predecessorInMultimap), 227), castTo(requireNonNull(entry.successorInMultimap), 227)); --this$static.size_0; ++this$static.modCount; return true; } } return false; } function LinkedHashMultimap$ValueSet(this$0, key, expectedValues){ var hashTable, tableSize; this.this$01 = this$0; this.key = key; this.firstEntry = this; this.lastEntry = this; tableSize = closedTableSize(expectedValues); hashTable = initUnidimensionalArray(Lcom_google_common_collect_LinkedHashMultimap$ValueEntry_2_classLit, $intern_34, 227, tableSize, 0, 1); this.hashTable = hashTable; } defineClass(1909, 2068, {604:1, 20:1, 31:1, 16:1, 21:1}, LinkedHashMultimap$ValueSet); _.add_2 = function add_10(value_0){ var bucket, entry, newEntry, rowHead, smearedHash; smearedHash = toInt_0(mul_0($intern_32, rotateLeft(toInt_0(mul_0(value_0 == null?0:hashCode__I__devirtual$(value_0), $intern_33)), 15))); bucket = smearedHash & this.hashTable.length - 1; rowHead = this.hashTable[bucket]; for (entry = rowHead; entry; entry = entry.nextInValueBucket) { if (entry.smearedValueHash == smearedHash && equal(entry.value_0, value_0)) { return false; } } newEntry = new LinkedHashMultimap$ValueEntry(this.key, value_0, smearedHash, rowHead); succeedsInValueSet(this.lastEntry, newEntry); newEntry.successorInValueSet = this; this.lastEntry = newEntry; succeedsInMultimap(castTo(requireNonNull(this.this$01.multimapHeaderEntry.predecessorInMultimap), 227), newEntry); succeedsInMultimap(newEntry, this.this$01.multimapHeaderEntry); this.hashTable[bucket] = newEntry; ++this.size_0; ++this.modCount; $rehashIfNecessary_0(this); return true; } ; _.clear_0 = function clear_22(){ var entry, valueEntry; fill_2(this.hashTable, null); this.size_0 = 0; for (entry = this.firstEntry; entry != this; entry = entry.getSuccessorInValueSet()) { valueEntry = castTo(entry, 227); succeedsInMultimap(castTo(requireNonNull(valueEntry.predecessorInMultimap), 227), castTo(requireNonNull(valueEntry.successorInMultimap), 227)); } this.firstEntry = this; this.lastEntry = this; ++this.modCount; } ; _.contains = function contains_20(o){ var entry, smearedHash; smearedHash = toInt_0(mul_0($intern_32, rotateLeft(toInt_0(mul_0(o == null?0:hashCode__I__devirtual$(o), $intern_33)), 15))); for (entry = this.hashTable[smearedHash & this.hashTable.length - 1]; entry; entry = entry.nextInValueBucket) { if (entry.smearedValueHash == smearedHash && equal(entry.value_0, o)) { return true; } } return false; } ; _.forEach_0 = function forEach_12(action){ var entry; checkNotNull(action); for (entry = this.firstEntry; entry != this; entry = entry.getSuccessorInValueSet()) { action.accept(castTo(entry, 227).value_0); } } ; _.getSuccessorInValueSet = function getSuccessorInValueSet_0(){ return this.firstEntry; } ; _.iterator_0 = function iterator_32(){ return new LinkedHashMultimap$ValueSet$1(this); } ; _.remove_1 = function remove_34(o){ return $remove_3(this, o); } ; _.setPredecessorInValueSet = function setPredecessorInValueSet_0(entry){ this.lastEntry = entry; } ; _.setSuccessorInValueSet = function setSuccessorInValueSet_0(entry){ this.firstEntry = entry; } ; _.size_1 = function size_25(){ return this.size_0; } ; _.modCount = 0; _.size_0 = 0; var Lcom_google_common_collect_LinkedHashMultimap$ValueSet_2_classLit = createForClass('com.google.common.collect', 'LinkedHashMultimap/ValueSet', 1909); function $checkForComodification(this$static){ if (this$static.this$11.modCount != this$static.expectedModCount) { throw toJs(new ConcurrentModificationException); } } function LinkedHashMultimap$ValueSet$1(this$1){ this.this$11 = this$1; this.nextEntry = this.this$11.firstEntry; this.expectedModCount = this.this$11.modCount; } defineClass(1910, 1, $intern_6, LinkedHashMultimap$ValueSet$1); _.forEachRemaining = function forEachRemaining_12(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_14(){ return $checkForComodification(this) , this.nextEntry != this.this$11; } ; _.next_1 = function next_15(){ var entry, result; $checkForComodification(this); if (this.nextEntry == this.this$11) { throw toJs(new NoSuchElementException); } entry = castTo(this.nextEntry, 227); result = entry.value_0; this.toRemove = entry; this.nextEntry = castTo(requireNonNull(entry.successorInValueSet), 604); return result; } ; _.remove = function remove_35(){ $checkForComodification(this); checkState_0(!!this.toRemove); $remove_3(this.this$11, this.toRemove.value_0); this.expectedModCount = this.this$11.modCount; this.toRemove = null; } ; _.expectedModCount = 0; var Lcom_google_common_collect_LinkedHashMultimap$ValueSet$1_2_classLit = createForClass('com.google.common.collect', 'LinkedHashMultimap/ValueSet/1', 1910); function $addNode(this$static, key, value_0, nextSibling){ var keyList, keyTail, node; node = new LinkedListMultimap$Node(key, value_0); if (!this$static.head) { this$static.head = this$static.tail = node; $put_6(this$static.keyToKeyList, key, new LinkedListMultimap$KeyList(node)); ++this$static.modCount; } else if (!nextSibling) { castTo(requireNonNull(this$static.tail), 511).next_0 = node; node.previous = this$static.tail; this$static.tail = node; keyList = castTo($get_10(this$static.keyToKeyList, key), 260); if (!keyList) { $put_6(this$static.keyToKeyList, key, keyList = new LinkedListMultimap$KeyList(node)); ++this$static.modCount; } else { ++keyList.count; keyTail = keyList.tail; keyTail.nextSibling = node; node.previousSibling = keyTail; keyList.tail = node; } } else { keyList = castTo(requireNonNull(castTo($get_10(this$static.keyToKeyList, key), 260)), 260); ++keyList.count; node.previous = nextSibling.previous; node.previousSibling = nextSibling.previousSibling; node.next_0 = nextSibling; node.nextSibling = nextSibling; !nextSibling.previousSibling?(keyList.head = node):(nextSibling.previousSibling.nextSibling = node); !nextSibling.previous?(this$static.head = node):(nextSibling.previous.next_0 = node); nextSibling.previous = node; nextSibling.previousSibling = node; } ++this$static.size_0; return node; } function $clear_3(this$static){ this$static.head = null; this$static.tail = null; $reset(this$static.keyToKeyList); this$static.size_0 = 0; ++this$static.modCount; } function $containsKey_1(this$static, key){ return $containsKey_3(this$static.keyToKeyList, key); } function $removeAll_2(this$static, key){ var castKey, oldValues; castKey = key; oldValues = unmodifiableList(newArrayList_0(new LinkedListMultimap$ValueForKeyIterator(this$static, castKey))); clear_20(new LinkedListMultimap$ValueForKeyIterator(this$static, castKey)); return oldValues; } function $removeNode(this$static, node){ var keyList; node.previous?(node.previous.next_0 = node.next_0):(this$static.head = node.next_0); node.next_0?(node.next_0.previous = node.previous):(this$static.tail = node.previous); if (!node.previousSibling && !node.nextSibling) { keyList = castTo(requireNonNull(castTo($remove_6(this$static.keyToKeyList, node.key), 260)), 260); keyList.count = 0; ++this$static.modCount; } else { keyList = castTo(requireNonNull(castTo($get_10(this$static.keyToKeyList, node.key), 260)), 260); --keyList.count; !node.previousSibling?(keyList.head = castTo(requireNonNull(node.nextSibling), 511)):(node.previousSibling.nextSibling = node.nextSibling); !node.nextSibling?(keyList.tail = castTo(requireNonNull(node.previousSibling), 511)):(node.nextSibling.previousSibling = node.previousSibling); } --this$static.size_0; } function LinkedListMultimap(){ this.keyToKeyList = new HashMap_0(capacity_0(12)); } defineClass(780, 2084, $intern_5, LinkedListMultimap); _.asMap_0 = function asMap_4(){ var result; return result = this.asMap , !result?(this.asMap = new Multimaps$AsMap(this)):result; } ; _.equals_0 = function equals_25(object){ return equalsImpl_1(this, object); } ; _.get_1 = function get_25(key){ return new LinkedListMultimap$1(this, key); } ; _.removeAll = function removeAll_6(key){ return $removeAll_2(this, key); } ; _.clear_0 = function clear_23(){ $clear_3(this); } ; _.containsKey = function containsKey_7(key){ return $containsKey_1(this, key); } ; _.createAsMap = function createAsMap_0(){ return new Multimaps$AsMap(this); } ; _.createKeySet = function createKeySet_8(){ return new LinkedListMultimap$1KeySetImpl(this); } ; _.get_2 = function get_26(key){ return new LinkedListMultimap$1(this, key); } ; _.isEmpty = function isEmpty_14(){ return !this.head; } ; _.removeAll_0 = function removeAll_7(key){ return $removeAll_2(this, key); } ; _.size_1 = function size_26(){ return this.size_0; } ; _.modCount = 0; _.size_0 = 0; var Lcom_google_common_collect_LinkedListMultimap_2_classLit = createForClass('com.google.common.collect', 'LinkedListMultimap', 780); function $equals_2(this$static, o){ var elem, elem$iterator, elemOther, iterOther, other; if (maskUndefined(o) === maskUndefined(this$static)) { return true; } if (!instanceOf(o, 15)) { return false; } other = castTo(o, 15); if (this$static.size_1() != other.size_1()) { return false; } iterOther = other.iterator_0(); for (elem$iterator = this$static.iterator_0(); 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; } function $indexOf(this$static, toFind){ var i, n; for (i = 0 , n = this$static.size_1(); i < n; ++i) { if (equals_57(toFind, this$static.get_0(i))) { return i; } } return -1; } defineClass(56, 31, $intern_38); _.sort_0 = function sort_2(c){ $sort_0(this, c); } ; _.spliterator_0 = function spliterator_23(){ return new Spliterators$IteratorSpliterator(this, 16); } ; _.add_3 = function add_11(index_0, element){ throw toJs(new UnsupportedOperationException_0('Add not supported on this list')); } ; _.add_2 = function add_12(obj){ this.add_3(this.size_1(), obj); return true; } ; _.addAll_0 = function addAll_8(index_0, c){ var changed, e, e$iterator; checkCriticalNotNull(c); changed = false; for (e$iterator = c.iterator_0(); e$iterator.hasNext_0();) { e = e$iterator.next_1(); this.add_3(index_0++, e); changed = true; } return changed; } ; _.clear_0 = function clear_24(){ this.removeRange(0, this.size_1()); } ; _.equals_0 = function equals_26(o){ return $equals_2(this, o); } ; _.hashCode_1 = function hashCode_27(){ return hashCode_49(this); } ; _.indexOf_0 = function indexOf_3(toFind){ return $indexOf(this, toFind); } ; _.iterator_0 = function iterator_33(){ return new AbstractList$IteratorImpl(this); } ; _.listIterator_0 = function listIterator_4(){ return this.listIterator_1(0); } ; _.listIterator_1 = function listIterator_5(from){ return new AbstractList$ListIteratorImpl(this, from); } ; _.remove_2 = function remove_36(index_0){ throw toJs(new UnsupportedOperationException_0('Remove not supported on this list')); } ; _.removeRange = function removeRange(fromIndex, endIndex){ var i, iter; iter = this.listIterator_1(fromIndex); for (i = fromIndex; i < endIndex; ++i) { iter.next_1(); iter.remove(); } } ; _.set_2 = function set_5(index_0, o){ throw toJs(new UnsupportedOperationException_0('Set not supported on this list')); } ; _.subList = function subList_5(fromIndex, toIndex){ return new AbstractList$SubList(this, fromIndex, toIndex); } ; _.modCount = 0; var Ljava_util_AbstractList_2_classLit = createForClass('java.util', 'AbstractList', 56); function $add_0(this$static, index_0, element){ var iter; iter = this$static.listIterator_1(index_0); iter.add_1(element); } function $addAll_0(this$static, index_0, c){ var e, e$iterator, iter, modified; checkCriticalNotNull(c); modified = false; iter = this$static.listIterator_1(index_0); for (e$iterator = c.iterator_0(); e$iterator.hasNext_0();) { e = e$iterator.next_1(); iter.add_1(e); modified = true; } return modified; } function $get_7(this$static, index_0){ var iter; iter = this$static.listIterator_1(index_0); try { return iter.next_1(); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 112)) { throw toJs(new IndexOutOfBoundsException_0("Can't get element " + index_0)); } else throw toJs($e0); } } function $remove_4(this$static, index_0){ var iter, old; iter = this$static.listIterator_1(index_0); try { old = iter.next_1(); iter.remove(); return old; } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 112)) { throw toJs(new IndexOutOfBoundsException_0("Can't remove element " + index_0)); } else throw toJs($e0); } } defineClass(2062, 56, $intern_38); _.add_3 = function add_13(index_0, element){ $add_0(this, index_0, element); } ; _.addAll_0 = function addAll_9(index_0, c){ return $addAll_0(this, index_0, c); } ; _.get_0 = function get_27(index_0){ return $get_7(this, index_0); } ; _.iterator_0 = function iterator_34(){ return this.listIterator_1(0); } ; _.remove_2 = function remove_37(index_0){ return $remove_4(this, index_0); } ; _.set_2 = function set_6(index_0, element){ var iter, old; iter = this.listIterator_1(index_0); try { old = iter.next_1(); iter.set_1(element); return old; } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 112)) { throw toJs(new IndexOutOfBoundsException_0("Can't set element " + index_0)); } else throw toJs($e0); } } ; var Ljava_util_AbstractSequentialList_2_classLit = createForClass('java.util', 'AbstractSequentialList', 2062); function $listIterator_0(this$static, index_0){ return new LinkedListMultimap$ValueForKeyIterator_0(this$static.this$01, this$static.val$key2, index_0); } function LinkedListMultimap$1(this$0, val$key){ this.this$01 = this$0; this.val$key2 = val$key; } defineClass(646, 2062, $intern_38, LinkedListMultimap$1); _.listIterator_1 = function listIterator_6(index_0){ return $listIterator_0(this, index_0); } ; _.size_1 = function size_27(){ var keyList; keyList = castTo($get_10(this.this$01.keyToKeyList, this.val$key2), 260); return !keyList?0:keyList.count; } ; var Lcom_google_common_collect_LinkedListMultimap$1_2_classLit = createForClass('com.google.common.collect', 'LinkedListMultimap/1', 646); function LinkedListMultimap$1KeySetImpl(this$0){ this.this$01 = this$0; } defineClass(1316, 2068, $intern_10, LinkedListMultimap$1KeySetImpl); _.contains = function contains_21(key){ return $containsKey_1(this.this$01, key); } ; _.iterator_0 = function iterator_35(){ return new LinkedListMultimap$DistinctKeyIterator(this.this$01); } ; _.remove_1 = function remove_38(o){ return !$removeAll_2(this.this$01, o).list.isEmpty(); } ; _.size_1 = function size_28(){ return $size_2(this.this$01.keyToKeyList); } ; var Lcom_google_common_collect_LinkedListMultimap$1KeySetImpl_2_classLit = createForClass('com.google.common.collect', 'LinkedListMultimap/1KeySetImpl', 1316); function $checkForConcurrentModification(this$static){ if (this$static.this$01.modCount != this$static.expectedModCount) { throw toJs(new ConcurrentModificationException); } } function LinkedListMultimap$DistinctKeyIterator(this$0){ this.this$01 = this$0; this.seenKeys = new HashSet_0(capacity_0($keySet(this.this$01).size_1())); this.next_0 = this.this$01.head; this.expectedModCount = this.this$01.modCount; } defineClass(1315, 1, $intern_6, LinkedListMultimap$DistinctKeyIterator); _.forEachRemaining = function forEachRemaining_13(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_15(){ $checkForConcurrentModification(this); return !!this.next_0; } ; _.next_1 = function next_16(){ $checkForConcurrentModification(this); if (!this.next_0) { throw toJs(new NoSuchElementException); } this.current = this.next_0; $add_6(this.seenKeys, this.current.key); do { this.next_0 = this.next_0.next_0; } while (!!this.next_0 && !$add_6(this.seenKeys, this.next_0.key)); return this.current.key; } ; _.remove = function remove_39(){ $checkForConcurrentModification(this); checkState_0(!!this.current); clear_20(new LinkedListMultimap$ValueForKeyIterator(this.this$01, this.current.key)); this.current = null; this.expectedModCount = this.this$01.modCount; } ; _.expectedModCount = 0; var Lcom_google_common_collect_LinkedListMultimap$DistinctKeyIterator_2_classLit = createForClass('com.google.common.collect', 'LinkedListMultimap/DistinctKeyIterator', 1315); function LinkedListMultimap$KeyList(firstNode){ this.head = firstNode; this.tail = firstNode; firstNode.previousSibling = null; firstNode.nextSibling = null; this.count = 1; } defineClass(260, 1, {260:1}, LinkedListMultimap$KeyList); _.count = 0; var Lcom_google_common_collect_LinkedListMultimap$KeyList_2_classLit = createForClass('com.google.common.collect', 'LinkedListMultimap/KeyList', 260); function LinkedListMultimap$Node(key, value_0){ this.key = key; this.value_0 = value_0; } defineClass(511, 358, {358:1, 511:1, 44:1}, LinkedListMultimap$Node); _.getKey = function getKey_3(){ return this.key; } ; _.getValue = function getValue_5(){ return this.value_0; } ; _.setValue = function setValue_6(newValue){ var result; result = this.value_0; this.value_0 = newValue; return result; } ; var Lcom_google_common_collect_LinkedListMultimap$Node_2_classLit = createForClass('com.google.common.collect', 'LinkedListMultimap/Node', 511); function $next_2(this$static){ if (!this$static.next_0) { throw toJs(new NoSuchElementException); } this$static.previous = this$static.current = this$static.next_0; this$static.next_0 = this$static.next_0.nextSibling; ++this$static.nextIndex; return this$static.current.value_0; } function $previous(this$static){ if (!this$static.previous) { throw toJs(new NoSuchElementException); } this$static.next_0 = this$static.current = this$static.previous; this$static.previous = this$static.previous.previousSibling; --this$static.nextIndex; return this$static.current.value_0; } function LinkedListMultimap$ValueForKeyIterator(this$0, key){ var keyList; this.this$01 = this$0; this.key = key; keyList = castTo($get_10(this$0.keyToKeyList, key), 260); this.next_0 = !keyList?null:keyList.head; } function LinkedListMultimap$ValueForKeyIterator_0(this$0, key, index_0){ var keyList, size_0; this.this$01 = this$0; keyList = castTo($get_10(this$0.keyToKeyList, key), 260); size_0 = !keyList?0:keyList.count; checkPositionIndex(index_0, size_0); if (index_0 >= (size_0 / 2 | 0)) { this.previous = !keyList?null:keyList.tail; this.nextIndex = size_0; while (index_0++ < size_0) { $previous(this); } } else { this.next_0 = !keyList?null:keyList.head; while (index_0-- > 0) { $next_2(this); } } this.key = key; this.current = null; } defineClass(566, 1, $intern_14, LinkedListMultimap$ValueForKeyIterator, LinkedListMultimap$ValueForKeyIterator_0); _.forEachRemaining = function forEachRemaining_14(consumer){ $forEachRemaining(this, consumer); } ; _.add_1 = function add_14(value_0){ this.previous = $addNode(this.this$01, this.key, value_0, this.next_0); ++this.nextIndex; this.current = null; } ; _.hasNext_0 = function hasNext_16(){ return !!this.next_0; } ; _.hasPrevious = function hasPrevious_1(){ return !!this.previous; } ; _.next_1 = function next_17(){ return $next_2(this); } ; _.nextIndex_0 = function nextIndex_2(){ return this.nextIndex; } ; _.previous_0 = function previous_2(){ return $previous(this); } ; _.previousIndex = function previousIndex_1(){ return this.nextIndex - 1; } ; _.remove = function remove_40(){ checkState_0(!!this.current); if (this.current != this.next_0) { this.previous = this.current.previousSibling; --this.nextIndex; } else { this.next_0 = this.current.nextSibling; } $removeNode(this.this$01, this.current); this.current = null; } ; _.set_1 = function set_7(value_0){ checkState(!!this.current); this.current.value_0 = value_0; } ; _.nextIndex = 0; var Lcom_google_common_collect_LinkedListMultimap$ValueForKeyIterator_2_classLit = createForClass('com.google.common.collect', 'LinkedListMultimap/ValueForKeyIterator', 566); function computeArrayListCapacity(arraySize){ checkNonnegative(arraySize, 'arraySize'); return saturatedCast(add_20(add_20(5, arraySize), arraySize / 10 | 0)); } function equalsImpl(thisList, other){ var i, otherList, size_0; if (maskUndefined(other) === maskUndefined(checkNotNull(thisList))) { return true; } if (!instanceOf(other, 15)) { return false; } otherList = castTo(other, 15); size_0 = thisList.size_1(); if (size_0 != otherList.size_1()) { return false; } if (instanceOf(otherList, 59)) { for (i = 0; i < size_0; i++) { if (!equal(thisList.get_0(i), otherList.get_0(i))) { return false; } } return true; } else { return elementsEqual(thisList.iterator_0(), otherList.iterator_0()); } } function hashCodeImpl(list){ var hashCode, o, o$iterator; hashCode = 1; for (o$iterator = list.iterator_0(); o$iterator.hasNext_0();) { o = o$iterator.next_1(); hashCode = 31 * hashCode + (o == null?0:hashCode__I__devirtual$(o)); hashCode = ~~hashCode; } return hashCode; } function indexOfRandomAccess(list, element){ var i, size_0; size_0 = list.size_1(); if (element == null) { for (i = 0; i < size_0; i++) { if (list.get_0(i) == null) { return i; } } } else { for (i = 0; i < size_0; i++) { if (equals_Ljava_lang_Object__Z__devirtual$(element, list.get_0(i))) { return i; } } } return -1; } function newArrayList(elements){ checkNotNull(elements); return instanceOf(elements, 16)?new ArrayList_1(castTo(elements, 16)):newArrayList_0(elements.iterator_0()); } function newArrayList_0(elements){ var list; list = new ArrayList; addAll_7(list, elements); return list; } function newArrayList_1(elements){ var capacity, list; checkNotNull(elements); capacity = computeArrayListCapacity(elements.length); list = new ArrayList_0(capacity); addAll_15(list, elements); return list; } function newArrayListWithCapacity(initialArraySize){ checkNonnegative(initialArraySize, 'initialArraySize'); return new ArrayList_0(initialArraySize); } function newArrayListWithExpectedSize(estimatedSize){ return new ArrayList_0((checkNonnegative(estimatedSize, 'arraySize') , saturatedCast(add_20(add_20(5, estimatedSize), estimatedSize / 10 | 0)))); } function newLinkedList(elements){ var list; list = new LinkedList; addAll_6(list, elements); return list; } function reverse_0(list){ var result, reversed; if (instanceOf(list, 307)) { reversed = $reverse(castTo(list, 307)); result = reversed; return result; } else return instanceOf(list, 441)?castTo(list, 441).forwardList:instanceOf(list, 59)?new Lists$RandomAccessReverseList(list):new Lists$ReverseList(list); } defineClass(1031, 56, $intern_38); _.add_3 = function add_15(index_0, element){ this.backingList.add_3(index_0, element); } ; _.addAll_0 = function addAll_10(index_0, c){ return this.backingList.addAll_0(index_0, c); } ; _.contains = function contains_22(o){ return this.backingList.contains(o); } ; _.get_0 = function get_28(index_0){ return this.backingList.get_0(index_0); } ; _.remove_2 = function remove_41(index_0){ return this.backingList.remove_2(index_0); } ; _.set_2 = function set_8(index_0, element){ return this.backingList.set_2(index_0, element); } ; _.size_1 = function size_29(){ return this.backingList.size_1(); } ; var Lcom_google_common_collect_Lists$AbstractListWrapper_2_classLit = createForClass('com.google.common.collect', 'Lists/AbstractListWrapper', 1031); defineClass(1032, 1031, $intern_39); var Lcom_google_common_collect_Lists$RandomAccessListWrapper_2_classLit = createForClass('com.google.common.collect', 'Lists/RandomAccessListWrapper', 1032); function Lists$1($anonymous0){ this.backingList = castTo(checkNotNull($anonymous0), 15); } defineClass(1034, 1032, $intern_39, Lists$1); _.listIterator_1 = function listIterator_7(index_0){ return this.backingList.listIterator_1(index_0); } ; var Lcom_google_common_collect_Lists$1_2_classLit = createForClass('com.google.common.collect', 'Lists/1', 1034); function $listIterator_1(this$static, index_0){ var forwardIterator, start_0; start_0 = $reversePosition(this$static, index_0); forwardIterator = this$static.forwardList.listIterator_1(start_0); return new Lists$ReverseList$1(this$static, forwardIterator); } function $reverseIndex(this$static, index_0){ var size_0; size_0 = this$static.forwardList.size_1(); checkElementIndex(index_0, size_0); return size_0 - 1 - index_0; } function $reversePosition(this$static, index_0){ var size_0; size_0 = this$static.forwardList.size_1(); checkPositionIndex(index_0, size_0); return size_0 - index_0; } function Lists$ReverseList(forwardList){ this.forwardList = castTo(checkNotNull(forwardList), 15); } defineClass(441, 56, {441:1, 20:1, 31:1, 56:1, 16:1, 15:1}, Lists$ReverseList); _.add_3 = function add_16(index_0, element){ this.forwardList.add_3($reversePosition(this, index_0), element); } ; _.clear_0 = function clear_25(){ this.forwardList.clear_0(); } ; _.get_0 = function get_29(index_0){ return this.forwardList.get_0($reverseIndex(this, index_0)); } ; _.iterator_0 = function iterator_36(){ return $listIterator_1(this, 0); } ; _.listIterator_1 = function listIterator_8(index_0){ return $listIterator_1(this, index_0); } ; _.remove_2 = function remove_42(index_0){ return this.forwardList.remove_2($reverseIndex(this, index_0)); } ; _.removeRange = function removeRange_0(fromIndex, toIndex){ (checkPositionIndexes(fromIndex, toIndex, this.forwardList.size_1()) , reverse_0(this.forwardList.subList($reversePosition(this, toIndex), $reversePosition(this, fromIndex)))).clear_0(); } ; _.set_2 = function set_9(index_0, element){ return this.forwardList.set_2($reverseIndex(this, index_0), element); } ; _.size_1 = function size_30(){ return this.forwardList.size_1(); } ; _.subList = function subList_6(fromIndex, toIndex){ return checkPositionIndexes(fromIndex, toIndex, this.forwardList.size_1()) , reverse_0(this.forwardList.subList($reversePosition(this, toIndex), $reversePosition(this, fromIndex))); } ; var Lcom_google_common_collect_Lists$ReverseList_2_classLit = createForClass('com.google.common.collect', 'Lists/ReverseList', 441); function Lists$RandomAccessReverseList(forwardList){ Lists$ReverseList.call(this, forwardList); } defineClass(1030, 441, {441:1, 20:1, 31:1, 56:1, 16:1, 15:1, 59:1}, Lists$RandomAccessReverseList); var Lcom_google_common_collect_Lists$RandomAccessReverseList_2_classLit = createForClass('com.google.common.collect', 'Lists/RandomAccessReverseList', 1030); function Lists$ReverseList$1(this$1, val$forwardIterator){ this.this$11 = this$1; this.val$forwardIterator2 = val$forwardIterator; } defineClass(1033, 1, $intern_14, Lists$ReverseList$1); _.forEachRemaining = function forEachRemaining_15(consumer){ $forEachRemaining(this, consumer); } ; _.add_1 = function add_17(e){ this.val$forwardIterator2.add_1(e); this.val$forwardIterator2.previous_0(); this.canRemoveOrSet = false; } ; _.hasNext_0 = function hasNext_17(){ return this.val$forwardIterator2.hasPrevious(); } ; _.hasPrevious = function hasPrevious_2(){ return this.val$forwardIterator2.hasNext_0(); } ; _.next_1 = function next_18(){ if (!this.val$forwardIterator2.hasPrevious()) { throw toJs(new NoSuchElementException); } this.canRemoveOrSet = true; return this.val$forwardIterator2.previous_0(); } ; _.nextIndex_0 = function nextIndex_3(){ return $reversePosition(this.this$11, this.val$forwardIterator2.nextIndex_0()); } ; _.previous_0 = function previous_3(){ if (!this.val$forwardIterator2.hasNext_0()) { throw toJs(new NoSuchElementException); } this.canRemoveOrSet = true; return this.val$forwardIterator2.next_1(); } ; _.previousIndex = function previousIndex_2(){ return $reversePosition(this.this$11, this.val$forwardIterator2.nextIndex_0()) - 1; } ; _.remove = function remove_43(){ checkState_0(this.canRemoveOrSet); this.val$forwardIterator2.remove(); this.canRemoveOrSet = false; } ; _.set_1 = function set_10(e){ checkState(this.canRemoveOrSet); this.val$forwardIterator2.set_1(e); } ; _.canRemoveOrSet = false; var Lcom_google_common_collect_Lists$ReverseList$1_2_classLit = createForClass('com.google.common.collect', 'Lists/ReverseList/1', 1033); function asMapEntryIterator(set_0, function_0){ return new Maps$3(set_0.iterator_0(), function_0); } function capacity_0(expectedSize){ if (expectedSize < 3) { checkNonnegative(expectedSize, 'expectedSize'); return expectedSize + 1; } if (expectedSize < $intern_36) { return round_int(expectedSize / 0.75 + 1); } return $intern_0; } function equalsImpl_0(map_0, object){ var o; if (map_0 === object) { return true; } else if (instanceOf(object, 85)) { o = castTo(object, 85); return equalsImpl_3($entrySet_1(map_0), o.entrySet_0()); } return false; } function indexMap(list){ var builder, e, e$iterator, i; builder = new ImmutableMap$Builder(list.delegateList_0().size_1()); i = 0; for (e$iterator = unmodifiableIterator(list.delegateList_0().iterator_0()); e$iterator.hasNext_0();) { e = e$iterator.next_1(); $put_4(builder, e, valueOf_3(i++)); } return fromEntryList(builder.entries_0); } function keyOrNull(entry){ return !entry?null:entry.key; } function safeContainsKey(map_0, key){ checkNotNull(map_0); try { return map_0.containsKey(key); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 212) || instanceOf($e0, 169)) { return false; } else throw toJs($e0); } } function safeGet(map_0, key){ checkNotNull(map_0); try { return map_0.get_3(key); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 212) || instanceOf($e0, 169)) { return null; } else throw toJs($e0); } } function safeRemove_0(map_0, key){ checkNotNull(map_0); try { return map_0.remove_0(key); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 212) || instanceOf($e0, 169)) { return null; } else throw toJs($e0); } } function toStringImpl(map_0){ var entry, entry$iterator, first, sb; sb = $append_5((checkNonnegative(map_0.size_1(), 'size') , new StringBuilder_0), 123); first = true; for (entry$iterator = $entrySet_1(map_0).iterator_0(); entry$iterator.hasNext_0();) { entry = castTo(entry$iterator.next_1(), 44); first || (sb.string += ', ' , sb); first = false; $append_10($append_5($append_10(sb, entry.getKey()), 61), entry.getValue()); } return (sb.string += '}' , sb).string; } function valueOrNull(entry){ return !entry?null:entry.value_0; } function $transform(entry){ return castTo(entry, 44).getKey(); } function Maps$1($anonymous0){ TransformedIterator.call(this, $anonymous0); } defineClass(440, 497, $intern_6, Maps$1); _.transform_0 = function transform_4(entry){ return $transform(entry); } ; var Lcom_google_common_collect_Maps$1_2_classLit = createForClass('com.google.common.collect', 'Maps/1', 440); function Maps$2($anonymous0){ TransformedIterator.call(this, $anonymous0); } defineClass(712, 497, $intern_6, Maps$2); _.transform_0 = function transform_5(entry){ return castTo(entry, 44).getValue(); } ; var Lcom_google_common_collect_Maps$2_2_classLit = createForClass('com.google.common.collect', 'Maps/2', 712); function Maps$3($anonymous0, val$function){ this.val$function2 = val$function; TransformedIterator.call(this, $anonymous0); } defineClass(975, 497, $intern_6, Maps$3); _.transform_0 = function transform_6(key){ return new ImmutableEntry(key, $apply_0(this.val$function2, key)); } ; var Lcom_google_common_collect_Maps$3_2_classLit = createForClass('com.google.common.collect', 'Maps/3', 975); function Maps$IteratorBasedAbstractMap$1(this$1){ this.this$11 = this$1; } defineClass(972, 2069, $intern_10, Maps$IteratorBasedAbstractMap$1); _.forEach_0 = function forEach_13(action){ $forEachEntry_0(this.this$11, action); } ; _.iterator_0 = function iterator_37(){ return this.this$11.entryIterator(); } ; _.map_1 = function map_3(){ return this.this$11; } ; _.spliterator_0 = function spliterator_24(){ return this.this$11.entrySpliterator(); } ; var Lcom_google_common_collect_Maps$IteratorBasedAbstractMap$1_2_classLit = createForClass('com.google.common.collect', 'Maps/IteratorBasedAbstractMap/1', 972); function Maps$KeySet$lambda$0$Type(action_0){ this.action_0 = action_0; } defineClass(973, 1, {}, Maps$KeySet$lambda$0$Type); _.accept_1 = function accept_10(arg0, arg1){ this.action_0.accept(arg0); } ; var Lcom_google_common_collect_Maps$KeySet$lambda$0$Type_2_classLit = createForClass('com.google.common.collect', 'Maps/KeySet/lambda$0$Type', 973); function Maps$Values(map_0){ this.map_0 = castTo(checkNotNull(map_0), 85); } defineClass(971, 31, $intern_8, Maps$Values); _.clear_0 = function clear_26(){ this.map_0.clear_0(); } ; _.contains = function contains_23(o){ return this.map_0.containsValue(o); } ; _.forEach_0 = function forEach_14(action){ checkNotNull(action); this.map_0.forEach(new Maps$Values$lambda$0$Type(action)); } ; _.isEmpty = function isEmpty_15(){ return this.map_0.isEmpty(); } ; _.iterator_0 = function iterator_38(){ return new Maps$2(this.map_0.entrySet_0().iterator_0()); } ; _.remove_1 = function remove_44(o){ var entry, entry$iterator; try { return $advanceToFind(this, o, true); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 48)) { for (entry$iterator = this.map_0.entrySet_0().iterator_0(); entry$iterator.hasNext_0();) { entry = castTo(entry$iterator.next_1(), 44); if (equal(o, entry.getValue())) { this.map_0.remove_0(entry.getKey()); return true; } } return false; } else throw toJs($e0); } } ; _.size_1 = function size_31(){ return this.map_0.size_1(); } ; var Lcom_google_common_collect_Maps$Values_2_classLit = createForClass('com.google.common.collect', 'Maps/Values', 971); function Maps$Values$lambda$0$Type(action_0){ this.action_0 = action_0; } defineClass(974, 1, {}, Maps$Values$lambda$0$Type); _.accept_1 = function accept_11(arg0, arg1){ this.action_0.accept(arg1); } ; var Lcom_google_common_collect_Maps$Values$lambda$0$Type_2_classLit = createForClass('com.google.common.collect', 'Maps/Values/lambda$0$Type', 974); function equalsImpl_1(multimap, object){ var that; if (object === multimap) { return true; } if (instanceOf(object, 229)) { that = castTo(object, 229); return equals_Ljava_lang_Object__Z__devirtual$(multimap.asMap_0(), that.asMap_0()); } return false; } function $removeValuesForKey_0(this$static, key){ this$static.multimap.keySet_0().remove_1(key); } function Multimaps$AsMap(multimap){ this.multimap = castTo(checkNotNull(multimap), 229); } defineClass(752, 2085, $intern_7, Multimaps$AsMap); _.get_3 = function get_30(key){ return this.multimap.containsKey(key)?this.multimap.get_1(key):null; } ; _.remove_0 = function remove_45(key){ return this.multimap.containsKey(key)?this.multimap.removeAll(key):null; } ; _.clear_0 = function clear_27(){ this.multimap.clear_0(); } ; _.containsKey = function containsKey_8(key){ return this.multimap.containsKey(key); } ; _.createEntrySet_0 = function createEntrySet_1(){ return new Multimaps$AsMap$EntrySet(this); } ; _.createEntrySet = function(){ return this.createEntrySet_0(); } ; _.isEmpty = function isEmpty_16(){ return this.multimap.isEmpty(); } ; _.keySet_0 = function keySet_14(){ return this.multimap.keySet_0(); } ; _.size_1 = function size_32(){ return this.multimap.keySet_0().size_1(); } ; var Lcom_google_common_collect_Multimaps$AsMap_2_classLit = createForClass('com.google.common.collect', 'Multimaps/AsMap', 752); function Multimaps$AsMap$EntrySet(this$1){ this.this$11 = this$1; } defineClass(1134, 2069, $intern_10, Multimaps$AsMap$EntrySet); _.iterator_0 = function iterator_39(){ return asMapEntryIterator(this.this$11.multimap.keySet_0(), new Multimaps$AsMap$EntrySet$1(this)); } ; _.map_1 = function map_4(){ return this.this$11; } ; _.remove_1 = function remove_46(o){ var entry; if (!$contains(this, o)) { return false; } entry = castTo(requireNonNull(castTo(o, 44)), 44); $removeValuesForKey_0(this.this$11, entry.getKey()); return true; } ; var Lcom_google_common_collect_Multimaps$AsMap$EntrySet_2_classLit = createForClass('com.google.common.collect', 'Multimaps/AsMap/EntrySet', 1134); function $apply_0(this$static, key){ return this$static.this$21.this$11.multimap.get_1(key); } function Multimaps$AsMap$EntrySet$1(this$2){ this.this$21 = this$2; } defineClass(1138, 1, {}, Multimaps$AsMap$EntrySet$1); _.apply_0 = function apply_14(key){ return $apply_0(this, key); } ; _.equals_0 = function equals_27(other){ return this === other; } ; var Lcom_google_common_collect_Multimaps$AsMap$EntrySet$1_2_classLit = createForClass('com.google.common.collect', 'Multimaps/AsMap/EntrySet/1', 1138); function $count(this$static, element){ var values; values = castTo(safeGet($asMap(this$static.multimap), element), 16); return !values?0:values.size_1(); } function $remove_5(this$static, element, occurrences){ var i, iterator, oldCount, values, values0; checkNonnegative(occurrences, 'occurrences'); if (occurrences == 0) { return values0 = castTo(safeGet($asMap(this$static.multimap), element), 16) , !values0?0:values0.size_1(); } values = castTo(safeGet($asMap(this$static.multimap), element), 16); if (!values) { return 0; } oldCount = values.size_1(); if (occurrences >= oldCount) { values.clear_0(); } else { iterator = values.iterator_0(); for (i = 0; i < occurrences; i++) { iterator.next_1(); iterator.remove(); } } return oldCount; } function Multimaps$Keys(multimap){ this.multimap = multimap; } defineClass(552, 2087, {552:1, 849:1, 20:1, 31:1, 16:1}, Multimaps$Keys); _.clear_0 = function clear_28(){ $clear(this.multimap); } ; _.contains = function contains_24(element){ return $containsKey(this.multimap, element); } ; _.forEach_0 = function forEach_15(consumer){ checkNotNull(consumer); $forEach_0($entries(this.multimap), new Multimaps$Keys$lambda$1$Type(consumer)); } ; _.iterator_0 = function iterator_40(){ return new Maps$1($entries(this.multimap).this$01.entryIterator()); } ; _.size_1 = function size_33(){ return this.multimap.totalSize; } ; _.spliterator_0 = function spliterator_25(){ return map_2($entries(this.multimap).spliterator_0(), new Multimaps$Keys$0methodref$getKey$Type); } ; var Lcom_google_common_collect_Multimaps$Keys_2_classLit = createForClass('com.google.common.collect', 'Multimaps/Keys', 552); function Multimaps$Keys$0methodref$getKey$Type(){ } defineClass(1136, 1, {}, Multimaps$Keys$0methodref$getKey$Type); _.apply_0 = function apply_15(arg0){ return castTo(arg0, 44).getKey(); } ; var Lcom_google_common_collect_Multimaps$Keys$0methodref$getKey$Type_2_classLit = createForClass('com.google.common.collect', 'Multimaps/Keys/0methodref$getKey$Type', 1136); function Multimaps$Keys$1($anonymous0){ TransformedIterator.call(this, $anonymous0); } defineClass(1135, 497, $intern_6, Multimaps$Keys$1); _.transform_0 = function transform_7(backingEntry){ return new Multimaps$Keys$1$1(castTo(backingEntry, 44)); } ; var Lcom_google_common_collect_Multimaps$Keys$1_2_classLit = createForClass('com.google.common.collect', 'Multimaps/Keys/1', 1135); defineClass(2088, 1, {425:1}); _.equals_0 = function equals_28(object){ var that; if (instanceOf(object, 504)) { that = castTo(object, 425); return castTo(this.val$backingEntry2.getValue(), 16).size_1() == castTo(that.val$backingEntry2.getValue(), 16).size_1() && equal(this.val$backingEntry2.getKey(), that.val$backingEntry2.getKey()); } return false; } ; _.hashCode_1 = function hashCode_28(){ var e; e = this.val$backingEntry2.getKey(); return (e == null?0:hashCode__I__devirtual$(e)) ^ castTo(this.val$backingEntry2.getValue(), 16).size_1(); } ; _.toString_0 = function toString_27(){ var n, text_0; text_0 = valueOf_6(this.val$backingEntry2.getKey()); n = castTo(this.val$backingEntry2.getValue(), 16).size_1(); return n == 1?text_0:text_0 + ' x ' + n; } ; var Lcom_google_common_collect_Multisets$AbstractEntry_2_classLit = createForClass('com.google.common.collect', 'Multisets/AbstractEntry', 2088); function Multimaps$Keys$1$1(val$backingEntry){ this.val$backingEntry2 = val$backingEntry; } defineClass(504, 2088, {504:1, 425:1}, Multimaps$Keys$1$1); var Lcom_google_common_collect_Multimaps$Keys$1$1_2_classLit = createForClass('com.google.common.collect', 'Multimaps/Keys/1/1', 504); function Multimaps$Keys$lambda$1$Type(consumer_0){ this.consumer_0 = consumer_0; } defineClass(1137, 1, $intern_19, Multimaps$Keys$lambda$1$Type); _.accept = function accept_12(arg0){ this.consumer_0.accept(castTo(arg0, 44).getKey()); } ; var Lcom_google_common_collect_Multimaps$Keys$lambda$1$Type_2_classLit = createForClass('com.google.common.collect', 'Multimaps/Keys/lambda$1$Type', 1137); function Multiset$lambda$0$Type(){ } defineClass(1140, 1, $intern_19, Multiset$lambda$0$Type); _.accept = function accept_13(arg0){ lambda$0_1(castTo(arg0, 425)); } ; var Lcom_google_common_collect_Multiset$lambda$0$Type_2_classLit = createForClass('com.google.common.collect', 'Multiset/lambda$0$Type', 1140); function Multiset$lambda$1$Type(action_0){ this.action_0 = action_0; } defineClass(753, 1, $intern_19, Multiset$lambda$1$Type); _.accept = function accept_14(arg0){ lambda$1_0(this.action_0, castTo(arg0, 425)); } ; var Lcom_google_common_collect_Multiset$lambda$1$Type_2_classLit = createForClass('com.google.common.collect', 'Multiset/lambda$1$Type', 753); function addAllImpl(elements){ if ($entrySet_0(elements).isEmpty()) { return false; } $forEachEntry(elements, new Multisets$0methodref$add$Type); return true; } function equalsImpl_2(multiset, object){ var entry, entry$iterator, that; if (object === multiset) { return true; } if (instanceOf(object, 552)) { that = castTo(object, 849); if (multiset.multimap.totalSize != that.multimap.totalSize || $entrySet_0(multiset).size_1() != $entrySet_0(that).size_1()) { return false; } for (entry$iterator = $entrySet_0(that).iterator_0(); entry$iterator.hasNext_0();) { entry = castTo(entry$iterator.next_1(), 425); if ($count(multiset, entry.val$backingEntry2.getKey()) != castTo(entry.val$backingEntry2.getValue(), 16).size_1()) { return false; } } return true; } return false; } function lambda$1_1(entry_0){ return new Spliterators$IteratorSpliterator(nCopies(castTo(entry_0.val$backingEntry2.getValue(), 16).size_1(), entry_0.val$backingEntry2.getKey()), 16); } function setCountImpl(self_0, element, oldCount){ var values, oldCount_0, values_0, delta; checkNonnegative(oldCount, 'oldCount'); checkNonnegative(0, 'newCount'); values = castTo(safeGet($asMap(self_0.multimap), element), 16); if ((!values?0:values.size_1()) == oldCount) { checkNonnegative(0, 'count'); oldCount_0 = (values_0 = castTo(safeGet($asMap(self_0.multimap), element), 16) , !values_0?0:values_0.size_1()); delta = -oldCount_0; delta > 0?$add():delta < 0 && $remove_5(self_0, element, -delta); return true; } else { return false; } } function Multisets$0methodref$add$Type(){ } defineClass(1141, 1, {}, Multisets$0methodref$add$Type); var Lcom_google_common_collect_Multisets$0methodref$add$Type_2_classLit = createForClass('com.google.common.collect', 'Multisets/0methodref$add$Type', 1141); function Multisets$lambda$1$Type(){ } defineClass(754, 1, {}, Multisets$lambda$1$Type); _.apply_0 = function apply_16(arg0){ return lambda$1_1(castTo(arg0, 425)); } ; var Lcom_google_common_collect_Multisets$lambda$1$Type_2_classLit = createForClass('com.google.common.collect', 'Multisets/lambda$1$Type', 754); defineClass(2106, 1, $intern_1); var Lcom_google_common_collect_RangeGwtSerializationDependencies_2_classLit = createForClass('com.google.common.collect', 'RangeGwtSerializationDependencies', 2106); function $clinit_Range(){ $clinit_Range = emptyMethod; new Range_0(($clinit_Cut$BelowAll() , INSTANCE_1), ($clinit_Cut$AboveAll() , INSTANCE_0)); } function $apply_1(this$static, input_0){ return checkNotNull(input_0) , this$static.lowerBound.isLessThan(input_0) && !this$static.upperBound.isLessThan(input_0); } function Range_0(lowerBound, upperBound){ this.lowerBound = castTo(checkNotNull(lowerBound), 253); this.upperBound = castTo(checkNotNull(upperBound), 253); if (lowerBound.compareTo(upperBound) > 0 || lowerBound == ($clinit_Cut$AboveAll() , INSTANCE_0) || upperBound == ($clinit_Cut$BelowAll() , INSTANCE_1)) { throw toJs(new IllegalArgumentException_0('Invalid range: ' + toString_29(lowerBound, upperBound))); } } function closed_0(lower, upper){ $clinit_Range(); return new Range_0(new Cut$BelowValue(lower), new Cut$AboveValue(upper)); } function toString_29(lowerBound, upperBound){ var sb; sb = new StringBuilder_0; lowerBound.describeAsLowerBound(sb); sb.string += '..'; upperBound.describeAsUpperBound(sb); return sb.string; } defineClass(521, 2106, {178:1, 521:1, 3:1, 46:1}, Range_0); _.apply_1 = function apply_17(input_0){ return $apply_1(this, castTo(input_0, 34)); } ; _.test_0 = function test_1(input_0){ return $apply_1(this, castTo(input_0, 34)); } ; _.equals_0 = function equals_29(object){ var other; if (instanceOf(object, 521)) { other = castTo(object, 521); return $equals_1(this.lowerBound, other.lowerBound) && $equals_1(this.upperBound, other.upperBound); } return false; } ; _.hashCode_1 = function hashCode_29(){ return this.lowerBound.hashCode_1() * 31 + this.upperBound.hashCode_1(); } ; _.toString_0 = function toString_28(){ return toString_29(this.lowerBound, this.upperBound); } ; var Lcom_google_common_collect_Range_2_classLit = createForClass('com.google.common.collect', 'Range', 521); function RegularImmutableAsList(delegate, delegateList){ this.delegate = delegate; this.delegateList = delegateList; } function RegularImmutableAsList_0(delegate, array){ $clinit_ImmutableList(); RegularImmutableAsList.call(this, delegate, unsafeDelegateList(new Arrays$ArrayList(array))); } defineClass(654, 2097, $intern_26, RegularImmutableAsList_0); _.listIterator_1 = function listIterator_10(index_0){ return $listIterator(this.delegateList, index_0); } ; _.delegateCollection = function delegateCollection_1(){ return this.delegate; } ; _.get_0 = function get_31(index_0){ return $get_2(this.delegateList, index_0); } ; _.listIterator_2 = function listIterator_9(index_0){ return $listIterator(this.delegateList, index_0); } ; var Lcom_google_common_collect_RegularImmutableAsList_2_classLit = createForClass('com.google.common.collect', 'RegularImmutableAsList', 654); function RegularImmutableList(delegate){ this.delegate = ($clinit_Collections() , instanceOf(delegate, 59)?new Collections$UnmodifiableRandomAccessList(delegate):new Collections$UnmodifiableList(delegate)); } defineClass(656, 2105, $intern_26, RegularImmutableList); _.delegateList_0 = function delegateList_0(){ return this.delegate; } ; var Lcom_google_common_collect_RegularImmutableList_2_classLit = createForClass('com.google.common.collect', 'RegularImmutableList', 656); function RegularImmutableMap(entries){ ForwardingImmutableMap.call(this, entries); } function RegularImmutableMap_0(entries){ RegularImmutableMap.call(this, entries); } defineClass(548, 730, $intern_28, RegularImmutableMap, RegularImmutableMap_0); var Lcom_google_common_collect_RegularImmutableMap_2_classLit = createForClass('com.google.common.collect', 'RegularImmutableMap', 548); function $clinit_RegularImmutableSet(){ $clinit_RegularImmutableSet = emptyMethod; $clinit_ImmutableCollection(); EMPTY_2 = new RegularImmutableSet(($clinit_Collections() , $clinit_Collections() , EMPTY_SET)); } function RegularImmutableSet(delegate){ $clinit_RegularImmutableSet(); ForwardingImmutableSet.call(this, delegate); } defineClass(731, 719, $intern_30, RegularImmutableSet); var EMPTY_2; var Lcom_google_common_collect_RegularImmutableSet_2_classLit = createForClass('com.google.common.collect', 'RegularImmutableSet', 731); function equalsImpl_3(s, object){ var o; if (maskUndefined(s) === maskUndefined(object)) { return true; } if (instanceOf(object, 21)) { o = castTo(object, 21); try { return s.size_1() == o.size_1() && s.containsAll(o); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 169) || instanceOf($e0, 212)) { return false; } else throw toJs($e0); } } return false; } function hashCodeImpl_0(s){ var hashCode, o, o$iterator; hashCode = 0; for (o$iterator = s.iterator_0(); o$iterator.hasNext_0();) { o = o$iterator.next_1(); hashCode += o != null?hashCode__I__devirtual$(o):0; hashCode = ~~hashCode; } return hashCode; } function intersection_0(set1, set2){ checkNotNull_0(set1, 'set1'); checkNotNull_0(set2, 'set2'); return new Sets$2(set1, set2); } function newHashSet(elements){ return instanceOf(elements, 16)?new HashSet_1(castTo(elements, 16)):newHashSet_0(elements.iterator_0()); } function newHashSet_0(elements){ var set_0; set_0 = new HashSet; addAll_7(set_0, elements); return set_0; } function newHashSet_1(elements){ var set_0; set_0 = new HashSet_0(capacity_0(elements.length)); addAll_15(set_0, elements); return set_0; } function newLinkedHashSet(elements){ var set_0; if (elements) { return new LinkedHashSet_1(elements); } set_0 = new LinkedHashSet; addAll_6(set_0, elements); return set_0; } function newTreeSet(elements){ var set_0; set_0 = new TreeSet; addAll_6(set_0, elements); return set_0; } function unmodifiableNavigableSet(set_0){ if (instanceOf(set_0, 616)) { return set_0; } return new Sets$UnmodifiableNavigableSet(set_0); } defineClass(2074, $intern_9, $intern_10); _.iterator_0 = function iterator_41(){ return new Sets$2$1(this.val$set11, this.val$set22); } ; _.add_2 = function add_18(e){ throw toJs(new UnsupportedOperationException); } ; _.addAll = function addAll_11(newElements){ throw toJs(new UnsupportedOperationException); } ; _.clear_0 = function clear_29(){ throw toJs(new UnsupportedOperationException); } ; _.remove_1 = function remove_47(object){ throw toJs(new UnsupportedOperationException); } ; var Lcom_google_common_collect_Sets$SetView_2_classLit = createForClass('com.google.common.collect', 'Sets/SetView', 2074); function $size_1(this$static){ var e, e$iterator, size_0; size_0 = 0; for (e$iterator = new EnumSet$EnumSetImpl$IteratorImpl(this$static.val$set11); e$iterator.i < e$iterator.this$11.all.length;) { e = $next_7(e$iterator); this$static.val$set22.contains(e) && ++size_0; } return size_0; } function Sets$2(val$set1, val$set2){ this.val$set11 = val$set1; this.val$set22 = val$set2; } defineClass(976, 2074, $intern_10, Sets$2); _.iterator_0 = function iterator_42(){ return new Sets$2$1(this.val$set11, this.val$set22); } ; _.contains = function contains_25(object){ return $contains_5(this.val$set11, object) && this.val$set22.contains(object); } ; _.containsAll = function containsAll_6(collection){ return $containsAll(this.val$set11, collection) && this.val$set22.containsAll(collection); } ; _.isEmpty = function isEmpty_17(){ return disjoint(this.val$set22, this.val$set11); } ; _.parallelStream = function parallelStream_1(){ return $filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(this.val$set11, 1)), new Sets$2$1methodref$contains$Type(this.val$set22)); } ; _.size_1 = function size_34(){ return $size_1(this); } ; _.stream = function stream_2(){ return $filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(this.val$set11, 1)), new Sets$2$0methodref$contains$Type(this.val$set22)); } ; var Lcom_google_common_collect_Sets$2_2_classLit = createForClass('com.google.common.collect', 'Sets/2', 976); function Sets$2$0methodref$contains$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(977, 1, $intern_40, Sets$2$0methodref$contains$Type); _.test_0 = function test_2(arg0){ return this.$$outer_0.contains(arg0); } ; var Lcom_google_common_collect_Sets$2$0methodref$contains$Type_2_classLit = createForClass('com.google.common.collect', 'Sets/2/0methodref$contains$Type', 977); function Sets$2$1(val$set1, val$set2){ this.val$set12 = val$set1; this.val$set23 = val$set2; this.itr = new EnumSet$EnumSetImpl$IteratorImpl(this.val$set12); } defineClass(714, 713, $intern_3, Sets$2$1); _.computeNext = function computeNext_0(){ var e; while ($hasNext_4(this.itr)) { e = $next_7(this.itr); if (this.val$set23.contains(e)) { return e; } } return this.state = 2 , null; } ; var Lcom_google_common_collect_Sets$2$1_2_classLit = createForClass('com.google.common.collect', 'Sets/2/1', 714); function Sets$2$1methodref$contains$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(978, 1, $intern_40, Sets$2$1methodref$contains$Type); _.test_0 = function test_3(arg0){ return this.$$outer_0.contains(arg0); } ; var Lcom_google_common_collect_Sets$2$1methodref$contains$Type_2_classLit = createForClass('com.google.common.collect', 'Sets/2/1methodref$contains$Type', 978); function Sets$UnmodifiableNavigableSet(delegate){ this.delegate = castTo(checkNotNull(delegate), 277); this.unmodifiableDelegate = ($clinit_Collections() , new Collections$UnmodifiableSortedSet(delegate)); } defineClass(616, 2073, {616:1, 3:1, 20:1, 16:1, 277:1, 21:1, 87:1}, Sets$UnmodifiableNavigableSet); _.delegate_0 = function delegate_9(){ return this.unmodifiableDelegate; } ; _.delegate_1 = function delegate_10(){ return this.unmodifiableDelegate; } ; _.delegate_2 = function delegate_11(){ return this.unmodifiableDelegate; } ; _.forEach_0 = function forEach_16(action){ this.delegate.forEach_0(action); } ; _.parallelStream = function parallelStream_2(){ return this.delegate.parallelStream(); } ; _.stream = function stream_3(){ return this.delegate.stream(); } ; var Lcom_google_common_collect_Sets$UnmodifiableNavigableSet_2_classLit = createForClass('com.google.common.collect', 'Sets/UnmodifiableNavigableSet', 616); function SingletonImmutableBiMap(key, value_0){ ImmutableBiMap.call(this, singletonMap(checkNotNull(key), checkNotNull(value_0))); this.singleValue = value_0; } defineClass(2031, 2030, $intern_28, SingletonImmutableBiMap); _.values_2 = function values_13(){ return $clinit_ImmutableCollection() , new SingletonImmutableSet(this.singleValue); } ; _.values_0 = function values_14(){ return $clinit_ImmutableCollection() , new SingletonImmutableSet(this.singleValue); } ; _.values_1 = function values_15(){ return $clinit_ImmutableCollection() , new SingletonImmutableSet(this.singleValue); } ; var Lcom_google_common_collect_SingletonImmutableBiMap_2_classLit = createForClass('com.google.common.collect', 'SingletonImmutableBiMap', 2031); function SingletonImmutableList(element){ $clinit_ImmutableList(); this.delegate = ($clinit_Collections() , new Collections$SingletonList(checkNotNull(element))); } defineClass(657, 2105, $intern_26, SingletonImmutableList); _.delegateList_0 = function delegateList_1(){ return this.delegate; } ; var Lcom_google_common_collect_SingletonImmutableList_2_classLit = createForClass('com.google.common.collect', 'SingletonImmutableList', 657); function SingletonImmutableSet(element){ $clinit_ImmutableCollection(); this.element = checkNotNull(element); } defineClass(363, 2079, $intern_30, SingletonImmutableSet); _.iterator_0 = function iterator_44(){ return new Iterators$9(this.element); } ; _.contains = function contains_26(object){ return equals_Ljava_lang_Object__Z__devirtual$(this.element, object); } ; _.iterator_1 = function iterator_43(){ return new Iterators$9(this.element); } ; _.size_1 = function size_35(){ return 1; } ; var Lcom_google_common_collect_SingletonImmutableSet_2_classLit = createForClass('com.google.common.collect', 'SingletonImmutableSet', 363); function closeAll(toClose){ var stream, stream$array, stream$index, stream$max; for (stream$array = toClose , stream$index = 0 , stream$max = stream$array.length; stream$index < stream$max; ++stream$index) { stream = stream$array[stream$index]; $close(stream); } } function concat_1(streams){ var characteristics, estimatedSize, isParallel, splitr, splitrsBuilder, stream, stream$array, stream$index, stream$max; isParallel = false; characteristics = 336; estimatedSize = 0; splitrsBuilder = new ImmutableList$Builder(streams.length); for (stream$array = streams , stream$index = 0 , stream$max = stream$array.length; stream$index < stream$max; ++stream$index) { stream = stream$array[stream$index]; isParallel = isParallel | ($throwIfTerminated(stream) , false); splitr = ($terminate(stream) , stream.spliterator); $add_3(splitrsBuilder.contents, checkNotNull(splitr)); characteristics &= splitr.characteristics_0(); estimatedSize = saturatedAdd(estimatedSize, splitr.estimateSize_0()); } return castTo(castTo($onClose(new StreamImpl(null, flatMap(new Spliterators$IteratorSpliterator(($clinit_ImmutableList() , copyFromCollection(splitrsBuilder.contents)), 16), new Streams$lambda$0$Type, characteristics, estimatedSize)), new Streams$lambda$1$Type(streams)), 687), 848); } function Streams$lambda$0$Type(){ } defineClass(1148, 1, {}, Streams$lambda$0$Type); _.apply_0 = function apply_18(arg0){ return castTo(arg0, 159); } ; var Lcom_google_common_collect_Streams$lambda$0$Type_2_classLit = createForClass('com.google.common.collect', 'Streams/lambda$0$Type', 1148); function Streams$lambda$1$Type(streams_0){ this.streams_0 = streams_0; } defineClass(1149, 1, $intern_41, Streams$lambda$1$Type); _.run = function run_0(){ closeAll(this.streams_0); } ; var Lcom_google_common_collect_Streams$lambda$1$Type_2_classLit = createForClass('com.google.common.collect', 'Streams/lambda$1$Type', 1149); function equalsImpl_4(table, obj){ var result, result0, that; if (obj === table) { return true; } else if (instanceOf(obj, 678)) { that = castTo(obj, 2046); return $equals_0((result0 = table.cellSet , !result0?(table.cellSet = new AbstractTable$CellSet(table)):result0), (result = that.cellSet , !result?(that.cellSet = new AbstractTable$CellSet(that)):result)); } else { return false; } } function TreeMultimap(keyComparator, valueComparator){ AbstractSortedKeySortedSetMultimap.call(this, new TreeMap_0(keyComparator)); this.keyComparator = keyComparator; this.valueComparator = valueComparator; } function create(keyComparator, valueComparator){ return new TreeMultimap(castTo(checkNotNull(keyComparator), 50), castTo(checkNotNull(valueComparator), 50)); } defineClass(1725, 1724, $intern_5, TreeMultimap); _.asMap_0 = function asMap_5(){ var result; return result = this.asMap , castTo(castTo(!result?(this.asMap = instanceOf(this.map_0, 139)?new AbstractMapBasedMultimap$NavigableAsMap(this, castTo(this.map_0, 139)):instanceOf(this.map_0, 133)?new AbstractMapBasedMultimap$SortedAsMap(this, castTo(this.map_0, 133)):new AbstractMapBasedMultimap$AsMap(this, this.map_0)):result, 133), 139); } ; _.createCollection = function createCollection_10(){ return new TreeSet_0(this.valueComparator); } ; _.createCollection_1 = function createCollection_11(){ return new TreeSet_0(this.valueComparator); } ; _.keySet_0 = function keySet_15(){ var result; return result = this.keySet , castTo(castTo(!result?(this.keySet = instanceOf(this.map_0, 139)?new AbstractMapBasedMultimap$NavigableKeySet(this, castTo(this.map_0, 139)):instanceOf(this.map_0, 133)?new AbstractMapBasedMultimap$SortedKeySet(this, castTo(this.map_0, 133)):new AbstractMapBasedMultimap$KeySet(this, this.map_0)):result, 87), 277); } ; _.createAsMap = function createAsMap_1(){ return instanceOf(this.map_0, 139)?new AbstractMapBasedMultimap$NavigableAsMap(this, castTo(this.map_0, 139)):instanceOf(this.map_0, 133)?new AbstractMapBasedMultimap$SortedAsMap(this, castTo(this.map_0, 133)):new AbstractMapBasedMultimap$AsMap(this, this.map_0); } ; _.createCollection_0 = function createCollection_12(key){ key == null && this.keyComparator.compare_1(key, key); return new TreeSet_0(this.valueComparator); } ; var Lcom_google_common_collect_TreeMultimap_2_classLit = createForClass('com.google.common.collect', 'TreeMultimap', 1725); function $clinit_DoubleMath(){ $clinit_DoubleMath = emptyMethod; $wnd.Math.log(2); } function fuzzyCompare(a, b){ $clinit_DoubleMath(); return checkNonNegative($intern_42) , $wnd.Math.abs(a - b) <= $intern_42 || a == b || isNaN(a) && isNaN(b)?0:a < b?-1:a > b?1:compare_0(isNaN(a), isNaN(b)); } function fuzzyEquals(a, b){ $clinit_DoubleMath(); checkNonNegative($intern_42); return $wnd.Math.abs(a - b) <= $intern_42 || a == b || isNaN(a) && isNaN(b); } function saturatedAdd(a, b){ var naiveSum; naiveSum = add_20(a, b); if (lt(xor_0(a, b), 0) | gte_0(xor_0(a, naiveSum), 0)) { return naiveSum; } return add_20($intern_21, xor_0(shru_0(naiveSum, 63), 1)); } function checkNonNegative(x_0){ if (!(x_0 >= 0)) { throw toJs(new IllegalArgumentException_0('tolerance (' + x_0 + ') must be >= 0')); } return x_0; } function compare_0(a, b){ return a == b?0:a?1:-1; } function saturatedCast(value_0){ if (compare_2(value_0, $intern_0) > 0) { return $intern_0; } if (compare_2(value_0, $intern_43) < 0) { return $intern_43; } return toInt_0(value_0); } function $$init_0(this$static){ this$static.stackTrace = initUnidimensionalArray(Ljava_lang_StackTraceElement_2_classLit, $intern_16, 319, 0, 0, 1); } function $addSuppressed(this$static, exception){ checkCriticalNotNull_0(exception, 'Cannot suppress a null exception.'); checkCriticalArgument_0(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_16, 82, 0, [exception])):(this$static.suppressedExceptions[this$static.suppressedExceptions.length] = exception); } function $fillInStackTrace(this$static){ if (this$static.writableStackTrace) { this$static.backingJsObject !== '__noinit__' && this$static.initializeBackingError(); this$static.stackTrace = null; } return this$static; } function $linkBack(this$static, error){ if (error instanceof Object) { try { error.__java$exception = this$static; if (navigator.userAgent.toLowerCase().indexOf('msie') != -1 && $doc.documentMode < 9) { return; } var throwable = this$static; Object.defineProperties(error, {cause:{get:function(){ var cause = throwable.getCause(); return cause && cause.getBackingJsObject(); } }, suppressed:{get:function(){ return throwable.getBackingSuppressed(); } }}); } catch (ignored) { } } } function $printStackTraceImpl(this$static, out, ident){ var t, t$array, t$index, t$max, theCause; String.fromCharCode(10); $printStackTraceItems(this$static); for (t$array = (this$static.suppressedExceptions == null && (this$static.suppressedExceptions = initUnidimensionalArray(Ljava_lang_Throwable_2_classLit, $intern_16, 82, 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_0; !!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 = collector_1.getStackTrace(this$static) , dropInternalFrames(stackTrace))) , this$static.stackTrace) , element$index = 0 , element$max = element$array.length; element$index < element$max; ++element$index) { String.fromCharCode(10); } } function $setBackingJsObject(this$static, backingJsObject){ this$static.backingJsObject = backingJsObject; $linkBack(this$static, backingJsObject); } function $toString_4(this$static, message){ var className; className = $getName(this$static.___clazz); return message == null?className:className + ': ' + message; } function Throwable(){ $$init_0(this); $fillInStackTrace(this); this.initializeBackingError(); } function Throwable_0(message){ $$init_0(this); this.detailMessage = message; $fillInStackTrace(this); this.initializeBackingError(); } function Throwable_1(message, cause){ $$init_0(this); this.cause_0 = cause; this.detailMessage = message; $fillInStackTrace(this); this.initializeBackingError(); } function fixIE(e){ if (!('stack' in e)) { try { throw e; } catch (ignored) { } } return e; } defineClass(82, 1, {3:1, 82:1}); _.createError = function createError(msg){ return new Error(msg); } ; _.getBackingJsObject = function getBackingJsObject(){ return this.backingJsObject; } ; _.getBackingSuppressed = function getBackingSuppressed(){ var i, result, suppressed; suppressed = (this.suppressedExceptions == null && (this.suppressedExceptions = initUnidimensionalArray(Ljava_lang_Throwable_2_classLit, $intern_16, 82, 0, 0, 1)) , this.suppressedExceptions); result = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, suppressed.length, 5, 1); for (i = 0; i < suppressed.length; i++) { result[i] = suppressed[i].backingJsObject; } return result; } ; _.getCause = function getCause(){ return this.cause_0; } ; _.getMessage = function getMessage(){ return this.detailMessage; } ; _.initializeBackingError = function initializeBackingError(){ $setBackingJsObject(this, fixIE(this.createError($toString_4(this, this.detailMessage)))); captureStackTrace(this); } ; _.toString_0 = function toString_30(){ return $toString_4(this, this.getMessage()); } ; _.backingJsObject = '__noinit__'; _.disableSuppression = false; _.writableStackTrace = true; var Ljava_lang_Throwable_2_classLit = createForClass('java.lang', 'Throwable', 82); defineClass(103, 82, {3:1, 103:1, 82:1}); var Ljava_lang_Exception_2_classLit = createForClass('java.lang', 'Exception', 103); function RuntimeException(){ Throwable.call(this); } function RuntimeException_0(message){ Throwable_0.call(this, message); } defineClass(63, 103, $intern_44, RuntimeException, RuntimeException_0); var Ljava_lang_RuntimeException_2_classLit = createForClass('java.lang', 'RuntimeException', 63); defineClass(607, 63, $intern_44); var Ljava_lang_JsException_2_classLit = createForClass('java.lang', 'JsException', 607); defineClass(875, 607, $intern_44); var Lcom_google_gwt_core_client_impl_JavaScriptExceptionBase_2_classLit = createForClass('com.google.gwt.core.client.impl', 'JavaScriptExceptionBase', 875); function $clinit_JavaScriptException(){ $clinit_JavaScriptException = emptyMethod; NOT_SET = new Object_0; } 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(); $$init_0(this); $fillInStackTrace(this); this.backingJsObject = e; $linkBack(this, e); this.detailMessage = e == null?'null':toString_40(e); 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(486, 875, {486:1, 3:1, 103:1, 63:1, 82:1}, JavaScriptException); _.getMessage = function getMessage_0(){ $ensureInit(this); return this.message_0; } ; _.getThrown = function getThrown(){ 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', 486); function $equals_3(this$static, other){ return !!this$static && !!this$static.equals?this$static.equals(other):maskUndefined(this$static) === maskUndefined(other); } function $hashCode(this$static){ return !!this$static && !!this$static.hashCode?this$static.hashCode():getObjectIdentityHashCode(this$static); } var Lcom_google_gwt_core_client_JavaScriptObject_2_classLit = createForClass('com.google.gwt.core.client', 'JavaScriptObject$', 0); 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; } var escapeTable_0; defineClass(2047, 1, {}); var Lcom_google_gwt_core_client_Scheduler_2_classLit = createForClass('com.google.gwt.core.client', 'Scheduler', 2047); function $clinit_Impl(){ $clinit_Impl = emptyMethod; !!($clinit_StackTraceCreator() , collector_1); } function apply_19(jsFunction, thisObj, args){ return jsFunction.apply(thisObj, args); var __0; } function enter_0(){ var now_0; if (entryDepth != 0) { now_0 = Date.now(); if (now_0 - watchdogEntryDepthLastScheduled > 2000) { watchdogEntryDepthLastScheduled = now_0; watchdogEntryDepthTimerId = $wnd.setTimeout(watchdogEntryDepthRun, 10); } } if (entryDepth++ == 0) { $flushEntryCommands(($clinit_SchedulerImpl() , INSTANCE_3)); return true; } return false; } function entry_2(jsFunction){ $clinit_Impl(); return function(){ return entry0_0(jsFunction, this, arguments); var __0; } ; } function entry0_0(jsFunction, thisObj, args){ var initialEntry; initialEntry = enter_0(); try { return apply_19(jsFunction, thisObj, args); } finally { exit(initialEntry); } } function exit(initialEntry){ initialEntry && $flushFinallyCommands(($clinit_SchedulerImpl() , INSTANCE_3)); --entryDepth; if (initialEntry) { if (watchdogEntryDepthTimerId != -1) { watchdogEntryDepthCancel(watchdogEntryDepthTimerId); watchdogEntryDepthTimerId = -1; } } } function reportToBrowser(e){ $clinit_Impl(); $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_3 = new SchedulerImpl; } 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 SchedulerImpl(){ } function push_0(queue, task){ !queue && (queue = []); queue[queue.length] = task; return queue; } function runScheduledTasks(tasks, rescheduled){ var e, i, j, t; for (i = 0 , j = tasks.length; i < j; i++) { t = tasks[i]; try { t[1]?t[0].$_nullMethod() && (rescheduled = push_0(rescheduled, t)):t[0].$_nullMethod(); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 82)) { e = $e0; $clinit_Impl(); reportToBrowser(instanceOf(e, 486)?castTo(e, 486).getThrown():e); } else throw toJs($e0); } } return rescheduled; } defineClass(902, 2047, {}, SchedulerImpl); var INSTANCE_3; var Lcom_google_gwt_core_client_impl_SchedulerImpl_2_classLit = createForClass('com.google.gwt.core.client.impl', 'SchedulerImpl', 902); function $clinit_StackTraceCreator(){ $clinit_StackTraceCreator = emptyMethod; var c, enforceLegacy; enforceLegacy = !supportsErrorStack(); c = new StackTraceCreator$CollectorModernNoSourceMap; collector_1 = enforceLegacy?new StackTraceCreator$CollectorLegacy:c; } function captureStackTrace(error){ $clinit_StackTraceCreator(); collector_1.collect(error); } function dropInternalFrames(stackTrace){ var dropFrameUntilFnName, dropFrameUntilFnName2, i, numberOfFramesToSearch; dropFrameUntilFnName = 'captureStackTrace'; dropFrameUntilFnName2 = 'initializeBackingError'; numberOfFramesToSearch = $wnd.Math.min(stackTrace.length, 5); for (i = numberOfFramesToSearch - 1; i >= 0; i--) { if ($equals_5(stackTrace[i].methodName, dropFrameUntilFnName) || $equals_5(stackTrace[i].methodName, dropFrameUntilFnName2)) { stackTrace.length >= i + 1 && stackTrace.splice(0, i + 1); break; } } return stackTrace; } function extractFunctionName(fnName){ var fnRE = /function(?:\s+([\w$]+))?\s*\(/; var match_0 = fnRE.exec(fnName); return match_0 && match_0[1] || 'anonymous'; } function parseInt_0(number){ $clinit_StackTraceCreator(); return parseInt(number) || -1; } function split_1(t){ $clinit_StackTraceCreator(); var e = t.backingJsObject; if (e && e.stack) { var stack_0 = e.stack; var toString_0 = e + '\n'; stack_0.substring(0, toString_0.length) == toString_0 && (stack_0 = stack_0.substring(toString_0.length)); return stack_0.split('\n'); } return []; } function supportsErrorStack(){ if (Error.stackTraceLimit > 0) { $wnd.Error.stackTraceLimit = Error.stackTraceLimit = 64; return true; } return 'stack' in new Error; } var collector_1; defineClass(2058, 1, {}); var Lcom_google_gwt_core_client_impl_StackTraceCreator$Collector_2_classLit = createForClass('com.google.gwt.core.client.impl', 'StackTraceCreator/Collector', 2058); function StackTraceCreator$CollectorLegacy(){ } defineClass(876, 2058, {}, StackTraceCreator$CollectorLegacy); _.collect = function collect(error){ var seen = {}, name_1; var fnStack = []; error['fnStack'] = fnStack; var callee = arguments.callee.caller; while (callee) { var name_0 = ($clinit_StackTraceCreator() , callee.name || (callee.name = extractFunctionName(callee.toString()))); fnStack.push(name_0); var keyName = ':' + name_0; var withThisName = seen[keyName]; if (withThisName) { var i, j; for (i = 0 , j = withThisName.length; i < j; i++) { if (withThisName[i] === callee) { return; } } } (withThisName || (seen[keyName] = [])).push(callee); callee = callee.caller; } } ; _.getStackTrace = function getStackTrace(t){ var i, length_0, stack_0, stackTrace; stack_0 = ($clinit_StackTraceCreator() , t && t['fnStack']?t['fnStack']:[]); length_0 = stack_0.length; stackTrace = initUnidimensionalArray(Ljava_lang_StackTraceElement_2_classLit, $intern_16, 319, length_0, 0, 1); for (i = 0; i < length_0; i++) { stackTrace[i] = new StackTraceElement(stack_0[i], null, -1); } return stackTrace; } ; var Lcom_google_gwt_core_client_impl_StackTraceCreator$CollectorLegacy_2_classLit = createForClass('com.google.gwt.core.client.impl', 'StackTraceCreator/CollectorLegacy', 876); function $parse(this$static, stString){ var closeParen, col, endFileUrlIndex, fileName, index_0, lastColonIndex, line, location_0, toReturn; location_0 = ''; if (stString.length == 0) { return this$static.createSte('Unknown', 'anonymous', -1, -1); } toReturn = $trim(stString); $equals_5(toReturn.substr(0, 3), 'at ') && (toReturn = (checkCriticalStringElementIndex(3, toReturn.length + 1) , toReturn.substr(3))); toReturn = toReturn.replace(/\[.*?\]/g, ''); index_0 = toReturn.indexOf('('); if (index_0 == -1) { index_0 = toReturn.indexOf('@'); if (index_0 == -1) { location_0 = toReturn; toReturn = ''; } else { location_0 = $trim((checkCriticalStringElementIndex(index_0 + 1, toReturn.length + 1) , toReturn.substr(index_0 + 1))); toReturn = $trim((checkCriticalStringBounds(0, index_0, toReturn.length) , toReturn.substr(0, index_0))); } } else { closeParen = toReturn.indexOf(')', index_0); location_0 = (checkCriticalStringBounds(index_0 + 1, closeParen, toReturn.length) , toReturn.substr(index_0 + 1, closeParen - (index_0 + 1))); toReturn = $trim((checkCriticalStringBounds(0, index_0, toReturn.length) , toReturn.substr(0, index_0))); } index_0 = $indexOf_1(toReturn, fromCodePoint(46)); index_0 != -1 && (toReturn = (checkCriticalStringElementIndex(index_0 + 1, toReturn.length + 1) , toReturn.substr(index_0 + 1))); (toReturn.length == 0 || $equals_5(toReturn, 'Anonymous function')) && (toReturn = 'anonymous'); lastColonIndex = $lastIndexOf(location_0, fromCodePoint(58)); endFileUrlIndex = $lastIndexOf_0(location_0, fromCodePoint(58), lastColonIndex - 1); line = -1; col = -1; fileName = 'Unknown'; if (lastColonIndex != -1 && endFileUrlIndex != -1) { fileName = (checkCriticalStringBounds(0, endFileUrlIndex, location_0.length) , location_0.substr(0, endFileUrlIndex)); line = parseInt_0((checkCriticalStringBounds(endFileUrlIndex + 1, lastColonIndex, location_0.length) , location_0.substr(endFileUrlIndex + 1, lastColonIndex - (endFileUrlIndex + 1)))); col = parseInt_0((checkCriticalStringElementIndex(lastColonIndex + 1, location_0.length + 1) , location_0.substr(lastColonIndex + 1))); } return this$static.createSte(fileName, toReturn, line, col); } defineClass(2059, 2058, {}); _.collect = function collect_0(error){ } ; _.createSte = function createSte(fileName, method, line, col){ return new StackTraceElement(method, fileName + '@' + col, line < 0?-1:line); } ; _.getStackTrace = function getStackTrace_0(t){ var addIndex, i, length_0, stack_0, stackTrace, ste; stack_0 = split_1(t); stackTrace = initUnidimensionalArray(Ljava_lang_StackTraceElement_2_classLit, $intern_16, 319, 0, 0, 1); addIndex = 0; length_0 = stack_0.length; if (length_0 == 0) { return stackTrace; } ste = $parse(this, stack_0[0]); $equals_5(ste.methodName, 'anonymous') || (stackTrace[addIndex++] = ste); for (i = 1; i < length_0; i++) { stackTrace[addIndex++] = $parse(this, stack_0[i]); } return stackTrace; } ; var Lcom_google_gwt_core_client_impl_StackTraceCreator$CollectorModern_2_classLit = createForClass('com.google.gwt.core.client.impl', 'StackTraceCreator/CollectorModern', 2059); function StackTraceCreator$CollectorModernNoSourceMap(){ } defineClass(877, 2059, {}, StackTraceCreator$CollectorModernNoSourceMap); _.createSte = function createSte_0(fileName, method, line, col){ return new StackTraceElement(method, fileName, -1); } ; var Lcom_google_gwt_core_client_impl_StackTraceCreator$CollectorModernNoSourceMap_2_classLit = createForClass('com.google.gwt.core.client.impl', 'StackTraceCreator/CollectorModernNoSourceMap', 877); function $clinit_DateTimeFormat(){ $clinit_DateTimeFormat = emptyMethod; new HashMap; } function $addPart(this$static, buf, count){ var oldLength; if (buf.string.length > 0) { $add_3(this$static.patternParts, new DateTimeFormat$PatternPart(buf.string, count)); oldLength = buf.string.length; 0 < oldLength?(buf.string = $substring_1(buf.string, 0, 0)):0 > oldLength && (buf.string += valueOf_7(initUnidimensionalArray(C_classLit, $intern_45, 28, -oldLength, 15, 1))); } } function $format(this$static, date, timeZone){ var ch_0, diff, i, j, keepDate, keepTime, n, toAppendTo, trailQuote; !timeZone && (timeZone = createTimeZone(date.jsdate.getTimezoneOffset())); diff = (date.jsdate.getTimezoneOffset() - timeZone.standardOffset) * 60000; keepDate = new Date_2(add_20(fromDouble_0(date.jsdate.getTime()), diff)); keepTime = keepDate; if (keepDate.jsdate.getTimezoneOffset() != date.jsdate.getTimezoneOffset()) { diff > 0?(diff -= 86400000):(diff += 86400000); keepTime = new Date_2(add_20(fromDouble_0(date.jsdate.getTime()), diff)); } toAppendTo = new StringBuilder_0; n = this$static.pattern.length; for (i = 0; i < n;) { ch_0 = $charAt(this$static.pattern, i); if (ch_0 >= 97 && ch_0 <= 122 || ch_0 >= 65 && ch_0 <= 90) { for (j = i + 1; j < n && $charAt(this$static.pattern, j) == ch_0; ++j) ; $subFormat(toAppendTo, ch_0, j - i, keepDate, keepTime, timeZone); i = j; } else if (ch_0 == 39) { ++i; if (i < n && $charAt(this$static.pattern, i) == 39) { toAppendTo.string += "'"; ++i; continue; } trailQuote = false; while (!trailQuote) { j = i; while (j < n && $charAt(this$static.pattern, j) != 39) { ++j; } if (j >= n) { throw toJs(new IllegalArgumentException_0("Missing trailing '")); } j + 1 < n && $charAt(this$static.pattern, j + 1) == 39?++j:(trailQuote = true); $append_11(toAppendTo, $substring_1(this$static.pattern, i, j)); i = j + 1; } } else { toAppendTo.string += String.fromCharCode(ch_0); ++i; } } return toAppendTo.string; } function $formatFractionalSeconds(buf, count, date){ var time, value_0; time = fromDouble_0(date.jsdate.getTime()); if (compare_2(time, 0) < 0) { value_0 = $intern_46 - toInt_0(mod(neg_0(time), $intern_46)); value_0 == $intern_46 && (value_0 = 0); } else { value_0 = toInt_0(mod(time, $intern_46)); } if (count == 1) { value_0 = $wnd.Math.min((value_0 + 50) / 100 | 0, 9); $append_5(buf, 48 + value_0 & $intern_47); } else if (count == 2) { value_0 = $wnd.Math.min((value_0 + 5) / 10 | 0, 99); $zeroPaddingNumber(buf, value_0, 2); } else { $zeroPaddingNumber(buf, value_0, 3); count > 3 && $zeroPaddingNumber(buf, 0, count - 3); } } function $formatMonth(buf, count, date){ var value_0; value_0 = date.jsdate.getMonth(); switch (count) { case 5: $append_11(buf, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'])[value_0]); break; case 4: $append_11(buf, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'])[value_0]); break; case 3: $append_11(buf, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'])[value_0]); break; default:$zeroPaddingNumber(buf, value_0 + 1, count); } } function $formatYear(buf, count, date){ var value_0; value_0 = date.jsdate.getFullYear() - $intern_48 + $intern_48; value_0 < 0 && (value_0 = -value_0); switch (count) { case 1: buf.string += value_0; break; case 2: $zeroPaddingNumber(buf, value_0 % 100, 2); break; default:$zeroPaddingNumber(buf, value_0, count); } } function $getNextCharCountInPattern(pattern, start_0){ var ch_0, next; ch_0 = (checkCriticalStringElementIndex(start_0, pattern.length) , pattern.charCodeAt(start_0)); next = start_0 + 1; while (next < pattern.length && (checkCriticalStringElementIndex(next, pattern.length) , pattern.charCodeAt(next) == ch_0)) { ++next; } return next - start_0; } function $identifyAbutStart(this$static){ var abut, i, len; abut = false; len = this$static.patternParts.array.length; for (i = 0; i < len; i++) { if ($isNumeric(castTo($get_11(this$static.patternParts, i), 443))) { if (!abut && i + 1 < len && $isNumeric(castTo($get_11(this$static.patternParts, i + 1), 443))) { abut = true; castTo($get_11(this$static.patternParts, i), 443).abutStart = true; } } else { abut = false; } } } function $isNumeric(part){ var i; if (part.count <= 0) { return false; } i = $indexOf_1('MLydhHmsSDkK', fromCodePoint($charAt(part.text_0, 0))); return i > 1 || i >= 0 && part.count < 3; } function $matchString(text_0, start_0, data_0, pos){ var bestMatch, bestMatchLength, count, i, length_0, textInLowerCase; count = data_0.length; bestMatchLength = 0; bestMatch = -1; textInLowerCase = $toLowerCase((checkCriticalStringElementIndex(start_0, text_0.length + 1) , text_0.substr(start_0)), ($clinit_Locale() , ROOT)); for (i = 0; i < count; ++i) { length_0 = data_0[i].length; if (length_0 > bestMatchLength && $startsWith(textInLowerCase, $toLowerCase(data_0[i], ROOT))) { bestMatch = i; bestMatchLength = length_0; } } bestMatch >= 0 && (pos[0] = start_0 + bestMatchLength); return bestMatch; } function $parse_0(this$static, text_0, date){ var abutPass, abutPat, abutStart, cal, count, i, parsePos, part, s; cal = new DateRecord; parsePos = stampJavaTypeInfo(getClassLiteralForArray(I_classLit, 1), $intern_49, 28, 15, [0]); abutPat = -1; abutStart = 0; abutPass = 0; for (i = 0; i < this$static.patternParts.array.length; ++i) { part = castTo($get_11(this$static.patternParts, i), 443); if (part.count > 0) { if (abutPat < 0 && part.abutStart) { abutPat = i; abutStart = parsePos[0]; abutPass = 0; } if (abutPat >= 0) { count = part.count; if (i == abutPat) { count -= abutPass++; if (count == 0) { return 0; } } if (!$subParse(text_0, parsePos, part, count, cal)) { i = abutPat - 1; parsePos[0] = abutStart; continue; } } else { abutPat = -1; if (!$subParse(text_0, parsePos, part, 0, cal)) { return 0; } } } else { abutPat = -1; if ($charAt(part.text_0, 0) == 32) { s = parsePos[0]; $skipSpace(text_0, parsePos); if (parsePos[0] > s) { continue; } } else if ($startsWith_0(text_0, part.text_0, parsePos[0])) { parsePos[0] += part.text_0.length; continue; } return 0; } } if (!$calcDate(cal, date)) { return 0; } return parsePos[0]; } function $parse_1(this$static, text_0){ var charsConsumed, curDate, date; curDate = new Date_0; date = new Date_1(curDate.jsdate.getFullYear() - $intern_48, curDate.jsdate.getMonth(), curDate.jsdate.getDate()); charsConsumed = $parse_0(this$static, text_0, date); if (charsConsumed == 0 || charsConsumed < text_0.length) { throw toJs(new IllegalArgumentException_0(text_0)); } return date; } function $parseInt(text_0, pos){ var ch_0, ind, ret; ret = 0; ind = pos[0]; if (ind >= text_0.length) { return -1; } ch_0 = (checkCriticalStringElementIndex(ind, text_0.length) , text_0.charCodeAt(ind)); while (ch_0 >= 48 && ch_0 <= 57) { ret = ret * 10 + (ch_0 - 48); ++ind; if (ind >= text_0.length) { break; } ch_0 = (checkCriticalStringElementIndex(ind, text_0.length) , text_0.charCodeAt(ind)); } ind > pos[0]?(pos[0] = ind):(ret = -1); return ret; } function $parsePattern(this$static, pattern){ var buf, ch_0, count, i, inQuote; buf = new StringBuilder_0; inQuote = false; for (i = 0; i < pattern.length; i++) { ch_0 = (checkCriticalStringElementIndex(i, pattern.length) , pattern.charCodeAt(i)); if (ch_0 == 32) { $addPart(this$static, buf, 0); buf.string += ' '; $addPart(this$static, buf, 0); while (i + 1 < pattern.length && (checkCriticalStringElementIndex(i + 1, pattern.length) , pattern.charCodeAt(i + 1) == 32)) { ++i; } continue; } if (inQuote) { if (ch_0 == 39) { if (i + 1 < pattern.length && (checkCriticalStringElementIndex(i + 1, pattern.length) , pattern.charCodeAt(i + 1) == 39)) { buf.string += String.fromCharCode(ch_0); ++i; } else { inQuote = false; } } else { buf.string += String.fromCharCode(ch_0); } continue; } if ($indexOf_1('GyMLdkHmsSEcDahKzZv', fromCodePoint(ch_0)) > 0) { $addPart(this$static, buf, 0); buf.string += String.fromCharCode(ch_0); count = $getNextCharCountInPattern(pattern, i); $addPart(this$static, buf, count); i += count - 1; continue; } if (ch_0 == 39) { if (i + 1 < pattern.length && (checkCriticalStringElementIndex(i + 1, pattern.length) , pattern.charCodeAt(i + 1) == 39)) { buf.string += "'"; ++i; } else { inQuote = true; } } else { buf.string += String.fromCharCode(ch_0); } } $addPart(this$static, buf, 0); $identifyAbutStart(this$static); } function $parseTimeZoneOffset(text_0, pos, cal){ var offset, sign, st, value_0; if (pos[0] >= text_0.length) { cal.tzOffset = 0; return true; } switch ($charAt(text_0, pos[0])) { case 43: sign = 1; break; case 45: sign = -1; break; default:cal.tzOffset = 0; return true; } ++pos[0]; st = pos[0]; value_0 = $parseInt(text_0, pos); if (value_0 == 0 && pos[0] == st) { return false; } if (pos[0] < text_0.length && $charAt(text_0, pos[0]) == 58) { offset = value_0 * 60; ++pos[0]; st = pos[0]; value_0 = $parseInt(text_0, pos); if (value_0 == 0 && pos[0] == st) { return false; } offset += value_0; } else { offset = value_0; offset < 24 && pos[0] - st <= 2?(offset *= 60):(offset = offset % 100 + (offset / 100 | 0) * 60); } offset *= sign; cal.tzOffset = -offset; return true; } function $skipSpace(text_0, pos){ while (pos[0] < text_0.length && $indexOf_1(' \t\r\n', fromCodePoint($charAt(text_0, pos[0]))) >= 0) { ++pos[0]; } } function $subFormat(buf, ch_0, count, adjustedDate, adjustedTime, timezone){ var value_0, value0, value1, value10, value2, value3, value4, value5, value6, value7, value8, value9; switch (ch_0) { case 71: value0 = adjustedDate.jsdate.getFullYear() - $intern_48 >= -1900?1:0; count >= 4?$append_11(buf, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['Before Christ', 'Anno Domini'])[value0]):$append_11(buf, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['BC', 'AD'])[value0]); break; case 121: $formatYear(buf, count, adjustedDate); break; case 77: $formatMonth(buf, count, adjustedDate); break; case 107: value1 = adjustedTime.jsdate.getHours(); value1 == 0?$zeroPaddingNumber(buf, 24, count):$zeroPaddingNumber(buf, value1, count); break; case 83: $formatFractionalSeconds(buf, count, adjustedTime); break; case 69: value2 = adjustedDate.jsdate.getDay(); count == 5?$append_11(buf, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['S', 'M', 'T', 'W', 'T', 'F', 'S'])[value2]):count == 4?$append_11(buf, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'])[value2]):$append_11(buf, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'])[value2]); break; case 97: adjustedTime.jsdate.getHours() >= 12 && adjustedTime.jsdate.getHours() < 24?$append_11(buf, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['AM', 'PM'])[1]):$append_11(buf, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['AM', 'PM'])[0]); break; case 104: value3 = adjustedTime.jsdate.getHours() % 12; value3 == 0?$zeroPaddingNumber(buf, 12, count):$zeroPaddingNumber(buf, value3, count); break; case 75: value4 = adjustedTime.jsdate.getHours() % 12; $zeroPaddingNumber(buf, value4, count); break; case 72: value5 = adjustedTime.jsdate.getHours(); $zeroPaddingNumber(buf, value5, count); break; case 99: value6 = adjustedDate.jsdate.getDay(); count == 5?$append_11(buf, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['S', 'M', 'T', 'W', 'T', 'F', 'S'])[value6]):count == 4?$append_11(buf, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'])[value6]):count == 3?$append_11(buf, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'])[value6]):$zeroPaddingNumber(buf, value6, 1); break; case 76: value7 = adjustedDate.jsdate.getMonth(); count == 5?$append_11(buf, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'])[value7]):count == 4?$append_11(buf, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'])[value7]):count == 3?$append_11(buf, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'])[value7]):$zeroPaddingNumber(buf, value7 + 1, count); break; case 81: value8 = adjustedDate.jsdate.getMonth() / 3 | 0; count < 4?$append_11(buf, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['Q1', 'Q2', 'Q3', 'Q4'])[value8]):$append_11(buf, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter'])[value8]); break; case 100: value9 = adjustedDate.jsdate.getDate(); $zeroPaddingNumber(buf, value9, count); break; case 109: value10 = adjustedTime.jsdate.getMinutes(); $zeroPaddingNumber(buf, value10, count); break; case 115: value_0 = adjustedTime.jsdate.getSeconds(); $zeroPaddingNumber(buf, value_0, count); break; case 122: count < 4?$append_11(buf, timezone.tzNames[0]):$append_11(buf, timezone.tzNames[1]); break; case 118: $append_11(buf, timezone.timezoneID); break; case 90: count < 3?$append_11(buf, $getRFCTimeZoneString(timezone)):count == 3?$append_11(buf, $getISOTimeZoneString(timezone)):$append_11(buf, composeGMTString(timezone.standardOffset)); break; default:return false; } return true; } function $subParse(text_0, pos, part, digitCount, cal){ var ch_0, start_0, value_0; $skipSpace(text_0, pos); start_0 = pos[0]; ch_0 = $charAt(part.text_0, 0); value_0 = -1; if ($isNumeric(part)) { if (digitCount > 0) { if (start_0 + digitCount > text_0.length) { return false; } value_0 = $parseInt((checkCriticalStringBounds(0, start_0 + digitCount, text_0.length) , text_0.substr(0, start_0 + digitCount)), pos); } else { value_0 = $parseInt(text_0, pos); } } switch (ch_0) { case 71: value_0 = $matchString(text_0, start_0, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['Before Christ', 'Anno Domini']), pos); cal.era = value_0; return true; case 77: return $subParseMonth(text_0, pos, cal, value_0, start_0); case 76: return $subParseStandaloneMonth(text_0, pos, cal, value_0, start_0); case 69: return $subParseDayOfWeek(text_0, pos, start_0, cal); case 99: return $subParseStandaloneDay(text_0, pos, start_0, cal); case 97: value_0 = $matchString(text_0, start_0, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['AM', 'PM']), pos); cal.ampm = value_0; return true; case 121: return $subParseYear(text_0, pos, start_0, value_0, part, cal); case 100: if (value_0 <= 0) { return false; } cal.dayOfMonth = value_0; return true; case 83: if (value_0 < 0) { return false; } return $subParseFractionalSeconds(value_0, start_0, pos[0], cal); case 104: value_0 == 12 && (value_0 = 0); case 75: case 72: if (value_0 < 0) { return false; } cal.hours = value_0; cal.midnightIs24 = false; return true; case 107: if (value_0 < 0) { return false; } cal.hours = value_0; cal.midnightIs24 = true; return true; case 109: if (value_0 < 0) { return false; } cal.minutes = value_0; return true; case 115: if (value_0 < 0) { return false; } cal.seconds = value_0; return true; case 90: if (start_0 < text_0.length && (checkCriticalStringElementIndex(start_0, text_0.length) , text_0.charCodeAt(start_0) == 90)) { ++pos[0]; cal.tzOffset = 0; return true; } case 122: case 118: return $subParseTimeZoneInGMT(text_0, start_0, pos, cal); default:return false; } } function $subParseDayOfWeek(text_0, pos, start_0, cal){ var value_0; value_0 = $matchString(text_0, start_0, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']), pos); value_0 < 0 && (value_0 = $matchString(text_0, start_0, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']), pos)); if (value_0 < 0) { return false; } cal.dayOfWeek = value_0; return true; } function $subParseFractionalSeconds(value_0, start_0, end, cal){ var a, i; i = end - start_0; if (i < 3) { while (i < 3) { value_0 *= 10; ++i; } } else { a = 1; while (i > 3) { a *= 10; --i; } value_0 = (value_0 + (a >> 1)) / a | 0; } cal.milliseconds = value_0; return true; } function $subParseMonth(text_0, pos, cal, value_0, start_0){ if (value_0 < 0) { value_0 = $matchString(text_0, start_0, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']), pos); value_0 < 0 && (value_0 = $matchString(text_0, start_0, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']), pos)); if (value_0 < 0) { return false; } cal.month = value_0; return true; } else if (value_0 > 0) { cal.month = value_0 - 1; return true; } return false; } function $subParseStandaloneDay(text_0, pos, start_0, cal){ var value_0; value_0 = $matchString(text_0, start_0, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']), pos); value_0 < 0 && (value_0 = $matchString(text_0, start_0, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']), pos)); if (value_0 < 0) { return false; } cal.dayOfWeek = value_0; return true; } function $subParseStandaloneMonth(text_0, pos, cal, value_0, start_0){ if (value_0 < 0) { value_0 = $matchString(text_0, start_0, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']), pos); value_0 < 0 && (value_0 = $matchString(text_0, start_0, stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']), pos)); if (value_0 < 0) { return false; } cal.month = value_0; return true; } else if (value_0 > 0) { cal.month = value_0 - 1; return true; } return false; } function $subParseTimeZoneInGMT(text_0, start_0, pos, cal){ if (start_0 >= 0 && $equals_5(text_0.substr(start_0, 'GMT'.length), 'GMT')) { pos[0] = start_0 + 3; return $parseTimeZoneOffset(text_0, pos, cal); } if (start_0 >= 0 && $equals_5(text_0.substr(start_0, 'UTC'.length), 'UTC')) { pos[0] = start_0 + 3; return $parseTimeZoneOffset(text_0, pos, cal); } return $parseTimeZoneOffset(text_0, pos, cal); } function $subParseYear(text_0, pos, start_0, value_0, part, cal){ var ambiguousTwoDigitYear, ch_0, date, defaultCenturyStartYear; ch_0 = 32; if (value_0 < 0) { if (pos[0] >= text_0.length) { return false; } ch_0 = $charAt(text_0, pos[0]); if (ch_0 != 43 && ch_0 != 45) { return false; } ++pos[0]; value_0 = $parseInt(text_0, pos); if (value_0 < 0) { return false; } ch_0 == 45 && (value_0 = -value_0); } if (ch_0 == 32 && pos[0] - start_0 == 2 && part.count == 2) { date = new Date_0; defaultCenturyStartYear = date.jsdate.getFullYear() - $intern_48 + $intern_48 - 80; ambiguousTwoDigitYear = defaultCenturyStartYear % 100; cal.ambiguousYear = value_0 == ambiguousTwoDigitYear; value_0 += (defaultCenturyStartYear / 100 | 0) * 100 + (value_0 < ambiguousTwoDigitYear?100:0); } cal.year = value_0; return true; } function $zeroPaddingNumber(buf, value_0, minWidth){ var b, i; b = 10; for (i = 0; i < minWidth - 1; i++) { value_0 < b && (buf.string += '0' , buf); b *= 10; } buf.string += value_0; } defineClass(1064, 1, {}); var Lcom_google_gwt_i18n_shared_DateTimeFormat_2_classLit = createForClass('com.google.gwt.i18n.shared', 'DateTimeFormat', 1064); function $clinit_DateTimeFormat_0(){ $clinit_DateTimeFormat_0 = emptyMethod; $clinit_DateTimeFormat(); cache = new HashMap; } function DateTimeFormat(pattern){ $clinit_DateTimeFormat(); this.patternParts = new ArrayList; this.pattern = pattern; $parsePattern(this, pattern); } function getFormat(pattern, dtfi){ $clinit_DateTimeFormat_0(); var defaultDtfi, dtf; defaultDtfi = $getDateTimeFormatInfo(($clinit_LocaleInfo() , $clinit_LocaleInfo() , instance_0)); dtf = null; dtfi == defaultDtfi && (dtf = castTo($getStringValue(cache, pattern), 624)); if (!dtf) { dtf = new DateTimeFormat(pattern); dtfi == defaultDtfi && $putStringValue(cache, pattern, dtf); } return dtf; } defineClass(624, 1064, {624:1}, DateTimeFormat); var cache; var Lcom_google_gwt_i18n_client_DateTimeFormat_2_classLit = createForClass('com.google.gwt.i18n.client', 'DateTimeFormat', 624); defineClass(2101, 1, {}); var Lcom_google_gwt_i18n_shared_DefaultDateTimeFormatInfo_2_classLit = createForClass('com.google.gwt.i18n.shared', 'DefaultDateTimeFormatInfo', 2101); defineClass(2102, 2101, {}); var Lcom_google_gwt_i18n_client_DefaultDateTimeFormatInfo_2_classLit = createForClass('com.google.gwt.i18n.client', 'DefaultDateTimeFormatInfo', 2102); function $clinit_LocaleInfo(){ $clinit_LocaleInfo = emptyMethod; instance_0 = new LocaleInfo; } function $getDateTimeFormatInfo(this$static){ !this$static.dateTimeFormatInfo && (this$static.dateTimeFormatInfo = new DateTimeFormatInfoImpl); return this$static.dateTimeFormatInfo; } function LocaleInfo(){ } defineClass(1120, 1, {}, LocaleInfo); var instance_0; var Lcom_google_gwt_i18n_client_LocaleInfo_2_classLit = createForClass('com.google.gwt.i18n.client', 'LocaleInfo', 1120); function $getISOTimeZoneString(this$static){ var data_0, offset; offset = -this$static.standardOffset; data_0 = stampJavaTypeInfo(getClassLiteralForArray(C_classLit, 1), $intern_45, 28, 15, [43, 48, 48, 58, 48, 48]); if (offset < 0) { data_0[0] = 45; offset = -offset; } data_0[1] = data_0[1] + ((offset / 60 | 0) / 10 | 0) & $intern_47; data_0[2] = data_0[2] + (offset / 60 | 0) % 10 & $intern_47; data_0[4] = data_0[4] + (offset % 60 / 10 | 0) & $intern_47; data_0[5] = data_0[5] + offset % 10 & $intern_47; return valueOf_8(data_0, 0, data_0.length); } function $getRFCTimeZoneString(this$static){ var data_0, offset; offset = -this$static.standardOffset; data_0 = stampJavaTypeInfo(getClassLiteralForArray(C_classLit, 1), $intern_45, 28, 15, [43, 48, 48, 48, 48]); if (offset < 0) { data_0[0] = 45; offset = -offset; } data_0[1] = data_0[1] + ((offset / 60 | 0) / 10 | 0) & $intern_47; data_0[2] = data_0[2] + (offset / 60 | 0) % 10 & $intern_47; data_0[3] = data_0[3] + (offset % 60 / 10 | 0) & $intern_47; data_0[4] = data_0[4] + offset % 10 & $intern_47; return valueOf_8(data_0, 0, data_0.length); } function TimeZone(){ } function composeGMTString(offset){ var data_0; data_0 = stampJavaTypeInfo(getClassLiteralForArray(C_classLit, 1), $intern_45, 28, 15, [71, 77, 84, 45, 48, 48, 58, 48, 48]); if (offset <= 0) { data_0[3] = 43; offset = -offset; } data_0[4] = data_0[4] + ((offset / 60 | 0) / 10 | 0) & $intern_47; data_0[5] = data_0[5] + (offset / 60 | 0) % 10 & $intern_47; data_0[7] = data_0[7] + (offset % 60 / 10 | 0) & $intern_47; data_0[8] = data_0[8] + offset % 10 & $intern_47; return valueOf_8(data_0, 0, data_0.length); } function composePOSIXTimeZoneID(offset){ var str; if (offset == 0) { return 'Etc/GMT'; } if (offset < 0) { offset = -offset; str = 'Etc/GMT-'; } else { str = 'Etc/GMT+'; } return str + offsetDisplay(offset); } function composeUTCString(offset){ var str; if (offset == 0) { return 'UTC'; } if (offset < 0) { offset = -offset; str = 'UTC+'; } else { str = 'UTC-'; } return str + offsetDisplay(offset); } function createTimeZone(timeZoneOffsetInMinutes){ var tz; tz = new TimeZone; tz.standardOffset = timeZoneOffsetInMinutes; tz.timezoneID = composePOSIXTimeZoneID(timeZoneOffsetInMinutes); tz.tzNames = initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, 2, 6, 1); tz.tzNames[0] = composeUTCString(timeZoneOffsetInMinutes); tz.tzNames[1] = composeUTCString(timeZoneOffsetInMinutes); return tz; } function offsetDisplay(offset){ var hour, mins; hour = offset / 60 | 0; mins = offset % 60; if (mins == 0) { return '' + hour; } return '' + hour + ':' + ('' + mins); } defineClass(2027, 1, {}, TimeZone); _.standardOffset = 0; var Lcom_google_gwt_i18n_client_TimeZone_2_classLit = createForClass('com.google.gwt.i18n.client', 'TimeZone', 2027); function DateTimeFormatInfoImpl(){ } defineClass(1293, 2102, {}, DateTimeFormatInfoImpl); var Lcom_google_gwt_i18n_client_impl_cldr_DateTimeFormatInfoImpl_2_classLit = createForClass('com.google.gwt.i18n.client.impl.cldr', 'DateTimeFormatInfoImpl', 1293); function DateTimeFormat$PatternPart(txt, cnt){ this.text_0 = txt; this.count = cnt; this.abutStart = false; } defineClass(443, 1, {443:1}, DateTimeFormat$PatternPart); _.abutStart = false; _.count = 0; var Lcom_google_gwt_i18n_shared_DateTimeFormat$PatternPart_2_classLit = createForClass('com.google.gwt.i18n.shared', 'DateTimeFormat/PatternPart', 443); function $compareTo_0(this$static, other){ return compare_6(fromDouble_0(this$static.jsdate.getTime()), fromDouble_0(other.jsdate.getTime())); } function $fixDaylightSavings(this$static, requestedHours){ var badHours, copy, day, newTime, originalTimeInMillis, timeDiff, timeDiffHours, timeDiffMinutes; requestedHours %= 24; if (this$static.jsdate.getHours() != requestedHours) { copy = new $wnd.Date(this$static.jsdate.getTime()); copy.setDate(copy.getDate() + 1); timeDiff = this$static.jsdate.getTimezoneOffset() - copy.getTimezoneOffset(); if (timeDiff > 0) { timeDiffHours = timeDiff / 60 | 0; timeDiffMinutes = timeDiff % 60; day = this$static.jsdate.getDate(); badHours = this$static.jsdate.getHours(); badHours + timeDiffHours >= 24 && ++day; newTime = new $wnd.Date(this$static.jsdate.getFullYear(), this$static.jsdate.getMonth(), day, requestedHours + timeDiffHours, this$static.jsdate.getMinutes() + timeDiffMinutes, this$static.jsdate.getSeconds(), this$static.jsdate.getMilliseconds()); this$static.jsdate.setTime(newTime.getTime()); } } originalTimeInMillis = this$static.jsdate.getTime(); this$static.jsdate.setTime(originalTimeInMillis + 3600000); this$static.jsdate.getHours() != requestedHours && this$static.jsdate.setTime(originalTimeInMillis); } function $setDate(this$static, date){ var hours; hours = this$static.jsdate.getHours(); this$static.jsdate.setDate(date); $fixDaylightSavings(this$static, hours); } function $setHours(this$static, hours){ this$static.jsdate.setHours(hours); $fixDaylightSavings(this$static, hours); } function $setMinutes(this$static, minutes){ var hours; hours = this$static.jsdate.getHours() + (minutes / 60 | 0); this$static.jsdate.setMinutes(minutes); $fixDaylightSavings(this$static, hours); } function $setMonth(this$static, month){ var hours; hours = this$static.jsdate.getHours(); this$static.jsdate.setMonth(month); $fixDaylightSavings(this$static, hours); } function $setSeconds(this$static, seconds){ var hours; hours = this$static.jsdate.getHours() + (seconds / 3600 | 0); this$static.jsdate.setSeconds(seconds); $fixDaylightSavings(this$static, hours); } function $setTime(this$static, time){ this$static.jsdate.setTime(toDouble_0(time)); } function $setYear(this$static, year){ var hours; hours = this$static.jsdate.getHours(); this$static.jsdate.setFullYear(year + $intern_48); $fixDaylightSavings(this$static, hours); } function Date_0(){ this.jsdate = new $wnd.Date; } function Date_1(year, month, date){ this.jsdate = new $wnd.Date; this.jsdate.setFullYear(year + $intern_48, month, date); this.jsdate.setHours(0, 0, 0, 0); $fixDaylightSavings(this, 0); } function Date_2(date){ this.jsdate = new $wnd.Date(toDouble_0(date)); } function padTwo(number){ return number < 10?'0' + number:'' + number; } defineClass(206, 1, $intern_50, Date_0, Date_1, Date_2); _.compareTo_0 = function compareTo_4(other){ return $compareTo_0(this, castTo(other, 206)); } ; _.equals_0 = function equals_30(obj){ return instanceOf(obj, 206) && eq(fromDouble_0(this.jsdate.getTime()), fromDouble_0(castTo(obj, 206).jsdate.getTime())); } ; _.hashCode_1 = function hashCode_30(){ var time; time = fromDouble_0(this.jsdate.getTime()); return toInt_0(xor_0(time, shru_0(time, 32))); } ; _.toString_0 = function toString_31(){ var hourOffset, minuteOffset, offset; offset = -this.jsdate.getTimezoneOffset(); hourOffset = (offset >= 0?'+':'') + (offset / 60 | 0); minuteOffset = padTwo($wnd.Math.abs(offset) % 60); return ($clinit_Date$StringData() , DAYS)[this.jsdate.getDay()] + ' ' + MONTHS[this.jsdate.getMonth()] + ' ' + padTwo(this.jsdate.getDate()) + ' ' + padTwo(this.jsdate.getHours()) + ':' + padTwo(this.jsdate.getMinutes()) + ':' + padTwo(this.jsdate.getSeconds()) + ' GMT' + hourOffset + minuteOffset + ' ' + this.jsdate.getFullYear(); } ; var Ljava_util_Date_2_classLit = createForClass('java.util', 'Date', 206); function $calcDate(this$static, date){ var adjustment, daysInCurrentMonth, defaultCenturyStart, offset, orgDayOfMonth, orgMonth, tmp; this$static.era == 0 && this$static.year > 0 && (this$static.year = -(this$static.year - 1)); this$static.year > $intern_43 && $setYear(date, this$static.year - $intern_48); orgDayOfMonth = date.jsdate.getDate(); $setDate(date, 1); this$static.month >= 0 && $setMonth(date, this$static.month); if (this$static.dayOfMonth >= 0) { $setDate(date, this$static.dayOfMonth); } else if (this$static.month >= 0) { tmp = new Date_1(date.jsdate.getFullYear() - $intern_48, date.jsdate.getMonth(), 35); daysInCurrentMonth = 35 - tmp.jsdate.getDate(); $setDate(date, $wnd.Math.min(daysInCurrentMonth, orgDayOfMonth)); } else { $setDate(date, orgDayOfMonth); } this$static.hours < 0 && (this$static.hours = date.jsdate.getHours()); this$static.ampm > 0 && this$static.hours < 12 && (this$static.hours += 12); $setHours(date, this$static.hours == 24 && this$static.midnightIs24?0:this$static.hours); this$static.minutes >= 0 && $setMinutes(date, this$static.minutes); this$static.seconds >= 0 && $setSeconds(date, this$static.seconds); this$static.milliseconds >= 0 && $setTime(date, add_20(mul_0(div(fromDouble_0(date.jsdate.getTime()), $intern_46), $intern_46), this$static.milliseconds)); if (this$static.ambiguousYear) { defaultCenturyStart = new Date_0; $setYear(defaultCenturyStart, defaultCenturyStart.jsdate.getFullYear() - $intern_48 - 80); lt(fromDouble_0(date.jsdate.getTime()), fromDouble_0(defaultCenturyStart.jsdate.getTime())) && $setYear(date, defaultCenturyStart.jsdate.getFullYear() - $intern_48 + 100); } if (this$static.dayOfWeek >= 0) { if (this$static.dayOfMonth == -1) { adjustment = (7 + this$static.dayOfWeek - date.jsdate.getDay()) % 7; adjustment > 3 && (adjustment -= 7); orgMonth = date.jsdate.getMonth(); $setDate(date, date.jsdate.getDate() + adjustment); date.jsdate.getMonth() != orgMonth && $setDate(date, date.jsdate.getDate() + (adjustment > 0?-7:7)); } else { if (date.jsdate.getDay() != this$static.dayOfWeek) { return false; } } } if (this$static.tzOffset > $intern_43) { offset = date.jsdate.getTimezoneOffset(); $setTime(date, add_20(fromDouble_0(date.jsdate.getTime()), (this$static.tzOffset - offset) * 60 * $intern_46)); } return true; } function DateRecord(){ Date_0.call(this); this.era = -1; this.ambiguousYear = false; this.year = $intern_43; this.month = -1; this.dayOfMonth = -1; this.ampm = -1; this.midnightIs24 = false; this.hours = -1; this.minutes = -1; this.seconds = -1; this.milliseconds = -1; this.dayOfWeek = -1; this.tzOffset = $intern_43; } defineClass(2015, 206, $intern_50, DateRecord); _.ambiguousYear = false; _.ampm = 0; _.dayOfMonth = 0; _.dayOfWeek = 0; _.era = 0; _.hours = 0; _.midnightIs24 = false; _.milliseconds = 0; _.minutes = 0; _.month = 0; _.seconds = 0; _.tzOffset = 0; _.year = 0; var Lcom_google_gwt_i18n_shared_impl_DateRecord_2_classLit = createForClass('com.google.gwt.i18n.shared.impl', 'DateRecord', 2015); defineClass(2064, 1, {}); _.isArray_0 = function isArray(){ return null; } ; _.isBoolean = function isBoolean(){ return null; } ; _.isNumber = function isNumber(){ return null; } ; _.isObject = function isObject(){ return null; } ; _.isString = function isString(){ return null; } ; var Lcom_google_gwt_json_client_JSONValue_2_classLit = createForClass('com.google.gwt.json.client', 'JSONValue', 2064); function $get_8(this$static, index_0){ var v = this$static.jsArray[index_0]; var func = ($clinit_JSONParser() , typeMap)[typeof v]; return func?func(v):throwUnknownTypeException(typeof v); } function $set_0(this$static, index_0, value_0){ var previous; previous = $get_8(this$static, index_0); $set0(this$static, index_0, value_0); return previous; } function $set0(this$static, index_0, value_0){ if (value_0) { var func = value_0.getUnwrapper(); value_0 = func(value_0); } else { value_0 = undefined; } this$static.jsArray[index_0] = value_0; } function JSONArray(){ this.jsArray = []; } function JSONArray_0(arr){ this.jsArray = arr; } function unwrap(value_0){ return value_0.jsArray; } defineClass(221, 2064, {221:1}, JSONArray, JSONArray_0); _.equals_0 = function equals_31(other){ if (!instanceOf(other, 221)) { return false; } return $equals_3(this.jsArray, castTo(other, 221).jsArray); } ; _.getUnwrapper = function getUnwrapper(){ return unwrap; } ; _.hashCode_1 = function hashCode_31(){ return $hashCode(this.jsArray); } ; _.isArray_0 = function isArray_0(){ return this; } ; _.toString_0 = function toString_32(){ var c, i, sb; sb = new StringBuilder_1('['); for (i = 0 , c = this.jsArray.length; i < c; i++) { i > 0 && (sb.string += ',' , sb); $append_10(sb, $get_8(this, i)); } sb.string += ']'; return sb.string; } ; var Lcom_google_gwt_json_client_JSONArray_2_classLit = createForClass('com.google.gwt.json.client', 'JSONArray', 221); function $clinit_JSONBoolean(){ $clinit_JSONBoolean = emptyMethod; FALSE = new JSONBoolean(false); TRUE = new JSONBoolean(true); } function JSONBoolean(value_0){ this.value_0 = value_0; } function unwrap_0(value_0){ return value_0.value_0; } defineClass(493, 2064, {493:1}, JSONBoolean); _.getUnwrapper = function getUnwrapper_0(){ return unwrap_0; } ; _.isBoolean = function isBoolean_0(){ return this; } ; _.toString_0 = function toString_33(){ return $clinit_Boolean() , '' + 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', 493); function JSONException(message){ RuntimeException_0.call(this, message); } defineClass(997, 63, $intern_44, JSONException); var Lcom_google_gwt_json_client_JSONException_2_classLit = createForClass('com.google.gwt.json.client', 'JSONException', 997); function $clinit_JSONNull(){ $clinit_JSONNull = emptyMethod; instance_1 = new JSONNull; } function JSONNull(){ } function unwrap_1(){ return null; } defineClass(1036, 2064, {}, JSONNull); _.getUnwrapper = function getUnwrapper_1(){ return unwrap_1; } ; _.toString_0 = function toString_34(){ return 'null'; } ; var instance_1; var Lcom_google_gwt_json_client_JSONNull_2_classLit = createForClass('com.google.gwt.json.client', 'JSONNull', 1036); function JSONNumber(value_0){ this.value_0 = value_0; } function unwrap_2(value_0){ return value_0.value_0; } defineClass(263, 2064, {263:1}, JSONNumber); _.equals_0 = function equals_32(other){ if (!instanceOf(other, 263)) { return false; } return this.value_0 == castTo(other, 263).value_0; } ; _.getUnwrapper = function getUnwrapper_2(){ return unwrap_2; } ; _.hashCode_1 = function hashCode_32(){ return $hashCode_1(this.value_0); } ; _.isNumber = function isNumber_0(){ return this; } ; _.toString_0 = function toString_35(){ return this.value_0 + ''; } ; _.value_0 = 0; var Lcom_google_gwt_json_client_JSONNumber_2_classLit = createForClass('com.google.gwt.json.client', 'JSONNumber', 263); function $computeKeys0(this$static, result){ var jsObject = this$static.jsObject; var i = 0; for (var key in jsObject) { jsObject.hasOwnProperty(key) && (result[i++] = key); } return result; } function $containsKey_2(this$static, key){ return key in this$static.jsObject; } function $get_9(this$static, key){ if (key == null) { throw toJs(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 $put_5(this$static, key, jsonValue){ var previous; if (key == null) { throw toJs(new NullPointerException); } previous = $get_9(this$static, key); $put0(this$static, key, jsonValue); return previous; } function $put0(this$static, key, value_0){ if (value_0) { var func = value_0.getUnwrapper(); this$static.jsObject[key] = func(value_0); } else { delete this$static.jsObject[key]; } } function JSONObject(){ JSONObject_0.call(this, {}); } function JSONObject_0(jsValue){ this.jsObject = jsValue; } function unwrap_3(value_0){ return value_0.jsObject; } defineClass(190, 2064, {190:1}, JSONObject, JSONObject_0); _.equals_0 = function equals_33(other){ if (!instanceOf(other, 190)) { return false; } return $equals_3(this.jsObject, castTo(other, 190).jsObject); } ; _.getUnwrapper = function getUnwrapper_3(){ return unwrap_3; } ; _.hashCode_1 = function hashCode_33(){ return $hashCode(this.jsObject); } ; _.isObject = function isObject_0(){ return this; } ; _.toString_0 = function toString_36(){ var first, key, key$array, key$index, key$max, keys_0, sb; sb = new StringBuilder_1('{'); first = true; keys_0 = $computeKeys0(this, initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, 0, 6, 1)); for (key$array = keys_0 , key$index = 0 , key$max = key$array.length; key$index < key$max; ++key$index) { key = key$array[key$index]; first?(first = false):(sb.string += ', ' , sb); $append_11(sb, escapeValue(key)); sb.string += ':'; $append_10(sb, $get_9(this, key)); } sb.string += '}'; return sb.string; } ; var Lcom_google_gwt_json_client_JSONObject_2_classLit = createForClass('com.google.gwt.json.client', 'JSONObject', 190); function JSONObject$1(this$0, val$keys){ this.this$01 = this$0; this.val$keys2 = val$keys; } defineClass(605, $intern_9, $intern_10, JSONObject$1); _.contains = function contains_27(o){ return instanceOfString(o) && $containsKey_2(this.this$01, castToString(o)); } ; _.iterator_0 = function iterator_45(){ return new AbstractList$IteratorImpl(new Arrays$ArrayList(this.val$keys2)); } ; _.size_1 = function size_36(){ return this.val$keys2.length; } ; var Lcom_google_gwt_json_client_JSONObject$1_2_classLit = createForClass('com.google.gwt.json.client', 'JSONObject/1', 605); 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_1; } 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_0(o); } else { return new JSONObject_0(o); } } function createString(v){ return new JSONString(v); } function createUndefined(){ return null; } function throwUnknownTypeException(typeString){ $clinit_JSONParser(); throw toJs(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 toJs(new NullPointerException); } this.value_0 = value_0; } function unwrap_4(value_0){ return value_0.value_0; } defineClass(211, 2064, {211:1}, JSONString); _.equals_0 = function equals_34(other){ if (!instanceOf(other, 211)) { return false; } return $equals_5(this.value_0, castTo(other, 211).value_0); } ; _.getUnwrapper = function getUnwrapper_4(){ return unwrap_4; } ; _.hashCode_1 = function hashCode_34(){ return $hashCode_2(this.value_0); } ; _.isString = function isString_0(){ return this; } ; _.toString_0 = function toString_37(){ return escapeValue(this.value_0); } ; var Lcom_google_gwt_json_client_JSONString_2_classLit = createForClass('com.google.gwt.json.client', 'JSONString', 211); function canSet(array, value_0){ var elementTypeCategory; switch (getElementTypeCategory(array)) { case 6: return instanceOfString(value_0); case 7: return instanceOfDouble(value_0); case 8: return instanceOfBoolean(value_0); case 3: return Array.isArray(value_0) && (elementTypeCategory = getElementTypeCategory(value_0) , !(elementTypeCategory >= 14 && elementTypeCategory <= 16)); case 11: return value_0 != null && typeof value_0 === 'function'; case 12: return value_0 != null && (typeof value_0 === 'object' || typeof value_0 == 'function'); 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?10:array.__elementTypeCategory$; } function initMultidimensionalArray(leafClassLiteral, castableTypeMapExprs, elementTypeIds, leafElementTypeCategory, dimExprs, count){ return initMultidimensionalArray_0(leafClassLiteral, castableTypeMapExprs, elementTypeIds, leafElementTypeCategory, dimExprs, 0, count); } function initMultidimensionalArray_0(leafClassLiteral, castableTypeMapExprs, elementTypeIds, leafElementTypeCategory, dimExprs, index_0, count){ var elementTypeCategory, i, isLastDimension, length_0, result; length_0 = dimExprs[index_0]; isLastDimension = index_0 == count - 1; elementTypeCategory = isLastDimension?leafElementTypeCategory:0; result = initializeArrayElementsWithDefaults(elementTypeCategory, length_0); leafElementTypeCategory != 10 && stampJavaTypeInfo(getClassLiteralForArray(leafClassLiteral, count - index_0), castableTypeMapExprs[index_0], elementTypeIds[index_0], elementTypeCategory, result); if (!isLastDimension) { ++index_0; for (i = 0; i < length_0; ++i) { result[i] = initMultidimensionalArray_0(leafClassLiteral, castableTypeMapExprs, elementTypeIds, leafElementTypeCategory, dimExprs, index_0, count); } } return result; } function initUnidimensionalArray(leafClassLiteral, castableTypeMap, elementTypeId, length_0, elementTypeCategory, dimensions){ var result; result = initializeArrayElementsWithDefaults(elementTypeCategory, length_0); elementTypeCategory != 10 && 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 14: case 15: initValue = 0; break; case 16: initValue = false; break; default:return array; } for (var i = 0; i < length_0; ++i) { array[i] = 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) != 10 && stampJavaTypeInfo(getClass__Ljava_lang_Class___devirtual$(referenceType), referenceType.castableTypeMap, referenceType.__elementTypeId$, getElementTypeCategory(referenceType), array); return array; } function create_0(value_0){ var a0, a1, a2; a0 = value_0 & $intern_51; a1 = value_0 >> 22 & $intern_51; a2 = value_0 < 0?$intern_52:0; return create0(a0, a1, a2); } function create_1(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 toJs(new ArithmeticException('divide by zero')); } 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_53 && b.m == 0 && b.l == 0) { return divModByMinValue(a, computeRemainder); } negative = false; if (b.h >> 19 != 0) { b = neg(b); negative = !negative; } bpower = powerOfTwo(b); aIsNegative = false; aIsMinValue = false; aIsCopy = false; if (a.h == $intern_53 && a.m == 0 && a.l == 0) { aIsMinValue = true; aIsNegative = true; if (bpower == -1) { a = create_1(($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_1(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_53 && a.m == 0 && a.l == 0) { computeRemainder && (remainder = create0(0, 0, 0)); return create_1(($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_1(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_51; neg1 = ~a.m + (neg0 == 0?1:0) & $intern_51; neg2 = ~a.h + (neg0 == 0 && neg1 == 0?1:0) & $intern_52; 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_54 + a.h * $intern_55; } 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_51; a.m = sum1 & $intern_51; a.h = sum2 & $intern_52; return true; } var remainder; function add_19(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_51, sum1 & $intern_51, sum2 & $intern_52); } function and(a, b){ return create0(a.l & b.l, a.m & b.m, a.h & b.h); } function compare_1(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_55) { a2 = round_int(value_0 / $intern_55); value_0 -= a2 * $intern_55; } a1 = 0; if (value_0 >= $intern_54) { a1 = round_int(value_0 / $intern_54); value_0 -= a1 * $intern_54; } a0 = round_int(value_0); result = create0(a0, a1, a2); negative && negate(result); return result; } function mul(a, b){ var a0, a1, a2, a3, a4, b0, b1, b2, b3, b4, c0, c00, c01, c1, c10, c11, c12, c13, c2, c22, c23, c24, p0, p1, p2, p3, p4; a0 = a.l & 8191; a1 = a.l >> 13 | (a.m & 15) << 9; a2 = a.m >> 4 & 8191; a3 = a.m >> 17 | (a.h & 255) << 5; a4 = (a.h & 1048320) >> 8; b0 = b.l & 8191; b1 = b.l >> 13 | (b.m & 15) << 9; b2 = b.m >> 4 & 8191; b3 = b.m >> 17 | (b.h & 255) << 5; b4 = (b.h & 1048320) >> 8; p0 = a0 * b0; p1 = a1 * b0; p2 = a2 * b0; p3 = a3 * b0; p4 = a4 * b0; if (b1 != 0) { p1 += a0 * b1; p2 += a1 * b1; p3 += a2 * b1; p4 += a3 * b1; } if (b2 != 0) { p2 += a0 * b2; p3 += a1 * b2; p4 += a2 * b2; } if (b3 != 0) { p3 += a0 * b3; p4 += a1 * b3; } b4 != 0 && (p4 += a0 * b4); c00 = p0 & $intern_51; c01 = (p1 & 511) << 13; c0 = c00 + c01; c10 = p0 >> 22; c11 = p1 >> 9; c12 = (p2 & 262143) << 4; c13 = (p3 & 31) << 17; c1 = c10 + c11 + c12 + c13; c22 = p2 >> 18; c23 = p3 >> 5; c24 = (p4 & 4095) << 8; c2 = c22 + c23 + c24; c1 += c0 >> 22; c0 &= $intern_51; c2 += c1 >> 22; c1 &= $intern_51; c2 &= $intern_52; return create0(c0, c1, c2); } function neg(a){ var neg0, neg1, neg2; neg0 = ~a.l + 1 & $intern_51; neg1 = ~a.m + (neg0 == 0?1:0) & $intern_51; neg2 = ~a.h + (neg0 == 0 && neg1 == 0?1:0) & $intern_52; return create0(neg0, neg1, neg2); } function not(a){ return create0(~a.l & $intern_51, ~a.m & $intern_51, ~a.h & $intern_52); } function or(a, b){ return create0(a.l | b.l, a.m | b.m, a.h | b.h); } 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_51, res1 & $intern_51, res2 & $intern_52); } function shr(a, n){ var a2, negative, res0, res1, res2; n &= 63; a2 = a.h; negative = (a2 & $intern_53) != 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_52:0; res1 = a2 >> n - 22; res0 = a.m >> n - 22 | a2 << 44 - n; } else { res2 = negative?$intern_52:0; res1 = negative?$intern_51:0; res0 = a2 >> n - 44; } return create0(res0 & $intern_51, res1 & $intern_51, res2 & $intern_52); } function shru(a, n){ var a2, res0, res1, res2; n &= 63; a2 = a.h & $intern_52; 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 = 0; res1 = a2 >>> n - 22; res0 = a.m >> n - 22 | a.h << 44 - n; } else { res2 = 0; res1 = 0; res0 = a2 >>> n - 44; } return create0(res0 & $intern_51, res1 & $intern_51, res2 & $intern_52); } function sub_1(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_51, sum1 & $intern_51, sum2 & $intern_52); } function toDouble(a){ if (compare_1(a, ($clinit_BigLongLib$Const() , ZERO)) < 0) { return -toDoubleHelper(neg(a)); } return a.l + a.m * $intern_54 + a.h * $intern_55; } function toInt(a){ return a.l | a.m << 22; } function toString_38(a){ var digits, rem, res, tenPowerLong, zeroesNeeded; if (a.l == 0 && a.m == 0 && a.h == 0) { return '0'; } if (a.h == $intern_53 && a.m == 0 && a.l == 0) { return '-9223372036854775808'; } if (a.h >> 19 != 0) { return '-' + toString_38(neg(a)); } rem = a; res = ''; while (!(rem.l == 0 && rem.m == 0 && rem.h == 0)) { tenPowerLong = create_0($intern_56); rem = divMod(rem, tenPowerLong, true); digits = '' + toInt(remainder); if (!(rem.l == 0 && rem.m == 0 && rem.h == 0)) { zeroesNeeded = 9 - digits.length; for (; zeroesNeeded > 0; zeroesNeeded--) { digits = '0' + digits; } } res = digits + res; } return res; } function xor(a, b){ return create0(a.l ^ b.l, a.m ^ b.m, a.h ^ b.h); } function $clinit_BigLongLib$Const(){ $clinit_BigLongLib$Const = emptyMethod; MAX_VALUE = create0($intern_51, $intern_51, 524287); MIN_VALUE = create0(0, 0, $intern_53); ONE = create_0(1); create_0(2); ZERO = create_0(0); } var MAX_VALUE, MIN_VALUE, ONE, ZERO; function toJava(e){ var javaException; if (instanceOf(e, 82)) { return e; } javaException = e && e.__java$exception; if (!javaException) { javaException = new JavaScriptException(e); captureStackTrace(javaException); } return javaException; } function toJs(t){ return t.backingJsObject; } function add_20(a, b){ var result; if (isSmallLong0(a) && isSmallLong0(b)) { result = a + b; if ($intern_57 < result && result < $intern_55) { return result; } } return createLongEmul(add_19(isSmallLong0(a)?toBigLong(a):a, isSmallLong0(b)?toBigLong(b):b)); } function and_0(a, b){ return createLongEmul(and(isSmallLong0(a)?toBigLong(a):a, isSmallLong0(b)?toBigLong(b):b)); } function compare_2(a, b){ var result; if (isSmallLong0(a) && isSmallLong0(b)) { result = a - b; if (!isNaN(result)) { return result; } } return compare_1(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_54; } if (a2 == $intern_52) { return big_0.l + big_0.m * $intern_54 - $intern_55; } return big_0; } function div(a, b){ var result; if (isSmallLong0(a) && isSmallLong0(b)) { result = a / b; if ($intern_57 < result && result < $intern_55) { return result < 0?$wnd.Math.ceil(result):$wnd.Math.floor(result); } } return createLongEmul(divMod(isSmallLong0(a)?toBigLong(a):a, isSmallLong0(b)?toBigLong(b):b, false)); } function eq(a, b){ return compare_2(a, b) == 0; } function fromDouble_0(value_0){ if ($intern_57 < value_0 && value_0 < $intern_55) { return value_0 < 0?$wnd.Math.ceil(value_0):$wnd.Math.floor(value_0); } return createLongEmul(fromDouble(value_0)); } function gt(a, b){ return compare_2(a, b) > 0; } function gte_0(a, b){ return compare_2(a, b) >= 0; } function isSmallLong0(value_0){ return typeof value_0 === 'number'; } function lt(a, b){ return compare_2(a, b) < 0; } function mod(a, b){ var result; if (isSmallLong0(a) && isSmallLong0(b)) { result = a % b; if ($intern_57 < result && result < $intern_55) { return result; } } return createLongEmul((divMod(isSmallLong0(a)?toBigLong(a):a, isSmallLong0(b)?toBigLong(b):b, true) , remainder)); } function mul_0(a, b){ var result; if (isSmallLong0(a) && isSmallLong0(b)) { result = a * b; if ($intern_57 < result && result < $intern_55) { return result; } } return createLongEmul(mul(isSmallLong0(a)?toBigLong(a):a, isSmallLong0(b)?toBigLong(b):b)); } function neg_0(a){ var result; if (isSmallLong0(a)) { result = 0 - a; if (!isNaN(result)) { return result; } } return createLongEmul(neg(a)); } function neq(a, b){ return compare_2(a, b) != 0; } function not_0(a){ return createLongEmul(not(isSmallLong0(a)?toBigLong(a):a)); } function or_0(a, b){ return createLongEmul(or(isSmallLong0(a)?toBigLong(a):a, isSmallLong0(b)?toBigLong(b):b)); } function shl_0(a, n){ return createLongEmul(shl(isSmallLong0(a)?toBigLong(a):a, n)); } function shr_0(a, n){ return createLongEmul(shr(isSmallLong0(a)?toBigLong(a):a, n)); } function shru_0(a, n){ return createLongEmul(shru(isSmallLong0(a)?toBigLong(a):a, n)); } function sub_2(a, b){ var result; if (isSmallLong0(a) && isSmallLong0(b)) { result = a - b; if ($intern_57 < result && result < $intern_55) { return result; } } return createLongEmul(sub_1(isSmallLong0(a)?toBigLong(a):a, isSmallLong0(b)?toBigLong(b):b)); } function toBigLong(longValue){ var a0, a1, a3, value_0; value_0 = longValue; a3 = 0; if (value_0 < 0) { value_0 += $intern_55; a3 = $intern_52; } a1 = round_int(value_0 / $intern_54); a0 = round_int(value_0 - a1 * $intern_54); 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_39(a){ if (isSmallLong0(a)) { return '' + a; } return toString_38(a); } function xor_0(a, b){ return createLongEmul(xor(isSmallLong0(a)?toBigLong(a):a, isSmallLong0(b)?toBigLong(b):b)); } function init(){ $clinit_ElkJs(); exportLayout(); } function $split(this$static, input_0){ return input_0.split(this$static); } defineClass(2060, 1, {533:1}); var Ljava_io_OutputStream_2_classLit = createForClass('java.io', 'OutputStream', 2060); defineClass(2061, 2060, {533:1}); var Ljava_io_FilterOutputStream_2_classLit = createForClass('java.io', 'FilterOutputStream', 2061); function $println(x_0){ !x_0?'null':$toString_4(x_0, x_0.getMessage()); String.fromCharCode(10); } function PrintStream(){ } defineClass(878, 2061, {533:1}, PrintStream); var Ljava_io_PrintStream_2_classLit = createForClass('java.io', 'PrintStream', 878); function $replace0(this$static, start_0, end, toInsert){ var length_0; length_0 = this$static.string.length; end > length_0?(end = length_0):checkCriticalStringElementIndex(start_0, end + 1); this$static.string = $substring_1(this$static.string, 0, start_0) + ('' + toInsert) + $substring_0(this$static.string, end); } function $substring(this$static, end){ return $substring_1(this$static.string, 0, end); } function AbstractStringBuilder(string){ this.string = string; } defineClass(427, 1, {484:1}); _.toString_0 = function toString_41(){ return this.string; } ; var Ljava_lang_AbstractStringBuilder_2_classLit = createForClass('java.lang', 'AbstractStringBuilder', 427); function ArithmeticException(explanation){ RuntimeException_0.call(this, explanation); } defineClass(538, 63, $intern_44, ArithmeticException); var Ljava_lang_ArithmeticException_2_classLit = createForClass('java.lang', 'ArithmeticException', 538); function IndexOutOfBoundsException(){ RuntimeException.call(this); } function IndexOutOfBoundsException_0(message){ RuntimeException_0.call(this, message); } defineClass(77, 63, $intern_58, IndexOutOfBoundsException, IndexOutOfBoundsException_0); var Ljava_lang_IndexOutOfBoundsException_2_classLit = createForClass('java.lang', 'IndexOutOfBoundsException', 77); function ArrayIndexOutOfBoundsException(){ IndexOutOfBoundsException.call(this); } function ArrayIndexOutOfBoundsException_0(msg){ IndexOutOfBoundsException_0.call(this, msg); } defineClass(333, 77, {3:1, 333:1, 103:1, 77:1, 63:1, 82:1}, ArrayIndexOutOfBoundsException, ArrayIndexOutOfBoundsException_0); var Ljava_lang_ArrayIndexOutOfBoundsException_2_classLit = createForClass('java.lang', 'ArrayIndexOutOfBoundsException', 333); function ArrayStoreException(){ RuntimeException.call(this); } function ArrayStoreException_0(message){ RuntimeException_0.call(this, message); } defineClass(537, 63, $intern_44, ArrayStoreException, ArrayStoreException_0); var Ljava_lang_ArrayStoreException_2_classLit = createForClass('java.lang', 'ArrayStoreException', 537); function Error_0(message){ Throwable_0.call(this, message); } function Error_1(message, cause){ Throwable_1.call(this, message, cause); } defineClass(296, 82, $intern_59, Error_0); var Ljava_lang_Error_2_classLit = createForClass('java.lang', 'Error', 296); function AssertionError(){ Throwable.call(this); } function AssertionError_0(message){ Error_1.call(this, message == null?'null':toString_40(message), instanceOf(message, 82)?castTo(message, 82):null); } defineClass(200, 296, $intern_59, AssertionError, AssertionError_0); var Ljava_lang_AssertionError_2_classLit = createForClass('java.lang', 'AssertionError', 200); function $clinit_Boolean(){ $clinit_Boolean = emptyMethod; FALSE_0 = false; TRUE_0 = true; } function $booleanValue(this$static){ return checkCriticalNotNull(this$static) , this$static; } function $compareTo_1(this$static, b){ return compare_3((checkCriticalNotNull(this$static) , this$static), (checkCriticalNotNull(b) , b)); } function $hashCode_0(this$static){ return (checkCriticalNotNull(this$static) , this$static)?1231:1237; } function compare_3(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_9(this$static, castToString(other)):instanceOfDouble(this$static)?$compareTo_4(this$static, castToDouble(other)):instanceOfBoolean(this$static)?$compareTo_1(this$static, castToBoolean(other)):this$static.compareTo_0(other); } booleanCastMap = {3:1, 485:1, 34:1}; var FALSE_0, TRUE_0; var Ljava_lang_Boolean_2_classLit = createForClass('java.lang', 'Boolean', 485); function __parseAndValidateDouble(s){ floatRegex == null && (floatRegex = new RegExp('^\\s*[+-]?(NaN|Infinity|((\\d+\\.?\\d*)|(\\.\\d+))([eE][+-]?\\d+)?[dDfF]?)\\s*$')); if (!floatRegex.test(s)) { throw toJs(new NumberFormatException('For input string: "' + s + '"')); } return parseFloat(s); } function __parseAndValidateInt(s, lowerBound, upperBound){ var i, isTooLow, length_0, startIndex, toReturn; if (s == null) { throw toJs(new NumberFormatException('null')); } length_0 = s.length; startIndex = length_0 > 0 && (checkCriticalStringElementIndex(0, s.length) , s.charCodeAt(0) == 45 || (checkCriticalStringElementIndex(0, s.length) , s.charCodeAt(0) == 43))?1:0; for (i = startIndex; i < length_0; i++) { if (digit_0((checkCriticalStringElementIndex(i, s.length) , s.charCodeAt(i))) == -1) { throw toJs(new NumberFormatException('For input string: "' + s + '"')); } } toReturn = parseInt(s, 10); isTooLow = toReturn < lowerBound; if (isNaN(toReturn)) { throw toJs(new NumberFormatException('For input string: "' + s + '"')); } else if (isTooLow || toReturn > upperBound) { throw toJs(new NumberFormatException('For input string: "' + s + '"')); } return toReturn; } function __parseAndValidateLong(s){ var c, firstTime, head, i, length_0, maxDigits, minValue, negative, orig, radixPower, toReturn; if (s == null) { throw toJs(new NumberFormatException('null')); } orig = s; length_0 = s.length; negative = false; if (length_0 > 0) { c = (checkCriticalStringElementIndex(0, s.length) , s.charCodeAt(0)); if (c == 45 || c == 43) { s = (checkCriticalStringElementIndex(1, s.length + 1) , s.substr(1)); --length_0; negative = c == 45; } } if (length_0 == 0) { throw toJs(new NumberFormatException('For input string: "' + orig + '"')); } while (s.length > 0 && (checkCriticalStringElementIndex(0, s.length) , s.charCodeAt(0) == 48)) { s = (checkCriticalStringElementIndex(1, s.length + 1) , s.substr(1)); --length_0; } if (length_0 > ($clinit_Number$__ParseLong() , maxLengthForRadix)[10]) { throw toJs(new NumberFormatException('For input string: "' + orig + '"')); } for (i = 0; i < length_0; i++) { if (digit_0((checkCriticalStringElementIndex(i, s.length) , s.charCodeAt(i))) == -1) { throw toJs(new NumberFormatException('For input string: "' + orig + '"')); } } toReturn = 0; maxDigits = maxDigitsForRadix[10]; radixPower = maxDigitsRadixPower[10]; minValue = neg_0(maxValueForRadix[10]); firstTime = true; head = length_0 % maxDigits; if (head > 0) { toReturn = -parseInt((checkCriticalStringBounds(0, head, s.length) , s.substr(0, head)), 10); s = (checkCriticalStringElementIndex(head, s.length + 1) , s.substr(head)); length_0 -= head; firstTime = false; } while (length_0 >= maxDigits) { head = parseInt((checkCriticalStringBounds(0, maxDigits, s.length) , s.substr(0, maxDigits)), 10); s = (checkCriticalStringElementIndex(maxDigits, s.length + 1) , s.substr(maxDigits)); length_0 -= maxDigits; if (firstTime) { firstTime = false; } else { if (compare_2(toReturn, minValue) < 0) { throw toJs(new NumberFormatException('For input string: "' + orig + '"')); } toReturn = mul_0(toReturn, radixPower); } toReturn = sub_2(toReturn, head); } if (compare_2(toReturn, 0) > 0) { throw toJs(new NumberFormatException('For input string: "' + orig + '"')); } if (!negative) { toReturn = neg_0(toReturn); if (compare_2(toReturn, 0) < 0) { throw toJs(new NumberFormatException('For input string: "' + orig + '"')); } } return toReturn; } function doubleValue__D__devirtual$(this$static){ return instanceOfDouble(this$static)?(checkCriticalNotNull(this$static) , this$static):this$static.doubleValue(); } defineClass(242, 1, {3:1, 242:1}); var floatRegex; var Ljava_lang_Number_2_classLit = createForClass('java.lang', 'Number', 242); function $compareTo_2(this$static, b){ return this$static.value_0 - b.value_0; } function Byte(value_0){ this.value_0 = value_0; } defineClass(222, 242, {3:1, 222:1, 34:1, 242:1}, Byte); _.compareTo_0 = function compareTo_5(b){ return $compareTo_2(this, castTo(b, 222)); } ; _.doubleValue = function doubleValue_0(){ return this.value_0; } ; _.equals_0 = function equals_35(o){ return instanceOf(o, 222) && castTo(o, 222).value_0 == this.value_0; } ; _.hashCode_1 = function hashCode_35(){ return this.value_0; } ; _.toString_0 = function toString_42(){ return '' + this.value_0; } ; _.value_0 = 0; var Ljava_lang_Byte_2_classLit = createForClass('java.lang', 'Byte', 222); function $clinit_Byte$BoxedValues(){ $clinit_Byte$BoxedValues = emptyMethod; boxedValues = initUnidimensionalArray(Ljava_lang_Byte_2_classLit, $intern_16, 222, 256, 0, 1); } function get_32(b){ $clinit_Byte$BoxedValues(); var rebase, result; rebase = b + 128; result = boxedValues[rebase]; !result && (result = boxedValues[rebase] = new Byte(b)); return result; } var boxedValues; function $compareTo_3(this$static, c){ return this$static.value_0 - c.value_0; } function Character(value_0){ this.value_0 = value_0; } function digit_0(c){ if (c >= 48 && c < 48 + $wnd.Math.min(10, 10)) { return c - 48; } if (c >= 97 && c < 97) { return c - 97 + 10; } if (c >= 65 && c < 65) { return c - 65 + 10; } return -1; } function valueOf_2(c){ var result; if (c < 128) { return $clinit_Character$BoxedValues() , result = boxedValues_0[c] , !result && (result = boxedValues_0[c] = new Character(c)) , result; } return new Character(c); } defineClass(180, 1, {3:1, 180:1, 34:1}, Character); _.compareTo_0 = function compareTo_6(c){ return $compareTo_3(this, castTo(c, 180)); } ; _.equals_0 = function equals_36(o){ return instanceOf(o, 180) && castTo(o, 180).value_0 == this.value_0; } ; _.hashCode_1 = function hashCode_36(){ return this.value_0; } ; _.toString_0 = function toString_43(){ return String.fromCharCode(this.value_0); } ; _.value_0 = 0; var digitRegex; var Ljava_lang_Character_2_classLit = createForClass('java.lang', 'Character', 180); function $clinit_Character$BoxedValues(){ $clinit_Character$BoxedValues = emptyMethod; boxedValues_0 = initUnidimensionalArray(Ljava_lang_Character_2_classLit, $intern_16, 180, 128, 0, 1); } var boxedValues_0; function ClassCastException(){ RuntimeException.call(this); } function ClassCastException_0(message){ RuntimeException_0.call(this, message); } defineClass(212, 63, {3:1, 212:1, 103:1, 63:1, 82:1}, ClassCastException, ClassCastException_0); var Ljava_lang_ClassCastException_2_classLit = createForClass('java.lang', 'ClassCastException', 212); function $compareTo_4(this$static, b){ return compare_4((checkCriticalNotNull(this$static) , this$static), (checkCriticalNotNull(b) , b)); } function $doubleValue(this$static){ return checkCriticalNotNull(this$static) , this$static; } function $equals_4(this$static, o){ return checkCriticalNotNull(this$static) , maskUndefined(this$static) === maskUndefined(o); } function $floatValue(this$static){ return checkCriticalNotNull(this$static) , this$static; } function $hashCode_1(this$static){ return round_int((checkCriticalNotNull(this$static) , this$static)); } function $intValue(this$static){ return round_int((checkCriticalNotNull(this$static) , this$static)); } function $toString_6(this$static){ return '' + (checkCriticalNotNull(this$static) , this$static); } function compare_4(x_0, y_0){ if (x_0 < y_0) { return -1; } if (x_0 > y_0) { return 1; } if (x_0 == y_0) { return x_0 == 0?compare_4(1 / x_0, 1 / y_0):0; } return isNaN(x_0)?isNaN(y_0)?0:1:-1; } function isInfinite(x_0){ return !isNaN(x_0) && !isFinite(x_0); } doubleCastMap = {3:1, 34:1, 345:1, 242:1}; var Ljava_lang_Double_2_classLit = createForClass('java.lang', 'Double', 345); function $compareTo_5(this$static, b){ return compare_4(this$static.value_0, b.value_0); } function Float(value_0){ this.value_0 = value_0; } function Float_0(s){ this.value_0 = parseFloat_0(s); } function parseFloat_0(s){ var doubleValue; doubleValue = __parseAndValidateDouble(s); if (doubleValue > 3.4028234663852886E38) { return $intern_60; } else if (doubleValue < -3.4028234663852886E38) { return $intern_61; } return doubleValue; } defineClass(161, 242, {3:1, 34:1, 161:1, 242:1}, Float, Float_0); _.compareTo_0 = function compareTo_7(b){ return $compareTo_5(this, castTo(b, 161)); } ; _.doubleValue = function doubleValue_1(){ return this.value_0; } ; _.equals_0 = function equals_37(o){ return instanceOf(o, 161) && $equals_4(this.value_0, castTo(o, 161).value_0); } ; _.hashCode_1 = function hashCode_37(){ return round_int(this.value_0); } ; _.toString_0 = function toString_45(){ return '' + this.value_0; } ; _.value_0 = 0; var Ljava_lang_Float_2_classLit = createForClass('java.lang', 'Float', 161); function IllegalArgumentException(){ RuntimeException.call(this); } function IllegalArgumentException_0(message){ RuntimeException_0.call(this, message); } function IllegalArgumentException_1(cause){ Throwable_1.call(this, 'The given string does not match the expected format for individual spacings.', cause); } defineClass(33, 63, {3:1, 103:1, 33:1, 63:1, 82:1}, IllegalArgumentException, IllegalArgumentException_0, IllegalArgumentException_1); var Ljava_lang_IllegalArgumentException_2_classLit = createForClass('java.lang', 'IllegalArgumentException', 33); function IllegalStateException(){ RuntimeException.call(this); } function IllegalStateException_0(s){ RuntimeException_0.call(this, s); } defineClass(73, 63, $intern_44, IllegalStateException, IllegalStateException_0); var Ljava_lang_IllegalStateException_2_classLit = createForClass('java.lang', 'IllegalStateException', 73); function $compareTo_6(this$static, b){ return compare_5(this$static.value_0, b.value_0); } function Integer(value_0){ this.value_0 = value_0; } function bitCount(x_0){ x_0 -= x_0 >> 1 & 1431655765; x_0 = (x_0 >> 2 & 858993459) + (x_0 & 858993459); x_0 = (x_0 >> 4) + x_0 & 252645135; x_0 += x_0 >> 8; x_0 += x_0 >> 16; return x_0 & 63; } function compare_5(x_0, y_0){ return x_0 < y_0?-1:x_0 > y_0?1:0; } function highestOneBit(i){ var rtn; if (i < 0) { return $intern_43; } else if (i == 0) { return 0; } else { for (rtn = $intern_36; (rtn & i) == 0; rtn >>= 1) ; return rtn; } } function numberOfLeadingZeros_0(i){ var m, n, y_0; if (i < 0) { return 0; } else if (i == 0) { return 32; } else { y_0 = -(i >> 16); m = y_0 >> 16 & 16; n = 16 - m; i = i >> m; y_0 = i - 256; m = y_0 >> 16 & 8; n += m; i <<= m; y_0 = i - $intern_62; m = y_0 >> 16 & 4; n += m; i <<= m; y_0 = i - $intern_17; m = y_0 >> 16 & 2; n += m; i <<= m; y_0 = i >> 14; m = y_0 & ~(y_0 >> 1); return n + 2 - m; } } function numberOfTrailingZeros(i){ var r, rtn; if (i == 0) { return 32; } else { rtn = 0; for (r = 1; (r & i) == 0; r <<= 1) { ++rtn; } return rtn; } } function reverse_1(i){ var nibbles; nibbles = ($clinit_Integer$ReverseNibbles() , reverseNibbles); return nibbles[i >>> 28] | nibbles[i >> 24 & 15] << 4 | nibbles[i >> 20 & 15] << 8 | nibbles[i >> 16 & 15] << 12 | nibbles[i >> 12 & 15] << 16 | nibbles[i >> 8 & 15] << 20 | nibbles[i >> 4 & 15] << 24 | nibbles[i & 15] << 28; } function rotateLeft(i, distance){ while (distance-- > 0) { i = i << 1 | (i < 0?1:0); } return i; } function valueOf_3(i){ var rebase, result; if (i > -129 && i < 128) { return $clinit_Integer$BoxedValues() , rebase = i + 128 , result = boxedValues_1[rebase] , !result && (result = boxedValues_1[rebase] = new Integer(i)) , result; } return new Integer(i); } defineClass(17, 242, {3:1, 34:1, 17:1, 242:1}, Integer); _.compareTo_0 = function compareTo_8(b){ return $compareTo_6(this, castTo(b, 17)); } ; _.doubleValue = function doubleValue_2(){ return this.value_0; } ; _.equals_0 = function equals_38(o){ return instanceOf(o, 17) && castTo(o, 17).value_0 == this.value_0; } ; _.hashCode_1 = function hashCode_38(){ return this.value_0; } ; _.toString_0 = function toString_46(){ return '' + this.value_0; } ; _.value_0 = 0; var Ljava_lang_Integer_2_classLit = createForClass('java.lang', 'Integer', 17); function $clinit_Integer$BoxedValues(){ $clinit_Integer$BoxedValues = emptyMethod; boxedValues_1 = initUnidimensionalArray(Ljava_lang_Integer_2_classLit, $intern_16, 17, 256, 0, 1); } var boxedValues_1; function $clinit_Integer$ReverseNibbles(){ $clinit_Integer$ReverseNibbles = emptyMethod; reverseNibbles = stampJavaTypeInfo(getClassLiteralForArray(I_classLit, 1), $intern_49, 28, 15, [0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15]); } var reverseNibbles; function $compareTo_7(this$static, b){ return compare_6(this$static.value_0, b.value_0); } function Long(value_0){ this.value_0 = value_0; } function compare_6(x_0, y_0){ return compare_2(x_0, y_0) < 0?-1:compare_2(x_0, y_0) > 0?1:0; } function hashCode_40(l){ return toInt_0(shru_0(l, 32)) ^ toInt_0(l); } function valueOf_4(l){ var rebase, result; if (compare_2(l, -129) > 0 && compare_2(l, 128) < 0) { return $clinit_Long$BoxedValues() , rebase = toInt_0(l) + 128 , result = boxedValues_2[rebase] , !result && (result = boxedValues_2[rebase] = new Long(l)) , result; } return new Long(l); } defineClass(168, 242, {3:1, 34:1, 168:1, 242:1}, Long); _.compareTo_0 = function compareTo_9(b){ return $compareTo_7(this, castTo(b, 168)); } ; _.doubleValue = function doubleValue_3(){ return toDouble_0(this.value_0); } ; _.equals_0 = function equals_39(o){ return instanceOf(o, 168) && eq(castTo(o, 168).value_0, this.value_0); } ; _.hashCode_1 = function hashCode_39(){ return hashCode_40(this.value_0); } ; _.toString_0 = function toString_47(){ return '' + toString_39(this.value_0); } ; _.value_0 = 0; var Ljava_lang_Long_2_classLit = createForClass('java.lang', 'Long', 168); function $clinit_Long$BoxedValues(){ $clinit_Long$BoxedValues = emptyMethod; boxedValues_2 = initUnidimensionalArray(Ljava_lang_Long_2_classLit, $intern_16, 168, 256, 0, 1); } var boxedValues_2; function max_1(x_0, y_0){ return compare_2(x_0, y_0) > 0?x_0:y_0; } function signum(d){ return d == 0 || isNaN(d)?d:d < 0?-1:1; } defineClass(2140, 1, {}); function NegativeArraySizeException(message){ RuntimeException_0.call(this, message); } defineClass(1904, 63, $intern_44, NegativeArraySizeException); var Ljava_lang_NegativeArraySizeException_2_classLit = createForClass('java.lang', 'NegativeArraySizeException', 1904); function NullPointerException(){ RuntimeException.call(this); } function NullPointerException_0(message){ RuntimeException_0.call(this, message); } defineClass(169, 607, {3:1, 103:1, 169:1, 63:1, 82:1}, NullPointerException, NullPointerException_0); _.createError = function createError_0(msg){ return new TypeError(msg); } ; var Ljava_lang_NullPointerException_2_classLit = createForClass('java.lang', 'NullPointerException', 169); function $clinit_Number$__ParseLong(){ $clinit_Number$__ParseLong = emptyMethod; var i; maxDigitsForRadix = stampJavaTypeInfo(getClassLiteralForArray(I_classLit, 1), $intern_49, 28, 15, [-1, -1, 30, 19, 15, 13, 11, 11, 10, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5]); maxDigitsRadixPower = initUnidimensionalArray(I_classLit, $intern_49, 28, 37, 15, 1); maxLengthForRadix = stampJavaTypeInfo(getClassLiteralForArray(I_classLit, 1), $intern_49, 28, 15, [-1, -1, 63, 40, 32, 28, 25, 23, 21, 20, 19, 19, 18, 18, 17, 17, 16, 16, 16, 15, 15, 15, 15, 14, 14, 14, 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, 13]); maxValueForRadix = initUnidimensionalArray(J_classLit, $intern_63, 28, 37, 14, 1); for (i = 2; i <= 36; i++) { maxDigitsRadixPower[i] = round_int($wnd.Math.pow(i, maxDigitsForRadix[i])); maxValueForRadix[i] = div($intern_21, maxDigitsRadixPower[i]); } } var maxDigitsForRadix, maxDigitsRadixPower, maxLengthForRadix, maxValueForRadix; function NumberFormatException(message){ IllegalArgumentException_0.call(this, message); } defineClass(130, 33, {3:1, 103:1, 33:1, 130:1, 63:1, 82:1}, NumberFormatException); var Ljava_lang_NumberFormatException_2_classLit = createForClass('java.lang', 'NumberFormatException', 130); function $compareTo_8(this$static, b){ return this$static.value_0 - b.value_0; } function Short(value_0){ this.value_0 = value_0; } function valueOf_5(s){ var rebase, result; if (s > -129 && s < 128) { return $clinit_Short$BoxedValues() , rebase = s + 128 , result = boxedValues_3[rebase] , !result && (result = boxedValues_3[rebase] = new Short(s)) , result; } return new Short(s); } defineClass(191, 242, {3:1, 34:1, 242:1, 191:1}, Short); _.compareTo_0 = function compareTo_10(b){ return $compareTo_8(this, castTo(b, 191)); } ; _.doubleValue = function doubleValue_4(){ return this.value_0; } ; _.equals_0 = function equals_40(o){ return instanceOf(o, 191) && castTo(o, 191).value_0 == this.value_0; } ; _.hashCode_1 = function hashCode_41(){ return this.value_0; } ; _.toString_0 = function toString_48(){ return '' + this.value_0; } ; _.value_0 = 0; var Ljava_lang_Short_2_classLit = createForClass('java.lang', 'Short', 191); function $clinit_Short$BoxedValues(){ $clinit_Short$BoxedValues = emptyMethod; boxedValues_3 = initUnidimensionalArray(Ljava_lang_Short_2_classLit, $intern_16, 191, 256, 0, 1); } var boxedValues_3; function StackTraceElement(methodName, fileName, lineNumber){ this.className = 'Unknown'; this.methodName = methodName; this.fileName = fileName; this.lineNumber = lineNumber; } defineClass(319, 1, {3:1, 319:1}, StackTraceElement); _.equals_0 = function equals_41(other){ var st; if (instanceOf(other, 319)) { st = castTo(other, 319); return this.lineNumber == st.lineNumber && this.methodName == st.methodName && this.className == st.className && this.fileName == st.fileName; } return false; } ; _.hashCode_1 = function hashCode_42(){ return hashCode_47(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, [valueOf_3(this.lineNumber), this.className, this.methodName, this.fileName])); } ; _.toString_0 = function toString_49(){ return this.className + '.' + this.methodName + '(' + (this.fileName != null?this.fileName:'Unknown Source') + (this.lineNumber >= 0?':' + this.lineNumber:'') + ')'; } ; _.lineNumber = 0; var Ljava_lang_StackTraceElement_2_classLit = createForClass('java.lang', 'StackTraceElement', 319); function $charAt(this$static, index_0){ checkCriticalStringElementIndex(index_0, this$static.length); return this$static.charCodeAt(index_0); } function $compareTo_9(this$static, other){ var a, b; a = (checkCriticalNotNull(this$static) , this$static); b = (checkCriticalNotNull(other) , other); return a == b?0:a < b?-1:1; } function $endsWith(suffix){ var suffixlength; suffixlength = suffix.length; return $equals_5('org.eclipse.elk.layered'.substr('org.eclipse.elk.layered'.length - suffixlength, suffixlength), suffix); } function $equals_5(this$static, other){ return checkCriticalNotNull(this$static) , maskUndefined(this$static) === maskUndefined(other); } function $equalsIgnoreCase(this$static, other){ checkCriticalNotNull(this$static); if (other == null) { return false; } if ($equals_5(this$static, other)) { return true; } return this$static.length == other.length && $equals_5(this$static.toLowerCase(), other.toLowerCase()); } function $getChars0(this$static, srcBegin, srcEnd, dst, dstBegin){ while (srcBegin < srcEnd) { dst[dstBegin++] = $charAt(this$static, srcBegin++); } } function $hashCode_2(this$static){ var h, i; h = 0; for (i = 0; i < this$static.length; i++) { h = (h << 5) - h + (checkCriticalStringElementIndex(i, this$static.length) , this$static.charCodeAt(i)) | 0; } return h; } function $indexOf_0(this$static, codePoint, startIndex){ return $indexOf_2(this$static, fromCodePoint(codePoint), startIndex); } function $indexOf_1(this$static, str){ return this$static.indexOf(str); } function $indexOf_2(this$static, str, startIndex){ return this$static.indexOf(str, startIndex); } function $intern(this$static){ return checkCriticalNotNull(this$static) , this$static; } function $lastIndexOf(this$static, str){ return this$static.lastIndexOf(str); } function $lastIndexOf_0(this$static, str, start_0){ return this$static.lastIndexOf(str, start_0); } function $split_0(this$static, regex){ var compiled, count, lastNonEmpty, lastTrail, matchIndex, matchObj, out, trail; compiled = new RegExp(regex, 'g'); out = initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, 0, 6, 1); count = 0; trail = this$static; lastTrail = null; while (true) { matchObj = compiled.exec(trail); if (matchObj == null || trail == '') { out[count] = trail; break; } else { matchIndex = matchObj.index; out[count] = (checkCriticalStringBounds(0, matchIndex, trail.length) , trail.substr(0, matchIndex)); trail = $substring_1(trail, matchIndex + matchObj[0].length, trail.length); compiled.lastIndex = 0; if (lastTrail == trail) { out[count] = (checkCriticalStringBounds(0, 1, trail.length) , trail.substr(0, 1)); trail = (checkCriticalStringElementIndex(1, trail.length + 1) , trail.substr(1)); } lastTrail = trail; ++count; } } if (this$static.length > 0) { lastNonEmpty = out.length; while (lastNonEmpty > 0 && out[lastNonEmpty - 1] == '') { --lastNonEmpty; } lastNonEmpty < out.length && (out.length = lastNonEmpty); } return out; } function $startsWith(this$static, prefix){ return $equals_5(this$static.substr(0, prefix.length), prefix); } function $startsWith_0(this$static, prefix, toffset){ return toffset >= 0 && $equals_5(this$static.substr(toffset, prefix.length), prefix); } function $substring_0(this$static, beginIndex){ checkCriticalStringElementIndex(beginIndex, this$static.length + 1); return this$static.substr(beginIndex); } function $substring_1(this$static, beginIndex, endIndex){ checkCriticalStringBounds(beginIndex, endIndex, this$static.length); return this$static.substr(beginIndex, endIndex - beginIndex); } function $toCharArray(this$static){ var charArr, n; n = this$static.length; charArr = initUnidimensionalArray(C_classLit, $intern_45, 28, n, 15, 1); $getChars0(this$static, 0, n, charArr, 0); return charArr; } function $toLowerCase(this$static, locale){ return locale == ($clinit_Locale() , $clinit_Locale() , defaultLocale)?this$static.toLocaleLowerCase():this$static.toLowerCase(); } function $toString_7(this$static){ return checkCriticalNotNull(this$static) , this$static; } function $trim(this$static){ var end, length_0, start_0; length_0 = this$static.length; start_0 = 0; while (start_0 < length_0 && (checkCriticalStringElementIndex(start_0, this$static.length) , this$static.charCodeAt(start_0) <= 32)) { ++start_0; } end = length_0; while (end > start_0 && (checkCriticalStringElementIndex(end - 1, this$static.length) , this$static.charCodeAt(end - 1) <= 32)) { --end; } return start_0 > 0 || end < length_0?(checkCriticalStringBounds(start_0, end, this$static.length) , this$static.substr(start_0, end - start_0)):this$static; } function fromCharCode(array){ return String.fromCharCode.apply(null, array); } function fromCodePoint(codePoint){ var hiSurrogate, loSurrogate; if (codePoint >= $intern_64) { hiSurrogate = $intern_65 + (codePoint - $intern_64 >> 10 & 1023) & $intern_47; loSurrogate = 56320 + (codePoint - $intern_64 & 1023) & $intern_47; return String.fromCharCode(hiSurrogate) + ('' + String.fromCharCode(loSurrogate)); } else { return String.fromCharCode(codePoint & $intern_47); } } function valueOf_6(x_0){ return x_0 == null?'null':toString_40(x_0); } function valueOf_7(x_0){ return valueOf_8(x_0, 0, x_0.length); } function valueOf_8(x_0, offset, count){ var batchEnd, batchStart, end, s; end = offset + count; checkCriticalStringBounds(offset, end, x_0.length); s = ''; for (batchStart = offset; batchStart < end;) { batchEnd = $wnd.Math.min(batchStart + 10000, end); s += fromCharCode(x_0.slice(batchStart, batchEnd)); batchStart = batchEnd; } return s; } stringCastMap = {3:1, 484:1, 34:1, 2:1}; var Ljava_lang_String_2_classLit = createForClass('java.lang', 'String', 2); function $append(this$static, x_0){ this$static.string += String.fromCharCode(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 $append_2(this$static, x_0){ this$static.string += '' + x_0; return this$static; } function $append_3(this$static, x_0){ this$static.string += '' + x_0; return this$static; } function $append_4(this$static, x_0){ this$static.string += x_0; return this$static; } function $deleteCharAt(this$static, start_0){ $replace0(this$static, start_0, start_0 + 1, ''); return this$static; } function StringBuffer(){ AbstractStringBuilder.call(this, ''); } function StringBuffer_0(){ AbstractStringBuilder.call(this, ''); } function StringBuffer_1(s){ AbstractStringBuilder.call(this, (checkCriticalNotNull(s) , s)); } defineClass(111, 427, {484:1}, StringBuffer, StringBuffer_0, StringBuffer_1); var Ljava_lang_StringBuffer_2_classLit = createForClass('java.lang', 'StringBuffer', 111); function $append_5(this$static, x_0){ this$static.string += String.fromCharCode(x_0); return this$static; } function $append_6(this$static, x_0){ this$static.string += x_0; return this$static; } function $append_7(this$static, x_0){ return this$static.string += '' + x_0 , this$static; } function $append_8(this$static, x_0){ this$static.string += '' + x_0; return this$static; } function $append_9(this$static, x_0, start_0, end){ this$static.string += '' + $substring_1(x_0 == null?'null':toString_40(x_0), start_0, end); return this$static; } function $append_10(this$static, x_0){ this$static.string += '' + x_0; return this$static; } function $append_11(this$static, x_0){ this$static.string += '' + x_0; return this$static; } function $append_12(this$static, x_0){ this$static.string += valueOf_8(x_0, 0, x_0.length); return this$static; } function $append_13(this$static, x_0, len){ this$static.string += valueOf_8(x_0, 0, len); return this$static; } function $insert_0(this$static, index_0, x_0){ $replace0(this$static, index_0, index_0, x_0); return this$static; } function StringBuilder(){ AbstractStringBuilder.call(this, ''); } function StringBuilder_0(){ AbstractStringBuilder.call(this, ''); } function StringBuilder_1(s){ AbstractStringBuilder.call(this, (checkCriticalNotNull(s) , s)); } defineClass(104, 427, {484:1}, StringBuilder, StringBuilder_0, StringBuilder_1); var Ljava_lang_StringBuilder_2_classLit = createForClass('java.lang', 'StringBuilder', 104); function StringIndexOutOfBoundsException(message){ IndexOutOfBoundsException_0.call(this, message); } defineClass(702, 77, $intern_58, StringIndexOutOfBoundsException); var Ljava_lang_StringIndexOutOfBoundsException_2_classLit = createForClass('java.lang', 'StringIndexOutOfBoundsException', 702); function $clinit_System(){ $clinit_System = emptyMethod; err_0 = new PrintStream; } function arraycopy(src_0, srcOfs, dest, destOfs, len){ $clinit_System(); var destArray, destComp, destEnd, destType, srcArray, srcComp, srcType; checkCriticalNotNull_0(src_0, 'src'); checkCriticalNotNull_0(dest, 'dest'); srcType = getClass__Ljava_lang_Class___devirtual$(src_0); destType = getClass__Ljava_lang_Class___devirtual$(dest); checkCriticalArrayType_0((srcType.modifiers & 4) != 0, 'srcType is not an array'); checkCriticalArrayType_0((destType.modifiers & 4) != 0, 'destType is not an array'); srcComp = srcType.componentType; destComp = destType.componentType; checkCriticalArrayType_0((srcComp.modifiers & 1) != 0?srcComp == destComp:(destComp.modifiers & 1) == 0, "Array types don't match"); checkArrayCopyIndicies(src_0, srcOfs, dest, destOfs, len); if ((srcComp.modifiers & 1) == 0 && srcType != destType) { srcArray = castToArray(src_0); destArray = castToArray(dest); if (maskUndefined(src_0) === maskUndefined(dest) && srcOfs < destOfs) { srcOfs += len; for (destEnd = destOfs + len; destEnd-- > destOfs;) { setCheck(destArray, destEnd, srcArray[--srcOfs]); } } else { for (destEnd = destOfs + len; destOfs < destEnd;) { setCheck(destArray, destOfs++, srcArray[srcOfs++]); } } } else { copy_0(src_0, srcOfs, dest, destOfs, len, true); } } function checkArrayCopyIndicies(src_0, srcOfs, dest, destOfs, len){ var destlen, srclen; srclen = src_0.length; destlen = dest.length; if (srcOfs < 0 || destOfs < 0 || len < 0 || srcOfs + len > srclen || destOfs + len > destlen) { throw toJs(new IndexOutOfBoundsException); } } defineClass(2145, 1, {}); var err_0; function UnsupportedOperationException(){ RuntimeException.call(this); } function UnsupportedOperationException_0(message){ RuntimeException_0.call(this, message); } defineClass(48, 63, {3:1, 103:1, 63:1, 82:1, 48:1}, UnsupportedOperationException, UnsupportedOperationException_0); var Ljava_lang_UnsupportedOperationException_2_classLit = createForClass('java.lang', 'UnsupportedOperationException', 48); function $clinit_BigDecimal(){ $clinit_BigDecimal = emptyMethod; var i, j, j0; new BigDecimal(1, 0); new BigDecimal(10, 0); new BigDecimal(0, 0); BI_SCALED_BY_ZERO = initUnidimensionalArray(Ljava_math_BigDecimal_2_classLit, $intern_16, 247, 11, 0, 1); CH_ZEROS = initUnidimensionalArray(C_classLit, $intern_45, 28, 100, 15, 1); DOUBLE_FIVE_POW = stampJavaTypeInfo(getClassLiteralForArray(D_classLit, 1), $intern_66, 28, 15, [1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, 48828125, 244140625, 1220703125, 6103515625, 30517578125, 152587890625, 762939453125, 3814697265625, 19073486328125, 95367431640625, 476837158203125, 2384185791015625]); DOUBLE_FIVE_POW_BIT_LENGTH = initUnidimensionalArray(I_classLit, $intern_49, 28, DOUBLE_FIVE_POW.length, 15, 1); DOUBLE_TEN_POW = stampJavaTypeInfo(getClassLiteralForArray(D_classLit, 1), $intern_66, 28, 15, [1, 10, 100, $intern_46, 10000, $intern_67, 1000000, 10000000, 100000000, $intern_56, 10000000000, 100000000000, 1000000000000, 10000000000000, 100000000000000, 1000000000000000, 10000000000000000]); DOUBLE_TEN_POW_BIT_LENGTH = initUnidimensionalArray(I_classLit, $intern_49, 28, DOUBLE_TEN_POW.length, 15, 1); ZERO_SCALED_BY = initUnidimensionalArray(Ljava_math_BigDecimal_2_classLit, $intern_16, 247, 11, 0, 1); i = 0; for (; i < ZERO_SCALED_BY.length; i++) { BI_SCALED_BY_ZERO[i] = new BigDecimal(i, 0); ZERO_SCALED_BY[i] = new BigDecimal(0, i); CH_ZEROS[i] = 48; } for (; i < CH_ZEROS.length; i++) { CH_ZEROS[i] = 48; } for (j0 = 0; j0 < DOUBLE_FIVE_POW_BIT_LENGTH.length; j0++) { DOUBLE_FIVE_POW_BIT_LENGTH[j0] = bitLength(DOUBLE_FIVE_POW[j0]); } for (j = 0; j < DOUBLE_TEN_POW_BIT_LENGTH.length; j++) { DOUBLE_TEN_POW_BIT_LENGTH[j] = bitLength(DOUBLE_TEN_POW[j]); } $clinit_Multiplication(); } function $compareTo_10(this$static, val){ var diffPrecision, diffScale, thisSign, thisUnscaled, valUnscaled, valueSign; thisSign = $signum(this$static); valueSign = $signum(val); if (thisSign == valueSign) { if (this$static.scale == val.scale && this$static.bitLength < 54 && val.bitLength < 54) { return this$static.smallValue < val.smallValue?-1:this$static.smallValue > val.smallValue?1:0; } diffScale = this$static.scale - val.scale; diffPrecision = (this$static.precision > 0?this$static.precision:$wnd.Math.floor((this$static.bitLength - 1) * $intern_68) + 1) - (val.precision > 0?val.precision:$wnd.Math.floor((val.bitLength - 1) * $intern_68) + 1); if (diffPrecision > diffScale + 1) { return thisSign; } else if (diffPrecision < diffScale - 1) { return -thisSign; } else { thisUnscaled = (!this$static.intVal && (this$static.intVal = valueOf_9(fromDouble_0(this$static.smallValue))) , this$static.intVal); valUnscaled = (!val.intVal && (val.intVal = valueOf_9(fromDouble_0(val.smallValue))) , val.intVal); diffScale < 0?(thisUnscaled = $multiply(thisUnscaled, powerOf10(-diffScale))):diffScale > 0 && (valUnscaled = $multiply(valUnscaled, powerOf10(diffScale))); return $compareTo_11(thisUnscaled, valUnscaled); } } else return thisSign < valueSign?-1:1; } function $initFrom(this$static, val){ var begin, ch_0, i, last, offset, scaleString, unscaled, unscaledBuffer; begin = 0; offset = 0; last = val.length; scaleString = null; unscaledBuffer = new StringBuilder_0; if (offset < last && (checkCriticalStringElementIndex(offset, val.length) , val.charCodeAt(offset) == 43)) { ++offset; ++begin; if (offset < last && (checkCriticalStringElementIndex(offset, val.length) , val.charCodeAt(offset) == 43 || (checkCriticalStringElementIndex(offset, val.length) , val.charCodeAt(offset) == 45))) { throw toJs(new NumberFormatException('For input string: "' + val + '"')); } } while (offset < last && (checkCriticalStringElementIndex(offset, val.length) , val.charCodeAt(offset) != 46) && (checkCriticalStringElementIndex(offset, val.length) , val.charCodeAt(offset) != 101) && (checkCriticalStringElementIndex(offset, val.length) , val.charCodeAt(offset) != 69)) { ++offset; } unscaledBuffer.string += '' + $substring_1(val == null?'null':(checkCriticalNotNull(val) , val), begin, offset); if (offset < last && (checkCriticalStringElementIndex(offset, val.length) , val.charCodeAt(offset) == 46)) { ++offset; begin = offset; while (offset < last && (checkCriticalStringElementIndex(offset, val.length) , val.charCodeAt(offset) != 101) && (checkCriticalStringElementIndex(offset, val.length) , val.charCodeAt(offset) != 69)) { ++offset; } this$static.scale = offset - begin; unscaledBuffer.string += '' + $substring_1(val == null?'null':(checkCriticalNotNull(val) , val), begin, offset); } else { this$static.scale = 0; } if (offset < last && (checkCriticalStringElementIndex(offset, val.length) , val.charCodeAt(offset) == 101 || (checkCriticalStringElementIndex(offset, val.length) , val.charCodeAt(offset) == 69))) { ++offset; begin = offset; if (offset < last && (checkCriticalStringElementIndex(offset, val.length) , val.charCodeAt(offset) == 43)) { ++offset; offset < last && (checkCriticalStringElementIndex(offset, val.length) , val.charCodeAt(offset) != 45) && ++begin; } scaleString = (checkCriticalStringBounds(begin, last, val.length) , val.substr(begin, last - begin)); this$static.scale = this$static.scale - __parseAndValidateInt(scaleString, $intern_43, $intern_0); if (this$static.scale != round_int(this$static.scale)) { throw toJs(new NumberFormatException('Scale out of range.')); } } unscaled = unscaledBuffer.string; if (unscaled.length < 16) { this$static.smallValue = (unscaledRegex == null && (unscaledRegex = new RegExp('^[+-]?\\d*$', 'i')) , unscaledRegex.test(unscaled)?parseInt(unscaled, 10):NaN); if (isNaN(this$static.smallValue)) { throw toJs(new NumberFormatException('For input string: "' + val + '"')); } this$static.bitLength = bitLength(this$static.smallValue); } else { $setUnscaledValue(this$static, new BigInteger_3(unscaled)); } this$static.precision = unscaledBuffer.string.length; for (i = 0; i < unscaledBuffer.string.length; ++i) { ch_0 = $charAt(unscaledBuffer.string, i); if (ch_0 != 45 && ch_0 != 48) { break; } --this$static.precision; } this$static.precision == 0 && (this$static.precision = 1); } function $setUnscaledValue(this$static, unscaledValue){ var value_0; this$static.intVal = unscaledValue; this$static.bitLength = bitLength_1(unscaledValue); this$static.bitLength < 54 && (this$static.smallValue = (value_0 = unscaledValue.numberLength > 1?fromBits_0(unscaledValue.digits[0], unscaledValue.digits[1]):fromBits_0(unscaledValue.digits[0], 0) , toDouble_0(unscaledValue.sign > 0?value_0:neg_0(value_0)))); } function $signum(this$static){ if (this$static.bitLength < 54) { return this$static.smallValue < 0?-1:this$static.smallValue > 0?1:0; } return (!this$static.intVal && (this$static.intVal = valueOf_9(fromDouble_0(this$static.smallValue))) , this$static.intVal).sign; } function $toPlainString(this$static){ var begin, delta, intStr, result; intStr = toDecimalScaledString_0((!this$static.intVal && (this$static.intVal = valueOf_9(fromDouble_0(this$static.smallValue))) , this$static.intVal), 0); if (this$static.scale == 0 || this$static.bitLength == 0 && this$static.smallValue != -1 && this$static.scale < 0) { return intStr; } begin = $signum(this$static) < 0?1:0; delta = this$static.scale; result = (intStr.length + 1 + $wnd.Math.abs(round_int(this$static.scale)) , new StringBuilder_0); begin == 1 && (result.string += '-' , result); if (this$static.scale > 0) { delta -= intStr.length - begin; if (delta >= 0) { result.string += '0.'; for (; delta > CH_ZEROS.length; delta -= CH_ZEROS.length) { $append_12(result, CH_ZEROS); } $append_13(result, CH_ZEROS, round_int(delta)); $append_11(result, (checkCriticalStringElementIndex(begin, intStr.length + 1) , intStr.substr(begin))); } else { delta = begin - delta; $append_11(result, $substring_1(intStr, begin, round_int(delta))); result.string += '.'; $append_11(result, $substring_0(intStr, round_int(delta))); } } else { $append_11(result, (checkCriticalStringElementIndex(begin, intStr.length + 1) , intStr.substr(begin))); for (; delta < -CH_ZEROS.length; delta += CH_ZEROS.length) { $append_12(result, CH_ZEROS); } $append_13(result, CH_ZEROS, round_int(-delta)); } return result.string; } function $toString_8(this$static){ var begin, end, exponent, intString, result; if (this$static.toStringImage != null) { return this$static.toStringImage; } if (this$static.bitLength < 32) { this$static.toStringImage = toDecimalScaledString(fromDouble_0(this$static.smallValue), round_int(this$static.scale)); return this$static.toStringImage; } intString = toDecimalScaledString_0((!this$static.intVal && (this$static.intVal = valueOf_9(fromDouble_0(this$static.smallValue))) , this$static.intVal), 0); if (this$static.scale == 0) { return intString; } begin = (!this$static.intVal && (this$static.intVal = valueOf_9(fromDouble_0(this$static.smallValue))) , this$static.intVal).sign < 0?2:1; end = intString.length; exponent = -this$static.scale + end - begin; result = new StringBuilder; result.string += '' + intString; if (this$static.scale > 0 && exponent >= -6) { if (exponent >= 0) { $insert_0(result, end - round_int(this$static.scale), String.fromCharCode(46)); } else { $replace0(result, begin - 1, begin - 1, '0.'); $insert_0(result, begin + 1, valueOf_8(CH_ZEROS, 0, -round_int(exponent) - 1)); } } else { if (end - begin >= 1) { $insert_0(result, begin, String.fromCharCode(46)); ++end; } $insert_0(result, end, String.fromCharCode(69)); exponent > 0 && $insert_0(result, ++end, String.fromCharCode(43)); $insert_0(result, ++end, '' + toString_39(fromDouble_0(exponent))); } this$static.toStringImage = result.string; return this$static.toStringImage; } function BigDecimal(smallValue, scale){ this.scale = scale; this.bitLength = bitLength_0(smallValue); this.bitLength < 54?(this.smallValue = toDouble_0(smallValue)):(this.intVal = ($clinit_BigInteger() , compare_2(smallValue, 0) >= 0?fromBits(smallValue):$negate(fromBits(neg_0(smallValue))))); } function BigDecimal_0(val){ $clinit_BigDecimal(); $initFrom(this, val); } function bitLength(value_0){ var negative, result; if (value_0 > -140737488355328 && value_0 < 140737488355328) { if (value_0 == 0) { return 0; } negative = value_0 < 0; negative && (value_0 = -value_0); result = round_int($wnd.Math.floor($wnd.Math.log(value_0) / 0.6931471805599453)); (!negative || value_0 != $wnd.Math.pow(2, result)) && ++result; return result; } return bitLength_0(fromDouble_0(value_0)); } function bitLength_0(value_0){ var high; compare_2(value_0, 0) < 0 && (value_0 = not_0(value_0)); return high = toInt_0(shru_0(value_0, 32)) , 64 - (high != 0?numberOfLeadingZeros_0(high):numberOfLeadingZeros_0(toInt_0(value_0)) + 32); } defineClass(247, 242, {3:1, 34:1, 242:1, 247:1}, BigDecimal, BigDecimal_0); _.compareTo_0 = function compareTo_11(val){ return $compareTo_10(this, castTo(val, 247)); } ; _.doubleValue = function doubleValue_5(){ return __parseAndValidateDouble($toString_8(this)); } ; _.equals_0 = function equals_42(x_0){ var x1; if (this === x_0) { return true; } if (instanceOf(x_0, 247)) { x1 = castTo(x_0, 247); return this.scale == x1.scale && $compareTo_10(this, x1) == 0; } return false; } ; _.hashCode_1 = function hashCode_43(){ var longValue; if (this.hashCode_0 != 0) { return this.hashCode_0; } if (this.bitLength < 54) { longValue = fromDouble_0(this.smallValue); this.hashCode_0 = toInt_0(and_0(longValue, -1)); this.hashCode_0 = 33 * this.hashCode_0 + toInt_0(and_0(shr_0(longValue, 32), -1)); this.hashCode_0 = 17 * this.hashCode_0 + round_int(this.scale); return this.hashCode_0; } this.hashCode_0 = 17 * $hashCode_3(this.intVal) + round_int(this.scale); return this.hashCode_0; } ; _.toString_0 = function toString_50(){ return $toString_8(this); } ; _.bitLength = 0; _.hashCode_0 = 0; _.precision = 0; _.scale = 0; _.smallValue = 0; var BI_SCALED_BY_ZERO, CH_ZEROS, DOUBLE_FIVE_POW, DOUBLE_FIVE_POW_BIT_LENGTH, DOUBLE_TEN_POW, DOUBLE_TEN_POW_BIT_LENGTH, ZERO_SCALED_BY, unscaledRegex; var Ljava_math_BigDecimal_2_classLit = createForClass('java.math', 'BigDecimal', 247); function $clinit_BigInteger(){ $clinit_BigInteger = emptyMethod; var i; ONE_0 = new BigInteger(1, 1); TEN = new BigInteger(1, 10); ZERO_0 = new BigInteger(0, 0); MINUS_ONE = new BigInteger(-1, 1); SMALL_VALUES = stampJavaTypeInfo(getClassLiteralForArray(Ljava_math_BigInteger_2_classLit, 1), $intern_16, 92, 0, [ZERO_0, ONE_0, new BigInteger(1, 2), new BigInteger(1, 3), new BigInteger(1, 4), new BigInteger(1, 5), new BigInteger(1, 6), new BigInteger(1, 7), new BigInteger(1, 8), new BigInteger(1, 9), TEN]); TWO_POWS = initUnidimensionalArray(Ljava_math_BigInteger_2_classLit, $intern_16, 92, 32, 0, 1); for (i = 0; i < TWO_POWS.length; i++) { TWO_POWS[i] = gte_0(shl_0(1, i), 0)?fromBits(shl_0(1, i)):$negate(fromBits(neg_0(shl_0(1, i)))); } } function $compareTo_11(this$static, val){ if (this$static.sign > val.sign) { return 1; } if (this$static.sign < val.sign) { return -1; } if (this$static.numberLength > val.numberLength) { return this$static.sign; } if (this$static.numberLength < val.numberLength) { return -val.sign; } return this$static.sign * compareArrays(this$static.digits, val.digits, this$static.numberLength); } function $cutOffLeadingZeroes(this$static){ while (this$static.numberLength > 0 && this$static.digits[--this$static.numberLength] == 0) ; this$static.digits[this$static.numberLength++] == 0 && (this$static.sign = 0); } function $equals_6(this$static, x_0){ var x1; if (maskUndefined(this$static) === maskUndefined(x_0)) { return true; } if (instanceOf(x_0, 92)) { x1 = castTo(x_0, 92); return this$static.sign == x1.sign && this$static.numberLength == x1.numberLength && $equalsArrays(this$static, x1.digits); } return false; } function $equalsArrays(this$static, b){ var i; for (i = this$static.numberLength - 1; i >= 0 && this$static.digits[i] === b[i]; i--) ; return i < 0; } function $getFirstNonzeroDigit(this$static){ var i; if (this$static.firstNonzeroDigit == -2) { if (this$static.sign == 0) { i = -1; } else { for (i = 0; this$static.digits[i] == 0; i++) ; } this$static.firstNonzeroDigit = i; } return this$static.firstNonzeroDigit; } function $hashCode_3(this$static){ var i; if (this$static.hashCode_0 != 0) { return this$static.hashCode_0; } for (i = 0; i < this$static.digits.length; i++) { this$static.hashCode_0 = this$static.hashCode_0 * 33 + (this$static.digits[i] & -1); } this$static.hashCode_0 = this$static.hashCode_0 * this$static.sign; return this$static.hashCode_0; } function $multiply(this$static, val){ if (val.sign == 0 || this$static.sign == 0) { return ZERO_0; } return $clinit_Multiplication() , karatsuba(this$static, val); } function $negate(this$static){ return this$static.sign == 0?this$static:new BigInteger_1(-this$static.sign, this$static.numberLength, this$static.digits); } function $pow(this$static, exp_0){ var x_0; if (exp_0 < 0) { throw toJs(new ArithmeticException('Negative exponent')); } if (exp_0 == 0) { return ONE_0; } else if (exp_0 == 1 || $equals_6(this$static, ONE_0) || $equals_6(this$static, ZERO_0)) { return this$static; } if (!$testBit(this$static, 0)) { x_0 = 1; while (!$testBit(this$static, x_0)) { ++x_0; } return $multiply(getPowerOfTwo(x_0 * exp_0), $pow($shiftRight(this$static, x_0), exp_0)); } return pow_0(this$static, exp_0); } function $shiftLeft(this$static, n){ if (n == 0 || this$static.sign == 0) { return this$static; } return n > 0?shiftLeft(this$static, n):shiftRight(this$static, -n); } function $shiftRight(this$static, n){ if (n == 0 || this$static.sign == 0) { return this$static; } return n > 0?shiftRight(this$static, n):shiftLeft(this$static, -n); } function $testBit(this$static, n){ var digit, firstNonZeroDigit, intCount; if (n == 0) { return (this$static.digits[0] & 1) != 0; } if (n < 0) { throw toJs(new ArithmeticException('Negative bit address')); } intCount = n >> 5; if (intCount >= this$static.numberLength) { return this$static.sign < 0; } digit = this$static.digits[intCount]; n = 1 << (n & 31); if (this$static.sign < 0) { firstNonZeroDigit = $getFirstNonzeroDigit(this$static); if (intCount < firstNonZeroDigit) { return false; } else firstNonZeroDigit == intCount?(digit = -digit):(digit = ~digit); } return (digit & n) != 0; } function BigInteger(sign, bits){ $clinit_BigInteger(); BigInteger_1.call(this, sign, 1, stampJavaTypeInfo(getClassLiteralForArray(I_classLit, 1), $intern_49, 28, 15, [bits])); } function BigInteger_0(lowBits, highBits){ BigInteger_1.call(this, 1, 2, stampJavaTypeInfo(getClassLiteralForArray(I_classLit, 1), $intern_49, 28, 15, [lowBits, highBits])); } function BigInteger_1(sign, numberLength, digits){ $clinit_BigInteger(); this.sign = sign; this.numberLength = numberLength; this.digits = digits; } function BigInteger_2(digits){ $clinit_BigInteger(); if (digits.length == 0) { this.sign = 0; this.numberLength = 1; this.digits = stampJavaTypeInfo(getClassLiteralForArray(I_classLit, 1), $intern_49, 28, 15, [0]); } else { this.sign = 1; this.numberLength = digits.length; this.digits = digits; $cutOffLeadingZeroes(this); } } function BigInteger_3(val){ $clinit_BigInteger(); BigInteger_4.call(this, val); } function BigInteger_4(val){ checkCriticalNotNull(val); if (val.length == 0) { throw toJs(new NumberFormatException('Zero length BigInteger')); } setFromString(this, val); } function fromBits(bits){ $clinit_BigInteger(); var highBits, lowBits; lowBits = toInt_0(bits); highBits = toInt_0(shru_0(bits, 32)); if (highBits != 0) { return new BigInteger_0(lowBits, highBits); } if (lowBits > 10 || lowBits < 0) { return new BigInteger(1, lowBits); } return SMALL_VALUES[lowBits]; } function getPowerOfTwo(exp_0){ var bitN, intCount, resDigits; if (exp_0 < TWO_POWS.length) { return TWO_POWS[exp_0]; } intCount = exp_0 >> 5; bitN = exp_0 & 31; resDigits = initUnidimensionalArray(I_classLit, $intern_49, 28, intCount + 1, 15, 1); resDigits[intCount] = 1 << bitN; return new BigInteger_1(1, intCount + 1, resDigits); } function setFromString(bi, val){ var bigRadix, bigRadixDigit, bigRadixDigitsLength, charsPerInt, digitIndex, digits, endChar, newDigit, numberLength, sign, startChar, stringLength, substrEnd, substrStart, topChars; stringLength = val.length; endChar = stringLength; checkCriticalStringElementIndex(0, val.length); if (val.charCodeAt(0) == 45) { sign = -1; startChar = 1; --stringLength; } else { sign = 1; startChar = 0; } charsPerInt = ($clinit_Conversion() , digitFitInInt)[10]; bigRadixDigitsLength = stringLength / charsPerInt | 0; topChars = stringLength % charsPerInt; topChars != 0 && ++bigRadixDigitsLength; digits = initUnidimensionalArray(I_classLit, $intern_49, 28, bigRadixDigitsLength, 15, 1); bigRadix = bigRadices[8]; digitIndex = 0; substrEnd = startChar + (topChars == 0?charsPerInt:topChars); for (substrStart = startChar; substrStart < endChar; substrStart = substrEnd , substrEnd = substrStart + charsPerInt) { bigRadixDigit = __parseAndValidateInt((checkCriticalStringBounds(substrStart, substrEnd, val.length) , val.substr(substrStart, substrEnd - substrStart)), $intern_43, $intern_0); newDigit = ($clinit_Multiplication() , multiplyByInt(digits, digits, digitIndex, bigRadix)); newDigit += inplaceAdd(digits, digitIndex, bigRadixDigit); digits[digitIndex++] = newDigit; } numberLength = digitIndex; bi.sign = sign; bi.numberLength = numberLength; bi.digits = digits; $cutOffLeadingZeroes(bi); } function valueOf_9(val){ $clinit_BigInteger(); return compare_2(val, 0) >= 0?fromBits(val):$negate(fromBits(neg_0(val))); } defineClass(92, 242, {3:1, 34:1, 242:1, 92:1}, BigInteger, BigInteger_0, BigInteger_1, BigInteger_2, BigInteger_3); _.compareTo_0 = function compareTo_12(val){ return $compareTo_11(this, castTo(val, 92)); } ; _.doubleValue = function doubleValue_6(){ return __parseAndValidateDouble(toDecimalScaledString_0(this, 0)); } ; _.equals_0 = function equals_43(x_0){ return $equals_6(this, x_0); } ; _.hashCode_1 = function hashCode_44(){ return $hashCode_3(this); } ; _.toString_0 = function toString_51(){ return toDecimalScaledString_0(this, 0); } ; _.firstNonzeroDigit = -2; _.hashCode_0 = 0; _.numberLength = 0; _.sign = 0; var MINUS_ONE, ONE_0, SMALL_VALUES, TEN, TWO_POWS, ZERO_0; var Ljava_math_BigInteger_2_classLit = createForClass('java.math', 'BigInteger', 92); function bitLength_1(val){ var bLength, highDigit, i; if (val.sign == 0) { return 0; } bLength = val.numberLength << 5; highDigit = val.digits[val.numberLength - 1]; if (val.sign < 0) { i = $getFirstNonzeroDigit(val); if (i == val.numberLength - 1) { --highDigit; highDigit = highDigit | 0; } } bLength -= numberOfLeadingZeros_0(highDigit); return bLength; } function shiftLeft(source, count){ var intCount, resDigits, resLength, result; intCount = count >> 5; count &= 31; resLength = source.numberLength + intCount + (count == 0?0:1); resDigits = initUnidimensionalArray(I_classLit, $intern_49, 28, resLength, 15, 1); shiftLeft_0(resDigits, source.digits, intCount, count); result = new BigInteger_1(source.sign, resLength, resDigits); $cutOffLeadingZeroes(result); return result; } function shiftLeft_0(result, source, intCount, count){ var i, i0, rightShiftCount; if (count == 0) { arraycopy(source, 0, result, intCount, result.length - intCount); } else { rightShiftCount = 32 - count; result[result.length - 1] = 0; for (i0 = result.length - 1; i0 > intCount; i0--) { result[i0] |= source[i0 - intCount - 1] >>> rightShiftCount; result[i0 - 1] = source[i0 - intCount - 1] << count; } } for (i = 0; i < intCount; i++) { result[i] = 0; } } function shiftLeftOneBit(result, source, srcLen){ var carry, i, val; carry = 0; for (i = 0; i < srcLen; i++) { val = source[i]; result[i] = val << 1 | carry; carry = val >>> 31; } carry != 0 && (result[srcLen] = carry); } function shiftRight(source, count){ var i, intCount, resDigits, resLength, result; intCount = count >> 5; count &= 31; if (intCount >= source.numberLength) { return source.sign < 0?($clinit_BigInteger() , MINUS_ONE):($clinit_BigInteger() , ZERO_0); } resLength = source.numberLength - intCount; resDigits = initUnidimensionalArray(I_classLit, $intern_49, 28, resLength + 1, 15, 1); shiftRight_0(resDigits, resLength, source.digits, intCount, count); if (source.sign < 0) { for (i = 0; i < intCount && source.digits[i] == 0; i++) ; if (i < intCount || count > 0 && source.digits[i] << 32 - count != 0) { for (i = 0; i < resLength && resDigits[i] == -1; i++) { resDigits[i] = 0; } i == resLength && ++resLength; ++resDigits[i]; } } result = new BigInteger_1(source.sign, resLength, resDigits); $cutOffLeadingZeroes(result); return result; } function shiftRight_0(result, resultLen, source, intCount, count){ var allZero, i, leftShiftCount; allZero = true; for (i = 0; i < intCount; i++) { allZero = allZero & source[i] == 0; } if (count == 0) { arraycopy(source, intCount, result, 0, resultLen); i = resultLen; } else { leftShiftCount = 32 - count; allZero = allZero & source[i] << leftShiftCount == 0; for (i = 0; i < resultLen - 1; i++) { result[i] = source[i + intCount] >>> count | source[i + intCount + 1] << leftShiftCount; } result[i] = source[i + intCount] >>> count; ++i; } return allZero; } function $clinit_Conversion(){ $clinit_Conversion = emptyMethod; bigRadices = stampJavaTypeInfo(getClassLiteralForArray(I_classLit, 1), $intern_49, 28, 15, [$intern_43, 1162261467, $intern_36, 1220703125, 362797056, 1977326743, $intern_36, 387420489, $intern_56, 214358881, 429981696, 815730721, 1475789056, 170859375, 268435456, 410338673, 612220032, 893871739, 1280000000, 1801088541, 113379904, 148035889, 191102976, 244140625, 308915776, 387420489, 481890304, 594823321, 729000000, 887503681, $intern_36, 1291467969, 1544804416, 1838265625, 60466176]); digitFitInInt = stampJavaTypeInfo(getClassLiteralForArray(I_classLit, 1), $intern_49, 28, 15, [-1, -1, 31, 19, 15, 13, 11, 11, 10, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5]); } function divideLongByBillion(a){ var aPos, quot, rem; if (compare_2(a, 0) >= 0) { quot = div(a, $intern_56); rem = mod(a, $intern_56); } else { aPos = shru_0(a, 1); quot = div(aPos, 500000000); rem = mod(aPos, 500000000); rem = add_20(shl_0(rem, 1), and_0(a, 1)); } return or_0(shl_0(rem, 32), and_0(quot, $intern_69)); } function toDecimalScaledString(value_0, scale){ $clinit_Conversion(); var currentChar, endPoint, exponent, insertPoint, j, j0, negNumber, prev, resLengthInChars, result, result1, result10, startPoint, v; negNumber = compare_2(value_0, 0) < 0; negNumber && (value_0 = neg_0(value_0)); if (compare_2(value_0, 0) == 0) { switch (scale) { case 0: return '0'; case 1: return '0.0'; case 2: return '0.00'; case 3: return '0.000'; case 4: return '0.0000'; case 5: return '0.00000'; case 6: return '0.000000'; default:result10 = new StringBuilder; scale < 0?(result10.string += '0E+' , result10):(result10.string += '0E' , result10); result10.string += scale == $intern_43?'2147483648':'' + -scale; return result10.string; } } resLengthInChars = 18; result = initUnidimensionalArray(C_classLit, $intern_45, 28, resLengthInChars + 1, 15, 1); currentChar = resLengthInChars; v = value_0; do { prev = v; v = div(v, 10); result[--currentChar] = toInt_0(add_20(48, sub_2(prev, mul_0(v, 10)))) & $intern_47; } while (compare_2(v, 0) != 0); exponent = sub_2(sub_2(sub_2(resLengthInChars, currentChar), scale), 1); if (scale == 0) { negNumber && (result[--currentChar] = 45); return valueOf_8(result, currentChar, resLengthInChars - currentChar); } if (scale > 0 && compare_2(exponent, -6) >= 0) { if (compare_2(exponent, 0) >= 0) { insertPoint = currentChar + toInt_0(exponent); for (j0 = resLengthInChars - 1; j0 >= insertPoint; j0--) { result[j0 + 1] = result[j0]; } result[++insertPoint] = 46; negNumber && (result[--currentChar] = 45); return valueOf_8(result, currentChar, resLengthInChars - currentChar + 1); } for (j = 2; lt(j, add_20(neg_0(exponent), 1)); j++) { result[--currentChar] = 48; } result[--currentChar] = 46; result[--currentChar] = 48; negNumber && (result[--currentChar] = 45); return valueOf_8(result, currentChar, resLengthInChars - currentChar); } startPoint = currentChar + 1; endPoint = resLengthInChars; result1 = new StringBuilder_0; negNumber && (result1.string += '-' , result1); if (endPoint - startPoint >= 1) { $append_5(result1, result[currentChar]); result1.string += '.'; result1.string += valueOf_8(result, currentChar + 1, resLengthInChars - currentChar - 1); } else { result1.string += valueOf_8(result, currentChar, resLengthInChars - currentChar); } result1.string += 'E'; compare_2(exponent, 0) > 0 && (result1.string += '+' , result1); result1.string += '' + toString_39(exponent); return result1.string; } function toDecimalScaledString_0(val, scale){ $clinit_Conversion(); var currentChar, delta, digits, endPoint, exponent, highDigit, i, i1, insertPoint, j, j0, negNumber, numberLength, prev, previous, res, resDigit, resLengthInChars, result, result1, result10, result11, sign, startPoint, temp, temp1, tempLen, v; sign = val.sign; numberLength = val.numberLength; digits = val.digits; if (sign == 0) { switch (scale) { case 0: return '0'; case 1: return '0.0'; case 2: return '0.00'; case 3: return '0.000'; case 4: return '0.0000'; case 5: return '0.00000'; case 6: return '0.000000'; default:result10 = new StringBuilder; scale < 0?(result10.string += '0E+' , result10):(result10.string += '0E' , result10); result10.string += -scale; return result10.string; } } resLengthInChars = numberLength * 10 + 1 + 7; result = initUnidimensionalArray(C_classLit, $intern_45, 28, resLengthInChars + 1, 15, 1); currentChar = resLengthInChars; if (numberLength == 1) { highDigit = digits[0]; if (highDigit < 0) { v = and_0(highDigit, $intern_69); do { prev = v; v = div(v, 10); result[--currentChar] = 48 + toInt_0(sub_2(prev, mul_0(v, 10))) & $intern_47; } while (compare_2(v, 0) != 0); } else { v = highDigit; do { prev = v; v = v / 10 | 0; result[--currentChar] = 48 + (prev - v * 10) & $intern_47; } while (v != 0); } } else { temp = initUnidimensionalArray(I_classLit, $intern_49, 28, numberLength, 15, 1); tempLen = numberLength; arraycopy(digits, 0, temp, 0, tempLen); BIG_LOOP: while (true) { result11 = 0; for (i1 = tempLen - 1; i1 >= 0; i1--) { temp1 = add_20(shl_0(result11, 32), and_0(temp[i1], $intern_69)); res = divideLongByBillion(temp1); temp[i1] = toInt_0(res); result11 = toInt_0(shr_0(res, 32)); } resDigit = toInt_0(result11); previous = currentChar; do { result[--currentChar] = 48 + resDigit % 10 & $intern_47; } while ((resDigit = resDigit / 10 | 0) != 0 && currentChar != 0); delta = 9 - previous + currentChar; for (i = 0; i < delta && currentChar > 0; i++) { result[--currentChar] = 48; } j = tempLen - 1; for (; temp[j] == 0; j--) { if (j == 0) { break BIG_LOOP; } } tempLen = j + 1; } while (result[currentChar] == 48) { ++currentChar; } } negNumber = sign < 0; exponent = resLengthInChars - currentChar - scale - 1; if (scale == 0) { negNumber && (result[--currentChar] = 45); return valueOf_8(result, currentChar, resLengthInChars - currentChar); } if (scale > 0 && exponent >= -6) { if (exponent >= 0) { insertPoint = currentChar + exponent; for (j0 = resLengthInChars - 1; j0 >= insertPoint; j0--) { result[j0 + 1] = result[j0]; } result[++insertPoint] = 46; negNumber && (result[--currentChar] = 45); return valueOf_8(result, currentChar, resLengthInChars - currentChar + 1); } for (j = 2; j < -exponent + 1; j++) { result[--currentChar] = 48; } result[--currentChar] = 46; result[--currentChar] = 48; negNumber && (result[--currentChar] = 45); return valueOf_8(result, currentChar, resLengthInChars - currentChar); } startPoint = currentChar + 1; endPoint = resLengthInChars; result1 = new StringBuilder_0; negNumber && (result1.string += '-' , result1); if (endPoint - startPoint >= 1) { $append_5(result1, result[currentChar]); result1.string += '.'; result1.string += valueOf_8(result, currentChar + 1, resLengthInChars - currentChar - 1); } else { result1.string += valueOf_8(result, currentChar, resLengthInChars - currentChar); } result1.string += 'E'; exponent > 0 && (result1.string += '+' , result1); result1.string += '' + exponent; return result1.string; } var bigRadices, digitFitInInt; function add_21(op1, op2){ var a, b, cmp, op1Len, op1Sign, op2Len, op2Sign, res, res0, resDigits, resSign, valueHi, valueLo; op1Sign = op1.sign; op2Sign = op2.sign; if (op1Sign == 0) { return op2; } if (op2Sign == 0) { return op1; } op1Len = op1.numberLength; op2Len = op2.numberLength; if (op1Len + op2Len == 2) { a = and_0(op1.digits[0], $intern_69); b = and_0(op2.digits[0], $intern_69); if (op1Sign == op2Sign) { res0 = add_20(a, b); valueLo = toInt_0(res0); valueHi = toInt_0(shru_0(res0, 32)); return valueHi == 0?new BigInteger(op1Sign, valueLo):new BigInteger_1(op1Sign, 2, stampJavaTypeInfo(getClassLiteralForArray(I_classLit, 1), $intern_49, 28, 15, [valueLo, valueHi])); } return $clinit_BigInteger() , gte_0(op1Sign < 0?sub_2(b, a):sub_2(a, b), 0)?fromBits(op1Sign < 0?sub_2(b, a):sub_2(a, b)):$negate(fromBits(neg_0(op1Sign < 0?sub_2(b, a):sub_2(a, b)))); } else if (op1Sign == op2Sign) { resSign = op1Sign; resDigits = op1Len >= op2Len?add_22(op1.digits, op1Len, op2.digits, op2Len):add_22(op2.digits, op2Len, op1.digits, op1Len); } else { cmp = op1Len != op2Len?op1Len > op2Len?1:-1:compareArrays(op1.digits, op2.digits, op1Len); if (cmp == 0) { return $clinit_BigInteger() , ZERO_0; } if (cmp == 1) { resSign = op1Sign; resDigits = subtract_0(op1.digits, op1Len, op2.digits, op2Len); } else { resSign = op2Sign; resDigits = subtract_0(op2.digits, op2Len, op1.digits, op1Len); } } res = new BigInteger_1(resSign, resDigits.length, resDigits); $cutOffLeadingZeroes(res); return res; } function add_22(a, aSize, b, bSize){ var res; res = initUnidimensionalArray(I_classLit, $intern_49, 28, aSize + 1, 15, 1); add_23(res, a, aSize, b, bSize); return res; } function add_23(res, a, aSize, b, bSize){ var carry, i; carry = add_20(and_0(a[0], $intern_69), and_0(b[0], $intern_69)); res[0] = toInt_0(carry); carry = shr_0(carry, 32); if (aSize >= bSize) { for (i = 1; i < bSize; i++) { carry = add_20(carry, add_20(and_0(a[i], $intern_69), and_0(b[i], $intern_69))); res[i] = toInt_0(carry); carry = shr_0(carry, 32); } for (; i < aSize; i++) { carry = add_20(carry, and_0(a[i], $intern_69)); res[i] = toInt_0(carry); carry = shr_0(carry, 32); } } else { for (i = 1; i < aSize; i++) { carry = add_20(carry, add_20(and_0(a[i], $intern_69), and_0(b[i], $intern_69))); res[i] = toInt_0(carry); carry = shr_0(carry, 32); } for (; i < bSize; i++) { carry = add_20(carry, and_0(b[i], $intern_69)); res[i] = toInt_0(carry); carry = shr_0(carry, 32); } } compare_2(carry, 0) != 0 && (res[i] = toInt_0(carry)); } function compareArrays(a, b, size_0){ var i; for (i = size_0 - 1; i >= 0 && a[i] === b[i]; i--) ; return i < 0?0:lt(and_0(a[i], $intern_69), and_0(b[i], $intern_69))?-1:1; } function inplaceAdd(a, aSize, addend){ var carry, i; carry = and_0(addend, $intern_69); for (i = 0; compare_2(carry, 0) != 0 && i < aSize; i++) { carry = add_20(carry, and_0(a[i], $intern_69)); a[i] = toInt_0(carry); carry = shr_0(carry, 32); } return toInt_0(carry); } function subtract(op1, op2){ var a, b, cmp, op1Len, op1Sign, op2Len, op2Sign, res, resDigits, resSign; op1Sign = op1.sign; op2Sign = op2.sign; if (op2Sign == 0) { return op1; } if (op1Sign == 0) { return op2.sign == 0?op2:new BigInteger_1(-op2.sign, op2.numberLength, op2.digits); } op1Len = op1.numberLength; op2Len = op2.numberLength; if (op1Len + op2Len == 2) { a = and_0(op1.digits[0], $intern_69); b = and_0(op2.digits[0], $intern_69); op1Sign < 0 && (a = neg_0(a)); op2Sign < 0 && (b = neg_0(b)); return $clinit_BigInteger() , gte_0(sub_2(a, b), 0)?fromBits(sub_2(a, b)):$negate(fromBits(neg_0(sub_2(a, b)))); } cmp = op1Len != op2Len?op1Len > op2Len?1:-1:compareArrays(op1.digits, op2.digits, op1Len); if (cmp == -1) { resSign = -op2Sign; resDigits = op1Sign == op2Sign?subtract_0(op2.digits, op2Len, op1.digits, op1Len):add_22(op2.digits, op2Len, op1.digits, op1Len); } else { resSign = op1Sign; if (op1Sign == op2Sign) { if (cmp == 0) { return $clinit_BigInteger() , ZERO_0; } resDigits = subtract_0(op1.digits, op1Len, op2.digits, op2Len); } else { resDigits = add_22(op1.digits, op1Len, op2.digits, op2Len); } } res = new BigInteger_1(resSign, resDigits.length, resDigits); $cutOffLeadingZeroes(res); return res; } function subtract_0(a, aSize, b, bSize){ var res; res = initUnidimensionalArray(I_classLit, $intern_49, 28, aSize, 15, 1); subtract_1(res, a, aSize, b, bSize); return res; } function subtract_1(res, a, aSize, b, bSize){ var borrow, i; borrow = 0; for (i = 0; i < bSize; i++) { borrow = add_20(borrow, sub_2(and_0(a[i], $intern_69), and_0(b[i], $intern_69))); res[i] = toInt_0(borrow); borrow = shr_0(borrow, 32); } for (; i < aSize; i++) { borrow = add_20(borrow, and_0(a[i], $intern_69)); res[i] = toInt_0(borrow); borrow = shr_0(borrow, 32); } } function $clinit_Multiplication(){ $clinit_Multiplication = emptyMethod; var fivePow, i; bigFivePows = initUnidimensionalArray(Ljava_math_BigInteger_2_classLit, $intern_16, 92, 32, 0, 1); bigTenPows = initUnidimensionalArray(Ljava_math_BigInteger_2_classLit, $intern_16, 92, 32, 0, 1); fivePow = 1; for (i = 0; i <= 18; i++) { bigFivePows[i] = ($clinit_BigInteger() , compare_2(fivePow, 0) >= 0?fromBits(fivePow):$negate(fromBits(neg_0(fivePow)))); bigTenPows[i] = gte_0(shl_0(fivePow, i), 0)?fromBits(shl_0(fivePow, i)):$negate(fromBits(neg_0(shl_0(fivePow, i)))); fivePow = mul_0(fivePow, 5); } for (; i < bigTenPows.length; i++) { bigFivePows[i] = $multiply(bigFivePows[i - 1], bigFivePows[1]); bigTenPows[i] = $multiply(bigTenPows[i - 1], ($clinit_BigInteger() , TEN)); } } function karatsuba(op1, op2){ $clinit_Multiplication(); var lower, lowerOp1, lowerOp2, middle, ndiv2, temp, upper, upperOp1, upperOp2; if (op2.numberLength > op1.numberLength) { temp = op1; op1 = op2; op2 = temp; } if (op2.numberLength < 63) { return multiplyPAP(op1, op2); } ndiv2 = (op1.numberLength & -2) << 4; upperOp1 = $shiftRight(op1, ndiv2); upperOp2 = $shiftRight(op2, ndiv2); lowerOp1 = subtract(op1, $shiftLeft(upperOp1, ndiv2)); lowerOp2 = subtract(op2, $shiftLeft(upperOp2, ndiv2)); upper = karatsuba(upperOp1, upperOp2); lower = karatsuba(lowerOp1, lowerOp2); middle = karatsuba(subtract(upperOp1, lowerOp1), subtract(lowerOp2, upperOp2)); middle = add_21(add_21(middle, upper), lower); middle = $shiftLeft(middle, ndiv2); upper = $shiftLeft(upper, ndiv2 << 1); return add_21(add_21(upper, middle), lower); } function multArraysPAP(aDigits, aLen, bDigits, bLen, resDigits){ if (aLen == 0 || bLen == 0) { return; } aLen == 1?(resDigits[bLen] = multiplyByInt(resDigits, bDigits, bLen, aDigits[0])):bLen == 1?(resDigits[aLen] = multiplyByInt(resDigits, aDigits, aLen, bDigits[0])):multPAP(aDigits, bDigits, resDigits, aLen, bLen); } function multPAP(a, b, t, aLen, bLen){ var aI, carry, i, j; if (maskUndefined(a) === maskUndefined(b) && aLen == bLen) { square(a, aLen, t); return; } for (i = 0; i < aLen; i++) { carry = 0; aI = a[i]; for (j = 0; j < bLen; j++) { carry = add_20(add_20(mul_0(and_0(aI, $intern_69), and_0(b[j], $intern_69)), and_0(t[i + j], $intern_69)), and_0(toInt_0(carry), $intern_69)); t[i + j] = toInt_0(carry); carry = shru_0(carry, 32); } t[i + bLen] = toInt_0(carry); } } function multiplyByInt(res, a, aSize, factor){ $clinit_Multiplication(); var carry, i; carry = 0; for (i = 0; i < aSize; i++) { carry = add_20(mul_0(and_0(a[i], $intern_69), and_0(factor, $intern_69)), and_0(toInt_0(carry), $intern_69)); res[i] = toInt_0(carry); carry = shru_0(carry, 32); } return toInt_0(carry); } function multiplyPAP(a, b){ var aDigits, aLen, bDigits, bLen, resDigits, resLength, resSign, result, val, valueHi, valueLo; aLen = a.numberLength; bLen = b.numberLength; resLength = aLen + bLen; resSign = a.sign != b.sign?-1:1; if (resLength == 2) { val = mul_0(and_0(a.digits[0], $intern_69), and_0(b.digits[0], $intern_69)); valueLo = toInt_0(val); valueHi = toInt_0(shru_0(val, 32)); return valueHi == 0?new BigInteger(resSign, valueLo):new BigInteger_1(resSign, 2, stampJavaTypeInfo(getClassLiteralForArray(I_classLit, 1), $intern_49, 28, 15, [valueLo, valueHi])); } aDigits = a.digits; bDigits = b.digits; resDigits = initUnidimensionalArray(I_classLit, $intern_49, 28, resLength, 15, 1); multArraysPAP(aDigits, aLen, bDigits, bLen, resDigits); result = new BigInteger_1(resSign, resLength, resDigits); $cutOffLeadingZeroes(result); return result; } function pow_0(base, exponent){ $clinit_Multiplication(); var acc, res; res = ($clinit_BigInteger() , ONE_0); acc = base; for (; exponent > 1; exponent >>= 1) { (exponent & 1) != 0 && (res = $multiply(res, acc)); acc.numberLength == 1?(acc = $multiply(acc, acc)):(acc = new BigInteger_2(square(acc.digits, acc.numberLength, initUnidimensionalArray(I_classLit, $intern_49, 28, acc.numberLength << 1, 15, 1)))); } res = $multiply(res, acc); return res; } function powerOf10(exp_0){ $clinit_Multiplication(); var intExp, longExp, powerOfFive, res; intExp = round_int(exp_0); if (exp_0 < bigTenPows.length) { return bigTenPows[intExp]; } else if (exp_0 <= 50) { return $pow(($clinit_BigInteger() , TEN), intExp); } else if (exp_0 <= $intern_46) { return $shiftLeft($pow(bigFivePows[1], intExp), intExp); } if (exp_0 > 1000000) { throw toJs(new ArithmeticException('power of ten too big')); } if (exp_0 <= $intern_0) { return $shiftLeft($pow(bigFivePows[1], intExp), intExp); } powerOfFive = $pow(bigFivePows[1], $intern_0); res = powerOfFive; longExp = fromDouble_0(exp_0 - $intern_0); intExp = round_int(exp_0 % $intern_0); while (compare_2(longExp, $intern_0) > 0) { res = $multiply(res, powerOfFive); longExp = sub_2(longExp, $intern_0); } res = $multiply(res, $pow(bigFivePows[1], intExp)); res = $shiftLeft(res, $intern_0); longExp = fromDouble_0(exp_0 - $intern_0); while (compare_2(longExp, $intern_0) > 0) { res = $shiftLeft(res, $intern_0); longExp = sub_2(longExp, $intern_0); } res = $shiftLeft(res, intExp); return res; } function square(a, aLen, res){ var carry, i, i0, index_0, j; for (i0 = 0; i0 < aLen; i0++) { carry = 0; for (j = i0 + 1; j < aLen; j++) { carry = add_20(add_20(mul_0(and_0(a[i0], $intern_69), and_0(a[j], $intern_69)), and_0(res[i0 + j], $intern_69)), and_0(toInt_0(carry), $intern_69)); res[i0 + j] = toInt_0(carry); carry = shru_0(carry, 32); } res[i0 + aLen] = toInt_0(carry); } shiftLeftOneBit(res, res, aLen << 1); carry = 0; for (i = 0 , index_0 = 0; i < aLen; ++i , index_0++) { carry = add_20(add_20(mul_0(and_0(a[i], $intern_69), and_0(a[i], $intern_69)), and_0(res[index_0], $intern_69)), and_0(toInt_0(carry), $intern_69)); res[index_0] = toInt_0(carry); carry = shru_0(carry, 32); ++index_0; carry = add_20(carry, and_0(res[index_0], $intern_69)); res[index_0] = toInt_0(carry); carry = shru_0(carry, 32); } return res; } var bigFivePows, bigTenPows; function $containsKey_3(this$static, key){ return instanceOfString(key)?$hasStringValue(this$static, key):!!$getEntry_0(this$static.hashCodeMap, key); } function $containsValue_2(this$static, value_0, entries){ var entry, entry$iterator; for (entry$iterator = entries.iterator_0(); entry$iterator.hasNext_0();) { entry = castTo(entry$iterator.next_1(), 44); if (this$static.equals_1(value_0, entry.getValue())) { return true; } } return false; } function $get_10(this$static, key){ return instanceOfString(key)?$getStringValue(this$static, key):getEntryValueOrNull($getEntry_0(this$static.hashCodeMap, key)); } function $getStringValue(this$static, key){ return key == null?getEntryValueOrNull($getEntry_0(this$static.hashCodeMap, null)):$get_15(this$static.stringMap, key); } function $hasStringValue(this$static, key){ return key == null?!!$getEntry_0(this$static.hashCodeMap, null):$contains_7(this$static.stringMap, key); } function $put_6(this$static, key, value_0){ return instanceOfString(key)?$putStringValue(this$static, key, value_0):$put_9(this$static.hashCodeMap, key, value_0); } function $putStringValue(this$static, key, value_0){ return key == null?$put_9(this$static.hashCodeMap, null, value_0):$put_10(this$static.stringMap, key, value_0); } function $remove_6(this$static, key){ return instanceOfString(key)?key == null?$remove_19(this$static.hashCodeMap, null):$remove_20(this$static.stringMap, key):$remove_19(this$static.hashCodeMap, key); } function $reset(this$static){ this$static.hashCodeMap = new InternalHashCodeMap(this$static); this$static.stringMap = new InternalStringMap(this$static); ++this$static.modCount; } function $size_2(this$static){ return this$static.hashCodeMap.size_0 + this$static.stringMap.size_0; } function AbstractHashMap(ignored, alsoIgnored){ checkCriticalArgument_0(ignored >= 0, 'Negative initial capacity'); checkCriticalArgument_0(alsoIgnored >= 0, 'Non-positive load factor'); $reset(this); } defineClass(498, 2065, $intern_7); _.clear_0 = function clear_30(){ $reset(this); } ; _.containsKey = function containsKey_9(key){ return $containsKey_3(this, key); } ; _.containsValue = function containsValue_3(value_0){ return $containsValue_2(this, value_0, this.stringMap) || $containsValue_2(this, value_0, this.hashCodeMap); } ; _.entrySet_0 = function entrySet_2(){ return new AbstractHashMap$EntrySet(this); } ; _.get_3 = function get_33(key){ return $get_10(this, key); } ; _.put = function put_5(key, value_0){ return $put_6(this, key, value_0); } ; _.remove_0 = function remove_48(key){ return $remove_6(this, key); } ; _.size_1 = function size_37(){ return $size_2(this); } ; _.modCount = 0; var Ljava_util_AbstractHashMap_2_classLit = createForClass('java.util', 'AbstractHashMap', 498); function $contains_0(this$static, o){ if (instanceOf(o, 44)) { return $containsEntry_0(this$static.this$01, castTo(o, 44)); } return false; } function AbstractHashMap$EntrySet(this$0){ this.this$01 = this$0; } defineClass(267, $intern_9, $intern_10, AbstractHashMap$EntrySet); _.clear_0 = function clear_31(){ this.this$01.clear_0(); } ; _.contains = function contains_28(o){ return $contains_0(this, o); } ; _.iterator_0 = function iterator_46(){ return new AbstractHashMap$EntrySetIterator(this.this$01); } ; _.remove_1 = function remove_49(entry){ var key; if ($contains_0(this, entry)) { key = castTo(entry, 44).getKey(); this.this$01.remove_0(key); return true; } return false; } ; _.size_1 = function size_38(){ return this.this$01.size_1(); } ; var Ljava_util_AbstractHashMap$EntrySet_2_classLit = createForClass('java.util', 'AbstractHashMap/EntrySet', 267); 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 $next_3(this$static){ var rv; checkCriticalConcurrentModification(this$static.this$01.modCount, this$static.lastModCount); checkCriticalElement(this$static.hasNext); this$static.last = this$static.current; rv = castTo(this$static.current.next_1(), 44); this$static.hasNext = $computeHasNext(this$static); return rv; } function $remove_7(this$static){ checkCriticalState(!!this$static.last); checkCriticalConcurrentModification(this$static.this$01.modCount, this$static.lastModCount); this$static.last.remove(); this$static.last = null; this$static.hasNext = $computeHasNext(this$static); this$static.lastModCount = this$static.this$01.modCount; } function AbstractHashMap$EntrySetIterator(this$0){ this.this$01 = this$0; this.stringMapEntries = new InternalStringMap$1(this.this$01.stringMap); this.current = this.stringMapEntries; this.hasNext = $computeHasNext(this); this.lastModCount = this.this$01.modCount; } defineClass(268, 1, $intern_6, AbstractHashMap$EntrySetIterator); _.forEachRemaining = function forEachRemaining_16(consumer){ $forEachRemaining(this, consumer); } ; _.next_1 = function next_19(){ return $next_3(this); } ; _.hasNext_0 = function hasNext_18(){ return this.hasNext; } ; _.remove = function remove_50(){ $remove_7(this); } ; _.hasNext = false; _.lastModCount = 0; var Ljava_util_AbstractHashMap$EntrySetIterator_2_classLit = createForClass('java.util', 'AbstractHashMap/EntrySetIterator', 268); function $hasNext_2(this$static){ return this$static.i < this$static.this$01_0.size_1(); } function $next_4(this$static){ checkCriticalElement(this$static.i < this$static.this$01_0.size_1()); return this$static.this$01_0.get_0(this$static.last = this$static.i++); } function $remove_8(this$static){ checkCriticalState(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(426, 1, $intern_6, AbstractList$IteratorImpl); _.forEachRemaining = function forEachRemaining_17(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_19(){ return $hasNext_2(this); } ; _.next_1 = function next_20(){ return $next_4(this); } ; _.remove = function remove_51(){ $remove_8(this); } ; _.i = 0; _.last = -1; var Ljava_util_AbstractList$IteratorImpl_2_classLit = createForClass('java.util', 'AbstractList/IteratorImpl', 426); function $add_1(this$static, o){ this$static.this$01.add_3(this$static.i, o); ++this$static.i; this$static.last = -1; } function AbstractList$ListIteratorImpl(this$0, start_0){ this.this$01 = this$0; AbstractList$IteratorImpl.call(this, this$0); checkCriticalPositionIndex(start_0, this$0.size_1()); this.i = start_0; } defineClass(98, 426, $intern_14, AbstractList$ListIteratorImpl); _.remove = function remove_52(){ $remove_8(this); } ; _.add_1 = function add_24(o){ $add_1(this, o); } ; _.hasPrevious = function hasPrevious_3(){ return this.i > 0; } ; _.nextIndex_0 = function nextIndex_4(){ return this.i; } ; _.previous_0 = function previous_4(){ return checkCriticalElement(this.i > 0) , this.this$01.get_0(this.last = --this.i); } ; _.previousIndex = function previousIndex_3(){ return this.i - 1; } ; _.set_1 = function set_11(o){ checkCriticalState(this.last != -1); this.this$01.set_2(this.last, o); } ; var Ljava_util_AbstractList$ListIteratorImpl_2_classLit = createForClass('java.util', 'AbstractList/ListIteratorImpl', 98); function AbstractList$SubList(wrapped, fromIndex, toIndex){ checkCriticalPositionIndexes(fromIndex, toIndex, wrapped.size_1()); this.wrapped = wrapped; this.fromIndex = fromIndex; this.size_0 = toIndex - fromIndex; } defineClass(244, 56, $intern_38, AbstractList$SubList); _.add_3 = function add_25(index_0, element){ checkCriticalPositionIndex(index_0, this.size_0); this.wrapped.add_3(this.fromIndex + index_0, element); ++this.size_0; } ; _.get_0 = function get_34(index_0){ checkCriticalElementIndex(index_0, this.size_0); return this.wrapped.get_0(this.fromIndex + index_0); } ; _.remove_2 = function remove_53(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_2 = function set_12(index_0, element){ checkCriticalElementIndex(index_0, this.size_0); return this.wrapped.set_2(this.fromIndex + index_0, element); } ; _.size_1 = function size_39(){ return this.size_0; } ; _.fromIndex = 0; _.size_0 = 0; var Ljava_util_AbstractList$SubList_2_classLit = createForClass('java.util', 'AbstractList/SubList', 244); function AbstractMap$1(this$0){ this.this$01 = this$0; } defineClass(266, $intern_9, $intern_10, AbstractMap$1); _.clear_0 = function clear_32(){ this.this$01.clear_0(); } ; _.contains = function contains_29(key){ return this.this$01.containsKey(key); } ; _.iterator_0 = function iterator_47(){ var outerIter; return outerIter = this.this$01.entrySet_0().iterator_0() , new AbstractMap$1$1(outerIter); } ; _.remove_1 = function remove_54(key){ if (this.this$01.containsKey(key)) { this.this$01.remove_0(key); return true; } return false; } ; _.size_1 = function size_40(){ return this.this$01.size_1(); } ; var Ljava_util_AbstractMap$1_2_classLit = createForClass('java.util', 'AbstractMap/1', 266); function AbstractMap$1$1(val$outerIter){ this.val$outerIter2 = val$outerIter; } defineClass(541, 1, $intern_6, AbstractMap$1$1); _.forEachRemaining = function forEachRemaining_18(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_20(){ return this.val$outerIter2.hasNext_0(); } ; _.next_1 = function next_21(){ var entry; return entry = castTo(this.val$outerIter2.next_1(), 44) , entry.getKey(); } ; _.remove = function remove_55(){ this.val$outerIter2.remove(); } ; var Ljava_util_AbstractMap$1$1_2_classLit = createForClass('java.util', 'AbstractMap/1/1', 541); function AbstractMap$2(this$0){ this.this$01 = this$0; } defineClass(231, 31, $intern_8, AbstractMap$2); _.clear_0 = function clear_33(){ this.this$01.clear_0(); } ; _.contains = function contains_30(value_0){ return this.this$01.containsValue(value_0); } ; _.iterator_0 = function iterator_48(){ var outerIter; return outerIter = this.this$01.entrySet_0().iterator_0() , new AbstractMap$2$1(outerIter); } ; _.size_1 = function size_41(){ return this.this$01.size_1(); } ; var Ljava_util_AbstractMap$2_2_classLit = createForClass('java.util', 'AbstractMap/2', 231); function AbstractMap$2$1(val$outerIter){ this.val$outerIter2 = val$outerIter; } defineClass(301, 1, $intern_6, AbstractMap$2$1); _.forEachRemaining = function forEachRemaining_19(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_21(){ return this.val$outerIter2.hasNext_0(); } ; _.next_1 = function next_22(){ var entry; return entry = castTo(this.val$outerIter2.next_1(), 44) , entry.getValue(); } ; _.remove = function remove_56(){ this.val$outerIter2.remove(); } ; var Ljava_util_AbstractMap$2$1_2_classLit = createForClass('java.util', 'AbstractMap/2/1', 301); function $setValue_0(this$static, value_0){ var oldValue; oldValue = this$static.value_0; this$static.value_0 = value_0; return oldValue; } defineClass(494, 1, {494:1, 44:1}); _.equals_0 = function equals_44(other){ var entry; if (!instanceOf(other, 44)) { return false; } entry = castTo(other, 44); return equals_57(this.key, entry.getKey()) && equals_57(this.value_0, entry.getValue()); } ; _.getKey = function getKey_4(){ return this.key; } ; _.getValue = function getValue_6(){ return this.value_0; } ; _.hashCode_1 = function hashCode_45(){ return hashCode_55(this.key) ^ hashCode_55(this.value_0); } ; _.setValue = function setValue_7(value_0){ return $setValue_0(this, value_0); } ; _.toString_0 = function toString_52(){ return this.key + '=' + this.value_0; } ; var Ljava_util_AbstractMap$AbstractEntry_2_classLit = createForClass('java.util', 'AbstractMap/AbstractEntry', 494); function AbstractMap$SimpleEntry(key, value_0){ this.key = key; this.value_0 = value_0; } defineClass(397, 494, {494:1, 397:1, 44:1}, AbstractMap$SimpleEntry); var Ljava_util_AbstractMap$SimpleEntry_2_classLit = createForClass('java.util', 'AbstractMap/SimpleEntry', 397); defineClass(2082, 1, $intern_70); _.equals_0 = function equals_45(other){ var entry; if (!instanceOf(other, 44)) { return false; } entry = castTo(other, 44); return equals_57(this.getKey(), entry.getKey()) && equals_57(this.getValue(), entry.getValue()); } ; _.hashCode_1 = function hashCode_46(){ return hashCode_55(this.getKey()) ^ hashCode_55(this.getValue()); } ; _.toString_0 = function toString_53(){ return this.getKey() + '=' + this.getValue(); } ; var Ljava_util_AbstractMapEntry_2_classLit = createForClass('java.util', 'AbstractMapEntry', 2082); function $containsEntry_1(this$static, entry){ var key, lookupEntry; key = entry.getKey(); lookupEntry = this$static.getEntry(key); return !!lookupEntry && equals_57(lookupEntry.value_0, entry.getValue()); } function $containsKey_4(this$static, k){ var key; key = k; return !!this$static.getEntry(key); } function getKeyOrNSE(entry){ if (!entry) { throw toJs(new NoSuchElementException); } return entry.key; } defineClass(2090, 2065, $intern_11); _.ceilingKey = function ceilingKey_0(key){ return getEntryKeyOrNull(this.getCeilingEntry(key)); } ; _.containsEntry = function containsEntry_0(entry){ return $containsEntry_1(this, entry); } ; _.containsKey = function containsKey_10(k){ return $containsKey_4(this, k); } ; _.entrySet_0 = function entrySet_3(){ return new AbstractNavigableMap$EntrySet(this); } ; _.firstKey = function firstKey_0(){ return getKeyOrNSE(this.getFirstEntry()); } ; _.floorKey = function floorKey_0(key){ return getEntryKeyOrNull(this.getFloorEntry(key)); } ; _.get_3 = function get_35(k){ var key; key = k; return getEntryValueOrNull(this.getEntry(key)); } ; _.higherKey = function higherKey_0(key){ return getEntryKeyOrNull(this.getHigherEntry(key)); } ; _.keySet_0 = function keySet_16(){ return new AbstractNavigableMap$NavigableKeySet(this); } ; _.lastKey = function lastKey_0(){ return getKeyOrNSE(this.getLastEntry()); } ; _.lowerKey = function lowerKey_0(key){ return getEntryKeyOrNull(this.getLowerEntry(key)); } ; var Ljava_util_AbstractNavigableMap_2_classLit = createForClass('java.util', 'AbstractNavigableMap', 2090); function AbstractNavigableMap$EntrySet(this$0){ this.this$01_0 = this$0; } defineClass(629, $intern_9, $intern_10, AbstractNavigableMap$EntrySet); _.contains = function contains_31(o){ return instanceOf(o, 44) && $containsEntry_1(this.this$01_0, castTo(o, 44)); } ; _.iterator_0 = function iterator_49(){ return this.this$01_0.entryIterator_0(); } ; _.remove_1 = function remove_57(o){ var entry; if (instanceOf(o, 44)) { entry = castTo(o, 44); return this.this$01_0.removeEntry(entry); } return false; } ; _.size_1 = function size_42(){ return this.this$01_0.size_1(); } ; var Ljava_util_AbstractNavigableMap$EntrySet_2_classLit = createForClass('java.util', 'AbstractNavigableMap/EntrySet', 629); function AbstractNavigableMap$NavigableKeySet(map_0){ this.map_0 = map_0; } defineClass(1146, $intern_9, $intern_13, AbstractNavigableMap$NavigableKeySet); _.spliterator_0 = function spliterator_26(){ return new SortedSet$1(this); } ; _.clear_0 = function clear_34(){ this.map_0.clear_0(); } ; _.contains = function contains_32(o){ return $containsKey_4(this.map_0, o); } ; _.iterator_0 = function iterator_50(){ var entryIterator; entryIterator = this.map_0.entrySet_0().this$01_0.entryIterator_0(); return new AbstractNavigableMap$NavigableKeySet$1(entryIterator); } ; _.remove_1 = function remove_58(o){ if ($containsKey_4(this.map_0, o)) { this.map_0.remove_0(o); return true; } return false; } ; _.size_1 = function size_43(){ return this.map_0.size_1(); } ; var Ljava_util_AbstractNavigableMap$NavigableKeySet_2_classLit = createForClass('java.util', 'AbstractNavigableMap/NavigableKeySet', 1146); function AbstractNavigableMap$NavigableKeySet$1(val$entryIterator){ this.val$entryIterator2 = val$entryIterator; } defineClass(1147, 1, $intern_6, AbstractNavigableMap$NavigableKeySet$1); _.forEachRemaining = function forEachRemaining_20(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_22(){ return $hasNext_2(this.val$entryIterator2.iter); } ; _.next_1 = function next_23(){ var entry; entry = $next_10(this.val$entryIterator2); return entry.getKey(); } ; _.remove = function remove_59(){ $remove_27(this.val$entryIterator2); } ; var Ljava_util_AbstractNavigableMap$NavigableKeySet$1_2_classLit = createForClass('java.util', 'AbstractNavigableMap/NavigableKeySet/1', 1147); defineClass(2103, 31, $intern_8); _.add_2 = function add_26(o){ return checkCriticalState_0($offer(this, o), 'Unable to add element to queue') , true; } ; _.addAll = function addAll_12(c){ checkCriticalNotNull(c); checkCriticalArgument_0(c != this, "Can't add a queue to itself"); return $addAll(this, c); } ; _.clear_0 = function clear_35(){ while ($poll_0(this) != null) ; } ; var Ljava_util_AbstractQueue_2_classLit = createForClass('java.util', 'AbstractQueue', 2103); function $addFirst(this$static, e){ checkCriticalNotNull(e); this$static.head = this$static.head - 1 & this$static.array.length - 1; setCheck(this$static.array, this$static.head, e); $ensureCapacity(this$static); } function $addLast(this$static, e){ checkCriticalNotNull(e); setCheck(this$static.array, this$static.tail, e); this$static.tail = this$static.tail + 1 & this$static.array.length - 1; $ensureCapacity(this$static); } function $clear_4(this$static){ if (this$static.head == this$static.tail) { return; } this$static.array = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, 8, 5, 1); this$static.head = 0; this$static.tail = 0; } function $contains_1(it, o){ if (o == null) { return false; } while (it.currentIndex != it.fence) { if (equals_Ljava_lang_Object__Z__devirtual$(o, $next_5(it))) { return true; } } return false; } function $copyElements(this$static, dest, count){ var dstIdx, i, mask; mask = this$static.array.length - 1; for (i = this$static.head , dstIdx = 0; dstIdx < count; i = i + 1 & mask , ++dstIdx) { setCheck(dest, dstIdx, this$static.array[i]); } } function $ensureCapacity(this$static){ var newArray, newLength, numElements; if (this$static.head != this$static.tail) { return; } numElements = this$static.array.length; newLength = highestOneBit($wnd.Math.max(8, numElements)) << 1; if (this$static.head != 0) { newArray = createFrom(this$static.array, newLength); $copyElements(this$static, newArray, numElements); this$static.array = newArray; this$static.head = 0; } else { setLength(this$static.array, newLength); } this$static.tail = numElements; } function $isEmpty(this$static){ return this$static.head == this$static.tail; } function $pollFirst(this$static){ var e; e = this$static.array[this$static.head]; if (e == null) { return null; } setCheck(this$static.array, this$static.head, null); this$static.head = this$static.head + 1 & this$static.array.length - 1; return e; } function $pollLast(this$static){ var e; e = this$static.array[this$static.tail - 1 & this$static.array.length - 1]; if (e == null) { return null; } this$static.tail = this$static.tail - 1 & this$static.array.length - 1; setCheck(this$static.array, this$static.tail, null); return e; } function $remove_9(it, o){ if ($contains_1(it, o)) { $remove_10(it); return true; } return false; } function $removeAtIndex(this$static, i){ var headDistance, mask, size_0, tailDistance; mask = this$static.array.length - 1; headDistance = i - this$static.head & mask; tailDistance = this$static.tail - i & mask; size_0 = this$static.tail - this$static.head & mask; checkConcurrentModification(headDistance < size_0); if (headDistance >= tailDistance) { $shiftLeftAtIndex(this$static, i); return -1; } else { $shiftRightAtIndex(this$static, i); return 1; } } function $removeFirst(this$static){ var e; e = $pollFirst(this$static); checkCriticalElement(e != null); return e; } function $removeLast(this$static){ var e; e = $pollLast(this$static); checkCriticalElement(e != null); return e; } function $shiftLeftAtIndex(this$static, i){ var mask, nextOffset; mask = this$static.array.length - 1; this$static.tail = this$static.tail - 1 & mask; while (i != this$static.tail) { nextOffset = i + 1 & mask; setCheck(this$static.array, i, this$static.array[nextOffset]); i = nextOffset; } setCheck(this$static.array, this$static.tail, null); } function $shiftRightAtIndex(this$static, i){ var mask, prevOffset; mask = this$static.array.length - 1; while (i != this$static.head) { prevOffset = i - 1 & mask; setCheck(this$static.array, i, this$static.array[prevOffset]); i = prevOffset; } setCheck(this$static.array, this$static.head, null); this$static.head = this$static.head + 1 & mask; } function ArrayDeque(){ this.array = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, 8, 5, 1); } function ArrayDeque_0(numElements){ this.array = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, highestOneBit($wnd.Math.max(8, numElements)) << 1, 5, 1); } function checkConcurrentModification(expression){ if (!expression) { throw toJs(new ConcurrentModificationException); } } defineClass(310, 31, {4:1, 20:1, 31:1, 16:1}, ArrayDeque, ArrayDeque_0); _.add_2 = function add_27(e){ return $addLast(this, e) , true; } ; _.clear_0 = function clear_36(){ $clear_4(this); } ; _.contains = function contains_33(o){ return $contains_1(new ArrayDeque$IteratorImpl(this), o); } ; _.isEmpty = function isEmpty_18(){ return $isEmpty(this); } ; _.iterator_0 = function iterator_51(){ return new ArrayDeque$IteratorImpl(this); } ; _.remove_1 = function remove_60(o){ return $remove_9(new ArrayDeque$IteratorImpl(this), o); } ; _.size_1 = function size_44(){ return this.tail - this.head & this.array.length - 1; } ; _.spliterator_0 = function spliterator_27(){ return new Spliterators$IteratorSpliterator(this, 272); } ; _.toArray_0 = function toArray_10(out){ var size_0; size_0 = this.tail - this.head & this.array.length - 1; out.length < size_0 && (out = stampJavaTypeInfo_1(new Array(size_0), out)); $copyElements(this, out, size_0); out.length > size_0 && setCheck(out, size_0, null); return out; } ; _.head = 0; _.tail = 0; var Ljava_util_ArrayDeque_2_classLit = createForClass('java.util', 'ArrayDeque', 310); function $next_5(this$static){ var e; checkCriticalElement(this$static.currentIndex != this$static.fence); e = this$static.this$01.array[this$static.currentIndex]; checkConcurrentModification(this$static.fence == this$static.this$01.tail && e != null); this$static.lastIndex = this$static.currentIndex; this$static.currentIndex = this$static.currentIndex + 1 & this$static.this$01.array.length - 1; return e; } function $remove_10(this$static){ checkCriticalState(this$static.lastIndex >= 0); if ($removeAtIndex(this$static.this$01, this$static.lastIndex) < 0) { this$static.currentIndex = this$static.currentIndex - 1 & this$static.this$01.array.length - 1; this$static.fence = this$static.this$01.tail; } this$static.lastIndex = -1; } function ArrayDeque$IteratorImpl(this$0){ this.this$01 = this$0; this.currentIndex = this.this$01.head; this.fence = this.this$01.tail; } defineClass(459, 1, $intern_6, ArrayDeque$IteratorImpl); _.forEachRemaining = function forEachRemaining_21(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_23(){ return this.currentIndex != this.fence; } ; _.next_1 = function next_24(){ return $next_5(this); } ; _.remove = function remove_61(){ $remove_10(this); } ; _.currentIndex = 0; _.fence = 0; _.lastIndex = -1; var Ljava_util_ArrayDeque$IteratorImpl_2_classLit = createForClass('java.util', 'ArrayDeque/IteratorImpl', 459); function $$init_1(this$static){ this$static.array = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, 0, 5, 1); } function $add_2(this$static, index_0, o){ checkCriticalPositionIndex(index_0, this$static.array.length); insertTo(this$static.array, index_0, o); } function $add_3(this$static, o){ push_1(this$static.array, o); return true; } function $addAll_1(this$static, index_0, c){ var cArray, len; checkCriticalPositionIndex(index_0, this$static.array.length); cArray = c.toArray(); len = cArray.length; if (len == 0) { return false; } insertTo_0(this$static.array, index_0, cArray); return true; } function $addAll_2(this$static, c){ var cArray, len; cArray = c.toArray(); len = cArray.length; if (len == 0) { return false; } insertTo_0(this$static.array, this$static.array.length, cArray); return true; } function $forEach_1(this$static, consumer){ var e, e$array, e$index, e$max; checkCriticalNotNull(consumer); for (e$array = this$static.array , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) { e = e$array[e$index]; consumer.accept(e); } } function $get_11(this$static, index_0){ checkCriticalElementIndex(index_0, this$static.array.length); return this$static.array[index_0]; } function $indexOf_3(this$static, o, index_0){ for (; index_0 < this$static.array.length; ++index_0) { if (equals_57(o, this$static.array[index_0])) { return index_0; } } return -1; } function $remove_11(this$static, index_0){ var previous; previous = (checkCriticalElementIndex(index_0, this$static.array.length) , this$static.array[index_0]); removeFrom(this$static.array, index_0, 1); return previous; } function $remove_12(this$static, o){ var i; i = $indexOf_3(this$static, o, 0); if (i == -1) { return false; } $remove_11(this$static, i); return true; } function $removeRange(this$static, fromIndex, endIndex){ var count; checkCriticalPositionIndexes(fromIndex, endIndex, this$static.array.length); count = endIndex - fromIndex; removeFrom(this$static.array, fromIndex, count); } function $set_1(this$static, index_0, o){ var previous; previous = (checkCriticalElementIndex(index_0, this$static.array.length) , this$static.array[index_0]); this$static.array[index_0] = o; return previous; } function $sort(this$static, c){ sort_4(this$static.array, this$static.array.length, c); } function $toArray_1(this$static, out){ var i, size_0; size_0 = this$static.array.length; out.length < size_0 && (out = stampJavaTypeInfo_1(new Array(size_0), out)); for (i = 0; i < size_0; ++i) { setCheck(out, i, this$static.array[i]); } out.length > size_0 && setCheck(out, size_0, null); return out; } function ArrayList(){ $$init_1(this); } function ArrayList_0(initialCapacity){ $$init_1(this); checkCriticalArgument_0(initialCapacity >= 0, 'Initial capacity must not be negative'); } function ArrayList_1(c){ $$init_1(this); insertTo_0(this.array, 0, c.toArray()); } defineClass(13, 56, $intern_71, ArrayList, ArrayList_0, ArrayList_1); _.add_3 = function add_28(index_0, o){ $add_2(this, index_0, o); } ; _.add_2 = function add_29(o){ return $add_3(this, o); } ; _.addAll_0 = function addAll_13(index_0, c){ return $addAll_1(this, index_0, c); } ; _.addAll = function addAll_14(c){ return $addAll_2(this, c); } ; _.clear_0 = function clear_37(){ setLength(this.array, 0); } ; _.contains = function contains_34(o){ return $indexOf_3(this, o, 0) != -1; } ; _.forEach_0 = function forEach_17(consumer){ $forEach_1(this, consumer); } ; _.get_0 = function get_36(index_0){ return $get_11(this, index_0); } ; _.indexOf_0 = function indexOf_4(o){ return $indexOf_3(this, o, 0); } ; _.isEmpty = function isEmpty_19(){ return this.array.length == 0; } ; _.iterator_0 = function iterator_52(){ return new ArrayList$1(this); } ; _.remove_2 = function remove_62(index_0){ return $remove_11(this, index_0); } ; _.remove_1 = function remove_63(o){ return $remove_12(this, o); } ; _.removeRange = function removeRange_1(fromIndex, endIndex){ $removeRange(this, fromIndex, endIndex); } ; _.set_2 = function set_13(index_0, o){ return $set_1(this, index_0, o); } ; _.size_1 = function size_45(){ return this.array.length; } ; _.sort_0 = function sort_3(c){ $sort(this, c); } ; _.toArray = function toArray_11(){ return clone_0(this.array); } ; _.toArray_0 = function toArray_12(out){ return $toArray_1(this, out); } ; var Ljava_util_ArrayList_2_classLit = createForClass('java.util', 'ArrayList', 13); function $hasNext_3(this$static){ return this$static.i < this$static.this$01.array.length; } function $next_6(this$static){ checkCriticalElement(this$static.i < this$static.this$01.array.length); this$static.last = this$static.i++; return this$static.this$01.array[this$static.last]; } function $remove_13(this$static){ checkCriticalState(this$static.last != -1); $remove_11(this$static.this$01, this$static.i = this$static.last); this$static.last = -1; } function ArrayList$1(this$0){ this.this$01 = this$0; } defineClass(7, 1, $intern_6, ArrayList$1); _.forEachRemaining = function forEachRemaining_22(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_24(){ return $hasNext_3(this); } ; _.next_1 = function next_25(){ return $next_6(this); } ; _.remove = function remove_64(){ $remove_13(this); } ; _.i = 0; _.last = -1; var Ljava_util_ArrayList$1_2_classLit = createForClass('java.util', 'ArrayList/1', 7); function copyOf(original, newLength){ checkCriticalArraySize(newLength); return copyPrimitiveArray(original, initUnidimensionalArray(I_classLit, $intern_49, 28, newLength, 15, 1), newLength); } function copyOf_0(original, newLength){ var result; checkCriticalArraySize(newLength); return result = original.slice(0, newLength) , result.length = newLength , stampJavaTypeInfo_0(result, original); } function copyPrimitiveArray(original, copy, to){ var copyLen, len; len = original.length; copyLen = $wnd.Math.min(to, len); copy_0(original, 0, copy, 0, copyLen, true); return copy; } function deepToString(a, arraysIveSeen){ var joiner, obj, obj$array, obj$index, obj$max, objArray, old, tempSet, elementTypeCategory; if (a == null) { return 'null'; } old = arraysIveSeen.map_0.put(a, arraysIveSeen); if (old != null) { return '[...]'; } joiner = new StringJoiner(', ', '[', ']'); for (obj$array = a , obj$index = 0 , obj$max = obj$array.length; obj$index < obj$max; ++obj$index) { obj = obj$array[obj$index]; if (obj != null && (getClass__Ljava_lang_Class___devirtual$(obj).modifiers & 4) != 0) { if (Array.isArray(obj) && (elementTypeCategory = getElementTypeCategory(obj) , !(elementTypeCategory >= 14 && elementTypeCategory <= 16))) { if (arraysIveSeen.map_0.containsKey(obj)) { !joiner.builder?(joiner.builder = new StringBuilder_1(joiner.prefix)):$append_11(joiner.builder, joiner.delimiter); $append_8(joiner.builder, '[...]'); } else { objArray = castToArray(obj); tempSet = new HashSet_1(arraysIveSeen); $add_9(joiner, deepToString(objArray, tempSet)); } } else instanceOf(obj, 183)?$add_9(joiner, toString_61(castTo(obj, 183))):instanceOf(obj, 195)?$add_9(joiner, toString_54(castTo(obj, 195))):instanceOf(obj, 201)?$add_9(joiner, toString_55(castTo(obj, 201))):instanceOf(obj, 2111)?$add_9(joiner, toString_60(castTo(obj, 2111))):instanceOf(obj, 53)?$add_9(joiner, toString_58(castTo(obj, 53))):instanceOf(obj, 376)?$add_9(joiner, toString_59(castTo(obj, 376))):instanceOf(obj, 846)?$add_9(joiner, toString_57(castTo(obj, 846))):instanceOf(obj, 109) && $add_9(joiner, toString_56(castTo(obj, 109))); } else { $add_9(joiner, obj == null?'null':toString_40(obj)); } } return !joiner.builder?joiner.emptyValue:joiner.suffix.length == 0?joiner.builder.string:joiner.builder.string + ('' + joiner.suffix); } function equals_46(array1, array2){ var i, val1, val2; if (maskUndefined(array1) === maskUndefined(array2)) { return true; } if (array1 == null || array2 == null) { return false; } if (array1.length != array2.length) { return false; } for (i = 0; i < array1.length; ++i) { val1 = array1[i]; val2 = array2[i]; if (!(maskUndefined(val1) === maskUndefined(val2) || val1 != null && equals_Ljava_lang_Object__Z__devirtual$(val1, val2))) { return false; } } return true; } function fill_0(a, fromIndex, toIndex, val){ checkCriticalArrayBounds_0(fromIndex, toIndex, a.length); fill0(a, fromIndex, toIndex, val); } function fill_1(a, val){ fill0_0(a, a.length, val); } function fill_2(a, val){ fill0_2(a, a.length, val); } function fill_3(a){ fill0_3(a, a.length); } function fill0(a, fromIndex, toIndex, val){ var i; for (i = fromIndex; i < toIndex; ++i) { a[i] = val; } } function fill0_0(a, toIndex, val){ var i; for (i = 0; i < toIndex; ++i) { a[i] = val; } } function fill0_1(a, toIndex){ var i; for (i = 0; i < toIndex; ++i) { a[i] = -1; } } function fill0_2(a, toIndex, val){ var i; for (i = 0; i < toIndex; ++i) { setCheck(a, i, val); } } function fill0_3(a, toIndex){ var i; for (i = 0; i < toIndex; ++i) { a[i] = false; } } function hashCode_47(a){ var e, e$array, e$index, e$max, hashCode; hashCode = 1; for (e$array = a , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) { e = e$array[e$index]; hashCode = 31 * hashCode + (e != null?hashCode__I__devirtual$(e):0); hashCode = hashCode | 0; } return hashCode; } function insertionSort(array, low, high, comp){ var i, j, t; for (i = low + 1; i < high; ++i) { for (j = i; j > low && comp.compare_1(array[j - 1], array[j]) > 0; --j) { t = array[j]; setCheck(array, j, array[j - 1]); setCheck(array, j - 1, t); } } } function merge_1(src_0, srcLow, srcMid, srcHigh, dest, destLow, destHigh, comp){ var topIdx; topIdx = srcMid; while (destLow < destHigh) { topIdx >= srcHigh || srcLow < srcMid && comp.compare_1(src_0[srcLow], src_0[topIdx]) <= 0?setCheck(dest, destLow++, src_0[srcLow++]):setCheck(dest, destLow++, src_0[topIdx++]); } } function mergeSort(x_0, fromIndex, toIndex, comp){ var temp; comp = ($clinit_Comparators() , !comp?INTERNAL_NATURAL_ORDER:comp); temp = x_0.slice(fromIndex, toIndex); mergeSort_0(temp, x_0, fromIndex, toIndex, -fromIndex, comp); } function mergeSort_0(temp, array, low, high, ofs, comp){ var length_0, tempHigh, tempLow, tempMid; length_0 = high - low; if (length_0 < 7) { insertionSort(array, low, high, comp); return; } tempLow = low + ofs; tempHigh = high + ofs; tempMid = tempLow + (tempHigh - tempLow >> 1); mergeSort_0(array, temp, tempLow, tempMid, -ofs, comp); mergeSort_0(array, temp, tempMid, tempHigh, -ofs, comp); if (comp.compare_1(temp[tempMid - 1], temp[tempMid]) <= 0) { while (low < high) { setCheck(array, low++, temp[tempLow++]); } return; } merge_1(temp, tempLow, tempMid, tempHigh, array, low, high, comp); } function sort_4(x_0, toIndex, c){ checkCriticalArrayBounds_0(0, toIndex, x_0.length); mergeSort(x_0, 0, toIndex, c); } function sort_5(x_0, c){ mergeSort(x_0, 0, x_0.length, c); } function spliterator_28(array, endExclusive){ return checkCriticalArrayBounds(endExclusive, array.length) , new Spliterators$ArraySpliterator(array, endExclusive); } function stream_4(array){ return new StreamImpl(null, spliterator_28(array, array.length)); } function toString_54(a){ var element, element$array, element$index, element$max, joiner; if (a == null) { return 'null'; } joiner = new StringJoiner(', ', '[', ']'); for (element$array = a , element$index = 0 , element$max = element$array.length; element$index < element$max; ++element$index) { element = element$array[element$index]; $add_9(joiner, '' + element); } return !joiner.builder?joiner.emptyValue:joiner.suffix.length == 0?joiner.builder.string:joiner.builder.string + ('' + joiner.suffix); } function toString_55(a){ var element, element$array, element$index, element$max, joiner; if (a == null) { return 'null'; } joiner = new StringJoiner(', ', '[', ']'); for (element$array = a , element$index = 0 , element$max = element$array.length; element$index < element$max; ++element$index) { element = element$array[element$index]; $add_9(joiner, String.fromCharCode(element)); } return !joiner.builder?joiner.emptyValue:joiner.suffix.length == 0?joiner.builder.string:joiner.builder.string + ('' + joiner.suffix); } function toString_56(a){ var element, element$array, element$index, element$max, joiner; if (a == null) { return 'null'; } joiner = new StringJoiner(', ', '[', ']'); for (element$array = a , element$index = 0 , element$max = element$array.length; element$index < element$max; ++element$index) { element = element$array[element$index]; !joiner.builder?(joiner.builder = new StringBuilder_1(joiner.prefix)):$append_11(joiner.builder, joiner.delimiter); $append_8(joiner.builder, '' + element); } return !joiner.builder?joiner.emptyValue:joiner.suffix.length == 0?joiner.builder.string:joiner.builder.string + ('' + joiner.suffix); } function toString_57(a){ var element, element$array, element$index, element$max, joiner; if (a == null) { return 'null'; } joiner = new StringJoiner(', ', '[', ']'); for (element$array = a , element$index = 0 , element$max = element$array.length; element$index < element$max; ++element$index) { element = element$array[element$index]; !joiner.builder?(joiner.builder = new StringBuilder_1(joiner.prefix)):$append_11(joiner.builder, joiner.delimiter); $append_8(joiner.builder, '' + element); } return !joiner.builder?joiner.emptyValue:joiner.suffix.length == 0?joiner.builder.string:joiner.builder.string + ('' + joiner.suffix); } function toString_58(a){ var element, element$array, element$index, element$max, joiner; if (a == null) { return 'null'; } joiner = new StringJoiner(', ', '[', ']'); for (element$array = a , element$index = 0 , element$max = element$array.length; element$index < element$max; ++element$index) { element = element$array[element$index]; !joiner.builder?(joiner.builder = new StringBuilder_1(joiner.prefix)):$append_11(joiner.builder, joiner.delimiter); $append_8(joiner.builder, '' + element); } return !joiner.builder?joiner.emptyValue:joiner.suffix.length == 0?joiner.builder.string:joiner.builder.string + ('' + joiner.suffix); } function toString_59(a){ var element, element$array, element$index, element$max, joiner; if (a == null) { return 'null'; } joiner = new StringJoiner(', ', '[', ']'); for (element$array = a , element$index = 0 , element$max = element$array.length; element$index < element$max; ++element$index) { element = element$array[element$index]; !joiner.builder?(joiner.builder = new StringBuilder_1(joiner.prefix)):$append_11(joiner.builder, joiner.delimiter); $append_8(joiner.builder, '' + toString_39(element)); } return !joiner.builder?joiner.emptyValue:joiner.suffix.length == 0?joiner.builder.string:joiner.builder.string + ('' + joiner.suffix); } function toString_60(a){ var element, element$array, element$index, element$max, joiner; if (a == null) { return 'null'; } joiner = new StringJoiner(', ', '[', ']'); for (element$array = a , element$index = 0 , element$max = element$array.length; element$index < element$max; ++element$index) { element = element$array[element$index]; $add_9(joiner, '' + element); } return !joiner.builder?joiner.emptyValue:joiner.suffix.length == 0?joiner.builder.string:joiner.builder.string + ('' + joiner.suffix); } function toString_61(a){ var element, element$array, element$index, element$max, joiner; if (a == null) { return 'null'; } joiner = new StringJoiner(', ', '[', ']'); for (element$array = a , element$index = 0 , element$max = element$array.length; element$index < element$max; ++element$index) { element = element$array[element$index]; !joiner.builder?(joiner.builder = new StringBuilder_1(joiner.prefix)):$append_11(joiner.builder, joiner.delimiter); $append_8(joiner.builder, '' + element); } return !joiner.builder?joiner.emptyValue:joiner.suffix.length == 0?joiner.builder.string:joiner.builder.string + ('' + joiner.suffix); } function Arrays$0methodref$compare$Type(){ } defineClass(2112, $wnd.Function, {}, Arrays$0methodref$compare$Type); _.compare_0 = function compare_7(d1, d2){ return compare_4(d1, d2); } ; function $get_12(this$static, index_0){ checkCriticalElementIndex(index_0, this$static.array.length); return this$static.array[index_0]; } function $toArray_2(this$static, out){ var i, size_0; size_0 = this$static.array.length; out.length < size_0 && (out = stampJavaTypeInfo_1(new Array(size_0), out)); for (i = 0; i < size_0; ++i) { setCheck(out, i, this$static.array[i]); } out.length > size_0 && setCheck(out, size_0, null); return out; } function Arrays$ArrayList(array){ checkCriticalNotNull(array); this.array = array; } defineClass(151, 56, $intern_72, Arrays$ArrayList); _.contains = function contains_35(o){ return $indexOf(this, o) != -1; } ; _.forEach_0 = function forEach_18(consumer){ var e, e$array, e$index, e$max; checkCriticalNotNull(consumer); for (e$array = this.array , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) { e = e$array[e$index]; consumer.accept(e); } } ; _.get_0 = function get_37(index_0){ return $get_12(this, index_0); } ; _.set_2 = function set_14(index_0, value_0){ var was; was = (checkCriticalElementIndex(index_0, this.array.length) , this.array[index_0]); setCheck(this.array, index_0, value_0); return was; } ; _.size_1 = function size_46(){ return this.array.length; } ; _.sort_0 = function sort_6(c){ sort_4(this.array, this.array.length, c); } ; _.toArray = function toArray_13(){ return $toArray_2(this, initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, this.array.length, 5, 1)); } ; _.toArray_0 = function toArray_14(out){ return $toArray_2(this, out); } ; var Ljava_util_Arrays$ArrayList_2_classLit = createForClass('java.util', 'Arrays/ArrayList', 151); function $clinit_Collections(){ $clinit_Collections = emptyMethod; EMPTY_LIST = new Collections$EmptyList; EMPTY_MAP = new Collections$EmptyMap; EMPTY_SET = new Collections$EmptySet; } function addAll_15(c, a){ $clinit_Collections(); var e, e$array, e$index, e$max, result; result = false; for (e$array = a , e$index = 0 , e$max = e$array.length; e$index < e$max; ++e$index) { e = e$array[e$index]; result = result | c.add_2(e); } return result; } function disjoint(c1, c2){ $clinit_Collections(); var iterating, o, o$iterator, testing; iterating = c1; testing = c2; if (instanceOf(c1, 21) && !instanceOf(c2, 21)) { iterating = c2; testing = c1; } for (o$iterator = iterating.iterator_0(); o$iterator.hasNext_0();) { o = o$iterator.next_1(); if (testing.contains(o)) { return false; } } return true; } function hashCode_48(collection){ $clinit_Collections(); var e, e$iterator, hashCode; hashCode = 0; for (e$iterator = collection.iterator_0(); e$iterator.hasNext_0();) { e = e$iterator.next_1(); hashCode = hashCode + (e != null?hashCode__I__devirtual$(e):0); hashCode = hashCode | 0; } return hashCode; } function hashCode_49(list){ $clinit_Collections(); var e, e$iterator, hashCode; hashCode = 1; for (e$iterator = list.iterator_0(); e$iterator.hasNext_0();) { e = e$iterator.next_1(); hashCode = 31 * hashCode + (e != null?hashCode__I__devirtual$(e):0); hashCode = hashCode | 0; } return hashCode; } function nCopies(n, o){ $clinit_Collections(); var i, list; list = new ArrayList; for (i = 0; i < n; ++i) { push_1(list.array, o); } return new Collections$UnmodifiableRandomAccessList(list); } function reverse_2(l){ var t; $clinit_Collections(); var head, headElem, iBack, iFront, tail, tailElem; if (instanceOf(l, 59)) { for (iFront = 0 , iBack = l.size_1() - 1; iFront < iBack; ++iFront , --iBack) { t = l.get_0(iFront); l.set_2(iFront, l.get_0(iBack)); l.set_2(iBack, t); } } else { head = l.listIterator_0(); tail = l.listIterator_1(l.size_1()); while (head.nextIndex_0() < tail.previousIndex()) { headElem = head.next_1(); tailElem = tail.previous_0(); head.set_1(tailElem); tail.set_1(headElem); } } } function reverseOrder(cmp){ $clinit_Collections(); return !cmp?($clinit_Comparators() , $clinit_Comparators() , REVERSE_NATURAL_ORDER):cmp.reversed(); } function singletonMap(key, value_0){ $clinit_Collections(); var map_0; map_0 = new HashMap_0(1); instanceOfString(key)?$putStringValue(map_0, key, value_0):$put_9(map_0.hashCodeMap, key, value_0); return new Collections$UnmodifiableMap(map_0); } function unmodifiableList(list){ $clinit_Collections(); return instanceOf(list, 59)?new Collections$UnmodifiableRandomAccessList(list):new Collections$UnmodifiableList(list); } var EMPTY_LIST, EMPTY_MAP, EMPTY_SET; function $get_13(location_0){ checkCriticalElementIndex(location_0, 0); return null; } function Collections$EmptyList(){ } defineClass(953, 56, $intern_72, Collections$EmptyList); _.contains = function contains_36(object){ return false; } ; _.get_0 = function get_38(location_0){ return $get_13(location_0); } ; _.iterator_0 = function iterator_53(){ return $clinit_Collections() , $clinit_Collections$EmptyListIterator() , INSTANCE_4; } ; _.listIterator_0 = function listIterator_11(){ return $clinit_Collections() , $clinit_Collections$EmptyListIterator() , INSTANCE_4; } ; _.size_1 = function size_47(){ return 0; } ; var Ljava_util_Collections$EmptyList_2_classLit = createForClass('java.util', 'Collections/EmptyList', 953); function $clinit_Collections$EmptyListIterator(){ $clinit_Collections$EmptyListIterator = emptyMethod; INSTANCE_4 = new Collections$EmptyListIterator; } function Collections$EmptyListIterator(){ } defineClass(954, 1, $intern_14, Collections$EmptyListIterator); _.forEachRemaining = function forEachRemaining_23(consumer){ $forEachRemaining(this, consumer); } ; _.add_1 = function add_30(o){ throw toJs(new UnsupportedOperationException); } ; _.hasNext_0 = function hasNext_25(){ return false; } ; _.hasPrevious = function hasPrevious_4(){ return false; } ; _.next_1 = function next_26(){ throw toJs(new NoSuchElementException); } ; _.nextIndex_0 = function nextIndex_5(){ return 0; } ; _.previous_0 = function previous_5(){ throw toJs(new NoSuchElementException); } ; _.previousIndex = function previousIndex_4(){ return -1; } ; _.remove = function remove_65(){ throw toJs(new IllegalStateException); } ; _.set_1 = function set_15(o){ throw toJs(new IllegalStateException); } ; var INSTANCE_4; var Ljava_util_Collections$EmptyListIterator_2_classLit = createForClass('java.util', 'Collections/EmptyListIterator', 954); function Collections$EmptyMap(){ } defineClass(956, 2065, $intern_28, Collections$EmptyMap); _.containsKey = function containsKey_11(key){ return false; } ; _.containsValue = function containsValue_4(value_0){ return false; } ; _.entrySet_0 = function entrySet_4(){ return $clinit_Collections() , EMPTY_SET; } ; _.get_3 = function get_39(key){ return null; } ; _.keySet_0 = function keySet_17(){ return $clinit_Collections() , EMPTY_SET; } ; _.size_1 = function size_48(){ return 0; } ; _.values_0 = function values_16(){ return $clinit_Collections() , EMPTY_LIST; } ; var Ljava_util_Collections$EmptyMap_2_classLit = createForClass('java.util', 'Collections/EmptyMap', 956); function Collections$EmptySet(){ } defineClass(955, $intern_9, $intern_30, Collections$EmptySet); _.contains = function contains_37(object){ return false; } ; _.iterator_0 = function iterator_54(){ return $clinit_Collections() , $clinit_Collections$EmptyListIterator() , INSTANCE_4; } ; _.size_1 = function size_49(){ return 0; } ; var Ljava_util_Collections$EmptySet_2_classLit = createForClass('java.util', 'Collections/EmptySet', 955); function Collections$SingletonList(element){ this.element = element; } defineClass(608, 56, {3:1, 20:1, 31:1, 56:1, 16:1, 15:1}, Collections$SingletonList); _.contains = function contains_38(item_0){ return equals_57(this.element, item_0); } ; _.get_0 = function get_40(index_0){ checkCriticalElementIndex(index_0, 1); return this.element; } ; _.size_1 = function size_50(){ return 1; } ; var Ljava_util_Collections$SingletonList_2_classLit = createForClass('java.util', 'Collections/SingletonList', 608); function $add_4(){ throw toJs(new UnsupportedOperationException); } function $addAll_3(){ throw toJs(new UnsupportedOperationException); } function $clear_5(){ throw toJs(new UnsupportedOperationException); } function $contains_2(this$static, o){ return this$static.coll.contains(o); } function $containsAll_0(this$static, c){ return this$static.coll.containsAll(c); } function $remove_14(){ throw toJs(new UnsupportedOperationException); } function $toArray_3(this$static, a){ return this$static.coll.toArray_0(a); } function Collections$UnmodifiableCollection(coll){ this.coll = coll; } defineClass(384, 1, $intern_24, Collections$UnmodifiableCollection); _.forEach_0 = function forEach_19(action){ $forEach_0(this, action); } ; _.parallelStream = function parallelStream_3(){ return new StreamImpl(null, this.spliterator_0()); } ; _.spliterator_0 = function spliterator_29(){ return new Spliterators$IteratorSpliterator(this, 0); } ; _.stream = function stream_5(){ return new StreamImpl(null, this.spliterator_0()); } ; _.add_2 = function add_31(o){ return $add_4(); } ; _.addAll = function addAll_16(c){ return $addAll_3(); } ; _.clear_0 = function clear_38(){ $clear_5(); } ; _.contains = function contains_39(o){ return $contains_2(this, o); } ; _.containsAll = function containsAll_7(c){ return $containsAll_0(this, c); } ; _.isEmpty = function isEmpty_20(){ return this.coll.isEmpty(); } ; _.iterator_0 = function iterator_55(){ return new Collections$UnmodifiableCollectionIterator(this.coll.iterator_0()); } ; _.remove_1 = function remove_66(o){ return $remove_14(); } ; _.size_1 = function size_51(){ return this.coll.size_1(); } ; _.toArray = function toArray_15(){ return this.coll.toArray(); } ; _.toArray_0 = function toArray_16(a){ return $toArray_3(this, a); } ; _.toString_0 = function toString_62(){ return toString_40(this.coll); } ; var Ljava_util_Collections$UnmodifiableCollection_2_classLit = createForClass('java.util', 'Collections/UnmodifiableCollection', 384); function $remove_15(){ throw toJs(new UnsupportedOperationException); } function Collections$UnmodifiableCollectionIterator(it){ this.it = it; } defineClass(383, 1, $intern_6, Collections$UnmodifiableCollectionIterator); _.forEachRemaining = function forEachRemaining_24(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_26(){ return this.it.hasNext_0(); } ; _.next_1 = function next_27(){ return this.it.next_1(); } ; _.remove = function remove_67(){ $remove_15(); } ; var Ljava_util_Collections$UnmodifiableCollectionIterator_2_classLit = createForClass('java.util', 'Collections/UnmodifiableCollectionIterator', 383); function Collections$UnmodifiableList(list){ Collections$UnmodifiableCollection.call(this, list); this.list = list; } defineClass(540, 384, $intern_73, Collections$UnmodifiableList); _.spliterator_0 = function spliterator_30(){ return new Spliterators$IteratorSpliterator(this, 16); } ; _.add_3 = function add_32(index_0, element){ throw toJs(new UnsupportedOperationException); } ; _.addAll_0 = function addAll_17(index_0, c){ throw toJs(new UnsupportedOperationException); } ; _.equals_0 = function equals_47(o){ return equals_Ljava_lang_Object__Z__devirtual$(this.list, o); } ; _.get_0 = function get_41(index_0){ return this.list.get_0(index_0); } ; _.hashCode_1 = function hashCode_50(){ return hashCode__I__devirtual$(this.list); } ; _.indexOf_0 = function indexOf_5(o){ return this.list.indexOf_0(o); } ; _.isEmpty = function isEmpty_21(){ return this.list.isEmpty(); } ; _.listIterator_0 = function listIterator_12(){ return new Collections$UnmodifiableListIterator(this.list.listIterator_1(0)); } ; _.listIterator_1 = function listIterator_13(from){ return new Collections$UnmodifiableListIterator(this.list.listIterator_1(from)); } ; _.remove_2 = function remove_68(index_0){ throw toJs(new UnsupportedOperationException); } ; _.set_2 = function set_16(index_0, element){ throw toJs(new UnsupportedOperationException); } ; _.sort_0 = function sort_7(c){ throw toJs(new UnsupportedOperationException); } ; _.subList = function subList_7(fromIndex, toIndex){ return new Collections$UnmodifiableList(this.list.subList(fromIndex, toIndex)); } ; var Ljava_util_Collections$UnmodifiableList_2_classLit = createForClass('java.util', 'Collections/UnmodifiableList', 540); function Collections$UnmodifiableListIterator(lit){ Collections$UnmodifiableCollectionIterator.call(this, lit); this.lit = lit; } defineClass(705, 383, $intern_14, Collections$UnmodifiableListIterator); _.remove = function remove_69(){ $remove_15(); } ; _.add_1 = function add_33(o){ throw toJs(new UnsupportedOperationException); } ; _.hasPrevious = function hasPrevious_5(){ return this.lit.hasPrevious(); } ; _.nextIndex_0 = function nextIndex_6(){ return this.lit.nextIndex_0(); } ; _.previous_0 = function previous_6(){ return this.lit.previous_0(); } ; _.previousIndex = function previousIndex_5(){ return this.lit.previousIndex(); } ; _.set_1 = function set_17(o){ throw toJs(new UnsupportedOperationException); } ; var Ljava_util_Collections$UnmodifiableListIterator_2_classLit = createForClass('java.util', 'Collections/UnmodifiableListIterator', 705); function $containsValue_3(this$static, val){ return this$static.map_0.containsValue(val); } function $entrySet_2(this$static){ !this$static.entrySet && (this$static.entrySet = new Collections$UnmodifiableMap$UnmodifiableEntrySet(this$static.map_0.entrySet_0())); return this$static.entrySet; } function $equals_7(this$static, o){ return equals_Ljava_lang_Object__Z__devirtual$(this$static.map_0, o); } function $keySet_1(this$static){ !this$static.keySet && (this$static.keySet = new Collections$UnmodifiableSet(this$static.map_0.keySet_0())); return this$static.keySet; } function $values_2(this$static){ !this$static.values && (this$static.values = new Collections$UnmodifiableCollection(this$static.map_0.values_0())); return this$static.values; } function Collections$UnmodifiableMap(map_0){ this.map_0 = map_0; } defineClass(609, 1, $intern_7, Collections$UnmodifiableMap); _.forEach = function forEach_20(consumer){ $forEach_2(this, consumer); } ; _.merge = function merge_2(key, value_0, remappingFunction){ return $merge(this, key, value_0, remappingFunction); } ; _.clear_0 = function clear_39(){ throw toJs(new UnsupportedOperationException); } ; _.containsKey = function containsKey_12(key){ return this.map_0.containsKey(key); } ; _.containsValue = function containsValue_5(val){ return $containsValue_3(this, val); } ; _.entrySet_0 = function entrySet_5(){ return $entrySet_2(this); } ; _.equals_0 = function equals_48(o){ return $equals_7(this, o); } ; _.get_3 = function get_42(key){ return this.map_0.get_3(key); } ; _.hashCode_1 = function hashCode_51(){ return hashCode__I__devirtual$(this.map_0); } ; _.isEmpty = function isEmpty_22(){ return this.map_0.isEmpty(); } ; _.keySet_0 = function keySet_18(){ return $keySet_1(this); } ; _.put = function put_6(key, value_0){ throw toJs(new UnsupportedOperationException); } ; _.remove_0 = function remove_70(key){ throw toJs(new UnsupportedOperationException); } ; _.size_1 = function size_52(){ return this.map_0.size_1(); } ; _.toString_0 = function toString_63(){ return toString_40(this.map_0); } ; _.values_0 = function values_17(){ return $values_2(this); } ; var Ljava_util_Collections$UnmodifiableMap_2_classLit = createForClass('java.util', 'Collections/UnmodifiableMap', 609); function Collections$UnmodifiableSet(set_0){ Collections$UnmodifiableCollection.call(this, set_0); } defineClass(396, 384, $intern_29, Collections$UnmodifiableSet); _.spliterator_0 = function spliterator_31(){ return new Spliterators$IteratorSpliterator(this, 1); } ; _.equals_0 = function equals_49(o){ return equals_Ljava_lang_Object__Z__devirtual$(this.coll, o); } ; _.hashCode_1 = function hashCode_52(){ return hashCode__I__devirtual$(this.coll); } ; var Ljava_util_Collections$UnmodifiableSet_2_classLit = createForClass('java.util', 'Collections/UnmodifiableSet', 396); function $contains_3(this$static, o){ return this$static.coll.contains(o); } function $toArray_4(this$static, a){ var result; result = this$static.coll.toArray_0(a); $wrap(result, this$static.coll.size_1()); return result; } function $wrap(array, size_0){ var i; for (i = 0; i < size_0; ++i) { setCheck(array, i, new Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableEntry(castTo(array[i], 44))); } } function Collections$UnmodifiableMap$UnmodifiableEntrySet(s){ Collections$UnmodifiableSet.call(this, s); } defineClass(957, 396, $intern_29, Collections$UnmodifiableMap$UnmodifiableEntrySet); _.contains = function contains_40(o){ return $contains_3(this, o); } ; _.containsAll = function containsAll_8(o){ return this.coll.containsAll(o); } ; _.iterator_0 = function iterator_56(){ var it; it = this.coll.iterator_0(); return new Collections$UnmodifiableMap$UnmodifiableEntrySet$1(it); } ; _.toArray = function toArray_17(){ var array; array = this.coll.toArray(); $wrap(array, array.length); return array; } ; _.toArray_0 = function toArray_18(a){ return $toArray_4(this, a); } ; var Ljava_util_Collections$UnmodifiableMap$UnmodifiableEntrySet_2_classLit = createForClass('java.util', 'Collections/UnmodifiableMap/UnmodifiableEntrySet', 957); function Collections$UnmodifiableMap$UnmodifiableEntrySet$1(val$it){ this.val$it2 = val$it; } defineClass(958, 1, $intern_6, Collections$UnmodifiableMap$UnmodifiableEntrySet$1); _.forEachRemaining = function forEachRemaining_25(consumer){ $forEachRemaining(this, consumer); } ; _.next_1 = function next_28(){ return new Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableEntry(castTo(this.val$it2.next_1(), 44)); } ; _.hasNext_0 = function hasNext_27(){ return this.val$it2.hasNext_0(); } ; _.remove = function remove_71(){ throw toJs(new UnsupportedOperationException); } ; var Ljava_util_Collections$UnmodifiableMap$UnmodifiableEntrySet$1_2_classLit = createForClass('java.util', 'Collections/UnmodifiableMap/UnmodifiableEntrySet/1', 958); function Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableEntry(entry){ this.entry = entry; } defineClass(703, 1, $intern_70, Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableEntry); _.equals_0 = function equals_50(o){ return this.entry.equals_0(o); } ; _.getKey = function getKey_5(){ return this.entry.getKey(); } ; _.getValue = function getValue_7(){ return this.entry.getValue(); } ; _.hashCode_1 = function hashCode_53(){ return this.entry.hashCode_1(); } ; _.setValue = function setValue_8(value_0){ throw toJs(new UnsupportedOperationException); } ; _.toString_0 = function toString_64(){ return toString_40(this.entry); } ; var Ljava_util_Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableEntry_2_classLit = createForClass('java.util', 'Collections/UnmodifiableMap/UnmodifiableEntrySet/UnmodifiableEntry', 703); function Collections$UnmodifiableRandomAccessList(list){ Collections$UnmodifiableList.call(this, list); } defineClass(610, 540, {20:1, 16:1, 15:1, 59:1}, Collections$UnmodifiableRandomAccessList); var Ljava_util_Collections$UnmodifiableRandomAccessList_2_classLit = createForClass('java.util', 'Collections/UnmodifiableRandomAccessList', 610); function Collections$UnmodifiableSortedSet(sortedSet){ Collections$UnmodifiableSet.call(this, sortedSet); this.sortedSet = sortedSet; } defineClass(704, 396, $intern_31, Collections$UnmodifiableSortedSet); _.spliterator_0 = function spliterator_32(){ return new SortedSet$1(this); } ; _.equals_0 = function equals_51(o){ return equals_Ljava_lang_Object__Z__devirtual$(this.sortedSet, o); } ; _.hashCode_1 = function hashCode_54(){ return hashCode__I__devirtual$(this.sortedSet); } ; var Ljava_util_Collections$UnmodifiableSortedSet_2_classLit = createForClass('java.util', 'Collections/UnmodifiableSortedSet', 704); function Comparator$lambda$0$Type(){ } defineClass(858, 1, $intern_74, Comparator$lambda$0$Type); _.compare_1 = function compare_8(a, b){ var c; return c = lambda$0_26(castTo(a, 12), castTo(b, 12)) , c != 0?c:lambda$1_11(castTo(a, 12), castTo(b, 12)); } ; _.equals_0 = function equals_52(other){ return this === other; } ; _.reversed = function reversed_0(){ return new Comparators$ReversedComparator(this); } ; var Ljava_util_Comparator$lambda$0$Type_2_classLit = createForClass('java.util', 'Comparator/lambda$0$Type', 858); function $clinit_Comparators(){ $clinit_Comparators = emptyMethod; INTERNAL_NATURAL_ORDER = new Comparators$NaturalOrderComparator; NATURAL_ORDER = new Comparators$NaturalOrderComparator; REVERSE_NATURAL_ORDER = new Comparators$ReverseNaturalOrderComparator; } var INTERNAL_NATURAL_ORDER, NATURAL_ORDER, REVERSE_NATURAL_ORDER; function $compare(a, b){ return checkCriticalNotNull(a) , compareTo_Ljava_lang_Object__I__devirtual$(a, (checkCriticalNotNull(b) , b)); } function Comparators$NaturalOrderComparator(){ } defineClass(769, 1, $intern_74, Comparators$NaturalOrderComparator); _.compare_1 = function compare_9(a, b){ return $compare(castTo(a, 34), castTo(b, 34)); } ; _.equals_0 = function equals_53(other){ return this === other; } ; _.reversed = function reversed_1(){ return $clinit_Comparators() , REVERSE_NATURAL_ORDER; } ; var Ljava_util_Comparators$NaturalOrderComparator_2_classLit = createForClass('java.util', 'Comparators/NaturalOrderComparator', 769); function $compare_0(a, b){ return checkCriticalNotNull(b) , compareTo_Ljava_lang_Object__I__devirtual$(b, (checkCriticalNotNull(a) , a)); } function Comparators$ReverseNaturalOrderComparator(){ } defineClass(1226, 1, $intern_74, Comparators$ReverseNaturalOrderComparator); _.compare_1 = function compare_10(a, b){ return $compare_0(castTo(a, 34), castTo(b, 34)); } ; _.equals_0 = function equals_54(other){ return this === other; } ; _.reversed = function reversed_2(){ return $clinit_Comparators() , NATURAL_ORDER; } ; var Ljava_util_Comparators$ReverseNaturalOrderComparator_2_classLit = createForClass('java.util', 'Comparators/ReverseNaturalOrderComparator', 1226); function Comparators$ReversedComparator(comparator){ this.comparator = comparator; } defineClass(52, 1, $intern_74, Comparators$ReversedComparator); _.equals_0 = function equals_55(other){ return this === other; } ; _.compare_1 = function compare_11(a, b){ return this.comparator.compare_1(b, a); } ; _.reversed = function reversed_3(){ return this.comparator; } ; var Ljava_util_Comparators$ReversedComparator_2_classLit = createForClass('java.util', 'Comparators/ReversedComparator', 52); function ConcurrentModificationException(){ RuntimeException.call(this); } defineClass(175, 63, $intern_44, ConcurrentModificationException); var Ljava_util_ConcurrentModificationException_2_classLit = createForClass('java.util', 'ConcurrentModificationException', 175); function $clinit_Date$StringData(){ $clinit_Date$StringData = emptyMethod; DAYS = stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']); MONTHS = stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']); } var DAYS, MONTHS; function $accept(this$static, value_0){ var compensatedValue, newSum; this$static.count = add_20(this$static.count, 1); this$static.min_0 = $wnd.Math.min(this$static.min_0, value_0); this$static.max_0 = $wnd.Math.max(this$static.max_0, value_0); this$static.naiveSum += value_0; compensatedValue = value_0 - this$static.sumError; newSum = this$static.sum + compensatedValue; this$static.sumError = newSum - this$static.sum - compensatedValue; this$static.sum = newSum; } function $getSum(this$static){ var compensatedSum; compensatedSum = this$static.sum + this$static.sumError; if (isNaN(compensatedSum) && isInfinite(this$static.naiveSum)) { return this$static.naiveSum; } return compensatedSum; } function DoubleSummaryStatistics(){ } defineClass(1948, 1, $intern_75, DoubleSummaryStatistics); _.accept_2 = function accept_15(value_0){ $accept(this, value_0); } ; _.toString_0 = function toString_65(){ return 'DoubleSummaryStatistics[count = ' + toString_39(this.count) + ', avg = ' + (gt(this.count, 0)?$getSum(this) / toDouble_0(this.count):0) + ', min = ' + this.min_0 + ', max = ' + this.max_0 + ', sum = ' + $getSum(this) + ']'; } ; _.count = 0; _.max_0 = $intern_61; _.min_0 = $intern_60; _.naiveSum = 0; _.sum = 0; _.sumError = 0; var Ljava_util_DoubleSummaryStatistics_2_classLit = createForClass('java.util', 'DoubleSummaryStatistics', 1948); function EmptyStackException(){ RuntimeException.call(this); } defineClass(1868, 63, $intern_44, EmptyStackException); var Ljava_util_EmptyStackException_2_classLit = createForClass('java.util', 'EmptyStackException', 1868); function $clear_6(this$static){ $clear_0(this$static.keySet); this$static.values = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, this$static.values.length, 5, 1); } function $containsKey_5(this$static, key){ return $contains_5(this$static.keySet, key); } function $get_14(this$static, k){ return $contains_5(this$static.keySet, k)?this$static.values[castTo(k, 22).ordinal]:null; } function $put_7(this$static, key, value_0){ $add_5(this$static.keySet, key); return setAt(this$static.values, key.ordinal, value_0); } function $put_8(this$static, key, value_0){ return $put_7(this$static, castTo(key, 22), value_0); } function $remove_16(this$static, key){ return $remove_17(this$static.keySet, key)?setAt(this$static.values, castTo(key, 22).ordinal, null):null; } function EnumMap(type_0){ var all; this.keySet = (all = castTo(type_0.enumConstantsFunc && type_0.enumConstantsFunc(), 9) , new EnumSet$EnumSetImpl(all, castTo(createFrom(all, all.length), 9), 0)); this.values = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, this.keySet.all.length, 5, 1); } defineClass(461, 2065, $intern_7, EnumMap); _.put = function put_7(key, value_0){ return $put_8(this, key, value_0); } ; _.clear_0 = function clear_40(){ $clear_6(this); } ; _.containsKey = function containsKey_13(key){ return $containsKey_5(this, key); } ; _.containsValue = function containsValue_6(value_0){ var key, key$iterator; for (key$iterator = new EnumSet$EnumSetImpl$IteratorImpl(this.keySet); key$iterator.i < key$iterator.this$11.all.length;) { key = $next_7(key$iterator); if (equals_57(value_0, this.values[key.ordinal])) { return true; } } return false; } ; _.entrySet_0 = function entrySet_6(){ return new EnumMap$EntrySet(this); } ; _.get_3 = function get_43(k){ return $get_14(this, k); } ; _.remove_0 = function remove_72(key){ return $remove_16(this, key); } ; _.size_1 = function size_53(){ return this.keySet.size_0; } ; var Ljava_util_EnumMap_2_classLit = createForClass('java.util', 'EnumMap', 461); function $contains_4(this$static, o){ if (instanceOf(o, 44)) { return $containsEntry_0(this$static.this$01, castTo(o, 44)); } return false; } function EnumMap$EntrySet(this$0){ this.this$01 = this$0; } defineClass(1340, $intern_9, $intern_10, EnumMap$EntrySet); _.clear_0 = function clear_41(){ $clear_6(this.this$01); } ; _.contains = function contains_41(o){ return $contains_4(this, o); } ; _.iterator_0 = function iterator_57(){ return new EnumMap$EntrySetIterator(this.this$01); } ; _.remove_1 = function remove_73(entry){ var key; if ($contains_4(this, entry)) { key = castTo(entry, 44).getKey(); $remove_16(this.this$01, key); return true; } return false; } ; _.size_1 = function size_54(){ return this.this$01.keySet.size_0; } ; var Ljava_util_EnumMap$EntrySet_2_classLit = createForClass('java.util', 'EnumMap/EntrySet', 1340); function EnumMap$EntrySetIterator(this$0){ this.this$01 = this$0; this.it = new EnumSet$EnumSetImpl$IteratorImpl(this.this$01.keySet); } defineClass(1341, 1, $intern_6, EnumMap$EntrySetIterator); _.forEachRemaining = function forEachRemaining_26(consumer){ $forEachRemaining(this, consumer); } ; _.next_1 = function next_29(){ return this.key = $next_7(this.it) , new EnumMap$MapEntry(this.this$01, this.key); } ; _.hasNext_0 = function hasNext_28(){ return $hasNext_4(this.it); } ; _.remove = function remove_74(){ checkCriticalState(!!this.key); $remove_16(this.this$01, this.key); this.key = null; } ; var Ljava_util_EnumMap$EntrySetIterator_2_classLit = createForClass('java.util', 'EnumMap/EntrySetIterator', 1341); function EnumMap$MapEntry(this$0, key){ this.this$01 = this$0; this.key = key; } defineClass(1342, 2082, $intern_70, EnumMap$MapEntry); _.getKey = function getKey_6(){ return this.key; } ; _.getValue = function getValue_8(){ return this.this$01.values[this.key.ordinal]; } ; _.setValue = function setValue_9(value_0){ return setAt(this.this$01.values, this.key.ordinal, value_0); } ; var Ljava_util_EnumMap$MapEntry_2_classLit = createForClass('java.util', 'EnumMap/MapEntry', 1342); function allOf(elementType){ var all, result, set_0; all = castTo(elementType.enumConstantsFunc && elementType.enumConstantsFunc(), 9); set_0 = (result = all.slice() , castTo(stampJavaTypeInfo_0(result, all), 9)); return new EnumSet$EnumSetImpl(all, set_0, all.length); } function of_1(first){ var all, set_0, clazz, superclass; set_0 = (all = castTo($getEnumConstants((clazz = first.___clazz , superclass = clazz.enumSuperclass , superclass == Ljava_lang_Enum_2_classLit?clazz:superclass)), 9) , new EnumSet$EnumSetImpl(all, castTo(createFrom(all, all.length), 9), 0)); $add_5(set_0, first); return set_0; } function of_2(first, rest){ var set_0; set_0 = of_1(first); addAll_15(set_0, rest); return set_0; } defineClass(181, $intern_9, {20:1, 31:1, 16:1, 181:1, 21:1}); var Ljava_util_EnumSet_2_classLit = createForClass('java.util', 'EnumSet', 181); function $add_5(this$static, e){ var ordinal; checkCriticalNotNull(e); ordinal = e.ordinal; if (!this$static.set_0[ordinal]) { setCheck(this$static.set_0, ordinal, e); ++this$static.size_0; return true; } return false; } function $clone(this$static){ var clonedSet; clonedSet = castTo(clone_0(this$static.set_0), 9); return new EnumSet$EnumSetImpl(this$static.all, clonedSet, this$static.size_0); } function $contains_5(this$static, o){ return instanceOf(o, 22) && $containsEnum(this$static, castTo(o, 22)); } function $containsEnum(this$static, e){ return !!e && this$static.set_0[e.ordinal] == e; } function $remove_17(this$static, o){ return instanceOf(o, 22) && $removeEnum(this$static, castTo(o, 22)); } function $removeEnum(this$static, e){ if (!!e && this$static.set_0[e.ordinal] == e) { setCheck(this$static.set_0, e.ordinal, null); --this$static.size_0; return true; } return false; } function EnumSet$EnumSetImpl(all, set_0, size_0){ this.all = all; this.set_0 = set_0; this.size_0 = size_0; } defineClass(162, 181, {20:1, 31:1, 16:1, 181:1, 162:1, 21:1}, EnumSet$EnumSetImpl); _.add_2 = function add_34(e){ return $add_5(this, castTo(e, 22)); } ; _.contains = function contains_42(o){ return $contains_5(this, o); } ; _.iterator_0 = function iterator_58(){ return new EnumSet$EnumSetImpl$IteratorImpl(this); } ; _.remove_1 = function remove_75(o){ return $remove_17(this, o); } ; _.size_1 = function size_55(){ return this.size_0; } ; _.size_0 = 0; var Ljava_util_EnumSet$EnumSetImpl_2_classLit = createForClass('java.util', 'EnumSet/EnumSetImpl', 162); function $findNext(this$static){ var c; ++this$static.i; for (c = this$static.this$11.all.length; this$static.i < c; ++this$static.i) { if (this$static.this$11.set_0[this$static.i]) { return; } } } function $hasNext_4(this$static){ return this$static.i < this$static.this$11.all.length; } function $next_7(this$static){ checkCriticalElement(this$static.i < this$static.this$11.all.length); this$static.last = this$static.i; $findNext(this$static); return this$static.this$11.set_0[this$static.last]; } function EnumSet$EnumSetImpl$IteratorImpl(this$1){ this.this$11 = this$1; $findNext(this); } defineClass(356, 1, $intern_6, EnumSet$EnumSetImpl$IteratorImpl); _.forEachRemaining = function forEachRemaining_27(consumer){ $forEachRemaining(this, consumer); } ; _.next_1 = function next_30(){ return $next_7(this); } ; _.hasNext_0 = function hasNext_29(){ return $hasNext_4(this); } ; _.remove = function remove_76(){ checkCriticalState(this.last != -1); setCheck(this.this$11.set_0, this.last, null); --this.this$11.size_0; this.last = -1; } ; _.i = -1; _.last = -1; var Ljava_util_EnumSet$EnumSetImpl$IteratorImpl_2_classLit = createForClass('java.util', 'EnumSet/EnumSetImpl/IteratorImpl', 356); function HashMap(){ $reset(this); } function HashMap_0(ignored){ AbstractHashMap.call(this, ignored, 0); } function HashMap_1(toBeCopied){ $reset(this); $putAll(this, toBeCopied); } defineClass(45, 498, $intern_76, HashMap, HashMap_0, HashMap_1); _.equals_1 = function equals_56(value1, value2){ return maskUndefined(value1) === maskUndefined(value2) || value1 != null && equals_Ljava_lang_Object__Z__devirtual$(value1, value2); } ; _.getHashCode = function getHashCode(key){ var hashCode; if (key == null) { return 0; } hashCode = hashCode__I__devirtual$(key); return hashCode | 0; } ; var Ljava_util_HashMap_2_classLit = createForClass('java.util', 'HashMap', 45); function $add_6(this$static, o){ var old; old = this$static.map_0.put(o, this$static); return old == null; } function $contains_6(this$static, o){ return this$static.map_0.containsKey(o); } function $remove_18(this$static, o){ return this$static.map_0.remove_0(o) != null; } function HashSet(){ this.map_0 = new HashMap; } function HashSet_0(initialCapacity){ this.map_0 = new HashMap_0(initialCapacity); } function HashSet_1(c){ this.map_0 = new HashMap_0(c.size_1()); $addAll(this, c); } function HashSet_2(map_0){ this.map_0 = map_0; } defineClass(49, $intern_9, $intern_77, HashSet, HashSet_0, HashSet_1); _.add_2 = function add_35(o){ return $add_6(this, o); } ; _.clear_0 = function clear_42(){ this.map_0.clear_0(); } ; _.contains = function contains_43(o){ return $contains_6(this, o); } ; _.isEmpty = function isEmpty_23(){ return this.map_0.size_1() == 0; } ; _.iterator_0 = function iterator_59(){ return this.map_0.keySet_0().iterator_0(); } ; _.remove_1 = function remove_77(o){ return $remove_18(this, o); } ; _.size_1 = function size_56(){ return this.map_0.size_1(); } ; var Ljava_util_HashSet_2_classLit = createForClass('java.util', 'HashSet', 49); function $accept_0(this$static, value_0){ this$static.count = add_20(this$static.count, 1); this$static.min_0 = $wnd.Math.min(this$static.min_0, value_0); this$static.max_0 = $wnd.Math.max(this$static.max_0, value_0); this$static.sum = add_20(this$static.sum, value_0); } function IntSummaryStatistics(){ } defineClass(1897, 1, $intern_20, IntSummaryStatistics); _.accept_0 = function accept_16(value_0){ $accept_0(this, value_0); } ; _.toString_0 = function toString_66(){ return 'IntSummaryStatistics[count = ' + toString_39(this.count) + ', avg = ' + (gt(this.count, 0)?toDouble_0(this.sum) / toDouble_0(this.count):0) + ', min = ' + this.min_0 + ', max = ' + this.max_0 + ', sum = ' + toString_39(this.sum) + ']'; } ; _.count = 0; _.max_0 = $intern_43; _.min_0 = $intern_0; _.sum = 0; var Ljava_util_IntSummaryStatistics_2_classLit = createForClass('java.util', 'IntSummaryStatistics', 1897); function $findEntryInChain(this$static, key, chain){ var entry, entry$array, entry$index, entry$max; for (entry$array = chain , entry$index = 0 , entry$max = entry$array.length; entry$index < entry$max; ++entry$index) { entry = entry$array[entry$index]; if (this$static.host.equals_1(key, entry.getKey())) { return entry; } } return null; } function $getChainOrEmpty(this$static, hashCode){ var chain; chain = this$static.backingMap.get(hashCode); return chain == null?initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, 0, 5, 1):chain; } function $getEntry_0(this$static, key){ return $findEntryInChain(this$static, key, $getChainOrEmpty(this$static, this$static.host.getHashCode(key))); } function $put_9(this$static, key, value_0){ var chain, chain0, entry, hashCode; hashCode = this$static.host.getHashCode(key); chain0 = (chain = this$static.backingMap.get(hashCode) , chain == null?initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, 0, 5, 1):chain); if (chain0.length == 0) { this$static.backingMap.set(hashCode, chain0); } else { entry = $findEntryInChain(this$static, key, chain0); if (entry) { return entry.setValue(value_0); } } setCheck(chain0, chain0.length, new AbstractMap$SimpleEntry(key, value_0)); ++this$static.size_0; ++this$static.host.modCount; return null; } function $remove_19(this$static, key){ var chain, chain0, entry, hashCode, i; hashCode = this$static.host.getHashCode(key); chain0 = (chain = this$static.backingMap.get(hashCode) , chain == null?initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, 0, 5, 1):chain); for (i = 0; i < chain0.length; i++) { entry = chain0[i]; if (this$static.host.equals_1(key, entry.getKey())) { if (chain0.length == 1) { chain0.length = 0; $delete_0(this$static.backingMap, hashCode); } else { chain0.splice(i, 1); } --this$static.size_0; ++this$static.host.modCount; return entry.getValue(); } } return null; } function InternalHashCodeMap(host){ this.backingMap = newJsMap(); this.host = host; } defineClass(1062, 1, $intern_23, InternalHashCodeMap); _.forEach_0 = function forEach_21(action){ $forEach_0(this, action); } ; _.iterator_0 = function iterator_60(){ return new InternalHashCodeMap$1(this); } ; _.size_0 = 0; var Ljava_util_InternalHashCodeMap_2_classLit = createForClass('java.util', 'InternalHashCodeMap', 1062); function InternalHashCodeMap$1(this$0){ this.this$01 = this$0; this.chains = this.this$01.backingMap.entries(); this.chain = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, 0, 5, 1); } defineClass(726, 1, $intern_6, InternalHashCodeMap$1); _.forEachRemaining = function forEachRemaining_28(consumer){ $forEachRemaining(this, consumer); } ; _.next_1 = function next_31(){ return this.lastEntry = this.chain[this.itemIndex++] , this.lastEntry; } ; _.hasNext_0 = function hasNext_30(){ var current; if (this.itemIndex < this.chain.length) { return true; } current = this.chains.next(); if (!current.done) { this.chain = current.value[1]; this.itemIndex = 0; return true; } return false; } ; _.remove = function remove_78(){ $remove_19(this.this$01, this.lastEntry.getKey()); this.itemIndex != 0 && --this.itemIndex; } ; _.itemIndex = 0; _.lastEntry = null; var Ljava_util_InternalHashCodeMap$1_2_classLit = createForClass('java.util', 'InternalHashCodeMap/1', 726); function $delete_0(this$static, key){ var fn; fn = this$static['delete']; fn.call(this$static, key); } function $delete_1(this$static, key){ var fn; fn = this$static['delete']; fn.call(this$static, key); } function $clinit_InternalJsMapFactory(){ $clinit_InternalJsMapFactory = emptyMethod; jsMapCtor = getJsMapConstructor(); } function canHandleObjectCreateAndProto(){ if (!Object.create || !Object.getOwnPropertyNames) { return false; } var protoField = '__proto__'; var map_0 = Object.create(null); if (map_0[protoField] !== undefined) { return false; } var keys_0 = Object.getOwnPropertyNames(map_0); if (keys_0.length != 0) { return false; } map_0[protoField] = 42; if (map_0[protoField] !== 42) { return false; } if (Object.getOwnPropertyNames(map_0).length == 0) { return false; } return true; } function getJsMapConstructor(){ function isCorrectIterationProtocol(){ try { return (new Map).entries().next().done; } catch (e) { return false; } } if (typeof Map === 'function' && Map.prototype.entries && isCorrectIterationProtocol()) { return Map; } else { return getJsMapPolyFill(); } } function getJsMapPolyFill(){ function Stringmap(){ this.obj = this.createObject(); } ; Stringmap.prototype.createObject = function(key){ return Object.create(null); } ; Stringmap.prototype.get = function(key){ return this.obj[key]; } ; Stringmap.prototype.set = function(key, value_0){ this.obj[key] = value_0; } ; Stringmap.prototype['delete'] = function(key){ delete this.obj[key]; } ; Stringmap.prototype.keys = function(){ return Object.getOwnPropertyNames(this.obj); } ; Stringmap.prototype.entries = function(){ var keys_0 = this.keys(); var map_0 = this; var nextIndex = 0; return {next:function(){ if (nextIndex >= keys_0.length) return {done:true}; var key = keys_0[nextIndex++]; return {value:[key, map_0.get(key)], done:false}; } }; } ; if (!canHandleObjectCreateAndProto()) { Stringmap.prototype.createObject = function(){ return {}; } ; Stringmap.prototype.get = function(key){ return this.obj[':' + key]; } ; Stringmap.prototype.set = function(key, value_0){ this.obj[':' + key] = value_0; } ; Stringmap.prototype['delete'] = function(key){ delete this.obj[':' + key]; } ; Stringmap.prototype.keys = function(){ var result = []; for (var key in this.obj) { key.charCodeAt(0) == 58 && result.push(key.substring(1)); } return result; } ; } return Stringmap; } function newJsMap(){ $clinit_InternalJsMapFactory(); return new jsMapCtor; } var jsMapCtor; function $contains_7(this$static, key){ return !(this$static.backingMap.get(key) === undefined); } function $get_15(this$static, key){ return this$static.backingMap.get(key); } function $put_10(this$static, key, value_0){ var oldValue; oldValue = this$static.backingMap.get(key); this$static.backingMap.set(key, value_0 === undefined?null:value_0); if (oldValue === undefined) { ++this$static.size_0; ++this$static.host.modCount; } else { ++this$static.valueMod; } return oldValue; } function $remove_20(this$static, key){ var value_0; value_0 = this$static.backingMap.get(key); if (value_0 === undefined) { ++this$static.valueMod; } else { $delete_1(this$static.backingMap, key); --this$static.size_0; ++this$static.host.modCount; } return value_0; } function InternalStringMap(host){ this.backingMap = newJsMap(); this.host = host; } defineClass(1060, 1, $intern_23, InternalStringMap); _.forEach_0 = function forEach_22(action){ $forEach_0(this, action); } ; _.iterator_0 = function iterator_61(){ return new InternalStringMap$1(this); } ; _.size_0 = 0; _.valueMod = 0; var Ljava_util_InternalStringMap_2_classLit = createForClass('java.util', 'InternalStringMap', 1060); function InternalStringMap$1(this$0){ this.this$01 = this$0; this.entries_0 = this.this$01.backingMap.entries(); this.current = this.entries_0.next(); } defineClass(725, 1, $intern_6, InternalStringMap$1); _.forEachRemaining = function forEachRemaining_29(consumer){ $forEachRemaining(this, consumer); } ; _.next_1 = function next_32(){ return this.last = this.current , this.current = this.entries_0.next() , new InternalStringMap$2(this.this$01, this.last, this.this$01.valueMod); } ; _.hasNext_0 = function hasNext_31(){ return !this.current.done; } ; _.remove = function remove_79(){ $remove_20(this.this$01, this.last.value[0]); } ; var Ljava_util_InternalStringMap$1_2_classLit = createForClass('java.util', 'InternalStringMap/1', 725); function InternalStringMap$2(this$0, val$entry, val$lastValueMod){ this.this$01 = this$0; this.val$entry2 = val$entry; this.val$lastValueMod3 = val$lastValueMod; } defineClass(1061, 2082, $intern_70, InternalStringMap$2); _.getKey = function getKey_7(){ return this.val$entry2.value[0]; } ; _.getValue = function getValue_9(){ if (this.this$01.valueMod != this.val$lastValueMod3) { return $get_15(this.this$01, this.val$entry2.value[0]); } return this.val$entry2.value[1]; } ; _.setValue = function setValue_10(object){ return $put_10(this.this$01, this.val$entry2.value[0], object); } ; _.val$lastValueMod3 = 0; var Ljava_util_InternalStringMap$2_2_classLit = createForClass('java.util', 'InternalStringMap/2', 1061); function $$init_2(this$static){ this$static.head = new LinkedHashMap$ChainEntry(this$static); this$static.map_0 = new HashMap; } function $clear_7(this$static){ $reset(this$static.map_0); this$static.head.prev = this$static.head; this$static.head.next_0 = this$static.head; } function $containsKey_6(this$static, key){ return $containsKey_3(this$static.map_0, key); } function $get_16(this$static, key){ var entry; entry = castTo($get_10(this$static.map_0, key), 400); if (entry) { $recordAccess(this$static, entry); return entry.value_0; } return null; } function $put_11(this$static, key, value_0){ var newEntry, old, oldValue; old = castTo($get_10(this$static.map_0, key), 400); if (!old) { newEntry = new LinkedHashMap$ChainEntry_0(this$static, key, value_0); $put_6(this$static.map_0, key, newEntry); $addToEnd(newEntry); return null; } else { oldValue = $setValue_0(old, value_0); $recordAccess(this$static, old); return oldValue; } } function $recordAccess(this$static, entry){ if (this$static.accessOrder) { $remove_23(entry); $addToEnd(entry); } } function $remove_22(this$static, key){ var entry; entry = castTo($remove_6(this$static.map_0, key), 400); if (entry) { $remove_23(entry); return entry.value_0; } return null; } function LinkedHashMap(){ HashMap.call(this); $$init_2(this); this.head.prev = this.head; this.head.next_0 = this.head; } function LinkedHashMap_0(ignored){ AbstractHashMap.call(this, ignored, 0); $$init_2(this); this.head.prev = this.head; this.head.next_0 = this.head; } defineClass(215, 45, $intern_76, LinkedHashMap, LinkedHashMap_0); _.clear_0 = function clear_43(){ $clear_7(this); } ; _.containsKey = function containsKey_14(key){ return $containsKey_6(this, key); } ; _.containsValue = function containsValue_7(value_0){ var node; node = this.head.next_0; while (node != this.head) { if (equals_57(node.value_0, value_0)) { return true; } node = node.next_0; } return false; } ; _.entrySet_0 = function entrySet_7(){ return new LinkedHashMap$EntrySet(this); } ; _.get_3 = function get_44(key){ return $get_16(this, key); } ; _.put = function put_8(key, value_0){ return $put_11(this, key, value_0); } ; _.remove_0 = function remove_80(key){ return $remove_22(this, key); } ; _.size_1 = function size_57(){ return $size_2(this.map_0); } ; _.accessOrder = false; var Ljava_util_LinkedHashMap_2_classLit = createForClass('java.util', 'LinkedHashMap', 215); function $addToEnd(this$static){ var tail; tail = this$static.this$01.head.prev; this$static.prev = tail; this$static.next_0 = this$static.this$01.head; tail.next_0 = this$static.this$01.head.prev = this$static; } function $remove_23(this$static){ this$static.next_0.prev = this$static.prev; this$static.prev.next_0 = this$static.next_0; this$static.next_0 = this$static.prev = null; } function LinkedHashMap$ChainEntry(this$0){ LinkedHashMap$ChainEntry_0.call(this, this$0, null, null); } function LinkedHashMap$ChainEntry_0(this$0, key, value_0){ this.this$01 = this$0; AbstractMap$SimpleEntry.call(this, key, value_0); } defineClass(400, 397, {494:1, 397:1, 400:1, 44:1}, LinkedHashMap$ChainEntry, LinkedHashMap$ChainEntry_0); var Ljava_util_LinkedHashMap$ChainEntry_2_classLit = createForClass('java.util', 'LinkedHashMap/ChainEntry', 400); function $contains_8(this$static, o){ if (instanceOf(o, 44)) { return $containsEntry_0(this$static.this$01, castTo(o, 44)); } return false; } function LinkedHashMap$EntrySet(this$0){ this.this$01 = this$0; } defineClass(715, $intern_9, $intern_10, LinkedHashMap$EntrySet); _.clear_0 = function clear_44(){ $clear_7(this.this$01); } ; _.contains = function contains_44(o){ return $contains_8(this, o); } ; _.iterator_0 = function iterator_62(){ return new LinkedHashMap$EntrySet$EntryIterator(this); } ; _.remove_1 = function remove_81(entry){ var key; if ($contains_8(this, entry)) { key = castTo(entry, 44).getKey(); $remove_22(this.this$01, key); return true; } return false; } ; _.size_1 = function size_58(){ return $size_2(this.this$01.map_0); } ; var Ljava_util_LinkedHashMap$EntrySet_2_classLit = createForClass('java.util', 'LinkedHashMap/EntrySet', 715); function $next_8(this$static){ checkCriticalConcurrentModification(this$static.this$11.this$01.map_0.modCount, this$static.lastModCount); checkCriticalElement(this$static.next_0 != this$static.this$11.this$01.head); this$static.last = this$static.next_0; this$static.next_0 = this$static.next_0.next_0; return this$static.last; } function LinkedHashMap$EntrySet$EntryIterator(this$1){ this.this$11 = this$1; this.next_0 = this$1.this$01.head.next_0; this.lastModCount = this$1.this$01.map_0.modCount; } defineClass(716, 1, $intern_6, LinkedHashMap$EntrySet$EntryIterator); _.forEachRemaining = function forEachRemaining_30(consumer){ $forEachRemaining(this, consumer); } ; _.next_1 = function next_33(){ return $next_8(this); } ; _.hasNext_0 = function hasNext_32(){ return this.next_0 != this.this$11.this$01.head; } ; _.remove = function remove_82(){ checkCriticalState(!!this.last); checkCriticalConcurrentModification(this.this$11.this$01.map_0.modCount, this.lastModCount); $remove_23(this.last); $remove_6(this.this$11.this$01.map_0, this.last.key); this.lastModCount = this.this$11.this$01.map_0.modCount; this.last = null; } ; _.lastModCount = 0; var Ljava_util_LinkedHashMap$EntrySet$EntryIterator_2_classLit = createForClass('java.util', 'LinkedHashMap/EntrySet/EntryIterator', 716); function LinkedHashSet(){ HashSet_2.call(this, new LinkedHashMap); } function LinkedHashSet_0(ignored){ HashSet_2.call(this, new LinkedHashMap_0(ignored)); } function LinkedHashSet_1(c){ HashSet_2.call(this, new LinkedHashMap); $addAll(this, c); } defineClass(174, 49, $intern_77, LinkedHashSet, LinkedHashSet_0, LinkedHashSet_1); var Ljava_util_LinkedHashSet_2_classLit = createForClass('java.util', 'LinkedHashSet', 174); function $$init_3(this$static){ this$static.header = new LinkedList$Node; this$static.tail = new LinkedList$Node; } function $add_7(this$static, o){ $addNode_0(this$static, o, this$static.tail.prev, this$static.tail); return true; } function $addFirst_0(this$static, o){ $addNode_0(this$static, o, this$static.header, this$static.header.next_0); } function $addLast_0(this$static, o){ $addNode_0(this$static, o, this$static.tail.prev, this$static.tail); } function $addNode_0(this$static, o, prev, next){ var node; node = new LinkedList$Node; node.value_0 = o; node.prev = prev; node.next_0 = next; next.prev = prev.next_0 = node; ++this$static.size_0; } function $getFirst(this$static){ checkCriticalElement(this$static.size_0 != 0); return this$static.header.next_0.value_0; } function $getLast(this$static){ checkCriticalElement(this$static.size_0 != 0); return this$static.tail.prev.value_0; } function $listIterator_2(this$static, index_0){ var i, node; checkCriticalPositionIndex(index_0, this$static.size_0); if (index_0 >= this$static.size_0 >> 1) { node = this$static.tail; for (i = this$static.size_0; i > index_0; --i) { node = node.prev; } } else { node = this$static.header.next_0; for (i = 0; i < index_0; ++i) { node = node.next_0; } } return new LinkedList$ListIteratorImpl(this$static, index_0, node); } function $poll(this$static){ return this$static.size_0 == 0?null:(checkCriticalElement(this$static.size_0 != 0) , $removeNode_0(this$static, this$static.header.next_0)); } function $removeFirst_0(this$static){ checkCriticalElement(this$static.size_0 != 0); return $removeNode_0(this$static, this$static.header.next_0); } function $removeLast_0(this$static){ checkCriticalElement(this$static.size_0 != 0); return $removeNode_0(this$static, this$static.tail.prev); } function $removeNode_0(this$static, node){ var oldValue; oldValue = node.value_0; node.next_0.prev = node.prev; node.prev.next_0 = node.next_0; node.next_0 = node.prev = null; node.value_0 = null; --this$static.size_0; return oldValue; } function $reset_0(this$static){ this$static.header.next_0 = this$static.tail; this$static.tail.prev = this$static.header; this$static.header.prev = this$static.tail.next_0 = null; this$static.size_0 = 0; } function LinkedList(){ $$init_3(this); $reset_0(this); } function LinkedList_0(c){ $$init_3(this); $reset_0(this); $addAll(this, c); } defineClass(67, 2062, {3:1, 4:1, 20:1, 31:1, 56:1, 16:1, 67:1, 15:1}, LinkedList, LinkedList_0); _.add_2 = function add_36(o){ return $add_7(this, o); } ; _.clear_0 = function clear_45(){ $reset_0(this); } ; _.listIterator_1 = function listIterator_14(index_0){ return $listIterator_2(this, index_0); } ; _.size_1 = function size_59(){ return this.size_0; } ; _.size_0 = 0; var Ljava_util_LinkedList_2_classLit = createForClass('java.util', 'LinkedList', 67); function $add_8(this$static, o){ $addNode_0(this$static.this$01, o, this$static.currentNode.prev, this$static.currentNode); ++this$static.currentIndex; this$static.lastNode = null; } function $hasNext_5(this$static){ return this$static.currentNode != this$static.this$01.tail; } function $next_9(this$static){ checkCriticalElement(this$static.currentNode != this$static.this$01.tail); this$static.lastNode = this$static.currentNode; this$static.currentNode = this$static.currentNode.next_0; ++this$static.currentIndex; return this$static.lastNode.value_0; } function $previous_0(this$static){ checkCriticalElement(this$static.currentNode.prev != this$static.this$01.header); this$static.lastNode = this$static.currentNode = this$static.currentNode.prev; --this$static.currentIndex; return this$static.lastNode.value_0; } function $remove_24(this$static){ var nextNode; checkCriticalState(!!this$static.lastNode); nextNode = this$static.lastNode.next_0; $removeNode_0(this$static.this$01, this$static.lastNode); this$static.currentNode == this$static.lastNode?(this$static.currentNode = nextNode):--this$static.currentIndex; this$static.lastNode = null; } function LinkedList$ListIteratorImpl(this$0, index_0, startNode){ this.this$01 = this$0; this.currentNode = startNode; this.currentIndex = index_0; } defineClass(981, 1, $intern_14, LinkedList$ListIteratorImpl); _.forEachRemaining = function forEachRemaining_31(consumer){ $forEachRemaining(this, consumer); } ; _.add_1 = function add_37(o){ $add_8(this, o); } ; _.hasNext_0 = function hasNext_33(){ return $hasNext_5(this); } ; _.hasPrevious = function hasPrevious_6(){ return this.currentNode.prev != this.this$01.header; } ; _.next_1 = function next_34(){ return $next_9(this); } ; _.nextIndex_0 = function nextIndex_7(){ return this.currentIndex; } ; _.previous_0 = function previous_7(){ return $previous_0(this); } ; _.previousIndex = function previousIndex_6(){ return this.currentIndex - 1; } ; _.remove = function remove_83(){ $remove_24(this); } ; _.set_1 = function set_18(o){ checkCriticalState(!!this.lastNode); this.lastNode.value_0 = o; } ; _.currentIndex = 0; _.lastNode = null; var Ljava_util_LinkedList$ListIteratorImpl_2_classLit = createForClass('java.util', 'LinkedList/ListIteratorImpl', 981); function LinkedList$Node(){ } defineClass(617, 1, {}, LinkedList$Node); var Ljava_util_LinkedList$Node_2_classLit = createForClass('java.util', 'LinkedList/Node', 617); function $clinit_Locale(){ $clinit_Locale = emptyMethod; ROOT = new Locale$1; defaultLocale = new Locale$4; } defineClass(2057, 1, {}); var ROOT, defaultLocale; var Ljava_util_Locale_2_classLit = createForClass('java.util', 'Locale', 2057); function Locale$1(){ } defineClass(873, 2057, {}, Locale$1); _.toString_0 = function toString_67(){ return ''; } ; var Ljava_util_Locale$1_2_classLit = createForClass('java.util', 'Locale/1', 873); function Locale$4(){ } defineClass(874, 2057, {}, Locale$4); _.toString_0 = function toString_68(){ return 'unknown'; } ; var Ljava_util_Locale$4_2_classLit = createForClass('java.util', 'Locale/4', 874); function NoSuchElementException(){ RuntimeException.call(this); } function NoSuchElementException_0(){ RuntimeException_0.call(this, 'There is no more element.'); } defineClass(112, 63, {3:1, 103:1, 63:1, 82:1, 112:1}, NoSuchElementException, NoSuchElementException_0); var Ljava_util_NoSuchElementException_2_classLit = createForClass('java.util', 'NoSuchElementException', 112); function equals_57(a, b){ return maskUndefined(a) === maskUndefined(b) || a != null && equals_Ljava_lang_Object__Z__devirtual$(a, b); } function hashCode_55(o){ return o != null?hashCode__I__devirtual$(o):0; } function requireNonNull(obj){ if (obj == null) { throw toJs(new NullPointerException); } return obj; } function requireNonNull_0(obj, message){ if (obj == null) { throw toJs(new NullPointerException_0(message)); } return obj; } function $clinit_Optional(){ $clinit_Optional = emptyMethod; EMPTY_3 = new Optional(null); } function $get_17(this$static){ checkCriticalElement(this$static.ref != null); return this$static.ref; } function $ifPresent(this$static, consumer){ this$static.ref != null && $accept_4(consumer, this$static.ref); } function $orElse(this$static){ return this$static.ref != null?this$static.ref:null; } function Optional(ref){ $clinit_Optional(); this.ref = ref; } defineClass(475, 1, {475:1}, Optional); _.equals_0 = function equals_58(obj){ var other; if (obj === this) { return true; } if (!instanceOf(obj, 475)) { return false; } other = castTo(obj, 475); return equals_57(this.ref, other.ref); } ; _.hashCode_1 = function hashCode_56(){ return hashCode_55(this.ref); } ; _.toString_0 = function toString_69(){ return this.ref != null?'Optional.of(' + valueOf_6(this.ref) + ')':'Optional.empty()'; } ; var EMPTY_3; var Ljava_util_Optional_2_classLit = createForClass('java.util', 'Optional', 475); function $clinit_OptionalDouble(){ $clinit_OptionalDouble = emptyMethod; EMPTY_4 = new OptionalDouble; } function $getAsDouble(this$static){ checkCriticalElement(this$static.present); return this$static.ref; } function $orElse_0(this$static){ return this$static.present?this$static.ref:0; } function $orElseGet(this$static, other){ return this$static.present?this$static.ref:other.getAsDouble(); } function OptionalDouble(){ this.ref = 0; this.present = false; } function OptionalDouble_0(value_0){ $clinit_OptionalDouble(); this.ref = value_0; this.present = true; } defineClass(414, 1, {414:1}, OptionalDouble, OptionalDouble_0); _.equals_0 = function equals_59(obj){ var other; if (obj === this) { return true; } if (!instanceOf(obj, 414)) { return false; } other = castTo(obj, 414); return this.present == other.present && compare_4(this.ref, other.ref) == 0; } ; _.hashCode_1 = function hashCode_57(){ return this.present?round_int(this.ref):0; } ; _.toString_0 = function toString_70(){ return this.present?'OptionalDouble.of(' + ('' + this.ref) + ')':'OptionalDouble.empty()'; } ; _.present = false; _.ref = 0; var EMPTY_4; var Ljava_util_OptionalDouble_2_classLit = createForClass('java.util', 'OptionalDouble', 414); function $clinit_OptionalInt(){ $clinit_OptionalInt = emptyMethod; EMPTY_5 = new OptionalInt; } function $orElse_1(this$static){ return this$static.present?this$static.ref:0; } function OptionalInt(){ this.ref = 0; this.present = false; } function OptionalInt_0(value_0){ $clinit_OptionalInt(); this.ref = value_0; this.present = true; } defineClass(524, 1, {524:1}, OptionalInt, OptionalInt_0); _.equals_0 = function equals_60(obj){ var other; if (obj === this) { return true; } if (!instanceOf(obj, 524)) { return false; } other = castTo(obj, 524); return this.present == other.present && compare_5(this.ref, other.ref) == 0; } ; _.hashCode_1 = function hashCode_58(){ return this.present?this.ref:0; } ; _.toString_0 = function toString_71(){ return this.present?'OptionalInt.of(' + ('' + this.ref) + ')':'OptionalInt.empty()'; } ; _.present = false; _.ref = 0; var EMPTY_5; var Ljava_util_OptionalInt_2_classLit = createForClass('java.util', 'OptionalInt', 524); function $addAll_4(this$static, c){ var e, e$iterator, oldSize; checkCriticalNotNull(c); checkCriticalArgument(c != this$static); oldSize = this$static.heap.array.length; for (e$iterator = c.iterator_0(); e$iterator.hasNext_0();) { e = e$iterator.next_1(); $add_3(this$static.heap, checkCriticalNotNull(e)); } if (oldSize != this$static.heap.array.length) { $makeHeap(this$static, 0); return true; } return false; } function $makeHeap(this$static, node){ var rightChild; if (node * 2 + 1 >= this$static.heap.array.length) { return; } $makeHeap(this$static, 2 * node + 1); rightChild = 2 * node + 2; rightChild < this$static.heap.array.length && $makeHeap(this$static, rightChild); $mergeHeaps(this$static, node); } function $mergeHeaps(this$static, node){ var heapSize, smallestChild, value_0, leftChild, rightChild, smallestChild_0; heapSize = this$static.heap.array.length; value_0 = $get_11(this$static.heap, node); while (node * 2 + 1 < heapSize) { smallestChild = (leftChild = 2 * node + 1 , rightChild = leftChild + 1 , smallestChild_0 = leftChild , rightChild < heapSize && this$static.cmp.compare_1($get_11(this$static.heap, rightChild), $get_11(this$static.heap, leftChild)) < 0 && (smallestChild_0 = rightChild) , smallestChild_0); if (this$static.cmp.compare_1(value_0, $get_11(this$static.heap, smallestChild)) < 0) { break; } $set_1(this$static.heap, node, $get_11(this$static.heap, smallestChild)); node = smallestChild; } $set_1(this$static.heap, node, value_0); } function $offer(this$static, e){ var childNode, node; checkCriticalNotNull(e); node = this$static.heap.array.length; $add_3(this$static.heap, e); while (node > 0) { childNode = node; node = (node - 1) / 2 | 0; if (this$static.cmp.compare_1($get_11(this$static.heap, node), e) <= 0) { $set_1(this$static.heap, childNode, e); return true; } $set_1(this$static.heap, childNode, $get_11(this$static.heap, node)); } $set_1(this$static.heap, node, e); return true; } function $poll_0(this$static){ var value_0; value_0 = this$static.heap.array.length == 0?null:$get_11(this$static.heap, 0); value_0 != null && $removeAtIndex_0(this$static, 0); return value_0; } function $remove_25(this$static, o){ var index_0; index_0 = o == null?-1:$indexOf_3(this$static.heap, o, 0); if (index_0 < 0) { return false; } $removeAtIndex_0(this$static, index_0); return true; } function $removeAtIndex_0(this$static, index_0){ var lastValue; lastValue = $remove_11(this$static.heap, this$static.heap.array.length - 1); if (index_0 < this$static.heap.array.length) { $set_1(this$static.heap, index_0, lastValue); $mergeHeaps(this$static, index_0); } } function PriorityQueue(comparator){ this.heap = new ArrayList_0(11); this.cmp = ($clinit_Comparators() , comparator); } defineClass(510, 2103, $intern_8, PriorityQueue); _.addAll = function addAll_18(c){ return $addAll_4(this, c); } ; _.clear_0 = function clear_46(){ setLength(this.heap.array, 0); } ; _.contains = function contains_45(o){ return (o == null?-1:$indexOf_3(this.heap, o, 0)) != -1; } ; _.iterator_0 = function iterator_63(){ return new PriorityQueue$1(this); } ; _.remove_1 = function remove_84(o){ return $remove_25(this, o); } ; _.size_1 = function size_60(){ return this.heap.array.length; } ; _.spliterator_0 = function spliterator_33(){ return new Spliterators$IteratorSpliterator(this, 256); } ; _.toArray = function toArray_19(){ return clone_0(this.heap.array); } ; _.toArray_0 = function toArray_20(a){ return $toArray_1(this.heap, a); } ; var Ljava_util_PriorityQueue_2_classLit = createForClass('java.util', 'PriorityQueue', 510); function PriorityQueue$1(this$0){ this.this$01 = this$0; } defineClass(1296, 1, $intern_6, PriorityQueue$1); _.forEachRemaining = function forEachRemaining_32(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_34(){ return this.i < this.this$01.heap.array.length; } ; _.next_1 = function next_35(){ checkCriticalElement(this.i < this.this$01.heap.array.length); this.last = this.i++; return $get_11(this.this$01.heap, this.last); } ; _.remove = function remove_85(){ checkCriticalState(this.last != -1); $removeAtIndex_0(this.this$01, this.i = this.last); this.last = -1; } ; _.i = 0; _.last = -1; var Ljava_util_PriorityQueue$1_2_classLit = createForClass('java.util', 'PriorityQueue/1', 1296); function $clinit_Random(){ $clinit_Random = emptyMethod; var i, i0, twoToTheXMinus24Tmp, twoToTheXMinus48Tmp; twoToTheXMinus24 = initUnidimensionalArray(D_classLit, $intern_66, 28, 25, 15, 1); twoToTheXMinus48 = initUnidimensionalArray(D_classLit, $intern_66, 28, 33, 15, 1); twoToTheXMinus48Tmp = 1.52587890625E-5; for (i0 = 32; i0 >= 0; i0--) { twoToTheXMinus48[i0] = twoToTheXMinus48Tmp; twoToTheXMinus48Tmp *= 0.5; } twoToTheXMinus24Tmp = 1; for (i = 24; i >= 0; i--) { twoToTheXMinus24[i] = twoToTheXMinus24Tmp; twoToTheXMinus24Tmp *= 0.5; } } function $nextDouble(this$static){ return $nextInternal(this$static, 26) * $intern_78 + $nextInternal(this$static, 27) * $intern_79; } function $nextInt(this$static, n){ var bits, val; checkCriticalArgument(n > 0); if ((n & -n) == n) { return round_int(n * $nextInternal(this$static, 31) * 4.6566128730773926E-10); } do { bits = $nextInternal(this$static, 31); val = bits % n; } while (bits - val + (n - 1) < 0); return round_int(val); } function $nextInternal(this$static, bits){ var carry, dval, h, hi, l, lo; hi = this$static.seedhi * $intern_80 + this$static.seedlo * 1502; lo = this$static.seedlo * $intern_80 + 11; carry = $wnd.Math.floor(lo * $intern_81); hi += carry; lo -= carry * $intern_82; hi %= $intern_82; this$static.seedhi = hi; this$static.seedlo = lo; if (bits <= 24) { return $wnd.Math.floor(this$static.seedhi * twoToTheXMinus24[bits]); } else { h = this$static.seedhi * (1 << bits - 24); l = $wnd.Math.floor(this$static.seedlo * twoToTheXMinus48[bits]); dval = h + l; dval >= 2147483648 && (dval -= 4294967296); return dval; } } function $nextLong(this$static){ return add_20(shl_0(fromDouble_0($nextInternal(this$static, 32)), 32), fromDouble_0($nextInternal(this$static, 32))); } function $setSeed(this$static, seedhi, seedlo){ this$static.seedhi = seedhi ^ 1502; this$static.seedlo = seedlo ^ $intern_80; } function $setSeed_0(this$static, seed){ $setSeed(this$static, toInt_0(and_0(shr_0(seed, 24), $intern_83)), toInt_0(and_0(seed, $intern_83))); } function Random(){ $clinit_Random(); var hi, lo, seed; seed = uniqueSeed++ + Date.now(); hi = round_int($wnd.Math.floor(seed * $intern_81)) & $intern_83; lo = round_int(seed - hi * $intern_82); this.seedhi = hi ^ 1502; this.seedlo = lo ^ $intern_80; } function Random_0(seed){ $clinit_Random(); $setSeed(this, toInt_0(and_0(shr_0(seed, 24), $intern_83)), toInt_0(and_0(seed, $intern_83))); } defineClass(234, 1, {234:1}, Random, Random_0); _.seedhi = 0; _.seedlo = 0; var twoToTheXMinus24, twoToTheXMinus48, uniqueSeed = 0; var Ljava_util_Random_2_classLit = createForClass('java.util', 'Random', 234); function $initIterator(this$static){ if (!this$static.it) { this$static.it = this$static.collection.iterator_0(); this$static.estimateSize = this$static.collection.size_1(); } } function $tryAdvance(this$static, consumer){ checkCriticalNotNull(consumer); $initIterator(this$static); if (this$static.it.hasNext_0()) { consumer.accept(this$static.it.next_1()); return true; } return false; } function Spliterators$IteratorSpliterator(collection, characteristics){ this.collection = (checkCriticalNotNull(collection) , collection); this.characteristics = (characteristics & $intern_62) == 0?characteristics | 64 | $intern_17:characteristics; } function Spliterators$IteratorSpliterator_0(it){ this.it = (checkCriticalNotNull(it) , it); this.characteristics = 0; this.estimateSize = $intern_21; } function Spliterators$IteratorSpliterator_1(it, size_0){ this.it = (checkCriticalNotNull(it) , it); this.characteristics = 16449; this.estimateSize = size_0; } defineClass(25, 1, $intern_18, Spliterators$IteratorSpliterator, Spliterators$IteratorSpliterator_0, Spliterators$IteratorSpliterator_1); _.hasCharacteristics = function hasCharacteristics_2(characteristics){ return (this.characteristics & characteristics) != 0; } ; _.characteristics_0 = function characteristics_3(){ return this.characteristics; } ; _.estimateSize_0 = function estimateSize_2(){ $initIterator(this); return this.estimateSize; } ; _.forEachRemaining = function forEachRemaining_33(consumer){ $initIterator(this); this.it.forEachRemaining(consumer); } ; _.tryAdvance = function tryAdvance_2(consumer){ return $tryAdvance(this, consumer); } ; _.characteristics = 0; _.estimateSize = 0; var Ljava_util_Spliterators$IteratorSpliterator_2_classLit = createForClass('java.util', 'Spliterators/IteratorSpliterator', 25); function SortedSet$1($anonymous0){ Spliterators$IteratorSpliterator.call(this, $anonymous0, 21); } defineClass(495, 25, $intern_18, SortedSet$1); var Ljava_util_SortedSet$1_2_classLit = createForClass('java.util', 'SortedSet/1', 495); function $forEachRemaining_1(this$static, consumer){ while (this$static.tryAdvance_0(consumer)) ; } function Spliterator$OfDouble$0methodref$accept$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(611, 1, $intern_75, Spliterator$OfDouble$0methodref$accept$Type); _.accept_2 = function accept_17(arg0){ this.$$outer_0.accept(arg0); } ; var Ljava_util_Spliterator$OfDouble$0methodref$accept$Type_2_classLit = createForClass('java.util', 'Spliterator/OfDouble/0methodref$accept$Type', 611); function Spliterator$OfDouble$1methodref$accept$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(612, 1, $intern_75, Spliterator$OfDouble$1methodref$accept$Type); _.accept_2 = function accept_18(arg0){ this.$$outer_0.accept(arg0); } ; var Ljava_util_Spliterator$OfDouble$1methodref$accept$Type_2_classLit = createForClass('java.util', 'Spliterator/OfDouble/1methodref$accept$Type', 612); function Spliterator$OfInt$2methodref$accept$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(613, 1, $intern_20, Spliterator$OfInt$2methodref$accept$Type); _.accept_0 = function accept_19(arg0){ this.$$outer_0.accept(valueOf_3(arg0)); } ; var Ljava_util_Spliterator$OfInt$2methodref$accept$Type_2_classLit = createForClass('java.util', 'Spliterator/OfInt/2methodref$accept$Type', 613); function Spliterator$OfInt$3methodref$accept$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(614, 1, $intern_20, Spliterator$OfInt$3methodref$accept$Type); _.accept_0 = function accept_20(arg0){ this.$$outer_0.accept(valueOf_3(arg0)); } ; var Ljava_util_Spliterator$OfInt$3methodref$accept$Type_2_classLit = createForClass('java.util', 'Spliterator/OfInt/3methodref$accept$Type', 614); function checkCriticalArrayBounds(end, length_0){ if (0 > end || end > length_0) { throw toJs(new ArrayIndexOutOfBoundsException_0('fromIndex: 0, toIndex: ' + end + ', length: ' + length_0)); } } function Spliterators$BaseSpliterator(size_0, characteristics){ this.sizeEstimate = size_0; this.characteristics = (characteristics & 64) != 0?characteristics | $intern_17:characteristics; } defineClass(625, 1, $intern_18); _.forEachRemaining = function forEachRemaining_34(consumer){ $forEachRemaining_0(this, consumer); } ; _.hasCharacteristics = function hasCharacteristics_3(characteristics){ return (this.characteristics & characteristics) != 0; } ; _.characteristics_0 = function characteristics_4(){ return this.characteristics; } ; _.estimateSize_0 = function estimateSize_3(){ return this.sizeEstimate; } ; _.characteristics = 0; _.sizeEstimate = 0; var Ljava_util_Spliterators$BaseSpliterator_2_classLit = createForClass('java.util', 'Spliterators/BaseSpliterator', 625); function Spliterators$AbstractDoubleSpliterator(size_0, characteristics){ Spliterators$BaseSpliterator.call(this, size_0, characteristics); } defineClass(736, 625, $intern_18); _.forEachRemaining_0 = function forEachRemaining_35(consumer){ $forEachRemaining_1(this, consumer); } ; _.forEachRemaining = function forEachRemaining_36(consumer){ instanceOf(consumer, 189)?$forEachRemaining_1(this, castTo(consumer, 189)):$forEachRemaining_1(this, new Spliterator$OfDouble$1methodref$accept$Type(consumer)); } ; _.tryAdvance = function tryAdvance_3(consumer){ return instanceOf(consumer, 189)?this.tryAdvance_0(castTo(consumer, 189)):this.tryAdvance_0(new Spliterator$OfDouble$0methodref$accept$Type(consumer)); } ; var Ljava_util_Spliterators$AbstractDoubleSpliterator_2_classLit = createForClass('java.util', 'Spliterators/AbstractDoubleSpliterator', 736); function Spliterators$AbstractIntSpliterator(size_0, characteristics){ Spliterators$BaseSpliterator.call(this, size_0, characteristics); } defineClass(735, 625, $intern_18); _.forEachRemaining_0 = function forEachRemaining_37(consumer){ $forEachRemaining_1(this, consumer); } ; _.forEachRemaining = function forEachRemaining_38(consumer){ instanceOf(consumer, 202)?$forEachRemaining_1(this, castTo(consumer, 202)):$forEachRemaining_1(this, new Spliterator$OfInt$3methodref$accept$Type(consumer)); } ; _.tryAdvance = function tryAdvance_4(consumer){ return instanceOf(consumer, 202)?this.tryAdvance_0(castTo(consumer, 202)):this.tryAdvance_0(new Spliterator$OfInt$2methodref$accept$Type(consumer)); } ; var Ljava_util_Spliterators$AbstractIntSpliterator_2_classLit = createForClass('java.util', 'Spliterators/AbstractIntSpliterator', 735); function Spliterators$AbstractSpliterator(size_0, characteristics){ Spliterators$BaseSpliterator.call(this, size_0, characteristics); } defineClass(500, 625, $intern_18); var Ljava_util_Spliterators$AbstractSpliterator_2_classLit = createForClass('java.util', 'Spliterators/AbstractSpliterator', 500); function $forEachRemaining_2(this$static, consumer){ checkCriticalNotNull(consumer); while (this$static.index_0 < this$static.limit) { this$static.consume(consumer, this$static.index_0++); } } function $tryAdvance_0(this$static, consumer){ checkCriticalNotNull(consumer); if (this$static.index_0 < this$static.limit) { this$static.consume(consumer, this$static.index_0++); return true; } return false; } function Spliterators$BaseArraySpliterator(limit, characteristics){ this.index_0 = 0; this.limit = limit; this.characteristics = characteristics | 64 | $intern_17; } defineClass(706, 1, $intern_18); _.forEachRemaining = function forEachRemaining_39(consumer){ $forEachRemaining_0(this, consumer); } ; _.hasCharacteristics = function hasCharacteristics_4(characteristics){ return (this.characteristics & characteristics) != 0; } ; _.characteristics_0 = function characteristics_5(){ return this.characteristics; } ; _.estimateSize_0 = function estimateSize_4(){ return this.limit - this.index_0; } ; _.characteristics = 0; _.index_0 = 0; _.limit = 0; var Ljava_util_Spliterators$BaseArraySpliterator_2_classLit = createForClass('java.util', 'Spliterators/BaseArraySpliterator', 706); function $consume(this$static, consumer, index_0){ consumer.accept(this$static.array[index_0]); } function Spliterators$ArraySpliterator(array, limit){ Spliterators$BaseArraySpliterator.call(this, limit, 1040); this.array = array; } defineClass(960, 706, $intern_18, Spliterators$ArraySpliterator); _.consume = function consume(consumer, index_0){ $consume(this, castTo(consumer, 41), index_0); } ; _.forEachRemaining = function forEachRemaining_40(consumer){ $forEachRemaining_2(this, consumer); } ; _.tryAdvance = function tryAdvance_5(consumer){ return $tryAdvance_0(this, consumer); } ; var Ljava_util_Spliterators$ArraySpliterator_2_classLit = createForClass('java.util', 'Spliterators/ArraySpliterator', 960); function $consume_0(this$static, consumer, index_0){ consumer.accept_2(this$static.array[index_0]); } function Spliterators$DoubleArraySpliterator(array, characteristics){ Spliterators$DoubleArraySpliterator_0.call(this, array, array.length, characteristics); } function Spliterators$DoubleArraySpliterator_0(array, limit, characteristics){ Spliterators$BaseArraySpliterator.call(this, limit, characteristics); this.array = array; } defineClass(707, 706, $intern_18, Spliterators$DoubleArraySpliterator); _.consume = function consume_0(consumer, index_0){ $consume_0(this, castTo(consumer, 189), index_0); } ; _.forEachRemaining_0 = function forEachRemaining_41(consumer){ $forEachRemaining_2(this, consumer); } ; _.forEachRemaining = function forEachRemaining_42(consumer){ instanceOf(consumer, 189)?$forEachRemaining_2(this, castTo(consumer, 189)):$forEachRemaining_2(this, new Spliterator$OfDouble$1methodref$accept$Type(consumer)); } ; _.tryAdvance_0 = function tryAdvance_6(consumer){ return $tryAdvance_0(this, consumer); } ; _.tryAdvance = function tryAdvance_7(consumer){ return instanceOf(consumer, 189)?$tryAdvance_0(this, castTo(consumer, 189)):$tryAdvance_0(this, new Spliterator$OfDouble$0methodref$accept$Type(consumer)); } ; var Ljava_util_Spliterators$DoubleArraySpliterator_2_classLit = createForClass('java.util', 'Spliterators/DoubleArraySpliterator', 707); function $clinit_Spliterators$EmptySpliterator(){ $clinit_Spliterators$EmptySpliterator = emptyMethod; $clinit_Spliterators$EmptySpliterator(); OF_INT = new Spliterators$EmptySpliterator$OfInt; } defineClass(2066, 1, $intern_18); _.forEachRemaining = function forEachRemaining_43(consumer){ $forEachRemaining_0(this, consumer); } ; _.hasCharacteristics = function hasCharacteristics_5(characteristics){ return (16448 & characteristics) != 0; } ; _.characteristics_0 = function characteristics_6(){ return 16448; } ; _.estimateSize_0 = function estimateSize_5(){ return 0; } ; var OF_INT; var Ljava_util_Spliterators$EmptySpliterator_2_classLit = createForClass('java.util', 'Spliterators/EmptySpliterator', 2066); function $forEachRemaining_3(consumer){ checkCriticalNotNull(consumer); } function $tryAdvance_1(consumer){ return checkCriticalNotNull(consumer) , false; } function Spliterators$EmptySpliterator$OfInt(){ } defineClass(959, 2066, $intern_18, Spliterators$EmptySpliterator$OfInt); _.forEachRemaining_0 = function forEachRemaining_44(consumer){ $forEachRemaining_3(consumer); } ; _.forEachRemaining = function forEachRemaining_45(consumer){ instanceOf(consumer, 202)?$forEachRemaining_3(castTo(consumer, 202)):$forEachRemaining_3(new Spliterator$OfInt$3methodref$accept$Type(consumer)); } ; _.tryAdvance_0 = function tryAdvance_8(consumer){ return $tryAdvance_1(consumer); } ; _.tryAdvance = function tryAdvance_9(consumer){ return instanceOf(consumer, 202)?$tryAdvance_1(castTo(consumer, 202)):$tryAdvance_1(new Spliterator$OfInt$2methodref$accept$Type(consumer)); } ; var Ljava_util_Spliterators$EmptySpliterator$OfInt_2_classLit = createForClass('java.util', 'Spliterators/EmptySpliterator/OfInt', 959); function $addElement(this$static, o){ $add_3(this$static.arrayList, o); } function $elementAt(this$static, index_0){ return checkArrayElementIndex(index_0, this$static.arrayList.array.length) , $get_11(this$static.arrayList, index_0); } function $setElementAt(this$static, o, index_0){ checkArrayElementIndex(index_0, this$static.arrayList.array.length); $set_1(this$static.arrayList, index_0, o); } function Vector(){ this.arrayList = new ArrayList; } function checkArrayElementIndex(index_0, size_0){ if (index_0 < 0 || index_0 >= size_0) { throw toJs(new ArrayIndexOutOfBoundsException); } } defineClass(588, 56, $intern_84, Vector); _.add_3 = function add_38(index_0, o){ checkArrayElementIndex(index_0, this.arrayList.array.length + 1); $add_2(this.arrayList, index_0, o); } ; _.add_2 = function add_39(o){ return $add_3(this.arrayList, o); } ; _.addAll_0 = function addAll_19(index_0, c){ checkArrayElementIndex(index_0, this.arrayList.array.length + 1); return $addAll_1(this.arrayList, index_0, c); } ; _.addAll = function addAll_20(c){ return $addAll_2(this.arrayList, c); } ; _.clear_0 = function clear_47(){ setLength(this.arrayList.array, 0); } ; _.contains = function contains_46(elem){ return $indexOf_3(this.arrayList, elem, 0) != -1; } ; _.containsAll = function containsAll_9(c){ return $containsAll(this.arrayList, c); } ; _.forEach_0 = function forEach_23(consumer){ $forEach_1(this.arrayList, consumer); } ; _.get_0 = function get_45(index_0){ return checkArrayElementIndex(index_0, this.arrayList.array.length) , $get_11(this.arrayList, index_0); } ; _.indexOf_0 = function indexOf_6(elem){ return $indexOf_3(this.arrayList, elem, 0); } ; _.isEmpty = function isEmpty_24(){ return this.arrayList.array.length == 0; } ; _.iterator_0 = function iterator_64(){ return new ArrayList$1(this.arrayList); } ; _.remove_2 = function remove_86(index_0){ return checkArrayElementIndex(index_0, this.arrayList.array.length) , $remove_11(this.arrayList, index_0); } ; _.removeRange = function removeRange_2(fromIndex, endIndex){ $removeRange(this.arrayList, fromIndex, endIndex); } ; _.set_2 = function set_19(index_0, elem){ return checkArrayElementIndex(index_0, this.arrayList.array.length) , $set_1(this.arrayList, index_0, elem); } ; _.size_1 = function size_61(){ return this.arrayList.array.length; } ; _.sort_0 = function sort_8(c){ $sort(this.arrayList, c); } ; _.subList = function subList_8(fromIndex, toIndex){ return new AbstractList$SubList(this.arrayList, fromIndex, toIndex); } ; _.toArray = function toArray_21(){ return clone_0(this.arrayList.array); } ; _.toArray_0 = function toArray_22(a){ return $toArray_1(this.arrayList, a); } ; _.toString_0 = function toString_72(){ return $toString_2(this.arrayList); } ; var Ljava_util_Vector_2_classLit = createForClass('java.util', 'Vector', 588); function $pop(this$static){ var sz; sz = this$static.arrayList.array.length; if (sz > 0) { return checkArrayElementIndex(sz - 1, this$static.arrayList.array.length) , $remove_11(this$static.arrayList, sz - 1); } else { throw toJs(new EmptyStackException); } } function $push(this$static, o){ $add_3(this$static.arrayList, o); return o; } function Stack(){ Vector.call(this); } defineClass(824, 588, $intern_84, Stack); var Ljava_util_Stack_2_classLit = createForClass('java.util', 'Stack', 824); function $add_9(this$static, newElement){ !this$static.builder?(this$static.builder = new StringBuilder_1(this$static.prefix)):$append_11(this$static.builder, this$static.delimiter); $append_8(this$static.builder, newElement); return this$static; } function $merge_0(this$static, other){ var otherLength; if (other.builder) { otherLength = other.builder.string.length; !this$static.builder?(this$static.builder = new StringBuilder_1(this$static.prefix)):$append_11(this$static.builder, this$static.delimiter); $append_9(this$static.builder, other.builder, other.prefix.length, otherLength); } return this$static; } function $toString_9(this$static){ return !this$static.builder?this$static.emptyValue:this$static.suffix.length == 0?this$static.builder.string:this$static.builder.string + ('' + this$static.suffix); } function StringJoiner(delimiter, prefix, suffix){ this.delimiter = (checkCriticalNotNull(delimiter) , delimiter); this.prefix = (checkCriticalNotNull(prefix) , prefix); this.suffix = (checkCriticalNotNull(suffix) , suffix); this.emptyValue = this.prefix + ('' + this.suffix); } defineClass(213, 1, {213:1}, StringJoiner); _.toString_0 = function toString_73(){ return $toString_9(this); } ; var Ljava_util_StringJoiner_2_classLit = createForClass('java.util', 'StringJoiner', 213); function $clear_8(this$static){ this$static.root = null; this$static.size_0 = 0; } function $getEntry_1(this$static, key){ var c, childNum, tree; tree = this$static.root; while (tree) { c = this$static.cmp.compare_1(key, tree.key); if (c == 0) { return tree; } childNum = c < 0?0:1; tree = tree.child[childNum]; } return null; } function $getFirstEntry(this$static){ var nextNode, node; if (!this$static.root) { return null; } node = this$static.root; while (nextNode = node.child[0]) { node = nextNode; } return node; } function $getLastEntry(this$static){ var nextNode, node; if (!this$static.root) { return null; } node = this$static.root; while (nextNode = node.child[1]) { node = nextNode; } return node; } function $getNodeAfter(this$static, key, inclusive){ var c, foundNode, node; foundNode = null; node = this$static.root; while (node) { c = this$static.cmp.compare_1(key, node.key); if (inclusive && c == 0) { return node; } if (c >= 0) { node = node.child[1]; } else { foundNode = node; node = node.child[0]; } } return foundNode; } function $getNodeBefore(this$static, key, inclusive){ var c, foundNode, node; foundNode = null; node = this$static.root; while (node) { c = this$static.cmp.compare_1(key, node.key); if (inclusive && c == 0) { return node; } if (c <= 0) { node = node.child[0]; } else { foundNode = node; node = node.child[1]; } } return foundNode; } function $headMap(this$static, toKey, inclusive){ return new TreeMap$SubMap(this$static, ($clinit_TreeMap$SubMapType() , Head), null, false, toKey, inclusive); } function $inOrderAdd(this$static, list, type_0, current, fromKey, fromInclusive, toKey, toInclusive){ var leftNode, rightNode; if (!current) { return; } leftNode = current.child[0]; !!leftNode && $inOrderAdd(this$static, list, type_0, leftNode, fromKey, fromInclusive, toKey, toInclusive); $inRange(this$static, type_0, current.key, fromKey, fromInclusive, toKey, toInclusive) && list.add_2(current); rightNode = current.child[1]; !!rightNode && $inOrderAdd(this$static, list, type_0, rightNode, fromKey, fromInclusive, toKey, toInclusive); } function $inRange(this$static, type_0, key, fromKey, fromInclusive, toKey, toInclusive){ var compare, compare0; if (type_0.fromKeyValid() && (compare0 = this$static.cmp.compare_1(key, fromKey) , compare0 < 0 || !fromInclusive && compare0 == 0)) { return false; } if (type_0.toKeyValid() && (compare = this$static.cmp.compare_1(key, toKey) , compare > 0 || !toInclusive && compare == 0)) { return false; } return true; } function $insert_1(this$static, tree, newNode, state){ var c, childNum; if (!tree) { return newNode; } else { c = this$static.cmp.compare_1(newNode.key, tree.key); if (c == 0) { state.value_0 = $setValue_0(tree, newNode.value_0); state.found = true; return tree; } childNum = c < 0?0:1; tree.child[childNum] = $insert_1(this$static, tree.child[childNum], newNode, state); if ($isRed(tree.child[childNum])) { if ($isRed(tree.child[1 - childNum])) { tree.isRed = true; tree.child[0].isRed = false; tree.child[1].isRed = false; } else { $isRed(tree.child[childNum].child[childNum])?(tree = $rotateSingle(tree, 1 - childNum)):$isRed(tree.child[childNum].child[1 - childNum]) && (tree = $rotateDouble(tree, 1 - childNum)); } } } return tree; } function $isRed(node){ return !!node && node.isRed; } function $put_12(this$static, key, value_0){ var node, state; node = new TreeMap$Node(key, value_0); state = new TreeMap$State; this$static.root = $insert_1(this$static, this$static.root, node, state); state.found || ++this$static.size_0; this$static.root.isRed = false; return state.value_0; } function $remove_26(this$static, k){ var key, state; key = k; state = new TreeMap$State; $removeWithState(this$static, key, state); return state.value_0; } function $removeEntry(this$static, entry){ var state; state = new TreeMap$State; state.matchValue = true; state.value_0 = entry.getValue(); return $removeWithState(this$static, entry.getKey(), state); } function $removeWithState(this$static, key, state){ var c, dir_0, dir2, found, grandparent, head, last, newNode, node, parent_0, sibling; if (!this$static.root) { return false; } found = null; parent_0 = null; head = new TreeMap$Node(null, null); dir_0 = 1; head.child[1] = this$static.root; node = head; while (node.child[dir_0]) { last = dir_0; grandparent = parent_0; parent_0 = node; node = node.child[dir_0]; c = this$static.cmp.compare_1(key, node.key); dir_0 = c < 0?0:1; c == 0 && (!state.matchValue || equals_57(node.value_0, state.value_0)) && (found = node); if (!(!!node && node.isRed) && !$isRed(node.child[dir_0])) { if ($isRed(node.child[1 - dir_0])) { parent_0 = parent_0.child[last] = $rotateSingle(node, dir_0); } else if (!$isRed(node.child[1 - dir_0])) { sibling = parent_0.child[1 - last]; if (sibling) { if (!$isRed(sibling.child[1 - last]) && !$isRed(sibling.child[last])) { parent_0.isRed = false; sibling.isRed = true; node.isRed = true; } else { dir2 = grandparent.child[1] == parent_0?1:0; $isRed(sibling.child[last])?(grandparent.child[dir2] = $rotateDouble(parent_0, last)):$isRed(sibling.child[1 - last]) && (grandparent.child[dir2] = $rotateSingle(parent_0, last)); node.isRed = grandparent.child[dir2].isRed = true; grandparent.child[dir2].child[0].isRed = false; grandparent.child[dir2].child[1].isRed = false; } } } } } if (found) { state.found = true; state.value_0 = found.value_0; if (node != found) { newNode = new TreeMap$Node(node.key, node.value_0); $replaceNode(this$static, head, found, newNode); parent_0 == found && (parent_0 = newNode); } parent_0.child[parent_0.child[1] == node?1:0] = node.child[!node.child[0]?1:0]; --this$static.size_0; } this$static.root = head.child[1]; !!this$static.root && (this$static.root.isRed = false); return state.found; } function $replaceNode(this$static, head, node, newNode){ var direction, parent_0; parent_0 = head; direction = parent_0.key == null || this$static.cmp.compare_1(node.key, parent_0.key) > 0?1:0; while (parent_0.child[direction] != node) { parent_0 = parent_0.child[direction]; direction = this$static.cmp.compare_1(node.key, parent_0.key) > 0?1:0; } parent_0.child[direction] = newNode; newNode.isRed = node.isRed; newNode.child[0] = node.child[0]; newNode.child[1] = node.child[1]; node.child[0] = null; node.child[1] = null; } function $rotateDouble(tree, rotateDirection){ var otherChildDir; otherChildDir = 1 - rotateDirection; tree.child[otherChildDir] = $rotateSingle(tree.child[otherChildDir], otherChildDir); return $rotateSingle(tree, rotateDirection); } function $rotateSingle(tree, rotateDirection){ var otherChildDir, save; otherChildDir = 1 - rotateDirection; save = tree.child[otherChildDir]; tree.child[otherChildDir] = save.child[rotateDirection]; save.child[rotateDirection] = tree; tree.isRed = true; save.isRed = false; return save; } function $subMap(this$static, fromKey, fromInclusive, toKey, toInclusive){ return new TreeMap$SubMap(this$static, ($clinit_TreeMap$SubMapType() , Range_1), fromKey, fromInclusive, toKey, toInclusive); } function $tailMap(this$static, fromKey, inclusive){ return new TreeMap$SubMap(this$static, ($clinit_TreeMap$SubMapType() , Tail), fromKey, inclusive, null, false); } function TreeMap(){ TreeMap_0.call(this, null); } function TreeMap_0(c){ this.root = null; this.cmp = ($clinit_Comparators() , !c?INTERNAL_NATURAL_ORDER:c); } defineClass(553, 2090, {3:1, 85:1, 139:1, 133:1}, TreeMap, TreeMap_0); _.clear_0 = function clear_48(){ $clear_8(this); } ; _.entryIterator_0 = function entryIterator_5(){ return new TreeMap$EntryIterator(this); } ; _.entrySet_0 = function entrySet_8(){ return new TreeMap$EntrySet(this); } ; _.getCeilingEntry = function getCeilingEntry(key){ return $getNodeAfter(this, key, true); } ; _.getEntry = function getEntry(key){ return $getEntry_1(this, key); } ; _.getFirstEntry = function getFirstEntry(){ return $getFirstEntry(this); } ; _.getFloorEntry = function getFloorEntry(key){ return $getNodeBefore(this, key, true); } ; _.getHigherEntry = function getHigherEntry(key){ return $getNodeAfter(this, key, false); } ; _.getLastEntry = function getLastEntry(){ return $getLastEntry(this); } ; _.getLowerEntry = function getLowerEntry(key){ return $getNodeBefore(this, key, false); } ; _.headMap = function headMap_0(toKey, inclusive){ return $headMap(this, toKey, inclusive); } ; _.put = function put_9(key, value_0){ return $put_12(this, key, value_0); } ; _.remove_0 = function remove_87(k){ return $remove_26(this, k); } ; _.removeEntry = function removeEntry(entry){ return $removeEntry(this, entry); } ; _.size_1 = function size_62(){ return this.size_0; } ; _.tailMap = function tailMap_0(fromKey, inclusive){ return $tailMap(this, fromKey, inclusive); } ; _.size_0 = 0; var Ljava_util_TreeMap_2_classLit = createForClass('java.util', 'TreeMap', 553); function $next_10(this$static){ return this$static.last = castTo($next_4(this$static.iter), 44); } function $remove_27(this$static){ $remove_8(this$static.iter); $removeEntry(this$static.this$01, this$static.last); this$static.last = null; } function TreeMap$EntryIterator(this$0){ TreeMap$EntryIterator_0.call(this, this$0, ($clinit_TreeMap$SubMapType() , All), null, false, null, false); } function TreeMap$EntryIterator_0(this$0, type_0, fromKey, fromInclusive, toKey, toInclusive){ var list; this.this$01 = this$0; list = new ArrayList; $inOrderAdd(this$0, list, type_0, this$0.root, fromKey, fromInclusive, toKey, toInclusive); this.iter = new AbstractList$ListIteratorImpl(list, 0); } defineClass(554, 1, $intern_6, TreeMap$EntryIterator, TreeMap$EntryIterator_0); _.forEachRemaining = function forEachRemaining_46(consumer){ $forEachRemaining(this, consumer); } ; _.next_1 = function next_36(){ return $next_10(this); } ; _.hasNext_0 = function hasNext_35(){ return $hasNext_2(this.iter); } ; _.remove = function remove_88(){ $remove_27(this); } ; var Ljava_util_TreeMap$EntryIterator_2_classLit = createForClass('java.util', 'TreeMap/EntryIterator', 554); function TreeMap$EntrySet(this$0){ this.this$01 = this$0; AbstractNavigableMap$EntrySet.call(this, this$0); } defineClass(1142, 629, $intern_10, TreeMap$EntrySet); _.clear_0 = function clear_49(){ $clear_8(this.this$01); } ; var Ljava_util_TreeMap$EntrySet_2_classLit = createForClass('java.util', 'TreeMap/EntrySet', 1142); function TreeMap$Node(key, value_0){ AbstractMap$SimpleEntry.call(this, key, value_0); this.child = initUnidimensionalArray(Ljava_util_TreeMap$Node_2_classLit, $intern_27, 447, 2, 0, 1); this.isRed = true; } defineClass(447, 397, {494:1, 397:1, 44:1, 447:1}, TreeMap$Node); _.isRed = false; var Ljava_util_TreeMap$Node_2_classLit = createForClass('java.util', 'TreeMap/Node', 447); function TreeMap$State(){ } defineClass(630, 1, {}, TreeMap$State); _.toString_0 = function toString_74(){ return 'State: mv=' + this.matchValue + ' value=' + this.value_0 + ' done=' + this.done_0 + ' found=' + this.found; } ; _.done_0 = false; _.found = false; _.matchValue = false; var Ljava_util_TreeMap$State_2_classLit = createForClass('java.util', 'TreeMap/State', 630); function $guardInRange(this$static, entry){ return !!entry && $inRange_0(this$static, entry.key)?entry:null; } function $inRange_0(this$static, key){ return $inRange(this$static.this$01, this$static.type_0, key, this$static.fromKey, this$static.fromInclusive, this$static.toKey, this$static.toInclusive); } function TreeMap$SubMap(this$0, type_0, fromKey, fromInclusive, toKey, toInclusive){ this.this$01 = this$0; switch (type_0.ordinal) { case 2: if (this$0.cmp.compare_1(toKey, fromKey) < 0) { throw toJs(new IllegalArgumentException_0('subMap: ' + toKey + ' less than ' + fromKey)); } break; case 1: this$0.cmp.compare_1(toKey, toKey); break; case 3: this$0.cmp.compare_1(fromKey, fromKey); } this.type_0 = type_0; this.fromKey = fromKey; this.fromInclusive = fromInclusive; this.toKey = toKey; this.toInclusive = toInclusive; } defineClass(631, 2090, $intern_11, TreeMap$SubMap); _.entryIterator_0 = function entryIterator_6(){ return new TreeMap$EntryIterator_0(this.this$01, this.type_0, this.fromKey, this.fromInclusive, this.toKey, this.toInclusive); } ; _.entrySet_0 = function entrySet_9(){ return new AbstractNavigableMap$EntrySet(this); } ; _.getCeilingEntry = function getCeilingEntry_0(key){ return $guardInRange(this, $getNodeAfter(this.this$01, key, true)); } ; _.getEntry = function getEntry_0(key){ return $guardInRange(this, $getEntry_1(this.this$01, key)); } ; _.getFirstEntry = function getFirstEntry_0(){ var entry; return this.type_0.fromKeyValid()?this.fromInclusive?(entry = $getNodeAfter(this.this$01, this.fromKey, true)):(entry = $getNodeAfter(this.this$01, this.fromKey, false)):(entry = $getFirstEntry(this.this$01)) , !!entry && $inRange_0(this, entry.key)?entry:null; } ; _.getFloorEntry = function getFloorEntry_0(key){ return $guardInRange(this, $getNodeBefore(this.this$01, key, true)); } ; _.getHigherEntry = function getHigherEntry_0(key){ return $guardInRange(this, $getNodeAfter(this.this$01, key, false)); } ; _.getLastEntry = function getLastEntry_0(){ var entry; this.type_0.toKeyValid()?this.toInclusive?(entry = $getNodeBefore(this.this$01, this.toKey, true)):(entry = $getNodeBefore(this.this$01, this.toKey, false)):(entry = $getLastEntry(this.this$01)); return !!entry && $inRange_0(this, entry.key)?entry:null; } ; _.getLowerEntry = function getLowerEntry_0(key){ return $guardInRange(this, $getNodeBefore(this.this$01, key, false)); } ; _.headMap = function headMap_1(toKey, toInclusive){ if (this.type_0.toKeyValid() && this.this$01.cmp.compare_1(toKey, this.toKey) > 0) { throw toJs(new IllegalArgumentException_0('subMap: ' + toKey + ' greater than ' + this.toKey)); } return this.type_0.fromKeyValid()?$subMap(this.this$01, this.fromKey, this.fromInclusive, toKey, toInclusive):$headMap(this.this$01, toKey, toInclusive); } ; _.put = function put_10(key, value_0){ if (!$inRange(this.this$01, this.type_0, key, this.fromKey, this.fromInclusive, this.toKey, this.toInclusive)) { throw toJs(new IllegalArgumentException_0(key + ' outside the range ' + this.fromKey + ' to ' + this.toKey)); } return $put_12(this.this$01, key, value_0); } ; _.remove_0 = function remove_89(k){ var key; key = k; if (!$inRange(this.this$01, this.type_0, key, this.fromKey, this.fromInclusive, this.toKey, this.toInclusive)) { return null; } return $remove_26(this.this$01, key); } ; _.removeEntry = function removeEntry_0(entry){ return $inRange_0(this, entry.getKey()) && $removeEntry(this.this$01, entry); } ; _.size_1 = function size_63(){ var count, entry, it; this.type_0.fromKeyValid()?this.fromInclusive?(entry = $getNodeAfter(this.this$01, this.fromKey, true)):(entry = $getNodeAfter(this.this$01, this.fromKey, false)):(entry = $getFirstEntry(this.this$01)); if (!(!!entry && $inRange_0(this, entry.key)?entry:null)) { return 0; } count = 0; for (it = new TreeMap$EntryIterator_0(this.this$01, this.type_0, this.fromKey, this.fromInclusive, this.toKey, this.toInclusive); $hasNext_2(it.iter); it.last = castTo($next_4(it.iter), 44)) { ++count; } return count; } ; _.tailMap = function tailMap_1(fromKey, fromInclusive){ if (this.type_0.fromKeyValid() && this.this$01.cmp.compare_1(fromKey, this.fromKey) < 0) { throw toJs(new IllegalArgumentException_0('subMap: ' + fromKey + ' less than ' + this.fromKey)); } return this.type_0.toKeyValid()?$subMap(this.this$01, fromKey, fromInclusive, this.toKey, this.toInclusive):$tailMap(this.this$01, fromKey, fromInclusive); } ; _.fromInclusive = false; _.toInclusive = false; var Ljava_util_TreeMap$SubMap_2_classLit = createForClass('java.util', 'TreeMap/SubMap', 631); function $clinit_TreeMap$SubMapType(){ $clinit_TreeMap$SubMapType = emptyMethod; All = new TreeMap$SubMapType('All', 0); Head = new TreeMap$SubMapType$1; Range_1 = new TreeMap$SubMapType$2; Tail = new TreeMap$SubMapType$3; } function TreeMap$SubMapType(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_10(name_0){ $clinit_TreeMap$SubMapType(); return valueOf(($clinit_TreeMap$SubMapType$Map() , $MAP_0), name_0); } function values_18(){ $clinit_TreeMap$SubMapType(); return stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_TreeMap$SubMapType_2_classLit, 1), $intern_37, 304, 0, [All, Head, Range_1, Tail]); } defineClass(304, 22, $intern_85, TreeMap$SubMapType); _.fromKeyValid = function fromKeyValid(){ return false; } ; _.toKeyValid = function toKeyValid(){ return false; } ; var All, Head, Range_1, Tail; var Ljava_util_TreeMap$SubMapType_2_classLit = createForEnum('java.util', 'TreeMap/SubMapType', 304, Ljava_lang_Enum_2_classLit, values_18, valueOf_10); function TreeMap$SubMapType$1(){ TreeMap$SubMapType.call(this, 'Head', 1); } defineClass(1143, 304, $intern_85, TreeMap$SubMapType$1); _.toKeyValid = function toKeyValid_0(){ return true; } ; var Ljava_util_TreeMap$SubMapType$1_2_classLit = createForEnum('java.util', 'TreeMap/SubMapType/1', 1143, Ljava_util_TreeMap$SubMapType_2_classLit, null, null); function TreeMap$SubMapType$2(){ TreeMap$SubMapType.call(this, 'Range', 2); } defineClass(1144, 304, $intern_85, TreeMap$SubMapType$2); _.fromKeyValid = function fromKeyValid_0(){ return true; } ; _.toKeyValid = function toKeyValid_1(){ return true; } ; var Ljava_util_TreeMap$SubMapType$2_2_classLit = createForEnum('java.util', 'TreeMap/SubMapType/2', 1144, Ljava_util_TreeMap$SubMapType_2_classLit, null, null); function TreeMap$SubMapType$3(){ TreeMap$SubMapType.call(this, 'Tail', 3); } defineClass(1145, 304, $intern_85, TreeMap$SubMapType$3); _.fromKeyValid = function fromKeyValid_1(){ return true; } ; var Ljava_util_TreeMap$SubMapType$3_2_classLit = createForEnum('java.util', 'TreeMap/SubMapType/3', 1145, Ljava_util_TreeMap$SubMapType_2_classLit, null, null); function $clinit_TreeMap$SubMapType$Map(){ $clinit_TreeMap$SubMapType$Map = emptyMethod; $MAP_0 = createValueOfMap(($clinit_TreeMap$SubMapType() , stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_TreeMap$SubMapType_2_classLit, 1), $intern_37, 304, 0, [All, Head, Range_1, Tail]))); } var $MAP_0; function $add_10(this$static, o){ return this$static.map_0.put(o, ($clinit_Boolean() , FALSE_0)) == null; } function $ceiling(this$static, e){ return this$static.map_0.ceilingKey(e); } function $floor(this$static, e){ return this$static.map_0.floorKey(e); } function $higher(this$static, e){ return this$static.map_0.higherKey(e); } function $lower(this$static, e){ return this$static.map_0.lowerKey(e); } function $remove_28(this$static, o){ return this$static.map_0.remove_0(o) != null; } function TreeSet(){ this.map_0 = new TreeMap; } function TreeSet_0(c){ this.map_0 = new TreeMap_0(c); } function TreeSet_1(map_0){ this.map_0 = map_0; } defineClass(157, $intern_9, {3:1, 20:1, 31:1, 16:1, 277:1, 21:1, 87:1, 157:1}, TreeSet, TreeSet_0, TreeSet_1); _.spliterator_0 = function spliterator_34(){ return new SortedSet$1(this); } ; _.add_2 = function add_40(o){ return $add_10(this, o); } ; _.clear_0 = function clear_50(){ this.map_0.clear_0(); } ; _.contains = function contains_47(o){ return this.map_0.containsKey(o); } ; _.iterator_0 = function iterator_65(){ return this.map_0.keySet_0().iterator_0(); } ; _.remove_1 = function remove_90(o){ return $remove_28(this, o); } ; _.size_1 = function size_64(){ return this.map_0.size_1(); } ; var Ljava_util_TreeSet_2_classLit = createForClass('java.util', 'TreeSet', 157); function lambda$0_2(comparator_0, t_1, u_2){ return comparator_0.compare_1(t_1, u_2) <= 0?u_2:t_1; } function lambda$1_2(comparator_0, t_1, u_2){ return comparator_0.compare_1(t_1, u_2) <= 0?t_1:u_2; } function BinaryOperator$lambda$0$Type(comparator_0){ this.comparator_0 = comparator_0; } defineClass(1082, 1, {}, BinaryOperator$lambda$0$Type); _.apply_3 = function apply_20(arg0, arg1){ return lambda$0_2(this.comparator_0, arg0, arg1); } ; var Ljava_util_function_BinaryOperator$lambda$0$Type_2_classLit = createForClass('java.util.function', 'BinaryOperator/lambda$0$Type', 1082); function BinaryOperator$lambda$1$Type(comparator_0){ this.comparator_0 = comparator_0; } defineClass(1083, 1, {}, BinaryOperator$lambda$1$Type); _.apply_3 = function apply_21(arg0, arg1){ return lambda$1_2(this.comparator_0, arg0, arg1); } ; var Ljava_util_function_BinaryOperator$lambda$1$Type_2_classLit = createForClass('java.util.function', 'BinaryOperator/lambda$1$Type', 1083); function Function$lambda$0$Type(){ } defineClass(952, 1, {}, Function$lambda$0$Type); _.apply_0 = function apply_22(t){ return t; } ; var Ljava_util_function_Function$lambda$0$Type_2_classLit = createForClass('java.util.function', 'Function/lambda$0$Type', 952); function Predicate$lambda$2$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(395, 1, $intern_40, Predicate$lambda$2$Type); _.test_0 = function test_4(t){ return !this.$$outer_0.test_0(t); } ; var Ljava_util_function_Predicate$lambda$2$Type_2_classLit = createForClass('java.util.function', 'Predicate/lambda$2$Type', 395); defineClass(581, 1, {581:1}); var Ljava_util_logging_Handler_2_classLit = createForClass('java.util.logging', 'Handler', 581); function $clinit_Level(){ $clinit_Level = emptyMethod; INFO = new Level$LevelInfo; } defineClass(2107, 1, $intern_1); _.getName = function getName_0(){ return 'DUMMY'; } ; _.toString_0 = function toString_75(){ return this.getName(); } ; var INFO; var Ljava_util_logging_Level_2_classLit = createForClass('java.util.logging', 'Level', 2107); function Level$LevelInfo(){ } defineClass(1706, 2107, $intern_1, Level$LevelInfo); _.getName = function getName_1(){ return 'INFO'; } ; var Ljava_util_logging_Level$LevelInfo_2_classLit = createForClass('java.util.logging', 'Level/LevelInfo', 1706); function $addLoggerImpl(this$static, logger){ (($clinit_Logger() , LOGGING_OFF)?null:logger.name_0).length == 0 && $addHandler(logger, new SimpleConsoleLogHandler); $putStringValue(this$static.loggerMap, LOGGING_OFF?null:logger.name_0, logger); } function $ensureLogger(this$static, name_0){ var logger, newLogger, name_1, parentName; logger = castTo($getStringValue(this$static.loggerMap, name_0), 525); if (!logger) { newLogger = new Logger(name_0); name_1 = ($clinit_Logger() , LOGGING_OFF)?null:newLogger.name_0; parentName = $substring_1(name_1, 0, $wnd.Math.max(0, $lastIndexOf(name_1, fromCodePoint(46)))); $setParent(newLogger, $ensureLogger(this$static, parentName)); (LOGGING_OFF?null:newLogger.name_0).length == 0 && $addHandler(newLogger, new SimpleConsoleLogHandler); $putStringValue(this$static.loggerMap, LOGGING_OFF?null:newLogger.name_0, newLogger); return newLogger; } return logger; } function LogManager(){ this.loggerMap = new HashMap; } function getLogManager(){ var rootLogger; if (!singleton) { singleton = new LogManager; rootLogger = new Logger(''); $setLevel(rootLogger, ($clinit_Level() , INFO)); $addLoggerImpl(singleton, rootLogger); } return singleton; } defineClass(1843, 1, {}, LogManager); var singleton; var Ljava_util_logging_LogManager_2_classLit = createForClass('java.util.logging', 'LogManager', 1843); function LogRecord(msg){ this.msg = msg; $clinit_System(); fromDouble_0(Date.now()); } defineClass(1896, 1, $intern_1, LogRecord); _.thrown = null; var Ljava_util_logging_LogRecord_2_classLit = createForClass('java.util.logging', 'LogRecord', 1896); function $clinit_Logger(){ $clinit_Logger = emptyMethod; LOGGING_OFF = true; ALL_ENABLED = false; INFO_ENABLED = false; WARNING_ENABLED = false; SEVERE_ENABLED = false; } function $actuallyLog(this$static, record){ var handler$array, handler$array0, handler$index, handler$index0, handler$max, handler$max0, logger; for (handler$array0 = $getHandlers(this$static) , handler$index0 = 0 , handler$max0 = handler$array0.length; handler$index0 < handler$max0; ++handler$index0) { $publish(record); } logger = !LOGGING_OFF && this$static.useParentHandlers?LOGGING_OFF?null:this$static.parent_0:null; while (logger) { for (handler$array = $getHandlers(logger) , handler$index = 0 , handler$max = handler$array.length; handler$index < handler$max; ++handler$index) { $publish(record); } logger = !LOGGING_OFF && logger.useParentHandlers?LOGGING_OFF?null:logger.parent_0:null; } } function $addHandler(this$static, handler){ if (LOGGING_OFF) { return; } $add_3(this$static.handlers, handler); } function $getEffectiveLevel(this$static){ var effectiveLevel, logger; if (this$static.level) { return this$static.level; } logger = LOGGING_OFF?null:this$static.parent_0; while (logger) { effectiveLevel = LOGGING_OFF?null:logger.level; if (effectiveLevel) { return effectiveLevel; } logger = LOGGING_OFF?null:logger.parent_0; } return $clinit_Level() , INFO; } function $getHandlers(this$static){ if (LOGGING_OFF) { return initUnidimensionalArray(Ljava_util_logging_Handler_2_classLit, $intern_86, 581, 0, 0, 1); } return castTo($toArray_1(this$static.handlers, initUnidimensionalArray(Ljava_util_logging_Handler_2_classLit, $intern_86, 581, this$static.handlers.array.length, 0, 1)), 856); } function $log(this$static, msg, thrown){ var record; (ALL_ENABLED?($getEffectiveLevel(this$static) , true):INFO_ENABLED?($clinit_Level() , true):WARNING_ENABLED?($clinit_Level() , true):SEVERE_ENABLED && ($clinit_Level() , false)) && (record = new LogRecord(msg) , record.thrown = thrown , $actuallyLog(this$static, record) , undefined); } function $setLevel(this$static, newLevel){ if (LOGGING_OFF) { return; } this$static.level = newLevel; } function $setParent(this$static, newParent){ if (LOGGING_OFF) { return; } !!newParent && (this$static.parent_0 = newParent); } function Logger(name_0){ $clinit_Logger(); if (LOGGING_OFF) { return; } this.name_0 = name_0; this.useParentHandlers = true; this.handlers = new ArrayList; } function getLogger(){ $clinit_Logger(); if (LOGGING_OFF) { return new Logger(null); } return $ensureLogger(getLogManager(), 'com.google.common.base.Strings'); } defineClass(525, 1, {525:1}, Logger); _.useParentHandlers = false; var ALL_ENABLED = false, INFO_ENABLED = false, LOGGING_OFF = false, SEVERE_ENABLED = false, WARNING_ENABLED = false; var Ljava_util_logging_Logger_2_classLit = createForClass('java.util.logging', 'Logger', 525); function $publish(record){ var console_0, level, val; console_0 = $equals_5(typeof(console_0), 'undefined')?null:new ConsoleLogger; if (!console_0) { return; } $clinit_Level(); level = (val = 900 , val >= $intern_46?'error':val >= 900?'warn':val >= 800?'info':'log'); $log_0(level, record.msg); !!record.thrown && $log_1(console_0, level, record.thrown, 'Exception: ', true); } function SimpleConsoleLogHandler(){ } defineClass(835, 581, {581:1}, SimpleConsoleLogHandler); var Ljava_util_logging_SimpleConsoleLogHandler_2_classLit = createForClass('java.util.logging', 'SimpleConsoleLogHandler', 835); function of_3(supplier, accumulator, combiner, finisher, characteristics){ checkCriticalNotNull(supplier); checkCriticalNotNull(accumulator); checkCriticalNotNull(combiner); checkCriticalNotNull(finisher); checkCriticalNotNull(characteristics); return new CollectorImpl(supplier, accumulator, finisher); } function of_4(supplier, accumulator, combiner, characteristics){ checkCriticalNotNull(supplier); checkCriticalNotNull(accumulator); checkCriticalNotNull(combiner); checkCriticalNotNull(characteristics); return new CollectorImpl(supplier, accumulator, new Function$lambda$0$Type); } function $clinit_Collector$Characteristics(){ $clinit_Collector$Characteristics = emptyMethod; CONCURRENT = new Collector$Characteristics('CONCURRENT', 0); IDENTITY_FINISH = new Collector$Characteristics('IDENTITY_FINISH', 1); UNORDERED = new Collector$Characteristics('UNORDERED', 2); } function Collector$Characteristics(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_11(name_0){ $clinit_Collector$Characteristics(); return valueOf(($clinit_Collector$Characteristics$Map() , $MAP_1), name_0); } function values_19(){ $clinit_Collector$Characteristics(); return stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [CONCURRENT, IDENTITY_FINISH, UNORDERED]); } defineClass(108, 22, {3:1, 34:1, 22:1, 108:1}, Collector$Characteristics); var CONCURRENT, IDENTITY_FINISH, UNORDERED; var Ljava_util_stream_Collector$Characteristics_2_classLit = createForEnum('java.util.stream', 'Collector/Characteristics', 108, Ljava_lang_Enum_2_classLit, values_19, valueOf_11); function $clinit_Collector$Characteristics$Map(){ $clinit_Collector$Characteristics$Map = emptyMethod; $MAP_1 = createValueOfMap(($clinit_Collector$Characteristics() , stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [CONCURRENT, IDENTITY_FINISH, UNORDERED]))); } var $MAP_1; function CollectorImpl(supplier, accumulator, finisher){ this.supplier = supplier; this.accumulator = accumulator; $clinit_Collections(); this.finisher = finisher; } defineClass(758, 1, {}, CollectorImpl); var Ljava_util_stream_CollectorImpl_2_classLit = createForClass('java.util.stream', 'CollectorImpl', 758); function addAll_21(collection, items){ collection.addAll(items); return collection; } function groupingBy0(supplier, classifier, downstream){ return of_3(supplier, new Collectors$lambda$7$Type(classifier), new Collectors$lambda$8$Type, new Collectors$lambda$9$Type(downstream), stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [])); } function lambda$26(op_0, u_2){ return setCheck(u_2, 0, $apply_2(u_2[0], valueOf_4(1))); } function lambda$27(op_0, u1_1, u2_2){ setCheck(u1_1, 0, $apply_2(u1_1[0], u2_2[0])); return u1_1; } function lambda$4(a_0, b_1){ return valueOf_4(add_20(valueOf_4(a_0.value_0).value_0, b_1.value_0)); } function lambda$42(c1_0, c2_1){ return c1_0.addAll(c2_1) , c1_0; } function lambda$50(c1_0, c2_1){ return $addAll(c1_0, c2_1) , c1_0; } function lambda$7(classifier_0, m_1, o_2){ var k, l; k = ($clinit_Boolean() , $test(o_2)?true:false); l = castTo(m_1.get_3(k), 15); if (!l) { l = new ArrayList; m_1.put(k, l); } l.add_2(o_2); } function lambda$9(downstream_1, m_2){ var entry, entry$iterator, result; result = new HashMap; for (entry$iterator = m_2.entrySet_0().iterator_0(); entry$iterator.hasNext_0();) { entry = castTo(entry$iterator.next_1(), 44); $put_6(result, entry.getKey(), streamAndCollect(downstream_1, castTo(entry.getValue(), 15))); } return result; } function mergeAll(m1, m2, mergeFunction){ var entry, entry$iterator; for (entry$iterator = m2.entrySet_0().iterator_0(); entry$iterator.hasNext_0();) { entry = castTo(entry$iterator.next_1(), 44); m1.merge(entry.getKey(), entry.getValue(), mergeFunction); } return m1; } function partitioningBy(predicate, downstream){ return groupingBy0(new Collectors$lambda$22$Type, new Collectors$12methodref$test$Type(predicate), downstream); } function reducing(identity, op){ return of_3(new Collectors$lambda$25$Type(identity), new Collectors$lambda$26$Type(op), new Collectors$lambda$27$Type(op), new Collectors$lambda$28$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [])); } function streamAndCollect(downstream, list){ var a, t, t$iterator; a = downstream.supplier.get_5(); for (t$iterator = list.iterator_0(); t$iterator.hasNext_0();) { t = t$iterator.next_1(); downstream.accumulator.accept_1(a, t); } return downstream.finisher.apply_0(a); } function Collectors$10methodref$merge$Type(){ } defineClass(1074, 1, {}, Collectors$10methodref$merge$Type); _.apply_3 = function apply_23(arg0, arg1){ return $merge_0(castTo(arg0, 213), castTo(arg1, 213)); } ; var Ljava_util_stream_Collectors$10methodref$merge$Type_2_classLit = createForClass('java.util.stream', 'Collectors/10methodref$merge$Type', 1074); function Collectors$11methodref$toString$Type(){ } defineClass(1075, 1, {}, Collectors$11methodref$toString$Type); _.apply_0 = function apply_24(arg0){ return $toString_9(castTo(arg0, 213)); } ; var Ljava_util_stream_Collectors$11methodref$toString$Type_2_classLit = createForClass('java.util.stream', 'Collectors/11methodref$toString$Type', 1075); function Collectors$12methodref$test$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1076, 1, {}, Collectors$12methodref$test$Type); _.apply_0 = function apply_25(arg0){ return $clinit_Boolean() , $test(arg0)?true:false; } ; var Ljava_util_stream_Collectors$12methodref$test$Type_2_classLit = createForClass('java.util.stream', 'Collectors/12methodref$test$Type', 1076); function Collectors$20methodref$add$Type(){ } defineClass(144, 1, {}, Collectors$20methodref$add$Type); _.accept_1 = function accept_21(arg0, arg1){ castTo(arg0, 16).add_2(arg1); } ; var Ljava_util_stream_Collectors$20methodref$add$Type_2_classLit = createForClass('java.util.stream', 'Collectors/20methodref$add$Type', 144); function Collectors$21methodref$ctor$Type(){ } defineClass(146, 1, {}, Collectors$21methodref$ctor$Type); _.get_5 = function get_46(){ return new ArrayList; } ; var Ljava_util_stream_Collectors$21methodref$ctor$Type_2_classLit = createForClass('java.util.stream', 'Collectors/21methodref$ctor$Type', 146); function Collectors$23methodref$ctor$Type(){ } defineClass(359, 1, {}, Collectors$23methodref$ctor$Type); _.get_5 = function get_47(){ return new HashSet; } ; var Ljava_util_stream_Collectors$23methodref$ctor$Type_2_classLit = createForClass('java.util.stream', 'Collectors/23methodref$ctor$Type', 359); function Collectors$24methodref$add$Type(){ } defineClass(360, 1, {}, Collectors$24methodref$add$Type); _.accept_1 = function accept_22(arg0, arg1){ $add_6(castTo(arg0, 49), arg1); } ; var Ljava_util_stream_Collectors$24methodref$add$Type_2_classLit = createForClass('java.util.stream', 'Collectors/24methodref$add$Type', 360); function Collectors$4methodref$addAll$Type(){ } defineClass(1069, 1, {}, Collectors$4methodref$addAll$Type); _.apply_3 = function apply_26(arg0, arg1){ return addAll_21(castTo(arg0, 15), castTo(arg1, 16)); } ; var Ljava_util_stream_Collectors$4methodref$addAll$Type_2_classLit = createForClass('java.util.stream', 'Collectors/4methodref$addAll$Type', 1069); function Collectors$9methodref$add$Type(){ } defineClass(1073, 1, {}, Collectors$9methodref$add$Type); _.accept_1 = function accept_23(arg0, arg1){ $add_9(castTo(arg0, 213), castTo(arg1, 484)); } ; var Ljava_util_stream_Collectors$9methodref$add$Type_2_classLit = createForClass('java.util.stream', 'Collectors/9methodref$add$Type', 1073); function Collectors$lambda$15$Type(){ this.delimiter_0 = ';,;'; this.prefix_1 = ''; this.suffix_2 = ''; } defineClass(1072, 1, {}, Collectors$lambda$15$Type); _.get_5 = function get_48(){ return new StringJoiner(this.delimiter_0, this.prefix_1, this.suffix_2); } ; var Ljava_util_stream_Collectors$lambda$15$Type_2_classLit = createForClass('java.util.stream', 'Collectors/lambda$15$Type', 1072); function Collectors$lambda$22$Type(){ } defineClass(1077, 1, {}, Collectors$lambda$22$Type); _.get_5 = function get_49(){ var partition; return partition = new LinkedHashMap , $put_11(partition, ($clinit_Boolean() , false), new ArrayList) , $put_11(partition, true, new ArrayList) , partition; } ; var Ljava_util_stream_Collectors$lambda$22$Type_2_classLit = createForClass('java.util.stream', 'Collectors/lambda$22$Type', 1077); function Collectors$lambda$25$Type(identity_0){ this.identity_0 = identity_0; } defineClass(1078, 1, {}, Collectors$lambda$25$Type); _.get_5 = function get_50(){ return stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, [this.identity_0]); } ; var Ljava_util_stream_Collectors$lambda$25$Type_2_classLit = createForClass('java.util.stream', 'Collectors/lambda$25$Type', 1078); function Collectors$lambda$26$Type(op_0){ this.op_0 = op_0; } defineClass(1079, 1, {}, Collectors$lambda$26$Type); _.accept_1 = function accept_24(arg0, arg1){ lambda$26(this.op_0, castToArray(arg0)); } ; var Ljava_util_stream_Collectors$lambda$26$Type_2_classLit = createForClass('java.util.stream', 'Collectors/lambda$26$Type', 1079); function Collectors$lambda$27$Type(op_0){ this.op_0 = op_0; } defineClass(1080, 1, {}, Collectors$lambda$27$Type); _.apply_3 = function apply_27(arg0, arg1){ return lambda$27(this.op_0, castToArray(arg0), castToArray(arg1)); } ; var Ljava_util_stream_Collectors$lambda$27$Type_2_classLit = createForClass('java.util.stream', 'Collectors/lambda$27$Type', 1080); function Collectors$lambda$28$Type(){ } defineClass(1081, 1, {}, Collectors$lambda$28$Type); _.apply_0 = function apply_28(arg0){ return castToArray(arg0)[0]; } ; var Ljava_util_stream_Collectors$lambda$28$Type_2_classLit = createForClass('java.util.stream', 'Collectors/lambda$28$Type', 1081); function $apply_2(arg0, arg1){ return lambda$4(castTo(arg0, 168), castTo(arg1, 168)); } function Collectors$lambda$4$Type(){ } defineClass(728, 1, {}, Collectors$lambda$4$Type); _.apply_3 = function apply_29(arg0, arg1){ return $apply_2(arg0, arg1); } ; var Ljava_util_stream_Collectors$lambda$4$Type_2_classLit = createForClass('java.util.stream', 'Collectors/lambda$4$Type', 728); function Collectors$lambda$42$Type(){ } defineClass(145, 1, {}, Collectors$lambda$42$Type); _.apply_3 = function apply_30(arg0, arg1){ return lambda$42(castTo(arg0, 16), castTo(arg1, 16)); } ; var Ljava_util_stream_Collectors$lambda$42$Type_2_classLit = createForClass('java.util.stream', 'Collectors/lambda$42$Type', 145); function Collectors$lambda$50$Type(){ } defineClass(361, 1, {}, Collectors$lambda$50$Type); _.apply_3 = function apply_31(arg0, arg1){ return lambda$50(castTo(arg0, 49), castTo(arg1, 49)); } ; var Ljava_util_stream_Collectors$lambda$50$Type_2_classLit = createForClass('java.util.stream', 'Collectors/lambda$50$Type', 361); function Collectors$lambda$51$Type(){ } defineClass(362, 1, {}, Collectors$lambda$51$Type); _.apply_0 = function apply_32(arg0){ return castTo(arg0, 49); } ; var Ljava_util_stream_Collectors$lambda$51$Type_2_classLit = createForClass('java.util.stream', 'Collectors/lambda$51$Type', 362); function Collectors$lambda$7$Type(classifier_0){ this.classifier_0 = classifier_0; } defineClass(1068, 1, {}, Collectors$lambda$7$Type); _.accept_1 = function accept_25(arg0, arg1){ lambda$7(this.classifier_0, castTo(arg0, 85), arg1); } ; var Ljava_util_stream_Collectors$lambda$7$Type_2_classLit = createForClass('java.util.stream', 'Collectors/lambda$7$Type', 1068); function Collectors$lambda$8$Type(){ } defineClass(1070, 1, {}, Collectors$lambda$8$Type); _.apply_3 = function apply_33(arg0, arg1){ return mergeAll(castTo(arg0, 85), castTo(arg1, 85), new Collectors$4methodref$addAll$Type); } ; var Ljava_util_stream_Collectors$lambda$8$Type_2_classLit = createForClass('java.util.stream', 'Collectors/lambda$8$Type', 1070); function Collectors$lambda$9$Type(downstream_1){ this.downstream_1 = downstream_1; } defineClass(1071, 1, {}, Collectors$lambda$9$Type); _.apply_0 = function apply_34(arg0){ return lambda$9(this.downstream_1, castTo(arg0, 85)); } ; var Ljava_util_stream_Collectors$lambda$9$Type_2_classLit = createForClass('java.util.stream', 'Collectors/lambda$9$Type', 1071); function $close(this$static){ if (!this$static.root) { this$static.terminated = true; $runClosers(this$static); } else { this$static.root.close_0(); } } function $onClose(this$static, closeHandler){ !this$static.root?$add_3(this$static.onClose, closeHandler):$onClose(this$static.root, closeHandler); return this$static; } function $runClosers(this$static){ var e, i, size_0, suppressed, throwables; throwables = new ArrayList; $forEach_1(this$static.onClose, new TerminatableStream$lambda$0$Type(throwables)); this$static.onClose.array.length = 0; if (throwables.array.length != 0) { e = (checkCriticalElementIndex(0, throwables.array.length) , castTo(throwables.array[0], 82)); for (i = 1 , size_0 = throwables.array.length; i < size_0; ++i) { suppressed = (checkCriticalElementIndex(i, throwables.array.length) , castTo(throwables.array[i], 82)); suppressed != e && $addSuppressed(e, suppressed); } if (instanceOf(e, 63)) { throw toJs(castTo(e, 63)); } if (instanceOf(e, 296)) { throw toJs(castTo(e, 296)); } } } function $terminate(this$static){ if (!this$static.root) { $throwIfTerminated(this$static); this$static.terminated = true; } else { $terminate(this$static.root); } } function $throwIfTerminated(this$static){ if (this$static.root) { $throwIfTerminated(this$static.root); } else if (this$static.terminated) { throw toJs(new IllegalStateException_0("Stream already terminated, can't be modified or used")); } } function TerminatableStream(previous){ if (!previous) { this.root = null; this.onClose = new ArrayList; } else { this.root = previous; this.onClose = null; } } function lambda$0_3(throwables_0, runnable_1){ var e; try { runnable_1.run(); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 82)) { e = $e0; push_1(throwables_0.array, e); } else throw toJs($e0); } } defineClass(550, 1, {}); _.close_0 = function close_0(){ $close(this); } ; _.terminated = false; var Ljava_util_stream_TerminatableStream_2_classLit = createForClass('java.util.stream', 'TerminatableStream', 550); function $average(this$static){ var stats; stats = $collect(this$static); if (eq(stats.count, 0)) { return $clinit_OptionalDouble() , $clinit_OptionalDouble() , EMPTY_4; } return $clinit_OptionalDouble() , new OptionalDouble_0(gt(stats.count, 0)?$getSum(stats) / toDouble_0(stats.count):0); } function $collect(this$static){ var acc; $terminate(this$static); acc = new DoubleSummaryStatistics; $forEachRemaining_1(this$static.spliterator, new DoubleStreamImpl$lambda$2$Type(acc)); return acc; } function $max(this$static){ var stats; stats = $collect(this$static); if (eq(stats.count, 0)) { return $clinit_OptionalDouble() , $clinit_OptionalDouble() , EMPTY_4; } return $clinit_OptionalDouble() , new OptionalDouble_0(stats.max_0); } function $min(this$static){ var stats; stats = $collect(this$static); if (eq(stats.count, 0)) { return $clinit_OptionalDouble() , $clinit_OptionalDouble() , EMPTY_4; } return $clinit_OptionalDouble() , new OptionalDouble_0(stats.min_0); } function $sorted(this$static){ var sortingSpliterator; $throwIfTerminated(this$static); sortingSpliterator = new DoubleStreamImpl$2(this$static, this$static.spliterator.sizeEstimate, this$static.spliterator.characteristics | 4); return new DoubleStreamImpl(this$static, sortingSpliterator); } function $toArray_5(this$static){ var entries; $terminate(this$static); entries = initUnidimensionalArray(D_classLit, $intern_66, 28, 0, 15, 1); $forEachRemaining_1(this$static.spliterator, new DoubleStreamImpl$lambda$0$Type(entries)); return entries; } function DoubleStreamImpl(previous, spliterator){ TerminatableStream.call(this, previous); this.spliterator = spliterator; } function lambda$0_4(entries_0, value_1){ return entries_0[entries_0.length] = value_1; } defineClass(827, 550, $intern_87, DoubleStreamImpl); _.close_0 = function close_1(){ $close(this); } ; var Ljava_util_stream_DoubleStreamImpl_2_classLit = createForClass('java.util.stream', 'DoubleStreamImpl', 827); function $tryAdvance_2(this$static, action){ var list; if (!this$static.ordered) { list = initUnidimensionalArray(D_classLit, $intern_66, 28, 0, 15, 1); $forEachRemaining_1(this$static.this$01.spliterator, new DoubleStreamImpl$2$lambda$0$Type(list)); sort_9(list, makeLambdaFunction(Arrays$0methodref$compare$Type.prototype.compare_0, Arrays$0methodref$compare$Type, [])); this$static.ordered = new Spliterators$DoubleArraySpliterator(list, this$static.characteristics); } return $tryAdvance_0(this$static.ordered, action); } function DoubleStreamImpl$2(this$0, $anonymous0, $anonymous1){ this.this$01 = this$0; Spliterators$AbstractDoubleSpliterator.call(this, $anonymous0, $anonymous1); } function lambda$0_5(list_0, item_1){ return list_0[list_0.length] = item_1; } defineClass(1847, 736, $intern_18, DoubleStreamImpl$2); _.tryAdvance_0 = function tryAdvance_10(action){ return $tryAdvance_2(this, castTo(action, 189)); } ; _.ordered = null; var Ljava_util_stream_DoubleStreamImpl$2_2_classLit = createForClass('java.util.stream', 'DoubleStreamImpl/2', 1847); function DoubleStreamImpl$2$lambda$0$Type(list_0){ this.list_0 = list_0; } defineClass(1848, 1, $intern_75, DoubleStreamImpl$2$lambda$0$Type); _.accept_2 = function accept_26(arg0){ lambda$0_5(this.list_0, arg0); } ; var Ljava_util_stream_DoubleStreamImpl$2$lambda$0$Type_2_classLit = createForClass('java.util.stream', 'DoubleStreamImpl/2/lambda$0$Type', 1848); function DoubleStreamImpl$lambda$0$Type(entries_0){ this.entries_0 = entries_0; } defineClass(1845, 1, $intern_75, DoubleStreamImpl$lambda$0$Type); _.accept_2 = function accept_27(arg0){ lambda$0_4(this.entries_0, arg0); } ; var Ljava_util_stream_DoubleStreamImpl$lambda$0$Type_2_classLit = createForClass('java.util.stream', 'DoubleStreamImpl/lambda$0$Type', 1845); function DoubleStreamImpl$lambda$2$Type(acc_1){ this.acc_1 = acc_1; } defineClass(1846, 1, $intern_75, DoubleStreamImpl$lambda$2$Type); _.accept_2 = function accept_28(arg0){ $accept(this.acc_1, arg0); } ; var Ljava_util_stream_DoubleStreamImpl$lambda$2$Type_2_classLit = createForClass('java.util.stream', 'DoubleStreamImpl/lambda$2$Type', 1846); function range_0(endExclusive){ if (0 >= endExclusive) { return new IntStreamImpl$Empty; } return rangeClosed(endExclusive - 1); } function rangeClosed(endInclusive){ var count, spliterator; if (0 > endInclusive) { return new IntStreamImpl$Empty; } count = endInclusive + 1; spliterator = new IntStream$5(count, endInclusive); return new IntStreamImpl(null, spliterator); } function $tryAdvance_3(this$static, action){ if (this$static.next_0 <= this$static.val$endInclusive5) { action.accept_0(this$static.next_0++); return true; } return false; } function IntStream$5($anonymous0, val$endInclusive){ this.val$startInclusive4 = 0; this.val$endInclusive5 = val$endInclusive; Spliterators$AbstractIntSpliterator.call(this, $anonymous0, 17493); this.next_0 = this.val$startInclusive4; } defineClass(1397, 735, $intern_18, IntStream$5); _.tryAdvance_0 = function tryAdvance_11(action){ return $tryAdvance_3(this, castTo(action, 202)); } ; _.next_0 = 0; _.val$endInclusive5 = 0; _.val$startInclusive4 = 0; var Ljava_util_stream_IntStream$5_2_classLit = createForClass('java.util.stream', 'IntStream/5', 1397); function $collect_0(this$static){ var acc; $terminate(this$static); acc = new IntSummaryStatistics; $forEachRemaining_1(this$static.spliterator, new IntStreamImpl$lambda$4$Type(acc)); return acc; } function $max_0(this$static){ var stats; stats = $collect_0(this$static); if (eq(stats.count, 0)) { return $clinit_OptionalInt() , $clinit_OptionalInt() , EMPTY_5; } return $clinit_OptionalInt() , new OptionalInt_0(stats.max_0); } function IntStreamImpl(previous, spliterator){ TerminatableStream.call(this, previous); this.spliterator = spliterator; } defineClass(806, 550, $intern_87, IntStreamImpl); _.close_0 = function close_2(){ $close(this); } ; _.spliterator_1 = function spliterator_35(){ return $terminate(this) , this.spliterator; } ; var Ljava_util_stream_IntStreamImpl_2_classLit = createForClass('java.util.stream', 'IntStreamImpl', 806); function IntStreamImpl$Empty(){ TerminatableStream.call(this, null); } defineClass(807, 550, $intern_87, IntStreamImpl$Empty); _.close_0 = function close_3(){ $close(this); } ; _.spliterator_1 = function spliterator_36(){ return $terminate(this) , $clinit_Spliterators$EmptySpliterator() , OF_INT; } ; var Ljava_util_stream_IntStreamImpl$Empty_2_classLit = createForClass('java.util.stream', 'IntStreamImpl/Empty', 807); function IntStreamImpl$lambda$4$Type(acc_1){ this.acc_1 = acc_1; } defineClass(1687, 1, $intern_20, IntStreamImpl$lambda$4$Type); _.accept_0 = function accept_29(arg0){ $accept_0(this.acc_1, arg0); } ; var Ljava_util_stream_IntStreamImpl$lambda$4$Type_2_classLit = createForClass('java.util.stream', 'IntStreamImpl/lambda$4$Type', 1687); var Ljava_util_stream_Stream_2_classLit = createForInterface('java.util.stream', 'Stream'); function $clinit_StreamImpl(){ $clinit_StreamImpl = emptyMethod; NULL_CONSUMER = new StreamImpl$lambda$0$Type; } function $anyMatch(this$static, predicate){ return ($throwIfTerminated(this$static) , $spliterator(new StreamImpl(this$static, new StreamImpl$FilterSpliterator(predicate, this$static.spliterator)))).tryAdvance(NULL_CONSUMER); } function $collect_1(this$static, collector){ var lastArg; return collector.finisher.apply_0($reduce(this$static, collector.supplier.get_5(), (lastArg = new StreamImpl$lambda$4$Type(collector) , lastArg))); } function $count_0(this$static){ var count; $terminate(this$static); count = 0; while (this$static.spliterator.tryAdvance(new StreamImpl$lambda$1$Type)) { count = add_20(count, 1); } return count; } function $distinct(this$static){ var seen; $throwIfTerminated(this$static); seen = new HashSet; return $filter(this$static, new StreamImpl$1methodref$add$Type(seen)); } function $filter(this$static, predicate){ $throwIfTerminated(this$static); return new StreamImpl(this$static, new StreamImpl$FilterSpliterator(predicate, this$static.spliterator)); } function $findFirst(this$static){ var holder; $terminate(this$static); holder = new StreamImpl$ValueConsumer; if (this$static.spliterator.tryAdvance(holder)) { return $clinit_Optional() , new Optional(checkCriticalNotNull(holder.value_0)); } return $clinit_Optional() , $clinit_Optional() , EMPTY_3; } function $flatMap(this$static, mapper){ var flatMapSpliterator, spliteratorOfStreams; $throwIfTerminated(this$static); spliteratorOfStreams = new StreamImpl$MapToObjSpliterator(mapper, this$static.spliterator); flatMapSpliterator = new StreamImpl$1(spliteratorOfStreams); return new StreamImpl(this$static, flatMapSpliterator); } function $forEach_3(this$static, action){ $terminate(this$static); this$static.spliterator.forEachRemaining(action); } function $map(this$static, mapper){ $throwIfTerminated(this$static); return new StreamImpl(this$static, new StreamImpl$MapToObjSpliterator(mapper, this$static.spliterator)); } function $mapToDouble(this$static, mapper){ $throwIfTerminated(this$static); return new DoubleStreamImpl(this$static, new StreamImpl$MapToDoubleSpliterator(mapper, this$static.spliterator)); } function $mapToInt(this$static, mapper){ $throwIfTerminated(this$static); return new IntStreamImpl(this$static, new StreamImpl$MapToIntSpliterator(mapper, this$static.spliterator)); } function $max_1(this$static, comparator){ return $reduce_0(this$static, (checkCriticalNotNull(comparator) , new BinaryOperator$lambda$0$Type(comparator))); } function $min_0(this$static, comparator){ return $reduce_0(this$static, (checkCriticalNotNull(comparator) , new BinaryOperator$lambda$1$Type(comparator))); } function $reduce(this$static, identity, accumulator){ var consumer; $terminate(this$static); consumer = new StreamImpl$ValueConsumer; consumer.value_0 = identity; this$static.spliterator.forEachRemaining(new StreamImpl$lambda$5$Type(consumer, accumulator)); return consumer.value_0; } function $reduce_0(this$static, accumulator){ var consumer; consumer = new StreamImpl$ValueConsumer; if (!this$static.spliterator.tryAdvance(consumer)) { $terminate(this$static); return $clinit_Optional() , $clinit_Optional() , EMPTY_3; } return $clinit_Optional() , new Optional(checkCriticalNotNull($reduce(this$static, consumer.value_0, accumulator))); } function $skip(this$static){ $throwIfTerminated(this$static); checkCriticalState_0(true, 'n may not be negative'); return new StreamImpl(this$static, new StreamImpl$SkipSpliterator(this$static.spliterator)); } function $sorted_0(this$static){ var c; $throwIfTerminated(this$static); c = ($clinit_Comparators() , $clinit_Comparators() , NATURAL_ORDER); return $sorted_1(this$static, c); } function $sorted_1(this$static, comparator){ var sortedSpliterator; $throwIfTerminated(this$static); sortedSpliterator = new StreamImpl$5(this$static, this$static.spliterator.estimateSize_0(), this$static.spliterator.characteristics_0() | 4, comparator); return new StreamImpl(this$static, sortedSpliterator); } function $spliterator(this$static){ $terminate(this$static); return this$static.spliterator; } function $toArray_6(this$static, generator){ var collected; collected = castTo($collect_1(this$static, of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , IDENTITY_FINISH)]))), 15); return collected.toArray_0($apply_19(collected.size_1())); } function StreamImpl(prev, spliterator){ $clinit_StreamImpl(); TerminatableStream.call(this, prev); this.spliterator = spliterator; } function lambda$4_0(collector_0, a_1, t_2){ $clinit_StreamImpl(); collector_0.accumulator.accept_1(a_1, t_2); return a_1; } function lambda$5(consumer_0, accumulator_1, item_2){ $clinit_StreamImpl(); $accept_1(consumer_0, accumulator_1.apply_3(consumer_0.value_0, item_2)); } defineClass(26, 550, {533:1, 687:1, 848:1}, StreamImpl); _.close_0 = function close_4(){ $close(this); } ; var NULL_CONSUMER; var Ljava_util_stream_StreamImpl_2_classLit = createForClass('java.util.stream', 'StreamImpl', 26); function $advanceToNextSpliterator(this$static){ while (!this$static.next_0) { if (!$tryAdvance_6(this$static.val$spliteratorOfStreams5, new StreamImpl$1$lambda$0$Type(this$static))) { return false; } } return true; } function $lambda$0_0(this$static, n_0){ if (n_0) { this$static.nextStream = n_0; this$static.next_0 = ($terminate(n_0) , n_0.spliterator); } } function StreamImpl$1(val$spliteratorOfStreams){ this.val$spliteratorOfStreams5 = val$spliteratorOfStreams; Spliterators$AbstractSpliterator.call(this, $intern_21, 0); } defineClass(1102, 500, $intern_18, StreamImpl$1); _.tryAdvance = function tryAdvance_12(action){ while ($advanceToNextSpliterator(this)) { if (this.next_0.tryAdvance(action)) { return true; } else { $close(this.nextStream); this.nextStream = null; this.next_0 = null; } } return false; } ; var Ljava_util_stream_StreamImpl$1_2_classLit = createForClass('java.util.stream', 'StreamImpl/1', 1102); function StreamImpl$1$lambda$0$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1103, 1, $intern_19, StreamImpl$1$lambda$0$Type); _.accept = function accept_30(arg0){ $lambda$0_0(this.$$outer_0, castTo(arg0, 848)); } ; var Ljava_util_stream_StreamImpl$1$lambda$0$Type_2_classLit = createForClass('java.util.stream', 'StreamImpl/1/lambda$0$Type', 1103); function StreamImpl$1methodref$add$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1104, 1, $intern_40, StreamImpl$1methodref$add$Type); _.test_0 = function test_5(arg0){ return $add_6(this.$$outer_0, arg0); } ; var Ljava_util_stream_StreamImpl$1methodref$add$Type_2_classLit = createForClass('java.util.stream', 'StreamImpl/1methodref$add$Type', 1104); function StreamImpl$5(this$0, $anonymous0, $anonymous1, val$comparator){ this.this$01 = this$0; this.val$comparator5 = val$comparator; Spliterators$AbstractSpliterator.call(this, $anonymous0, $anonymous1); } defineClass(1105, 500, $intern_18, StreamImpl$5); _.tryAdvance = function tryAdvance_13(action){ var list; if (!this.ordered) { list = new ArrayList; this.this$01.spliterator.forEachRemaining(new StreamImpl$5$2methodref$add$Type(list)); $clinit_Collections(); $sort(list, this.val$comparator5); this.ordered = new Spliterators$IteratorSpliterator(list, 16); } return $tryAdvance(this.ordered, action); } ; _.ordered = null; var Ljava_util_stream_StreamImpl$5_2_classLit = createForClass('java.util.stream', 'StreamImpl/5', 1105); function StreamImpl$5$2methodref$add$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1106, 1, $intern_19, StreamImpl$5$2methodref$add$Type); _.accept = function accept_31(arg0){ $add_3(this.$$outer_0, arg0); } ; var Ljava_util_stream_StreamImpl$5$2methodref$add$Type_2_classLit = createForClass('java.util.stream', 'StreamImpl/5/2methodref$add$Type', 1106); function $lambda$0_1(this$static, action_1, item_1){ if (this$static.filter.test_0(item_1)) { this$static.found = true; action_1.accept(item_1); } } function StreamImpl$FilterSpliterator(filter, original){ Spliterators$AbstractSpliterator.call(this, original.estimateSize_0(), original.characteristics_0() & -16449); checkCriticalNotNull(filter); this.filter = filter; this.original = original; } defineClass(737, 500, $intern_18, StreamImpl$FilterSpliterator); _.tryAdvance = function tryAdvance_14(action){ this.found = false; while (!this.found && this.original.tryAdvance(new StreamImpl$FilterSpliterator$lambda$0$Type(this, action))) ; return this.found; } ; _.found = false; var Ljava_util_stream_StreamImpl$FilterSpliterator_2_classLit = createForClass('java.util.stream', 'StreamImpl/FilterSpliterator', 737); function StreamImpl$FilterSpliterator$lambda$0$Type($$outer_0, action_1){ this.$$outer_0 = $$outer_0; this.action_1 = action_1; } defineClass(1096, 1, $intern_19, StreamImpl$FilterSpliterator$lambda$0$Type); _.accept = function accept_32(arg0){ $lambda$0_1(this.$$outer_0, this.action_1, arg0); } ; var Ljava_util_stream_StreamImpl$FilterSpliterator$lambda$0$Type_2_classLit = createForClass('java.util.stream', 'StreamImpl/FilterSpliterator/lambda$0$Type', 1096); function $lambda$0_2(this$static, action_1, u_1){ action_1.accept_2(this$static.map_0.applyAsDouble(u_1)); } function $tryAdvance_4(this$static, action){ return this$static.original.tryAdvance(new StreamImpl$MapToDoubleSpliterator$lambda$0$Type(this$static, action)); } function StreamImpl$MapToDoubleSpliterator(map_0, original){ Spliterators$AbstractDoubleSpliterator.call(this, original.estimateSize_0(), original.characteristics_0() & -6); checkCriticalNotNull(map_0); this.map_0 = map_0; this.original = original; } defineClass(1091, 736, $intern_18, StreamImpl$MapToDoubleSpliterator); _.tryAdvance_0 = function tryAdvance_15(action){ return $tryAdvance_4(this, castTo(action, 189)); } ; var Ljava_util_stream_StreamImpl$MapToDoubleSpliterator_2_classLit = createForClass('java.util.stream', 'StreamImpl/MapToDoubleSpliterator', 1091); function StreamImpl$MapToDoubleSpliterator$lambda$0$Type($$outer_0, action_1){ this.$$outer_0 = $$outer_0; this.action_1 = action_1; } defineClass(1095, 1, $intern_19, StreamImpl$MapToDoubleSpliterator$lambda$0$Type); _.accept = function accept_33(arg0){ $lambda$0_2(this.$$outer_0, this.action_1, arg0); } ; var Ljava_util_stream_StreamImpl$MapToDoubleSpliterator$lambda$0$Type_2_classLit = createForClass('java.util.stream', 'StreamImpl/MapToDoubleSpliterator/lambda$0$Type', 1095); function $lambda$0_3(this$static, action_1, u_1){ action_1.accept_0(this$static.map_0.applyAsInt(u_1)); } function $tryAdvance_5(this$static, action){ return this$static.original.tryAdvance(new StreamImpl$MapToIntSpliterator$lambda$0$Type(this$static, action)); } function StreamImpl$MapToIntSpliterator(map_0, original){ Spliterators$AbstractIntSpliterator.call(this, original.estimateSize_0(), original.characteristics_0() & -6); checkCriticalNotNull(map_0); this.map_0 = map_0; this.original = original; } defineClass(1090, 735, $intern_18, StreamImpl$MapToIntSpliterator); _.tryAdvance_0 = function tryAdvance_16(action){ return $tryAdvance_5(this, castTo(action, 202)); } ; var Ljava_util_stream_StreamImpl$MapToIntSpliterator_2_classLit = createForClass('java.util.stream', 'StreamImpl/MapToIntSpliterator', 1090); function StreamImpl$MapToIntSpliterator$lambda$0$Type($$outer_0, action_1){ this.$$outer_0 = $$outer_0; this.action_1 = action_1; } defineClass(1094, 1, $intern_19, StreamImpl$MapToIntSpliterator$lambda$0$Type); _.accept = function accept_34(arg0){ $lambda$0_3(this.$$outer_0, this.action_1, arg0); } ; var Ljava_util_stream_StreamImpl$MapToIntSpliterator$lambda$0$Type_2_classLit = createForClass('java.util.stream', 'StreamImpl/MapToIntSpliterator/lambda$0$Type', 1094); function $lambda$0_4(this$static, action_1, u_1){ action_1.accept(this$static.map_0.apply_0(u_1)); } function $tryAdvance_6(this$static, action){ return this$static.original.tryAdvance(new StreamImpl$MapToObjSpliterator$lambda$0$Type(this$static, action)); } function StreamImpl$MapToObjSpliterator(map_0, original){ Spliterators$AbstractSpliterator.call(this, original.estimateSize_0(), original.characteristics_0() & -6); checkCriticalNotNull(map_0); this.map_0 = map_0; this.original = original; } defineClass(734, 500, $intern_18, StreamImpl$MapToObjSpliterator); _.tryAdvance = function tryAdvance_17(action){ return $tryAdvance_6(this, action); } ; var Ljava_util_stream_StreamImpl$MapToObjSpliterator_2_classLit = createForClass('java.util.stream', 'StreamImpl/MapToObjSpliterator', 734); function StreamImpl$MapToObjSpliterator$lambda$0$Type($$outer_0, action_1){ this.$$outer_0 = $$outer_0; this.action_1 = action_1; } defineClass(1093, 1, $intern_19, StreamImpl$MapToObjSpliterator$lambda$0$Type); _.accept = function accept_35(arg0){ $lambda$0_4(this.$$outer_0, this.action_1, arg0); } ; var Ljava_util_stream_StreamImpl$MapToObjSpliterator$lambda$0$Type_2_classLit = createForClass('java.util.stream', 'StreamImpl/MapToObjSpliterator/lambda$0$Type', 1093); function StreamImpl$SkipSpliterator(original){ Spliterators$AbstractSpliterator.call(this, original.hasCharacteristics(64)?max_1(0, sub_2(original.estimateSize_0(), 1)):$intern_21, original.characteristics_0()); this.skip = 1; this.original = original; } defineClass(1092, 500, $intern_18, StreamImpl$SkipSpliterator); _.tryAdvance = function tryAdvance_18(action){ while (gt(this.skip, 0)) { if (!this.original.tryAdvance(new StreamImpl$SkipSpliterator$lambda$0$Type)) { return false; } this.skip = sub_2(this.skip, 1); } return this.original.tryAdvance(action); } ; _.skip = 0; var Ljava_util_stream_StreamImpl$SkipSpliterator_2_classLit = createForClass('java.util.stream', 'StreamImpl/SkipSpliterator', 1092); function StreamImpl$SkipSpliterator$lambda$0$Type(){ } defineClass(1097, 1, $intern_19, StreamImpl$SkipSpliterator$lambda$0$Type); _.accept = function accept_36(arg0){ } ; var Ljava_util_stream_StreamImpl$SkipSpliterator$lambda$0$Type_2_classLit = createForClass('java.util.stream', 'StreamImpl/SkipSpliterator/lambda$0$Type', 1097); function $accept_1(this$static, value_0){ this$static.value_0 = value_0; } function StreamImpl$ValueConsumer(){ } defineClass(626, 1, $intern_19, StreamImpl$ValueConsumer); _.accept = function accept_37(value_0){ $accept_1(this, value_0); } ; var Ljava_util_stream_StreamImpl$ValueConsumer_2_classLit = createForClass('java.util.stream', 'StreamImpl/ValueConsumer', 626); function StreamImpl$lambda$0$Type(){ } defineClass(1098, 1, $intern_19, StreamImpl$lambda$0$Type); _.accept = function accept_38(arg0){ $clinit_StreamImpl(); } ; var Ljava_util_stream_StreamImpl$lambda$0$Type_2_classLit = createForClass('java.util.stream', 'StreamImpl/lambda$0$Type', 1098); function StreamImpl$lambda$1$Type(){ } defineClass(1099, 1, $intern_19, StreamImpl$lambda$1$Type); _.accept = function accept_39(arg0){ $clinit_StreamImpl(); } ; var Ljava_util_stream_StreamImpl$lambda$1$Type_2_classLit = createForClass('java.util.stream', 'StreamImpl/lambda$1$Type', 1099); function StreamImpl$lambda$4$Type(collector_0){ this.collector_0 = collector_0; } defineClass(1100, 1, {}, StreamImpl$lambda$4$Type); _.apply_3 = function apply_35(arg0, arg1){ return lambda$4_0(this.collector_0, arg0, arg1); } ; var Ljava_util_stream_StreamImpl$lambda$4$Type_2_classLit = createForClass('java.util.stream', 'StreamImpl/lambda$4$Type', 1100); function StreamImpl$lambda$5$Type(consumer_0, accumulator_1){ this.consumer_0 = consumer_0; this.accumulator_1 = accumulator_1; } defineClass(1101, 1, $intern_19, StreamImpl$lambda$5$Type); _.accept = function accept_40(arg0){ lambda$5(this.consumer_0, this.accumulator_1, arg0); } ; var Ljava_util_stream_StreamImpl$lambda$5$Type_2_classLit = createForClass('java.util.stream', 'StreamImpl/lambda$5$Type', 1101); function TerminatableStream$lambda$0$Type(throwables_0){ this.throwables_0 = throwables_0; } defineClass(1107, 1, $intern_19, TerminatableStream$lambda$0$Type); _.accept = function accept_41(arg0){ lambda$0_3(this.throwables_0, castTo(arg0, 380)); } ; var Ljava_util_stream_TerminatableStream$lambda$0$Type_2_classLit = createForClass('java.util.stream', 'TerminatableStream/lambda$0$Type', 1107); function clone_0(array){ var result; result = array.slice(); return stampJavaTypeInfo_0(result, array); } function copy_0(src_0, srcOfs, dest, destOfs, len, overwrite){ var batchEnd, batchStart, destArray, end, spliceArgs; if (len == 0) { return; } if (maskUndefined(src_0) === maskUndefined(dest)) { src_0 = src_0.slice(srcOfs, srcOfs + len); srcOfs = 0; } destArray = dest; for (batchStart = srcOfs , end = srcOfs + len; batchStart < end;) { batchEnd = $wnd.Math.min(batchStart + 10000, end); len = batchEnd - batchStart; spliceArgs = src_0.slice(batchStart, batchEnd); spliceArgs.splice(0, 0, destOfs, overwrite?len:0); Array.prototype.splice.apply(destArray, spliceArgs); batchStart = batchEnd; destOfs += len; } } function createFrom(array, length_0){ return stampJavaTypeInfo_1(new Array(length_0), array); } function insertTo(array, index_0, value_0){ array.splice(index_0, 0, value_0); } function insertTo_0(array, index_0, values){ copy_0(values, 0, array, index_0, values.length, false); } function push_1(array, o){ array.push(o); } function removeFrom(array, index_0, deleteCount){ array.splice(index_0, deleteCount); } function setAt(array, index_0, value_0){ var originalValue; originalValue = array[index_0]; array[index_0] = value_0; return originalValue; } function setLength(array, length_0){ array.length = length_0; } function sort_9(array, fn){ array.sort(fn); } defineClass(2142, 1, {}); function stampJavaTypeInfo_1(array, referenceType){ return stampJavaTypeInfo_0(array, referenceType); } function $groupStart(msg, expanded){ (!expanded && console.groupCollapsed != null?console.groupCollapsed:console.group != null?console.group:console.log).call(console, msg); } function $log_0(level, message){ var logFn; logFn = console[level]; logFn.call(console, message); } function $log_1(this$static, level, t, label_0, expanded){ var cause, suppressed, suppressed$array, suppressed$index, suppressed$max; $groupStart(label_0 + $toString_4(t, t.getMessage()), expanded); $log_0(level, getBackingErrorStack(t)); cause = t.cause_0; !!cause && $log_1(this$static, level, cause, 'Caused by: ', false); for (suppressed$array = (t.suppressedExceptions == null && (t.suppressedExceptions = initUnidimensionalArray(Ljava_lang_Throwable_2_classLit, $intern_16, 82, 0, 0, 1)) , t.suppressedExceptions) , suppressed$index = 0 , suppressed$max = suppressed$array.length; suppressed$index < suppressed$max; ++suppressed$index) { suppressed = suppressed$array[suppressed$index]; $log_1(this$static, level, suppressed, 'Suppressed: ', false); } console.groupEnd != null && console.groupEnd.call(console); } function ConsoleLogger(){ } function getBackingErrorStack(t){ var backingError = t.backingJsObject; function stringify(fnStack){ if (!fnStack || fnStack.length == 0) { return ''; } return '\t' + fnStack.join('\n\t'); } return backingError && (backingError.stack || stringify(t['fnStack'])); } defineClass(2014, 1, {}, ConsoleLogger); var Ljavaemul_internal_ConsoleLogger_2_classLit = createForClass('javaemul.internal', 'ConsoleLogger', 2014); function getIdentityHashCode(o){ switch (typeof(o)) { case 'string': return $hashCode_2(o); case 'number': return $hashCode_1(o); case 'boolean': return $hashCode_0(o); default:return o == null?0:getObjectIdentityHashCode(o); } } function getObjectIdentityHashCode(o){ return o.$H || (o.$H = ++nextHash); } var nextHash = 0; function checkCriticalArgument(expression){ if (!expression) { throw toJs(new IllegalArgumentException); } } function checkCriticalArgument_0(expression, errorMessage){ if (!expression) { throw toJs(new IllegalArgumentException_0(errorMessage)); } } function checkCriticalArrayBounds_0(start_0, end, length_0){ if (start_0 > end) { throw toJs(new IllegalArgumentException_0('fromIndex: ' + start_0 + ' > toIndex: ' + end)); } if (start_0 < 0 || end > length_0) { throw toJs(new ArrayIndexOutOfBoundsException_0('fromIndex: ' + start_0 + ', toIndex: ' + end + ', length: ' + length_0)); } } function checkCriticalArraySize(size_0){ if (size_0 < 0) { throw toJs(new NegativeArraySizeException('Negative array size: ' + size_0)); } } function checkCriticalArrayType(expression){ if (!expression) { throw toJs(new ArrayStoreException); } } function checkCriticalArrayType_0(expression, errorMessage){ if (!expression) { throw toJs(new ArrayStoreException_0(errorMessage)); } } function checkCriticalConcurrentModification(currentModCount, recordedModCount){ if (currentModCount != recordedModCount) { throw toJs(new ConcurrentModificationException); } } function checkCriticalElement(expression){ if (!expression) { throw toJs(new NoSuchElementException); } } function checkCriticalElementIndex(index_0, size_0){ if (index_0 < 0 || index_0 >= size_0) { throw toJs(new IndexOutOfBoundsException_0('Index: ' + index_0 + ', Size: ' + size_0)); } } function checkCriticalNotNull(reference){ if (reference == null) { throw toJs(new NullPointerException); } return reference; } function checkCriticalNotNull_0(reference, errorMessage){ if (reference == null) { throw toJs(new NullPointerException_0(errorMessage)); } } function checkCriticalPositionIndex(index_0, size_0){ if (index_0 < 0 || index_0 > size_0) { throw toJs(new IndexOutOfBoundsException_0('Index: ' + index_0 + ', Size: ' + size_0)); } } function checkCriticalPositionIndexes(start_0, end, size_0){ if (start_0 < 0 || end > size_0) { throw toJs(new IndexOutOfBoundsException_0('fromIndex: ' + start_0 + ', toIndex: ' + end + ', size: ' + size_0)); } if (start_0 > end) { throw toJs(new IllegalArgumentException_0('fromIndex: ' + start_0 + ' > toIndex: ' + end)); } } function checkCriticalState(expression){ if (!expression) { throw toJs(new IllegalStateException); } } function checkCriticalState_0(expression, errorMessage){ if (!expression) { throw toJs(new IllegalStateException_0(errorMessage)); } } function checkCriticalStringBounds(start_0, end, length_0){ if (start_0 < 0 || end > length_0 || end < start_0) { throw toJs(new StringIndexOutOfBoundsException('fromIndex: ' + start_0 + ', toIndex: ' + end + ', length: ' + length_0)); } } function checkCriticalStringElementIndex(index_0, size_0){ if (index_0 < 0 || index_0 >= size_0) { throw toJs(new StringIndexOutOfBoundsException('Index: ' + index_0 + ', Size: ' + size_0)); } } function checkCriticalType(expression){ if (!expression) { throw toJs(new ClassCastException_0(null)); } } defineClass(2134, 1, {}); function fromBits_0(lowBits, highBits){ var highBitsLong, lowBitsLong; lowBitsLong = and_0(lowBits, $intern_69); highBitsLong = shl_0(highBits, 32); return or_0(highBitsLong, lowBitsLong); } function triangulate(vertices){ var bottomright, boundary, c, i, invalidTriangles, onBoundary, other, other$iterator, sa, sb, sc, size_0, superTriangle, tEdge, tEdge$iterator, tEdge$iterator0, tEdges, topleft, triangle, triangle$iterator, triangle$iterator0, triangulation, v, v$iterator, vertex, vertex$iterator; topleft = new KVector_1($intern_60, $intern_60); bottomright = new KVector_1($intern_61, $intern_61); for (v$iterator = new ArrayList$1(vertices); v$iterator.i < v$iterator.this$01.array.length;) { v = castTo($next_6(v$iterator), 8); topleft.x_0 = $wnd.Math.min(topleft.x_0, v.x_0); topleft.y_0 = $wnd.Math.min(topleft.y_0, v.y_0); bottomright.x_0 = $wnd.Math.max(bottomright.x_0, v.x_0); bottomright.y_0 = $wnd.Math.max(bottomright.y_0, v.y_0); } size_0 = new KVector_1(bottomright.x_0 - topleft.x_0, bottomright.y_0 - topleft.y_0); sa = new KVector_1(topleft.x_0 - 50, topleft.y_0 - size_0.x_0 - 50); sb = new KVector_1(topleft.x_0 - 50, bottomright.y_0 + size_0.x_0 + 50); sc = new KVector_1(bottomright.x_0 + size_0.y_0 / 2 + 50, topleft.y_0 + size_0.y_0 / 2); superTriangle = new TTriangle(sa, sb, sc); triangulation = new HashSet; invalidTriangles = new ArrayList; boundary = new ArrayList; triangulation.map_0.put(superTriangle, triangulation); for (vertex$iterator = new ArrayList$1(vertices); vertex$iterator.i < vertex$iterator.this$01.array.length;) { vertex = castTo($next_6(vertex$iterator), 8); invalidTriangles.array.length = 0; for (triangle$iterator0 = triangulation.map_0.keySet_0().iterator_0(); triangle$iterator0.hasNext_0();) { triangle = castTo(triangle$iterator0.next_1(), 317); c = triangle.circumcenter; $distance_0(c, triangle.a); fuzzyCompare($distance_0(triangle.circumcenter, vertex), $distance_0(triangle.circumcenter, triangle.a)) < 0 && (push_1(invalidTriangles.array, triangle) , true); } boundary.array.length = 0; for (triangle$iterator = new ArrayList$1(invalidTriangles); triangle$iterator.i < triangle$iterator.this$01.array.length;) { triangle = castTo($next_6(triangle$iterator), 317); for (tEdge$iterator0 = new ArrayList$1(triangle.tEdges); tEdge$iterator0.i < tEdge$iterator0.this$01.array.length;) { tEdge = castTo($next_6(tEdge$iterator0), 177); onBoundary = true; for (other$iterator = new ArrayList$1(invalidTriangles); other$iterator.i < other$iterator.this$01.array.length;) { other = castTo($next_6(other$iterator), 317); other != triangle && (equals_57(tEdge, $get_11(other.tEdges, 0)) || equals_57(tEdge, $get_11(other.tEdges, 1)) || equals_57(tEdge, $get_11(other.tEdges, 2))) && (onBoundary = false); } onBoundary && (push_1(boundary.array, tEdge) , true); } } $removeAll_1(triangulation, invalidTriangles); $forEach_0(triangulation, new BowyerWatsonTriangulation$lambda$0$Type); for (tEdge$iterator = new ArrayList$1(boundary); tEdge$iterator.i < tEdge$iterator.this$01.array.length;) { tEdge = castTo($next_6(tEdge$iterator), 177); $add_6(triangulation, new TTriangle(vertex, tEdge.u, tEdge.v)); } } tEdges = new HashSet; $forEach_0(triangulation, new BowyerWatsonTriangulation$lambda$1$Type(tEdges)); i = tEdges.map_0.keySet_0().iterator_0(); while (i.hasNext_0()) { tEdge = castTo(i.next_1(), 177); ($contains_9(superTriangle, tEdge.u) || $contains_9(superTriangle, tEdge.v)) && i.remove(); } $forEach_0(tEdges, new BowyerWatsonTriangulation$lambda$2$Type); return tEdges; } function BowyerWatsonTriangulation$lambda$0$Type(){ } defineClass(1830, 1, $intern_19, BowyerWatsonTriangulation$lambda$0$Type); _.accept = function accept_42(arg0){ castTo(arg0, 317); } ; var Lorg_eclipse_elk_alg_common_BowyerWatsonTriangulation$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.common', 'BowyerWatsonTriangulation/lambda$0$Type', 1830); function BowyerWatsonTriangulation$lambda$1$Type(tEdges_0){ this.tEdges_0 = tEdges_0; } defineClass(1831, 1, $intern_19, BowyerWatsonTriangulation$lambda$1$Type); _.accept = function accept_43(arg0){ $addAll(this.tEdges_0, castTo(arg0, 317).tEdges); } ; var Lorg_eclipse_elk_alg_common_BowyerWatsonTriangulation$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.common', 'BowyerWatsonTriangulation/lambda$1$Type', 1831); function BowyerWatsonTriangulation$lambda$2$Type(){ } defineClass(1832, 1, $intern_19, BowyerWatsonTriangulation$lambda$2$Type); _.accept = function accept_44(arg0){ castTo(arg0, 177); } ; var Lorg_eclipse_elk_alg_common_BowyerWatsonTriangulation$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.common', 'BowyerWatsonTriangulation/lambda$2$Type', 1832); function createSpanningTree(tEdges, root, costFunction){ var edge, edge$iterator, edge$iterator0, edgeList, edges, minST, nextEdge, nextNode, nodeInTree, subTree, treeNodes, weight; weight = new HashMap; for (edge$iterator0 = tEdges.map_0.keySet_0().iterator_0(); edge$iterator0.hasNext_0();) { edge = castTo(edge$iterator0.next_1(), 177); $put_6(weight, edge, costFunction.cost(edge)); } edgeList = (checkNotNull(tEdges) , tEdges?new ArrayList_1(tEdges):newArrayList_0(tEdges.map_0.keySet_0().iterator_0())); $sort(edgeList, new NaiveMinST$lambda$0$Type(weight)); edges = newLinkedHashSet(edgeList); minST = new Tree(root); treeNodes = new HashMap; $put_9(treeNodes.hashCodeMap, root, minST); while (edges.map_0.size_1() != 0) { nextEdge = null; nextNode = null; nodeInTree = null; for (edge$iterator = edges.map_0.keySet_0().iterator_0(); edge$iterator.hasNext_0();) { edge = castTo(edge$iterator.next_1(), 177); if ($doubleValue(castToDouble(getEntryValueOrNull($getEntry_0(weight.hashCodeMap, edge)))) <= $intern_60) { if ($containsKey_3(treeNodes, edge.u) && !$containsKey_3(treeNodes, edge.v)) { nextNode = edge.v; nodeInTree = edge.u; nextEdge = edge; break; } if ($containsKey_3(treeNodes, edge.v)) { if (!$containsKey_3(treeNodes, edge.u)) { nextNode = edge.u; nodeInTree = edge.v; nextEdge = edge; break; } } } } if (!nextEdge) { break; } subTree = new Tree(nextNode); $add_3(castTo(getEntryValueOrNull($getEntry_0(treeNodes.hashCodeMap, nodeInTree)), 225).children, subTree); $put_9(treeNodes.hashCodeMap, nextNode, subTree); edges.map_0.remove_0(nextEdge) != null; } return minST; } function lambda$0_6(weight_0, e1_1, e2_2){ return $compareTo_4(castToDouble(getEntryValueOrNull($getEntry_0(weight_0.hashCodeMap, e1_1))), castToDouble(getEntryValueOrNull($getEntry_0(weight_0.hashCodeMap, e2_2)))); } function NaiveMinST$lambda$0$Type(weight_0){ this.weight_0 = weight_0; } defineClass(1827, 1, $intern_88, NaiveMinST$lambda$0$Type); _.compare_1 = function compare_12(arg0, arg1){ return lambda$0_6(this.weight_0, castTo(arg0, 177), castTo(arg1, 177)); } ; _.equals_0 = function equals_61(other){ return this === other; } ; _.reversed = function reversed_4(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_common_NaiveMinST$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.common', 'NaiveMinST/lambda$0$Type', 1827); function $execute(this$static){ var calcu; sortPortLists(this$static.adapter); calculateLabelAndNodeSizes(this$static.adapter); calcu = new NodeMarginCalculator(this$static.adapter); $process(calcu); } function NodeMicroLayout(adapter){ this.adapter = adapter; } defineClass(449, 1, {}, NodeMicroLayout); var Lorg_eclipse_elk_alg_common_NodeMicroLayout_2_classLit = createForClass('org.eclipse.elk.alg.common', 'NodeMicroLayout', 449); function TEdge(u, v){ this.u = u; this.v = v; } defineClass(177, 1, {177:1}, TEdge); _.equals_0 = function equals_62(obj){ var other; if (instanceOf(obj, 177)) { other = castTo(obj, 177); return equals_57(this.u, other.u) && equals_57(this.v, other.v) || equals_57(this.u, other.v) && equals_57(this.v, other.u); } else { return false; } } ; _.hashCode_1 = function hashCode_59(){ return hashCode_55(this.u) + hashCode_55(this.v); } ; var Lorg_eclipse_elk_alg_common_TEdge_2_classLit = createForClass('org.eclipse.elk.alg.common', 'TEdge', 177); function $contains_9(this$static, vertex){ return equals_57(vertex, $get_11(this$static.vertices, 0)) || equals_57(vertex, $get_11(this$static.vertices, 1)) || equals_57(vertex, $get_11(this$static.vertices, 2)); } function TTriangle(a, b, c){ var ab, ac, bc, e, f, g, px, py; this.a = a; this.b = b; this.c = c; this.tEdges = newArrayList_1(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_TEdge_2_classLit, 1), $intern_2, 177, 0, [new TEdge(a, b), new TEdge(b, c), new TEdge(c, a)])); this.vertices = newArrayList_1(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [a, b, c])); this.circumcenter = (ab = $sub_0($clone_1(this.b), this.a) , ac = $sub_0($clone_1(this.c), this.a) , bc = $sub_0($clone_1(this.c), this.b) , e = ab.x_0 * (this.a.x_0 + this.b.x_0) + ab.y_0 * (this.a.y_0 + this.b.y_0) , f = ac.x_0 * (this.a.x_0 + this.c.x_0) + ac.y_0 * (this.a.y_0 + this.c.y_0) , g = 2 * (ab.x_0 * bc.y_0 - ab.y_0 * bc.x_0) , px = (ac.y_0 * e - ab.y_0 * f) / g , py = (ab.x_0 * f - ac.x_0 * e) / g , new KVector_1(px, py)); } defineClass(317, 1, {317:1}, TTriangle); _.equals_0 = function equals_63(obj){ var other; if (instanceOf(obj, 317)) { other = castTo(obj, 317); return $contains_9(this, other.a) && $contains_9(this, other.b) && $contains_9(this, other.c); } else { return false; } } ; _.hashCode_1 = function hashCode_60(){ return hashCode_55(this.a) + hashCode_55(this.b) + hashCode_55(this.c); } ; var Lorg_eclipse_elk_alg_common_TTriangle_2_classLit = createForClass('org.eclipse.elk.alg.common', 'TTriangle', 317); function Tree(n){ this.node = n; this.children = new ArrayList; } defineClass(225, 1, {225:1}, Tree); var Lorg_eclipse_elk_alg_common_Tree_2_classLit = createForClass('org.eclipse.elk.alg.common', 'Tree', 225); function $go(this$static){ var h, h$iterator, p, p$iterator; $clinit_Collections(); $sort(this$static.points, this$static.comparator); for (p$iterator = new ArrayList$1(this$static.points); p$iterator.i < p$iterator.this$01.array.length;) { p = $next_6(p$iterator); for (h$iterator = new ArrayList$1(this$static.eventHandlers); h$iterator.i < h$iterator.this$01.array.length;) { h = castTo($next_6(h$iterator), 693); h.handle(p); } } } function Scanline(points, comparator, eventHandlers){ this.comparator = comparator; this.points = points; this.eventHandlers = (checkNotNull(eventHandlers) , new ArrayList_1(eventHandlers)); } function execute(points, comparator, eventHandlers){ var copy; copy = (checkNotNull(points) , new ArrayList_1(points)); $go(new Scanline(copy, comparator, eventHandlers)); } defineClass(1218, 1, {}, Scanline); var Lorg_eclipse_elk_alg_common_compaction_Scanline_2_classLit = createForClass('org.eclipse.elk.alg.common.compaction', 'Scanline', 1218); var Lorg_eclipse_elk_alg_common_compaction_Scanline$EventHandler_2_classLit = createForInterface('org.eclipse.elk.alg.common.compaction', 'Scanline/EventHandler'); function $supports(this$static, direction){ return $containsEnum(this$static.supportedDirections, direction); } function CGraph(supportedDirections){ this.cNodes = new ArrayList; this.cGroups = new ArrayList; this.predefinedHorizontalConstraints = new ArrayList; this.predefinedVerticalConstraints = new ArrayList; this.supportedDirections = supportedDirections; } defineClass(1758, 1, {}, CGraph); var Lorg_eclipse_elk_alg_common_compaction_oned_CGraph_2_classLit = createForClass('org.eclipse.elk.alg.common.compaction.oned', 'CGraph', 1758); function $addCNode(this$static, cNode){ if (cNode.cGroup) { throw toJs(new RuntimeException_0('CNode belongs to another CGroup.')); } $add_6(this$static.cNodes, cNode); cNode.cGroup = this$static; !this$static.reference && (this$static.reference = cNode); } function CGroup(){ this.cNodes = new LinkedHashSet; this.incomingConstraints = new HashSet; this.outDegree = 0; this.outDegreeReal = 0; } defineClass(316, 1, {316:1}, CGroup); _.delta = 0; _.deltaNormalized = 0; _.id_0 = 0; _.outDegree = 0; _.outDegreeReal = 0; _.startPos = $intern_61; var Lorg_eclipse_elk_alg_common_compaction_oned_CGroup_2_classLit = createForClass('org.eclipse.elk.alg.common.compaction.oned', 'CGroup', 316); function $create(this$static, graph){ $add_3(graph.cGroups, this$static.group_0); return this$static.group_0; } function $master(this$static, master){ this$static.group_0.master = master; return this$static; } function $nodes(this$static, nodes){ var n, n$array, n$index, n$max; for (n$array = nodes , n$index = 0 , n$max = n$array.length; n$index < n$max; ++n$index) { n = n$array[n$index]; $addCNode(this$static.group_0, n); } return this$static; } function CGroup$CGroupBuilder(){ this.group_0 = new CGroup; } defineClass(830, 1, {}, CGroup$CGroupBuilder); var Lorg_eclipse_elk_alg_common_compaction_oned_CGroup$CGroupBuilder_2_classLit = createForClass('org.eclipse.elk.alg.common.compaction.oned', 'CGroup/CGroupBuilder', 830); function CNode(){ this.cGroupOffset = new KVector; this.constraints = new ArrayList; } defineClass(60, 1, {60:1}, CNode); _.toString_0 = function toString_76(){ var number; if (this.toStringDelegate) { return castToString(this.toStringDelegate.apply_0(this)); } return $ensureNamesAreInitialized(Lorg_eclipse_elk_alg_common_compaction_oned_CNode_2_classLit) , Lorg_eclipse_elk_alg_common_compaction_oned_CNode_2_classLit.typeName + '@' + (number = getObjectIdentityHashCode(this) >>> 0 , number.toString(16)); } ; _.id_0 = 0; _.startPos = $intern_61; var Lorg_eclipse_elk_alg_common_compaction_oned_CNode_2_classLit = createForClass('org.eclipse.elk.alg.common.compaction.oned', 'CNode', 60); function $create_0(this$static, graph){ $add_3(graph.cNodes, this$static.node); return this$static.node; } function $hitbox(this$static, hitbox){ this$static.node.hitbox = hitbox; return this$static; } function $origin(this$static, origin_0){ this$static.node.origin_0 = origin_0; return this$static; } function $toStringDelegate(this$static, delegate){ this$static.node.toStringDelegate = delegate; return this$static; } function CNode$CNodeBuilder(){ this.node = new CNode; } defineClass(829, 1, {}, CNode$CNodeBuilder); var Lorg_eclipse_elk_alg_common_compaction_oned_CNode$CNodeBuilder_2_classLit = createForClass('org.eclipse.elk.alg.common.compaction.oned', 'CNode/CNodeBuilder', 829); function eq_0(d1, d2){ return $clinit_DoubleMath() , checkNonNegative($intern_42) , $wnd.Math.abs(d1 - d2) <= $intern_42 || d1 == d2 || isNaN(d1) && isNaN(d2); } function gt_0(d1, d2){ return $clinit_DoubleMath() , $clinit_DoubleMath() , checkNonNegative($intern_42) , ($wnd.Math.abs(d1 - d2) <= $intern_42 || d1 == d2 || isNaN(d1) && isNaN(d2)?0:d1 < d2?-1:d1 > d2?1:compare_0(isNaN(d1), isNaN(d2))) > 0; } function le(d1, d2){ return $clinit_DoubleMath() , $clinit_DoubleMath() , checkNonNegative($intern_42) , ($wnd.Math.abs(d1 - d2) <= $intern_42 || d1 == d2 || isNaN(d1) && isNaN(d2)?0:d1 < d2?-1:d1 > d2?1:compare_0(isNaN(d1), isNaN(d2))) <= 0; } function lt_0(d1, d2){ return $clinit_DoubleMath() , $clinit_DoubleMath() , checkNonNegative($intern_42) , ($wnd.Math.abs(d1 - d2) <= $intern_42 || d1 == d2 || isNaN(d1) && isNaN(d2)?0:d1 < d2?-1:d1 > d2?1:compare_0(isNaN(d1), isNaN(d2))) < 0; } function $clinit_ISpacingsHandler(){ $clinit_ISpacingsHandler = emptyMethod; DEFAULT_SPACING_HANDLER = new ISpacingsHandler$1; } var DEFAULT_SPACING_HANDLER; function ISpacingsHandler$1(){ } defineClass(1590, 1, {}, ISpacingsHandler$1); _.getHorizontalSpacing = function getHorizontalSpacing(cNode1, cNode2){ return 0; } ; _.getVerticalSpacing = function getVerticalSpacing(cNode1, cNode2){ return 0; } ; var Lorg_eclipse_elk_alg_common_compaction_oned_ISpacingsHandler$1_2_classLit = createForClass('org.eclipse.elk.alg.common.compaction.oned', 'ISpacingsHandler/1', 1590); function LongestPathCompaction(){ } defineClass(1853, 1, {}, LongestPathCompaction); _.compact = function compact(compactor){ var cNode, cNode$iterator, cNode$iterator0, diff, group, group$iterator, incNode, incNode$iterator, minStartPos, node, node$iterator, node$iterator0, sinks, spacing, suggestedX; minStartPos = $intern_60; for (cNode$iterator0 = new ArrayList$1(compactor.cGraph.cNodes); cNode$iterator0.i < cNode$iterator0.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator0), 60); minStartPos = $wnd.Math.min(minStartPos, cNode.cGroup.reference.hitbox.x_0 + cNode.cGroupOffset.x_0); } sinks = new LinkedList; for (group$iterator = new ArrayList$1(compactor.cGraph.cGroups); group$iterator.i < group$iterator.this$01.array.length;) { group = castTo($next_6(group$iterator), 316); group.startPos = minStartPos; group.outDegree == 0 && ($addNode_0(sinks, group, sinks.tail.prev, sinks.tail) , true); } while (sinks.size_0 != 0) { group = castTo(sinks.size_0 == 0?null:(checkCriticalElement(sinks.size_0 != 0) , $removeNode_0(sinks, sinks.header.next_0)), 316); diff = group.reference.hitbox.x_0; for (node$iterator0 = group.cNodes.map_0.keySet_0().iterator_0(); node$iterator0.hasNext_0();) { node = castTo(node$iterator0.next_1(), 60); suggestedX = group.startPos + node.cGroupOffset.x_0; !$isLocked(compactor, group, compactor.direction) || node.hitbox.x_0 < suggestedX?(node.startPos = suggestedX):(node.startPos = node.hitbox.x_0); } diff -= group.reference.startPos; group.delta += diff; compactor.direction == ($clinit_Direction_0() , RIGHT_6) || compactor.direction == DOWN_1?(group.deltaNormalized += diff):(group.deltaNormalized -= diff); for (node$iterator = group.cNodes.map_0.keySet_0().iterator_0(); node$iterator.hasNext_0();) { node = castTo(node$iterator.next_1(), 60); for (incNode$iterator = node.constraints.iterator_0(); incNode$iterator.hasNext_0();) { incNode = castTo(incNode$iterator.next_1(), 60); $isHorizontal(compactor.direction)?(spacing = compactor.spacingsHandler.getHorizontalSpacing(node, incNode)):(spacing = compactor.spacingsHandler.getVerticalSpacing(node, incNode)); incNode.cGroup.startPos = $wnd.Math.max(incNode.cGroup.startPos, node.startPos + node.hitbox.width_0 + spacing - incNode.cGroupOffset.x_0); $isLocked_0(compactor, incNode, compactor.direction) && (incNode.cGroup.startPos = $wnd.Math.max(incNode.cGroup.startPos, incNode.hitbox.x_0 - incNode.cGroupOffset.x_0)); --incNode.cGroup.outDegree; incNode.cGroup.outDegree == 0 && $add_7(sinks, incNode.cGroup); } } } for (cNode$iterator = new ArrayList$1(compactor.cGraph.cNodes); cNode$iterator.i < cNode$iterator.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator), 60); cNode.hitbox.x_0 = cNode.startPos; } } ; var Lorg_eclipse_elk_alg_common_compaction_oned_LongestPathCompaction_2_classLit = createForClass('org.eclipse.elk.alg.common.compaction.oned', 'LongestPathCompaction', 1853); function $clinit_OneDimensionalCompactor(){ $clinit_OneDimensionalCompactor = emptyMethod; LONGEST_PATH_COMPACTION = new LongestPathCompaction; SCANLINE_CONSTRAINTS = new ScanlineConstraintCalculator; QUADRATIC_CONSTRAINTS = new QuadraticConstraintCalculation; } function $calculateConstraints(this$static){ var cNode, cNode$iterator, cstrs; for (cNode$iterator = new ArrayList$1(this$static.cGraph.cNodes); cNode$iterator.i < cNode$iterator.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator), 60); cNode.constraints.clear_0(); } $isHorizontal(this$static.direction)?(cstrs = this$static.cGraph.predefinedHorizontalConstraints):(cstrs = this$static.cGraph.predefinedVerticalConstraints); $forEach_1(cstrs, new OneDimensionalCompactor$lambda$0$Type(this$static)); this$static.constraintAlgorithm.calculateConstraints(this$static); $calculateConstraintsForCGroups(this$static); } function $calculateConstraintsForCGroups(this$static){ var cNode, cNode$iterator, group, group$iterator, group$iterator0, inc, inc$iterator; for (group$iterator0 = new ArrayList$1(this$static.cGraph.cGroups); group$iterator0.i < group$iterator0.this$01.array.length;) { group = castTo($next_6(group$iterator0), 316); group.outDegree = 0; group.outDegreeReal = 0; group.incomingConstraints.map_0.clear_0(); } for (group$iterator = new ArrayList$1(this$static.cGraph.cGroups); group$iterator.i < group$iterator.this$01.array.length;) { group = castTo($next_6(group$iterator), 316); for (cNode$iterator = group.cNodes.map_0.keySet_0().iterator_0(); cNode$iterator.hasNext_0();) { cNode = castTo(cNode$iterator.next_1(), 60); for (inc$iterator = cNode.constraints.iterator_0(); inc$iterator.hasNext_0();) { inc = castTo(inc$iterator.next_1(), 60); if (inc.cGroup != group) { $add_6(group.incomingConstraints, inc); ++inc.cGroup.outDegree; ++inc.cGroup.outDegreeReal; } } } } } function $calculateGroupOffsets(this$static){ var group, group$iterator, n, n$iterator, n$iterator0; for (group$iterator = new ArrayList$1(this$static.cGraph.cGroups); group$iterator.i < group$iterator.this$01.array.length;) { group = castTo($next_6(group$iterator), 316); group.reference = null; for (n$iterator0 = group.cNodes.map_0.keySet_0().iterator_0(); n$iterator0.hasNext_0();) { n = castTo(n$iterator0.next_1(), 60); $reset_5(n.cGroupOffset); (!group.reference || n.hitbox.x_0 < group.reference.hitbox.x_0) && (group.reference = n); } for (n$iterator = group.cNodes.map_0.keySet_0().iterator_0(); n$iterator.hasNext_0();) { n = castTo(n$iterator.next_1(), 60); n.cGroupOffset.x_0 = n.hitbox.x_0 - group.reference.hitbox.x_0; n.cGroupOffset.y_0 = n.hitbox.y_0 - group.reference.hitbox.y_0; } } return this$static; } function $changeDirection(this$static, dir_0){ var oldDirection; if (this$static.finished) { throw toJs(new IllegalStateException_0(($ensureNamesAreInitialized(Lorg_eclipse_elk_alg_common_compaction_oned_OneDimensionalCompactor_2_classLit) , 'The ' + Lorg_eclipse_elk_alg_common_compaction_oned_OneDimensionalCompactor_2_classLit.simpleName + ' instance has been finished already.'))); } if (!$supports(this$static.cGraph, dir_0)) { throw toJs(new RuntimeException_0('The direction ' + dir_0 + ' is not supported by the CGraph instance.')); } if (dir_0 == this$static.direction) { return this$static; } oldDirection = this$static.direction; this$static.direction = dir_0; switch (oldDirection.ordinal) { case 0: switch (dir_0.ordinal) { case 2: $calculateConstraints(this$static); break; case 1: $mirrorHitboxes(this$static); $calculateConstraints(this$static); break; case 4: $transposeHitboxes(this$static); $calculateConstraints(this$static); break; case 3: $transposeHitboxes(this$static); $mirrorHitboxes(this$static); $calculateConstraints(this$static); } break; case 2: switch (dir_0.ordinal) { case 1: $mirrorHitboxes(this$static); $reverseConstraints(this$static); break; case 4: $transposeHitboxes(this$static); $calculateConstraints(this$static); break; case 3: $transposeHitboxes(this$static); $mirrorHitboxes(this$static); $calculateConstraints(this$static); } break; case 1: switch (dir_0.ordinal) { case 2: $mirrorHitboxes(this$static); $reverseConstraints(this$static); break; case 4: $mirrorHitboxes(this$static); $transposeHitboxes(this$static); $calculateConstraints(this$static); break; case 3: $mirrorHitboxes(this$static); $transposeHitboxes(this$static); $mirrorHitboxes(this$static); $calculateConstraints(this$static); } break; case 4: switch (dir_0.ordinal) { case 2: $transposeHitboxes(this$static); $calculateConstraints(this$static); break; case 1: $transposeHitboxes(this$static); $mirrorHitboxes(this$static); $calculateConstraints(this$static); break; case 3: $mirrorHitboxes(this$static); $reverseConstraints(this$static); } break; case 3: switch (dir_0.ordinal) { case 2: $mirrorHitboxes(this$static); $transposeHitboxes(this$static); $calculateConstraints(this$static); break; case 1: $mirrorHitboxes(this$static); $transposeHitboxes(this$static); $mirrorHitboxes(this$static); $calculateConstraints(this$static); break; case 4: $mirrorHitboxes(this$static); $reverseConstraints(this$static); } } return this$static; } function $compact(this$static){ var g, g$iterator, n, n$iterator; if (this$static.finished) { throw toJs(new IllegalStateException_0(($ensureNamesAreInitialized(Lorg_eclipse_elk_alg_common_compaction_oned_OneDimensionalCompactor_2_classLit) , 'The ' + Lorg_eclipse_elk_alg_common_compaction_oned_OneDimensionalCompactor_2_classLit.simpleName + ' instance has been finished already.'))); } this$static.direction == ($clinit_Direction_0() , UNDEFINED_2) && $changeDirection(this$static, LEFT_6); for (g$iterator = new ArrayList$1(this$static.cGraph.cGroups); g$iterator.i < g$iterator.this$01.array.length;) { g = castTo($next_6(g$iterator), 316); g.outDegree = g.outDegreeReal; } for (n$iterator = new ArrayList$1(this$static.cGraph.cNodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 60); n.startPos = $intern_61; } this$static.compactionAlgorithm.compact(this$static); return this$static; } function $isLocked(this$static, group, dir_0){ var n, n$iterator; for (n$iterator = group.cNodes.map_0.keySet_0().iterator_0(); n$iterator.hasNext_0();) { n = castTo(n$iterator.next_1(), 60); if ($isLocked_0(this$static, n, dir_0)) { return true; } } return false; } function $isLocked_0(this$static, node, dir_0){ if (this$static.lockFun) { return this$static.lockFun.isLocked(node, dir_0); } return false; } function $lambda$0_5(this$static, p_0){ this$static.direction == ($clinit_Direction_0() , LEFT_6) || this$static.direction == UP_1?castTo(p_0.first, 60).constraints.add_2(castTo(p_0.second, 60)):castTo(p_0.second, 60).constraints.add_2(castTo(p_0.first, 60)); } function $mirrorHitboxes(this$static){ var cNode, cNode$iterator; for (cNode$iterator = new ArrayList$1(this$static.cGraph.cNodes); cNode$iterator.i < cNode$iterator.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator), 60); cNode.hitbox.x_0 = -cNode.hitbox.x_0 - cNode.hitbox.width_0; } $calculateGroupOffsets(this$static); } function $reverseConstraints(this$static){ var cNode, cNode$iterator, cNode$iterator0, cNode$iterator1, inc, inc$iterator, incMap; incMap = new HashMap; for (cNode$iterator0 = new ArrayList$1(this$static.cGraph.cNodes); cNode$iterator0.i < cNode$iterator0.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator0), 60); $put_6(incMap, cNode, new ArrayList); } for (cNode$iterator1 = new ArrayList$1(this$static.cGraph.cNodes); cNode$iterator1.i < cNode$iterator1.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator1), 60); cNode.startPos = $intern_61; for (inc$iterator = cNode.constraints.iterator_0(); inc$iterator.hasNext_0();) { inc = castTo(inc$iterator.next_1(), 60); castTo(getEntryValueOrNull($getEntry_0(incMap.hashCodeMap, inc)), 15).add_2(cNode); } } for (cNode$iterator = new ArrayList$1(this$static.cGraph.cNodes); cNode$iterator.i < cNode$iterator.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator), 60); cNode.constraints.clear_0(); cNode.constraints = castTo(getEntryValueOrNull($getEntry_0(incMap.hashCodeMap, cNode)), 15); } $calculateConstraintsForCGroups(this$static); } function $setCompactionAlgorithm(this$static, compactor){ this$static.compactionAlgorithm = compactor; return this$static; } function $setConstraintAlgorithm(this$static, theConstraintAlgorithm){ this$static.constraintAlgorithm = theConstraintAlgorithm; return this$static; } function $setLockFunction(this$static, fun){ this$static.lockFun = fun; return this$static; } function $setSpacingsHandler(this$static, handler){ this$static.spacingsHandler = handler; return this$static; } function $transposeHitboxes(this$static){ var cNode, cNode$iterator, tmp; for (cNode$iterator = new ArrayList$1(this$static.cGraph.cNodes); cNode$iterator.i < cNode$iterator.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator), 60); tmp = cNode.hitbox.x_0; cNode.hitbox.x_0 = cNode.hitbox.y_0; cNode.hitbox.y_0 = tmp; tmp = cNode.hitbox.width_0; cNode.hitbox.width_0 = cNode.hitbox.height; cNode.hitbox.height = tmp; tmp = cNode.cGroupOffset.x_0; cNode.cGroupOffset.x_0 = cNode.cGroupOffset.y_0; cNode.cGroupOffset.y_0 = tmp; } $calculateGroupOffsets(this$static); } function OneDimensionalCompactor(cGraph){ $clinit_OneDimensionalCompactor(); var n, n$iterator; this.compactionAlgorithm = LONGEST_PATH_COMPACTION; this.constraintAlgorithm = SCANLINE_CONSTRAINTS; this.spacingsHandler = ($clinit_ISpacingsHandler() , DEFAULT_SPACING_HANDLER); this.direction = ($clinit_Direction_0() , UNDEFINED_2); this.cGraph = cGraph; $calculateGroupOffsets(this); for (n$iterator = new ArrayList$1(cGraph.cNodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 60); !n.cGroup && $create($nodes(new CGroup$CGroupBuilder, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_compaction_oned_CNode_2_classLit, 1), $intern_2, 60, 0, [n])), cGraph); n.hitboxPreCompaction = new ElkRectangle_1(n.hitbox); } } defineClass(1756, 1, {}, OneDimensionalCompactor); _.finished = false; var LONGEST_PATH_COMPACTION, QUADRATIC_CONSTRAINTS, SCANLINE_CONSTRAINTS; var Lorg_eclipse_elk_alg_common_compaction_oned_OneDimensionalCompactor_2_classLit = createForClass('org.eclipse.elk.alg.common.compaction.oned', 'OneDimensionalCompactor', 1756); function OneDimensionalCompactor$lambda$0$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1757, 1, $intern_19, OneDimensionalCompactor$lambda$0$Type); _.accept = function accept_45(arg0){ $lambda$0_5(this.$$outer_0, castTo(arg0, 42)); } ; var Lorg_eclipse_elk_alg_common_compaction_oned_OneDimensionalCompactor$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.compaction.oned', 'OneDimensionalCompactor/lambda$0$Type', 1757); function QuadraticConstraintCalculation(){ } defineClass(1854, 1, {}, QuadraticConstraintCalculation); _.calculateConstraints = function calculateConstraints(compactor){ var cNode, cNode$iterator, cNode1, cNode1$iterator, cNode2, cNode2$iterator, spacing; for (cNode$iterator = new ArrayList$1(compactor.cGraph.cNodes); cNode$iterator.i < cNode$iterator.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator), 60); cNode.constraints.clear_0(); } for (cNode1$iterator = new ArrayList$1(compactor.cGraph.cNodes); cNode1$iterator.i < cNode1$iterator.this$01.array.length;) { cNode1 = castTo($next_6(cNode1$iterator), 60); for (cNode2$iterator = new ArrayList$1(compactor.cGraph.cNodes); cNode2$iterator.i < cNode2$iterator.this$01.array.length;) { cNode2 = castTo($next_6(cNode2$iterator), 60); if (cNode1 == cNode2) { continue; } if (!!cNode1.cGroup && cNode1.cGroup == cNode2.cGroup) { continue; } $isHorizontal(compactor.direction)?(spacing = compactor.spacingsHandler.getVerticalSpacing(cNode1, cNode2)):(spacing = compactor.spacingsHandler.getHorizontalSpacing(cNode1, cNode2)); (cNode2.hitbox.x_0 > cNode1.hitbox.x_0 || cNode1.hitbox.x_0 == cNode2.hitbox.x_0 && cNode1.hitbox.width_0 < cNode2.hitbox.width_0) && gt_0(cNode2.hitbox.y_0 + cNode2.hitbox.height + spacing, cNode1.hitbox.y_0) && lt_0(cNode2.hitbox.y_0, cNode1.hitbox.y_0 + cNode1.hitbox.height + spacing) && cNode1.constraints.add_2(cNode2); } } } ; var Lorg_eclipse_elk_alg_common_compaction_oned_QuadraticConstraintCalculation_2_classLit = createForClass('org.eclipse.elk.alg.common.compaction.oned', 'QuadraticConstraintCalculation', 1854); function $applyOr(this$static, other){ this$static.left = this$static.left | other.left; this$static.right = this$static.right | other.right; this$static.up = this$static.up | other.up; this$static.down = this$static.down | other.down; } function $get_18(this$static, direction){ switch (direction.ordinal) { case 2: return this$static.left; case 1: return this$static.right; case 4: return this$static.up; case 3: return this$static.down; default:return false; } } function $set_2(this$static, value_0, direction){ switch (direction.ordinal) { case 2: this$static.left = value_0; break; case 1: this$static.right = value_0; break; case 4: this$static.up = value_0; break; case 3: this$static.down = value_0; } } function $set_3(this$static){ this$static.left = false; this$static.right = false; this$static.up = false; this$static.down = false; } function Quadruplet(){ $set_3(this); } defineClass(529, 1, {529:1}, Quadruplet); _.down = false; _.left = false; _.right = false; _.up = false; var Lorg_eclipse_elk_alg_common_compaction_oned_Quadruplet_2_classLit = createForClass('org.eclipse.elk.alg.common.compaction.oned', 'Quadruplet', 529); function $overlap(n1, n2){ if (!n1 || !n2 || n1 == n2) { return false; } return le(n1.hitbox.x_0, n2.hitbox.x_0 + n2.hitbox.width_0) && le(n2.hitbox.x_0, n1.hitbox.x_0 + n1.hitbox.width_0); } function $sweep(this$static, filterFun){ var n, n$iterator, points; points = new ArrayList; for (n$iterator = new ArrayList$1(this$static.compactor.cGraph.cNodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 60); if (filterFun.apply_1(n)) { $add_3(points, new ScanlineConstraintCalculator$Timestamp(n, true)); $add_3(points, new ScanlineConstraintCalculator$Timestamp(n, false)); } } $reset_1(this$static.constraintsScanlineHandler); execute(points, this$static.constraintsScanlineComparator, new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_compaction_Scanline$EventHandler_2_classLit, 1), $intern_2, 693, 0, [this$static.constraintsScanlineHandler]))); } function ScanlineConstraintCalculator(){ this.constraintsScanlineComparator = new ScanlineConstraintCalculator$lambda$0$Type; this.constraintsScanlineHandler = new ScanlineConstraintCalculator$ConstraintsScanlineHandler(this); } function lambda$0_7(p1_0, p2_1){ var cmp, y1, y2; y1 = p1_0.node.hitbox.y_0; p1_0.low || (y1 += p1_0.node.hitbox.height); y2 = p2_1.node.hitbox.y_0; p2_1.low || (y2 += p2_1.node.hitbox.height); cmp = compare_4(y1, y2); if (cmp == 0) { if (!p1_0.low && p2_1.low) { return -1; } else if (!p2_1.low && p1_0.low) { return 1; } } return cmp; } defineClass(817, 1, {}, ScanlineConstraintCalculator); _.calculateConstraints = function calculateConstraints_0(theCompactor){ this.compactor = theCompactor; $sweep(this, new ScanlineConstraintCalculator$lambda$1$Type); } ; var Lorg_eclipse_elk_alg_common_compaction_oned_ScanlineConstraintCalculator_2_classLit = createForClass('org.eclipse.elk.alg.common.compaction.oned', 'ScanlineConstraintCalculator', 817); function $handle(this$static, p){ var left, right; p.low?$insert_2(this$static, p):(left = castTo($lower(this$static.intervals, p.node), 60) , !!left && left == this$static.cand[p.node.id_0] && !!left.cGroup && left.cGroup != p.node.cGroup && left.constraints.add_2(p.node) , right = castTo($higher(this$static.intervals, p.node), 60) , !!right && this$static.cand[right.id_0] == p.node && !!right.cGroup && right.cGroup != p.node.cGroup && p.node.constraints.add_2(right) , $remove_28(this$static.intervals, p.node) , undefined); } function $insert_2(this$static, p){ var right, success; success = $add_10(this$static.intervals, p.node); if (!success) { throw toJs(new IllegalStateException_0('Invalid hitboxes for scanline constraint calculation.')); } ($overlap(p.node, castTo($floor(this$static.intervals, p.node), 60)) || $overlap(p.node, castTo($ceiling(this$static.intervals, p.node), 60))) && ($clinit_System() , String.fromCharCode(10)); this$static.cand[p.node.id_0] = castTo($lower(this$static.intervals, p.node), 60); right = castTo($higher(this$static.intervals, p.node), 60); !!right && (this$static.cand[right.id_0] = p.node); } function $reset_1(this$static){ var index_0, n, n$iterator; this$static.intervals.map_0.clear_0(); this$static.cand = initUnidimensionalArray(Lorg_eclipse_elk_alg_common_compaction_oned_CNode_2_classLit, $intern_2, 60, this$static.this$01.compactor.cGraph.cNodes.array.length, 0, 1); index_0 = 0; for (n$iterator = new ArrayList$1(this$static.this$01.compactor.cGraph.cNodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 60); n.id_0 = index_0++; } } function ScanlineConstraintCalculator$ConstraintsScanlineHandler(this$0){ this.this$01 = this$0; this.intervals = new TreeSet_0(castTo(checkNotNull(new ScanlineConstraintCalculator$ConstraintsScanlineHandler$lambda$0$Type), 50)); } function lambda$0_8(c1_0, c2_1){ return compare_4(c1_0.hitbox.x_0 + c1_0.hitbox.width_0 / 2, c2_1.hitbox.x_0 + c2_1.hitbox.width_0 / 2); } defineClass(1784, 1, {693:1}, ScanlineConstraintCalculator$ConstraintsScanlineHandler); _.handle = function handle(p){ $handle(this, castTo(p, 473)); } ; var Lorg_eclipse_elk_alg_common_compaction_oned_ScanlineConstraintCalculator$ConstraintsScanlineHandler_2_classLit = createForClass('org.eclipse.elk.alg.common.compaction.oned', 'ScanlineConstraintCalculator/ConstraintsScanlineHandler', 1784); function ScanlineConstraintCalculator$ConstraintsScanlineHandler$lambda$0$Type(){ } defineClass(1785, 1, $intern_88, ScanlineConstraintCalculator$ConstraintsScanlineHandler$lambda$0$Type); _.compare_1 = function compare_13(arg0, arg1){ return lambda$0_8(castTo(arg0, 60), castTo(arg1, 60)); } ; _.equals_0 = function equals_64(other){ return this === other; } ; _.reversed = function reversed_5(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_common_compaction_oned_ScanlineConstraintCalculator$ConstraintsScanlineHandler$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.compaction.oned', 'ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type', 1785); function ScanlineConstraintCalculator$Timestamp(node, low){ this.node = node; this.low = low; } defineClass(473, 1, {473:1}, ScanlineConstraintCalculator$Timestamp); _.low = false; var Lorg_eclipse_elk_alg_common_compaction_oned_ScanlineConstraintCalculator$Timestamp_2_classLit = createForClass('org.eclipse.elk.alg.common.compaction.oned', 'ScanlineConstraintCalculator/Timestamp', 473); function ScanlineConstraintCalculator$lambda$0$Type(){ } defineClass(1786, 1, $intern_88, ScanlineConstraintCalculator$lambda$0$Type); _.compare_1 = function compare_14(arg0, arg1){ return lambda$0_7(castTo(arg0, 473), castTo(arg1, 473)); } ; _.equals_0 = function equals_65(other){ return this === other; } ; _.reversed = function reversed_6(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_common_compaction_oned_ScanlineConstraintCalculator$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.compaction.oned', 'ScanlineConstraintCalculator/lambda$0$Type', 1786); function ScanlineConstraintCalculator$lambda$1$Type(){ } defineClass(1787, 1, $intern_89, ScanlineConstraintCalculator$lambda$1$Type); _.apply_1 = function apply_36(arg0){ return castTo(arg0, 60) , true; } ; _.equals_0 = function equals_66(other){ return this === other; } ; _.test_0 = function test_6(input_0){ return castTo(input_0, 60) , true; } ; var Lorg_eclipse_elk_alg_common_compaction_oned_ScanlineConstraintCalculator$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.compaction.oned', 'ScanlineConstraintCalculator/lambda$1$Type', 1787); function $clinit_HighLevelSortingCriterion(){ $clinit_HighLevelSortingCriterion = emptyMethod; NUM_OF_EXTERNAL_SIDES_THAN_NUM_OF_EXTENSIONS_LAST = new HighLevelSortingCriterion('NUM_OF_EXTERNAL_SIDES_THAN_NUM_OF_EXTENSIONS_LAST', 0); CORNER_CASES_THAN_SINGLE_SIDE_LAST = new HighLevelSortingCriterion('CORNER_CASES_THAN_SINGLE_SIDE_LAST', 1); } function HighLevelSortingCriterion(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_12(name_0){ $clinit_HighLevelSortingCriterion(); return valueOf(($clinit_HighLevelSortingCriterion$Map() , $MAP_2), name_0); } function values_20(){ $clinit_HighLevelSortingCriterion(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_compaction_options_HighLevelSortingCriterion_2_classLit, 1), $intern_37, 436, 0, [NUM_OF_EXTERNAL_SIDES_THAN_NUM_OF_EXTENSIONS_LAST, CORNER_CASES_THAN_SINGLE_SIDE_LAST]); } defineClass(436, 22, {3:1, 34:1, 22:1, 436:1}, HighLevelSortingCriterion); var CORNER_CASES_THAN_SINGLE_SIDE_LAST, NUM_OF_EXTERNAL_SIDES_THAN_NUM_OF_EXTENSIONS_LAST; var Lorg_eclipse_elk_alg_common_compaction_options_HighLevelSortingCriterion_2_classLit = createForEnum('org.eclipse.elk.alg.common.compaction.options', 'HighLevelSortingCriterion', 436, Ljava_lang_Enum_2_classLit, values_20, valueOf_12); function $clinit_HighLevelSortingCriterion$Map(){ $clinit_HighLevelSortingCriterion$Map = emptyMethod; $MAP_2 = createValueOfMap(($clinit_HighLevelSortingCriterion() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_compaction_options_HighLevelSortingCriterion_2_classLit, 1), $intern_37, 436, 0, [NUM_OF_EXTERNAL_SIDES_THAN_NUM_OF_EXTENSIONS_LAST, CORNER_CASES_THAN_SINGLE_SIDE_LAST]))); } var $MAP_2; function $clinit_LowLevelSortingCriterion(){ $clinit_LowLevelSortingCriterion = emptyMethod; BY_SIZE = new LowLevelSortingCriterion('BY_SIZE', 0); BY_SIZE_AND_SHAPE = new LowLevelSortingCriterion('BY_SIZE_AND_SHAPE', 1); } function LowLevelSortingCriterion(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_13(name_0){ $clinit_LowLevelSortingCriterion(); return valueOf(($clinit_LowLevelSortingCriterion$Map() , $MAP_3), name_0); } function values_21(){ $clinit_LowLevelSortingCriterion(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_compaction_options_LowLevelSortingCriterion_2_classLit, 1), $intern_37, 435, 0, [BY_SIZE, BY_SIZE_AND_SHAPE]); } defineClass(435, 22, {3:1, 34:1, 22:1, 435:1}, LowLevelSortingCriterion); var BY_SIZE, BY_SIZE_AND_SHAPE; var Lorg_eclipse_elk_alg_common_compaction_options_LowLevelSortingCriterion_2_classLit = createForEnum('org.eclipse.elk.alg.common.compaction.options', 'LowLevelSortingCriterion', 435, Ljava_lang_Enum_2_classLit, values_21, valueOf_13); function $clinit_LowLevelSortingCriterion$Map(){ $clinit_LowLevelSortingCriterion$Map = emptyMethod; $MAP_3 = createValueOfMap(($clinit_LowLevelSortingCriterion() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_compaction_options_LowLevelSortingCriterion_2_classLit, 1), $intern_37, 435, 0, [BY_SIZE, BY_SIZE_AND_SHAPE]))); } var $MAP_3; var Lorg_eclipse_elk_core_data_ILayoutMetaDataProvider_2_classLit = createForInterface('org.eclipse.elk.core.data', 'ILayoutMetaDataProvider'); function $clinit_PolyominoOptions(){ $clinit_PolyominoOptions = emptyMethod; POLYOMINO_TRAVERSAL_STRATEGY_DEFAULT = ($clinit_TraversalStrategy() , QUADRANTS_LINE_BY_LINE); POLYOMINO_TRAVERSAL_STRATEGY = new Property_1('org.eclipse.elk.polyomino.traversalStrategy', POLYOMINO_TRAVERSAL_STRATEGY_DEFAULT); POLYOMINO_LOW_LEVEL_SORT_DEFAULT = ($clinit_LowLevelSortingCriterion() , BY_SIZE_AND_SHAPE); POLYOMINO_LOW_LEVEL_SORT = new Property_1('org.eclipse.elk.polyomino.lowLevelSort', POLYOMINO_LOW_LEVEL_SORT_DEFAULT); POLYOMINO_HIGH_LEVEL_SORT_DEFAULT = ($clinit_HighLevelSortingCriterion() , NUM_OF_EXTERNAL_SIDES_THAN_NUM_OF_EXTENSIONS_LAST); POLYOMINO_HIGH_LEVEL_SORT = new Property_1('org.eclipse.elk.polyomino.highLevelSort', POLYOMINO_HIGH_LEVEL_SORT_DEFAULT); POLYOMINO_FILL = new Property_1('org.eclipse.elk.polyomino.fill', ($clinit_Boolean() , true)); } function PolyominoOptions(){ $clinit_PolyominoOptions(); } defineClass(864, 1, $intern_90, PolyominoOptions); _.apply_4 = function apply_37(registry){ $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.polyomino.traversalStrategy'), 'polyomino'), 'Polyomino Traversal Strategy'), 'Traversal strategy for trying different candidate positions for polyominoes.'), POLYOMINO_TRAVERSAL_STRATEGY_DEFAULT), ($clinit_LayoutOptionData$Type() , ENUM)), Lorg_eclipse_elk_alg_common_compaction_options_TraversalStrategy_2_classLit), of_1(($clinit_LayoutOptionData$Target() , PARENTS))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.polyomino.lowLevelSort'), 'polyomino'), 'Polyomino Secondary Sorting Criterion'), 'Possible secondary sorting criteria for the processing order of polyominoes. They are used when polyominoes are equal according to the primary sorting criterion HighLevelSortingCriterion.'), POLYOMINO_LOW_LEVEL_SORT_DEFAULT), ENUM), Lorg_eclipse_elk_alg_common_compaction_options_LowLevelSortingCriterion_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.polyomino.highLevelSort'), 'polyomino'), 'Polyomino Primary Sorting Criterion'), 'Possible primary sorting criteria for the processing order of polyominoes.'), POLYOMINO_HIGH_LEVEL_SORT_DEFAULT), ENUM), Lorg_eclipse_elk_alg_common_compaction_options_HighLevelSortingCriterion_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.polyomino.fill'), 'polyomino'), 'Fill Polyominoes'), 'Use the Profile Fill algorithm to fill polyominoes to prevent small polyominoes from being placed inside of big polyominoes with large holes. Might increase packing area.'), ($clinit_Boolean() , true)), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); } ; var POLYOMINO_FILL, POLYOMINO_HIGH_LEVEL_SORT, POLYOMINO_HIGH_LEVEL_SORT_DEFAULT, POLYOMINO_LOW_LEVEL_SORT, POLYOMINO_LOW_LEVEL_SORT_DEFAULT, POLYOMINO_TRAVERSAL_STRATEGY, POLYOMINO_TRAVERSAL_STRATEGY_DEFAULT; var Lorg_eclipse_elk_alg_common_compaction_options_PolyominoOptions_2_classLit = createForClass('org.eclipse.elk.alg.common.compaction.options', 'PolyominoOptions', 864); function $clinit_TraversalStrategy(){ $clinit_TraversalStrategy = emptyMethod; SPIRAL = new TraversalStrategy('SPIRAL', 0); LINE_BY_LINE = new TraversalStrategy('LINE_BY_LINE', 1); MANHATTAN = new TraversalStrategy('MANHATTAN', 2); JITTER = new TraversalStrategy('JITTER', 3); QUADRANTS_LINE_BY_LINE = new TraversalStrategy('QUADRANTS_LINE_BY_LINE', 4); QUADRANTS_MANHATTAN = new TraversalStrategy('QUADRANTS_MANHATTAN', 5); QUADRANTS_JITTER = new TraversalStrategy('QUADRANTS_JITTER', 6); COMBINE_LINE_BY_LINE_MANHATTAN = new TraversalStrategy('COMBINE_LINE_BY_LINE_MANHATTAN', 7); COMBINE_JITTER_MANHATTAN = new TraversalStrategy('COMBINE_JITTER_MANHATTAN', 8); } function TraversalStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_14(name_0){ $clinit_TraversalStrategy(); return valueOf(($clinit_TraversalStrategy$Map() , $MAP_4), name_0); } function values_22(){ $clinit_TraversalStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_compaction_options_TraversalStrategy_2_classLit, 1), $intern_37, 257, 0, [SPIRAL, LINE_BY_LINE, MANHATTAN, JITTER, QUADRANTS_LINE_BY_LINE, QUADRANTS_MANHATTAN, QUADRANTS_JITTER, COMBINE_LINE_BY_LINE_MANHATTAN, COMBINE_JITTER_MANHATTAN]); } defineClass(257, 22, {3:1, 34:1, 22:1, 257:1}, TraversalStrategy); var COMBINE_JITTER_MANHATTAN, COMBINE_LINE_BY_LINE_MANHATTAN, JITTER, LINE_BY_LINE, MANHATTAN, QUADRANTS_JITTER, QUADRANTS_LINE_BY_LINE, QUADRANTS_MANHATTAN, SPIRAL; var Lorg_eclipse_elk_alg_common_compaction_options_TraversalStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.common.compaction.options', 'TraversalStrategy', 257, Ljava_lang_Enum_2_classLit, values_22, valueOf_14); function $clinit_TraversalStrategy$Map(){ $clinit_TraversalStrategy$Map = emptyMethod; $MAP_4 = createValueOfMap(($clinit_TraversalStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_compaction_options_TraversalStrategy_2_classLit, 1), $intern_37, 257, 0, [SPIRAL, LINE_BY_LINE, MANHATTAN, JITTER, QUADRANTS_LINE_BY_LINE, QUADRANTS_MANHATTAN, QUADRANTS_JITTER, COMBINE_LINE_BY_LINE_MANHATTAN, COMBINE_JITTER_MANHATTAN]))); } var $MAP_4; function $getOther(this$static, some_0){ if (some_0 == this$static.source) { return this$static.target; } else if (some_0 == this$static.target) { return this$static.source; } else { throw toJs(new IllegalArgumentException_0('Node ' + some_0 + ' not part of edge ' + this$static)); } } function NEdge(){ } defineClass(218, 1, {218:1}, NEdge); _.toString_0 = function toString_77(){ return 'NEdge[id=' + this.id_0 + ' w=' + this.weight + ' d=' + this.delta + ']'; } ; _.delta = 1; _.id_0 = 0; _.internalId = 0; _.treeEdge = false; _.weight = 0; var Lorg_eclipse_elk_alg_common_networksimplex_NEdge_2_classLit = createForClass('org.eclipse.elk.alg.common.networksimplex', 'NEdge', 218); function $create_1(this$static){ if (!this$static.edge.source || !this$static.edge.target) { throw toJs(new IllegalStateException_0(($ensureNamesAreInitialized(Lorg_eclipse_elk_alg_common_networksimplex_NEdge_2_classLit) , Lorg_eclipse_elk_alg_common_networksimplex_NEdge_2_classLit.simpleName + ' must have a source and target ' + ($ensureNamesAreInitialized(Lorg_eclipse_elk_alg_common_networksimplex_NNode_2_classLit) , Lorg_eclipse_elk_alg_common_networksimplex_NNode_2_classLit.simpleName) + ' specified.'))); } if (this$static.edge.source == this$static.edge.target) { throw toJs(new IllegalStateException_0('Network simplex does not support self-loops: ' + this$static.edge + ' ' + this$static.edge.source + ' ' + this$static.edge.target)); } $add_11(this$static.edge.source.outgoingEdges, this$static.edge); $add_11(this$static.edge.target.incomingEdges, this$static.edge); return this$static.edge; } function $delta(this$static, delta){ this$static.edge.delta = delta; return this$static; } function $source(this$static, source){ this$static.edge.source = source; return this$static; } function $target(this$static, target){ this$static.edge.target = target; return this$static; } function $weight(this$static, weight){ this$static.edge.weight = weight; return this$static; } function NEdge$NEdgeBuilder(){ this.edge = new NEdge; } defineClass(182, 1, {}, NEdge$NEdgeBuilder); var Lorg_eclipse_elk_alg_common_networksimplex_NEdge$NEdgeBuilder_2_classLit = createForClass('org.eclipse.elk.alg.common.networksimplex', 'NEdge/NEdgeBuilder', 182); function $createArtificialRootAndConnect(this$static, nodesToConnect){ var root, src_0, src$iterator; root = $create_2(new NNode$NNodeBuilder, this$static); for (src$iterator = new ArrayList$1(nodesToConnect); src$iterator.i < src$iterator.this$01.array.length;) { src_0 = castTo($next_6(src$iterator), 125); $create_1($target($source($weight($delta(new NEdge$NEdgeBuilder, 0), 0), root), src_0)); } return root; } function $dfs(this$static, node, mark){ var edge, edge$iterator, other; if (mark[node.internalId]) { return; } mark[node.internalId] = true; for (edge$iterator = new ArrayList$1($getConnectedEdges(node)); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 218); other = $getOther(edge, node); $dfs(this$static, other, mark); } } function $findConCompRepresentatives(this$static){ var ccRep, mark, node, node$iterator; ccRep = new ArrayList; mark = initUnidimensionalArray(Z_classLit, $intern_91, 28, this$static.nodes.array.length, 16, 1); fill0_3(mark, mark.length); for (node$iterator = new ArrayList$1(this$static.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 125); if (!mark[node.internalId]) { push_1(ccRep.array, node); $dfs(this$static, node, mark); } } return ccRep; } function $makeConnected(this$static){ var ccRep, id_0, n, n$iterator, root; id_0 = 0; for (n$iterator = new ArrayList$1(this$static.nodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 125); n.internalId = id_0++; } ccRep = $findConCompRepresentatives(this$static); root = null; ccRep.array.length > 1 && (root = $createArtificialRootAndConnect(this$static, ccRep)); return root; } function NGraph(){ this.nodes = new ArrayList; } defineClass(662, 1, {}, NGraph); var Lorg_eclipse_elk_alg_common_networksimplex_NGraph_2_classLit = createForClass('org.eclipse.elk.alg.common.networksimplex', 'NGraph', 662); function $getConnectedEdges(this$static){ if (this$static.incomingEdgesModCnt != this$static.incomingEdges.modCount || this$static.outgoingEdgesModCnt != this$static.outgoingEdges.modCount) { setLength(this$static.allEdges.array, 0); $addAll_2(this$static.allEdges, this$static.incomingEdges); $addAll_2(this$static.allEdges, this$static.outgoingEdges); this$static.incomingEdgesModCnt = this$static.incomingEdges.modCount; this$static.outgoingEdgesModCnt = this$static.outgoingEdges.modCount; } return this$static.allEdges; } function NNode(){ this.outgoingEdges = new NNode$ChangeAwareArrayList; this.incomingEdges = new NNode$ChangeAwareArrayList; this.allEdges = new ArrayList; this.unknownCutvalues = new ArrayList; } defineClass(125, 1, {125:1}, NNode); _.incomingEdgesModCnt = -1; _.internalId = 0; _.layer = 0; _.outgoingEdgesModCnt = -1; _.treeNode = false; var Lorg_eclipse_elk_alg_common_networksimplex_NNode_2_classLit = createForClass('org.eclipse.elk.alg.common.networksimplex', 'NNode', 125); function $add_11(this$static, e){ ++this$static.modCount; return $add_3(this$static.list, e); } function $remove_29(this$static, o){ ++this$static.modCount; return $remove_12(this$static.list, o); } function NNode$ChangeAwareArrayList(){ this.list = new ArrayList; } defineClass(808, 1, $intern_73, NNode$ChangeAwareArrayList); _.forEach_0 = function forEach_24(action){ $forEach_0(this, action); } ; _.parallelStream = function parallelStream_4(){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(this, 16)); } ; _.sort_0 = function sort_10(c){ $sort_0(this, c); } ; _.spliterator_0 = function spliterator_37(){ return new Spliterators$IteratorSpliterator(this, 16); } ; _.stream = function stream_6(){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(this, 16)); } ; _.add_3 = function add_41(index_0, element){ ++this.modCount; $add_2(this.list, index_0, element); } ; _.add_2 = function add_42(e){ return $add_11(this, e); } ; _.addAll_0 = function addAll_22(index_0, c){ ++this.modCount; return $addAll_1(this.list, index_0, c); } ; _.addAll = function addAll_23(c){ ++this.modCount; return $addAll_2(this.list, c); } ; _.clear_0 = function clear_51(){ ++this.modCount; setLength(this.list.array, 0); } ; _.contains = function contains_48(o){ return $indexOf_3(this.list, o, 0) != -1; } ; _.containsAll = function containsAll_10(c){ return $containsAll(this.list, c); } ; _.get_0 = function get_51(index_0){ return $get_11(this.list, index_0); } ; _.indexOf_0 = function indexOf_7(o){ return $indexOf_3(this.list, o, 0); } ; _.isEmpty = function isEmpty_25(){ return this.list.array.length == 0; } ; _.iterator_0 = function iterator_66(){ return unmodifiableIterator(new ArrayList$1(this.list)); } ; _.listIterator_0 = function listIterator_15(){ throw toJs(new UnsupportedOperationException); } ; _.listIterator_1 = function listIterator_16(index_0){ throw toJs(new UnsupportedOperationException); } ; _.remove_2 = function remove_91(index_0){ ++this.modCount; return $remove_11(this.list, index_0); } ; _.remove_1 = function remove_92(o){ return $remove_29(this, o); } ; _.set_2 = function set_20(index_0, element){ ++this.modCount; return $set_1(this.list, index_0, element); } ; _.size_1 = function size_65(){ return this.list.array.length; } ; _.subList = function subList_9(fromIndex, toIndex){ return new AbstractList$SubList(this.list, fromIndex, toIndex); } ; _.toArray = function toArray_23(){ return clone_0(this.list.array); } ; _.toArray_0 = function toArray_24(a){ return $toArray_1(this.list, a); } ; _.modCount = 0; var Lorg_eclipse_elk_alg_common_networksimplex_NNode$ChangeAwareArrayList_2_classLit = createForClass('org.eclipse.elk.alg.common.networksimplex', 'NNode/ChangeAwareArrayList', 808); function $create_2(this$static, graph){ $add_3(graph.nodes, this$static.node); return this$static.node; } function $origin_0(this$static, origin_0){ this$static.node.origin_0 = origin_0; return this$static; } function NNode$NNodeBuilder(){ this.node = new NNode; } defineClass(275, 1, {}, NNode$NNodeBuilder); var Lorg_eclipse_elk_alg_common_networksimplex_NNode$NNodeBuilder_2_classLit = createForClass('org.eclipse.elk.alg.common.networksimplex', 'NNode/NNodeBuilder', 275); function $balance(this$static, filling){ var i, newLayer, node, node$iterator, range; range = null; for (node$iterator = new ArrayList$1(this$static.graph_0.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 125); if (node.incomingEdges.list.array.length == node.outgoingEdges.list.array.length) { newLayer = node.layer; range = $minimalSpan(node); for (i = node.layer - castTo(range.first, 17).value_0 + 1; i < node.layer + castTo(range.second, 17).value_0; i++) { filling[i] < filling[newLayer] && (newLayer = i); } if (filling[newLayer] < filling[node.layer]) { --filling[node.layer]; ++filling[newLayer]; node.layer = newLayer; } } } } function $cutvalues(this$static){ var edge, edge$iterator, leafs, node, node$iterator, node$iterator0, source, target, toDetermine, treeEdgeCount; leafs = new ArrayList; for (node$iterator0 = new ArrayList$1(this$static.graph_0.nodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 125); treeEdgeCount = 0; node.unknownCutvalues.array.length = 0; for (edge$iterator = new ArrayList$1($getConnectedEdges(node)); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 218); if (edge.treeEdge) { $add_3(node.unknownCutvalues, edge); ++treeEdgeCount; } } treeEdgeCount == 1 && (push_1(leafs.array, node) , true); } for (node$iterator = new ArrayList$1(leafs); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 125); while (node.unknownCutvalues.array.length == 1) { toDetermine = castTo($next_6(new ArrayList$1(node.unknownCutvalues)), 218); this$static.cutvalue[toDetermine.internalId] = toDetermine.weight; source = toDetermine.source; target = toDetermine.target; for (edge$iterator = new ArrayList$1($getConnectedEdges(node)); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 218); equals_Ljava_lang_Object__Z__devirtual$(edge, toDetermine) || (edge.treeEdge?source == edge.source || target == edge.target?(this$static.cutvalue[toDetermine.internalId] -= this$static.cutvalue[edge.internalId] - edge.weight):(this$static.cutvalue[toDetermine.internalId] += this$static.cutvalue[edge.internalId] - edge.weight):node == source?edge.source == node?(this$static.cutvalue[toDetermine.internalId] += edge.weight):(this$static.cutvalue[toDetermine.internalId] -= edge.weight):edge.source == node?(this$static.cutvalue[toDetermine.internalId] -= edge.weight):(this$static.cutvalue[toDetermine.internalId] += edge.weight)); } $remove_12(source.unknownCutvalues, toDetermine); $remove_12(target.unknownCutvalues, toDetermine); source == node?(node = toDetermine.target):(node = toDetermine.source); } } } function $enterEdge(this$static, leave){ var edge, edge$iterator, repSlack, replace, slack, source, target; if (!leave.treeEdge) { throw toJs(new IllegalArgumentException_0('The input edge is not a tree edge.')); } replace = null; repSlack = $intern_0; for (edge$iterator = new ArrayList$1(this$static.edges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 218); source = edge.source; target = edge.target; if ($isInHead(this$static, source, leave) && !$isInHead(this$static, target, leave)) { slack = target.layer - source.layer - edge.delta; if (slack < repSlack) { repSlack = slack; replace = edge; } } } return replace; } function $exchange(this$static, leave, enter){ var delta, node, node$iterator; if (!leave.treeEdge) { throw toJs(new IllegalArgumentException_0('Given leave edge is no tree edge.')); } if (enter.treeEdge) { throw toJs(new IllegalArgumentException_0('Given enter edge is a tree edge already.')); } leave.treeEdge = false; $remove_18(this$static.treeEdges, leave); enter.treeEdge = true; $add_6(this$static.treeEdges, enter); delta = enter.target.layer - enter.source.layer - enter.delta; $isInHead(this$static, enter.target, leave) || (delta = -delta); for (node$iterator = new ArrayList$1(this$static.graph_0.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 125); $isInHead(this$static, node, leave) || (node.layer += delta); } this$static.postOrder = 1; fill_3(this$static.edgeVisited); $postorderTraversal(this$static, castTo($next_6(new ArrayList$1(this$static.graph_0.nodes)), 125)); $cutvalues(this$static); } function $execute_0(this$static, monitor){ var e, iter, node, node$iterator, removeSubtrees; monitor.begin('Network simplex', 1); if (this$static.graph_0.nodes.array.length < 1) { monitor.done_1(); return; } for (node$iterator = new ArrayList$1(this$static.graph_0.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 125); node.layer = 0; } removeSubtrees = this$static.graph_0.nodes.array.length >= 40; removeSubtrees && $removeSubtrees(this$static); $initialize(this$static); $feasibleTree(this$static); e = $leaveEdge(this$static); iter = 0; while (!!e && iter < this$static.iterationLimit) { $exchange(this$static, e, $enterEdge(this$static, e)); e = $leaveEdge(this$static); ++iter; } removeSubtrees && $reattachSubtrees(this$static); this$static.balance?$balance(this$static, $normalize(this$static)):$normalize(this$static); this$static.cutvalue = null; this$static.edges = null; this$static.treeEdges = null; this$static.edgeVisited = null; this$static.lowestPoID = null; this$static.poID = null; this$static.sources = null; this$static.subtreeNodesStack = null; monitor.done_1(); } function $feasibleTree(this$static){ var e, node, node$iterator, slack; $layeringTopologicalNumbering(this$static, this$static.sources); if (this$static.edges.array.length > 0) { fill_3(this$static.edgeVisited); while ($tightTreeDFS(this$static, castTo($next_6(new ArrayList$1(this$static.graph_0.nodes)), 125)) < this$static.graph_0.nodes.array.length) { e = $minimalSlack(this$static); slack = e.target.layer - e.source.layer - e.delta; e.target.treeNode && (slack = -slack); for (node$iterator = new ArrayList$1(this$static.graph_0.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 125); node.treeNode && (node.layer += slack); } fill_3(this$static.edgeVisited); } fill_3(this$static.edgeVisited); $postorderTraversal(this$static, castTo($next_6(new ArrayList$1(this$static.graph_0.nodes)), 125)); $cutvalues(this$static); } } function $initialize(this$static){ var counter, edge, edge$iterator, index_0, n, n$iterator, node, node$iterator, numEdges, numNodes, theEdges; numNodes = this$static.graph_0.nodes.array.length; for (n$iterator = new ArrayList$1(this$static.graph_0.nodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 125); n.treeNode = false; } this$static.poID = initUnidimensionalArray(I_classLit, $intern_49, 28, numNodes, 15, 1); this$static.lowestPoID = initUnidimensionalArray(I_classLit, $intern_49, 28, numNodes, 15, 1); this$static.sources = new ArrayList; index_0 = 0; theEdges = new ArrayList; for (node$iterator = new ArrayList$1(this$static.graph_0.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 125); node.internalId = index_0++; node.incomingEdges.list.array.length == 0 && $add_3(this$static.sources, node); $addAll_2(theEdges, node.outgoingEdges); } counter = 0; for (edge$iterator = new ArrayList$1(theEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 218); edge.internalId = counter++; edge.treeEdge = false; } numEdges = theEdges.array.length; if (this$static.cutvalue == null || this$static.cutvalue.length < numEdges) { this$static.cutvalue = initUnidimensionalArray(D_classLit, $intern_66, 28, numEdges, 15, 1); this$static.edgeVisited = initUnidimensionalArray(Z_classLit, $intern_91, 28, numEdges, 16, 1); } else { fill_3(this$static.edgeVisited); } this$static.edges = theEdges; this$static.treeEdges = new LinkedHashSet_0(capacity_0(this$static.edges.array.length)); this$static.postOrder = 1; } function $isInHead(this$static, node, edge){ var source, target; source = edge.source; target = edge.target; if (this$static.lowestPoID[source.internalId] <= this$static.poID[node.internalId] && this$static.poID[node.internalId] <= this$static.poID[source.internalId] && this$static.lowestPoID[target.internalId] <= this$static.poID[node.internalId] && this$static.poID[node.internalId] <= this$static.poID[target.internalId]) { if (this$static.poID[source.internalId] < this$static.poID[target.internalId]) { return false; } return true; } if (this$static.poID[source.internalId] < this$static.poID[target.internalId]) { return true; } return false; } function $layeringTopologicalNumbering(this$static, initialRootNodes){ var edge, edge$iterator, incident, node, node$iterator, roots, target; incident = initUnidimensionalArray(I_classLit, $intern_49, 28, this$static.graph_0.nodes.array.length, 15, 1); for (node$iterator = new ArrayList$1(this$static.graph_0.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 125); incident[node.internalId] += node.incomingEdges.list.array.length; } roots = newLinkedList(initialRootNodes); while (roots.size_0 != 0) { node = castTo(roots.size_0 == 0?null:(checkCriticalElement(roots.size_0 != 0) , $removeNode_0(roots, roots.header.next_0)), 125); for (edge$iterator = unmodifiableIterator(new ArrayList$1(node.outgoingEdges.list)); edge$iterator.hasNext_0();) { edge = castTo(edge$iterator.next_1(), 218); target = edge.target; target.layer = $wnd.Math.max(target.layer, node.layer + edge.delta); --incident[target.internalId]; incident[target.internalId] == 0 && ($addNode_0(roots, target, roots.tail.prev, roots.tail) , true); } } } function $leaveEdge(this$static){ var edge, edge$iterator; for (edge$iterator = this$static.treeEdges.map_0.keySet_0().iterator_0(); edge$iterator.hasNext_0();) { edge = castTo(edge$iterator.next_1(), 218); if (edge.treeEdge && this$static.cutvalue[edge.internalId] < -1.0E-10) { return edge; } } return null; } function $minimalSlack(this$static){ var curSlack, edge, edge$iterator, minSlack, minSlackEdge; minSlack = $intern_0; minSlackEdge = null; for (edge$iterator = new ArrayList$1(this$static.edges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 218); if (edge.source.treeNode ^ edge.target.treeNode) { curSlack = edge.target.layer - edge.source.layer - edge.delta; if (curSlack < minSlack) { minSlack = curSlack; minSlackEdge = edge; } } } return minSlackEdge; } function $minimalSpan(node){ var currentSpan, edge, edge$iterator, minSpanIn, minSpanOut; minSpanOut = $intern_0; minSpanIn = $intern_0; for (edge$iterator = new ArrayList$1($getConnectedEdges(node)); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 218); currentSpan = edge.target.layer - edge.source.layer; edge.target == node && currentSpan < minSpanIn?(minSpanIn = currentSpan):currentSpan < minSpanOut && (minSpanOut = currentSpan); } minSpanIn == $intern_0 && (minSpanIn = -1); minSpanOut == $intern_0 && (minSpanOut = -1); return new Pair(valueOf_3(minSpanIn), valueOf_3(minSpanOut)); } function $normalize(this$static){ var filling, highest, layerID, lowest, node, node$iterator, node$iterator0, nodeCntInLayer, nodeCntInLayer$array, nodeCntInLayer$index, nodeCntInLayer$max; highest = $intern_43; lowest = $intern_0; for (node$iterator0 = new ArrayList$1(this$static.graph_0.nodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 125); lowest = $wnd.Math.min(lowest, node.layer); highest = $wnd.Math.max(highest, node.layer); } filling = initUnidimensionalArray(I_classLit, $intern_49, 28, highest - lowest + 1, 15, 1); for (node$iterator = new ArrayList$1(this$static.graph_0.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 125); node.layer -= lowest; ++filling[node.layer]; } layerID = 0; if (this$static.previousLayeringNodeCounts != null) { for (nodeCntInLayer$array = this$static.previousLayeringNodeCounts , nodeCntInLayer$index = 0 , nodeCntInLayer$max = nodeCntInLayer$array.length; nodeCntInLayer$index < nodeCntInLayer$max; ++nodeCntInLayer$index) { nodeCntInLayer = nodeCntInLayer$array[nodeCntInLayer$index]; filling[layerID++] += nodeCntInLayer; if (filling.length == layerID) { break; } } } return filling; } function $postorderTraversal(this$static, node){ var edge, edge$iterator, lowest; lowest = $intern_0; for (edge$iterator = new ArrayList$1($getConnectedEdges(node)); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 218); if (edge.treeEdge && !this$static.edgeVisited[edge.internalId]) { this$static.edgeVisited[edge.internalId] = true; lowest = $wnd.Math.min(lowest, $postorderTraversal(this$static, $getOther(edge, node))); } } this$static.poID[node.internalId] = this$static.postOrder; this$static.lowestPoID[node.internalId] = $wnd.Math.min(lowest, this$static.postOrder++); return this$static.lowestPoID[node.internalId]; } function $reattachSubtrees(this$static){ var edge, leafy, node, placed; while (!$isEmpty(this$static.subtreeNodesStack)) { leafy = castTo($removeFirst(this$static.subtreeNodesStack), 42); node = castTo(leafy.first, 125); edge = castTo(leafy.second, 218); placed = $getOther(edge, node); if (edge.target == node) { $add_11(placed.outgoingEdges, edge); node.layer = placed.layer + edge.delta; } else { $add_11(placed.incomingEdges, edge); node.layer = placed.layer - edge.delta; } $add_3(this$static.graph_0.nodes, node); } } function $removeSubtrees(this$static){ var edge, isOutEdge, leafs, leafy, node, node$iterator, other; this$static.subtreeNodesStack = new ArrayDeque; leafs = new LinkedList; for (node$iterator = new ArrayList$1(this$static.graph_0.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 125); $getConnectedEdges(node).array.length == 1 && ($addNode_0(leafs, node, leafs.tail.prev, leafs.tail) , true); } while (leafs.size_0 != 0) { node = castTo(leafs.size_0 == 0?null:(checkCriticalElement(leafs.size_0 != 0) , $removeNode_0(leafs, leafs.header.next_0)), 125); if ($getConnectedEdges(node).array.length == 0) { continue; } edge = castTo($get_11($getConnectedEdges(node), 0), 218); isOutEdge = node.outgoingEdges.list.array.length > 0; other = $getOther(edge, node); isOutEdge?$remove_29(other.incomingEdges, edge):$remove_29(other.outgoingEdges, edge); $getConnectedEdges(other).array.length == 1 && ($addNode_0(leafs, other, leafs.tail.prev, leafs.tail) , true); leafy = new Pair(node, edge); $addFirst(this$static.subtreeNodesStack, leafy); $remove_12(this$static.graph_0.nodes, node); } } function $tightTreeDFS(this$static, node){ var edge, edge$iterator, nodeCount, opposite; nodeCount = 1; node.treeNode = true; opposite = null; for (edge$iterator = new ArrayList$1($getConnectedEdges(node)); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 218); if (!this$static.edgeVisited[edge.internalId]) { this$static.edgeVisited[edge.internalId] = true; opposite = $getOther(edge, node); if (edge.treeEdge) { nodeCount += $tightTreeDFS(this$static, opposite); } else if (!opposite.treeNode && edge.delta == edge.target.layer - edge.source.layer) { edge.treeEdge = true; $add_6(this$static.treeEdges, edge); nodeCount += $tightTreeDFS(this$static, opposite); } } } return nodeCount; } function $withBalancing(this$static, doBalance){ this$static.balance = doBalance; return this$static; } function $withIterationLimit(this$static, limit){ this$static.iterationLimit = limit; return this$static; } function $withPreviousLayering(this$static, considerPreviousLayering){ this$static.previousLayeringNodeCounts = considerPreviousLayering; return this$static; } function NetworkSimplex(){ } function forGraph(graph){ var ns; ns = new NetworkSimplex; ns.graph_0 = graph; return ns; } defineClass(1695, 1, {}, NetworkSimplex); _.balance = false; _.iterationLimit = $intern_0; _.postOrder = 0; var Lorg_eclipse_elk_alg_common_networksimplex_NetworkSimplex_2_classLit = createForClass('org.eclipse.elk.alg.common.networksimplex', 'NetworkSimplex', 1695); function calculateLabelAndNodeSizes(adapter){ $forEach_1(adapter.getNodes(), new NodeLabelAndSizeCalculator$lambda$0$Type(adapter)); } function sortPortLists(adapter){ var node, node$iterator; for (node$iterator = new ArrayList$1($getNodes(adapter)); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 695); node.sortPortList(); } } function computeInsideNodeLabelPadding(node, layoutDirection){ var col, col$array, col$array0, col$index, col$index0, col$max, col$max0, labelCell, labelCellContainer, nodeContext, padding, row, row$array, row$array0, row$index, row$index0, row$max, row$max0; nodeContext = new NodeContext(node); createNodeLabelCells(nodeContext, !(layoutDirection == ($clinit_Direction_0() , UP_1) || layoutDirection == DOWN_1)); labelCellContainer = nodeContext.insideNodeLabelContainer; padding = new ElkPadding; for (col$array0 = ($clinit_ContainerArea() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_ContainerArea_2_classLit, 1), $intern_37, 237, 0, [BEGIN, CENTER, END])) , col$index0 = 0 , col$max0 = col$array0.length; col$index0 < col$max0; ++col$index0) { col = col$array0[col$index0]; labelCell = $getCell(labelCellContainer, BEGIN, col); !!labelCell && (padding.top_0 = $wnd.Math.max(padding.top_0, labelCell.getMinimumHeight())); } for (col$array = stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_ContainerArea_2_classLit, 1), $intern_37, 237, 0, [BEGIN, CENTER, END]) , col$index = 0 , col$max = col$array.length; col$index < col$max; ++col$index) { col = col$array[col$index]; labelCell = $getCell(labelCellContainer, END, col); !!labelCell && (padding.bottom = $wnd.Math.max(padding.bottom, labelCell.getMinimumHeight())); } for (row$array0 = stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_ContainerArea_2_classLit, 1), $intern_37, 237, 0, [BEGIN, CENTER, END]) , row$index0 = 0 , row$max0 = row$array0.length; row$index0 < row$max0; ++row$index0) { row = row$array0[row$index0]; labelCell = $getCell(labelCellContainer, row, BEGIN); !!labelCell && (padding.left = $wnd.Math.max(padding.left, labelCell.getMinimumWidth())); } for (row$array = stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_ContainerArea_2_classLit, 1), $intern_37, 237, 0, [BEGIN, CENTER, END]) , row$index = 0 , row$max = row$array.length; row$index < row$max; ++row$index) { row = row$array[row$index]; labelCell = $getCell(labelCellContainer, row, END); !!labelCell && (padding.right = $wnd.Math.max(padding.right, labelCell.getMinimumWidth())); } if (padding.top_0 > 0) { padding.top_0 += labelCellContainer.padding.top_0; padding.top_0 += labelCellContainer.gap; } if (padding.bottom > 0) { padding.bottom += labelCellContainer.padding.bottom; padding.bottom += labelCellContainer.gap; } if (padding.left > 0) { padding.left += labelCellContainer.padding.left; padding.left += labelCellContainer.gap; } if (padding.right > 0) { padding.right += labelCellContainer.padding.right; padding.right += labelCellContainer.gap; } return padding; } function process(graph, node, applyStuff, ignoreInsidePortLabels){ var horizontalLayoutMode, layoutDirection, minSize, nodeContext, outerNodeLabelsOverhang; nodeContext = new NodeContext(node); createPortContexts(nodeContext, ignoreInsidePortLabels); horizontalLayoutMode = true; if (!!graph && graph.hasProperty(($clinit_CoreOptions() , DIRECTION_1))) { layoutDirection = castTo(graph.getProperty(($clinit_CoreOptions() , DIRECTION_1)), 88); horizontalLayoutMode = layoutDirection == ($clinit_Direction_0() , UNDEFINED_2) || layoutDirection == LEFT_6 || layoutDirection == RIGHT_6; } createNodeLabelCellContainers(nodeContext, false); $forEach_1(nodeContext.node.getLabels(), new NodeLabelCellCreator$lambda$0$Type(nodeContext, false, horizontalLayoutMode)); createInsidePortLabelCell(nodeContext, nodeContext.nodeContainer, ($clinit_ContainerArea() , BEGIN), ($clinit_PortSide() , NORTH_3)); createInsidePortLabelCell(nodeContext, nodeContext.nodeContainer, END, SOUTH_2); createInsidePortLabelCell(nodeContext, nodeContext.nodeContainerMiddleRow, BEGIN, WEST_2); createInsidePortLabelCell(nodeContext, nodeContext.nodeContainerMiddleRow, END, EAST_2); setupNorthOrSouthPortLabelCell(nodeContext, NORTH_3); setupNorthOrSouthPortLabelCell(nodeContext, SOUTH_2); setupEastOrWestPortLabelCell(nodeContext, EAST_2); setupEastOrWestPortLabelCell(nodeContext, WEST_2); $clinit_NodeLabelAndSizeUtilities(); minSize = nodeContext.sizeConstraints.contains(($clinit_SizeConstraint() , MINIMUM_SIZE)) && nodeContext.sizeOptions.contains(($clinit_SizeOptions() , MINIMUM_SIZE_ACCOUNTS_FOR_PADDING))?getMinimumNodeOrClientAreaSize(nodeContext):null; !!minSize && $setCenterCellMinimumSize(nodeContext.insideNodeLabelContainer, minSize); setupNodePaddingForPortsWithOffset(nodeContext); calculateHorizontalPortPlacementSize(nodeContext); calculateVerticalPortPlacementSize(nodeContext); configureCellSystemSizeContributions(nodeContext); setNodeWidth(nodeContext); placeHorizontalPorts(nodeContext); placePortLabels(nodeContext, NORTH_3); placePortLabels(nodeContext, SOUTH_2); updateVerticalInsidePortLabelCellPadding(nodeContext); setNodeHeight(nodeContext); if (!applyStuff) { return nodeContext.nodeSize; } offsetSouthernPortsByNodeSize(nodeContext); placeVerticalPorts(nodeContext); placePortLabels(nodeContext, EAST_2); placePortLabels(nodeContext, WEST_2); outerNodeLabelsOverhang = nodeContext.sizeOptions.contains(($clinit_SizeOptions() , OUTSIDE_NODE_LABELS_OVERHANG)); placeHorizontalOuterNodeLabelContainer(nodeContext, outerNodeLabelsOverhang, NORTH_3); placeHorizontalOuterNodeLabelContainer(nodeContext, outerNodeLabelsOverhang, SOUTH_2); placeVerticalOuterNodeLabelContainer(nodeContext, outerNodeLabelsOverhang, EAST_2); placeVerticalOuterNodeLabelContainer(nodeContext, outerNodeLabelsOverhang, WEST_2); $forEach_3(new StreamImpl(null, new Spliterators$IteratorSpliterator(new AbstractMap$2(nodeContext.nodeLabelCells), 0)), new LabelPlacer$lambda$0$Type); $forEach_3($filter(new StreamImpl(null, $values_0(nodeContext.portContexts).this$01.valueSpliterator()), new LabelPlacer$lambda$1$Type), new LabelPlacer$lambda$2$Type); setNodePadding(nodeContext); nodeContext.node.setSize(nodeContext.nodeSize); $forEach_3(new StreamImpl(null, $values_0(nodeContext.portContexts).this$01.valueSpliterator()), new NodeLabelAndSizeUtilities$lambda$0$Type); return nodeContext.nodeSize; } function NodeLabelAndSizeCalculator$lambda$0$Type(graph_0){ this.graph_0 = graph_0; } defineClass(1314, 1, $intern_19, NodeLabelAndSizeCalculator$lambda$0$Type); _.accept = function accept_46(arg0){ process(this.graph_0, castTo(arg0, 695), true, false); } ; var Lorg_eclipse_elk_alg_common_nodespacing_NodeLabelAndSizeCalculator$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing', 'NodeLabelAndSizeCalculator/lambda$0$Type', 1314); function $computeLabelBox(labelBox, label_0, incomingEdge, node, port, portLabelSpace, labelSpacing){ labelBox.x_0 = node.getPosition().x_0; labelBox.y_0 = node.getPosition().y_0; if (port) { labelBox.x_0 += port.getPosition().x_0; labelBox.y_0 += port.getPosition().y_0; } labelBox.width_0 = label_0.getSize().x_0; labelBox.height = label_0.getSize().y_0; if (!port) { incomingEdge?(labelBox.x_0 -= labelSpacing + label_0.getSize().x_0):(labelBox.x_0 += node.getSize().x_0 + labelSpacing); } else { switch (port.getSide().ordinal) { case 0: case 2: labelBox.x_0 += port.getSize().x_0 + labelSpacing + portLabelSpace.x_0 + labelSpacing; break; case 4: labelBox.x_0 -= labelSpacing + portLabelSpace.x_0 + labelSpacing + label_0.getSize().x_0; break; case 1: labelBox.x_0 += port.getSize().x_0 + labelSpacing; labelBox.y_0 -= labelSpacing + portLabelSpace.y_0 + labelSpacing + label_0.getSize().y_0; break; case 3: labelBox.x_0 += port.getSize().x_0 + labelSpacing; labelBox.y_0 += port.getSize().y_0 + labelSpacing + portLabelSpace.y_0 + labelSpacing; } } } function $excludeEdgeHeadTailLabels(this$static){ this$static.includeEdgeHeadTailLabels = false; return this$static; } function $process(this$static){ var node, node$iterator, spacing; spacing = $doubleValue(castToDouble(this$static.adapter.getProperty(($clinit_CoreOptions() , SPACING_LABEL_NODE_0)))); for (node$iterator = new ArrayList$1(this$static.adapter.getNodes()); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 695); $processNode_0(this$static, node, spacing); } } function $processEdgeHeadTailLabels(boundingBox, outgoingEdges, incomingEdges, node, port, portLabelSpace, labelSpacing){ var edge, edge$iterator, edge$iterator0, label_0, label$iterator, labelBox; labelBox = new ElkRectangle; for (edge$iterator0 = outgoingEdges.iterator_0(); edge$iterator0.hasNext_0();) { edge = castTo(edge$iterator0.next_1(), 853); for (label$iterator = new ArrayList$1(edge.getLabels()); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 187); if (maskUndefined(label_0.getProperty(($clinit_CoreOptions() , EDGE_LABELS_PLACEMENT_0))) === maskUndefined(($clinit_EdgeLabelPlacement() , TAIL))) { $computeLabelBox(labelBox, label_0, false, node, port, portLabelSpace, labelSpacing); $union(boundingBox, labelBox); } } } for (edge$iterator = incomingEdges.iterator_0(); edge$iterator.hasNext_0();) { edge = castTo(edge$iterator.next_1(), 853); for (label$iterator = new ArrayList$1(edge.getLabels()); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 187); if (maskUndefined(label_0.getProperty(($clinit_CoreOptions() , EDGE_LABELS_PLACEMENT_0))) === maskUndefined(($clinit_EdgeLabelPlacement() , HEAD))) { $computeLabelBox(labelBox, label_0, true, node, port, portLabelSpace, labelSpacing); $union(boundingBox, labelBox); } } } } function $processNode(this$static, node){ var spacing; spacing = $doubleValue(castToDouble(this$static.adapter.getProperty(($clinit_CoreOptions() , SPACING_LABEL_NODE_0)))); $processNode_0(this$static, node, spacing); } function $processNode_0(this$static, node, labelSpacing){ var boundingBox, elementBox, label_0, label$iterator, margin, port, port$iterator, portX, portY, requiredPortLabelSpace; boundingBox = new ElkRectangle_0(node.getPosition().x_0, node.getPosition().y_0, node.getSize().x_0, node.getSize().y_0); elementBox = new ElkRectangle; if (this$static.includeLabels) { for (label$iterator = new ArrayList$1(node.getLabels()); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 187); elementBox.x_0 = label_0.getPosition().x_0 + node.getPosition().x_0; elementBox.y_0 = label_0.getPosition().y_0 + node.getPosition().y_0; elementBox.width_0 = label_0.getSize().x_0; elementBox.height = label_0.getSize().y_0; $union(boundingBox, elementBox); } } for (port$iterator = new ArrayList$1(node.getPorts()); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 852); portX = port.getPosition().x_0 + node.getPosition().x_0; portY = port.getPosition().y_0 + node.getPosition().y_0; if (this$static.includePorts) { elementBox.x_0 = portX; elementBox.y_0 = portY; elementBox.width_0 = port.getSize().x_0; elementBox.height = port.getSize().y_0; $union(boundingBox, elementBox); } if (this$static.includePortLabels) { for (label$iterator = new ArrayList$1(port.getLabels()); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 187); elementBox.x_0 = label_0.getPosition().x_0 + portX; elementBox.y_0 = label_0.getPosition().y_0 + portY; elementBox.width_0 = label_0.getSize().x_0; elementBox.height = label_0.getSize().y_0; $union(boundingBox, elementBox); } } if (this$static.includeEdgeHeadTailLabels) { requiredPortLabelSpace = new KVector_1(-labelSpacing, -labelSpacing); if (castTo(node.getProperty(($clinit_CoreOptions() , PORT_LABELS_PLACEMENT_5)), 181).contains(($clinit_PortLabelPlacement() , OUTSIDE_0))) { for (label$iterator = new ArrayList$1(port.getLabels()); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 187); requiredPortLabelSpace.x_0 += label_0.getSize().x_0 + labelSpacing; requiredPortLabelSpace.y_0 += label_0.getSize().y_0 + labelSpacing; } } requiredPortLabelSpace.x_0 = $wnd.Math.max(requiredPortLabelSpace.x_0, 0); requiredPortLabelSpace.y_0 = $wnd.Math.max(requiredPortLabelSpace.y_0, 0); $processEdgeHeadTailLabels(boundingBox, port.getOutgoingEdges(), port.getIncomingEdges(), node, port, requiredPortLabelSpace, labelSpacing); } } this$static.includeEdgeHeadTailLabels && $processEdgeHeadTailLabels(boundingBox, node.getOutgoingEdges(), node.getIncomingEdges(), node, null, null, labelSpacing); margin = new ElkMargin_2(node.getMargin()); margin.top_0 = $wnd.Math.max(0, node.getPosition().y_0 - boundingBox.y_0); margin.bottom = $wnd.Math.max(0, boundingBox.y_0 + boundingBox.height - (node.getPosition().y_0 + node.getSize().y_0)); margin.left = $wnd.Math.max(0, node.getPosition().x_0 - boundingBox.x_0); margin.right = $wnd.Math.max(0, boundingBox.x_0 + boundingBox.width_0 - (node.getPosition().x_0 + node.getSize().x_0)); node.setMargin(margin); } function NodeMarginCalculator(adapter){ this.adapter = adapter; } defineClass(565, 1, {}, NodeMarginCalculator); _.includeEdgeHeadTailLabels = true; _.includeLabels = true; _.includePortLabels = true; _.includePorts = true; var Lorg_eclipse_elk_alg_common_nodespacing_NodeMarginCalculator_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing', 'NodeMarginCalculator', 565); function $setContributesToMinimumHeight(this$static, contributesToMinimumHeight){ this$static.contributesToMinimumHeight = contributesToMinimumHeight; } function Cell(){ this.padding = new ElkPadding; this.cellRectangle = new ElkRectangle; } defineClass(217, 1, {217:1}); _.contributesToMinimumHeight = false; _.contributesToMinimumWidth = false; var Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_Cell_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing.cellsystem', 'Cell', 217); function $getMinimumHeight(this$static){ var padding; padding = this$static.padding; return this$static.minimumContentAreaSize.y_0 + padding.top_0 + padding.bottom; } function AtomicCell(){ Cell.call(this); this.minimumContentAreaSize = new KVector; } defineClass(127, 217, {127:1, 217:1}, AtomicCell); _.getMinimumHeight = function getMinimumHeight(){ return $getMinimumHeight(this); } ; _.getMinimumWidth = function getMinimumWidth(){ var padding; padding = this.padding; return this.minimumContentAreaSize.x_0 + padding.left + padding.right; } ; var Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_AtomicCell_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing.cellsystem', 'AtomicCell', 127); function $clinit_ContainerArea(){ $clinit_ContainerArea = emptyMethod; BEGIN = new ContainerArea('BEGIN', 0); CENTER = new ContainerArea('CENTER', 1); END = new ContainerArea('END', 2); } function ContainerArea(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_15(name_0){ $clinit_ContainerArea(); return valueOf(($clinit_ContainerArea$Map() , $MAP_5), name_0); } function values_23(){ $clinit_ContainerArea(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_ContainerArea_2_classLit, 1), $intern_37, 237, 0, [BEGIN, CENTER, END]); } defineClass(237, 22, {3:1, 34:1, 22:1, 237:1}, ContainerArea); var BEGIN, CENTER, END; var Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_ContainerArea_2_classLit = createForEnum('org.eclipse.elk.alg.common.nodespacing.cellsystem', 'ContainerArea', 237, Ljava_lang_Enum_2_classLit, values_23, valueOf_15); function $clinit_ContainerArea$Map(){ $clinit_ContainerArea$Map = emptyMethod; $MAP_5 = createValueOfMap(($clinit_ContainerArea() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_ContainerArea_2_classLit, 1), $intern_37, 237, 0, [BEGIN, CENTER, END]))); } var $MAP_5; function $applyHorizontalLayout(cell, x_0, width_0){ var cellRect; if (cell) { cellRect = cell.cellRectangle; cellRect.x_0 = x_0; cellRect.width_0 = width_0; } } function $applyVerticalLayout(cell, y_0, height){ var cellRect; if (cell) { cellRect = cell.cellRectangle; cellRect.y_0 = y_0; cellRect.height = height; } } function ContainerCell(){ Cell.call(this); } function minHeightOfCell(cell, respectContributionFlag){ if (!cell) { return 0; } if (respectContributionFlag && !cell.contributesToMinimumHeight) { return 0; } if (instanceOf(cell, 127)) { if (castTo(cell, 127).minimumContentAreaSize.y_0 == 0) { return 0; } } return cell.getMinimumHeight(); } function minWidthOfCell(cell, respectContributionFlag){ if (!cell) { return 0; } if (respectContributionFlag && !cell.contributesToMinimumWidth) { return 0; } if (instanceOf(cell, 127)) { if (castTo(cell, 127).minimumContentAreaSize.x_0 == 0) { return 0; } } return cell.getMinimumWidth(); } defineClass(336, 217, $intern_92); var Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_ContainerCell_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing.cellsystem', 'ContainerCell', 336); function $clinit_GridContainerCell(){ $clinit_GridContainerCell = emptyMethod; ROWS = ($clinit_ContainerArea() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_ContainerArea_2_classLit, 1), $intern_37, 237, 0, [BEGIN, CENTER, END])).length; COLUMNS = ROWS; } function $applyHeightToRow(this$static, row, y_0, rowHeights){ var column; for (column = 0; column < COLUMNS; column++) { $applyVerticalLayout(this$static.cells_0[row.ordinal][column], y_0, rowHeights[row.ordinal]); } } function $applyWidthToColumn(this$static, column, x_0, colWidths){ var row; for (row = 0; row < ROWS; row++) { $applyHorizontalLayout(this$static.cells_0[row][column.ordinal], x_0, colWidths[column.ordinal]); } } function $applyWidthsToRow(this$static, row, colWidths){ var cellPadding, cellRectangle, centerWidth, freeContentAreaWidth; cellRectangle = this$static.cellRectangle; cellPadding = this$static.padding; $applyWidthToColumn(this$static, ($clinit_ContainerArea() , BEGIN), cellRectangle.x_0 + cellPadding.left, colWidths); $applyWidthToColumn(this$static, END, cellRectangle.x_0 + cellRectangle.width_0 - cellPadding.right - colWidths[2], colWidths); freeContentAreaWidth = cellRectangle.width_0 - cellPadding.left - cellPadding.right; if (colWidths[0] > 0) { colWidths[0] += this$static.gap; freeContentAreaWidth -= colWidths[0]; } if (colWidths[2] > 0) { colWidths[2] += this$static.gap; freeContentAreaWidth -= colWidths[2]; } centerWidth = $wnd.Math.max(0, freeContentAreaWidth); colWidths[1] = $wnd.Math.max(colWidths[1], freeContentAreaWidth); $applyWidthToColumn(this$static, CENTER, cellRectangle.x_0 + cellPadding.left + colWidths[0] - (colWidths[1] - freeContentAreaWidth) / 2, colWidths); if (row == CENTER) { this$static.centerCellRect.width_0 = centerWidth; this$static.centerCellRect.x_0 = cellRectangle.x_0 + cellPadding.left + (centerWidth - freeContentAreaWidth) / 2; } } function $getCell(this$static, row, col){ return this$static.cells_0[row.ordinal][col.ordinal]; } function $minColumnWidths(this$static, row, respectContributionFlag){ var colWidths; colWidths = stampJavaTypeInfo(getClassLiteralForArray(D_classLit, 1), $intern_66, 28, 15, [$minWidthOfColumn(this$static, ($clinit_ContainerArea() , BEGIN), row, respectContributionFlag), $minWidthOfColumn(this$static, CENTER, row, respectContributionFlag), $minWidthOfColumn(this$static, END, row, respectContributionFlag)]); if (this$static.symmetrical) { colWidths[0] = $wnd.Math.max(colWidths[0], colWidths[2]); colWidths[2] = colWidths[0]; } return colWidths; } function $minHeightOfRow(this$static, row, respectContributionFlag){ var column, maxMinHeight; maxMinHeight = 0; for (column = 0; column < COLUMNS; column++) { maxMinHeight = $wnd.Math.max(maxMinHeight, minHeightOfCell(this$static.cells_0[row.ordinal][column], respectContributionFlag)); } row == ($clinit_ContainerArea() , CENTER) && !!this$static.centerCellMinimumSize && (maxMinHeight = $wnd.Math.max(maxMinHeight, this$static.centerCellMinimumSize.y_0)); return maxMinHeight; } function $minRowHeights(this$static, respectContributionFlag){ var rowHeights; rowHeights = stampJavaTypeInfo(getClassLiteralForArray(D_classLit, 1), $intern_66, 28, 15, [$minHeightOfRow(this$static, ($clinit_ContainerArea() , BEGIN), respectContributionFlag), $minHeightOfRow(this$static, CENTER, respectContributionFlag), $minHeightOfRow(this$static, END, respectContributionFlag)]); if (this$static.symmetrical) { rowHeights[0] = $wnd.Math.max(rowHeights[0], rowHeights[2]); rowHeights[2] = rowHeights[0]; } return rowHeights; } function $minWidthOfColumn(this$static, column, row, respectContributionFlag){ var maxMinWidth, rowIndex; maxMinWidth = 0; if (!row) { for (rowIndex = 0; rowIndex < ROWS; rowIndex++) { maxMinWidth = $wnd.Math.max(maxMinWidth, minWidthOfCell(this$static.cells_0[rowIndex][column.ordinal], respectContributionFlag)); } } else { maxMinWidth = minWidthOfCell(this$static.cells_0[row.ordinal][column.ordinal], respectContributionFlag); } column == ($clinit_ContainerArea() , CENTER) && !!this$static.centerCellMinimumSize && (maxMinWidth = $wnd.Math.max(maxMinWidth, this$static.centerCellMinimumSize.x_0)); return maxMinWidth; } function $setCell(this$static, row, col, cell){ setCheck(this$static.cells_0[row.ordinal], col.ordinal, cell); } function $setCenterCellMinimumSize(this$static, minimumSize){ this$static.centerCellMinimumSize = new KVector_2(minimumSize); } function $sumWithGaps(this$static, values){ var activeComponents, sum, val, val$array, val$index, val$max; sum = 0; activeComponents = 0; for (val$array = values , val$index = 0 , val$max = val$array.length; val$index < val$max; ++val$index) { val = val$array[val$index]; if (val > 0) { sum += val; ++activeComponents; } } activeComponents > 1 && (sum += this$static.gap * (activeComponents - 1)); return sum; } function GridContainerCell(tabular, symmetrical, gap){ $clinit_GridContainerCell(); ContainerCell.call(this); this.cells_0 = initMultidimensionalArray(Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_Cell_2_classLit, [$intern_16, $intern_93], [603, 217], 0, [ROWS, COLUMNS], 2); this.centerCellRect = new ElkRectangle; this.tabular = tabular; this.symmetrical = symmetrical; this.gap = gap; } defineClass(1538, 336, $intern_92, GridContainerCell); _.getMinimumHeight = function getMinimumHeight_0(){ var height; height = 0; this.onlyCenterCellContributesToMinimumSize?this.centerCellMinimumSize?(height = this.centerCellMinimumSize.y_0):!!this.cells_0[1][1] && (height = this.cells_0[1][1].getMinimumHeight()):(height = $sumWithGaps(this, $minRowHeights(this, true))); return height > 0?height + this.padding.top_0 + this.padding.bottom:0; } ; _.getMinimumWidth = function getMinimumWidth_0(){ var area, area$array, area$index, area$max, width_0; width_0 = 0; if (this.onlyCenterCellContributesToMinimumSize) { this.centerCellMinimumSize?(width_0 = this.centerCellMinimumSize.x_0):!!this.cells_0[1][1] && (width_0 = this.cells_0[1][1].getMinimumWidth()); } else if (this.tabular) { width_0 = $sumWithGaps(this, $minColumnWidths(this, null, true)); } else { for (area$array = ($clinit_ContainerArea() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_ContainerArea_2_classLit, 1), $intern_37, 237, 0, [BEGIN, CENTER, END])) , area$index = 0 , area$max = area$array.length; area$index < area$max; ++area$index) { area = area$array[area$index]; width_0 = $wnd.Math.max(width_0, $sumWithGaps(this, $minColumnWidths(this, area, true))); } } return width_0 > 0?width_0 + this.padding.left + this.padding.right:0; } ; _.layoutChildrenHorizontally = function layoutChildrenHorizontally(){ var colWidths, row, row$array, row$index, row$max; if (this.tabular) { colWidths = $minColumnWidths(this, null, false); for (row$array = ($clinit_ContainerArea() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_ContainerArea_2_classLit, 1), $intern_37, 237, 0, [BEGIN, CENTER, END])) , row$index = 0 , row$max = row$array.length; row$index < row$max; ++row$index) { row = row$array[row$index]; $applyWidthsToRow(this, row, colWidths); } } else { for (row$array = ($clinit_ContainerArea() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_ContainerArea_2_classLit, 1), $intern_37, 237, 0, [BEGIN, CENTER, END])) , row$index = 0 , row$max = row$array.length; row$index < row$max; ++row$index) { row = row$array[row$index]; colWidths = $minColumnWidths(this, row, false); $applyWidthsToRow(this, row, colWidths); } } } ; _.layoutChildrenVertically = function layoutChildrenVertically(){ var cellPadding, cellRectangle, freeContentAreaHeight, rowHeights; cellRectangle = this.cellRectangle; cellPadding = this.padding; rowHeights = $minRowHeights(this, false); $applyHeightToRow(this, ($clinit_ContainerArea() , BEGIN), cellRectangle.y_0 + cellPadding.top_0, rowHeights); $applyHeightToRow(this, END, cellRectangle.y_0 + cellRectangle.height - cellPadding.bottom - rowHeights[2], rowHeights); freeContentAreaHeight = cellRectangle.height - cellPadding.top_0 - cellPadding.bottom; if (rowHeights[0] > 0) { rowHeights[0] += this.gap; freeContentAreaHeight -= rowHeights[0]; } if (rowHeights[2] > 0) { rowHeights[2] += this.gap; freeContentAreaHeight -= rowHeights[2]; } this.centerCellRect.height = $wnd.Math.max(0, freeContentAreaHeight); this.centerCellRect.y_0 = cellRectangle.y_0 + cellPadding.top_0 + (this.centerCellRect.height - freeContentAreaHeight) / 2; rowHeights[1] = $wnd.Math.max(rowHeights[1], freeContentAreaHeight); $applyHeightToRow(this, CENTER, cellRectangle.y_0 + cellPadding.top_0 + rowHeights[0] - (rowHeights[1] - freeContentAreaHeight) / 2, rowHeights); } ; _.centerCellMinimumSize = null; _.gap = 0; _.onlyCenterCellContributesToMinimumSize = false; _.symmetrical = false; _.tabular = false; var COLUMNS = 0, ROWS = 0; var Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_GridContainerCell_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing.cellsystem', 'GridContainerCell', 1538); function $clinit_HorizontalLabelAlignment(){ $clinit_HorizontalLabelAlignment = emptyMethod; LEFT = new HorizontalLabelAlignment('LEFT', 0); CENTER_0 = new HorizontalLabelAlignment('CENTER', 1); RIGHT = new HorizontalLabelAlignment('RIGHT', 2); } function HorizontalLabelAlignment(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_16(name_0){ $clinit_HorizontalLabelAlignment(); return valueOf(($clinit_HorizontalLabelAlignment$Map() , $MAP_6), name_0); } function values_24(){ $clinit_HorizontalLabelAlignment(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_HorizontalLabelAlignment_2_classLit, 1), $intern_37, 471, 0, [LEFT, CENTER_0, RIGHT]); } defineClass(471, 22, {3:1, 34:1, 22:1, 471:1}, HorizontalLabelAlignment); var CENTER_0, LEFT, RIGHT; var Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_HorizontalLabelAlignment_2_classLit = createForEnum('org.eclipse.elk.alg.common.nodespacing.cellsystem', 'HorizontalLabelAlignment', 471, Ljava_lang_Enum_2_classLit, values_24, valueOf_16); function $clinit_HorizontalLabelAlignment$Map(){ $clinit_HorizontalLabelAlignment$Map = emptyMethod; $MAP_6 = createValueOfMap(($clinit_HorizontalLabelAlignment() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_HorizontalLabelAlignment_2_classLit, 1), $intern_37, 471, 0, [LEFT, CENTER_0, RIGHT]))); } var $MAP_6; function $$init_4(this$static){ this$static.horizontalAlignment = ($clinit_HorizontalLabelAlignment() , CENTER_0); this$static.verticalAlignment = ($clinit_VerticalLabelAlignment() , CENTER_1); this$static.labels = (checkNonnegative(2, 'initialArraySize') , new ArrayList_0(2)); this$static.minimumContentAreaSize = new KVector; } function $addLabel(this$static, label_0){ var labelSize; $add_3(this$static.labels, label_0); labelSize = label_0.getSize(); if (this$static.horizontalLayoutMode) { this$static.minimumContentAreaSize.x_0 = $wnd.Math.max(this$static.minimumContentAreaSize.x_0, labelSize.x_0); this$static.minimumContentAreaSize.y_0 += labelSize.y_0; this$static.labels.array.length > 1 && (this$static.minimumContentAreaSize.y_0 += this$static.gap); } else { this$static.minimumContentAreaSize.x_0 += labelSize.x_0; this$static.minimumContentAreaSize.y_0 = $wnd.Math.max(this$static.minimumContentAreaSize.y_0, labelSize.y_0); this$static.labels.array.length > 1 && (this$static.minimumContentAreaSize.x_0 += this$static.gap); } } function $applyHorizontalModeLabelLayout(this$static){ var cellPadding, cellRect, label_0, label$iterator, labelPos, labelSize, yPos; cellRect = this$static.cellRectangle; cellPadding = this$static.padding; yPos = cellRect.y_0; this$static.verticalAlignment == ($clinit_VerticalLabelAlignment() , CENTER_1)?(yPos += (cellRect.height - this$static.minimumContentAreaSize.y_0) / 2):this$static.verticalAlignment == BOTTOM && (yPos += cellRect.height - this$static.minimumContentAreaSize.y_0); for (label$iterator = new ArrayList$1(this$static.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 187); labelSize = label_0.getSize(); labelPos = new KVector; labelPos.y_0 = yPos; yPos += labelSize.y_0 + this$static.gap; switch (this$static.horizontalAlignment.ordinal) { case 0: labelPos.x_0 = cellRect.x_0 + cellPadding.left; break; case 1: labelPos.x_0 = cellRect.x_0 + cellPadding.left + (cellRect.width_0 - labelSize.x_0) / 2; break; case 2: labelPos.x_0 = cellRect.x_0 + cellRect.width_0 - cellPadding.right - labelSize.x_0; } label_0.setPosition(labelPos); } } function $applyLabelLayout(this$static){ this$static.horizontalLayoutMode?$applyHorizontalModeLabelLayout(this$static):$applyVerticalModeLabelLayout(this$static); } function $applyVerticalModeLabelLayout(this$static){ var cellPadding, cellRect, label_0, label$iterator, labelPos, labelSize, xPos; cellRect = this$static.cellRectangle; cellPadding = this$static.padding; xPos = cellRect.x_0; this$static.horizontalAlignment == ($clinit_HorizontalLabelAlignment() , CENTER_0)?(xPos += (cellRect.width_0 - this$static.minimumContentAreaSize.x_0) / 2):this$static.horizontalAlignment == RIGHT && (xPos += cellRect.width_0 - this$static.minimumContentAreaSize.x_0); for (label$iterator = new ArrayList$1(this$static.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 187); labelSize = label_0.getSize(); labelPos = new KVector; labelPos.x_0 = xPos; xPos += labelSize.x_0 + this$static.gap; switch (this$static.verticalAlignment.ordinal) { case 0: labelPos.y_0 = cellRect.y_0 + cellPadding.top_0; break; case 1: labelPos.y_0 = cellRect.y_0 + cellPadding.top_0 + (cellRect.height - labelSize.y_0) / 2; break; case 2: labelPos.y_0 = cellRect.y_0 + cellRect.height - cellPadding.bottom - labelSize.y_0; } label_0.setPosition(labelPos); } } function $getMinimumHeight_0(this$static){ var padding; padding = this$static.padding; return this$static.minimumContentAreaSize.y_0 + padding.top_0 + padding.bottom; } function $getMinimumWidth(this$static){ var padding; padding = this$static.padding; return this$static.minimumContentAreaSize.x_0 + padding.left + padding.right; } function $setHorizontalAlignment(this$static, newHorizontalAlignment){ requireNonNull_0(newHorizontalAlignment, 'Horizontal alignment cannot be null'); this$static.horizontalAlignment = newHorizontalAlignment; return this$static; } function $setVerticalAlignment(this$static, newVerticalAlignment){ requireNonNull_0(newVerticalAlignment, 'Vertical alignment cannot be null'); this$static.verticalAlignment = newVerticalAlignment; return this$static; } function LabelCell(gap){ Cell.call(this); $$init_4(this); this.gap = gap; this.horizontalLayoutMode = true; } function LabelCell_0(gap, nodeLabelLocation, horizontalLayoutMode){ Cell.call(this); $$init_4(this); this.gap = gap; this.horizontalLayoutMode = horizontalLayoutMode; this.horizontalAlignment = nodeLabelLocation.horizontalAlignment; this.verticalAlignment = nodeLabelLocation.verticalAlignment; } function LabelCell_1(gap, horizontalLayoutMode){ Cell.call(this); $$init_4(this); this.gap = gap; this.horizontalLayoutMode = horizontalLayoutMode; } defineClass(314, 217, {217:1, 314:1}, LabelCell, LabelCell_0, LabelCell_1); _.getMinimumHeight = function getMinimumHeight_1(){ return $getMinimumHeight_0(this); } ; _.getMinimumWidth = function getMinimumWidth_1(){ return $getMinimumWidth(this); } ; _.gap = 0; _.horizontalLayoutMode = false; var Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_LabelCell_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing.cellsystem', 'LabelCell', 314); function $getMinimumHeight_1(this$static){ var activeCells, cellHeight, cellHeight$array, cellHeight$index, cellHeight$max, cellHeights, height; height = 0; if (this$static.containerMode == 0) { cellHeights = $minCellHeights(this$static, true); activeCells = 0; for (cellHeight$array = cellHeights , cellHeight$index = 0 , cellHeight$max = cellHeight$array.length; cellHeight$index < cellHeight$max; ++cellHeight$index) { cellHeight = cellHeight$array[cellHeight$index]; if (cellHeight > 0) { height += cellHeight; ++activeCells; } } activeCells > 1 && (height += this$static.gap * (activeCells - 1)); } else { height = $orElse_0($max($mapToDouble($filter(stream_4(this$static.cells_0), new StripContainerCell$lambda$2$Type), new StripContainerCell$lambda$3$Type))); } return height > 0?height + this$static.padding.top_0 + this$static.padding.bottom:0; } function $getMinimumWidth_0(this$static){ var activeCells, cellWidth, cellWidth$array, cellWidth$index, cellWidth$max, cellWidths, width_0; width_0 = 0; if (this$static.containerMode == 0) { width_0 = $orElse_0($max($mapToDouble($filter(stream_4(this$static.cells_0), new StripContainerCell$lambda$0$Type), new StripContainerCell$lambda$1$Type))); } else { cellWidths = $minCellWidths(this$static, true); activeCells = 0; for (cellWidth$array = cellWidths , cellWidth$index = 0 , cellWidth$max = cellWidth$array.length; cellWidth$index < cellWidth$max; ++cellWidth$index) { cellWidth = cellWidth$array[cellWidth$index]; if (cellWidth > 0) { width_0 += cellWidth; ++activeCells; } } activeCells > 1 && (width_0 += this$static.gap * (activeCells - 1)); } return width_0 > 0?width_0 + this$static.padding.left + this$static.padding.right:0; } function $layoutChildrenHorizontally(this$static){ var cellPadding, cellRectangle, cellWidths, childCell, childCell$array, childCell$array0, childCell$index, childCell$index0, childCell$max, childCell$max0, freeContentAreaWidth, width_0, xPos; cellRectangle = this$static.cellRectangle; cellPadding = this$static.padding; if (this$static.containerMode == 0) { xPos = cellRectangle.x_0 + cellPadding.left; width_0 = cellRectangle.width_0 - cellPadding.left - cellPadding.right; for (childCell$array0 = this$static.cells_0 , childCell$index0 = 0 , childCell$max0 = childCell$array0.length; childCell$index0 < childCell$max0; ++childCell$index0) { childCell = childCell$array0[childCell$index0]; $applyHorizontalLayout(childCell, xPos, width_0); } } else { cellWidths = $minCellWidths(this$static, false); $applyHorizontalLayout(this$static.cells_0[0], cellRectangle.x_0 + cellPadding.left, cellWidths[0]); $applyHorizontalLayout(this$static.cells_0[2], cellRectangle.x_0 + cellRectangle.width_0 - cellPadding.right - cellWidths[2], cellWidths[2]); freeContentAreaWidth = cellRectangle.width_0 - cellPadding.left - cellPadding.right; if (cellWidths[0] > 0) { freeContentAreaWidth -= cellWidths[0] + this$static.gap; cellWidths[0] += this$static.gap; } cellWidths[2] > 0 && (freeContentAreaWidth -= cellWidths[2] + this$static.gap); cellWidths[1] = $wnd.Math.max(cellWidths[1], freeContentAreaWidth); $applyHorizontalLayout(this$static.cells_0[1], cellRectangle.x_0 + cellPadding.left + cellWidths[0] - (cellWidths[1] - freeContentAreaWidth) / 2, cellWidths[1]); } for (childCell$array = this$static.cells_0 , childCell$index = 0 , childCell$max = childCell$array.length; childCell$index < childCell$max; ++childCell$index) { childCell = childCell$array[childCell$index]; instanceOf(childCell, 336) && castTo(childCell, 336).layoutChildrenHorizontally(); } } function $layoutChildrenVertically(this$static){ var cellHeights, cellPadding, cellRectangle, childCell, childCell$array, childCell$array0, childCell$index, childCell$index0, childCell$max, childCell$max0, contentAreaFreeHeight, contentAreaHeight, height, yPos; cellRectangle = this$static.cellRectangle; cellPadding = this$static.padding; if (this$static.containerMode == 0) { cellHeights = $minCellHeights(this$static, false); $applyVerticalLayout(this$static.cells_0[0], cellRectangle.y_0 + cellPadding.top_0, cellHeights[0]); $applyVerticalLayout(this$static.cells_0[2], cellRectangle.y_0 + cellRectangle.height - cellPadding.bottom - cellHeights[2], cellHeights[2]); contentAreaHeight = cellRectangle.height - cellPadding.top_0 - cellPadding.bottom; contentAreaFreeHeight = contentAreaHeight; if (cellHeights[0] > 0) { cellHeights[0] += this$static.gap; contentAreaFreeHeight -= cellHeights[0]; } cellHeights[2] > 0 && (contentAreaFreeHeight -= cellHeights[2] + this$static.gap); cellHeights[1] = $wnd.Math.max(cellHeights[1], contentAreaFreeHeight); $applyVerticalLayout(this$static.cells_0[1], cellRectangle.y_0 + cellPadding.top_0 + cellHeights[0] - (cellHeights[1] - contentAreaFreeHeight) / 2, cellHeights[1]); } else { yPos = cellRectangle.y_0 + cellPadding.top_0; height = cellRectangle.height - cellPadding.top_0 - cellPadding.bottom; for (childCell$array0 = this$static.cells_0 , childCell$index0 = 0 , childCell$max0 = childCell$array0.length; childCell$index0 < childCell$max0; ++childCell$index0) { childCell = childCell$array0[childCell$index0]; $applyVerticalLayout(childCell, yPos, height); } } for (childCell$array = this$static.cells_0 , childCell$index = 0 , childCell$max = childCell$array.length; childCell$index < childCell$max; ++childCell$index) { childCell = childCell$array[childCell$index]; instanceOf(childCell, 336) && castTo(childCell, 336).layoutChildrenVertically(); } } function $minCellHeights(this$static, respectContributionFlag){ var cellHeights; cellHeights = stampJavaTypeInfo(getClassLiteralForArray(D_classLit, 1), $intern_66, 28, 15, [minHeightOfCell(this$static.cells_0[0], respectContributionFlag), minHeightOfCell(this$static.cells_0[1], respectContributionFlag), minHeightOfCell(this$static.cells_0[2], respectContributionFlag)]); if (this$static.symmetrical) { cellHeights[0] = $wnd.Math.max(cellHeights[0], cellHeights[2]); cellHeights[2] = cellHeights[0]; } return cellHeights; } function $minCellWidths(this$static, respectContributionFlag){ var cellWidths; cellWidths = stampJavaTypeInfo(getClassLiteralForArray(D_classLit, 1), $intern_66, 28, 15, [minWidthOfCell(this$static.cells_0[0], respectContributionFlag), minWidthOfCell(this$static.cells_0[1], respectContributionFlag), minWidthOfCell(this$static.cells_0[2], respectContributionFlag)]); if (this$static.symmetrical) { cellWidths[0] = $wnd.Math.max(cellWidths[0], cellWidths[2]); cellWidths[2] = cellWidths[0]; } return cellWidths; } function $setCell_0(this$static, area, cell){ this$static.cells_0[area.ordinal] = cell; } function StripContainerCell(mode, symmetrical, gap){ ContainerCell.call(this); this.cells_0 = initUnidimensionalArray(Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_Cell_2_classLit, $intern_93, 217, ($clinit_ContainerArea() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_ContainerArea_2_classLit, 1), $intern_37, 237, 0, [BEGIN, CENTER, END])).length, 0, 1); this.containerMode = mode; this.symmetrical = symmetrical; this.gap = gap; } function lambda$0_9(cell_0){ return !!cell_0 && cell_0.contributesToMinimumWidth; } function lambda$2(cell_0){ return !!cell_0 && cell_0.contributesToMinimumHeight; } defineClass(252, 336, {217:1, 336:1, 252:1}, StripContainerCell); _.getMinimumHeight = function getMinimumHeight_2(){ return $getMinimumHeight_1(this); } ; _.getMinimumWidth = function getMinimumWidth_2(){ return $getMinimumWidth_0(this); } ; _.layoutChildrenHorizontally = function layoutChildrenHorizontally_0(){ $layoutChildrenHorizontally(this); } ; _.layoutChildrenVertically = function layoutChildrenVertically_0(){ $layoutChildrenVertically(this); } ; _.containerMode = 0; _.gap = 0; _.symmetrical = false; var Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_StripContainerCell_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing.cellsystem', 'StripContainerCell', 252); function StripContainerCell$lambda$0$Type(){ } defineClass(1691, 1, $intern_40, StripContainerCell$lambda$0$Type); _.test_0 = function test_7(arg0){ return lambda$0_9(castTo(arg0, 217)); } ; var Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_StripContainerCell$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing.cellsystem', 'StripContainerCell/lambda$0$Type', 1691); function StripContainerCell$lambda$1$Type(){ } defineClass(1692, 1, {}, StripContainerCell$lambda$1$Type); _.applyAsDouble = function applyAsDouble(arg0){ return castTo(arg0, 217).getMinimumWidth(); } ; var Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_StripContainerCell$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing.cellsystem', 'StripContainerCell/lambda$1$Type', 1692); function StripContainerCell$lambda$2$Type(){ } defineClass(1693, 1, $intern_40, StripContainerCell$lambda$2$Type); _.test_0 = function test_8(arg0){ return lambda$2(castTo(arg0, 217)); } ; var Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_StripContainerCell$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing.cellsystem', 'StripContainerCell/lambda$2$Type', 1693); function StripContainerCell$lambda$3$Type(){ } defineClass(1694, 1, {}, StripContainerCell$lambda$3$Type); _.applyAsDouble = function applyAsDouble_0(arg0){ return castTo(arg0, 217).getMinimumHeight(); } ; var Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_StripContainerCell$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing.cellsystem', 'StripContainerCell/lambda$3$Type', 1694); function $clinit_VerticalLabelAlignment(){ $clinit_VerticalLabelAlignment = emptyMethod; TOP = new VerticalLabelAlignment('TOP', 0); CENTER_1 = new VerticalLabelAlignment('CENTER', 1); BOTTOM = new VerticalLabelAlignment('BOTTOM', 2); } function VerticalLabelAlignment(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_17(name_0){ $clinit_VerticalLabelAlignment(); return valueOf(($clinit_VerticalLabelAlignment$Map() , $MAP_7), name_0); } function values_25(){ $clinit_VerticalLabelAlignment(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_VerticalLabelAlignment_2_classLit, 1), $intern_37, 472, 0, [TOP, CENTER_1, BOTTOM]); } defineClass(472, 22, {3:1, 34:1, 22:1, 472:1}, VerticalLabelAlignment); var BOTTOM, CENTER_1, TOP; var Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_VerticalLabelAlignment_2_classLit = createForEnum('org.eclipse.elk.alg.common.nodespacing.cellsystem', 'VerticalLabelAlignment', 472, Ljava_lang_Enum_2_classLit, values_25, valueOf_17); function $clinit_VerticalLabelAlignment$Map(){ $clinit_VerticalLabelAlignment$Map = emptyMethod; $MAP_7 = createValueOfMap(($clinit_VerticalLabelAlignment() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_VerticalLabelAlignment_2_classLit, 1), $intern_37, 472, 0, [TOP, CENTER_1, BOTTOM]))); } var $MAP_7; function $getPortAlignment(this$static, portSide){ var alignment; alignment = null; switch (portSide.ordinal) { case 1: this$static.node.hasProperty(($clinit_CoreOptions() , PORT_ALIGNMENT_NORTH_0)) && (alignment = castTo(this$static.node.getProperty(PORT_ALIGNMENT_NORTH_0), 256)); break; case 3: this$static.node.hasProperty(($clinit_CoreOptions() , PORT_ALIGNMENT_SOUTH_0)) && (alignment = castTo(this$static.node.getProperty(PORT_ALIGNMENT_SOUTH_0), 256)); break; case 2: this$static.node.hasProperty(($clinit_CoreOptions() , PORT_ALIGNMENT_EAST_0)) && (alignment = castTo(this$static.node.getProperty(PORT_ALIGNMENT_EAST_0), 256)); break; case 4: this$static.node.hasProperty(($clinit_CoreOptions() , PORT_ALIGNMENT_WEST_0)) && (alignment = castTo(this$static.node.getProperty(PORT_ALIGNMENT_WEST_0), 256)); } !alignment && (alignment = castTo(this$static.node.getProperty(($clinit_CoreOptions() , PORT_ALIGNMENT_DEFAULT)), 256)); return alignment; } function NodeContext(node){ var symmetry; this.portContexts = create(new NodeContext$0methodref$comparePortSides$Type, new NodeContext$1methodref$comparePortContexts$Type); this.insidePortLabelCells = new EnumMap(castTo(checkNotNull(Lorg_eclipse_elk_core_options_PortSide_2_classLit), 297)); this.outsideNodeLabelContainers = new EnumMap(castTo(checkNotNull(Lorg_eclipse_elk_core_options_PortSide_2_classLit), 297)); this.nodeLabelCells = new EnumMap(castTo(checkNotNull(Lorg_eclipse_elk_alg_common_nodespacing_internal_NodeLabelLocation_2_classLit), 297)); this.node = node; this.nodeSize = new KVector_2(node.getSize()); this.topdownLayout = $booleanValue(castToBoolean(node.getProperty(($clinit_CoreOptions() , TOPDOWN_LAYOUT_2)))); this.treatAsCompoundNode = node.isCompoundNode() || $booleanValue(castToBoolean(node.getProperty(INSIDE_SELF_LOOPS_ACTIVATE_0))); this.sizeConstraints = castTo(node.getProperty(NODE_SIZE_CONSTRAINTS_6), 21); this.sizeOptions = castTo(node.getProperty(NODE_SIZE_OPTIONS_6), 21); this.portConstraints = castTo(node.getProperty(PORT_CONSTRAINTS_1), 101); this.portLabelsPlacement = castTo(node.getProperty(PORT_LABELS_PLACEMENT_5), 21); if (!isValid_1(this.portLabelsPlacement)) { throw toJs(new UnsupportedConfigurationException_0('Invalid port label placement: ' + this.portLabelsPlacement)); } this.portLabelsTreatAsGroup = $booleanValue(castToBoolean(node.getProperty(PORT_LABELS_TREAT_AS_GROUP_0))); this.nodeLabelPlacement = castTo(node.getProperty(NODE_LABELS_PLACEMENT_5), 21); if (!isValid_0(this.nodeLabelPlacement)) { throw toJs(new UnsupportedConfigurationException_0('Invalid node label placement: ' + this.nodeLabelPlacement)); } this.nodeLabelsPadding = castTo(getIndividualOrInherited_0(node, NODE_LABELS_PADDING_0), 107); this.nodeLabelSpacing = $doubleValue(castToDouble(getIndividualOrInherited_0(node, SPACING_LABEL_NODE_0))); this.labelLabelSpacing = $doubleValue(castToDouble(getIndividualOrInherited_0(node, SPACING_LABEL_LABEL_0))); this.portPortSpacing = $doubleValue(castToDouble(getIndividualOrInherited_0(node, SPACING_PORT_PORT_0))); this.portLabelSpacingHorizontal = $doubleValue(castToDouble(getIndividualOrInherited_0(node, SPACING_LABEL_PORT_HORIZONTAL_0))); this.portLabelSpacingVertical = $doubleValue(castToDouble(getIndividualOrInherited_0(node, SPACING_LABEL_PORT_VERTICAL_0))); this.surroundingPortMargins = castTo(getIndividualOrInherited_0(node, SPACING_PORTS_SURROUNDING_0), 140); this.labelCellSpacing = 2 * this.labelLabelSpacing; symmetry = !this.sizeOptions.contains(($clinit_SizeOptions() , ASYMMETRICAL)); this.nodeContainer = new StripContainerCell(0, symmetry, 0); this.nodeContainerMiddleRow = new StripContainerCell(1, symmetry, 0); $setCell_0(this.nodeContainer, ($clinit_ContainerArea() , CENTER), this.nodeContainerMiddleRow); } function comparePortContexts(portContext1, portContext2){ var portSideComparison; portSideComparison = comparePortSides(portContext1.port.getSide(), portContext2.port.getSide()); if (portSideComparison != 0) { return portSideComparison; } switch (portContext1.port.getSide().ordinal) { case 1: case 2: return compare_5(portContext1.port.getVolatileId(), portContext2.port.getVolatileId()); case 3: case 4: return compare_5(portContext2.port.getVolatileId(), portContext1.port.getVolatileId()); } return 0; } function comparePortSides(portSide1, portSide2){ return compare_5(portSide1.ordinal, portSide2.ordinal); } defineClass(800, 1, {}, NodeContext); _.labelCellSpacing = 0; _.labelLabelSpacing = 0; _.nodeLabelSpacing = 0; _.portLabelSpacingHorizontal = 0; _.portLabelSpacingVertical = 0; _.portLabelsTreatAsGroup = false; _.portPortSpacing = 0; _.topdownLayout = false; _.treatAsCompoundNode = false; var Lorg_eclipse_elk_alg_common_nodespacing_internal_NodeContext_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing.internal', 'NodeContext', 800); function NodeContext$0methodref$comparePortSides$Type(){ } defineClass(1536, 1, $intern_88, NodeContext$0methodref$comparePortSides$Type); _.compare_1 = function compare_15(arg0, arg1){ return comparePortSides(castTo(arg0, 64), castTo(arg1, 64)); } ; _.equals_0 = function equals_67(other){ return this === other; } ; _.reversed = function reversed_7(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_common_nodespacing_internal_NodeContext$0methodref$comparePortSides$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing.internal', 'NodeContext/0methodref$comparePortSides$Type', 1536); function NodeContext$1methodref$comparePortContexts$Type(){ } defineClass(1537, 1, $intern_88, NodeContext$1methodref$comparePortContexts$Type); _.compare_1 = function compare_16(arg0, arg1){ return comparePortContexts(castTo(arg0, 117), castTo(arg1, 117)); } ; _.equals_0 = function equals_68(other){ return this === other; } ; _.reversed = function reversed_8(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_common_nodespacing_internal_NodeContext$1methodref$comparePortContexts$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing.internal', 'NodeContext/1methodref$comparePortContexts$Type', 1537); function $clinit_NodeLabelLocation(){ $clinit_NodeLabelLocation = emptyMethod; OUT_T_L = new NodeLabelLocation('OUT_T_L', 0, ($clinit_HorizontalLabelAlignment() , LEFT), ($clinit_VerticalLabelAlignment() , BOTTOM), ($clinit_ContainerArea() , BEGIN), BEGIN, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(($clinit_NodeLabelPlacement() , OUTSIDE), stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_TOP_0, H_LEFT_0]))])); OUT_T_C = new NodeLabelLocation('OUT_T_C', 1, CENTER_0, BOTTOM, BEGIN, CENTER, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(OUTSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_TOP_0, H_CENTER_0])), of_2(OUTSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_TOP_0, H_CENTER_0, H_PRIORITY]))])); OUT_T_R = new NodeLabelLocation('OUT_T_R', 2, RIGHT, BOTTOM, BEGIN, END, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(OUTSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_TOP_0, H_RIGHT_0]))])); OUT_B_L = new NodeLabelLocation('OUT_B_L', 3, LEFT, TOP, END, BEGIN, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(OUTSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_BOTTOM_0, H_LEFT_0]))])); OUT_B_C = new NodeLabelLocation('OUT_B_C', 4, CENTER_0, TOP, END, CENTER, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(OUTSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_BOTTOM_0, H_CENTER_0])), of_2(OUTSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_BOTTOM_0, H_CENTER_0, H_PRIORITY]))])); OUT_B_R = new NodeLabelLocation('OUT_B_R', 5, RIGHT, TOP, END, END, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(OUTSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_BOTTOM_0, H_RIGHT_0]))])); OUT_L_T = new NodeLabelLocation('OUT_L_T', 6, RIGHT, TOP, BEGIN, BEGIN, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(OUTSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [H_LEFT_0, V_TOP_0, H_PRIORITY]))])); OUT_L_C = new NodeLabelLocation('OUT_L_C', 7, RIGHT, CENTER_1, CENTER, BEGIN, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(OUTSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [H_LEFT_0, V_CENTER_0])), of_2(OUTSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [H_LEFT_0, V_CENTER_0, H_PRIORITY]))])); OUT_L_B = new NodeLabelLocation('OUT_L_B', 8, RIGHT, BOTTOM, END, BEGIN, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(OUTSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [H_LEFT_0, V_BOTTOM_0, H_PRIORITY]))])); OUT_R_T = new NodeLabelLocation('OUT_R_T', 9, LEFT, TOP, BEGIN, END, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(OUTSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [H_RIGHT_0, V_TOP_0, H_PRIORITY]))])); OUT_R_C = new NodeLabelLocation('OUT_R_C', 10, LEFT, CENTER_1, CENTER, END, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(OUTSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [H_RIGHT_0, V_CENTER_0])), of_2(OUTSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [H_RIGHT_0, V_CENTER_0, H_PRIORITY]))])); OUT_R_B = new NodeLabelLocation('OUT_R_B', 11, LEFT, BOTTOM, END, END, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(OUTSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [H_RIGHT_0, V_BOTTOM_0, H_PRIORITY]))])); IN_T_L = new NodeLabelLocation('IN_T_L', 12, LEFT, TOP, BEGIN, BEGIN, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(INSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_TOP_0, H_LEFT_0])), of_2(INSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_TOP_0, H_LEFT_0, H_PRIORITY]))])); IN_T_C = new NodeLabelLocation('IN_T_C', 13, CENTER_0, TOP, BEGIN, CENTER, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(INSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_TOP_0, H_CENTER_0])), of_2(INSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_TOP_0, H_CENTER_0, H_PRIORITY]))])); IN_T_R = new NodeLabelLocation('IN_T_R', 14, RIGHT, TOP, BEGIN, END, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(INSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_TOP_0, H_RIGHT_0])), of_2(INSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_TOP_0, H_RIGHT_0, H_PRIORITY]))])); IN_C_L = new NodeLabelLocation('IN_C_L', 15, LEFT, CENTER_1, CENTER, BEGIN, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(INSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_CENTER_0, H_LEFT_0])), of_2(INSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_CENTER_0, H_LEFT_0, H_PRIORITY]))])); IN_C_C = new NodeLabelLocation('IN_C_C', 16, CENTER_0, CENTER_1, CENTER, CENTER, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(INSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_CENTER_0, H_CENTER_0])), of_2(INSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_CENTER_0, H_CENTER_0, H_PRIORITY]))])); IN_C_R = new NodeLabelLocation('IN_C_R', 17, RIGHT, CENTER_1, CENTER, END, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(INSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_CENTER_0, H_RIGHT_0])), of_2(INSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_CENTER_0, H_RIGHT_0, H_PRIORITY]))])); IN_B_L = new NodeLabelLocation('IN_B_L', 18, LEFT, BOTTOM, END, BEGIN, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(INSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_BOTTOM_0, H_LEFT_0])), of_2(INSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_BOTTOM_0, H_LEFT_0, H_PRIORITY]))])); IN_B_C = new NodeLabelLocation('IN_B_C', 19, CENTER_0, BOTTOM, END, CENTER, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(INSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_BOTTOM_0, H_CENTER_0])), of_2(INSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_BOTTOM_0, H_CENTER_0, H_PRIORITY]))])); IN_B_R = new NodeLabelLocation('IN_B_R', 20, RIGHT, BOTTOM, END, END, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [of_2(INSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_BOTTOM_0, H_RIGHT_0])), of_2(INSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_BOTTOM_0, H_RIGHT_0, H_PRIORITY]))])); UNDEFINED = new NodeLabelLocation('UNDEFINED', 21, null, null, null, null, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_Set_2_classLit, 1), $intern_2, 21, 0, [])); } function $getOutsideSide(this$static){ switch (this$static.ordinal) { case 0: case 1: case 2: return $clinit_PortSide() , NORTH_3; case 3: case 4: case 5: return $clinit_PortSide() , SOUTH_2; case 6: case 7: case 8: return $clinit_PortSide() , WEST_2; case 9: case 10: case 11: return $clinit_PortSide() , EAST_2; default:return $clinit_PortSide() , UNDEFINED_5; } } function $isInsideLocation(this$static){ switch (this$static.ordinal) { case 12: case 13: case 14: case 15: case 16: case 17: case 18: case 19: case 20: return true; default:return false; } } function NodeLabelLocation(enum$name, enum$ordinal, horizontalAlignment, verticalAlignment, row, column, assignedPlacements){ Enum.call(this, enum$name, enum$ordinal); this.horizontalAlignment = horizontalAlignment; this.verticalAlignment = verticalAlignment; this.containerRow = row; this.containerColumn = column; this.assignedPlacements = newArrayList_1(assignedPlacements); } function fromNodeLabelPlacement(labelPlacement){ $clinit_NodeLabelLocation(); var location_0, location$array, location$index, location$max; for (location$array = values_26() , location$index = 0 , location$max = location$array.length; location$index < location$max; ++location$index) { location_0 = location$array[location$index]; if ($indexOf_3(location_0.assignedPlacements, labelPlacement, 0) != -1) { return location_0; } } return UNDEFINED; } function valueOf_18(name_0){ $clinit_NodeLabelLocation(); return valueOf(($clinit_NodeLabelLocation$Map() , $MAP_8), name_0); } function values_26(){ $clinit_NodeLabelLocation(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_nodespacing_internal_NodeLabelLocation_2_classLit, 1), $intern_37, 164, 0, [OUT_T_L, OUT_T_C, OUT_T_R, OUT_B_L, OUT_B_C, OUT_B_R, OUT_L_T, OUT_L_C, OUT_L_B, OUT_R_T, OUT_R_C, OUT_R_B, IN_T_L, IN_T_C, IN_T_R, IN_C_L, IN_C_C, IN_C_R, IN_B_L, IN_B_C, IN_B_R, UNDEFINED]); } defineClass(164, 22, {3:1, 34:1, 22:1, 164:1}, NodeLabelLocation); var IN_B_C, IN_B_L, IN_B_R, IN_C_C, IN_C_L, IN_C_R, IN_T_C, IN_T_L, IN_T_R, OUT_B_C, OUT_B_L, OUT_B_R, OUT_L_B, OUT_L_C, OUT_L_T, OUT_R_B, OUT_R_C, OUT_R_T, OUT_T_C, OUT_T_L, OUT_T_R, UNDEFINED; var Lorg_eclipse_elk_alg_common_nodespacing_internal_NodeLabelLocation_2_classLit = createForEnum('org.eclipse.elk.alg.common.nodespacing.internal', 'NodeLabelLocation', 164, Ljava_lang_Enum_2_classLit, values_26, valueOf_18); function $clinit_NodeLabelLocation$Map(){ $clinit_NodeLabelLocation$Map = emptyMethod; $MAP_8 = createValueOfMap(values_26()); } var $MAP_8; function $applyPortPosition(this$static){ this$static.port.setPosition(this$static.portPosition); } function PortContext(parentNodeContext, port){ var portLabelsNextToPort; this.portMargin = new ElkMargin; this.port = port; this.portPosition = new KVector_2(port.getPosition()); portLabelsNextToPort = parentNodeContext.portLabelsPlacement.contains(($clinit_PortLabelPlacement() , NEXT_TO_PORT_IF_POSSIBLE_0)); parentNodeContext.portLabelsPlacement.contains(INSIDE_0)?parentNodeContext.treatAsCompoundNode?(this.labelsNextToPort = portLabelsNextToPort && !port.hasCompoundConnections()):(this.labelsNextToPort = true):parentNodeContext.portLabelsPlacement.contains(OUTSIDE_0)?portLabelsNextToPort?(this.labelsNextToPort = !(port.getIncomingEdges().iterator_0().hasNext_0() || port.getOutgoingEdges().iterator_0().hasNext_0())):(this.labelsNextToPort = false):(this.labelsNextToPort = false); } defineClass(117, 1, {117:1}, PortContext); _.labelsNextToPort = false; var Lorg_eclipse_elk_alg_common_nodespacing_internal_PortContext_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing.internal', 'PortContext', 117); function configureCellSystemSizeContributions(nodeContext){ var freePortPlacement, labelCell, location_0, location$array, location$index, location$max, overhang; if (nodeContext.sizeConstraints.isEmpty()) { return; } if (nodeContext.sizeConstraints.contains(($clinit_SizeConstraint() , PORTS_0))) { castTo($get_14(nodeContext.insidePortLabelCells, ($clinit_PortSide() , NORTH_3)), 127).contributesToMinimumWidth = true; castTo($get_14(nodeContext.insidePortLabelCells, SOUTH_2), 127).contributesToMinimumWidth = true; freePortPlacement = nodeContext.portConstraints != ($clinit_PortConstraints() , FIXED_RATIO) && nodeContext.portConstraints != FIXED_POS; $setContributesToMinimumHeight(castTo($get_14(nodeContext.insidePortLabelCells, EAST_2), 127), freePortPlacement); $setContributesToMinimumHeight(castTo($get_14(nodeContext.insidePortLabelCells, WEST_2), 127), freePortPlacement); $setContributesToMinimumHeight(nodeContext.nodeContainerMiddleRow, freePortPlacement); if (nodeContext.sizeConstraints.contains(PORT_LABELS)) { castTo($get_14(nodeContext.insidePortLabelCells, NORTH_3), 127).contributesToMinimumHeight = true; castTo($get_14(nodeContext.insidePortLabelCells, SOUTH_2), 127).contributesToMinimumHeight = true; castTo($get_14(nodeContext.insidePortLabelCells, EAST_2), 127).contributesToMinimumWidth = true; castTo($get_14(nodeContext.insidePortLabelCells, WEST_2), 127).contributesToMinimumWidth = true; nodeContext.nodeContainerMiddleRow.contributesToMinimumWidth = true; } } if (nodeContext.sizeConstraints.contains(NODE_LABELS)) { nodeContext.insideNodeLabelContainer.contributesToMinimumHeight = true; nodeContext.insideNodeLabelContainer.contributesToMinimumWidth = true; nodeContext.nodeContainerMiddleRow.contributesToMinimumHeight = true; nodeContext.nodeContainerMiddleRow.contributesToMinimumWidth = true; overhang = nodeContext.sizeOptions.contains(($clinit_SizeOptions() , OUTSIDE_NODE_LABELS_OVERHANG)); for (location$array = values_26() , location$index = 0 , location$max = location$array.length; location$index < location$max; ++location$index) { location_0 = location$array[location$index]; labelCell = castTo($get_14(nodeContext.nodeLabelCells, location_0), 314); if (labelCell) { if ($isInsideLocation(location_0)) { labelCell.contributesToMinimumHeight = true; labelCell.contributesToMinimumWidth = true; } else { labelCell.contributesToMinimumHeight = !overhang; labelCell.contributesToMinimumWidth = !overhang; } } } } if (nodeContext.sizeConstraints.contains(MINIMUM_SIZE) && nodeContext.sizeOptions.contains(($clinit_SizeOptions() , MINIMUM_SIZE_ACCOUNTS_FOR_PADDING))) { nodeContext.nodeContainerMiddleRow.contributesToMinimumHeight = true; nodeContext.nodeContainerMiddleRow.contributesToMinimumHeight = true; if (!nodeContext.insideNodeLabelContainer.contributesToMinimumHeight) { nodeContext.insideNodeLabelContainer.contributesToMinimumHeight = true; nodeContext.insideNodeLabelContainer.contributesToMinimumWidth = true; nodeContext.insideNodeLabelContainer.onlyCenterCellContributesToMinimumSize = true; } } } function updateVerticalInsidePortLabelCellPadding(nodeContext){ var bottomBorderOffset, bottomPadding, eastCell, topBorderOffset, topPadding, westCell; if (nodeContext.portConstraints == ($clinit_PortConstraints() , FIXED_RATIO) || nodeContext.portConstraints == FIXED_POS) { return; } topBorderOffset = nodeContext.nodeContainer.padding.top_0 + $getMinimumHeight(castTo($get_14(nodeContext.insidePortLabelCells, ($clinit_PortSide() , NORTH_3)), 127)) + nodeContext.labelCellSpacing; bottomBorderOffset = nodeContext.nodeContainer.padding.bottom + $getMinimumHeight(castTo($get_14(nodeContext.insidePortLabelCells, SOUTH_2), 127)) + nodeContext.labelCellSpacing; eastCell = castTo($get_14(nodeContext.insidePortLabelCells, EAST_2), 127); westCell = castTo($get_14(nodeContext.insidePortLabelCells, WEST_2), 127); topPadding = $wnd.Math.max(0, eastCell.padding.top_0 - topBorderOffset); topPadding = $wnd.Math.max(topPadding, westCell.padding.top_0 - topBorderOffset); bottomPadding = $wnd.Math.max(0, eastCell.padding.bottom - bottomBorderOffset); bottomPadding = $wnd.Math.max(bottomPadding, westCell.padding.bottom - bottomBorderOffset); eastCell.padding.top_0 = topPadding; westCell.padding.top_0 = topPadding; eastCell.padding.bottom = bottomPadding; westCell.padding.bottom = bottomPadding; } function calculateHorizontalNodeSizeRequiredByFixedPosPorts(nodeContext, portSide){ var cell, portContext, portContext$iterator, rightmostPortBorder; rightmostPortBorder = 0; for (portContext$iterator = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).iterator_0(); portContext$iterator.hasNext_0();) { portContext = castTo(portContext$iterator.next_1(), 117); rightmostPortBorder = $wnd.Math.max(rightmostPortBorder, portContext.portPosition.x_0 + portContext.port.getSize().x_0); } cell = castTo($get_14(nodeContext.insidePortLabelCells, portSide), 127); cell.padding.left = 0; cell.minimumContentAreaSize.x_0 = rightmostPortBorder; } function calculateHorizontalNodeSizeRequiredByFixedRatioPorts(nodeContext, portSide){ var cell, currentPortContext, currentPortRatio, currentPortWidth, minWidth, portContextIterator, portContexts, portLabelsInside, previousPortContext, previousPortRatio, previousPortWidth, requiredSpace; cell = castTo($get_14(nodeContext.insidePortLabelCells, portSide), 127); portContexts = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87); if (portContexts.isEmpty()) { cell.padding.left = 0; cell.padding.right = 0; return; } portLabelsInside = nodeContext.portLabelsPlacement.contains(($clinit_PortLabelPlacement() , INSIDE_0)); minWidth = 0; portContextIterator = portContexts.iterator_0(); previousPortContext = null; previousPortRatio = 0; previousPortWidth = 0; while (portContextIterator.hasNext_0()) { currentPortContext = castTo(portContextIterator.next_1(), 117); currentPortRatio = $doubleValue(castToDouble(currentPortContext.port.getProperty(($clinit_PortPlacementCalculator() , PORT_RATIO_OR_POSITION)))); currentPortWidth = currentPortContext.port.getSize().x_0; nodeContext.sizeConstraints.contains(($clinit_SizeConstraint() , PORT_LABELS)) && setupPortMargins(nodeContext, portSide); if (!previousPortContext) { !!nodeContext.surroundingPortMargins && nodeContext.surroundingPortMargins.left > 0 && (minWidth = $wnd.Math.max(minWidth, minSizeRequiredToRespectSpacing(nodeContext.surroundingPortMargins.left + currentPortContext.portMargin.left, currentPortRatio))); } else { requiredSpace = previousPortWidth + previousPortContext.portMargin.right + nodeContext.portPortSpacing + currentPortContext.portMargin.left; minWidth = $wnd.Math.max(minWidth, ($clinit_DoubleMath() , checkNonNegative($intern_94) , $wnd.Math.abs(previousPortRatio - currentPortRatio) <= $intern_94 || previousPortRatio == currentPortRatio || isNaN(previousPortRatio) && isNaN(currentPortRatio)?0:requiredSpace / (currentPortRatio - previousPortRatio))); } previousPortContext = currentPortContext; previousPortRatio = currentPortRatio; previousPortWidth = currentPortWidth; } if (!!nodeContext.surroundingPortMargins && nodeContext.surroundingPortMargins.right > 0) { requiredSpace = previousPortWidth + nodeContext.surroundingPortMargins.right; portLabelsInside && (requiredSpace += previousPortContext.portMargin.right); minWidth = $wnd.Math.max(minWidth, ($clinit_DoubleMath() , checkNonNegative($intern_94) , $wnd.Math.abs(previousPortRatio - 1) <= $intern_94 || previousPortRatio == 1 || isNaN(previousPortRatio) && isNaN(1)?0:requiredSpace / (1 - previousPortRatio))); } cell.padding.left = 0; cell.minimumContentAreaSize.x_0 = minWidth; } function calculateHorizontalNodeSizeRequiredByFreePorts(nodeContext, portSide){ var cell, width_0; cell = castTo($get_14(nodeContext.insidePortLabelCells, portSide), 127); if (castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).isEmpty()) { cell.padding.left = 0; cell.padding.right = 0; return; } cell.padding.left = nodeContext.surroundingPortMargins.left; cell.padding.right = nodeContext.surroundingPortMargins.right; nodeContext.sizeConstraints.contains(($clinit_SizeConstraint() , PORT_LABELS)) && setupPortMargins(nodeContext, portSide); width_0 = portWidthPlusPortPortSpacing(nodeContext, portSide); $getPortAlignment(nodeContext, portSide) == ($clinit_PortAlignment() , DISTRIBUTED) && (width_0 += 2 * nodeContext.portPortSpacing); cell.minimumContentAreaSize.x_0 = width_0; } function calculateHorizontalPortPlacementSize(nodeContext){ switch (nodeContext.portConstraints.ordinal) { case 5: calculateHorizontalNodeSizeRequiredByFixedPosPorts(nodeContext, ($clinit_PortSide() , NORTH_3)); calculateHorizontalNodeSizeRequiredByFixedPosPorts(nodeContext, SOUTH_2); break; case 4: calculateHorizontalNodeSizeRequiredByFixedRatioPorts(nodeContext, ($clinit_PortSide() , NORTH_3)); calculateHorizontalNodeSizeRequiredByFixedRatioPorts(nodeContext, SOUTH_2); break; default:calculateHorizontalNodeSizeRequiredByFreePorts(nodeContext, ($clinit_PortSide() , NORTH_3)); calculateHorizontalNodeSizeRequiredByFreePorts(nodeContext, SOUTH_2); } } function computeHorizontalPortMargins(nodeContext, portSide){ var labelWidth, labelsBounds, overhang, portContext, portContext$iterator, portWidth; for (portContext$iterator = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).iterator_0(); portContext$iterator.hasNext_0();) { portContext = castTo(portContext$iterator.next_1(), 117); labelWidth = portContext.portLabelCell?$getMinimumWidth(portContext.portLabelCell):0; if (labelWidth > 0) { if (portContext.labelsNextToPort) { portWidth = portContext.port.getSize().x_0; if (labelWidth > portWidth) { overhang = (labelWidth - portWidth) / 2; portContext.portMargin.left = overhang; portContext.portMargin.right = overhang; } } else { portContext.portMargin.right = nodeContext.portLabelSpacingHorizontal + labelWidth; } } else if (isFixed(nodeContext.portLabelsPlacement)) { labelsBounds = getLabelsBounds(portContext.port); labelsBounds.x_0 < 0 && (portContext.portMargin.left = -labelsBounds.x_0); labelsBounds.x_0 + labelsBounds.width_0 > portContext.port.getSize().x_0 && (portContext.portMargin.right = labelsBounds.x_0 + labelsBounds.width_0 - portContext.port.getSize().x_0); } } } function minSizeRequiredToRespectSpacing(spacing, secondRatio){ return $clinit_DoubleMath() , checkNonNegative($intern_94) , $wnd.Math.abs(0 - secondRatio) <= $intern_94 || 0 == secondRatio || isNaN(0) && isNaN(secondRatio)?0:spacing / secondRatio; } function portWidthPlusPortPortSpacing(nodeContext, portSide){ var portContext, portContextIterator, result; result = 0; portContextIterator = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).iterator_0(); while (portContextIterator.hasNext_0()) { portContext = castTo(portContextIterator.next_1(), 117); result += portContext.portMargin.left + portContext.port.getSize().x_0 + portContext.portMargin.right; portContextIterator.hasNext_0() && (result += nodeContext.portPortSpacing); } return result; } function setupPortMargins(nodeContext, portSide){ var alwaysSameSide, alwaysSameSideAbove, leftmostPortContext, portContextIterator, portContexts, portLabelsOutside, rightmostPortContext, spaceEfficient, spaceEfficientPortLabels, uniformPortSpacing; portContexts = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87); portLabelsOutside = nodeContext.portLabelsPlacement.contains(($clinit_PortLabelPlacement() , OUTSIDE_0)); alwaysSameSide = nodeContext.portLabelsPlacement.contains(ALWAYS_SAME_SIDE); alwaysSameSideAbove = nodeContext.portLabelsPlacement.contains(ALWAYS_OTHER_SAME_SIDE); spaceEfficient = nodeContext.portLabelsPlacement.contains(SPACE_EFFICIENT_0); uniformPortSpacing = nodeContext.sizeOptions.contains(($clinit_SizeOptions() , UNIFORM_PORT_SPACING)); spaceEfficientPortLabels = !alwaysSameSide && !alwaysSameSideAbove && (spaceEfficient || portContexts.size_1() == 2); computeHorizontalPortMargins(nodeContext, portSide); leftmostPortContext = null; rightmostPortContext = null; if (portLabelsOutside) { portContextIterator = portContexts.iterator_0(); leftmostPortContext = castTo(portContextIterator.next_1(), 117); rightmostPortContext = leftmostPortContext; while (portContextIterator.hasNext_0()) { rightmostPortContext = castTo(portContextIterator.next_1(), 117); } leftmostPortContext.portMargin.left = 0; rightmostPortContext.portMargin.right = 0; spaceEfficientPortLabels && !leftmostPortContext.labelsNextToPort && (leftmostPortContext.portMargin.right = 0); } if (uniformPortSpacing) { unifyPortMargins(portContexts); if (portLabelsOutside) { leftmostPortContext.portMargin.left = 0; rightmostPortContext.portMargin.right = 0; } } } function unifyPortMargins(portContexts){ var maxLeft, maxRight, portContext, portContext$iterator, portContext$iterator0; maxLeft = 0; maxRight = 0; for (portContext$iterator0 = portContexts.iterator_0(); portContext$iterator0.hasNext_0();) { portContext = castTo(portContext$iterator0.next_1(), 117); maxLeft = $wnd.Math.max(maxLeft, portContext.portMargin.left); maxRight = $wnd.Math.max(maxRight, portContext.portMargin.right); } for (portContext$iterator = portContexts.iterator_0(); portContext$iterator.hasNext_0();) { portContext = castTo(portContext$iterator.next_1(), 117); portContext.portMargin.left = maxLeft; portContext.portMargin.right = maxRight; } } function calculateWidthDueToLabels(nodeContext, portSide){ var minCellSize, portContext, portContext$iterator, theAppropriateCell; theAppropriateCell = castTo($get_14(nodeContext.insidePortLabelCells, portSide), 127); minCellSize = theAppropriateCell.minimumContentAreaSize; for (portContext$iterator = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).iterator_0(); portContext$iterator.hasNext_0();) { portContext = castTo(portContext$iterator.next_1(), 117); !!portContext.portLabelCell && (minCellSize.x_0 = $wnd.Math.max(minCellSize.x_0, $getMinimumWidth(portContext.portLabelCell))); } if (minCellSize.x_0 > 0) { switch (portSide.ordinal) { case 2: theAppropriateCell.padding.right = nodeContext.portLabelSpacingHorizontal; break; case 4: theAppropriateCell.padding.left = nodeContext.portLabelSpacingHorizontal; } } } function createInsidePortLabelCell(nodeContext, container, containerArea, portSide){ var portLabelCell; portLabelCell = new AtomicCell; container.cells_0[containerArea.ordinal] = portLabelCell; $put_7(nodeContext.insidePortLabelCells, portSide, portLabelCell); } function setupEastOrWestPortLabelCell(nodeContext, portSide){ nodeContext.portLabelsPlacement.contains(($clinit_PortLabelPlacement() , INSIDE_0)) && calculateWidthDueToLabels(nodeContext, portSide); setupTopAndBottomPadding(nodeContext, portSide); } function setupNorthOrSouthPortLabelCell(nodeContext, portSide){ var padding; padding = castTo($get_14(nodeContext.insidePortLabelCells, portSide), 127).padding; switch (portSide.ordinal) { case 1: nodeContext.portLabelSpacingVertical >= 0 && (padding.top_0 = nodeContext.portLabelSpacingVertical); break; case 3: nodeContext.portLabelSpacingVertical >= 0 && (padding.bottom = nodeContext.portLabelSpacingVertical); } if (nodeContext.surroundingPortMargins) { padding.left = nodeContext.surroundingPortMargins.left; padding.right = nodeContext.surroundingPortMargins.right; } } function setupTopAndBottomPadding(nodeContext, portSide){ var padding; if (nodeContext.surroundingPortMargins) { padding = castTo($get_14(nodeContext.insidePortLabelCells, portSide), 127).padding; padding.top_0 = nodeContext.surroundingPortMargins.top_0; padding.bottom = nodeContext.surroundingPortMargins.bottom; } } function placeHorizontalOuterNodeLabelContainer(nodeContext, outerNodeLabelsOverhang, portSide){ var nodeLabelContainer, nodeLabelContainerRect, nodeSize; nodeSize = nodeContext.nodeSize; nodeLabelContainer = castTo($get_14(nodeContext.outsideNodeLabelContainers, portSide), 252); nodeLabelContainerRect = nodeLabelContainer.cellRectangle; nodeLabelContainerRect.width_0 = $getMinimumWidth_0(nodeLabelContainer); nodeLabelContainerRect.height = $getMinimumHeight_1(nodeLabelContainer); nodeLabelContainerRect.width_0 = $wnd.Math.max(nodeLabelContainerRect.width_0, nodeSize.x_0); nodeLabelContainerRect.width_0 > nodeSize.x_0 && !outerNodeLabelsOverhang && (nodeLabelContainerRect.width_0 = nodeSize.x_0); nodeLabelContainerRect.x_0 = -(nodeLabelContainerRect.width_0 - nodeSize.x_0) / 2; switch (portSide.ordinal) { case 1: nodeLabelContainerRect.y_0 = -nodeLabelContainerRect.height; break; case 3: nodeLabelContainerRect.y_0 = nodeSize.y_0; } $layoutChildrenHorizontally(nodeLabelContainer); $layoutChildrenVertically(nodeLabelContainer); } function placeVerticalOuterNodeLabelContainer(nodeContext, outerNodeLabelsOverhang, portSide){ var nodeLabelContainer, nodeLabelContainerRect, nodeSize; nodeSize = nodeContext.nodeSize; nodeLabelContainer = castTo($get_14(nodeContext.outsideNodeLabelContainers, portSide), 252); nodeLabelContainerRect = nodeLabelContainer.cellRectangle; nodeLabelContainerRect.width_0 = $getMinimumWidth_0(nodeLabelContainer); nodeLabelContainerRect.height = $getMinimumHeight_1(nodeLabelContainer); nodeLabelContainerRect.height = $wnd.Math.max(nodeLabelContainerRect.height, nodeSize.y_0); nodeLabelContainerRect.height > nodeSize.y_0 && !outerNodeLabelsOverhang && (nodeLabelContainerRect.height = nodeSize.y_0); nodeLabelContainerRect.y_0 = -(nodeLabelContainerRect.height - nodeSize.y_0) / 2; switch (portSide.ordinal) { case 4: nodeLabelContainerRect.x_0 = -nodeLabelContainerRect.width_0; break; case 2: nodeLabelContainerRect.x_0 = nodeSize.x_0; } $layoutChildrenHorizontally(nodeLabelContainer); $layoutChildrenVertically(nodeLabelContainer); } function LabelPlacer$lambda$0$Type(){ } defineClass(1541, 1, $intern_19, LabelPlacer$lambda$0$Type); _.accept = function accept_47(arg0){ $applyLabelLayout(castTo(arg0, 314)); } ; var Lorg_eclipse_elk_alg_common_nodespacing_internal_algorithm_LabelPlacer$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing.internal.algorithm', 'LabelPlacer/lambda$0$Type', 1541); function LabelPlacer$lambda$1$Type(){ } defineClass(1542, 1, $intern_40, LabelPlacer$lambda$1$Type); _.test_0 = function test_9(arg0){ return !!castTo(arg0, 117).portLabelCell; } ; var Lorg_eclipse_elk_alg_common_nodespacing_internal_algorithm_LabelPlacer$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing.internal.algorithm', 'LabelPlacer/lambda$1$Type', 1542); function LabelPlacer$lambda$2$Type(){ } defineClass(1543, 1, $intern_19, LabelPlacer$lambda$2$Type); _.accept = function accept_48(arg0){ $applyLabelLayout(castTo(arg0, 117).portLabelCell); } ; var Lorg_eclipse_elk_alg_common_nodespacing_internal_algorithm_LabelPlacer$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing.internal.algorithm', 'LabelPlacer/lambda$2$Type', 1543); function $clinit_NodeLabelAndSizeUtilities(){ $clinit_NodeLabelAndSizeUtilities = emptyMethod; EFFECTIVELY_FIXED_SIZE_CONSTRAINTS = of_1(($clinit_SizeConstraint() , PORT_LABELS)); } function getMinimumNodeOrClientAreaSize(nodeContext){ $clinit_NodeLabelAndSizeUtilities(); var minSize; minSize = new KVector_2(castTo(nodeContext.node.getProperty(($clinit_CoreOptions() , NODE_SIZE_MINIMUM_5)), 8)); if (nodeContext.sizeOptions.contains(($clinit_SizeOptions() , DEFAULT_MINIMUM_SIZE))) { minSize.x_0 <= 0 && (minSize.x_0 = 20); minSize.y_0 <= 0 && (minSize.y_0 = 20); } return minSize; } function getMinimumNodeSize(nodeContext){ $clinit_NodeLabelAndSizeUtilities(); if (nodeContext.sizeConstraints.contains(($clinit_SizeConstraint() , MINIMUM_SIZE))) { if (!nodeContext.sizeOptions.contains(($clinit_SizeOptions() , MINIMUM_SIZE_ACCOUNTS_FOR_PADDING))) { return getMinimumNodeOrClientAreaSize(nodeContext); } } return null; } function isFirstOutsidePortLabelPlacedDifferently(nodeContext, portSide){ $clinit_NodeLabelAndSizeUtilities(); var alwaysSameSide, firstPort, portContexts, spaceEfficient; portContexts = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87); if (portContexts.size_1() >= 2) { firstPort = castTo(portContexts.iterator_0().next_1(), 117); alwaysSameSide = nodeContext.portLabelsPlacement.contains(($clinit_PortLabelPlacement() , ALWAYS_SAME_SIDE)); spaceEfficient = nodeContext.portLabelsPlacement.contains(SPACE_EFFICIENT_0); return !firstPort.labelsNextToPort && !alwaysSameSide && (portContexts.size_1() == 2 || spaceEfficient); } else { return false; } } function offsetSouthernPortsByNodeSize(nodeContext){ $clinit_NodeLabelAndSizeUtilities(); var nodeHeight, portContext, portContext$iterator, portPosition; nodeHeight = nodeContext.nodeSize.y_0; for (portContext$iterator = castTo(castTo($get(nodeContext.portContexts, ($clinit_PortSide() , SOUTH_2)), 21), 87).iterator_0(); portContext$iterator.hasNext_0();) { portContext = castTo(portContext$iterator.next_1(), 117); portPosition = portContext.portPosition; portPosition.y_0 += nodeHeight; } } function setNodePadding(nodeContext){ $clinit_NodeLabelAndSizeUtilities(); var clientArea, nodePadding, nodeRect; if (!nodeContext.sizeOptions.contains(($clinit_SizeOptions() , COMPUTE_PADDING))) { return; } nodeRect = nodeContext.nodeContainer.cellRectangle; clientArea = new ElkRectangle_1(nodeContext.insideNodeLabelContainer.centerCellRect); nodePadding = new ElkPadding; nodePadding.left = clientArea.x_0 - nodeRect.x_0; nodePadding.top_0 = clientArea.y_0 - nodeRect.y_0; nodePadding.right = nodeRect.x_0 + nodeRect.width_0 - (clientArea.x_0 + clientArea.width_0); nodePadding.bottom = nodeRect.y_0 + nodeRect.height - (clientArea.y_0 + clientArea.height); nodeContext.node.setPadding(nodePadding); } function setupNodePaddingForPortsWithOffset(nodeContext){ $clinit_NodeLabelAndSizeUtilities(); var insidePart, insidePartIsBigger, nodeCellPadding, portBorderOffset, portContext, portContext$iterator, symmetry; nodeCellPadding = nodeContext.nodeContainer.padding; for (portContext$iterator = $values_0(nodeContext.portContexts).this$01.valueIterator_0(); portContext$iterator.hasNext_0();) { portContext = castTo(portContext$iterator.next_1(), 117); portBorderOffset = 0; if (portContext.port.hasProperty(($clinit_CoreOptions() , PORT_BORDER_OFFSET_0))) { portBorderOffset = $doubleValue(castToDouble(portContext.port.getProperty(PORT_BORDER_OFFSET_0))); if (portBorderOffset < 0) { switch (portContext.port.getSide().ordinal) { case 1: nodeCellPadding.top_0 = $wnd.Math.max(nodeCellPadding.top_0, -portBorderOffset); break; case 3: nodeCellPadding.bottom = $wnd.Math.max(nodeCellPadding.bottom, -portBorderOffset); break; case 2: nodeCellPadding.right = $wnd.Math.max(nodeCellPadding.right, -portBorderOffset); break; case 4: nodeCellPadding.left = $wnd.Math.max(nodeCellPadding.left, -portBorderOffset); } } } if (isFixed(nodeContext.portLabelsPlacement)) { insidePart = computeInsidePart_0(portContext.port, portBorderOffset); symmetry = !castTo(nodeContext.node.getProperty(NODE_SIZE_OPTIONS_6), 181).contains(($clinit_SizeOptions() , ASYMMETRICAL)); insidePartIsBigger = false; switch (portContext.port.getSide().ordinal) { case 1: insidePartIsBigger = insidePart > nodeCellPadding.top_0; nodeCellPadding.top_0 = $wnd.Math.max(nodeCellPadding.top_0, insidePart); if (symmetry && insidePartIsBigger) { nodeCellPadding.top_0 = $wnd.Math.max(nodeCellPadding.top_0, nodeCellPadding.bottom); nodeCellPadding.bottom = nodeCellPadding.top_0 + portBorderOffset; } break; case 3: insidePartIsBigger = insidePart > nodeCellPadding.bottom; nodeCellPadding.bottom = $wnd.Math.max(nodeCellPadding.bottom, insidePart); if (symmetry && insidePartIsBigger) { nodeCellPadding.bottom = $wnd.Math.max(nodeCellPadding.bottom, nodeCellPadding.top_0); nodeCellPadding.top_0 = nodeCellPadding.bottom + portBorderOffset; } break; case 2: insidePartIsBigger = insidePart > nodeCellPadding.right; nodeCellPadding.right = $wnd.Math.max(nodeCellPadding.right, insidePart); if (symmetry && insidePartIsBigger) { nodeCellPadding.right = $wnd.Math.max(nodeCellPadding.left, nodeCellPadding.right); nodeCellPadding.left = nodeCellPadding.right + portBorderOffset; } break; case 4: insidePartIsBigger = insidePart > nodeCellPadding.left; nodeCellPadding.left = $wnd.Math.max(nodeCellPadding.left, insidePart); if (symmetry && insidePartIsBigger) { nodeCellPadding.left = $wnd.Math.max(nodeCellPadding.left, nodeCellPadding.right); nodeCellPadding.right = nodeCellPadding.left + portBorderOffset; } } } } } var EFFECTIVELY_FIXED_SIZE_CONSTRAINTS; function NodeLabelAndSizeUtilities$lambda$0$Type(){ } defineClass(1540, 1, $intern_19, NodeLabelAndSizeUtilities$lambda$0$Type); _.accept = function accept_49(arg0){ $clinit_NodeLabelAndSizeUtilities(); $applyPortPosition(castTo(arg0, 117)); } ; var Lorg_eclipse_elk_alg_common_nodespacing_internal_algorithm_NodeLabelAndSizeUtilities$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing.internal.algorithm', 'NodeLabelAndSizeUtilities/lambda$0$Type', 1540); function createNodeLabelCellContainers(nodeContext, onlyInside){ var eastContainer, northContainer, southContainer, symmetry, tabularNodeLabels, westContainer; symmetry = !nodeContext.sizeOptions.contains(($clinit_SizeOptions() , ASYMMETRICAL)); tabularNodeLabels = nodeContext.sizeOptions.contains(FORCE_TABULAR_NODE_LABELS); nodeContext.insideNodeLabelContainer = new GridContainerCell(tabularNodeLabels, symmetry, nodeContext.labelCellSpacing); !!nodeContext.nodeLabelsPadding && $copy(nodeContext.insideNodeLabelContainer.padding, nodeContext.nodeLabelsPadding); $setCell_0(nodeContext.nodeContainerMiddleRow, ($clinit_ContainerArea() , CENTER), nodeContext.insideNodeLabelContainer); if (!onlyInside) { northContainer = new StripContainerCell(1, symmetry, nodeContext.labelCellSpacing); northContainer.padding.bottom = nodeContext.nodeLabelSpacing; $put_7(nodeContext.outsideNodeLabelContainers, ($clinit_PortSide() , NORTH_3), northContainer); southContainer = new StripContainerCell(1, symmetry, nodeContext.labelCellSpacing); southContainer.padding.top_0 = nodeContext.nodeLabelSpacing; $put_7(nodeContext.outsideNodeLabelContainers, SOUTH_2, southContainer); westContainer = new StripContainerCell(0, symmetry, nodeContext.labelCellSpacing); westContainer.padding.right = nodeContext.nodeLabelSpacing; $put_7(nodeContext.outsideNodeLabelContainers, WEST_2, westContainer); eastContainer = new StripContainerCell(0, symmetry, nodeContext.labelCellSpacing); eastContainer.padding.left = nodeContext.nodeLabelSpacing; $put_7(nodeContext.outsideNodeLabelContainers, EAST_2, eastContainer); } } function createNodeLabelCells(nodeContext, horizontalLayoutMode){ createNodeLabelCellContainers(nodeContext, true); $forEach_1(nodeContext.node.getLabels(), new NodeLabelCellCreator$lambda$0$Type(nodeContext, true, horizontalLayoutMode)); } function handleNodeLabel(nodeContext, label_0, onlyInside, horizontalLayoutMode){ var labelLocation, labelPlacement; labelPlacement = label_0.hasProperty(($clinit_CoreOptions() , NODE_LABELS_PLACEMENT_5))?castTo(label_0.getProperty(NODE_LABELS_PLACEMENT_5), 21):nodeContext.nodeLabelPlacement; labelLocation = fromNodeLabelPlacement(labelPlacement); if (labelLocation == ($clinit_NodeLabelLocation() , UNDEFINED)) { return; } if (onlyInside && !$isInsideLocation(labelLocation)) { return; } $addLabel(retrieveNodeLabelCell(nodeContext, labelLocation, horizontalLayoutMode), label_0); } function lambda$0_10(nodeContext_0, onlyInside_1, horizontalLayoutMode_2, label_3){ handleNodeLabel(nodeContext_0, label_3, onlyInside_1, horizontalLayoutMode_2); } function retrieveNodeLabelCell(nodeContext, nodeLabelLocation, horizontalLayoutMode){ var containerCell, nodeLabelCell, outsideSide; nodeLabelCell = castTo($get_14(nodeContext.nodeLabelCells, nodeLabelLocation), 314); if (!nodeLabelCell) { nodeLabelCell = new LabelCell_0(nodeContext.labelLabelSpacing, nodeLabelLocation, horizontalLayoutMode); $put_7(nodeContext.nodeLabelCells, nodeLabelLocation, nodeLabelCell); if ($isInsideLocation(nodeLabelLocation)) { $setCell(nodeContext.insideNodeLabelContainer, nodeLabelLocation.containerRow, nodeLabelLocation.containerColumn, nodeLabelCell); } else { outsideSide = $getOutsideSide(nodeLabelLocation); containerCell = castTo($get_14(nodeContext.outsideNodeLabelContainers, outsideSide), 252); switch (outsideSide.ordinal) { case 1: case 3: nodeLabelCell.contributesToMinimumHeight = true; $setCell_0(containerCell, nodeLabelLocation.containerColumn, nodeLabelCell); break; case 4: case 2: nodeLabelCell.contributesToMinimumWidth = true; $setCell_0(containerCell, nodeLabelLocation.containerRow, nodeLabelCell); } } } return nodeLabelCell; } function NodeLabelCellCreator$lambda$0$Type(nodeContext_0, onlyInside_1, horizontalLayoutMode_2){ this.nodeContext_0 = nodeContext_0; this.onlyInside_1 = onlyInside_1; this.horizontalLayoutMode_2 = horizontalLayoutMode_2; } defineClass(801, 1, $intern_19, NodeLabelCellCreator$lambda$0$Type); _.accept = function accept_50(arg0){ lambda$0_10(this.nodeContext_0, this.onlyInside_1, this.horizontalLayoutMode_2, castTo(arg0, 187)); } ; _.horizontalLayoutMode_2 = false; _.onlyInside_1 = false; var Lorg_eclipse_elk_alg_common_nodespacing_internal_algorithm_NodeLabelCellCreator$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing.internal.algorithm', 'NodeLabelCellCreator/lambda$0$Type', 801); function setNodeHeight(nodeContext){ var height, minNodeSize, nodeCellRectangle, nodeSize; nodeSize = nodeContext.nodeSize; $clinit_NodeLabelAndSizeUtilities(); if (nodeContext.sizeConstraints.isEmpty() || equals_Ljava_lang_Object__Z__devirtual$(nodeContext.sizeConstraints, EFFECTIVELY_FIXED_SIZE_CONSTRAINTS)) { height = nodeSize.y_0; } else { nodeContext.topdownLayout?(height = $wnd.Math.max(nodeSize.y_0, $getMinimumHeight_1(nodeContext.nodeContainer))):(height = $getMinimumHeight_1(nodeContext.nodeContainer)); if (nodeContext.sizeConstraints.contains(($clinit_SizeConstraint() , NODE_LABELS)) && !nodeContext.sizeOptions.contains(($clinit_SizeOptions() , OUTSIDE_NODE_LABELS_OVERHANG))) { height = $wnd.Math.max(height, $getMinimumHeight_1(castTo($get_14(nodeContext.outsideNodeLabelContainers, ($clinit_PortSide() , EAST_2)), 252))); height = $wnd.Math.max(height, $getMinimumHeight_1(castTo($get_14(nodeContext.outsideNodeLabelContainers, WEST_2), 252))); } minNodeSize = getMinimumNodeSize(nodeContext); !!minNodeSize && (height = $wnd.Math.max(height, minNodeSize.y_0)); if (nodeContext.sizeConstraints.contains(PORTS_0)) { if (nodeContext.portConstraints == ($clinit_PortConstraints() , FIXED_RATIO) || nodeContext.portConstraints == FIXED_POS) { height = $wnd.Math.max(height, $getMinimumHeight(castTo($get_14(nodeContext.insidePortLabelCells, ($clinit_PortSide() , EAST_2)), 127))); height = $wnd.Math.max(height, $getMinimumHeight(castTo($get_14(nodeContext.insidePortLabelCells, WEST_2), 127))); } } } $booleanValue(castToBoolean(nodeContext.node.getGraph().getProperty(($clinit_CoreOptions() , NODE_SIZE_FIXED_GRAPH_SIZE_3))))?(nodeSize.y_0 = $wnd.Math.max(nodeSize.y_0, height)):(nodeSize.y_0 = height); nodeCellRectangle = nodeContext.nodeContainer.cellRectangle; nodeCellRectangle.y_0 = 0; nodeCellRectangle.height = height; $layoutChildrenVertically(nodeContext.nodeContainer); } function setNodeWidth(nodeContext){ var minNodeSize, nodeCellRectangle, nodeSize, width_0; nodeSize = nodeContext.nodeSize; $clinit_NodeLabelAndSizeUtilities(); if (nodeContext.sizeConstraints.isEmpty() || equals_Ljava_lang_Object__Z__devirtual$(nodeContext.sizeConstraints, EFFECTIVELY_FIXED_SIZE_CONSTRAINTS)) { width_0 = nodeSize.x_0; } else { nodeContext.topdownLayout?(width_0 = $wnd.Math.max(nodeSize.x_0, $getMinimumWidth_0(nodeContext.nodeContainer))):(width_0 = $getMinimumWidth_0(nodeContext.nodeContainer)); if (nodeContext.sizeConstraints.contains(($clinit_SizeConstraint() , NODE_LABELS)) && !nodeContext.sizeOptions.contains(($clinit_SizeOptions() , OUTSIDE_NODE_LABELS_OVERHANG))) { width_0 = $wnd.Math.max(width_0, $getMinimumWidth_0(castTo($get_14(nodeContext.outsideNodeLabelContainers, ($clinit_PortSide() , NORTH_3)), 252))); width_0 = $wnd.Math.max(width_0, $getMinimumWidth_0(castTo($get_14(nodeContext.outsideNodeLabelContainers, SOUTH_2), 252))); } minNodeSize = getMinimumNodeSize(nodeContext); !!minNodeSize && (width_0 = $wnd.Math.max(width_0, minNodeSize.x_0)); } $booleanValue(castToBoolean(nodeContext.node.getGraph().getProperty(($clinit_CoreOptions() , NODE_SIZE_FIXED_GRAPH_SIZE_3))))?(nodeSize.x_0 = $wnd.Math.max(nodeSize.x_0, width_0)):(nodeSize.x_0 = width_0); nodeCellRectangle = nodeContext.nodeContainer.cellRectangle; nodeCellRectangle.x_0 = 0; nodeCellRectangle.width_0 = width_0; $layoutChildrenHorizontally(nodeContext.nodeContainer); } function createPortContext(nodeContext, port, imPortLabels){ var portContext; portContext = new PortContext(nodeContext, port); $put(nodeContext.portContexts, port.getSide(), portContext); if (imPortLabels && !isFixed(nodeContext.portLabelsPlacement)) { portContext.portLabelCell = new LabelCell(nodeContext.labelLabelSpacing); $forEach_1(port.getLabels(), new PortContextCreator$lambda$0$Type(portContext)); } } function createPortContexts(nodeContext, ignoreInsidePortLabels){ var imPortLabels, port, port$iterator, volatileId; imPortLabels = !ignoreInsidePortLabels || !nodeContext.portLabelsPlacement.contains(($clinit_PortLabelPlacement() , INSIDE_0)); volatileId = 0; for (port$iterator = new ArrayList$1(nodeContext.node.getPorts()); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 852); if (port.getSide() == ($clinit_PortSide() , UNDEFINED_5)) { throw toJs(new IllegalArgumentException_0('Label and node size calculator can only be used with ports that have port sides assigned.')); } port.setVolatileId(volatileId++); createPortContext(nodeContext, port, imPortLabels); } } function lambda$0_11(portContext_0, label_1){ $addLabel(portContext_0.portLabelCell, label_1); } function PortContextCreator$lambda$0$Type(portContext_0){ this.portContext_0 = portContext_0; } defineClass(1539, 1, $intern_19, PortContextCreator$lambda$0$Type); _.accept = function accept_51(arg0){ lambda$0_11(this.portContext_0, castTo(arg0, 187)); } ; var Lorg_eclipse_elk_alg_common_nodespacing_internal_algorithm_PortContextCreator$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.nodespacing.internal.algorithm', 'PortContextCreator/lambda$0$Type', 1539); function constrainedInsidePortLabelPlacement(nodeContext, portSide){ var insidePortLabelContainer, labelContainerRect, leftBorder, overlapRemovalDirection, overlapRemover, padding, padding0, portContext, portContext$iterator, portContext$iterator0, portContexts, portLabelCell, portLabelCellRect, portPosition, portSize, rightBorder, startCoordinate, stripHeight, verticalLabelAlignment, actualMinX, actualMaxX; portContexts = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87); if (portSide == ($clinit_PortSide() , EAST_2) || portSide == WEST_2) { simpleInsidePortLabelPlacement(nodeContext, portSide); return; } overlapRemovalDirection = portSide == NORTH_3?($clinit_RectangleStripOverlapRemover$OverlapRemovalDirection() , DOWN):($clinit_RectangleStripOverlapRemover$OverlapRemovalDirection() , UP); verticalLabelAlignment = portSide == NORTH_3?($clinit_VerticalLabelAlignment() , TOP):($clinit_VerticalLabelAlignment() , BOTTOM); insidePortLabelContainer = castTo($get_14(nodeContext.insidePortLabelCells, portSide), 127); labelContainerRect = insidePortLabelContainer.cellRectangle; leftBorder = labelContainerRect.x_0 + maxd(stampJavaTypeInfo(getClassLiteralForArray(D_classLit, 1), $intern_66, 28, 15, [insidePortLabelContainer.padding.left, nodeContext.surroundingPortMargins.left, nodeContext.nodeLabelSpacing])); rightBorder = labelContainerRect.x_0 + labelContainerRect.width_0 - maxd(stampJavaTypeInfo(getClassLiteralForArray(D_classLit, 1), $intern_66, 28, 15, [insidePortLabelContainer.padding.right, nodeContext.surroundingPortMargins.right, nodeContext.nodeLabelSpacing])); overlapRemover = $withGap(createForDirection(overlapRemovalDirection), nodeContext.portLabelSpacingVertical); startCoordinate = portSide == NORTH_3?$intern_61:$intern_60; for (portContext$iterator0 = portContexts.iterator_0(); portContext$iterator0.hasNext_0();) { portContext = castTo(portContext$iterator0.next_1(), 117); if (!portContext.portLabelCell || portContext.portLabelCell.labels.array.length <= 0) { continue; } portSize = portContext.port.getSize(); portPosition = portContext.portPosition; portLabelCell = portContext.portLabelCell; portLabelCellRect = portLabelCell.cellRectangle; portLabelCellRect.width_0 = (padding0 = portLabelCell.padding , portLabelCell.minimumContentAreaSize.x_0 + padding0.left + padding0.right); portLabelCellRect.height = (padding = portLabelCell.padding , portLabelCell.minimumContentAreaSize.y_0 + padding.top_0 + padding.bottom); requireNonNull_0(verticalLabelAlignment, 'Vertical alignment cannot be null'); portLabelCell.verticalAlignment = verticalLabelAlignment; $setHorizontalAlignment(portLabelCell, ($clinit_HorizontalLabelAlignment() , RIGHT)); portLabelCellRect.x_0 = portPosition.x_0 - (portLabelCellRect.width_0 - portSize.x_0) / 2; actualMinX = $wnd.Math.min(leftBorder, portPosition.x_0); actualMaxX = $wnd.Math.max(rightBorder, portPosition.x_0 + portSize.x_0); portLabelCellRect.x_0 < actualMinX?(portLabelCellRect.x_0 = actualMinX):portLabelCellRect.x_0 + portLabelCellRect.width_0 > actualMaxX && (portLabelCellRect.x_0 = actualMaxX - portLabelCellRect.width_0); $add_3(overlapRemover.rectangleNodes, new RectangleStripOverlapRemover$RectangleNode(portLabelCellRect, $importRectangle(overlapRemover, portLabelCellRect))); startCoordinate = portSide == NORTH_3?$wnd.Math.max(startCoordinate, portPosition.y_0 + portContext.port.getSize().y_0):$wnd.Math.min(startCoordinate, portPosition.y_0); } startCoordinate += portSide == NORTH_3?nodeContext.portLabelSpacingVertical:-nodeContext.portLabelSpacingVertical; stripHeight = $removeOverlaps_0((overlapRemover.startCoordinate = startCoordinate , overlapRemover)); stripHeight > 0 && (castTo($get_14(nodeContext.insidePortLabelCells, portSide), 127).minimumContentAreaSize.y_0 = stripHeight); for (portContext$iterator = portContexts.iterator_0(); portContext$iterator.hasNext_0();) { portContext = castTo(portContext$iterator.next_1(), 117); if (!portContext.portLabelCell || portContext.portLabelCell.labels.array.length <= 0) { continue; } portLabelCellRect = portContext.portLabelCell.cellRectangle; portLabelCellRect.x_0 -= portContext.portPosition.x_0; portLabelCellRect.y_0 -= portContext.portPosition.y_0; } } function constrainedOutsidePortLabelPlacement(nodeContext, portSide){ var overlapRemovalDirection, overlapRemover, padding, padding0, padding1, portContext, portContext$iterator, portContext$iterator0, portContexts, portLabelCell, portLabelCellRect, portPosition, portSize, portWithSpecialNeeds, startCoordinate, verticalLabelAlignment; portContexts = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87); if (portContexts.size_1() <= 2 || portSide == ($clinit_PortSide() , EAST_2) || portSide == ($clinit_PortSide() , WEST_2)) { simpleOutsidePortLabelPlacement(nodeContext, portSide); return; } portWithSpecialNeeds = nodeContext.portLabelsPlacement.contains(($clinit_PortLabelPlacement() , SPACE_EFFICIENT_0)); overlapRemovalDirection = portSide == ($clinit_PortSide() , NORTH_3)?($clinit_RectangleStripOverlapRemover$OverlapRemovalDirection() , UP):($clinit_RectangleStripOverlapRemover$OverlapRemovalDirection() , DOWN); verticalLabelAlignment = portSide == NORTH_3?($clinit_VerticalLabelAlignment() , BOTTOM):($clinit_VerticalLabelAlignment() , TOP); overlapRemover = $withGap(createForDirection(overlapRemovalDirection), nodeContext.portLabelSpacingHorizontal); startCoordinate = portSide == NORTH_3?$intern_60:$intern_61; for (portContext$iterator0 = portContexts.iterator_0(); portContext$iterator0.hasNext_0();) { portContext = castTo(portContext$iterator0.next_1(), 117); if (!portContext.portLabelCell || portContext.portLabelCell.labels.array.length <= 0) { continue; } portSize = portContext.port.getSize(); portPosition = portContext.portPosition; portLabelCell = portContext.portLabelCell; portLabelCellRect = portLabelCell.cellRectangle; portLabelCellRect.width_0 = (padding0 = portLabelCell.padding , portLabelCell.minimumContentAreaSize.x_0 + padding0.left + padding0.right); portLabelCellRect.height = (padding1 = portLabelCell.padding , portLabelCell.minimumContentAreaSize.y_0 + padding1.top_0 + padding1.bottom); if (portWithSpecialNeeds) { portLabelCellRect.x_0 = portPosition.x_0 - (padding = portLabelCell.padding , portLabelCell.minimumContentAreaSize.x_0 + padding.left + padding.right) - nodeContext.portLabelSpacingHorizontal; portWithSpecialNeeds = false; } else { portLabelCellRect.x_0 = portPosition.x_0 + portSize.x_0 + nodeContext.portLabelSpacingHorizontal; } requireNonNull_0(verticalLabelAlignment, 'Vertical alignment cannot be null'); portLabelCell.verticalAlignment = verticalLabelAlignment; $setHorizontalAlignment(portLabelCell, ($clinit_HorizontalLabelAlignment() , RIGHT)); $add_3(overlapRemover.rectangleNodes, new RectangleStripOverlapRemover$RectangleNode(portLabelCellRect, $importRectangle(overlapRemover, portLabelCellRect))); startCoordinate = portSide == NORTH_3?$wnd.Math.min(startCoordinate, portPosition.y_0):$wnd.Math.max(startCoordinate, portPosition.y_0 + portContext.port.getSize().y_0); } startCoordinate += portSide == NORTH_3?-nodeContext.portLabelSpacingVertical:nodeContext.portLabelSpacingVertical; $removeOverlaps_0((overlapRemover.startCoordinate = startCoordinate , overlapRemover)); for (portContext$iterator = portContexts.iterator_0(); portContext$iterator.hasNext_0();) { portContext = castTo(portContext$iterator.next_1(), 117); if (!portContext.portLabelCell || portContext.portLabelCell.labels.array.length <= 0) { continue; } portLabelCellRect = portContext.portLabelCell.cellRectangle; portLabelCellRect.x_0 -= portContext.portPosition.x_0; portLabelCellRect.y_0 -= portContext.portPosition.y_0; } } function placePortLabels(nodeContext, portSide){ var constrainedPlacement; constrainedPlacement = !nodeContext.sizeConstraints.contains(($clinit_SizeConstraint() , PORT_LABELS)) || nodeContext.portConstraints == ($clinit_PortConstraints() , FIXED_POS); nodeContext.portLabelsPlacement.contains(($clinit_PortLabelPlacement() , INSIDE_0))?constrainedPlacement?constrainedInsidePortLabelPlacement(nodeContext, portSide):simpleInsidePortLabelPlacement(nodeContext, portSide):nodeContext.portLabelsPlacement.contains(OUTSIDE_0) && (constrainedPlacement?constrainedOutsidePortLabelPlacement(nodeContext, portSide):simpleOutsidePortLabelPlacement(nodeContext, portSide)); } function portLabelBorderOffsetForPortSide(nodeContext, portSide){ switch (portSide.ordinal) { case 1: return nodeContext.nodeContainer.padding.top_0 + nodeContext.portLabelSpacingVertical; case 3: return nodeContext.nodeContainer.padding.bottom + nodeContext.portLabelSpacingVertical; case 2: return nodeContext.nodeContainer.padding.right + nodeContext.portLabelSpacingHorizontal; case 4: return nodeContext.nodeContainer.padding.left + nodeContext.portLabelSpacingHorizontal; default:return 0; } } function simpleInsidePortLabelPlacement(nodeContext, portSide){ var insideNorthOrSouthPortLabelAreaHeight, labelBorderOffset, labelHeight, padding, padding0, portBorderOffset, portContext, portContext$iterator, portLabelCell, portLabelCellRect, portLabelSpacingHorizontal, portLabelSpacingVertical, portSize; insideNorthOrSouthPortLabelAreaHeight = 0; labelBorderOffset = portLabelBorderOffsetForPortSide(nodeContext, portSide); portLabelSpacingHorizontal = nodeContext.portLabelSpacingHorizontal; portLabelSpacingVertical = nodeContext.portLabelSpacingVertical; for (portContext$iterator = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).iterator_0(); portContext$iterator.hasNext_0();) { portContext = castTo(portContext$iterator.next_1(), 117); if (!portContext.portLabelCell || portContext.portLabelCell.labels.array.length <= 0) { continue; } portSize = portContext.port.getSize(); portBorderOffset = portContext.port.hasProperty(($clinit_CoreOptions() , PORT_BORDER_OFFSET_0))?$doubleValue(castToDouble(portContext.port.getProperty(PORT_BORDER_OFFSET_0))):0; portLabelCell = portContext.portLabelCell; portLabelCellRect = portLabelCell.cellRectangle; portLabelCellRect.width_0 = (padding0 = portLabelCell.padding , portLabelCell.minimumContentAreaSize.x_0 + padding0.left + padding0.right); portLabelCellRect.height = (padding = portLabelCell.padding , portLabelCell.minimumContentAreaSize.y_0 + padding.top_0 + padding.bottom); switch (portSide.ordinal) { case 1: portLabelCellRect.x_0 = portContext.labelsNextToPort?(portSize.x_0 - portLabelCellRect.width_0) / 2:portSize.x_0 + portLabelSpacingHorizontal; portLabelCellRect.y_0 = portSize.y_0 + portBorderOffset + labelBorderOffset; $setHorizontalAlignment(portLabelCell, ($clinit_HorizontalLabelAlignment() , CENTER_0)); $setVerticalAlignment(portLabelCell, ($clinit_VerticalLabelAlignment() , TOP)); break; case 3: portLabelCellRect.x_0 = portContext.labelsNextToPort?(portSize.x_0 - portLabelCellRect.width_0) / 2:portSize.x_0 + portLabelSpacingHorizontal; portLabelCellRect.y_0 = -portBorderOffset - labelBorderOffset - portLabelCellRect.height; $setHorizontalAlignment(portLabelCell, ($clinit_HorizontalLabelAlignment() , CENTER_0)); $setVerticalAlignment(portLabelCell, ($clinit_VerticalLabelAlignment() , BOTTOM)); break; case 2: portLabelCellRect.x_0 = -portBorderOffset - labelBorderOffset - portLabelCellRect.width_0; if (portContext.labelsNextToPort) { labelHeight = nodeContext.portLabelsTreatAsGroup?portLabelCellRect.height:castTo($get_11(portLabelCell.labels, 0), 187).getSize().y_0; portLabelCellRect.y_0 = (portSize.y_0 - labelHeight) / 2; } else { portLabelCellRect.y_0 = portSize.y_0 + portLabelSpacingVertical; } $setHorizontalAlignment(portLabelCell, ($clinit_HorizontalLabelAlignment() , RIGHT)); $setVerticalAlignment(portLabelCell, ($clinit_VerticalLabelAlignment() , CENTER_1)); break; case 4: portLabelCellRect.x_0 = portSize.x_0 + portBorderOffset + labelBorderOffset; if (portContext.labelsNextToPort) { labelHeight = nodeContext.portLabelsTreatAsGroup?portLabelCellRect.height:castTo($get_11(portLabelCell.labels, 0), 187).getSize().y_0; portLabelCellRect.y_0 = (portSize.y_0 - labelHeight) / 2; } else { portLabelCellRect.y_0 = portSize.y_0 + portLabelSpacingVertical; } $setHorizontalAlignment(portLabelCell, ($clinit_HorizontalLabelAlignment() , LEFT)); $setVerticalAlignment(portLabelCell, ($clinit_VerticalLabelAlignment() , CENTER_1)); } (portSide == ($clinit_PortSide() , NORTH_3) || portSide == SOUTH_2) && (insideNorthOrSouthPortLabelAreaHeight = $wnd.Math.max(insideNorthOrSouthPortLabelAreaHeight, portLabelCellRect.height)); } insideNorthOrSouthPortLabelAreaHeight > 0 && (castTo($get_14(nodeContext.insidePortLabelCells, portSide), 127).minimumContentAreaSize.y_0 = insideNorthOrSouthPortLabelAreaHeight); } function simpleOutsidePortLabelPlacement(nodeContext, portSide){ var alwaysAbove, labelHeight, padding, padding0, placeFirstPortDifferently, portContext, portContext$iterator, portContexts, portLabelCell, portLabelCellRect, portSize; portContexts = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87); placeFirstPortDifferently = isFirstOutsidePortLabelPlacedDifferently(nodeContext, portSide); alwaysAbove = nodeContext.portLabelsPlacement.contains(($clinit_PortLabelPlacement() , ALWAYS_OTHER_SAME_SIDE)); for (portContext$iterator = portContexts.iterator_0(); portContext$iterator.hasNext_0();) { portContext = castTo(portContext$iterator.next_1(), 117); if (!portContext.portLabelCell || portContext.portLabelCell.labels.array.length <= 0) { continue; } portSize = portContext.port.getSize(); portLabelCell = portContext.portLabelCell; portLabelCellRect = portLabelCell.cellRectangle; portLabelCellRect.width_0 = (padding0 = portLabelCell.padding , portLabelCell.minimumContentAreaSize.x_0 + padding0.left + padding0.right); portLabelCellRect.height = (padding = portLabelCell.padding , portLabelCell.minimumContentAreaSize.y_0 + padding.top_0 + padding.bottom); switch (portSide.ordinal) { case 1: if (portContext.labelsNextToPort) { portLabelCellRect.x_0 = (portSize.x_0 - portLabelCellRect.width_0) / 2; $setHorizontalAlignment(portLabelCell, ($clinit_HorizontalLabelAlignment() , CENTER_0)); } else if (placeFirstPortDifferently || alwaysAbove) { portLabelCellRect.x_0 = -portLabelCellRect.width_0 - nodeContext.portLabelSpacingHorizontal; $setHorizontalAlignment(portLabelCell, ($clinit_HorizontalLabelAlignment() , RIGHT)); } else { portLabelCellRect.x_0 = portSize.x_0 + nodeContext.portLabelSpacingHorizontal; $setHorizontalAlignment(portLabelCell, ($clinit_HorizontalLabelAlignment() , LEFT)); } portLabelCellRect.y_0 = -portLabelCellRect.height - nodeContext.portLabelSpacingVertical; $setVerticalAlignment(portLabelCell, ($clinit_VerticalLabelAlignment() , BOTTOM)); break; case 3: if (portContext.labelsNextToPort) { portLabelCellRect.x_0 = (portSize.x_0 - portLabelCellRect.width_0) / 2; $setHorizontalAlignment(portLabelCell, ($clinit_HorizontalLabelAlignment() , CENTER_0)); } else if (placeFirstPortDifferently || alwaysAbove) { portLabelCellRect.x_0 = -portLabelCellRect.width_0 - nodeContext.portLabelSpacingHorizontal; $setHorizontalAlignment(portLabelCell, ($clinit_HorizontalLabelAlignment() , RIGHT)); } else { portLabelCellRect.x_0 = portSize.x_0 + nodeContext.portLabelSpacingHorizontal; $setHorizontalAlignment(portLabelCell, ($clinit_HorizontalLabelAlignment() , LEFT)); } portLabelCellRect.y_0 = portSize.y_0 + nodeContext.portLabelSpacingVertical; $setVerticalAlignment(portLabelCell, ($clinit_VerticalLabelAlignment() , TOP)); break; case 2: if (portContext.labelsNextToPort) { labelHeight = nodeContext.portLabelsTreatAsGroup?portLabelCellRect.height:castTo($get_11(portLabelCell.labels, 0), 187).getSize().y_0; portLabelCellRect.y_0 = (portSize.y_0 - labelHeight) / 2; $setVerticalAlignment(portLabelCell, ($clinit_VerticalLabelAlignment() , CENTER_1)); } else if (placeFirstPortDifferently || alwaysAbove) { portLabelCellRect.y_0 = -portLabelCellRect.height - nodeContext.portLabelSpacingVertical; $setVerticalAlignment(portLabelCell, ($clinit_VerticalLabelAlignment() , BOTTOM)); } else { portLabelCellRect.y_0 = portSize.y_0 + nodeContext.portLabelSpacingVertical; $setVerticalAlignment(portLabelCell, ($clinit_VerticalLabelAlignment() , TOP)); } portLabelCellRect.x_0 = portSize.x_0 + nodeContext.portLabelSpacingHorizontal; $setHorizontalAlignment(portLabelCell, ($clinit_HorizontalLabelAlignment() , LEFT)); break; case 4: if (portContext.labelsNextToPort) { labelHeight = nodeContext.portLabelsTreatAsGroup?portLabelCellRect.height:castTo($get_11(portLabelCell.labels, 0), 187).getSize().y_0; portLabelCellRect.y_0 = (portSize.y_0 - labelHeight) / 2; $setVerticalAlignment(portLabelCell, ($clinit_VerticalLabelAlignment() , CENTER_1)); } else if (placeFirstPortDifferently || alwaysAbove) { portLabelCellRect.y_0 = -portLabelCellRect.height - nodeContext.portLabelSpacingVertical; $setVerticalAlignment(portLabelCell, ($clinit_VerticalLabelAlignment() , BOTTOM)); } else { portLabelCellRect.y_0 = portSize.y_0 + nodeContext.portLabelSpacingVertical; $setVerticalAlignment(portLabelCell, ($clinit_VerticalLabelAlignment() , TOP)); } portLabelCellRect.x_0 = -portLabelCellRect.width_0 - nodeContext.portLabelSpacingHorizontal; $setHorizontalAlignment(portLabelCell, ($clinit_HorizontalLabelAlignment() , RIGHT)); } placeFirstPortDifferently = false; } } function $clinit_PortPlacementCalculator(){ $clinit_PortPlacementCalculator = emptyMethod; PORT_RATIO_OR_POSITION = new Property_0('portRatioOrPosition', 0); } function calculateVerticalPortXCoordinate(portContext, nodeWidth){ var port; port = portContext.port; return port.hasProperty(($clinit_CoreOptions() , PORT_BORDER_OFFSET_0))?port.getSide() == ($clinit_PortSide() , WEST_2)?-port.getSize().x_0 - $doubleValue(castToDouble(port.getProperty(PORT_BORDER_OFFSET_0))):nodeWidth + $doubleValue(castToDouble(port.getProperty(PORT_BORDER_OFFSET_0))):port.getSide() == ($clinit_PortSide() , WEST_2)?-port.getSize().x_0:nodeWidth; } function placeHorizontalFixedPosPorts(nodeContext, portSide){ var port, portContext, portContext$iterator; for (portContext$iterator = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).iterator_0(); portContext$iterator.hasNext_0();) { portContext = castTo(portContext$iterator.next_1(), 117); portContext.portPosition.y_0 = (port = portContext.port , port.hasProperty(($clinit_CoreOptions() , PORT_BORDER_OFFSET_0))?port.getSide() == ($clinit_PortSide() , NORTH_3)?-port.getSize().y_0 - $doubleValue(castToDouble(port.getProperty(PORT_BORDER_OFFSET_0))):$doubleValue(castToDouble(port.getProperty(PORT_BORDER_OFFSET_0))):port.getSide() == ($clinit_PortSide() , NORTH_3)?-port.getSize().y_0:0); } } function placeHorizontalFixedRatioPorts(nodeContext, portSide){ var nodeWidth, port, portContext, portContext$iterator; nodeWidth = nodeContext.nodeSize.x_0; for (portContext$iterator = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).iterator_0(); portContext$iterator.hasNext_0();) { portContext = castTo(portContext$iterator.next_1(), 117); portContext.portPosition.x_0 = nodeWidth * $doubleValue(castToDouble(portContext.port.getProperty(PORT_RATIO_OR_POSITION))); portContext.portPosition.y_0 = (port = portContext.port , port.hasProperty(($clinit_CoreOptions() , PORT_BORDER_OFFSET_0))?port.getSide() == ($clinit_PortSide() , NORTH_3)?-port.getSize().y_0 - $doubleValue(castToDouble(port.getProperty(PORT_BORDER_OFFSET_0))):$doubleValue(castToDouble(port.getProperty(PORT_BORDER_OFFSET_0))):port.getSide() == ($clinit_PortSide() , NORTH_3)?-port.getSize().y_0:0); } } function placeHorizontalFreePorts(nodeContext, portSide){ var additionalSpaceBetweenPorts, availableSpace, calculatedPortPlacementWidth, currentXPos, insidePortLabelCell, insidePortLabelCellPadding, insidePortLabelCellRectangle, port, portAlignment, portContext, portContext$iterator, spaceBetweenPorts; if (castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).isEmpty()) { return; } insidePortLabelCell = castTo($get_14(nodeContext.insidePortLabelCells, portSide), 127); insidePortLabelCellRectangle = insidePortLabelCell.cellRectangle; insidePortLabelCellPadding = insidePortLabelCell.padding; portAlignment = $getPortAlignment(nodeContext, portSide); availableSpace = insidePortLabelCellRectangle.width_0 - insidePortLabelCellPadding.left - insidePortLabelCellPadding.right; calculatedPortPlacementWidth = insidePortLabelCell.minimumContentAreaSize.x_0; currentXPos = insidePortLabelCellRectangle.x_0 + insidePortLabelCellPadding.left; spaceBetweenPorts = nodeContext.portPortSpacing; if ((portAlignment == ($clinit_PortAlignment() , DISTRIBUTED) || portAlignment == JUSTIFIED) && castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).size_1() == 1) { calculatedPortPlacementWidth = portAlignment == DISTRIBUTED?calculatedPortPlacementWidth - 2 * nodeContext.portPortSpacing:calculatedPortPlacementWidth; portAlignment = CENTER_6; } if (availableSpace < calculatedPortPlacementWidth && !nodeContext.sizeOptions.contains(($clinit_SizeOptions() , PORTS_OVERHANG))) { if (portAlignment == DISTRIBUTED) { spaceBetweenPorts += (availableSpace - calculatedPortPlacementWidth) / (castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).size_1() + 1); currentXPos += spaceBetweenPorts; } else { spaceBetweenPorts += (availableSpace - calculatedPortPlacementWidth) / (castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).size_1() - 1); } } else { if (availableSpace < calculatedPortPlacementWidth) { calculatedPortPlacementWidth = portAlignment == DISTRIBUTED?calculatedPortPlacementWidth - 2 * nodeContext.portPortSpacing:calculatedPortPlacementWidth; portAlignment = CENTER_6; } switch (portAlignment.ordinal) { case 3: currentXPos += (availableSpace - calculatedPortPlacementWidth) / 2; break; case 4: currentXPos += availableSpace - calculatedPortPlacementWidth; break; case 0: additionalSpaceBetweenPorts = (availableSpace - calculatedPortPlacementWidth) / (castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).size_1() + 1); spaceBetweenPorts += $wnd.Math.max(0, additionalSpaceBetweenPorts); currentXPos += spaceBetweenPorts; break; case 1: additionalSpaceBetweenPorts = (availableSpace - calculatedPortPlacementWidth) / (castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).size_1() - 1); spaceBetweenPorts += $wnd.Math.max(0, additionalSpaceBetweenPorts); } } for (portContext$iterator = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).iterator_0(); portContext$iterator.hasNext_0();) { portContext = castTo(portContext$iterator.next_1(), 117); portContext.portPosition.x_0 = currentXPos + portContext.portMargin.left; portContext.portPosition.y_0 = (port = portContext.port , port.hasProperty(($clinit_CoreOptions() , PORT_BORDER_OFFSET_0))?port.getSide() == ($clinit_PortSide() , NORTH_3)?-port.getSize().y_0 - $doubleValue(castToDouble(port.getProperty(PORT_BORDER_OFFSET_0))):$doubleValue(castToDouble(port.getProperty(PORT_BORDER_OFFSET_0))):port.getSide() == ($clinit_PortSide() , NORTH_3)?-port.getSize().y_0:0); currentXPos += portContext.portMargin.left + portContext.port.getSize().x_0 + portContext.portMargin.right + spaceBetweenPorts; } } function placeHorizontalPorts(nodeContext){ $clinit_PortPlacementCalculator(); switch (nodeContext.portConstraints.ordinal) { case 5: placeHorizontalFixedPosPorts(nodeContext, ($clinit_PortSide() , NORTH_3)); placeHorizontalFixedPosPorts(nodeContext, SOUTH_2); break; case 4: placeHorizontalFixedRatioPorts(nodeContext, ($clinit_PortSide() , NORTH_3)); placeHorizontalFixedRatioPorts(nodeContext, SOUTH_2); break; default:placeHorizontalFreePorts(nodeContext, ($clinit_PortSide() , NORTH_3)); placeHorizontalFreePorts(nodeContext, SOUTH_2); } } function placeVerticalFixedPosPorts(nodeContext, portSide){ var nodeWidth, port, portContext, portContext$iterator; nodeWidth = nodeContext.nodeSize.x_0; for (portContext$iterator = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).iterator_0(); portContext$iterator.hasNext_0();) { portContext = castTo(portContext$iterator.next_1(), 117); portContext.portPosition.x_0 = (port = portContext.port , port.hasProperty(($clinit_CoreOptions() , PORT_BORDER_OFFSET_0))?port.getSide() == ($clinit_PortSide() , WEST_2)?-port.getSize().x_0 - $doubleValue(castToDouble(port.getProperty(PORT_BORDER_OFFSET_0))):nodeWidth + $doubleValue(castToDouble(port.getProperty(PORT_BORDER_OFFSET_0))):port.getSide() == ($clinit_PortSide() , WEST_2)?-port.getSize().x_0:nodeWidth); } } function placeVerticalFixedRatioPorts(nodeContext, portSide){ var nodeSize, portContext, portContext$iterator; nodeSize = nodeContext.nodeSize; for (portContext$iterator = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).iterator_0(); portContext$iterator.hasNext_0();) { portContext = castTo(portContext$iterator.next_1(), 117); portContext.portPosition.x_0 = calculateVerticalPortXCoordinate(portContext, nodeSize.x_0); portContext.portPosition.y_0 = nodeSize.y_0 * $doubleValue(castToDouble(portContext.port.getProperty(PORT_RATIO_OR_POSITION))); } } function placeVerticalFreePorts(nodeContext, portSide){ var additionalSpaceBetweenPorts, availableSpace, calculatedPortPlacementHeight, currentYPos, insidePortLabelCell, insidePortLabelCellPadding, insidePortLabelCellRectangle, nodeWidth, port, portAlignment, portContext, portContext$iterator, spaceBetweenPorts; if (castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).isEmpty()) { return; } insidePortLabelCell = castTo($get_14(nodeContext.insidePortLabelCells, portSide), 127); insidePortLabelCellRectangle = insidePortLabelCell.cellRectangle; insidePortLabelCellPadding = insidePortLabelCell.padding; portAlignment = $getPortAlignment(nodeContext, portSide); availableSpace = insidePortLabelCellRectangle.height - insidePortLabelCellPadding.top_0 - insidePortLabelCellPadding.bottom; calculatedPortPlacementHeight = insidePortLabelCell.minimumContentAreaSize.y_0; currentYPos = insidePortLabelCellRectangle.y_0 + insidePortLabelCellPadding.top_0; spaceBetweenPorts = nodeContext.portPortSpacing; nodeWidth = nodeContext.nodeSize.x_0; if ((portAlignment == ($clinit_PortAlignment() , DISTRIBUTED) || portAlignment == JUSTIFIED) && castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).size_1() == 1) { calculatedPortPlacementHeight = portAlignment == DISTRIBUTED?calculatedPortPlacementHeight - 2 * nodeContext.portPortSpacing:calculatedPortPlacementHeight; portAlignment = CENTER_6; } if (availableSpace < calculatedPortPlacementHeight && !nodeContext.sizeOptions.contains(($clinit_SizeOptions() , PORTS_OVERHANG))) { if (portAlignment == DISTRIBUTED) { spaceBetweenPorts += (availableSpace - calculatedPortPlacementHeight) / (castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).size_1() + 1); currentYPos += spaceBetweenPorts; } else { spaceBetweenPorts += (availableSpace - calculatedPortPlacementHeight) / (castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).size_1() - 1); } } else { if (availableSpace < calculatedPortPlacementHeight) { calculatedPortPlacementHeight = portAlignment == DISTRIBUTED?calculatedPortPlacementHeight - 2 * nodeContext.portPortSpacing:calculatedPortPlacementHeight; portAlignment = CENTER_6; } switch (portAlignment.ordinal) { case 3: currentYPos += (availableSpace - calculatedPortPlacementHeight) / 2; break; case 4: currentYPos += availableSpace - calculatedPortPlacementHeight; break; case 0: additionalSpaceBetweenPorts = (availableSpace - calculatedPortPlacementHeight) / (castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).size_1() + 1); spaceBetweenPorts += $wnd.Math.max(0, additionalSpaceBetweenPorts); currentYPos += spaceBetweenPorts; break; case 1: additionalSpaceBetweenPorts = (availableSpace - calculatedPortPlacementHeight) / (castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).size_1() - 1); spaceBetweenPorts += $wnd.Math.max(0, additionalSpaceBetweenPorts); } } for (portContext$iterator = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).iterator_0(); portContext$iterator.hasNext_0();) { portContext = castTo(portContext$iterator.next_1(), 117); portContext.portPosition.x_0 = (port = portContext.port , port.hasProperty(($clinit_CoreOptions() , PORT_BORDER_OFFSET_0))?port.getSide() == ($clinit_PortSide() , WEST_2)?-port.getSize().x_0 - $doubleValue(castToDouble(port.getProperty(PORT_BORDER_OFFSET_0))):nodeWidth + $doubleValue(castToDouble(port.getProperty(PORT_BORDER_OFFSET_0))):port.getSide() == ($clinit_PortSide() , WEST_2)?-port.getSize().x_0:nodeWidth); portContext.portPosition.y_0 = currentYPos + portContext.portMargin.top_0; currentYPos += portContext.portMargin.top_0 + portContext.port.getSize().y_0 + portContext.portMargin.bottom + spaceBetweenPorts; } } function placeVerticalPorts(nodeContext){ $clinit_PortPlacementCalculator(); switch (nodeContext.portConstraints.ordinal) { case 5: placeVerticalFixedPosPorts(nodeContext, ($clinit_PortSide() , EAST_2)); placeVerticalFixedPosPorts(nodeContext, WEST_2); break; case 4: placeVerticalFixedRatioPorts(nodeContext, ($clinit_PortSide() , EAST_2)); placeVerticalFixedRatioPorts(nodeContext, WEST_2); break; default:placeVerticalFreePorts(nodeContext, ($clinit_PortSide() , EAST_2)); placeVerticalFreePorts(nodeContext, WEST_2); } } var PORT_RATIO_OR_POSITION; function calculateVerticalNodeSizeRequiredByFixedPosPorts(nodeContext, portSide){ var bottommostPortBorder, cell, portContext, portContext$iterator; bottommostPortBorder = 0; for (portContext$iterator = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).iterator_0(); portContext$iterator.hasNext_0();) { portContext = castTo(portContext$iterator.next_1(), 117); bottommostPortBorder = $wnd.Math.max(bottommostPortBorder, portContext.portPosition.y_0 + portContext.port.getSize().y_0); } cell = castTo($get_14(nodeContext.insidePortLabelCells, portSide), 127); cell.padding.top_0 = 0; cell.minimumContentAreaSize.y_0 = bottommostPortBorder; } function calculateVerticalNodeSizeRequiredByFixedRatioPorts(nodeContext, portSide){ var cell, currentPortContext, currentPortHeight, currentPortRatio, minHeight, portContextIterator, portContexts, portLabelsInside, previousPortContext, previousPortHeight, previousPortRatio, requiredSpace; cell = castTo($get_14(nodeContext.insidePortLabelCells, portSide), 127); portContexts = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87); if (portContexts.isEmpty()) { cell.padding.top_0 = 0; cell.padding.bottom = 0; return; } portLabelsInside = nodeContext.portLabelsPlacement.contains(($clinit_PortLabelPlacement() , INSIDE_0)); minHeight = 0; nodeContext.sizeConstraints.contains(($clinit_SizeConstraint() , PORT_LABELS)) && setupPortMargins_0(nodeContext, portSide); portContextIterator = portContexts.iterator_0(); previousPortContext = null; previousPortRatio = 0; previousPortHeight = 0; while (portContextIterator.hasNext_0()) { currentPortContext = castTo(portContextIterator.next_1(), 117); currentPortRatio = $doubleValue(castToDouble(currentPortContext.port.getProperty(($clinit_PortPlacementCalculator() , PORT_RATIO_OR_POSITION)))); currentPortHeight = currentPortContext.port.getSize().y_0; if (!previousPortContext) { !!nodeContext.surroundingPortMargins && nodeContext.surroundingPortMargins.top_0 > 0 && (minHeight = $wnd.Math.max(minHeight, minSizeRequiredToRespectSpacing(nodeContext.surroundingPortMargins.top_0 + currentPortContext.portMargin.top_0, currentPortRatio))); } else { requiredSpace = previousPortHeight + previousPortContext.portMargin.bottom + nodeContext.portPortSpacing + currentPortContext.portMargin.top_0; minHeight = $wnd.Math.max(minHeight, ($clinit_DoubleMath() , checkNonNegative($intern_94) , $wnd.Math.abs(previousPortRatio - currentPortRatio) <= $intern_94 || previousPortRatio == currentPortRatio || isNaN(previousPortRatio) && isNaN(currentPortRatio)?0:requiredSpace / (currentPortRatio - previousPortRatio))); } previousPortContext = currentPortContext; previousPortRatio = currentPortRatio; previousPortHeight = currentPortHeight; } if (!!nodeContext.surroundingPortMargins && nodeContext.surroundingPortMargins.bottom > 0) { requiredSpace = previousPortHeight + nodeContext.surroundingPortMargins.bottom; portLabelsInside && (requiredSpace += previousPortContext.portMargin.bottom); minHeight = $wnd.Math.max(minHeight, ($clinit_DoubleMath() , checkNonNegative($intern_94) , $wnd.Math.abs(previousPortRatio - 1) <= $intern_94 || previousPortRatio == 1 || isNaN(previousPortRatio) && isNaN(1)?0:requiredSpace / (1 - previousPortRatio))); } cell.padding.top_0 = 0; cell.minimumContentAreaSize.y_0 = minHeight; } function calculateVerticalNodeSizeRequiredByFreePorts(nodeContext, portSide){ var cell, height; cell = castTo($get_14(nodeContext.insidePortLabelCells, portSide), 127); if (castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).isEmpty()) { cell.padding.top_0 = 0; cell.padding.bottom = 0; return; } cell.padding.top_0 = nodeContext.surroundingPortMargins.top_0; cell.padding.bottom = nodeContext.surroundingPortMargins.bottom; nodeContext.sizeConstraints.contains(($clinit_SizeConstraint() , PORT_LABELS)) && setupPortMargins_0(nodeContext, portSide); height = portHeightPlusPortPortSpacing(nodeContext, portSide); $getPortAlignment(nodeContext, portSide) == ($clinit_PortAlignment() , DISTRIBUTED) && (height += 2 * nodeContext.portPortSpacing); cell.minimumContentAreaSize.y_0 = height; } function calculateVerticalPortPlacementSize(nodeContext){ switch (nodeContext.portConstraints.ordinal) { case 5: calculateVerticalNodeSizeRequiredByFixedPosPorts(nodeContext, ($clinit_PortSide() , EAST_2)); calculateVerticalNodeSizeRequiredByFixedPosPorts(nodeContext, WEST_2); break; case 4: calculateVerticalNodeSizeRequiredByFixedRatioPorts(nodeContext, ($clinit_PortSide() , EAST_2)); calculateVerticalNodeSizeRequiredByFixedRatioPorts(nodeContext, WEST_2); break; default:calculateVerticalNodeSizeRequiredByFreePorts(nodeContext, ($clinit_PortSide() , EAST_2)); calculateVerticalNodeSizeRequiredByFreePorts(nodeContext, WEST_2); } } function computeVerticalPortMargins(nodeContext, portSide){ var firstLabelHeight, firstLabelOverhang, labelHeight, labelsBounds, overhang, portContext, portContext$iterator, portHeight; for (portContext$iterator = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).iterator_0(); portContext$iterator.hasNext_0();) { portContext = castTo(portContext$iterator.next_1(), 117); labelHeight = portContext.portLabelCell?$getMinimumHeight_0(portContext.portLabelCell):0; if (labelHeight > 0) { if (portContext.labelsNextToPort) { portHeight = portContext.port.getSize().y_0; if (labelHeight > portHeight) { if (nodeContext.portLabelsTreatAsGroup || portContext.portLabelCell.labels.array.length == 1) { overhang = (labelHeight - portHeight) / 2; portContext.portMargin.top_0 = overhang; portContext.portMargin.bottom = overhang; } else { firstLabelHeight = castTo($get_11(portContext.portLabelCell.labels, 0), 187).getSize().y_0; firstLabelOverhang = (firstLabelHeight - portHeight) / 2; portContext.portMargin.top_0 = $wnd.Math.max(0, firstLabelOverhang); portContext.portMargin.bottom = labelHeight - firstLabelOverhang - portHeight; } } } else { portContext.portMargin.bottom = nodeContext.portLabelSpacingVertical + labelHeight; } } else if (isFixed(nodeContext.portLabelsPlacement)) { labelsBounds = getLabelsBounds(portContext.port); labelsBounds.y_0 < 0 && (portContext.portMargin.top_0 = -labelsBounds.y_0); labelsBounds.y_0 + labelsBounds.height > portContext.port.getSize().y_0 && (portContext.portMargin.bottom = labelsBounds.y_0 + labelsBounds.height - portContext.port.getSize().y_0); } } } function portHeightPlusPortPortSpacing(nodeContext, portSide){ var portContext, portContextIterator, result; result = 0; portContextIterator = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87).iterator_0(); while (portContextIterator.hasNext_0()) { portContext = castTo(portContextIterator.next_1(), 117); result += portContext.portMargin.top_0 + portContext.port.getSize().y_0 + portContext.portMargin.bottom; portContextIterator.hasNext_0() && (result += nodeContext.portPortSpacing); } return result; } function setupPortMargins_0(nodeContext, portSide){ var alwaysSameSide, alwaysSameSideAbove, bottommostPortContext, portContextIterator, portContexts, portLabelsOutside, spaceEfficient, spaceEfficientPortLabels, topmostPortContext, uniformPortSpacing; portContexts = castTo(castTo($get(nodeContext.portContexts, portSide), 21), 87); portLabelsOutside = nodeContext.portLabelsPlacement.contains(($clinit_PortLabelPlacement() , OUTSIDE_0)); alwaysSameSide = nodeContext.portLabelsPlacement.contains(ALWAYS_SAME_SIDE); alwaysSameSideAbove = nodeContext.portLabelsPlacement.contains(ALWAYS_OTHER_SAME_SIDE); spaceEfficient = nodeContext.portLabelsPlacement.contains(SPACE_EFFICIENT_0); uniformPortSpacing = nodeContext.sizeOptions.contains(($clinit_SizeOptions() , UNIFORM_PORT_SPACING)); spaceEfficientPortLabels = !alwaysSameSide && !alwaysSameSideAbove && (spaceEfficient || portContexts.size_1() == 2); computeVerticalPortMargins(nodeContext, portSide); topmostPortContext = null; bottommostPortContext = null; if (portLabelsOutside) { portContextIterator = portContexts.iterator_0(); topmostPortContext = castTo(portContextIterator.next_1(), 117); bottommostPortContext = topmostPortContext; while (portContextIterator.hasNext_0()) { bottommostPortContext = castTo(portContextIterator.next_1(), 117); } topmostPortContext.portMargin.top_0 = 0; bottommostPortContext.portMargin.bottom = 0; spaceEfficientPortLabels && !topmostPortContext.labelsNextToPort && (topmostPortContext.portMargin.bottom = 0); } if (uniformPortSpacing) { unifyPortMargins_0(portContexts); if (portLabelsOutside) { topmostPortContext.portMargin.top_0 = 0; bottommostPortContext.portMargin.bottom = 0; } } } function unifyPortMargins_0(portContexts){ var maxBottom, maxTop, portContext, portContext$iterator, portContext$iterator0; maxTop = 0; maxBottom = 0; for (portContext$iterator0 = portContexts.iterator_0(); portContext$iterator0.hasNext_0();) { portContext = castTo(portContext$iterator0.next_1(), 117); maxTop = $wnd.Math.max(maxTop, portContext.portMargin.top_0); maxBottom = $wnd.Math.max(maxBottom, portContext.portMargin.bottom); } for (portContext$iterator = portContexts.iterator_0(); portContext$iterator.hasNext_0();) { portContext = castTo(portContext$iterator.next_1(), 117); portContext.portMargin.top_0 = maxTop; portContext.portMargin.bottom = maxBottom; } } function $removeOverlaps(overlapRemover){ var alreadyPlacedNodes, currNode, currNode$iterator, currRect, overlapNode, overlapNode$iterator, overlapRect, stripSize, verticalGap, yPos; verticalGap = overlapRemover.gapVertical; alreadyPlacedNodes = new HashSet; stripSize = 0; for (currNode$iterator = new ArrayList$1(overlapRemover.rectangleNodes); currNode$iterator.i < currNode$iterator.this$01.array.length;) { currNode = castTo($next_6(currNode$iterator), 226); yPos = 0; $sort_0(currNode.overlappingNodes, new GreedyRectangleStripOverlapRemover$0methodref$compareByYCoordinate$Type); for (overlapNode$iterator = $listIterator_2(currNode.overlappingNodes, 0); overlapNode$iterator.currentNode != overlapNode$iterator.this$01.tail;) { overlapNode = castTo($next_9(overlapNode$iterator), 226); if (alreadyPlacedNodes.map_0.containsKey(overlapNode)) { currRect = currNode.rectangle; overlapRect = overlapNode.rectangle; yPos < overlapRect.y_0 + overlapRect.height + verticalGap && yPos + currRect.height + verticalGap > overlapRect.y_0 && (yPos = overlapRect.y_0 + overlapRect.height + verticalGap); } } currNode.rectangle.y_0 = yPos; alreadyPlacedNodes.map_0.put(currNode, alreadyPlacedNodes); stripSize = $wnd.Math.max(stripSize, currNode.rectangle.y_0 + currNode.rectangle.height); } return stripSize; } function GreedyRectangleStripOverlapRemover(){ } function compareByYCoordinate(node1, node2){ return compare_4(node1.rectangle.y_0, node2.rectangle.y_0); } defineClass(1902, 1, {}, GreedyRectangleStripOverlapRemover); var Lorg_eclipse_elk_alg_common_overlaps_GreedyRectangleStripOverlapRemover_2_classLit = createForClass('org.eclipse.elk.alg.common.overlaps', 'GreedyRectangleStripOverlapRemover', 1902); function GreedyRectangleStripOverlapRemover$0methodref$compareByYCoordinate$Type(){ } defineClass(1903, 1, $intern_88, GreedyRectangleStripOverlapRemover$0methodref$compareByYCoordinate$Type); _.compare_1 = function compare_17(arg0, arg1){ return compareByYCoordinate(castTo(arg0, 226), castTo(arg1, 226)); } ; _.equals_0 = function equals_69(other){ return this === other; } ; _.reversed = function reversed_9(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_common_overlaps_GreedyRectangleStripOverlapRemover$0methodref$compareByYCoordinate$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.overlaps', 'GreedyRectangleStripOverlapRemover/0methodref$compareByYCoordinate$Type', 1903); function $computeOverlaps(this$static){ var currNode, currNode$iterator, intersectingNode, intersectingNode$iterator, intersectingNodes, intersectingRectangle, scanlinePos; intersectingNodes = new TreeSet_0(castTo(checkNotNull(new RectangleStripOverlapRemover$1methodref$compareRightRectangleBorders$Type), 50)); scanlinePos = $intern_61; for (currNode$iterator = new ArrayList$1(this$static.rectangleNodes); currNode$iterator.i < currNode$iterator.this$01.array.length;) { currNode = castTo($next_6(currNode$iterator), 226); scanlinePos = currNode.rectangle.x_0; while (intersectingNodes.map_0.size_1() != 0) { intersectingRectangle = castTo(intersectingNodes.map_0.firstKey(), 226); if (intersectingRectangle.rectangle.x_0 + intersectingRectangle.rectangle.width_0 < scanlinePos) { intersectingNodes.map_0.remove_0(intersectingRectangle) != null; } else { break; } } for (intersectingNode$iterator = intersectingNodes.map_0.keySet_0().iterator_0(); intersectingNode$iterator.hasNext_0();) { intersectingNode = castTo(intersectingNode$iterator.next_1(), 226); $add_7(intersectingNode.overlappingNodes, currNode); $add_7(currNode.overlappingNodes, intersectingNode); } intersectingNodes.map_0.put(currNode, ($clinit_Boolean() , FALSE_0)) == null; } } function $exportRectangle(this$static, rectangleNode){ var originalRectangle, rectangle; rectangle = rectangleNode.rectangle; originalRectangle = rectangleNode.originalRectangle; switch (this$static.overlapRemovalDirection.ordinal) { case 0: originalRectangle.y_0 = this$static.startCoordinate - rectangle.height - rectangle.y_0; break; case 1: originalRectangle.y_0 += this$static.startCoordinate; break; case 2: originalRectangle.x_0 = this$static.startCoordinate - rectangle.height - rectangle.y_0; break; case 3: originalRectangle.x_0 = this$static.startCoordinate + rectangle.y_0; } } function $importRectangle(this$static, rectangle){ switch (this$static.overlapRemovalDirection.ordinal) { case 0: case 1: return rectangle; case 2: case 3: return new ElkRectangle_0(rectangle.y_0, 0, rectangle.height, rectangle.width_0); default:return null; } } function $removeOverlaps_0(this$static){ var stripSize; !this$static.overlapRemovalStrategy && (this$static.overlapRemovalStrategy = new GreedyRectangleStripOverlapRemover); $sort(this$static.rectangleNodes, new RectangleStripOverlapRemover$0methodref$compareLeftRectangleBorders$Type); $computeOverlaps(this$static); stripSize = $removeOverlaps(this$static); $forEach_3(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static.rectangleNodes, 16)), new RectangleStripOverlapRemover$lambda$1$Type(this$static)); return stripSize; } function $withGap(this$static, theVerticalGap){ this$static.gapVertical = theVerticalGap; return this$static; } function $withStartCoordinate(this$static, coordinate){ this$static.startCoordinate = coordinate; return this$static; } function RectangleStripOverlapRemover(){ this.rectangleNodes = new ArrayList; } function compareLeftRectangleBorders(rn1, rn2){ return compare_4(rn1.rectangle.x_0, rn2.rectangle.x_0); } function compareRightRectangleBorders(rn1, rn2){ return compare_4(rn1.rectangle.x_0 + rn1.rectangle.width_0, rn2.rectangle.x_0 + rn2.rectangle.width_0); } function createForDirection(direction){ var remover; remover = new RectangleStripOverlapRemover; remover.overlapRemovalDirection = direction; return remover; } defineClass(1849, 1, {}, RectangleStripOverlapRemover); _.gapVertical = 5; _.startCoordinate = 0; var Lorg_eclipse_elk_alg_common_overlaps_RectangleStripOverlapRemover_2_classLit = createForClass('org.eclipse.elk.alg.common.overlaps', 'RectangleStripOverlapRemover', 1849); function RectangleStripOverlapRemover$0methodref$compareLeftRectangleBorders$Type(){ } defineClass(1850, 1, $intern_88, RectangleStripOverlapRemover$0methodref$compareLeftRectangleBorders$Type); _.compare_1 = function compare_18(arg0, arg1){ return compareLeftRectangleBorders(castTo(arg0, 226), castTo(arg1, 226)); } ; _.equals_0 = function equals_70(other){ return this === other; } ; _.reversed = function reversed_10(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_common_overlaps_RectangleStripOverlapRemover$0methodref$compareLeftRectangleBorders$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.overlaps', 'RectangleStripOverlapRemover/0methodref$compareLeftRectangleBorders$Type', 1850); function RectangleStripOverlapRemover$1methodref$compareRightRectangleBorders$Type(){ } defineClass(1852, 1, $intern_88, RectangleStripOverlapRemover$1methodref$compareRightRectangleBorders$Type); _.compare_1 = function compare_19(arg0, arg1){ return compareRightRectangleBorders(castTo(arg0, 226), castTo(arg1, 226)); } ; _.equals_0 = function equals_71(other){ return this === other; } ; _.reversed = function reversed_11(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_common_overlaps_RectangleStripOverlapRemover$1methodref$compareRightRectangleBorders$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.overlaps', 'RectangleStripOverlapRemover/1methodref$compareRightRectangleBorders$Type', 1852); function $clinit_RectangleStripOverlapRemover$OverlapRemovalDirection(){ $clinit_RectangleStripOverlapRemover$OverlapRemovalDirection = emptyMethod; UP = new RectangleStripOverlapRemover$OverlapRemovalDirection('UP', 0); DOWN = new RectangleStripOverlapRemover$OverlapRemovalDirection('DOWN', 1); LEFT_0 = new RectangleStripOverlapRemover$OverlapRemovalDirection('LEFT', 2); RIGHT_0 = new RectangleStripOverlapRemover$OverlapRemovalDirection('RIGHT', 3); } function RectangleStripOverlapRemover$OverlapRemovalDirection(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_19(name_0){ $clinit_RectangleStripOverlapRemover$OverlapRemovalDirection(); return valueOf(($clinit_RectangleStripOverlapRemover$OverlapRemovalDirection$Map() , $MAP_9), name_0); } function values_27(){ $clinit_RectangleStripOverlapRemover$OverlapRemovalDirection(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_overlaps_RectangleStripOverlapRemover$OverlapRemovalDirection_2_classLit, 1), $intern_37, 417, 0, [UP, DOWN, LEFT_0, RIGHT_0]); } defineClass(417, 22, {3:1, 34:1, 22:1, 417:1}, RectangleStripOverlapRemover$OverlapRemovalDirection); var DOWN, LEFT_0, RIGHT_0, UP; var Lorg_eclipse_elk_alg_common_overlaps_RectangleStripOverlapRemover$OverlapRemovalDirection_2_classLit = createForEnum('org.eclipse.elk.alg.common.overlaps', 'RectangleStripOverlapRemover/OverlapRemovalDirection', 417, Ljava_lang_Enum_2_classLit, values_27, valueOf_19); function $clinit_RectangleStripOverlapRemover$OverlapRemovalDirection$Map(){ $clinit_RectangleStripOverlapRemover$OverlapRemovalDirection$Map = emptyMethod; $MAP_9 = createValueOfMap(($clinit_RectangleStripOverlapRemover$OverlapRemovalDirection() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_overlaps_RectangleStripOverlapRemover$OverlapRemovalDirection_2_classLit, 1), $intern_37, 417, 0, [UP, DOWN, LEFT_0, RIGHT_0]))); } var $MAP_9; function RectangleStripOverlapRemover$RectangleNode(originalRectangle, rectangle){ this.overlappingNodes = new LinkedList; this.originalRectangle = originalRectangle; this.rectangle = rectangle; } defineClass(226, 1, {226:1}, RectangleStripOverlapRemover$RectangleNode); var Lorg_eclipse_elk_alg_common_overlaps_RectangleStripOverlapRemover$RectangleNode_2_classLit = createForClass('org.eclipse.elk.alg.common.overlaps', 'RectangleStripOverlapRemover/RectangleNode', 226); function RectangleStripOverlapRemover$lambda$1$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1851, 1, $intern_19, RectangleStripOverlapRemover$lambda$1$Type); _.accept = function accept_52(arg0){ $exportRectangle(this.$$outer_0, castTo(arg0, 226)); } ; var Lorg_eclipse_elk_alg_common_overlaps_RectangleStripOverlapRemover$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.overlaps', 'RectangleStripOverlapRemover/lambda$1$Type', 1851); function $packPolyominoes(polyHolder){ var grid, next, offX, offY, poly, poly$iterator, polys, successorBasedOnCost; polys = polyHolder.polys; grid = polyHolder.grid; switch (castTo($getProperty(polyHolder, ($clinit_PolyominoOptions() , POLYOMINO_LOW_LEVEL_SORT)), 435).ordinal) { case 0: $sort(polys, new Comparators$ReversedComparator(new PolyominoCompactor$MinPerimeterComparator)); break; case 1: default:$sort(polys, new Comparators$ReversedComparator(new PolyominoCompactor$MinPerimeterComparatorWithShape)); } switch (castTo($getProperty(polyHolder, POLYOMINO_HIGH_LEVEL_SORT), 436).ordinal) { case 1: $sort(polys, new PolyominoCompactor$MinNumOfExtensionsComparator); $sort(polys, new PolyominoCompactor$SingleExtensionSideGreaterThanRestComparator); $sort(polys, new PolyominoCompactor$CornerCasesGreaterThanRestComparator); break; case 0: default:$sort(polys, new PolyominoCompactor$MinNumOfExtensionsComparator); $sort(polys, new PolyominoCompactor$MinNumOfExtensionDirectionsComparator); } switch (castTo($getProperty(polyHolder, POLYOMINO_TRAVERSAL_STRATEGY), 257).ordinal) { case 0: successorBasedOnCost = new SuccessorMaxNormWindingInMathPosSense; break; case 1: successorBasedOnCost = new SuccessorLineByLine; break; case 2: successorBasedOnCost = new SuccessorManhattan; break; case 3: successorBasedOnCost = new SuccessorJitter; break; case 5: successorBasedOnCost = new SuccessorQuadrantsGeneric(new SuccessorManhattan); break; case 4: successorBasedOnCost = new SuccessorQuadrantsGeneric(new SuccessorLineByLine); break; case 7: successorBasedOnCost = new SuccessorCombination(new SuccessorQuadrantsGeneric(new SuccessorLineByLine), new SuccessorQuadrantsGeneric(new SuccessorManhattan)); break; case 8: successorBasedOnCost = new SuccessorCombination(new SuccessorQuadrantsGeneric(new SuccessorJitter), new SuccessorQuadrantsGeneric(new SuccessorManhattan)); break; case 6: default:successorBasedOnCost = new SuccessorQuadrantsGeneric(new SuccessorJitter); } for (poly$iterator = new ArrayList$1(polys); poly$iterator.i < poly$iterator.this$01.array.length;) { poly = castTo($next_6(poly$iterator), 176); offX = 0; offY = 0; next = new Pair(valueOf_3(offX), valueOf_3(offY)); while ($intersectsWithCenterBased_0(grid, poly, offX, offY)) { next = castTo(successorBasedOnCost.apply_3(next, poly), 42); offX = castTo(next.first, 17).value_0; offY = castTo(next.second, 17).value_0; } $addFilledCellsFrom_0(grid, poly, offX, offY); } } function $compare_1(o1, o2){ var detectDirections, dirSet, numDir1, numDir2; detectDirections = new PolyominoCompactor$CornerCasesGreaterThanRestComparator$lambda$0$Type; dirSet = castTo($collect_1($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(o1.polyominoExtensions, 16)), detectDirections), of_3(new Collectors$23methodref$ctor$Type, new Collectors$24methodref$add$Type, new Collectors$lambda$50$Type, new Collectors$lambda$51$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , UNORDERED), IDENTITY_FINISH]))), 21); numDir1 = dirSet.size_1(); numDir1 = numDir1 == 2?1:0; numDir1 == 1 && eq(mod(castTo($collect_1($filter(dirSet.parallelStream(), new PolyominoCompactor$CornerCasesGreaterThanRestComparator$lambda$1$Type), reducing(valueOf_4(0), new Collectors$lambda$4$Type)), 168).value_0, 2), 0) && (numDir1 = 0); dirSet = castTo($collect_1($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(o2.polyominoExtensions, 16)), detectDirections), of_3(new Collectors$23methodref$ctor$Type, new Collectors$24methodref$add$Type, new Collectors$lambda$50$Type, new Collectors$lambda$51$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [UNORDERED, IDENTITY_FINISH]))), 21); numDir2 = dirSet.size_1(); numDir2 = numDir2 == 2?1:0; numDir2 == 1 && eq(mod(castTo($collect_1($filter(dirSet.parallelStream(), new PolyominoCompactor$CornerCasesGreaterThanRestComparator$lambda$2$Type), reducing(valueOf_4(0), new Collectors$lambda$4$Type)), 168).value_0, 2), 0) && (numDir2 = 0); if (numDir1 < numDir2) { return -1; } if (numDir1 == numDir2) { return 0; } return 1; } function PolyominoCompactor$CornerCasesGreaterThanRestComparator(){ } defineClass(1323, 1, $intern_88, PolyominoCompactor$CornerCasesGreaterThanRestComparator); _.compare_1 = function compare_20(o1, o2){ return $compare_1(castTo(o1, 176), castTo(o2, 176)); } ; _.equals_0 = function equals_72(other){ return this === other; } ; _.reversed = function reversed_12(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_common_polyomino_PolyominoCompactor$CornerCasesGreaterThanRestComparator_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino', 'PolyominoCompactor/CornerCasesGreaterThanRestComparator', 1323); function PolyominoCompactor$CornerCasesGreaterThanRestComparator$lambda$0$Type(){ } defineClass(1326, 1, {}, PolyominoCompactor$CornerCasesGreaterThanRestComparator$lambda$0$Type); _.apply_0 = function apply_38(arg0){ return castTo(arg0, 334).first; } ; var Lorg_eclipse_elk_alg_common_polyomino_PolyominoCompactor$CornerCasesGreaterThanRestComparator$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino', 'PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$0$Type', 1326); function PolyominoCompactor$CornerCasesGreaterThanRestComparator$lambda$1$Type(){ } defineClass(1327, 1, $intern_40, PolyominoCompactor$CornerCasesGreaterThanRestComparator$lambda$1$Type); _.test_0 = function test_10(arg0){ return castTo(arg0, 332).horizontal; } ; var Lorg_eclipse_elk_alg_common_polyomino_PolyominoCompactor$CornerCasesGreaterThanRestComparator$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino', 'PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$1$Type', 1327); function PolyominoCompactor$CornerCasesGreaterThanRestComparator$lambda$2$Type(){ } defineClass(1328, 1, $intern_40, PolyominoCompactor$CornerCasesGreaterThanRestComparator$lambda$2$Type); _.test_0 = function test_11(arg0){ return castTo(arg0, 332).horizontal; } ; var Lorg_eclipse_elk_alg_common_polyomino_PolyominoCompactor$CornerCasesGreaterThanRestComparator$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino', 'PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$2$Type', 1328); function $compare_2(o1, o2){ var detectDirections, dirSet, numDir1, numDir2; detectDirections = new PolyominoCompactor$MinNumOfExtensionDirectionsComparator$lambda$0$Type; dirSet = castTo($collect_1($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(o1.polyominoExtensions, 16)), detectDirections), of_3(new Collectors$23methodref$ctor$Type, new Collectors$24methodref$add$Type, new Collectors$lambda$50$Type, new Collectors$lambda$51$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , UNORDERED), IDENTITY_FINISH]))), 21); numDir1 = dirSet.size_1(); dirSet = castTo($collect_1($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(o2.polyominoExtensions, 16)), detectDirections), of_3(new Collectors$23methodref$ctor$Type, new Collectors$24methodref$add$Type, new Collectors$lambda$50$Type, new Collectors$lambda$51$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [UNORDERED, IDENTITY_FINISH]))), 21); numDir2 = dirSet.size_1(); if (numDir1 < numDir2) { return -1; } if (numDir1 == numDir2) { return 0; } return 1; } function PolyominoCompactor$MinNumOfExtensionDirectionsComparator(){ } defineClass(1321, 1, $intern_88, PolyominoCompactor$MinNumOfExtensionDirectionsComparator); _.compare_1 = function compare_21(o1, o2){ return $compare_2(castTo(o1, 176), castTo(o2, 176)); } ; _.equals_0 = function equals_73(other){ return this === other; } ; _.reversed = function reversed_13(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_common_polyomino_PolyominoCompactor$MinNumOfExtensionDirectionsComparator_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino', 'PolyominoCompactor/MinNumOfExtensionDirectionsComparator', 1321); function PolyominoCompactor$MinNumOfExtensionDirectionsComparator$lambda$0$Type(){ } defineClass(1324, 1, {}, PolyominoCompactor$MinNumOfExtensionDirectionsComparator$lambda$0$Type); _.apply_0 = function apply_39(arg0){ return castTo(arg0, 334).first; } ; var Lorg_eclipse_elk_alg_common_polyomino_PolyominoCompactor$MinNumOfExtensionDirectionsComparator$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino', 'PolyominoCompactor/MinNumOfExtensionDirectionsComparator/lambda$0$Type', 1324); function $compare_3(o1, o2){ var numExt1, numExt2; numExt1 = o1.polyominoExtensions.array.length; numExt2 = o2.polyominoExtensions.array.length; if (numExt1 < numExt2) { return -1; } if (numExt1 == numExt2) { return 0; } return 1; } function PolyominoCompactor$MinNumOfExtensionsComparator(){ } defineClass(781, 1, $intern_88, PolyominoCompactor$MinNumOfExtensionsComparator); _.compare_1 = function compare_22(o1, o2){ return $compare_3(castTo(o1, 176), castTo(o2, 176)); } ; _.equals_0 = function equals_74(other){ return this === other; } ; _.reversed = function reversed_14(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_common_polyomino_PolyominoCompactor$MinNumOfExtensionsComparator_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino', 'PolyominoCompactor/MinNumOfExtensionsComparator', 781); function $compare_4(o1, o2){ var halfPeri1, halfPeri2; halfPeri1 = o1.xSize + o1.ySize; halfPeri2 = o2.xSize + o2.ySize; if (halfPeri1 < halfPeri2) { return -1; } if (halfPeri1 == halfPeri2) { return 0; } return 1; } function PolyominoCompactor$MinPerimeterComparator(){ } defineClass(1319, 1, $intern_88, PolyominoCompactor$MinPerimeterComparator); _.compare_1 = function compare_23(o1, o2){ return $compare_4(castTo(o1, 330), castTo(o2, 330)); } ; _.equals_0 = function equals_75(other){ return this === other; } ; _.reversed = function reversed_15(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_common_polyomino_PolyominoCompactor$MinPerimeterComparator_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino', 'PolyominoCompactor/MinPerimeterComparator', 1319); function $compare_5(o1, o2){ var height, val1, val2, width_0; width_0 = o1.xSize; height = o1.ySize; width_0 < height?(width_0 *= width_0):(height *= height); val1 = width_0 + height; width_0 = o2.xSize; height = o2.ySize; width_0 < height?(width_0 *= width_0):(height *= height); val2 = width_0 + height; if (val1 < val2) { return -1; } if (val1 == val2) { return 0; } return 1; } function PolyominoCompactor$MinPerimeterComparatorWithShape(){ } defineClass(1320, 1, $intern_88, PolyominoCompactor$MinPerimeterComparatorWithShape); _.compare_1 = function compare_24(o1, o2){ return $compare_5(castTo(o1, 330), castTo(o2, 330)); } ; _.equals_0 = function equals_76(other){ return this === other; } ; _.reversed = function reversed_16(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_common_polyomino_PolyominoCompactor$MinPerimeterComparatorWithShape_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino', 'PolyominoCompactor/MinPerimeterComparatorWithShape', 1320); function $compare_6(o1, o2){ var detectDirections, dirSet, numDir1, numDir2; detectDirections = new PolyominoCompactor$SingleExtensionSideGreaterThanRestComparator$lambda$0$Type; dirSet = castTo($collect_1($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(o1.polyominoExtensions, 16)), detectDirections), of_3(new Collectors$23methodref$ctor$Type, new Collectors$24methodref$add$Type, new Collectors$lambda$50$Type, new Collectors$lambda$51$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , UNORDERED), IDENTITY_FINISH]))), 21); numDir1 = dirSet.size_1(); dirSet = castTo($collect_1($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(o2.polyominoExtensions, 16)), detectDirections), of_3(new Collectors$23methodref$ctor$Type, new Collectors$24methodref$add$Type, new Collectors$lambda$50$Type, new Collectors$lambda$51$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [UNORDERED, IDENTITY_FINISH]))), 21); numDir2 = dirSet.size_1(); numDir1 = numDir1 == 1?1:0; numDir2 = numDir2 == 1?1:0; if (numDir1 < numDir2) { return -1; } if (numDir1 == numDir2) { return 0; } return 1; } function PolyominoCompactor$SingleExtensionSideGreaterThanRestComparator(){ } defineClass(1322, 1, $intern_88, PolyominoCompactor$SingleExtensionSideGreaterThanRestComparator); _.compare_1 = function compare_25(o1, o2){ return $compare_6(castTo(o1, 176), castTo(o2, 176)); } ; _.equals_0 = function equals_77(other){ return this === other; } ; _.reversed = function reversed_17(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_common_polyomino_PolyominoCompactor$SingleExtensionSideGreaterThanRestComparator_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino', 'PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator', 1322); function PolyominoCompactor$SingleExtensionSideGreaterThanRestComparator$lambda$0$Type(){ } defineClass(1325, 1, {}, PolyominoCompactor$SingleExtensionSideGreaterThanRestComparator$lambda$0$Type); _.apply_0 = function apply_40(arg0){ return castTo(arg0, 334).first; } ; var Lorg_eclipse_elk_alg_common_polyomino_PolyominoCompactor$SingleExtensionSideGreaterThanRestComparator$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino', 'PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator/lambda$0$Type', 1325); function fillPolyomino(poly){ var eastProfile, height, northProfile, southProfile, westProfile, width_0, x_0, xi, xi0, xi1, y_0, yi, yi0, yi1; width_0 = poly.xSize; northProfile = initUnidimensionalArray(I_classLit, $intern_49, 28, width_0, 15, 1); southProfile = initUnidimensionalArray(I_classLit, $intern_49, 28, width_0, 15, 1); height = poly.ySize; eastProfile = initUnidimensionalArray(I_classLit, $intern_49, 28, height, 15, 1); westProfile = initUnidimensionalArray(I_classLit, $intern_49, 28, height, 15, 1); for (xi0 = 0; xi0 < width_0; xi0++) { y_0 = 0; while (y_0 < height && !$isBlocked(poly, xi0, y_0)) { ++y_0; } northProfile[xi0] = y_0; } for (xi1 = 0; xi1 < width_0; xi1++) { y_0 = height - 1; while (y_0 >= 0 && !$isBlocked(poly, xi1, y_0)) { --y_0; } southProfile[xi1] = y_0; } for (yi0 = 0; yi0 < height; yi0++) { x_0 = 0; while (x_0 < width_0 && !$isBlocked(poly, x_0, yi0)) { ++x_0; } eastProfile[yi0] = x_0; } for (yi1 = 0; yi1 < height; yi1++) { x_0 = width_0 - 1; while (x_0 >= 0 && !$isBlocked(poly, x_0, yi1)) { --x_0; } westProfile[yi1] = x_0; } for (xi = 0; xi < width_0; xi++) { for (yi = 0; yi < height; yi++) { xi < westProfile[yi] && xi > eastProfile[yi] && yi < southProfile[xi] && yi > northProfile[xi] && $set_4(poly, xi, yi, false, true); } } } function $apply_3(this$static, coords, poly){ return poly.polyominoExtensions.array.length > 0?$apply_8(this$static.externalFun, coords, poly):$apply_8(this$static.normalFun, coords, poly); } function SuccessorCombination(normalFun, externalFun){ this.normalFun = normalFun; this.externalFun = externalFun; } defineClass(782, 1, {}, SuccessorCombination); _.apply_3 = function apply_41(coords, poly){ return $apply_3(this, castTo(coords, 42), castTo(poly, 176)); } ; var Lorg_eclipse_elk_alg_common_polyomino_SuccessorCombination_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino', 'SuccessorCombination', 782); function $apply_4(coords){ var cost, newX, newY, x_0, y_0; x_0 = castTo(coords.first, 17).value_0; y_0 = castTo(coords.second, 17).value_0; newX = x_0; newY = y_0; cost = $wnd.Math.max($wnd.Math.abs(x_0), $wnd.Math.abs(y_0)); if (x_0 <= 0 && x_0 == y_0) { newX = 0; newY = y_0 - 1; } else { if (x_0 == -cost && y_0 != cost) { newX = y_0; newY = x_0; y_0 >= 0 && ++newX; } else { newX = -y_0; newY = x_0; } } return new Pair(valueOf_3(newX), valueOf_3(newY)); } function SuccessorJitter(){ } defineClass(649, 1, {}, SuccessorJitter); _.apply_3 = function apply_42(coords, poly){ var lastArg; return $apply_4((lastArg = castTo(coords, 42) , castTo(poly, 176) , lastArg)); } ; var Lorg_eclipse_elk_alg_common_polyomino_SuccessorJitter_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino', 'SuccessorJitter', 649); function $apply_5(coords){ var x_0, y_0; x_0 = castTo(coords.first, 17).value_0; y_0 = castTo(coords.second, 17).value_0; if (x_0 >= 0) { if (x_0 == y_0) { return new Pair(valueOf_3(-x_0 - 1), valueOf_3(-x_0 - 1)); } if (x_0 == -y_0) { return new Pair(valueOf_3(-x_0), valueOf_3(y_0 + 1)); } } if ($wnd.Math.abs(x_0) > $wnd.Math.abs(y_0)) { if (x_0 < 0) { return new Pair(valueOf_3(-x_0), valueOf_3(y_0)); } return new Pair(valueOf_3(-x_0), valueOf_3(y_0 + 1)); } return new Pair(valueOf_3(x_0 + 1), valueOf_3(y_0)); } function SuccessorLineByLine(){ } defineClass(648, 1, {}, SuccessorLineByLine); _.apply_3 = function apply_43(coords, poly){ var lastArg; return $apply_5((lastArg = castTo(coords, 42) , castTo(poly, 176) , lastArg)); } ; var Lorg_eclipse_elk_alg_common_polyomino_SuccessorLineByLine_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino', 'SuccessorLineByLine', 648); function $apply_6(coords){ var newX, newY, x_0, y_0; x_0 = castTo(coords.first, 17).value_0; y_0 = castTo(coords.second, 17).value_0; newX = x_0; newY = y_0; if (x_0 == 0 && y_0 == 0) { newY -= 1; } else { if (x_0 == -1 && y_0 <= 0) { newX = 0; newY -= 2; } else { if (x_0 <= 0 && y_0 > 0) { newX -= 1; newY -= 1; } else { if (x_0 >= 0 && y_0 < 0) { newX += 1; newY += 1; } else { if (x_0 > 0 && y_0 >= 0) { newX -= 1; newY += 1; } else { newX += 1; newY -= 1; } } } } } return new Pair(valueOf_3(newX), valueOf_3(newY)); } function SuccessorManhattan(){ } defineClass(573, 1, {}, SuccessorManhattan); _.apply_3 = function apply_44(coords, poly){ var lastArg; return $apply_6((lastArg = castTo(coords, 42) , castTo(poly, 176) , lastArg)); } ; var Lorg_eclipse_elk_alg_common_polyomino_SuccessorManhattan_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino', 'SuccessorManhattan', 573); function $apply_7(coords){ var cost, x_0, y_0; x_0 = castTo(coords.first, 17).value_0; y_0 = castTo(coords.second, 17).value_0; cost = $wnd.Math.max($wnd.Math.abs(x_0), $wnd.Math.abs(y_0)); if (x_0 < cost && y_0 == -cost) { return new Pair(valueOf_3(x_0 + 1), valueOf_3(y_0)); } if (x_0 == cost && y_0 < cost) { return new Pair(valueOf_3(x_0), valueOf_3(y_0 + 1)); } if (x_0 >= -cost && y_0 == cost) { return new Pair(valueOf_3(x_0 - 1), valueOf_3(y_0)); } return new Pair(valueOf_3(x_0), valueOf_3(y_0 - 1)); } function SuccessorMaxNormWindingInMathPosSense(){ } defineClass(1344, 1, {}, SuccessorMaxNormWindingInMathPosSense); _.apply_3 = function apply_45(coords, poly){ var lastArg; return $apply_7((lastArg = castTo(coords, 42) , castTo(poly, 176) , lastArg)); } ; var Lorg_eclipse_elk_alg_common_polyomino_SuccessorMaxNormWindingInMathPosSense_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino', 'SuccessorMaxNormWindingInMathPosSense', 1344); function $apply_8(this$static, coords, poly){ return $apply_9(this$static, castTo(coords, 42), castTo(poly, 176)); } function $apply_9(this$static, coords, poly){ var containsNeg, containsPos, detectDirections, dirSet, invalid, newX, newY, nextCoords; if (!equals_Ljava_lang_Object__Z__devirtual$(poly, this$static.lastPoly)) { this$static.lastPoly = poly; detectDirections = new SuccessorQuadrantsGeneric$lambda$0$Type; dirSet = castTo($collect_1($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(poly.polyominoExtensions, 16)), detectDirections), of_3(new Collectors$23methodref$ctor$Type, new Collectors$24methodref$add$Type, new Collectors$lambda$50$Type, new Collectors$lambda$51$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , UNORDERED), IDENTITY_FINISH]))), 21); this$static.posX = true; this$static.posY = true; this$static.negX = true; this$static.negY = true; containsPos = dirSet.contains(($clinit_Direction() , NORTH)); containsNeg = dirSet.contains(SOUTH); containsPos && !containsNeg && (this$static.posY = false); !containsPos && containsNeg && (this$static.negY = false); containsPos = dirSet.contains(EAST); containsNeg = dirSet.contains(WEST); containsPos && !containsNeg && (this$static.negX = false); !containsPos && containsNeg && (this$static.posX = false); } nextCoords = castTo(this$static.costFun.apply_3(coords, poly), 42); newX = castTo(nextCoords.first, 17).value_0; newY = castTo(nextCoords.second, 17).value_0; invalid = false; newX < 0?this$static.negX || (invalid = true):this$static.posX || (invalid = true); newY < 0?this$static.negY || (invalid = true):this$static.posY || (invalid = true); return invalid?$apply_9(this$static, nextCoords, poly):nextCoords; } function SuccessorQuadrantsGeneric(costFun){ this.costFun = costFun; } defineClass(409, 1, {}, SuccessorQuadrantsGeneric); _.apply_3 = function apply_46(coords, poly){ return $apply_8(this, coords, poly); } ; _.negX = false; _.negY = false; _.posX = false; _.posY = false; var Lorg_eclipse_elk_alg_common_polyomino_SuccessorQuadrantsGeneric_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino', 'SuccessorQuadrantsGeneric', 409); function SuccessorQuadrantsGeneric$lambda$0$Type(){ } defineClass(1345, 1, {}, SuccessorQuadrantsGeneric$lambda$0$Type); _.apply_0 = function apply_47(arg0){ return castTo(arg0, 334).first; } ; var Lorg_eclipse_elk_alg_common_polyomino_SuccessorQuadrantsGeneric$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino', 'SuccessorQuadrantsGeneric/lambda$0$Type', 1345); function $clinit_Direction(){ $clinit_Direction = emptyMethod; NORTH = new Direction('NORTH', 0); EAST = new Direction('EAST', 1); SOUTH = new Direction('SOUTH', 2); WEST = new Direction('WEST', 3); NORTH.horizontal = false; EAST.horizontal = true; SOUTH.horizontal = false; WEST.horizontal = true; } function Direction(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_20(name_0){ $clinit_Direction(); return valueOf(($clinit_Direction$Map() , $MAP_10), name_0); } function values_28(){ $clinit_Direction(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_polyomino_structures_Direction_2_classLit, 1), $intern_37, 332, 0, [NORTH, EAST, SOUTH, WEST]); } defineClass(332, 22, {3:1, 34:1, 22:1, 332:1}, Direction); _.horizontal = false; var EAST, NORTH, SOUTH, WEST; var Lorg_eclipse_elk_alg_common_polyomino_structures_Direction_2_classLit = createForEnum('org.eclipse.elk.alg.common.polyomino.structures', 'Direction', 332, Ljava_lang_Enum_2_classLit, values_28, valueOf_20); function $clinit_Direction$Map(){ $clinit_Direction$Map = emptyMethod; $MAP_10 = createValueOfMap(($clinit_Direction() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_polyomino_structures_Direction_2_classLit, 1), $intern_37, 332, 0, [NORTH, EAST, SOUTH, WEST]))); } var $MAP_10; function $incModTen(num){ if (num > 8) { return 0; } return num + 1; } function $isBlocked(this$static, x_0, y_0){ try { return eq($retrieve(this$static, x_0, y_0), 1); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 333)) { throw toJs(new IndexOutOfBoundsException_0('Grid is only of size ' + this$static.xSize + '*' + this$static.ySize + '. Requested point (' + x_0 + ', ' + y_0 + ') is out of bounds.')); } else throw toJs($e0); } } function $isEmpty_0(this$static, x_0, y_0){ try { return eq($retrieve(this$static, x_0, y_0), 0); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 333)) { throw toJs(new IndexOutOfBoundsException_0('Grid is only of size ' + this$static.xSize + '*' + this$static.ySize + '. Requested point (' + x_0 + ', ' + y_0 + ') is out of bounds.')); } else throw toJs($e0); } } function $isWeaklyBlocked(this$static, x_0, y_0){ try { return eq($retrieve(this$static, x_0, y_0), 2); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 333)) { throw toJs(new IndexOutOfBoundsException_0('Grid is only of size ' + this$static.xSize + '*' + this$static.ySize + '. Requested point (' + x_0 + ', ' + y_0 + ') is out of bounds.')); } else throw toJs($e0); } } function $retrieve(this$static, x_0, y_0){ var value_0, xRest, xWord; xWord = x_0 >> 5; xRest = x_0 & 31; value_0 = and_0(shru_0(this$static.grid[y_0][xWord], toInt_0(shl_0(xRest, 1))), 3); return value_0; } function $set_4(this$static, x_0, y_0, msb, lsb){ var mask, xRest, xWord; try { if (x_0 >= this$static.xSize) { throw toJs(new ArrayIndexOutOfBoundsException); } xWord = x_0 >> 5; xRest = x_0 & 31; mask = shl_0(1, toInt_0(shl_0(xRest, 1))); lsb?(this$static.grid[y_0][xWord] = or_0(this$static.grid[y_0][xWord], mask)):(this$static.grid[y_0][xWord] = and_0(this$static.grid[y_0][xWord], not_0(mask))); mask = shl_0(mask, 1); msb?(this$static.grid[y_0][xWord] = or_0(this$static.grid[y_0][xWord], mask)):(this$static.grid[y_0][xWord] = and_0(this$static.grid[y_0][xWord], not_0(mask))); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 333)) { throw toJs(new IndexOutOfBoundsException_0('Grid is only of size ' + this$static.xSize + '*' + this$static.ySize + '. Requested point (' + x_0 + ', ' + y_0 + ') is out of bounds.')); } else throw toJs($e0); } } defineClass(1317, 1, {}); _.toString_0 = function toString_78(){ var count, item_0, output, x_0, x0, y_0; output = ' '; count = valueOf_3(0); for (x0 = 0; x0 < this.xSize; x0++) { output += '' + count.value_0; count = valueOf_3($incModTen(count.value_0)); } output += '\n'; count = valueOf_3(0); for (y_0 = 0; y_0 < this.ySize; y_0++) { output += '' + count.value_0; count = valueOf_3($incModTen(count.value_0)); for (x_0 = 0; x_0 < this.xSize; x_0++) { item_0 = $retrieve(this, x_0, y_0); compare_2(item_0, 0) == 0?(output += '_'):compare_2(item_0, 1) == 0?(output += 'X'):(output += '0'); } output += '\n'; } return $substring_1(output, 0, output.length - 1); } ; _.xSize = 0; _.ySize = 0; var Lorg_eclipse_elk_alg_common_polyomino_structures_TwoBitGrid_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino.structures', 'TwoBitGrid', 1317); function $addFilledCellsFrom(this$static, other, xOffset, yOffset){ var x_0, xTranslated, y_0, yTranslated; for (x_0 = 0; x_0 < other.xSize; x_0++) { xTranslated = x_0 - other.xCenter + xOffset; for (y_0 = 0; y_0 < other.ySize; y_0++) { yTranslated = y_0 - other.yCenter + yOffset; $isBlocked(other, x_0, y_0)?$isWeaklyBlockedCenterBased(this$static, xTranslated, yTranslated) || $setBlockedCenterBased(this$static, xTranslated, yTranslated):$isWeaklyBlocked(other, x_0, y_0) && ($isBlockedCenterBased(this$static, xTranslated, yTranslated) || $setWeaklyBlockedCenterBased(this$static, xTranslated, yTranslated)); } } } function $addFilledCellsFrom_0(this$static, other, xOffset, yOffset){ var ext, ext$iterator; $addFilledCellsFrom(this$static, other, xOffset, yOffset); $setX(other, this$static.xCenter - other.xCenter + xOffset); $setY(other, this$static.yCenter - other.yCenter + yOffset); for (ext$iterator = new ArrayList$1(other.polyominoExtensions); ext$iterator.i < ext$iterator.this$01.array.length;) { ext = castTo($next_6(ext$iterator), 334); switch (ext.first.ordinal) { case 0: $weaklyBlockArea(this$static, other.x_0 + ext.second.value_0, 0, other.x_0 + ext.third.value_0, other.y_0 - 1); break; case 1: $weaklyBlockArea(this$static, other.x_0 + other.xSize, other.y_0 + ext.second.value_0, this$static.xSize - 1, other.y_0 + ext.third.value_0); break; case 2: $weaklyBlockArea(this$static, other.x_0 + ext.second.value_0, other.y_0 + other.ySize, other.x_0 + ext.third.value_0, this$static.ySize - 1); break; default:$weaklyBlockArea(this$static, 0, other.y_0 + ext.second.value_0, other.x_0 - 1, other.y_0 + ext.third.value_0); } } } function $getFilledBounds(this$static){ var gridHeight, gridWidth, height, maxX, maxY, minX, minY, width_0, xi, yi; gridWidth = this$static.xSize; gridHeight = this$static.ySize; minX = $intern_0; maxX = $intern_43; minY = $intern_0; maxY = $intern_43; for (xi = 0; xi < gridWidth; ++xi) { for (yi = 0; yi < gridHeight; ++yi) { if ($isBlocked(this$static, xi, yi)) { minX = $wnd.Math.min(minX, xi); maxX = $wnd.Math.max(maxX, xi); minY = $wnd.Math.min(minY, yi); maxY = $wnd.Math.max(maxY, yi); } } } width_0 = maxX - minX + 1; height = maxY - minY + 1; return new Quadruple(valueOf_3(minX), valueOf_3(minY), valueOf_3(width_0), valueOf_3(height)); } function $intersectsWithCenterBased(this$static, other, xOffset, yOffset){ var x_0, xTranslated, y_0, yTranslated, xt, yt; for (x_0 = 0; x_0 < other.xSize; x_0++) { xTranslated = x_0 - other.xCenter + xOffset; for (y_0 = 0; y_0 < other.ySize; y_0++) { yTranslated = y_0 - other.yCenter + yOffset; if ((xt = xTranslated , yt = yTranslated , xt += this$static.xCenter , yt += this$static.yCenter , xt >= 0 && yt >= 0 && xt < this$static.xSize && yt < this$static.ySize) && (!$isEmpty_0(other, x_0, y_0) && $isBlockedCenterBased(this$static, xTranslated, yTranslated) || $isBlocked(other, x_0, y_0) && !$isEmptyCenterBased(this$static, xTranslated, yTranslated))) { return true; } } } return false; } function $intersectsWithCenterBased_0(this$static, other, xOffset, yOffset){ var bottomY, ext, ext$iterator, intersects, leftX, rightX, topY; if ($intersectsWithCenterBased(this$static, other, xOffset, yOffset)) { return true; } else { for (ext$iterator = new ArrayList$1(other.polyominoExtensions); ext$iterator.i < ext$iterator.this$01.array.length;) { ext = castTo($next_6(ext$iterator), 334); intersects = false; leftX = this$static.xCenter - other.xCenter + xOffset; rightX = leftX + other.xSize; topY = this$static.yCenter - other.yCenter + yOffset; bottomY = topY + other.ySize; switch (ext.first.ordinal) { case 0: intersects = $weaklyIntersectsArea(this$static, leftX + ext.second.value_0, 0, leftX + ext.third.value_0, topY - 1); break; case 1: intersects = $weaklyIntersectsArea(this$static, rightX, topY + ext.second.value_0, this$static.xSize - 1, topY + ext.third.value_0); break; case 2: intersects = $weaklyIntersectsArea(this$static, leftX + ext.second.value_0, bottomY, leftX + ext.third.value_0, this$static.ySize - 1); break; default:intersects = $weaklyIntersectsArea(this$static, 0, topY + ext.second.value_0, leftX - 1, topY + ext.third.value_0); } if (intersects) { return true; } } } return false; } function $isBlockedCenterBased(this$static, x_0, y_0){ var e; try { return $isBlocked(this$static, x_0 + this$static.xCenter, y_0 + this$static.yCenter); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 77)) { e = $e0; throw toJs(new IndexOutOfBoundsException_0(e.detailMessage + ' Given center based coordinates were (' + x_0 + ', ' + y_0 + ').')); } else throw toJs($e0); } } function $isEmptyCenterBased(this$static, x_0, y_0){ var e; try { return $isEmpty_0(this$static, x_0 + this$static.xCenter, y_0 + this$static.yCenter); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 77)) { e = $e0; throw toJs(new IndexOutOfBoundsException_0(e.detailMessage + ' Given center based coordinates were (' + x_0 + ', ' + y_0 + ').')); } else throw toJs($e0); } } function $isWeaklyBlockedCenterBased(this$static, x_0, y_0){ var e; try { return $isWeaklyBlocked(this$static, x_0 + this$static.xCenter, y_0 + this$static.yCenter); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 77)) { e = $e0; throw toJs(new IndexOutOfBoundsException_0(e.detailMessage + ' Given center based coordinates were (' + x_0 + ', ' + y_0 + ').')); } else throw toJs($e0); } } function $reinitialize(this$static, width_0, height){ this$static.grid = initMultidimensionalArray(J_classLit, [$intern_16, $intern_63], [376, 28], 14, [height, round_int($wnd.Math.ceil(width_0 / 32))], 2); this$static.xSize = width_0; this$static.ySize = height; this$static.xCenter = width_0 - 1 >> 1; this$static.yCenter = height - 1 >> 1; } function $setBlockedCenterBased(this$static, x_0, y_0){ var e; try { $set_4(this$static, x_0 + this$static.xCenter, y_0 + this$static.yCenter, false, true); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 77)) { e = $e0; throw toJs(new IndexOutOfBoundsException_0(e.detailMessage + ' Given center based coordinates were (' + x_0 + ', ' + y_0 + ').')); } else throw toJs($e0); } } function $setWeaklyBlockedCenterBased(this$static, x_0, y_0){ var e; try { $set_4(this$static, x_0 + this$static.xCenter, y_0 + this$static.yCenter, true, false); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 77)) { e = $e0; throw toJs(new IndexOutOfBoundsException_0(e.detailMessage + ' Given center based coordinates were (' + x_0 + ', ' + y_0 + ').')); } else throw toJs($e0); } } function $weaklyBlockArea(this$static, xUpperLeft, yUpperleft, xBottomRight, yBottomRight){ var xi, yi; for (yi = yUpperleft; yi <= yBottomRight; yi++) { for (xi = xUpperLeft; xi <= xBottomRight; xi++) { $isBlocked(this$static, xi, yi) || $set_4(this$static, xi, yi, true, false); } } } function $weaklyIntersectsArea(this$static, xUpperLeft, yUpperleft, xBottomRight, yBottomRight){ var xi, yi; for (yi = yUpperleft; yi <= yBottomRight; yi++) { for (xi = xUpperLeft; xi <= xBottomRight; xi++) { if ($isBlocked(this$static, xi, yi)) { return true; } } } return false; } function PlanarGrid(width_0, height){ this.grid = initMultidimensionalArray(J_classLit, [$intern_16, $intern_63], [376, 28], 14, [height, round_int($wnd.Math.ceil(width_0 / 32))], 2); this.xSize = width_0; this.ySize = height; this.xCenter = width_0 - 1 >> 1; this.yCenter = height - 1 >> 1; } defineClass(330, 1317, {330:1}, PlanarGrid); _.xCenter = 0; _.yCenter = 0; var Lorg_eclipse_elk_alg_common_polyomino_structures_PlanarGrid_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino.structures', 'PlanarGrid', 330); function $setX(this$static, val){ this$static.x_0 = val; } function $setY(this$static, val){ this$static.y_0 = val; } function Polyomino(extensions){ PlanarGrid.call(this, 0, 0); this.polyominoExtensions = extensions; } defineClass(176, 330, {330:1, 176:1}); _.x_0 = 0; _.y_0 = 0; var Lorg_eclipse_elk_alg_common_polyomino_structures_Polyomino_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino.structures', 'Polyomino', 176); var Lorg_eclipse_elk_graph_properties_IPropertyHolder_2_classLit = createForInterface('org.eclipse.elk.graph.properties', 'IPropertyHolder'); function $copyProperties(this$static, other){ var otherMap; if (!other) { return this$static; } otherMap = other.getAllProperties(); otherMap.isEmpty() || (!this$static.propertyMap?(this$static.propertyMap = new HashMap_1(otherMap)):$putAll(this$static.propertyMap, otherMap)); return this$static; } function $getAllProperties(this$static){ return !this$static.propertyMap?($clinit_Collections() , $clinit_Collections() , EMPTY_MAP):this$static.propertyMap; } function $getProperty(this$static, property){ var defaultValue, value_0; value_0 = (!this$static.propertyMap && (this$static.propertyMap = new HashMap) , $get_10(this$static.propertyMap, property)); if (value_0 != null) { return value_0; } defaultValue = property.getDefault(); instanceOf(defaultValue, 4) && (defaultValue == null?(!this$static.propertyMap && (this$static.propertyMap = new HashMap) , $remove_6(this$static.propertyMap, property)):(!this$static.propertyMap && (this$static.propertyMap = new HashMap) , $put_6(this$static.propertyMap, property, defaultValue)) , this$static); return defaultValue; } function $hasProperty(this$static, property){ return !!this$static.propertyMap && $containsKey_3(this$static.propertyMap, property); } function $setProperty(this$static, property, value_0){ return value_0 == null?(!this$static.propertyMap && (this$static.propertyMap = new HashMap) , $remove_6(this$static.propertyMap, property)):(!this$static.propertyMap && (this$static.propertyMap = new HashMap) , $put_6(this$static.propertyMap, property, value_0)) , this$static; } function $setProperty_0(this$static, property, value_0){ value_0 == null?(!this$static.propertyMap && (this$static.propertyMap = new HashMap) , $remove_6(this$static.propertyMap, property)):(!this$static.propertyMap && (this$static.propertyMap = new HashMap) , $put_6(this$static.propertyMap, property, value_0)); return this$static; } function MapPropertyHolder(){ } defineClass(137, 1, $intern_95, MapPropertyHolder); _.setProperty = function setProperty(property, value_0){ return $setProperty(this, property, value_0); } ; _.getAllProperties = function getAllProperties(){ return $getAllProperties(this); } ; _.getProperty = function getProperty(property){ return $getProperty(this, property); } ; _.hasProperty = function hasProperty(property){ return $hasProperty(this, property); } ; var Lorg_eclipse_elk_graph_properties_MapPropertyHolder_2_classLit = createForClass('org.eclipse.elk.graph.properties', 'MapPropertyHolder', 137); function Polyominoes(polys, aspectRatio, fill){ var gridHeight, gridWidth, poly, poly$iterator; this.polys = new ArrayList; gridWidth = 0; gridHeight = 0; for (poly$iterator = new ArrayList$1(polys); poly$iterator.i < poly$iterator.this$01.array.length;) { poly = castTo($next_6(poly$iterator), 176); fill && fillPolyomino(poly); $add_3(this.polys, poly); gridWidth += poly.xSize; gridHeight += poly.ySize; } if (this.polys.array.length > 0) { poly = castTo($get_11(this.polys, 0), 176); gridWidth += poly.xSize; gridHeight += poly.ySize; } gridWidth *= 2; gridHeight *= 2; aspectRatio > 1?(gridWidth = round_int($wnd.Math.ceil(gridWidth * aspectRatio))):(gridHeight = round_int($wnd.Math.ceil(gridHeight / aspectRatio))); this.grid = new PlanarGrid(gridWidth, gridHeight); } defineClass(1318, 137, $intern_95, Polyominoes); var Lorg_eclipse_elk_alg_common_polyomino_structures_Polyominoes_2_classLit = createForClass('org.eclipse.elk.alg.common.polyomino.structures', 'Polyominoes', 1318); function compact_0(tree, orthogonal){ svg_0 = new SVGImage; orthogonalCompaction = orthogonal; root_0 = tree; castTo(root_0.node, 68); drawTree(root_0, svg_0, null); compactTree(root_0); } function compactTree(tree){ var child, child$iterator, compactionVector, minUnderlap, rc, rt; $forEach_1(tree.children, new DepthFirstCompaction$0methodref$compactTree$Type); for (child$iterator = new ArrayList$1(tree.children); child$iterator.i < child$iterator.this$01.array.length;) { child = castTo($next_6(child$iterator), 225); compactionVector = $sub_0($clone_1(castTo(tree.node, 68).vertex), castTo(child.node, 68).vertex); if (orthogonalCompaction) { rt = castTo(tree.node, 68).rect; rc = castTo(child.node, 68).rect; if ($wnd.Math.abs(compactionVector.x_0) >= $wnd.Math.abs(compactionVector.y_0)) { compactionVector.y_0 = 0; rc.y_0 + rc.height > rt.y_0 && rc.y_0 < rt.y_0 + rt.height && $scaleToLength(compactionVector, $wnd.Math.max(rt.x_0 - (rc.x_0 + rc.width_0), rc.x_0 - (rt.x_0 + rt.width_0))); } else { compactionVector.x_0 = 0; rc.x_0 + rc.width_0 > rt.x_0 && rc.x_0 < rt.x_0 + rt.width_0 && $scaleToLength(compactionVector, $wnd.Math.max(rt.y_0 - (rc.y_0 + rc.height), rc.y_0 - (rt.y_0 + rt.height))); } } else { $scaleToLength(compactionVector, $underlap(castTo(tree.node, 68), castTo(child.node, 68))); } minUnderlap = $wnd.Math.sqrt(compactionVector.x_0 * compactionVector.x_0 + compactionVector.y_0 * compactionVector.y_0); minUnderlap = getMinUnderlap(root_0, child, minUnderlap, compactionVector); $scaleToLength(compactionVector, minUnderlap); $translate(castTo(child.node, 68), compactionVector); $forEach_1(child.children, new DepthFirstCompaction$lambda$1$Type(compactionVector)); castTo(root_0.node, 68); drawTree(root_0, svg_0, child); } } function drawTree(t, svgImage, mark){ castTo(t.node, 68); castTo(t.node, 68); castTo(t.node, 68); $forEach_1(t.children, new DepthFirstCompaction$lambda$2$Type(mark, svgImage, t)); } function getMinUnderlap(tree, child, currentMinUnderlap, compactionVector){ var c, c$iterator, minUnderlap; minUnderlap = $wnd.Math.min(currentMinUnderlap, minUnderlapWithSubtree(castTo(tree.node, 68), child, currentMinUnderlap, compactionVector)); for (c$iterator = new ArrayList$1(tree.children); c$iterator.i < c$iterator.this$01.array.length;) { c = castTo($next_6(c$iterator), 225); c != child && (minUnderlap = $wnd.Math.min(minUnderlap, getMinUnderlap(c, child, minUnderlap, compactionVector))); } return minUnderlap; } function lambda$1_3(compactionVector_0, c_1){ $translate(castTo(c_1.node, 68), compactionVector_0); $forEach_1(c_1.children, new DepthFirstCompaction$lambda$1$Type(compactionVector_0)); } function lambda$2_0(mark_0, svgImage_1, t_2, c_3){ c_3 == mark_0?(castTo(t_2.node, 68) , castTo(t_2.node, 68) , castTo(c_3.node, 68) , castTo(c_3.node, 68).vertex.y_0):(castTo(t_2.node, 68) , castTo(t_2.node, 68) , castTo(c_3.node, 68) , castTo(c_3.node, 68).vertex.y_0); drawTree(c_3, svgImage_1, mark_0); } function minUnderlapWithSubtree(r, tree, currentMinUnderlap, compactionVector){ var c, child, child$iterator, minUnderlap; minUnderlap = currentMinUnderlap; for (child$iterator = new ArrayList$1(tree.children); child$iterator.i < child$iterator.this$01.array.length;) { child = castTo($next_6(child$iterator), 225); c = castTo(child.node, 68); if (fuzzyCompare(r.rect.x_0, c.rect.x_0 + c.rect.width_0) <= 0 && fuzzyCompare(c.rect.x_0, r.rect.x_0 + r.rect.width_0) <= 0 && fuzzyCompare(r.rect.y_0, c.rect.y_0 + c.rect.height) <= 0 && fuzzyCompare(c.rect.y_0, r.rect.y_0 + r.rect.height) <= 0) { if (fuzzyCompare(c.rect.x_0, r.rect.x_0 + r.rect.width_0) == 0 && compactionVector.x_0 < 0 || fuzzyCompare(c.rect.x_0 + c.rect.width_0, r.rect.x_0) == 0 && compactionVector.x_0 > 0 || fuzzyCompare(c.rect.y_0, r.rect.y_0 + r.rect.height) == 0 && compactionVector.y_0 < 0 || fuzzyCompare(c.rect.y_0 + c.rect.height, r.rect.y_0) == 0 && compactionVector.y_0 > 0) { minUnderlap = 0; break; } } else { minUnderlap = $wnd.Math.min(minUnderlap, $distance(r, c, compactionVector)); } minUnderlap = $wnd.Math.min(minUnderlap, minUnderlapWithSubtree(r, child, minUnderlap, compactionVector)); } return minUnderlap; } var orthogonalCompaction = false, root_0, svg_0; function DepthFirstCompaction$0methodref$compactTree$Type(){ } defineClass(1828, 1, $intern_19, DepthFirstCompaction$0methodref$compactTree$Type); _.accept = function accept_53(arg0){ compactTree(castTo(arg0, 225)); } ; var Lorg_eclipse_elk_alg_common_spore_DepthFirstCompaction$0methodref$compactTree$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.spore', 'DepthFirstCompaction/0methodref$compactTree$Type', 1828); function DepthFirstCompaction$lambda$1$Type(compactionVector_0){ this.compactionVector_0 = compactionVector_0; } defineClass(825, 1, $intern_19, DepthFirstCompaction$lambda$1$Type); _.accept = function accept_54(arg0){ lambda$1_3(this.compactionVector_0, castTo(arg0, 225)); } ; var Lorg_eclipse_elk_alg_common_spore_DepthFirstCompaction$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.spore', 'DepthFirstCompaction/lambda$1$Type', 825); function DepthFirstCompaction$lambda$2$Type(mark_0, svgImage_1, t_2){ this.mark_0 = mark_0; this.svgImage_1 = svgImage_1; this.t_2 = t_2; } defineClass(1829, 1, $intern_19, DepthFirstCompaction$lambda$2$Type); _.accept = function accept_55(arg0){ lambda$2_0(this.mark_0, this.svgImage_1, this.t_2, castTo(arg0, 225)); } ; var Lorg_eclipse_elk_alg_common_spore_DepthFirstCompaction$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.spore', 'DepthFirstCompaction/lambda$2$Type', 1829); function $clinit_InternalProperties(){ $clinit_InternalProperties = emptyMethod; DEBUG_SVG = new Property_0('debugSVG', ($clinit_Boolean() , false)); OVERLAPS_EXISTED = new Property_0('overlapsExisted', true); } var DEBUG_SVG, OVERLAPS_EXISTED; function $distance(this$static, other, v){ var distance, e1, e1$iterator, e2, e2$iterator, result; result = $intern_60; for (e1$iterator = new ArrayList$1(getRectEdges(this$static.rect)); e1$iterator.i < e1$iterator.this$01.array.length;) { e1 = castTo($next_6(e1$iterator), 177); for (e2$iterator = new ArrayList$1(getRectEdges(other.rect)); e2$iterator.i < e2$iterator.this$01.array.length;) { e2 = castTo($next_6(e2$iterator), 177); distance = distance_0(e1.u, e1.v, e2.u, e2.v, v); result = $wnd.Math.min(result, distance); } } return result; } function $setCenterPosition(this$static, p){ $translate(this$static, $sub_0(new KVector_1(p.x_0, p.y_0), this$static.vertex)); } function $translate(this$static, v){ $add_19(this$static.vertex, v); this$static.rect.x_0 += v.x_0; this$static.rect.y_0 += v.y_0; } function $underlap(this$static, other){ var hScale, horizontalCenterDistance, horizontalUnderlap, scale, vScale, verticalCenterDistance, verticalUnderlap; horizontalCenterDistance = $wnd.Math.abs($getCenter(this$static.rect).x_0 - $getCenter(other.rect).x_0); verticalCenterDistance = $wnd.Math.abs($getCenter(this$static.rect).y_0 - $getCenter(other.rect).y_0); horizontalUnderlap = 0; verticalUnderlap = 0; hScale = 1; vScale = 1; if (horizontalCenterDistance > this$static.rect.width_0 / 2 + other.rect.width_0 / 2) { horizontalUnderlap = $wnd.Math.min($wnd.Math.abs(this$static.rect.x_0 - (other.rect.x_0 + other.rect.width_0)), $wnd.Math.abs(this$static.rect.x_0 + this$static.rect.width_0 - other.rect.x_0)); hScale = 1 - horizontalUnderlap / horizontalCenterDistance; } if (verticalCenterDistance > this$static.rect.height / 2 + other.rect.height / 2) { verticalUnderlap = $wnd.Math.min($wnd.Math.abs(this$static.rect.y_0 - (other.rect.y_0 + other.rect.height)), $wnd.Math.abs(this$static.rect.y_0 + this$static.rect.height - other.rect.y_0)); vScale = 1 - verticalUnderlap / verticalCenterDistance; } scale = $wnd.Math.min(hScale, vScale); return (1 - scale) * $wnd.Math.sqrt(horizontalCenterDistance * horizontalCenterDistance + verticalCenterDistance * verticalCenterDistance); } function Node_0(v, r){ this.originalVertex = v; this.vertex = $clone_1(this.originalVertex); this.rect = new ElkRectangle_1(r); } defineClass(68, 1, {68:1}, Node_0); var Lorg_eclipse_elk_alg_common_spore_Node_2_classLit = createForClass('org.eclipse.elk.alg.common.spore', 'Node', 68); function $overlap_0(n1, n2){ if (!n1 || !n2 || n1 == n2) { return false; } return fuzzyCompare(n1.rect.x_0, n2.rect.x_0 + n2.rect.width_0) < 0 && fuzzyCompare(n2.rect.x_0, n1.rect.x_0 + n1.rect.width_0) < 0; } function $sweep_0(this$static, nodes){ var n, n$iterator, overlapsScanlineHandler, points; points = new ArrayList; for (n$iterator = new ArrayList$1(nodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 68); $add_3(points, new ScanlineOverlapCheck$Timestamp(n, true)); $add_3(points, new ScanlineOverlapCheck$Timestamp(n, false)); } overlapsScanlineHandler = new ScanlineOverlapCheck$OverlapsScanlineHandler(this$static); overlapsScanlineHandler.intervalsSortLeft.map_0.clear_0(); execute(points, this$static.overlapsScanlineComparator, new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_compaction_Scanline$EventHandler_2_classLit, 1), $intern_2, 693, 0, [overlapsScanlineHandler]))); } function ScanlineOverlapCheck(oh){ this.overlapsScanlineComparator = new ScanlineOverlapCheck$lambda$0$Type; this.overlapHandler = oh; } function lambda$0_12(p1_0, p2_1){ var cmp, y1, y2; y1 = p1_0.node.rect.y_0; p1_0.low || (y1 += p1_0.node.rect.height); y2 = p2_1.node.rect.y_0; p2_1.low || (y2 += p2_1.node.rect.height); cmp = compare_4(y1, y2); if (cmp == 0) { if (!p1_0.low && p2_1.low) { return -1; } else if (!p2_1.low && p1_0.low) { return 1; } } return cmp; } defineClass(1214, 1, {}, ScanlineOverlapCheck); var Lorg_eclipse_elk_alg_common_spore_ScanlineOverlapCheck_2_classLit = createForClass('org.eclipse.elk.alg.common.spore', 'ScanlineOverlapCheck', 1214); function $handle_0(this$static, p){ p.low?$insert_3(this$static, p):$remove_28(this$static.intervalsSortLeft, p.node); } function $insert_3(this$static, p){ var other, other$iterator, overlapsFound, success; success = $add_10(this$static.intervalsSortLeft, p.node); if (!success) { throw toJs(new IllegalStateException_0('Invalid hitboxes for scanline overlap calculation.')); } overlapsFound = false; for (other$iterator = this$static.intervalsSortLeft.map_0.keySet_0().iterator_0(); other$iterator.hasNext_0();) { other = castTo(other$iterator.next_1(), 68); if ($overlap_0(p.node, other)) { $handle_4(this$static.this$01.overlapHandler, p.node, other); overlapsFound = true; } else { if (overlapsFound) { break; } } } } function ScanlineOverlapCheck$OverlapsScanlineHandler(this$0){ this.this$01 = this$0; this.intervalsSortLeft = new TreeSet_0(castTo(checkNotNull(new ScanlineOverlapCheck$OverlapsScanlineHandler$lambda$0$Type), 50)); } function lambda$0_13(n1_0, n2_1){ var cmp; cmp = compare_4(n1_0.rect.x_0, n2_1.rect.x_0); if (cmp != 0) { return cmp; } cmp = compare_4(n1_0.originalVertex.x_0, n2_1.originalVertex.x_0); if (cmp != 0) { return cmp; } return compare_4(n1_0.originalVertex.y_0, n2_1.originalVertex.y_0); } defineClass(1215, 1, {693:1}, ScanlineOverlapCheck$OverlapsScanlineHandler); _.handle = function handle_0(p){ $handle_0(this, castTo(p, 451)); } ; var Lorg_eclipse_elk_alg_common_spore_ScanlineOverlapCheck$OverlapsScanlineHandler_2_classLit = createForClass('org.eclipse.elk.alg.common.spore', 'ScanlineOverlapCheck/OverlapsScanlineHandler', 1215); function ScanlineOverlapCheck$OverlapsScanlineHandler$lambda$0$Type(){ } defineClass(1216, 1, $intern_88, ScanlineOverlapCheck$OverlapsScanlineHandler$lambda$0$Type); _.compare_1 = function compare_26(arg0, arg1){ return lambda$0_13(castTo(arg0, 68), castTo(arg1, 68)); } ; _.equals_0 = function equals_78(other){ return this === other; } ; _.reversed = function reversed_18(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_common_spore_ScanlineOverlapCheck$OverlapsScanlineHandler$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.spore', 'ScanlineOverlapCheck/OverlapsScanlineHandler/lambda$0$Type', 1216); function ScanlineOverlapCheck$Timestamp(node, low){ this.node = node; this.low = low; } defineClass(451, 1, {451:1}, ScanlineOverlapCheck$Timestamp); _.low = false; var Lorg_eclipse_elk_alg_common_spore_ScanlineOverlapCheck$Timestamp_2_classLit = createForClass('org.eclipse.elk.alg.common.spore', 'ScanlineOverlapCheck/Timestamp', 451); function ScanlineOverlapCheck$lambda$0$Type(){ } defineClass(1217, 1, $intern_88, ScanlineOverlapCheck$lambda$0$Type); _.compare_1 = function compare_27(arg0, arg1){ return lambda$0_12(castTo(arg0, 451), castTo(arg1, 451)); } ; _.equals_0 = function equals_79(other){ return this === other; } ; _.reversed = function reversed_19(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_common_spore_ScanlineOverlapCheck$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.common.spore', 'ScanlineOverlapCheck/lambda$0$Type', 1217); function SVGImage(){ } defineClass(557, 1, {}, SVGImage); var Lorg_eclipse_elk_alg_common_utils_SVGImage_2_classLit = createForClass('org.eclipse.elk.alg.common.utils', 'SVGImage', 557); function UniqueTriple(f, s, t){ this.first = f; this.second = s; this.third = t; } defineClass(334, 1, {334:1}, UniqueTriple); _.toString_0 = function toString_79(){ return '(' + this.first + ', ' + this.second + ', ' + this.third + ')'; } ; var Lorg_eclipse_elk_alg_common_utils_UniqueTriple_2_classLit = createForClass('org.eclipse.elk.alg.common.utils', 'UniqueTriple', 334); function getRectEdges(r){ var rectEdegs; rectEdegs = new ArrayList; $add_3(rectEdegs, new TEdge(new KVector_1(r.x_0, r.y_0), new KVector_1(r.x_0 + r.width_0, r.y_0))); $add_3(rectEdegs, new TEdge(new KVector_1(r.x_0, r.y_0), new KVector_1(r.x_0, r.y_0 + r.height))); $add_3(rectEdegs, new TEdge(new KVector_1(r.x_0 + r.width_0, r.y_0 + r.height), new KVector_1(r.x_0 + r.width_0, r.y_0))); $add_3(rectEdegs, new TEdge(new KVector_1(r.x_0 + r.width_0, r.y_0 + r.height), new KVector_1(r.x_0, r.y_0 + r.height))); return rectEdegs; } function overlap_0(r1, r2){ var horizontalCenterDistance, horizontalOverlap, verticalCenterDistance, verticalOverlap; horizontalOverlap = $wnd.Math.min($wnd.Math.abs(r1.x_0 - (r2.x_0 + r2.width_0)), $wnd.Math.abs(r1.x_0 + r1.width_0 - r2.x_0)); verticalOverlap = $wnd.Math.min($wnd.Math.abs(r1.y_0 - (r2.y_0 + r2.height)), $wnd.Math.abs(r1.y_0 + r1.height - r2.y_0)); horizontalCenterDistance = $wnd.Math.abs(r1.x_0 + r1.width_0 / 2 - (r2.x_0 + r2.width_0 / 2)); if (horizontalCenterDistance > r1.width_0 / 2 + r2.width_0 / 2) { return 1; } verticalCenterDistance = $wnd.Math.abs(r1.y_0 + r1.height / 2 - (r2.y_0 + r2.height / 2)); if (verticalCenterDistance > r1.height / 2 + r2.height / 2) { return 1; } if (horizontalCenterDistance == 0 && verticalCenterDistance == 0) { return 0; } if (horizontalCenterDistance == 0) { return verticalOverlap / verticalCenterDistance + 1; } if (verticalCenterDistance == 0) { return horizontalOverlap / horizontalCenterDistance + 1; } return $wnd.Math.min(horizontalOverlap / horizontalCenterDistance, verticalOverlap / verticalCenterDistance) + 1; } defineClass(205, 1, $intern_96); var Lorg_eclipse_elk_core_AbstractLayoutProvider_2_classLit = createForClass('org.eclipse.elk.core', 'AbstractLayoutProvider', 205); function DisCoLayoutProvider(){ } defineClass(1114, 205, $intern_96, DisCoLayoutProvider); _.layout = function layout(layoutGraph, progressMonitor){ var lad, layoutProvider, requestedAlgorithm, transformer; progressMonitor.begin('Connected Components Compaction', 1); this.componentSpacing = $doubleValue(castToDouble($getProperty_0(layoutGraph, ($clinit_DisCoOptions() , SPACING_COMPONENT_COMPONENT)))); if ($hasProperty_0(layoutGraph, COMPONENT_COMPACTION_COMPONENT_LAYOUT_ALGORITHM_0)) { requestedAlgorithm = castToString($getProperty_0(layoutGraph, COMPONENT_COMPACTION_COMPONENT_LAYOUT_ALGORITHM_0)); lad = $getAlgorithmDataBySuffix(getInstance(), requestedAlgorithm); if (lad) { layoutProvider = castTo($fetch(lad.providerPool), 205); layoutProvider.layout(layoutGraph, progressMonitor.subTask(1)); } } transformer = new ElkGraphTransformer(this.componentSpacing); this.result = $importGraph(transformer, layoutGraph); switch (castTo($getProperty_0(layoutGraph, ($clinit_DisCoMetaDataProvider() , COMPONENT_COMPACTION_STRATEGY)), 489).ordinal) { case 0: $compact_0(new DisCoPolyominoCompactor, this.result); $setProperty_1(layoutGraph, DEBUG_DISCO_POLYS_0, $getProperty(this.result, DEBUG_DISCO_POLYS_0)); break; default:$clinit_System(); String.fromCharCode(10); } $applyLayout(transformer); $setProperty_1(layoutGraph, DEBUG_DISCO_GRAPH_0, this.result); progressMonitor.done_1(); } ; _.componentSpacing = 0; var Lorg_eclipse_elk_alg_disco_DisCoLayoutProvider_2_classLit = createForClass('org.eclipse.elk.alg.disco', 'DisCoLayoutProvider', 1114); function $applyToDCGraph(this$static){ var absoluteIntPositionX, absoluteIntPositionY, absolutePositionOnCanvas, gridCrop, originalCoordinates, padding, paddingHori, paddingVert, parentHeight, parentWidth, poly, poly$iterator; gridCrop = $getFilledBounds(this$static.grid); padding = castTo($getProperty(this$static.cmpGraph, ($clinit_DisCoOptions() , PADDING)), 107); paddingHori = padding.left + padding.right; paddingVert = padding.top_0 + padding.bottom; parentWidth = gridCrop.third.value_0 * this$static.gridCellSizeX + paddingHori; parentHeight = gridCrop.fourth.value_0 * this$static.gridCellSizeY + paddingVert; $setDimensions(this$static.cmpGraph, new KVector_1(parentWidth, parentHeight)); for (poly$iterator = new ArrayList$1(this$static.polys); poly$iterator.i < poly$iterator.this$01.array.length;) { poly = castTo($next_6(poly$iterator), 568); absoluteIntPositionX = poly.x_0 - gridCrop.first.value_0; absoluteIntPositionY = poly.y_0 - gridCrop.second.value_0; absolutePositionOnCanvas = $add_19($scale_0(new KVector_1(absoluteIntPositionX, absoluteIntPositionY), poly.cellSizeX, poly.cellSizeY), $scale($sub($clone_1($getDimensionsOfBoundingRectangle(poly.representee)), poly.pWidth * poly.cellSizeX, poly.pHeight * poly.cellSizeY), -0.5)); originalCoordinates = $getMinCorner(poly.representee); $setOffset(poly.representee, $sub_0(absolutePositionOnCanvas, originalCoordinates)); } } function $compact_0(this$static, graph){ var gridCellRecommendation; this$static.cmpGraph = graph; this$static.polys = new ArrayList; gridCellRecommendation = $computeCellSize(this$static.cmpGraph); this$static.gridCellSizeX = gridCellRecommendation; this$static.gridCellSizeY = gridCellRecommendation; this$static.fill = $booleanValue(castToBoolean($getProperty(this$static.cmpGraph, ($clinit_PolyominoOptions() , POLYOMINO_FILL)))); this$static.aspectRatio = castToDouble($getProperty(this$static.cmpGraph, ($clinit_CoreOptions() , ASPECT_RATIO_5))); this$static.aspectRatio == null && (this$static.aspectRatio = 1); $doubleValue(this$static.aspectRatio) > 1?(this$static.gridCellSizeX *= $doubleValue(this$static.aspectRatio)):(this$static.gridCellSizeY /= $doubleValue(this$static.aspectRatio)); $createPolyominoes(this$static); $packPolyominoes_0(this$static); $applyToDCGraph(this$static); $setProperty_0(this$static.cmpGraph, ($clinit_DisCoOptions() , DEBUG_DISCO_POLYS_0), this$static.polys); } function $computeCellSize(graph){ var bounds, comp, comp$iterator, comps, denominator, height, numOfComps, numerator, prodTerm, sumTerm, width_0; sumTerm = 0; prodTerm = 0; comps = graph.components; numOfComps = comps.map_0.size_1(); for (comp$iterator = comps.map_0.keySet_0().iterator_0(); comp$iterator.hasNext_0();) { comp = castTo(comp$iterator.next_1(), 567); bounds = (comp.changed && $update(comp) , comp.bounds); width_0 = bounds.x_0; height = bounds.y_0; sumTerm += width_0 + height; prodTerm += width_0 * height; } numerator = $wnd.Math.sqrt(400 * numOfComps * prodTerm - 4 * prodTerm + sumTerm * sumTerm) + sumTerm; denominator = 2 * (100 * numOfComps - 1); if (denominator == 0) { return numerator; } return numerator / denominator; } function $createPolyominoes(this$static){ var comp, comp$iterator, comps, poly; comps = this$static.cmpGraph.components; for (comp$iterator = comps.map_0.keySet_0().iterator_0(); comp$iterator.hasNext_0();) { comp = castTo(comp$iterator.next_1(), 567); poly = new DCPolyomino(comp, this$static.gridCellSizeX, this$static.gridCellSizeY); $add_3(this$static.polys, poly); } } function $packPolyominoes_0(this$static){ var id_0, poly$iterator, polyHolder; id_0 = 0; for (poly$iterator = new ArrayList$1(this$static.polys); poly$iterator.i < poly$iterator.this$01.array.length;) { castTo($next_6(poly$iterator), 568); ++id_0; } polyHolder = new Polyominoes(this$static.polys, $doubleValue(this$static.aspectRatio), this$static.fill); $packPolyominoes(polyHolder); this$static.polys = polyHolder.polys; this$static.grid = polyHolder.grid; } function DisCoPolyominoCompactor(){ } defineClass(1208, 1, {}, DisCoPolyominoCompactor); _.fill = false; _.gridCellSizeX = 0; _.gridCellSizeY = 0; var Lorg_eclipse_elk_alg_disco_DisCoPolyominoCompactor_2_classLit = createForClass('org.eclipse.elk.alg.disco', 'DisCoPolyominoCompactor', 1208); function $addElements(this$static, elements){ var elem, elem$iterator; for (elem$iterator = elements.iterator_0(); elem$iterator.hasNext_0();) { elem = castTo(elem$iterator.next_1(), 272); this$static.changed = true; $add_6(this$static.shapes, elem); elem.cp = this$static; } } function $getDimensionsOfBoundingRectangle(this$static){ this$static.changed && $update(this$static); return this$static.bounds; } function $getMinCorner(this$static){ this$static.changed && $update(this$static); return this$static.minCornerOfBoundingRectangle; } function $intersects(this$static, rect){ var elem, elem$iterator; for (elem$iterator = this$static.shapes.map_0.keySet_0().iterator_0(); elem$iterator.hasNext_0();) { elem = castTo(elem$iterator.next_1(), 272); if (intersects_1(rect, elem.shape_0) || contains_51(rect, elem.shape_0)) { return true; } } return false; } function $setOffset(this$static, offset){ this$static.changed = true; this$static.offset = offset; } function $update(this$static){ var dir_0, elem, elem$iterator, elemBounds, ext, ext$iterator, maxPos, maxX, maxY, minPos, minX, minY; this$static.changed = false; minX = $intern_60; maxX = $intern_61; minY = $intern_60; maxY = $intern_61; for (elem$iterator = this$static.shapes.map_0.keySet_0().iterator_0(); elem$iterator.hasNext_0();) { elem = castTo(elem$iterator.next_1(), 272); elemBounds = elem.bounds; minX = $wnd.Math.min(minX, elemBounds.x_0); maxX = $wnd.Math.max(maxX, elemBounds.x_0 + elemBounds.width_0); minY = $wnd.Math.min(minY, elemBounds.y_0); maxY = $wnd.Math.max(maxY, elemBounds.y_0 + elemBounds.height); for (ext$iterator = new ArrayList$1(elem.extensions); ext$iterator.i < ext$iterator.this$01.array.length;) { ext = castTo($next_6(ext$iterator), 407); dir_0 = ext.direction; if (dir_0.horizontal) { minPos = elemBounds.y_0 + ext.offset.y_0; maxPos = minPos + ext.width_0; minY = $wnd.Math.min(minY, minPos); maxY = $wnd.Math.max(maxY, maxPos); } else { minPos = elemBounds.x_0 + ext.offset.x_0; maxPos = minPos + ext.width_0; minX = $wnd.Math.min(minX, minPos); maxX = $wnd.Math.max(maxX, maxPos); } } } this$static.bounds = new KVector_1(maxX - minX, maxY - minY); this$static.minCornerOfBoundingRectangle = new KVector_1(minX + this$static.offset.x_0, minY + this$static.offset.y_0); } function DCComponent(){ this.offset = new KVector_1(0, 0); this.shapes = new HashSet; } defineClass(567, 1, {567:1}, DCComponent); _.changed = true; var Lorg_eclipse_elk_alg_disco_graph_DCComponent_2_classLit = createForClass('org.eclipse.elk.alg.disco.graph', 'DCComponent', 567); function $clinit_DCDirection(){ $clinit_DCDirection = emptyMethod; NORTH_0 = new DCDirection('NORTH', 0); EAST_0 = new DCDirection('EAST', 1); SOUTH_0 = new DCDirection('SOUTH', 2); WEST_0 = new DCDirection('WEST', 3); NORTH_0.horizontal = false; EAST_0.horizontal = true; SOUTH_0.horizontal = false; WEST_0.horizontal = true; } function DCDirection(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_21(name_0){ $clinit_DCDirection(); return valueOf(($clinit_DCDirection$Map() , $MAP_11), name_0); } function values_29(){ $clinit_DCDirection(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_disco_graph_DCDirection_2_classLit, 1), $intern_37, 406, 0, [NORTH_0, EAST_0, SOUTH_0, WEST_0]); } defineClass(406, 22, {3:1, 34:1, 22:1, 406:1}, DCDirection); _.horizontal = false; var EAST_0, NORTH_0, SOUTH_0, WEST_0; var Lorg_eclipse_elk_alg_disco_graph_DCDirection_2_classLit = createForEnum('org.eclipse.elk.alg.disco.graph', 'DCDirection', 406, Ljava_lang_Enum_2_classLit, values_29, valueOf_21); function $clinit_DCDirection$Map(){ $clinit_DCDirection$Map = emptyMethod; $MAP_11 = createValueOfMap(($clinit_DCDirection() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_disco_graph_DCDirection_2_classLit, 1), $intern_37, 406, 0, [NORTH_0, EAST_0, SOUTH_0, WEST_0]))); } var $MAP_11; function DCElement(polyPath){ var maxX, maxY, minX, minY, v, v$iterator; this.extensions = new ArrayList; this.shape_0 = polyPath; minX = $intern_60; minY = $intern_60; maxX = $intern_61; maxY = $intern_61; for (v$iterator = $listIterator_2(polyPath, 0); v$iterator.currentNode != v$iterator.this$01.tail;) { v = castTo($next_9(v$iterator), 8); minX = $wnd.Math.min(minX, v.x_0); minY = $wnd.Math.min(minY, v.y_0); maxX = $wnd.Math.max(maxX, v.x_0); maxY = $wnd.Math.max(maxY, v.y_0); } this.bounds = new ElkRectangle_0(minX, minY, maxX - minX, maxY - minY); } defineClass(272, 137, {3:1, 272:1, 96:1, 137:1}, DCElement); var Lorg_eclipse_elk_alg_disco_graph_DCElement_2_classLit = createForClass('org.eclipse.elk.alg.disco.graph', 'DCElement', 272); function $setOffset_0(this$static, offset){ this$static.offset = offset; } function DCExtension(parent_0, direction, middlePos, width_0){ var bounds, halfWidth; this.direction = direction; this.width_0 = width_0; bounds = parent_0.bounds; $setOffset_0(this, new KVector_1(-bounds.x_0, -bounds.y_0)); $add_19(this.offset, middlePos); halfWidth = width_0 / 2; direction.horizontal?$sub(this.offset, 0, halfWidth):$sub(this.offset, halfWidth, 0); $add_3(parent_0.extensions, this); } defineClass(407, 1, {407:1}, DCExtension); _.width_0 = 0; var Lorg_eclipse_elk_alg_disco_graph_DCExtension_2_classLit = createForClass('org.eclipse.elk.alg.disco.graph', 'DCExtension', 407); function $setDimensions(this$static, dimensions){ this$static.dimensions = dimensions; } function DCGraph(components){ var component, elements, elements$iterator; this.components = new LinkedHashSet; for (elements$iterator = new ArrayList$1(components); elements$iterator.i < elements$iterator.this$01.array.length;) { elements = castTo($next_6(elements$iterator), 16); component = new DCComponent; $addElements(component, elements); $add_6(this.components, component); } } function DCGraph_0(components){ DCGraph.call(this, components); } defineClass(762, 137, $intern_95, DCGraph_0); var Lorg_eclipse_elk_alg_disco_graph_DCGraph_2_classLit = createForClass('org.eclipse.elk.alg.disco.graph', 'DCGraph', 762); function $clinit_CompactionStrategy(){ $clinit_CompactionStrategy = emptyMethod; POLYOMINO = new CompactionStrategy; } function CompactionStrategy(){ Enum.call(this, 'POLYOMINO', 0); } function valueOf_22(name_0){ $clinit_CompactionStrategy(); return valueOf(($clinit_CompactionStrategy$Map() , $MAP_12), name_0); } function values_30(){ $clinit_CompactionStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_disco_options_CompactionStrategy_2_classLit, 1), $intern_37, 489, 0, [POLYOMINO]); } defineClass(489, 22, {3:1, 34:1, 22:1, 489:1}, CompactionStrategy); var POLYOMINO; var Lorg_eclipse_elk_alg_disco_options_CompactionStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.disco.options', 'CompactionStrategy', 489, Ljava_lang_Enum_2_classLit, values_30, valueOf_22); function $clinit_CompactionStrategy$Map(){ $clinit_CompactionStrategy$Map = emptyMethod; $MAP_12 = createValueOfMap(($clinit_CompactionStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_disco_options_CompactionStrategy_2_classLit, 1), $intern_37, 489, 0, [POLYOMINO]))); } var $MAP_12; function $clinit_DisCoMetaDataProvider(){ $clinit_DisCoMetaDataProvider = emptyMethod; COMPONENT_COMPACTION_STRATEGY_DEFAULT = ($clinit_CompactionStrategy() , POLYOMINO); COMPONENT_COMPACTION_STRATEGY = new Property_1('org.eclipse.elk.disco.componentCompaction.strategy', COMPONENT_COMPACTION_STRATEGY_DEFAULT); COMPONENT_COMPACTION_COMPONENT_LAYOUT_ALGORITHM = new Property('org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm'); DEBUG_DISCO_GRAPH = new Property('org.eclipse.elk.disco.debug.discoGraph'); DEBUG_DISCO_POLYS = new Property('org.eclipse.elk.disco.debug.discoPolys'); } function DisCoMetaDataProvider(){ $clinit_DisCoMetaDataProvider(); } defineClass(865, 1, $intern_90, DisCoMetaDataProvider); _.apply_4 = function apply_48(registry){ $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.disco.componentCompaction.strategy'), 'componentCompaction'), 'Connected Components Compaction Strategy'), 'Strategy for packing different connected components in order to save space and enhance readability of a graph.'), COMPONENT_COMPACTION_STRATEGY_DEFAULT), ($clinit_LayoutOptionData$Type() , ENUM)), Lorg_eclipse_elk_alg_disco_options_CompactionStrategy_2_classLit), of_1(($clinit_LayoutOptionData$Target() , PARENTS))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm'), 'componentCompaction'), 'Connected Components Layout Algorithm'), "A layout algorithm that is to be applied to each connected component before the components themselves are compacted. If unspecified, the positions of the components' nodes are not altered."), STRING), Ljava_lang_String_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.disco.debug.discoGraph'), 'debug'), 'DCGraph'), 'Access to the DCGraph is intended for the debug view,'), OBJECT), Ljava_lang_Object_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.disco.debug.discoPolys'), 'debug'), 'List of Polyominoes'), 'Access to the polyominoes is intended for the debug view,'), OBJECT), Ljava_lang_Object_2_classLit), of_1(PARENTS)))); $apply_10((new DisCoOptions , registry)); } ; var COMPONENT_COMPACTION_COMPONENT_LAYOUT_ALGORITHM, COMPONENT_COMPACTION_STRATEGY, COMPONENT_COMPACTION_STRATEGY_DEFAULT, DEBUG_DISCO_GRAPH, DEBUG_DISCO_POLYS; var Lorg_eclipse_elk_alg_disco_options_DisCoMetaDataProvider_2_classLit = createForClass('org.eclipse.elk.alg.disco.options', 'DisCoMetaDataProvider', 865); function $clinit_DisCoOptions(){ $clinit_DisCoOptions = emptyMethod; SPACING_COMPONENT_COMPONENT = ($clinit_CoreOptions() , SPACING_COMPONENT_COMPONENT_1); EDGE_THICKNESS = EDGE_THICKNESS_1; ASPECT_RATIO = ASPECT_RATIO_5; PADDING = PADDING_6; POLYOMINO_LOW_LEVEL_SORT_0 = ($clinit_PolyominoOptions() , POLYOMINO_LOW_LEVEL_SORT); POLYOMINO_HIGH_LEVEL_SORT_0 = POLYOMINO_HIGH_LEVEL_SORT; POLYOMINO_TRAVERSAL_STRATEGY_0 = POLYOMINO_TRAVERSAL_STRATEGY; POLYOMINO_FILL_0 = POLYOMINO_FILL; COMPONENT_COMPACTION_STRATEGY_0 = ($clinit_DisCoMetaDataProvider() , COMPONENT_COMPACTION_STRATEGY); COMPONENT_COMPACTION_COMPONENT_LAYOUT_ALGORITHM_0 = COMPONENT_COMPACTION_COMPONENT_LAYOUT_ALGORITHM; DEBUG_DISCO_GRAPH_0 = DEBUG_DISCO_GRAPH; DEBUG_DISCO_POLYS_0 = DEBUG_DISCO_POLYS; } function $apply_10(registry){ $register(registry, new LayoutAlgorithmData($providerFactory($description($name_0($id(new LayoutAlgorithmData$Builder, 'org.eclipse.elk.disco'), 'ELK DisCo'), 'Layouter for arranging unconnected subgraphs. The subgraphs themselves are, by default, not laid out.'), new DisCoOptions$DiscoFactory))); $addOptionSupport(registry, 'org.eclipse.elk.disco', 'org.eclipse.elk.spacing.componentComponent', $getDefault(SPACING_COMPONENT_COMPONENT)); $addOptionSupport(registry, 'org.eclipse.elk.disco', 'org.eclipse.elk.edge.thickness', $getDefault(EDGE_THICKNESS)); $addOptionSupport(registry, 'org.eclipse.elk.disco', 'org.eclipse.elk.aspectRatio', $getDefault(ASPECT_RATIO)); $addOptionSupport(registry, 'org.eclipse.elk.disco', 'org.eclipse.elk.padding', $getDefault(PADDING)); $addOptionSupport(registry, 'org.eclipse.elk.disco', 'org.eclipse.elk.polyomino.lowLevelSort', $getDefault(POLYOMINO_LOW_LEVEL_SORT_0)); $addOptionSupport(registry, 'org.eclipse.elk.disco', 'org.eclipse.elk.polyomino.highLevelSort', $getDefault(POLYOMINO_HIGH_LEVEL_SORT_0)); $addOptionSupport(registry, 'org.eclipse.elk.disco', 'org.eclipse.elk.polyomino.traversalStrategy', $getDefault(POLYOMINO_TRAVERSAL_STRATEGY_0)); $addOptionSupport(registry, 'org.eclipse.elk.disco', 'org.eclipse.elk.polyomino.fill', $getDefault(POLYOMINO_FILL_0)); $addOptionSupport(registry, 'org.eclipse.elk.disco', 'org.eclipse.elk.disco.componentCompaction.strategy', $getDefault(COMPONENT_COMPACTION_STRATEGY_0)); $addOptionSupport(registry, 'org.eclipse.elk.disco', 'org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm', $getDefault(COMPONENT_COMPACTION_COMPONENT_LAYOUT_ALGORITHM_0)); $addOptionSupport(registry, 'org.eclipse.elk.disco', 'org.eclipse.elk.disco.debug.discoGraph', $getDefault(DEBUG_DISCO_GRAPH_0)); $addOptionSupport(registry, 'org.eclipse.elk.disco', 'org.eclipse.elk.disco.debug.discoPolys', $getDefault(DEBUG_DISCO_POLYS_0)); } function DisCoOptions(){ $clinit_DisCoOptions(); } defineClass(1010, 1, $intern_90, DisCoOptions); _.apply_4 = function apply_49(registry){ $apply_10(registry); } ; var ASPECT_RATIO, COMPONENT_COMPACTION_COMPONENT_LAYOUT_ALGORITHM_0, COMPONENT_COMPACTION_STRATEGY_0, DEBUG_DISCO_GRAPH_0, DEBUG_DISCO_POLYS_0, EDGE_THICKNESS, PADDING, POLYOMINO_FILL_0, POLYOMINO_HIGH_LEVEL_SORT_0, POLYOMINO_LOW_LEVEL_SORT_0, POLYOMINO_TRAVERSAL_STRATEGY_0, SPACING_COMPONENT_COMPONENT; var Lorg_eclipse_elk_alg_disco_options_DisCoOptions_2_classLit = createForClass('org.eclipse.elk.alg.disco.options', 'DisCoOptions', 1010); function DisCoOptions$DiscoFactory(){ } defineClass(1011, 1, {}, DisCoOptions$DiscoFactory); _.create_0 = function create_2(){ var provider; return provider = new DisCoLayoutProvider , provider; } ; _.destroy = function destroy(obj){ } ; var Lorg_eclipse_elk_alg_disco_options_DisCoOptions$DiscoFactory_2_classLit = createForClass('org.eclipse.elk.alg.disco.options', 'DisCoOptions/DiscoFactory', 1011); function $addExtensionsToPoly(this$static, elem){ var baseX, baseY, compCorner, dir_0, elemPos, extension, extension$iterator, extensions, polyDir, polyoOffset, pos, xe, xp, xpPlusWidth, ye, yp, ypPlusWidth; extensions = elem.extensions; compCorner = $getMinCorner(this$static.representee); polyoOffset = $scale($sub($clone_1($getDimensionsOfBoundingRectangle(this$static.representee)), this$static.pWidth * this$static.cellSizeX, this$static.pHeight * this$static.cellSizeY), -0.5); baseX = compCorner.x_0 - polyoOffset.x_0; baseY = compCorner.y_0 - polyoOffset.y_0; elemPos = elem.bounds; baseX = elemPos.x_0 - baseX; baseY = elemPos.y_0 - baseY; for (extension$iterator = new ArrayList$1(extensions); extension$iterator.i < extension$iterator.this$01.array.length;) { extension = castTo($next_6(extension$iterator), 407); pos = extension.offset; xe = baseX + pos.x_0; ye = baseY + pos.y_0; xp = round_int(xe / this$static.cellSizeX); yp = round_int(ye / this$static.cellSizeY); dir_0 = extension.direction; switch (dir_0.ordinal) { case 0: polyDir = ($clinit_Direction() , NORTH); break; case 1: polyDir = ($clinit_Direction() , EAST); break; case 2: polyDir = ($clinit_Direction() , SOUTH); break; default:polyDir = ($clinit_Direction() , WEST); } if (dir_0.horizontal) { ypPlusWidth = round_int((ye + extension.width_0) / this$static.cellSizeY); $add_3(this$static.polyominoExtensions, new UniqueTriple(polyDir, valueOf_3(yp), valueOf_3(ypPlusWidth))); dir_0 == ($clinit_DCDirection() , WEST_0)?$weaklyBlockArea(this$static, 0, yp, xp, ypPlusWidth):$weaklyBlockArea(this$static, xp, yp, this$static.pWidth - 1, ypPlusWidth); } else { xpPlusWidth = round_int((xe + extension.width_0) / this$static.cellSizeX); $add_3(this$static.polyominoExtensions, new UniqueTriple(polyDir, valueOf_3(xp), valueOf_3(xpPlusWidth))); dir_0 == ($clinit_DCDirection() , NORTH_0)?$weaklyBlockArea(this$static, xp, 0, xpPlusWidth, yp):$weaklyBlockArea(this$static, xp, yp, xpPlusWidth, this$static.pHeight - 1); } } } function $computeLowResDimension(dim, cellSize){ var cellFit, fitTruncated; cellFit = dim / cellSize; fitTruncated = round_int(cellFit); cellFit > fitTruncated && ++fitTruncated; return fitTruncated; } function $fillCells(this$static){ var baseX, compCorner, curX, curY, polyoOffset, x_0, y_0; compCorner = $getMinCorner(this$static.representee); polyoOffset = $scale($sub($clone_1($getDimensionsOfBoundingRectangle(this$static.representee)), this$static.pWidth * this$static.cellSizeX, this$static.pHeight * this$static.cellSizeY), -0.5); baseX = compCorner.x_0 - polyoOffset.x_0; curY = compCorner.y_0 - polyoOffset.y_0; for (y_0 = 0; y_0 < this$static.pHeight; y_0++) { curX = baseX; for (x_0 = 0; x_0 < this$static.pWidth; x_0++) { $intersects(this$static.representee, new ElkRectangle_0(curX, curY, this$static.cellSizeX, this$static.cellSizeY)) && $set_4(this$static, x_0, y_0, false, true); curX += this$static.cellSizeX; } curY += this$static.cellSizeY; } } function DCPolyomino(comp, csX, csY){ var compDims, elem, elem$iterator; Polyomino.call(this, new ArrayList); this.cellSizeX = csX; this.cellSizeY = csY; this.representee = comp; compDims = (comp.changed && $update(comp) , comp.bounds); this.pWidth = $computeLowResDimension(compDims.x_0, this.cellSizeX); this.pHeight = $computeLowResDimension(compDims.y_0, this.cellSizeY); $reinitialize(this, this.pWidth, this.pHeight); $fillCells(this); for (elem$iterator = this.representee.shapes.map_0.keySet_0().iterator_0(); elem$iterator.hasNext_0();) { elem = castTo(elem$iterator.next_1(), 272); elem.extensions.array.length > 0 && $addExtensionsToPoly(this, elem); } } defineClass(568, 176, {330:1, 176:1, 568:1}, DCPolyomino); _.cellSizeX = 0; _.cellSizeY = 0; _.pHeight = 0; _.pWidth = 0; var Lorg_eclipse_elk_alg_disco_structures_DCPolyomino_2_classLit = createForClass('org.eclipse.elk.alg.disco.structures', 'DCPolyomino', 568); function $clinit_ElkGraphComponentsProcessor(){ $clinit_ElkGraphComponentsProcessor = emptyMethod; visited_0 = new ArrayList; incidenceMap = new HashMap; components_0 = new ArrayList; } function addNodesToIncidenceSet(incidentNodes, edges, chooseNode){ var edge, edge$iterator; for (edge$iterator = edges.iterator_0(); edge$iterator.hasNext_0();) { edge = castTo(edge$iterator.next_1(), 74); $add_6(incidentNodes, castTo(chooseNode.apply_0(edge), 27)); } } function computeIncidences(nodes){ var adjacentAndInsideParent, adjacentNodes, connectedToParentPort, edges, incomingEdge, incomingEdge$iterator, node, node$iterator, nodesAtPort, outgoingEdge, outgoingEdge$iterator, port, sameHierarchyLevel; adjacentAndInsideParent = new HashMap; for (node$iterator = new AbstractEList$EIterator(nodes); node$iterator.cursor != node$iterator.this$01_2.size_1();) { node = castTo($doNext(node$iterator), 27); adjacentNodes = new HashSet; $put_6(incidenceMap, node, adjacentNodes); sameHierarchyLevel = new ElkGraphComponentsProcessor$lambda$0$Type; edges = castTo($collect_1(new StreamImpl(null, new Spliterators$IteratorSpliterator_0(new Iterators$ConcatenatedIterator(transform_2(allIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10)))), partitioningBy(sameHierarchyLevel, of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , IDENTITY_FINISH)])))), 85); addNodesToIncidenceSet(adjacentNodes, castTo(edges.get_3(($clinit_Boolean() , true)), 16), new ElkGraphComponentsProcessor$lambda$1$Type); connectedToParentPort = castTo($collect_1($filter(castTo(edges.get_3(false), 15).parallelStream(), new ElkGraphComponentsProcessor$lambda$2$Type), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [IDENTITY_FINISH]))), 15); for (incomingEdge$iterator = connectedToParentPort.iterator_0(); incomingEdge$iterator.hasNext_0();) { incomingEdge = castTo(incomingEdge$iterator.next_1(), 74); port = getSourcePort(incomingEdge); if (port) { nodesAtPort = castTo(getEntryValueOrNull($getEntry_0(adjacentAndInsideParent.hashCodeMap, port)), 21); if (!nodesAtPort) { nodesAtPort = getInnerNeighborsOfPort(port); $put_9(adjacentAndInsideParent.hashCodeMap, port, nodesAtPort); } $addAll(adjacentNodes, nodesAtPort); } } edges = castTo($collect_1(new StreamImpl(null, new Spliterators$IteratorSpliterator_0(new Iterators$ConcatenatedIterator(transform_2(allOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10)))), partitioningBy(sameHierarchyLevel, of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [IDENTITY_FINISH])))), 85); addNodesToIncidenceSet(adjacentNodes, castTo(edges.get_3(true), 16), new ElkGraphComponentsProcessor$lambda$3$Type); connectedToParentPort = castTo($collect_1($filter(castTo(edges.get_3(false), 15).parallelStream(), new ElkGraphComponentsProcessor$lambda$4$Type), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [IDENTITY_FINISH]))), 15); for (outgoingEdge$iterator = connectedToParentPort.iterator_0(); outgoingEdge$iterator.hasNext_0();) { outgoingEdge = castTo(outgoingEdge$iterator.next_1(), 74); port = getTargetPort(outgoingEdge); if (port) { nodesAtPort = castTo(getEntryValueOrNull($getEntry_0(adjacentAndInsideParent.hashCodeMap, port)), 21); if (!nodesAtPort) { nodesAtPort = getInnerNeighborsOfPort(port); $put_9(adjacentAndInsideParent.hashCodeMap, port, nodesAtPort); } $addAll(adjacentNodes, nodesAtPort); } } } } function dfs(start_0, component){ var adjacentNodes, node, node$iterator; $add_3(visited_0, start_0); component.add_2(start_0); adjacentNodes = castTo($get_10(incidenceMap, start_0), 21); if (adjacentNodes) { for (node$iterator = adjacentNodes.iterator_0(); node$iterator.hasNext_0();) { node = castTo(node$iterator.next_1(), 27); $indexOf_3(visited_0, node, 0) != -1 || dfs(node, component); } } } function getInnerNeighborsOfPort(port){ var allEdges, inwardsPredicate, nodeMapper, portParent; portParent = $getParent_3(port); inwardsPredicate = new ElkGraphComponentsProcessor$lambda$5$Type(portParent); nodeMapper = new ElkGraphComponentsProcessor$lambda$6$Type(portParent); allEdges = new ArrayList; $addAll_2(allEdges, (!port.incomingEdges && (port.incomingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, port, 8, 5)) , port.incomingEdges)); $addAll_2(allEdges, (!port.outgoingEdges && (port.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, port, 7, 4)) , port.outgoingEdges)); return castTo($collect_1($map($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(allEdges, 16)), inwardsPredicate), nodeMapper), of_3(new Collectors$23methodref$ctor$Type, new Collectors$24methodref$add$Type, new Collectors$lambda$50$Type, new Collectors$lambda$51$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , UNORDERED), IDENTITY_FINISH]))), 21); } function lambda$0_14(edge_0){ $clinit_ElkGraphComponentsProcessor(); return $getParent_2(getSourceNode(edge_0)) == $getParent_2(getTargetNode_0(edge_0)); } function lambda$2_1(edge_0){ $clinit_ElkGraphComponentsProcessor(); return getSourceNode(edge_0) == $getParent_2(getTargetNode_0(edge_0)); } function lambda$4_1(edge_0){ $clinit_ElkGraphComponentsProcessor(); return getTargetNode_0(edge_0) == $getParent_2(getSourceNode(edge_0)); } function lambda$5_0(portParent_0, edge_1){ $clinit_ElkGraphComponentsProcessor(); return portParent_0 == $getParent_2(getSourceNode(edge_1)) || portParent_0 == $getParent_2(getTargetNode_0(edge_1)); } function lambda$6(portParent_0, edge_1){ $clinit_ElkGraphComponentsProcessor(); return portParent_0 == getSourceNode(edge_1)?getTargetNode_0(edge_1):getSourceNode(edge_1); } function split_2(graph){ $clinit_ElkGraphComponentsProcessor(); var children, component, node, node$iterator; visited_0 = new ArrayList; incidenceMap = new HashMap; components_0 = new ArrayList; children = (!graph.children && (graph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, graph, 10, 11)) , graph.children); computeIncidences(children); for (node$iterator = new AbstractEList$EIterator(children); node$iterator.cursor != node$iterator.this$01_2.size_1();) { node = castTo($doNext(node$iterator), 27); if ($indexOf_3(visited_0, node, 0) == -1) { component = new ArrayList; $add_3(components_0, component); dfs(node, component); } } return components_0; } var components_0, incidenceMap, visited_0; function $test(arg0){ return lambda$0_14(castTo(arg0, 74)); } function ElkGraphComponentsProcessor$lambda$0$Type(){ } defineClass(1286, 1, $intern_40, ElkGraphComponentsProcessor$lambda$0$Type); _.test_0 = function test_12(arg0){ return $test(arg0); } ; var Lorg_eclipse_elk_alg_disco_transform_ElkGraphComponentsProcessor$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.disco.transform', 'ElkGraphComponentsProcessor/lambda$0$Type', 1286); function ElkGraphComponentsProcessor$lambda$1$Type(){ } defineClass(1287, 1, {}, ElkGraphComponentsProcessor$lambda$1$Type); _.apply_0 = function apply_50(arg0){ return $clinit_ElkGraphComponentsProcessor() , getSourceNode(castTo(arg0, 74)); } ; var Lorg_eclipse_elk_alg_disco_transform_ElkGraphComponentsProcessor$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.disco.transform', 'ElkGraphComponentsProcessor/lambda$1$Type', 1287); function ElkGraphComponentsProcessor$lambda$2$Type(){ } defineClass(1288, 1, $intern_40, ElkGraphComponentsProcessor$lambda$2$Type); _.test_0 = function test_13(arg0){ return lambda$2_1(castTo(arg0, 74)); } ; var Lorg_eclipse_elk_alg_disco_transform_ElkGraphComponentsProcessor$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.disco.transform', 'ElkGraphComponentsProcessor/lambda$2$Type', 1288); function ElkGraphComponentsProcessor$lambda$3$Type(){ } defineClass(1289, 1, {}, ElkGraphComponentsProcessor$lambda$3$Type); _.apply_0 = function apply_51(arg0){ return $clinit_ElkGraphComponentsProcessor() , getTargetNode_0(castTo(arg0, 74)); } ; var Lorg_eclipse_elk_alg_disco_transform_ElkGraphComponentsProcessor$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.disco.transform', 'ElkGraphComponentsProcessor/lambda$3$Type', 1289); function ElkGraphComponentsProcessor$lambda$4$Type(){ } defineClass(1290, 1, $intern_40, ElkGraphComponentsProcessor$lambda$4$Type); _.test_0 = function test_14(arg0){ return lambda$4_1(castTo(arg0, 74)); } ; var Lorg_eclipse_elk_alg_disco_transform_ElkGraphComponentsProcessor$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.disco.transform', 'ElkGraphComponentsProcessor/lambda$4$Type', 1290); function ElkGraphComponentsProcessor$lambda$5$Type(portParent_0){ this.portParent_0 = portParent_0; } defineClass(1291, 1, $intern_40, ElkGraphComponentsProcessor$lambda$5$Type); _.test_0 = function test_15(arg0){ return lambda$5_0(this.portParent_0, castTo(arg0, 74)); } ; var Lorg_eclipse_elk_alg_disco_transform_ElkGraphComponentsProcessor$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.alg.disco.transform', 'ElkGraphComponentsProcessor/lambda$5$Type', 1291); function ElkGraphComponentsProcessor$lambda$6$Type(portParent_0){ this.portParent_0 = portParent_0; } defineClass(1292, 1, {}, ElkGraphComponentsProcessor$lambda$6$Type); _.apply_0 = function apply_52(arg0){ return lambda$6(this.portParent_0, castTo(arg0, 74)); } ; var Lorg_eclipse_elk_alg_disco_transform_ElkGraphComponentsProcessor$lambda$6$Type_2_classLit = createForClass('org.eclipse.elk.alg.disco.transform', 'ElkGraphComponentsProcessor/lambda$6$Type', 1292); function $adjustFirstSegment(source, chain, dir_0){ var firstPoint, iter; firstPoint = (checkCriticalElement(chain.size_0 != 0) , castTo($removeNode_0(chain, chain.header.next_0), 8)); switch (dir_0.ordinal) { case 0: firstPoint.y_0 = 0; break; case 2: firstPoint.y_0 = source.height; break; case 3: firstPoint.x_0 = 0; break; default:firstPoint.x_0 = source.width_0; } iter = $listIterator_2(chain, 0); $add_8(iter, firstPoint); return chain; } function $adjustRelatedPort(port, edgePoint, dir_0){ dir_0.horizontal?$setY_3(port, edgePoint.y_0 - port.height / 2):$setX_2(port, edgePoint.x_0 - port.width_0 / 2); } function $applyLayout(this$static){ var adjustedPorts, dir_0, edge, edgeSection, graphDimensions, inEntry, inEntry$iterator, label_0, label$iterator, newHeight, newPoints, newWidth, oldHeight, oldWidth, outEntry, outEntry$iterator, port, port$iterator, portToAdjust, px, py, xFactor, yFactor; graphDimensions = this$static.transformedGraph.dimensions; newWidth = graphDimensions.x_0; newHeight = graphDimensions.y_0; oldWidth = this$static.parent_0.width_0; oldHeight = this$static.parent_0.height; $setDimensions_0(this$static.parent_0, graphDimensions.x_0, graphDimensions.y_0); xFactor = newWidth / oldWidth; yFactor = newHeight / oldHeight; for (label$iterator = new AbstractEList$EIterator($getLabels_1(this$static.parent_0)); label$iterator.cursor != label$iterator.this$01_2.size_1();) { label_0 = castTo($doNext(label$iterator), 135); $setX_2(label_0, label_0.x_0 * xFactor); $setY_3(label_0, label_0.y_0 * yFactor); } for (port$iterator = new AbstractEList$EIterator($getPorts_3(this$static.parent_0)); port$iterator.cursor != port$iterator.this$01_2.size_1();) { port = castTo($doNext(port$iterator), 123); px = port.x_0; py = port.y_0; px > 0 && $setX_2(port, px * xFactor); py > 0 && $setY_3(port, py * yFactor); } $forEach_2(this$static.elementMapping, new ElkGraphTransformer$OffsetApplier); adjustedPorts = new ArrayList; for (inEntry$iterator = new AbstractHashMap$EntrySetIterator((new AbstractHashMap$EntrySet(this$static.incomingExtensionsMapping)).this$01); inEntry$iterator.hasNext;) { inEntry = $next_3(inEntry$iterator); edge = castTo(inEntry.getKey(), 74); dir_0 = castTo(inEntry.getValue(), 407).direction; edgeSection = firstEdgeSection(edge, false, false); newPoints = $adjustFirstSegment(getSourceNode(edge), createVectorChain(edgeSection), dir_0); applyVectorChain(newPoints, edgeSection); portToAdjust = getSourcePort(edge); if (!!portToAdjust && $indexOf_3(adjustedPorts, portToAdjust, 0) == -1) { push_1(adjustedPorts.array, portToAdjust); $adjustRelatedPort(portToAdjust, (checkCriticalElement(newPoints.size_0 != 0) , castTo(newPoints.header.next_0.value_0, 8)), dir_0); } } for (outEntry$iterator = new AbstractHashMap$EntrySetIterator((new AbstractHashMap$EntrySet(this$static.outgoingExtensionsMapping)).this$01); outEntry$iterator.hasNext;) { outEntry = $next_3(outEntry$iterator); edge = castTo(outEntry.getKey(), 74); dir_0 = castTo(outEntry.getValue(), 407).direction; edgeSection = firstEdgeSection(edge, false, false); newPoints = $adjustFirstSegment(getTargetNode_0(edge), reverse_3(createVectorChain(edgeSection)), dir_0); newPoints = reverse_3(newPoints); applyVectorChain(newPoints, edgeSection); portToAdjust = getTargetPort(edge); if (!!portToAdjust && $indexOf_3(adjustedPorts, portToAdjust, 0) == -1) { push_1(adjustedPorts.array, portToAdjust); $adjustRelatedPort(portToAdjust, (checkCriticalElement(newPoints.size_0 != 0) , castTo(newPoints.tail.prev.value_0, 8)), dir_0); } } } function $computeIntersection(p1, p2, p3, p4){ var denominator, factor1, factor2, x_0, x1, x2, x3, x4, y_0, y1, y2, y3, y4; x1 = p1.x_0; y1 = p1.y_0; x2 = p2.x_0; y2 = p2.y_0; x3 = p3.x_0; y3 = p3.y_0; x4 = p4.x_0; y4 = p4.y_0; factor1 = x1 * y2 - y1 * x2; factor2 = x3 * y4 - y3 * x4; denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4); x_0 = (factor1 * (x3 - x4) - factor2 * (x1 - x2)) / denominator; y_0 = (factor1 * (y3 - y4) - factor2 * (y1 - y2)) / denominator; return new KVector_1(x_0, y_0); } function $getContour(edgePoints, thickness){ var ccwMerged, ccwPoints, current, currentPoint, cwMerged, cwPoints, i, i0, i1, i2, intersectionPoint, numberOfPoints, orthPoints, predecessor, radius, successor; ccwPoints = new ArrayList; cwPoints = new ArrayList; radius = thickness / 2; numberOfPoints = edgePoints.size_1(); current = castTo(edgePoints.get_0(0), 8); successor = castTo(edgePoints.get_0(1), 8); orthPoints = $getOrthogonalPoints(current.x_0, current.y_0, successor.x_0, successor.y_0, radius); $add_3(ccwPoints, (checkCriticalElementIndex(0, orthPoints.array.length) , castTo(orthPoints.array[0], 8))); $add_3(cwPoints, (checkCriticalElementIndex(1, orthPoints.array.length) , castTo(orthPoints.array[1], 8))); for (i0 = 2; i0 < numberOfPoints; i0++) { predecessor = current; current = successor; successor = castTo(edgePoints.get_0(i0), 8); orthPoints = $getOrthogonalPoints(current.x_0, current.y_0, predecessor.x_0, predecessor.y_0, radius); $add_3(ccwPoints, (checkCriticalElementIndex(1, orthPoints.array.length) , castTo(orthPoints.array[1], 8))); $add_3(cwPoints, (checkCriticalElementIndex(0, orthPoints.array.length) , castTo(orthPoints.array[0], 8))); orthPoints = $getOrthogonalPoints(current.x_0, current.y_0, successor.x_0, successor.y_0, radius); $add_3(ccwPoints, (checkCriticalElementIndex(0, orthPoints.array.length) , castTo(orthPoints.array[0], 8))); $add_3(cwPoints, (checkCriticalElementIndex(1, orthPoints.array.length) , castTo(orthPoints.array[1], 8))); } orthPoints = $getOrthogonalPoints(successor.x_0, successor.y_0, current.x_0, current.y_0, radius); $add_3(ccwPoints, (checkCriticalElementIndex(1, orthPoints.array.length) , castTo(orthPoints.array[1], 8))); $add_3(cwPoints, (checkCriticalElementIndex(0, orthPoints.array.length) , castTo(orthPoints.array[0], 8))); ccwMerged = new KVectorChain; cwMerged = new ArrayList; $add_7(ccwMerged, (checkCriticalElementIndex(0, ccwPoints.array.length) , castTo(ccwPoints.array[0], 8))); for (i1 = 1; i1 < ccwPoints.array.length - 2; i1 += 2) { currentPoint = (checkCriticalElementIndex(i1, ccwPoints.array.length) , castTo(ccwPoints.array[i1], 8)); intersectionPoint = $computeIntersection((checkCriticalElementIndex(i1 - 1, ccwPoints.array.length) , castTo(ccwPoints.array[i1 - 1], 8)), currentPoint, (checkCriticalElementIndex(i1 + 1, ccwPoints.array.length) , castTo(ccwPoints.array[i1 + 1], 8)), (checkCriticalElementIndex(i1 + 2, ccwPoints.array.length) , castTo(ccwPoints.array[i1 + 2], 8))); !isFinite(intersectionPoint.x_0) || !isFinite(intersectionPoint.y_0)?($addNode_0(ccwMerged, currentPoint, ccwMerged.tail.prev, ccwMerged.tail) , true):($addNode_0(ccwMerged, intersectionPoint, ccwMerged.tail.prev, ccwMerged.tail) , true); } $add_7(ccwMerged, castTo($get_11(ccwPoints, ccwPoints.array.length - 1), 8)); $add_3(cwMerged, (checkCriticalElementIndex(0, cwPoints.array.length) , castTo(cwPoints.array[0], 8))); for (i2 = 1; i2 < cwPoints.array.length - 2; i2 += 2) { currentPoint = (checkCriticalElementIndex(i2, cwPoints.array.length) , castTo(cwPoints.array[i2], 8)); intersectionPoint = $computeIntersection((checkCriticalElementIndex(i2 - 1, cwPoints.array.length) , castTo(cwPoints.array[i2 - 1], 8)), currentPoint, (checkCriticalElementIndex(i2 + 1, cwPoints.array.length) , castTo(cwPoints.array[i2 + 1], 8)), (checkCriticalElementIndex(i2 + 2, cwPoints.array.length) , castTo(cwPoints.array[i2 + 2], 8))); !isFinite(intersectionPoint.x_0) || !isFinite(intersectionPoint.y_0)?(push_1(cwMerged.array, currentPoint) , true):(push_1(cwMerged.array, intersectionPoint) , true); } $add_3(cwMerged, castTo($get_11(cwPoints, cwPoints.array.length - 1), 8)); for (i = cwMerged.array.length - 1; i >= 0; i--) { $add_7(ccwMerged, (checkCriticalElementIndex(i, cwMerged.array.length) , castTo(cwMerged.array[i], 8))); } return ccwMerged; } function $getOrthogonalPoints(curX, curY, nxtX, nxtY, radius){ var angleRadians, difX, difY, orthAngleCCW, orthAngleCW, xCCW, xCW, yCCW, yCW; difX = nxtX - curX; difY = nxtY - curY; angleRadians = $wnd.Math.atan2(difX, difY); orthAngleCCW = angleRadians + $intern_97; orthAngleCW = angleRadians - $intern_97; xCCW = radius * $wnd.Math.sin(orthAngleCCW) + curX; yCCW = radius * $wnd.Math.cos(orthAngleCCW) + curY; xCW = radius * $wnd.Math.sin(orthAngleCW) + curX; yCW = radius * $wnd.Math.cos(orthAngleCW) + curY; return newArrayList_1(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [new KVector_1(xCCW, yCCW), new KVector_1(xCW, yCW)])); } function $importElkEdge(this$static, edge, newComponent){ var componentLabel, contour, edgeSection, label_0, label$iterator, labels, points, shape_0, thickness; edgeSection = firstEdgeSection(edge, false, false); points = createVectorChain(edgeSection); thickness = $doubleValue(castToDouble($getProperty_0(edge, ($clinit_DisCoOptions() , EDGE_THICKNESS)))); contour = $getContour(points, thickness + this$static.componentSpacing); shape_0 = new DCElement(contour); $copyProperties(shape_0, edge); $put_6(this$static.elementMapping, edge, shape_0); push_1(newComponent.array, shape_0); labels = (!edge.labels && (edge.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, edge, 1, 7)) , edge.labels); for (label$iterator = new AbstractEList$EIterator(labels); label$iterator.cursor != label$iterator.this$01_2.size_1();) { label_0 = castTo($doNext(label$iterator), 135); componentLabel = $importElkShape(this$static, label_0, true, 0, 0); push_1(newComponent.array, componentLabel); } return shape_0; } function $importElkEdges(this$static, edges, newComponent){ var componentEdge, edge, edge$iterator; for (edge$iterator = edges.map_0.keySet_0().iterator_0(); edge$iterator.hasNext_0();) { edge = castTo(edge$iterator.next_1(), 74); componentEdge = castTo($get_10(this$static.elementMapping, edge), 272); !componentEdge && ($getParent_2(getSourceNode(edge)) == $getParent_2(getTargetNode_0(edge))?$importElkEdge(this$static, edge, newComponent):getSourceNode(edge) == $getParent_2(getTargetNode_0(edge))?$get_10(this$static.incomingExtensionsMapping, edge) == null && $get_10(this$static.elementMapping, getTargetNode_0(edge)) != null && $importExtension(this$static, edge, newComponent, false):$get_10(this$static.outgoingExtensionsMapping, edge) == null && $get_10(this$static.elementMapping, getSourceNode(edge)) != null && $importExtension(this$static, edge, newComponent, true)); } } function $importElkShape(this$static, element, considerWhenApplyingOffset, offsetX, offsetY){ var coords, halfComponentSpacing, shape_0, x0, x1, y0, y1; if (!(instanceOf(element, 207) || instanceOf(element, 366) || instanceOf(element, 193))) { throw toJs(new IllegalArgumentException_0('Method only works for ElkNode-, ElkLabel and ElkPort-objects.')); } halfComponentSpacing = this$static.componentSpacing / 2; x0 = element.x_0 + offsetX - halfComponentSpacing; y0 = element.y_0 + offsetY - halfComponentSpacing; x1 = x0 + element.width_0 + this$static.componentSpacing; y1 = y0 + element.height + this$static.componentSpacing; coords = new KVectorChain; $add_7(coords, new KVector_1(x0, y0)); $add_7(coords, new KVector_1(x0, y1)); $add_7(coords, new KVector_1(x1, y1)); $add_7(coords, new KVector_1(x1, y0)); shape_0 = new DCElement(coords); $copyProperties(shape_0, element); considerWhenApplyingOffset && $put_6(this$static.elementMapping, element, shape_0); return shape_0; } function $importExtension(this$static, edge, newComponent, outgoingExtension){ var componentLabel, contour, dir_0, edgeSection, extParent, extensionWidth, fixedEdgePoints, innerPoint, label_0, label$iterator, labels, middlePos, outerPoint, points, shape_0, thickness; edgeSection = firstEdgeSection(edge, false, false); points = createVectorChain(edgeSection); outgoingExtension && (points = reverse_3(points)); thickness = $doubleValue(castToDouble($getProperty_0(edge, ($clinit_DisCoOptions() , EDGE_THICKNESS)))); outerPoint = (checkCriticalElement(points.size_0 != 0) , castTo(points.header.next_0.value_0, 8)); innerPoint = castTo($get_7(points, 1), 8); if (points.size_0 > 2) { fixedEdgePoints = new ArrayList; $addAll_2(fixedEdgePoints, new AbstractList$SubList(points, 1, points.size_0)); contour = $getContour(fixedEdgePoints, thickness + this$static.componentSpacing); shape_0 = new DCElement(contour); $copyProperties(shape_0, edge); push_1(newComponent.array, shape_0); } else { outgoingExtension?(shape_0 = castTo($get_10(this$static.elementMapping, getSourceNode(edge)), 272)):(shape_0 = castTo($get_10(this$static.elementMapping, getTargetNode_0(edge)), 272)); } extParent = getSourceNode(edge); outgoingExtension && (extParent = getTargetNode_0(edge)); dir_0 = $nearestSide(outerPoint, extParent); extensionWidth = thickness + this$static.componentSpacing; if (dir_0.horizontal) { extensionWidth += $wnd.Math.abs(outerPoint.y_0 - innerPoint.y_0); middlePos = new KVector_1(innerPoint.x_0, (innerPoint.y_0 + outerPoint.y_0) / 2); } else { extensionWidth += $wnd.Math.abs(outerPoint.x_0 - innerPoint.x_0); middlePos = new KVector_1((innerPoint.x_0 + outerPoint.x_0) / 2, innerPoint.y_0); } outgoingExtension?$put_6(this$static.outgoingExtensionsMapping, edge, new DCExtension(shape_0, dir_0, middlePos, extensionWidth)):$put_6(this$static.incomingExtensionsMapping, edge, new DCExtension(shape_0, dir_0, middlePos, extensionWidth)); $put_6(this$static.elementMapping, edge, shape_0); labels = (!edge.labels && (edge.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, edge, 1, 7)) , edge.labels); for (label$iterator = new AbstractEList$EIterator(labels); label$iterator.cursor != label$iterator.this$01_2.size_1();) { label_0 = castTo($doNext(label$iterator), 135); componentLabel = $importElkShape(this$static, label_0, true, 0, 0); push_1(newComponent.array, componentLabel); } } function $importGraph(this$static, graph){ var component, component$iterator, componentLabel, componentNode, componentPort, components, edgeSet, label_0, label$iterator, label$iterator0, labels, node, node$iterator, nodeX, nodeY, port, port$iterator, portX, portY, ports, result, subResult; this$static.parent_0 = graph; components = split_2(graph); result = new ArrayList; for (component$iterator = new ArrayList$1(components); component$iterator.i < component$iterator.this$01.array.length;) { component = castTo($next_6(component$iterator), 15); subResult = new ArrayList; push_1(result.array, subResult); edgeSet = new HashSet; for (node$iterator = component.iterator_0(); node$iterator.hasNext_0();) { node = castTo(node$iterator.next_1(), 27); componentNode = $importElkShape(this$static, node, true, 0, 0); push_1(subResult.array, componentNode); nodeX = node.x_0; nodeY = node.y_0; new KVector_1(nodeX, nodeY); labels = (!node.labels && (node.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, node, 1, 7)) , node.labels); for (label$iterator0 = new AbstractEList$EIterator(labels); label$iterator0.cursor != label$iterator0.this$01_2.size_1();) { label_0 = castTo($doNext(label$iterator0), 135); componentLabel = $importElkShape(this$static, label_0, false, nodeX, nodeY); push_1(subResult.array, componentLabel); } ports = (!node.ports && (node.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, node, 9, 9)) , node.ports); for (port$iterator = new AbstractEList$EIterator(ports); port$iterator.cursor != port$iterator.this$01_2.size_1();) { port = castTo($doNext(port$iterator), 123); componentPort = $importElkShape(this$static, port, false, nodeX, nodeY); push_1(subResult.array, componentPort); portX = port.x_0 + nodeX; portY = port.y_0 + nodeY; labels = (!port.labels && (port.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, port, 1, 7)) , port.labels); for (label$iterator = new AbstractEList$EIterator(labels); label$iterator.cursor != label$iterator.this$01_2.size_1();) { label_0 = castTo($doNext(label$iterator), 135); componentLabel = $importElkShape(this$static, label_0, false, portX, portY); push_1(subResult.array, componentLabel); } } $addAll(edgeSet, newHashSet(concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [allOutgoingEdges(node), allIncomingEdges(node)])))); } $importElkEdges(this$static, edgeSet, subResult); } this$static.transformedGraph = new DCGraph_0(result); $copyProperties(this$static.transformedGraph, graph); return this$static.transformedGraph; } function $nearestSide(point, node){ var distance, result, shortestDistance; shortestDistance = $intern_98; result = ($clinit_DCDirection() , NORTH_0); shortestDistance = $wnd.Math.abs(point.y_0); distance = $wnd.Math.abs(node.height - point.y_0); if (distance < shortestDistance) { shortestDistance = distance; result = SOUTH_0; } distance = $wnd.Math.abs(point.x_0); if (distance < shortestDistance) { shortestDistance = distance; result = WEST_0; } distance = $wnd.Math.abs(node.width_0 - point.x_0); if (distance < shortestDistance) { shortestDistance = distance; result = EAST_0; } return result; } function ElkGraphTransformer(componentSpacing){ this.elementMapping = new HashMap; this.incomingExtensionsMapping = new HashMap; this.outgoingExtensionsMapping = new HashMap; this.componentSpacing = componentSpacing; } defineClass(1205, 1, {}, ElkGraphTransformer); _.componentSpacing = 0; var Lorg_eclipse_elk_alg_disco_transform_ElkGraphTransformer_2_classLit = createForClass('org.eclipse.elk.alg.disco.transform', 'ElkGraphTransformer', 1205); function $accept_2(this$static, elem, poly){ var applier, edgeSection, points, shape_0; this$static.offset = poly.cp.offset; if (instanceOf(elem, 326)) { edgeSection = firstEdgeSection(castTo(elem, 74), false, false); points = createVectorChain(edgeSection); applier = new ElkGraphTransformer$OffsetApplier$OffSetToChainApplier(this$static); $forEach_0(points, applier); applyVectorChain(points, edgeSection); elem.getProperty(($clinit_CoreOptions() , JUNCTION_POINTS_0)) != null && $forEach_0(castTo(elem.getProperty(JUNCTION_POINTS_0), 75), applier); } else { shape_0 = castTo(elem, 422); shape_0.setX(shape_0.getX() + this$static.offset.x_0); shape_0.setY(shape_0.getY() + this$static.offset.y_0); } } function ElkGraphTransformer$OffsetApplier(){ } defineClass(1206, 1, {}, ElkGraphTransformer$OffsetApplier); _.accept_1 = function accept_56(elem, poly){ $accept_2(this, castTo(elem, 167), castTo(poly, 272)); } ; var Lorg_eclipse_elk_alg_disco_transform_ElkGraphTransformer$OffsetApplier_2_classLit = createForClass('org.eclipse.elk.alg.disco.transform', 'ElkGraphTransformer/OffsetApplier', 1206); function $accept_3(this$static, point){ $add_18(point, this$static.this$11.offset.x_0, this$static.this$11.offset.y_0); } function ElkGraphTransformer$OffsetApplier$OffSetToChainApplier(this$1){ this.this$11 = this$1; } defineClass(1207, 1, $intern_19, ElkGraphTransformer$OffsetApplier$OffSetToChainApplier); _.accept = function accept_57(point){ $accept_3(this, castTo(point, 8)); } ; var Lorg_eclipse_elk_alg_disco_transform_ElkGraphTransformer$OffsetApplier$OffSetToChainApplier_2_classLit = createForClass('org.eclipse.elk.alg.disco.transform', 'ElkGraphTransformer/OffsetApplier/OffSetToChainApplier', 1207); function $buildIncidenceLists(graph){ var edge, edge$iterator, incidence, n, node, node$iterator; n = graph.nodes.array.length; incidence = initUnidimensionalArray(Ljava_util_List_2_classLit, $intern_99, 15, n, 0, 1); for (node$iterator = new ArrayList$1(graph.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 153); incidence[node.id_0] = new LinkedList; } for (edge$iterator = new ArrayList$1(graph.edges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 290); incidence[edge.source.id_0].add_2(edge); incidence[edge.target.id_0].add_2(edge); } return incidence; } function $dfs_0(this$static, node, last, graph, visited, incidence){ var component, edge, edge$iterator; if (!visited[node.id_0]) { visited[node.id_0] = true; component = graph; !component && (component = new FGraph); $add_3(component.nodes, node); for (edge$iterator = incidence[node.id_0].iterator_0(); edge$iterator.hasNext_0();) { edge = castTo(edge$iterator.next_1(), 290); if (edge.target == last || edge.source == last) { continue; } edge.source != node && $dfs_0(this$static, edge.source, node, component, visited, incidence); edge.target != node && $dfs_0(this$static, edge.target, node, component, visited, incidence); $add_3(component.edges, edge); $addAll_2(component.labels, edge.labels); } return component; } return null; } function $moveGraph(destGraph, sourceGraph, offsetx, offsety){ var bendpoint, bendpoint$iterator, edge, edge$iterator, graphOffset, label_0, label$iterator, node, node$iterator; graphOffset = new KVector_1(offsetx, offsety); $sub_0(graphOffset, castTo($getProperty(sourceGraph, ($clinit_InternalProperties_0() , BB_UPLEFT)), 8)); for (node$iterator = new ArrayList$1(sourceGraph.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 153); $add_19(node.position, graphOffset); $add_3(destGraph.nodes, node); } for (edge$iterator = new ArrayList$1(sourceGraph.edges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 290); for (bendpoint$iterator = new ArrayList$1(edge.bendpoints); bendpoint$iterator.i < bendpoint$iterator.this$01.array.length;) { bendpoint = castTo($next_6(bendpoint$iterator), 250); $add_19(bendpoint.position, graphOffset); } $add_3(destGraph.edges, edge); } for (label$iterator = new ArrayList$1(sourceGraph.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 454); $add_19(label_0.position, graphOffset); $add_3(destGraph.labels, label_0); } } function $recombine(components){ var broadestRow, graph, graph$iterator, graph$iterator0, graph$iterator1, highestBox, maxRowWidth, maxx, maxy, minx, miny, node, node$iterator, priority, result, size_0, spacing, totalArea, xpos, ypos; if (components.size_1() == 1) { return castTo(components.get_0(0), 235); } else if (components.size_1() <= 0) { return new FGraph; } for (graph$iterator0 = components.iterator_0(); graph$iterator0.hasNext_0();) { graph = castTo(graph$iterator0.next_1(), 235); priority = 0; minx = $intern_0; miny = $intern_0; maxx = $intern_43; maxy = $intern_43; for (node$iterator = new ArrayList$1(graph.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 153); priority += castTo($getProperty(node, ($clinit_ForceOptions() , PRIORITY)), 17).value_0; minx = $wnd.Math.min(minx, node.position.x_0 - node.size_0.x_0 / 2); miny = $wnd.Math.min(miny, node.position.y_0 - node.size_0.y_0 / 2); maxx = $wnd.Math.max(maxx, node.position.x_0 + node.size_0.x_0 / 2); maxy = $wnd.Math.max(maxy, node.position.y_0 + node.size_0.y_0 / 2); } $setProperty_0(graph, ($clinit_ForceOptions() , PRIORITY), valueOf_3(priority)); $setProperty_0(graph, ($clinit_InternalProperties_0() , BB_UPLEFT), new KVector_1(minx, miny)); $setProperty_0(graph, BB_LOWRIGHT, new KVector_1(maxx, maxy)); } $clinit_Collections(); components.sort_0(new ComponentsProcessor$1); result = new FGraph; $copyProperties(result, castTo(components.get_0(0), 96)); maxRowWidth = 0; totalArea = 0; for (graph$iterator1 = components.iterator_0(); graph$iterator1.hasNext_0();) { graph = castTo(graph$iterator1.next_1(), 235); size_0 = $sub_0($clone_1(castTo($getProperty(graph, ($clinit_InternalProperties_0() , BB_LOWRIGHT)), 8)), castTo($getProperty(graph, BB_UPLEFT), 8)); maxRowWidth = $wnd.Math.max(maxRowWidth, size_0.x_0); totalArea += size_0.x_0 * size_0.y_0; } maxRowWidth = $wnd.Math.max(maxRowWidth, $wnd.Math.sqrt(totalArea) * $doubleValue(castToDouble($getProperty(result, ($clinit_ForceOptions() , ASPECT_RATIO_0))))); spacing = $doubleValue(castToDouble($getProperty(result, SPACING_NODE_NODE))); xpos = 0; ypos = 0; highestBox = 0; broadestRow = spacing; for (graph$iterator = components.iterator_0(); graph$iterator.hasNext_0();) { graph = castTo(graph$iterator.next_1(), 235); size_0 = $sub_0($clone_1(castTo($getProperty(graph, ($clinit_InternalProperties_0() , BB_LOWRIGHT)), 8)), castTo($getProperty(graph, BB_UPLEFT), 8)); if (xpos + size_0.x_0 > maxRowWidth) { xpos = 0; ypos += highestBox + spacing; highestBox = 0; } $moveGraph(result, graph, xpos, ypos); broadestRow = $wnd.Math.max(broadestRow, xpos + size_0.x_0); highestBox = $wnd.Math.max(highestBox, size_0.y_0); xpos += size_0.x_0 + spacing; } return result; } function $split_1(this$static, graph){ var comp, comp$iterator, components, id_0, incidence, node, node$iterator, node$iterator0, separate, visited; separate = castToBoolean($getProperty(graph, ($clinit_ForceOptions() , SEPARATE_CONNECTED_COMPONENTS))); if (separate == null || (checkCriticalNotNull(separate) , separate)) { visited = initUnidimensionalArray(Z_classLit, $intern_91, 28, graph.nodes.array.length, 16, 1); incidence = $buildIncidenceLists(graph); components = new LinkedList; for (node$iterator0 = new ArrayList$1(graph.nodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 153); comp = $dfs_0(this$static, node, null, null, visited, incidence); if (comp) { $copyProperties(comp, graph); $addNode_0(components, comp, components.tail.prev, components.tail); } } if (components.size_0 > 1) { for (comp$iterator = $listIterator_2(components, 0); comp$iterator.currentNode != comp$iterator.this$01.tail;) { comp = castTo($next_9(comp$iterator), 235); id_0 = 0; for (node$iterator = new ArrayList$1(comp.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 153); node.id_0 = id_0++; } } } return components; } return newArrayList_1(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_force_graph_FGraph_2_classLit, 1), $intern_100, 235, 0, [graph])); } function ComponentsProcessor(){ } defineClass(760, 1, {}, ComponentsProcessor); var Lorg_eclipse_elk_alg_force_ComponentsProcessor_2_classLit = createForClass('org.eclipse.elk.alg.force', 'ComponentsProcessor', 760); function $compare_7(graph1, graph2){ var prio, size1, size2; prio = castTo($getProperty(graph2, ($clinit_ForceOptions() , PRIORITY)), 17).value_0 - castTo($getProperty(graph1, PRIORITY), 17).value_0; if (prio == 0) { size1 = $sub_0($clone_1(castTo($getProperty(graph1, ($clinit_InternalProperties_0() , BB_LOWRIGHT)), 8)), castTo($getProperty(graph1, BB_UPLEFT), 8)); size2 = $sub_0($clone_1(castTo($getProperty(graph2, BB_LOWRIGHT), 8)), castTo($getProperty(graph2, BB_UPLEFT), 8)); return compare_4(size1.x_0 * size1.y_0, size2.x_0 * size2.y_0); } return prio; } function ComponentsProcessor$1(){ } defineClass(1195, 1, $intern_88, ComponentsProcessor$1); _.compare_1 = function compare_28(graph1, graph2){ return $compare_7(castTo(graph1, 235), castTo(graph2, 235)); } ; _.equals_0 = function equals_80(other){ return this === other; } ; _.reversed = function reversed_20(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_force_ComponentsProcessor$1_2_classLit = createForClass('org.eclipse.elk.alg.force', 'ComponentsProcessor/1', 1195); function $applyLayout_0(fgraph){ var bendpoint, bendpoint$iterator, endLocation, fedge, fedge$iterator, flabel, flabel$iterator, fnode, fnode$iterator, height, kedge, kedgeSection, kgraph, klabel, knode, labelPos, maxXPos, maxYPos, minXPos, minYPos, node, node$iterator, nodePos, object, offset, padding, pos, size_0, startLocation, width_0; kgraph = castTo($getProperty(fgraph, ($clinit_InternalProperties_0() , ORIGIN)), 27); minXPos = $intern_0; minYPos = $intern_0; maxXPos = $intern_43; maxYPos = $intern_43; for (node$iterator = new ArrayList$1(fgraph.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 153); pos = node.position; size_0 = node.size_0; minXPos = $wnd.Math.min(minXPos, pos.x_0 - size_0.x_0 / 2); minYPos = $wnd.Math.min(minYPos, pos.y_0 - size_0.y_0 / 2); maxXPos = $wnd.Math.max(maxXPos, pos.x_0 + size_0.x_0 / 2); maxYPos = $wnd.Math.max(maxYPos, pos.y_0 + size_0.y_0 / 2); } for (bendpoint$iterator = new ArrayList$1(fgraph.bendPoints); bendpoint$iterator.i < bendpoint$iterator.this$01.array.length;) { bendpoint = castTo($next_6(bendpoint$iterator), 250); pos = bendpoint.position; size_0 = bendpoint.size_0; minXPos = $wnd.Math.min(minXPos, pos.x_0 - size_0.x_0 / 2); minYPos = $wnd.Math.min(minYPos, pos.y_0 - size_0.y_0 / 2); maxXPos = $wnd.Math.max(maxXPos, pos.x_0 + size_0.x_0 / 2); maxYPos = $wnd.Math.max(maxYPos, pos.y_0 + size_0.y_0 / 2); } padding = castTo($getProperty_0(kgraph, ($clinit_ForceOptions() , PADDING_0)), 107); offset = new KVector_1(padding.left - minXPos, padding.top_0 - minYPos); for (fnode$iterator = new ArrayList$1(fgraph.nodes); fnode$iterator.i < fnode$iterator.this$01.array.length;) { fnode = castTo($next_6(fnode$iterator), 153); object = $getProperty(fnode, ORIGIN); if (instanceOf(object, 207)) { knode = castTo(object, 27); nodePos = $add_19(new KVector_2(fnode.position), offset); $setLocation_1(knode, nodePos.x_0 - knode.width_0 / 2, nodePos.y_0 - knode.height / 2); } } for (fedge$iterator = new ArrayList$1(fgraph.edges); fedge$iterator.i < fedge$iterator.this$01.array.length;) { fedge = castTo($next_6(fedge$iterator), 290); kedge = castTo($getProperty(fedge, ORIGIN), 74); kedgeSection = firstEdgeSection(kedge, true, true); startLocation = new KVector_2($getSourcePoint(fedge)); $add_19(startLocation, offset); $setStartLocation(kedgeSection, startLocation.x_0, startLocation.y_0); $forEach_1(fedge.bendpoints, new ElkGraphImporter$lambda$0$Type(offset, kedgeSection)); endLocation = new KVector_2($getTargetPoint(fedge)); $add_19(endLocation, offset); $setEndLocation(kedgeSection, endLocation.x_0, endLocation.y_0); } for (flabel$iterator = new ArrayList$1(fgraph.labels); flabel$iterator.i < flabel$iterator.this$01.array.length;) { flabel = castTo($next_6(flabel$iterator), 454); klabel = castTo($getProperty(flabel, ORIGIN), 135); labelPos = $add_19(new KVector_2(flabel.position), offset); $setLocation_1(klabel, labelPos.x_0, labelPos.y_0); } width_0 = maxXPos - minXPos + (padding.left + padding.right); height = maxYPos - minYPos + (padding.top_0 + padding.bottom); $booleanValue(castToBoolean($getProperty_0(kgraph, ($clinit_CoreOptions() , NODE_SIZE_FIXED_GRAPH_SIZE_3)))) || resizeNode_1(kgraph, width_0, height, false, true); $setProperty_1(kgraph, CHILD_AREA_WIDTH, width_0 - (padding.left + padding.right)); $setProperty_1(kgraph, CHILD_AREA_HEIGHT, height - (padding.top_0 + padding.bottom)); } function $importGraph_0(kgraph){ var elemMap, fgraph; fgraph = new FGraph; $copyProperties(fgraph, kgraph); $setProperty_0(fgraph, ($clinit_InternalProperties_0() , ORIGIN), kgraph); elemMap = new HashMap; $transformNodes(kgraph, fgraph, elemMap); $transformEdges(kgraph, fgraph, elemMap); return fgraph; } function $transformEdges(parentNode, fgraph, elemMap){ var kedge, kedge$iterator, klabel, klabel$iterator, knode, knode$iterator, newEdge, newLabel; for (knode$iterator = new AbstractEList$EIterator((!parentNode.children && (parentNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, parentNode, 10, 11)) , parentNode.children)); knode$iterator.cursor != knode$iterator.this$01_2.size_1();) { knode = castTo($doNext(knode$iterator), 27); for (kedge$iterator = new Iterators$ConcatenatedIterator(transform_2(allOutgoingEdges(knode).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(kedge$iterator);) { kedge = castTo($next_0(kedge$iterator), 74); !kedge.sources && (kedge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, kedge, 4, 7)); if (!(kedge.sources.size_0 <= 1 && (!kedge.targets && (kedge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, kedge, 5, 8)) , kedge.targets.size_0 <= 1))) { throw toJs(new UnsupportedGraphException('Graph must not contain hyperedges.')); } if (!$isHierarchical(kedge) && knode != connectableShapeToNode(castTo($get_20((!kedge.targets && (kedge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, kedge, 5, 8)) , kedge.targets), 0), 84))) { newEdge = new FEdge; $copyProperties(newEdge, kedge); $setProperty_0(newEdge, ($clinit_InternalProperties_0() , ORIGIN), kedge); $setSource(newEdge, castTo(getEntryValueOrNull($getEntry_0(elemMap.hashCodeMap, knode)), 153)); $setTarget(newEdge, castTo($get_10(elemMap, connectableShapeToNode(castTo($get_20((!kedge.targets && (kedge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, kedge, 5, 8)) , kedge.targets), 0), 84))), 153)); $add_3(fgraph.edges, newEdge); for (klabel$iterator = new AbstractEList$EIterator((!kedge.labels && (kedge.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, kedge, 1, 7)) , kedge.labels)); klabel$iterator.cursor != klabel$iterator.this$01_2.size_1();) { klabel = castTo($doNext(klabel$iterator), 135); newLabel = new FLabel(newEdge, klabel.text_0); $copyProperties(newLabel, klabel); $setProperty_0(newLabel, ORIGIN, klabel); newLabel.size_0.x_0 = $wnd.Math.max(klabel.width_0, 1); newLabel.size_0.y_0 = $wnd.Math.max(klabel.height, 1); $refreshPosition(newLabel); $add_3(fgraph.labels, newLabel); } } } } } function $transformNodes(parentNode, fgraph, elemMap){ var index_0, knode, knode$iterator, label_0, newNode, portConstraints; index_0 = 0; for (knode$iterator = new AbstractEList$EIterator((!parentNode.children && (parentNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, parentNode, 10, 11)) , parentNode.children)); knode$iterator.cursor != knode$iterator.this$01_2.size_1();) { knode = castTo($doNext(knode$iterator), 27); label_0 = ''; (!knode.labels && (knode.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, knode, 1, 7)) , knode.labels).size_0 == 0 || (label_0 = castTo($get_20((!knode.labels && (knode.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, knode, 1, 7)) , knode.labels), 0), 135).text_0); newNode = new FNode(label_0); $copyProperties(newNode, knode); $setProperty_0(newNode, ($clinit_InternalProperties_0() , ORIGIN), knode); newNode.id_0 = index_0++; newNode.position.x_0 = knode.x_0 + knode.width_0 / 2; newNode.position.y_0 = knode.y_0 + knode.height / 2; newNode.size_0.x_0 = $wnd.Math.max(knode.width_0, 1); newNode.size_0.y_0 = $wnd.Math.max(knode.height, 1); $add_3(fgraph.nodes, newNode); $put_9(elemMap.hashCodeMap, knode, newNode); portConstraints = castTo($getProperty_0(knode, ($clinit_ForceOptions() , PORT_CONSTRAINTS)), 101); portConstraints == ($clinit_PortConstraints() , UNDEFINED_4) && (portConstraints = FREE); } } function lambda$0_15(offset_0, kedgeSection_1, bp_2){ var position; position = new KVector_2(bp_2.position); $add_19(position, offset_0); createBendPoint(kedgeSection_1, position.x_0, position.y_0); } function ElkGraphImporter$lambda$0$Type(offset_0, kedgeSection_1){ this.offset_0 = offset_0; this.kedgeSection_1 = kedgeSection_1; } defineClass(1196, 1, $intern_19, ElkGraphImporter$lambda$0$Type); _.accept = function accept_58(arg0){ lambda$0_15(this.offset_0, this.kedgeSection_1, castTo(arg0, 250)); } ; var Lorg_eclipse_elk_alg_force_ElkGraphImporter$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.force', 'ElkGraphImporter/lambda$0$Type', 1196); function $layout(this$static, elkGraph, progressMonitor){ var builder, comp, comp$iterator, components, fgraph; progressMonitor.begin('ELK Force', 1); $booleanValue(castToBoolean($getProperty_0(elkGraph, ($clinit_ForceOptions() , OMIT_NODE_MICRO_LAYOUT)))) || $execute((builder = new NodeMicroLayout(($clinit_ElkGraphAdapters() , new ElkGraphAdapters$ElkGraphAdapter(elkGraph))) , builder)); fgraph = $importGraph_0(elkGraph); $setOptions(fgraph); $updateModel(this$static, castTo($getProperty(fgraph, MODEL_0), 432)); components = $split_1(this$static.componentsProcessor, fgraph); for (comp$iterator = components.iterator_0(); comp$iterator.hasNext_0();) { comp = castTo(comp$iterator.next_1(), 235); $layout_0(this$static.forceModel, comp, progressMonitor.subTask(1 / components.size_1())); } fgraph = $recombine(components); $applyLayout_0(fgraph); progressMonitor.done_1(); } function $setOptions(fgraph){ var randomSeed, val; randomSeed = castTo($getProperty(fgraph, ($clinit_ForceOptions() , RANDOM_SEED)), 17); if (randomSeed) { val = randomSeed.value_0; val == 0?$setProperty_0(fgraph, ($clinit_InternalProperties_0() , RANDOM), new Random):$setProperty_0(fgraph, ($clinit_InternalProperties_0() , RANDOM), new Random_0(val)); } else { $setProperty_0(fgraph, ($clinit_InternalProperties_0() , RANDOM), new Random_0(1)); } } function $updateModel(this$static, strategy){ switch (strategy.ordinal) { case 0: instanceOf(this$static.forceModel, 641) || (this$static.forceModel = new EadesModel); break; case 1: instanceOf(this$static.forceModel, 642) || (this$static.forceModel = new FruchtermanReingoldModel); } } function ForceLayoutProvider(){ this.componentsProcessor = new ComponentsProcessor; } defineClass(738, 205, $intern_96, ForceLayoutProvider); _.layout = function layout_0(elkGraph, progressMonitor){ $layout(this, elkGraph, progressMonitor); } ; var Lorg_eclipse_elk_alg_force_ForceLayoutProvider_2_classLit = createForClass('org.eclipse.elk.alg.force', 'ForceLayoutProvider', 738); function FParticle(){ this.displacement = new KVector; this.position = new KVector; this.size_0 = new KVector; } defineClass(309, 137, {3:1, 309:1, 96:1, 137:1}); var Lorg_eclipse_elk_alg_force_graph_FParticle_2_classLit = createForClass('org.eclipse.elk.alg.force.graph', 'FParticle', 309); function FBendpoint(edge){ FParticle.call(this); this.edge = edge; $add_3(edge.bendpoints, this); } defineClass(250, 309, {3:1, 250:1, 309:1, 96:1, 137:1}, FBendpoint); _.toString_0 = function toString_80(){ var index_0; if (this.edge) { index_0 = $indexOf_3(this.edge.bendpoints, this, 0); return index_0 >= 0?'b' + index_0 + '[' + $toString_10(this.edge) + ']':'b[' + $toString_10(this.edge) + ']'; } return 'b_' + getObjectIdentityHashCode(this); } ; var Lorg_eclipse_elk_alg_force_graph_FBendpoint_2_classLit = createForClass('org.eclipse.elk.alg.force.graph', 'FBendpoint', 250); function $distributeBendpoints(this$static){ var bendPoint, bendPoint$iterator, count, incr, pos, sourcePos, targetPos; count = this$static.bendpoints.array.length; if (count > 0) { sourcePos = this$static.source.position; targetPos = this$static.target.position; incr = $scale($sub_0(new KVector_1(targetPos.x_0, targetPos.y_0), sourcePos), 1 / (count + 1)); pos = new KVector_1(sourcePos.x_0, sourcePos.y_0); for (bendPoint$iterator = new ArrayList$1(this$static.bendpoints); bendPoint$iterator.i < bendPoint$iterator.this$01.array.length;) { bendPoint = castTo($next_6(bendPoint$iterator), 250); bendPoint.position.x_0 = pos.x_0 + incr.x_0; bendPoint.position.y_0 = pos.y_0 + incr.y_0; $add_19(pos, incr); } } } function $getSourcePoint(this$static){ var v; v = $sub_0($clone_1(this$static.target.position), this$static.source.position); clipVector(v, this$static.source.size_0.x_0, this$static.source.size_0.y_0); return $add_19(v, this$static.source.position); } function $getTargetPoint(this$static){ var v; v = $sub_0($clone_1(this$static.source.position), this$static.target.position); clipVector(v, this$static.target.size_0.x_0, this$static.target.size_0.y_0); return $add_19(v, this$static.target.position); } function $setSource(this$static, theSource){ this$static.source = theSource; } function $setTarget(this$static, theTarget){ this$static.target = theTarget; } function $toString_10(this$static){ return !!this$static.source && !!this$static.target?$toString_11(this$static.source) + '->' + $toString_11(this$static.target):'e_' + getObjectIdentityHashCode(this$static); } function FEdge(){ this.bendpoints = new ArrayList; this.labels = new ArrayList; } defineClass(290, 137, {3:1, 290:1, 96:1, 137:1}, FEdge); _.toString_0 = function toString_81(){ return $toString_10(this); } ; var Lorg_eclipse_elk_alg_force_graph_FEdge_2_classLit = createForClass('org.eclipse.elk.alg.force.graph', 'FEdge', 290); function $calcAdjacency(this$static){ var edge, edge$iterator, n; n = this$static.nodes.array.length; this$static.adjacency = initMultidimensionalArray(I_classLit, [$intern_16, $intern_49], [53, 28], 15, [n, n], 2); for (edge$iterator = new ArrayList$1(this$static.edges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 290); this$static.adjacency[edge.source.id_0][edge.target.id_0] += castTo($getProperty(edge, ($clinit_ForceOptions() , PRIORITY)), 17).value_0; } } function $getConnection(this$static, particle1, particle2){ var bpoint1, bpoint2, node1, node2; if (instanceOf(particle1, 153) && instanceOf(particle2, 153)) { node1 = castTo(particle1, 153); node2 = castTo(particle2, 153); return this$static.adjacency[node1.id_0][node2.id_0] + this$static.adjacency[node2.id_0][node1.id_0]; } else if (instanceOf(particle1, 250) && instanceOf(particle2, 250)) { bpoint1 = castTo(particle1, 250); bpoint2 = castTo(particle2, 250); if (bpoint1.edge == bpoint2.edge) { return castTo($getProperty(bpoint2.edge, ($clinit_ForceOptions() , PRIORITY)), 17).value_0; } } return 0; } function FGraph(){ this.nodes = new ArrayList; this.edges = new ArrayList; this.labels = new ArrayList; this.bendPoints = new ArrayList; } defineClass(235, 137, {3:1, 235:1, 96:1, 137:1}, FGraph); var Lorg_eclipse_elk_alg_force_graph_FGraph_2_classLit = createForClass('org.eclipse.elk.alg.force.graph', 'FGraph', 235); function $refreshPosition(this$static){ var newLabelPosition, placeInline, pos, spacing, src_0, srcToTgt, tgt, toLabelCenter; placeInline = $booleanValue(castToBoolean($getProperty(this$static, ($clinit_ForceOptions() , EDGE_LABELS_INLINE)))); src_0 = this$static.edge.source.position; tgt = this$static.edge.target.position; if (placeInline) { srcToTgt = $scale($sub_0(new KVector_1(tgt.x_0, tgt.y_0), src_0), 0.5); toLabelCenter = $scale($clone_1(this$static.size_0), 0.5); newLabelPosition = $sub_0($add_19(new KVector_1(src_0.x_0, src_0.y_0), srcToTgt), toLabelCenter); $set_8(this$static.position, newLabelPosition); } else { spacing = $doubleValue(castToDouble($getProperty(this$static.edge, SPACING_EDGE_LABEL))); pos = this$static.position; if (src_0.x_0 >= tgt.x_0) { if (src_0.y_0 >= tgt.y_0) { pos.x_0 = tgt.x_0 + (src_0.x_0 - tgt.x_0) / 2 + spacing; pos.y_0 = tgt.y_0 + (src_0.y_0 - tgt.y_0) / 2 - spacing - this$static.size_0.y_0; } else { pos.x_0 = tgt.x_0 + (src_0.x_0 - tgt.x_0) / 2 + spacing; pos.y_0 = src_0.y_0 + (tgt.y_0 - src_0.y_0) / 2 + spacing; } } else { if (src_0.y_0 >= tgt.y_0) { pos.x_0 = src_0.x_0 + (tgt.x_0 - src_0.x_0) / 2 + spacing; pos.y_0 = tgt.y_0 + (src_0.y_0 - tgt.y_0) / 2 + spacing; } else { pos.x_0 = src_0.x_0 + (tgt.x_0 - src_0.x_0) / 2 + spacing; pos.y_0 = src_0.y_0 + (tgt.y_0 - src_0.y_0) / 2 - spacing - this$static.size_0.y_0; } } } } function FLabel(fedge, text_0){ FParticle.call(this); this.edge = fedge; this.text_0 = text_0; $add_3(this.edge.labels, this); } defineClass(454, 309, {3:1, 454:1, 309:1, 96:1, 137:1}, FLabel); _.toString_0 = function toString_82(){ return this.text_0 == null || this.text_0.length == 0?'l[' + $toString_10(this.edge) + ']':'l_' + this.text_0; } ; var Lorg_eclipse_elk_alg_force_graph_FLabel_2_classLit = createForClass('org.eclipse.elk.alg.force.graph', 'FLabel', 454); function $toString_11(this$static){ return this$static.label_0 == null || this$static.label_0.length == 0?'n_' + this$static.id_0:'n_' + this$static.label_0; } function FNode(label_0){ FParticle.call(this); this.label_0 = label_0; } defineClass(153, 309, {3:1, 153:1, 309:1, 96:1, 137:1}, FNode); _.toString_0 = function toString_83(){ return $toString_11(this); } ; _.id_0 = 0; var Lorg_eclipse_elk_alg_force_graph_FNode_2_classLit = createForClass('org.eclipse.elk.alg.force.graph', 'FNode', 153); function $initialize_0(this$static, fgraph){ var bends, count, edge, edge$iterator, i, node, node$iterator, pos, posScale; this$static.graph_0 = fgraph; this$static.random_0 = castTo($getProperty(fgraph, ($clinit_InternalProperties_0() , RANDOM)), 234); $calcAdjacency(fgraph); this$static.dispBound = $wnd.Math.max(fgraph.nodes.array.length * 16 + fgraph.edges.array.length, 256); if (!$booleanValue(castToBoolean($getProperty(fgraph, ($clinit_ForceOptions() , INTERACTIVE))))) { posScale = this$static.graph_0.nodes.array.length; for (node$iterator = new ArrayList$1(fgraph.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 153); pos = node.position; pos.x_0 = $nextDouble(this$static.random_0) * posScale; pos.y_0 = $nextDouble(this$static.random_0) * posScale; } } bends = fgraph.bendPoints; for (edge$iterator = new ArrayList$1(fgraph.edges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 290); count = castTo($getProperty(edge, REPULSIVE_POWER_0), 17).value_0; if (count > 0) { for (i = 0; i < count; i++) { $add_3(bends, new FBendpoint(edge)); } $distributeBendpoints(edge); } } } function $iterationDone(this$static){ var edge, edge$iterator, label_0, label$iterator; for (edge$iterator = new ArrayList$1(this$static.graph_0.edges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 290); for (label$iterator = new ArrayList$1(edge.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 454); $refreshPosition(label_0); } $distributeBendpoints(edge); } } function $layout_0(this$static, fgraph, monitor){ var d, displacement, iterations, u, u$iterator, v, v$iterator, v$iterator0; monitor.begin('Component Layout', 1); this$static.initialize(fgraph); iterations = 0; while (this$static.moreIterations(iterations) && !monitor.isCanceled()) { this$static.iterationDone(); for (v$iterator0 = $iterator(concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [fgraph.nodes, fgraph.labels, fgraph.bendPoints]))); $hasNext_1(v$iterator0);) { v = castTo($next_0(v$iterator0), 309); for (u$iterator = $iterator(concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [fgraph.nodes, fgraph.labels, fgraph.bendPoints]))); $hasNext_1(u$iterator);) { u = castTo($next_0(u$iterator), 309); if (u != v) { displacement = this$static.calcDisplacement(u, v); !!displacement && $add_19(v.displacement, displacement); } } } for (v$iterator = $iterator(concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [fgraph.nodes, fgraph.labels, fgraph.bendPoints]))); $hasNext_1(v$iterator);) { v = castTo($next_0(v$iterator), 309); d = v.displacement; $bound(d, -this$static.dispBound, -this$static.dispBound, this$static.dispBound, this$static.dispBound); $add_19(v.position, d); d.x_0 = 0; d.y_0 = 0; } ++iterations; } monitor.done_1(); } function avoidSamePosition(random, u, v){ var length_0, orthogonaluV, orthogonalvV, pu, pv, triedForBendPoints, uE, uVector, vE, vVector; pu = u.position; pv = v.position; while (pu.x_0 - pv.x_0 == 0 && pu.y_0 - pv.y_0 == 0) { triedForBendPoints = false; if (instanceOf(u, 250) && instanceOf(v, 250) && !triedForBendPoints) { uE = castTo(u, 250).edge; uVector = $sub_0(new KVector_2($getTargetPoint(uE)), $getSourcePoint(uE)); length_0 = 2; orthogonaluV = new KVector_1(uVector.x_0 / $wnd.Math.sqrt(uVector.x_0 * uVector.x_0 + uVector.y_0 * uVector.y_0) * length_0, -uVector.y_0 / $wnd.Math.sqrt(uVector.x_0 * uVector.x_0 + uVector.y_0 * uVector.y_0) * length_0); $add_19(pu, orthogonaluV); vE = castTo(v, 250).edge; vVector = $sub_0(new KVector_2($getTargetPoint(vE)), $getSourcePoint(vE)); length_0 = uVector == vVector?-2:2; orthogonalvV = new KVector_1(vVector.x_0 / $wnd.Math.sqrt(vVector.x_0 * vVector.x_0 + vVector.y_0 * vVector.y_0) * length_0, -(vVector.y_0 / $wnd.Math.sqrt(vVector.x_0 * vVector.x_0 + vVector.y_0 * vVector.y_0)) * length_0); $add_19(pu, orthogonalvV); triedForBendPoints = true; } else { pu.x_0 += $nextInternal(random, 26) * $intern_78 + $nextInternal(random, 27) * $intern_79 - 0.5; pu.y_0 += $nextInternal(random, 26) * $intern_78 + $nextInternal(random, 27) * $intern_79 - 0.5; pv.x_0 += $nextInternal(random, 26) * $intern_78 + $nextInternal(random, 27) * $intern_79 - 0.5; pv.y_0 += $nextInternal(random, 26) * $intern_78 + $nextInternal(random, 27) * $intern_79 - 0.5; } } } defineClass(2100, 1, {}); _.initialize = function initialize(fgraph){ $initialize_0(this, fgraph); } ; _.iterationDone = function iterationDone(){ $iterationDone(this); } ; _.dispBound = 0; var Lorg_eclipse_elk_alg_force_model_AbstractForceModel_2_classLit = createForClass('org.eclipse.elk.alg.force.model', 'AbstractForceModel', 2100); function EadesModel(){ this.maxIterations = castTo($getDefault(($clinit_ForceOptions() , ITERATIONS_0)), 17).value_0; this.springLength = $doubleValue(castToDouble($getDefault(SPACING_NODE_NODE))); this.repulsionFactor = $doubleValue(castToDouble($getDefault(REPULSION_0))); } function attractive(d, s){ return d > 0?$wnd.Math.log(d / s):-100; } function repulsive(d, r){ return d > 0?r / (d * d):r * 100; } defineClass(641, 2100, {641:1}, EadesModel); _.calcDisplacement = function calcDisplacement(forcer, forcee){ var connection, d, displacement, force, length_0; avoidSamePosition(this.random_0, forcer, forcee); displacement = $sub_0($clone_1(forcee.position), forcer.position); length_0 = $wnd.Math.sqrt(displacement.x_0 * displacement.x_0 + displacement.y_0 * displacement.y_0); d = $wnd.Math.max(0, length_0 - $length(forcer.size_0) / 2 - $length(forcee.size_0) / 2); connection = $getConnection(this.graph_0, forcer, forcee); connection > 0?(force = -attractive(d, this.springLength) * connection):(force = repulsive(d, this.repulsionFactor) * castTo($getProperty(forcer, ($clinit_ForceOptions() , PRIORITY)), 17).value_0); $scale(displacement, force / length_0); return displacement; } ; _.initialize = function initialize_0(graph){ $initialize_0(this, graph); this.maxIterations = castTo($getProperty(graph, ($clinit_ForceOptions() , ITERATIONS_0)), 17).value_0; this.springLength = $doubleValue(castToDouble($getProperty(graph, SPACING_NODE_NODE))); this.repulsionFactor = $doubleValue(castToDouble($getProperty(graph, REPULSION_0))); } ; _.moreIterations = function moreIterations(count){ return count < this.maxIterations; } ; _.maxIterations = 0; _.repulsionFactor = 0; _.springLength = 0; var Lorg_eclipse_elk_alg_force_model_EadesModel_2_classLit = createForClass('org.eclipse.elk.alg.force.model', 'EadesModel', 641); function FruchtermanReingoldModel(){ this.temperature = $doubleValue(castToDouble($getDefault(($clinit_ForceOptions() , TEMPERATURE_0)))); } function attractive_0(d, k){ return d * d / k; } function repulsive_0(d, k){ return d > 0?k * k / d:k * k * 100; } defineClass(642, 2100, {642:1}, FruchtermanReingoldModel); _.calcDisplacement = function calcDisplacement_0(forcer, forcee){ var connection, d, displacement, force, length_0; avoidSamePosition(this.random_0, forcer, forcee); displacement = $sub_0($clone_1(forcee.position), forcer.position); length_0 = $wnd.Math.sqrt(displacement.x_0 * displacement.x_0 + displacement.y_0 * displacement.y_0); d = $wnd.Math.max(0, length_0 - $length(forcer.size_0) / 2 - $length(forcee.size_0) / 2); force = repulsive_0(d, this.k) * castTo($getProperty(forcer, ($clinit_ForceOptions() , PRIORITY)), 17).value_0; connection = $getConnection(this.graph_0, forcer, forcee); connection > 0 && (force -= attractive_0(d, this.k) * connection); $scale(displacement, force * this.temperature / length_0); return displacement; } ; _.initialize = function initialize_1(graph){ var area, c, n, totalHeight, totalWidth, v, v$iterator; $initialize_0(this, graph); this.temperature = $doubleValue(castToDouble($getProperty(graph, ($clinit_ForceOptions() , TEMPERATURE_0)))); this.threshold = this.temperature / castTo($getProperty(graph, ITERATIONS_0), 17).value_0; n = graph.nodes.array.length; totalWidth = 0; totalHeight = 0; for (v$iterator = new ArrayList$1(graph.nodes); v$iterator.i < v$iterator.this$01.array.length;) { v = castTo($next_6(v$iterator), 153); totalWidth += v.size_0.x_0; totalHeight += v.size_0.y_0; } area = totalWidth * totalHeight; c = $doubleValue(castToDouble($getProperty(graph, SPACING_NODE_NODE))) * $intern_94; this.k = $wnd.Math.sqrt(area / (2 * n)) * c; } ; _.iterationDone = function iterationDone_0(){ $iterationDone(this); this.temperature -= this.threshold; } ; _.moreIterations = function moreIterations_0(count){ return this.temperature > 0; } ; _.k = 0; _.temperature = 0; _.threshold = 0; var Lorg_eclipse_elk_alg_force_model_FruchtermanReingoldModel_2_classLit = createForClass('org.eclipse.elk.alg.force.model', 'FruchtermanReingoldModel', 642); function $clinit_ForceMetaDataProvider(){ $clinit_ForceMetaDataProvider = emptyMethod; MODEL_DEFAULT = ($clinit_ForceModelStrategy() , FRUCHTERMAN_REINGOLD); MODEL = new Property_1('org.eclipse.elk.force.model', MODEL_DEFAULT); valueOf_3(1); ITERATIONS = new Property_1('org.eclipse.elk.force.iterations', valueOf_3(300)); valueOf_3(0); REPULSIVE_POWER = new Property_1('org.eclipse.elk.force.repulsivePower', valueOf_3(0)); new ExclusiveBounds$ExclusiveLowerBound; TEMPERATURE = new Property_1('org.eclipse.elk.force.temperature', $intern_101); new ExclusiveBounds$ExclusiveLowerBound; REPULSION = new Property_1('org.eclipse.elk.force.repulsion', 5); TEMPERATURE_DEP_MODEL_0 = FRUCHTERMAN_REINGOLD; REPULSION_DEP_MODEL_0 = EADES; } function ForceMetaDataProvider(){ $clinit_ForceMetaDataProvider(); } defineClass(860, 1, $intern_90, ForceMetaDataProvider); _.apply_4 = function apply_53(registry){ $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.force.model'), ''), 'Force Model'), 'Determines the model for force calculation.'), MODEL_DEFAULT), ($clinit_LayoutOptionData$Type() , ENUM)), Lorg_eclipse_elk_alg_force_options_ForceModelStrategy_2_classLit), of_1(($clinit_LayoutOptionData$Target() , PARENTS))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.force.iterations'), ''), 'Iterations'), 'The number of iterations on the force model.'), valueOf_3(300)), INT), Ljava_lang_Integer_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.force.repulsivePower'), ''), 'Repulsive Power'), 'Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model'), valueOf_3(0)), INT), Ljava_lang_Integer_2_classLit), of_1(EDGES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.force.temperature'), ''), 'FR Temperature'), 'The temperature is used as a scaling factor for particle displacements.'), $intern_101), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.force.temperature', 'org.eclipse.elk.force.model', TEMPERATURE_DEP_MODEL_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.force.repulsion'), ''), 'Eades Repulsion'), "Factor for repulsive forces in Eades' model."), 5), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.force.repulsion', 'org.eclipse.elk.force.model', REPULSION_DEP_MODEL_0); $apply_11((new ForceOptions , registry)); } ; var ITERATIONS, MODEL, MODEL_DEFAULT, REPULSION, REPULSION_DEP_MODEL_0, REPULSIVE_POWER, TEMPERATURE, TEMPERATURE_DEP_MODEL_0; var Lorg_eclipse_elk_alg_force_options_ForceMetaDataProvider_2_classLit = createForClass('org.eclipse.elk.alg.force.options', 'ForceMetaDataProvider', 860); function $clinit_ForceModelStrategy(){ $clinit_ForceModelStrategy = emptyMethod; EADES = new ForceModelStrategy('EADES', 0); FRUCHTERMAN_REINGOLD = new ForceModelStrategy('FRUCHTERMAN_REINGOLD', 1); } function ForceModelStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_23(name_0){ $clinit_ForceModelStrategy(); return valueOf(($clinit_ForceModelStrategy$Map() , $MAP_13), name_0); } function values_31(){ $clinit_ForceModelStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_force_options_ForceModelStrategy_2_classLit, 1), $intern_37, 432, 0, [EADES, FRUCHTERMAN_REINGOLD]); } defineClass(432, 22, {3:1, 34:1, 22:1, 432:1}, ForceModelStrategy); var EADES, FRUCHTERMAN_REINGOLD; var Lorg_eclipse_elk_alg_force_options_ForceModelStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.force.options', 'ForceModelStrategy', 432, Ljava_lang_Enum_2_classLit, values_31, valueOf_23); function $clinit_ForceModelStrategy$Map(){ $clinit_ForceModelStrategy$Map = emptyMethod; $MAP_13 = createValueOfMap(($clinit_ForceModelStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_force_options_ForceModelStrategy_2_classLit, 1), $intern_37, 432, 0, [EADES, FRUCHTERMAN_REINGOLD]))); } var $MAP_13; function $clinit_ForceOptions(){ $clinit_ForceOptions = emptyMethod; PRIORITY = new Property_2(($clinit_CoreOptions() , PRIORITY_3), valueOf_3(1)); SPACING_NODE_NODE = new Property_2(SPACING_NODE_NODE_6, 80); SPACING_EDGE_LABEL = new Property_2(SPACING_EDGE_LABEL_1, 5); ASPECT_RATIO_0 = new Property_2(ASPECT_RATIO_5, $intern_102); RANDOM_SEED = new Property_2(RANDOM_SEED_1, valueOf_3(1)); SEPARATE_CONNECTED_COMPONENTS = new Property_2(SEPARATE_CONNECTED_COMPONENTS_2, ($clinit_Boolean() , true)); PADDING_DEFAULT = new ElkPadding_0(50); PADDING_0 = new Property_2(PADDING_6, PADDING_DEFAULT); INTERACTIVE = INTERACTIVE_8; PORT_CONSTRAINTS = PORT_CONSTRAINTS_1; EDGE_LABELS_INLINE = new Property_2(EDGE_LABELS_INLINE_1, false); OMIT_NODE_MICRO_LAYOUT = OMIT_NODE_MICRO_LAYOUT_4; NODE_SIZE_FIXED_GRAPH_SIZE = NODE_SIZE_FIXED_GRAPH_SIZE_3; NODE_SIZE_OPTIONS = NODE_SIZE_OPTIONS_6; NODE_SIZE_CONSTRAINTS = NODE_SIZE_CONSTRAINTS_6; NODE_LABELS_PLACEMENT = NODE_LABELS_PLACEMENT_5; PORT_LABELS_PLACEMENT = PORT_LABELS_PLACEMENT_5; MODEL_0 = ($clinit_ForceMetaDataProvider() , MODEL); TEMPERATURE_0 = TEMPERATURE; ITERATIONS_0 = ITERATIONS; REPULSION_0 = REPULSION; REPULSIVE_POWER_0 = REPULSIVE_POWER; TOPDOWN_LAYOUT = TOPDOWN_LAYOUT_2; TOPDOWN_SCALE_FACTOR = TOPDOWN_SCALE_FACTOR_2; TOPDOWN_HIERARCHICAL_NODE_WIDTH = TOPDOWN_HIERARCHICAL_NODE_WIDTH_2; TOPDOWN_HIERARCHICAL_NODE_ASPECT_RATIO = TOPDOWN_HIERARCHICAL_NODE_ASPECT_RATIO_2; TOPDOWN_NODE_TYPE_DEFAULT = ($clinit_TopdownNodeTypes() , HIERARCHICAL_NODE); new Property_2(TOPDOWN_NODE_TYPE, TOPDOWN_NODE_TYPE_DEFAULT); } function $apply_11(registry){ $register(registry, new LayoutAlgorithmData($supportedFeatures($category($providerFactory($description($name_0($id(new LayoutAlgorithmData$Builder, 'org.eclipse.elk.force'), 'ELK Force'), 'Force-based algorithm provided by the Eclipse Layout Kernel. Implements methods that follow physical analogies by simulating forces that move the nodes into a balanced distribution. Currently the original Eades model and the Fruchterman - Reingold model are supported.'), new ForceOptions$ForceFactory), 'org.eclipse.elk.force'), of_2(($clinit_GraphFeature() , MULTI_EDGES), stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_graph_properties_GraphFeature_2_classLit, 1), $intern_37, 245, 0, [EDGE_LABELS]))))); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.priority', valueOf_3(1)); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.spacing.nodeNode', 80); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.spacing.edgeLabel', 5); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.aspectRatio', $intern_102); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.randomSeed', valueOf_3(1)); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.separateConnectedComponents', ($clinit_Boolean() , true)); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.padding', PADDING_DEFAULT); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.interactive', $getDefault(INTERACTIVE)); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.portConstraints', $getDefault(PORT_CONSTRAINTS)); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.edgeLabels.inline', false); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.omitNodeMicroLayout', $getDefault(OMIT_NODE_MICRO_LAYOUT)); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.nodeSize.fixedGraphSize', $getDefault(NODE_SIZE_FIXED_GRAPH_SIZE)); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.nodeSize.options', $getDefault(NODE_SIZE_OPTIONS)); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.nodeSize.constraints', $getDefault(NODE_SIZE_CONSTRAINTS)); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.nodeLabels.placement', $getDefault(NODE_LABELS_PLACEMENT)); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.portLabels.placement', $getDefault(PORT_LABELS_PLACEMENT)); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.force.model', $getDefault(MODEL_0)); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.force.temperature', $getDefault(TEMPERATURE_0)); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.force.iterations', $getDefault(ITERATIONS_0)); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.force.repulsion', $getDefault(REPULSION_0)); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.force.repulsivePower', $getDefault(REPULSIVE_POWER_0)); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.topdownLayout', $getDefault(TOPDOWN_LAYOUT)); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.topdown.scaleFactor', $getDefault(TOPDOWN_SCALE_FACTOR)); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.topdown.hierarchicalNodeWidth', $getDefault(TOPDOWN_HIERARCHICAL_NODE_WIDTH)); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.topdown.hierarchicalNodeAspectRatio', $getDefault(TOPDOWN_HIERARCHICAL_NODE_ASPECT_RATIO)); $addOptionSupport(registry, 'org.eclipse.elk.force', 'org.eclipse.elk.topdown.nodeType', TOPDOWN_NODE_TYPE_DEFAULT); } function ForceOptions(){ $clinit_ForceOptions(); } defineClass($intern_46, 1, $intern_90, ForceOptions); _.apply_4 = function apply_54(registry){ $apply_11(registry); } ; var ASPECT_RATIO_0, EDGE_LABELS_INLINE, INTERACTIVE, ITERATIONS_0, MODEL_0, NODE_LABELS_PLACEMENT, NODE_SIZE_CONSTRAINTS, NODE_SIZE_FIXED_GRAPH_SIZE, NODE_SIZE_OPTIONS, OMIT_NODE_MICRO_LAYOUT, PADDING_0, PADDING_DEFAULT, PORT_CONSTRAINTS, PORT_LABELS_PLACEMENT, PRIORITY, RANDOM_SEED, REPULSION_0, REPULSIVE_POWER_0, SEPARATE_CONNECTED_COMPONENTS, SPACING_EDGE_LABEL, SPACING_NODE_NODE, TEMPERATURE_0, TOPDOWN_HIERARCHICAL_NODE_ASPECT_RATIO, TOPDOWN_HIERARCHICAL_NODE_WIDTH, TOPDOWN_LAYOUT, TOPDOWN_NODE_TYPE_DEFAULT, TOPDOWN_SCALE_FACTOR; var Lorg_eclipse_elk_alg_force_options_ForceOptions_2_classLit = createForClass('org.eclipse.elk.alg.force.options', 'ForceOptions', $intern_46); function ForceOptions$ForceFactory(){ } defineClass(1001, 1, {}, ForceOptions$ForceFactory); _.create_0 = function create_3(){ var provider; return provider = new ForceLayoutProvider , provider; } ; _.destroy = function destroy_0(obj){ } ; var Lorg_eclipse_elk_alg_force_options_ForceOptions$ForceFactory_2_classLit = createForClass('org.eclipse.elk.alg.force.options', 'ForceOptions/ForceFactory', 1001); function $clinit_InternalProperties_0(){ $clinit_InternalProperties_0 = emptyMethod; ORIGIN = new Property('origin'); RANDOM = new Property('random'); BB_UPLEFT = new Property('boundingBox.upLeft'); BB_LOWRIGHT = new Property('boundingBox.lowRight'); } var BB_LOWRIGHT, BB_UPLEFT, ORIGIN, RANDOM; function $clinit_StressMetaDataProvider(){ $clinit_StressMetaDataProvider = emptyMethod; FIXED = new Property_1('org.eclipse.elk.stress.fixed', ($clinit_Boolean() , false)); DESIRED_EDGE_LENGTH = new Property_1('org.eclipse.elk.stress.desiredEdgeLength', 100); DIMENSION_DEFAULT = ($clinit_StressMajorization$Dimension() , XY); DIMENSION = new Property_1('org.eclipse.elk.stress.dimension', DIMENSION_DEFAULT); EPSILON = new Property_1('org.eclipse.elk.stress.epsilon', $intern_101); ITERATION_LIMIT = new Property_1('org.eclipse.elk.stress.iterationLimit', valueOf_3($intern_0)); } function StressMetaDataProvider(){ $clinit_StressMetaDataProvider(); } defineClass(861, 1, $intern_90, StressMetaDataProvider); _.apply_4 = function apply_55(registry){ $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.stress.fixed'), ''), 'Fixed Position'), 'Prevent that the node is moved by the layout algorithm.'), ($clinit_Boolean() , false)), ($clinit_LayoutOptionData$Type() , BOOLEAN)), Ljava_lang_Boolean_2_classLit), of_1(($clinit_LayoutOptionData$Target() , NODES))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.stress.desiredEdgeLength'), ''), 'Desired Edge Length'), 'Either specified for parent nodes or for individual edges, where the latter takes higher precedence.'), 100), DOUBLE), Ljava_lang_Double_2_classLit), of_2(PARENTS, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_LayoutOptionData$Target_2_classLit, 1), $intern_37, 170, 0, [EDGES]))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.stress.dimension'), ''), 'Layout Dimension'), 'Dimensions that are permitted to be altered during layout.'), DIMENSION_DEFAULT), ENUM), Lorg_eclipse_elk_alg_force_stress_StressMajorization$Dimension_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.stress.epsilon'), ''), 'Stress Epsilon'), 'Termination criterion for the iterative process.'), $intern_101), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.stress.iterationLimit'), ''), 'Iteration Limit'), "Maximum number of performed iterations. Takes higher precedence than 'epsilon'."), valueOf_3($intern_0)), INT), Ljava_lang_Integer_2_classLit), of_1(PARENTS)))); $apply_12((new StressOptions , registry)); } ; var DESIRED_EDGE_LENGTH, DIMENSION, DIMENSION_DEFAULT, EPSILON, FIXED, ITERATION_LIMIT; var Lorg_eclipse_elk_alg_force_options_StressMetaDataProvider_2_classLit = createForClass('org.eclipse.elk.alg.force.options', 'StressMetaDataProvider', 861); function $clinit_StressOptions(){ $clinit_StressOptions = emptyMethod; INTERACTIVE_0 = ($clinit_CoreOptions() , INTERACTIVE_8); new Property_2(EDGE_LABELS_INLINE_1, ($clinit_Boolean() , true)); NODE_SIZE_CONSTRAINTS_0 = NODE_SIZE_CONSTRAINTS_6; NODE_SIZE_MINIMUM = NODE_SIZE_MINIMUM_5; NODE_SIZE_OPTIONS_0 = NODE_SIZE_OPTIONS_6; NODE_LABELS_PLACEMENT_0 = NODE_LABELS_PLACEMENT_5; OMIT_NODE_MICRO_LAYOUT_0 = OMIT_NODE_MICRO_LAYOUT_4; PORT_LABELS_PLACEMENT_0 = PORT_LABELS_PLACEMENT_5; FIXED_0 = ($clinit_StressMetaDataProvider() , FIXED); DIMENSION_0 = DIMENSION; EPSILON_0 = EPSILON; ITERATION_LIMIT_0 = ITERATION_LIMIT; DESIRED_EDGE_LENGTH_0 = DESIRED_EDGE_LENGTH; } function $apply_12(registry){ $register(registry, new LayoutAlgorithmData($category($providerFactory($description($name_0($id(new LayoutAlgorithmData$Builder, 'org.eclipse.elk.stress'), 'ELK Stress'), "Minimizes the stress within a layout using stress majorization. Stress exists if the euclidean distance between a pair of nodes doesn't match their graph theoretic distance, that is, the shortest path between the two nodes. The method allows to specify individual edge lengths."), new StressOptions$StressFactory), 'org.eclipse.elk.force'))); $addOptionSupport(registry, 'org.eclipse.elk.stress', 'org.eclipse.elk.interactive', $getDefault(INTERACTIVE_0)); $addOptionSupport(registry, 'org.eclipse.elk.stress', 'org.eclipse.elk.edgeLabels.inline', ($clinit_Boolean() , true)); $addOptionSupport(registry, 'org.eclipse.elk.stress', 'org.eclipse.elk.nodeSize.constraints', $getDefault(NODE_SIZE_CONSTRAINTS_0)); $addOptionSupport(registry, 'org.eclipse.elk.stress', 'org.eclipse.elk.nodeSize.minimum', $getDefault(NODE_SIZE_MINIMUM)); $addOptionSupport(registry, 'org.eclipse.elk.stress', 'org.eclipse.elk.nodeSize.options', $getDefault(NODE_SIZE_OPTIONS_0)); $addOptionSupport(registry, 'org.eclipse.elk.stress', 'org.eclipse.elk.nodeLabels.placement', $getDefault(NODE_LABELS_PLACEMENT_0)); $addOptionSupport(registry, 'org.eclipse.elk.stress', 'org.eclipse.elk.omitNodeMicroLayout', $getDefault(OMIT_NODE_MICRO_LAYOUT_0)); $addOptionSupport(registry, 'org.eclipse.elk.stress', 'org.eclipse.elk.portLabels.placement', $getDefault(PORT_LABELS_PLACEMENT_0)); $addOptionSupport(registry, 'org.eclipse.elk.stress', 'org.eclipse.elk.stress.fixed', $getDefault(FIXED_0)); $addOptionSupport(registry, 'org.eclipse.elk.stress', 'org.eclipse.elk.stress.dimension', $getDefault(DIMENSION_0)); $addOptionSupport(registry, 'org.eclipse.elk.stress', 'org.eclipse.elk.stress.epsilon', $getDefault(EPSILON_0)); $addOptionSupport(registry, 'org.eclipse.elk.stress', 'org.eclipse.elk.stress.iterationLimit', $getDefault(ITERATION_LIMIT_0)); $addOptionSupport(registry, 'org.eclipse.elk.stress', 'org.eclipse.elk.stress.desiredEdgeLength', $getDefault(DESIRED_EDGE_LENGTH_0)); } function StressOptions(){ $clinit_StressOptions(); } defineClass(1004, 1, $intern_90, StressOptions); _.apply_4 = function apply_56(registry){ $apply_12(registry); } ; var DESIRED_EDGE_LENGTH_0, DIMENSION_0, EPSILON_0, FIXED_0, INTERACTIVE_0, ITERATION_LIMIT_0, NODE_LABELS_PLACEMENT_0, NODE_SIZE_CONSTRAINTS_0, NODE_SIZE_MINIMUM, NODE_SIZE_OPTIONS_0, OMIT_NODE_MICRO_LAYOUT_0, PORT_LABELS_PLACEMENT_0; var Lorg_eclipse_elk_alg_force_options_StressOptions_2_classLit = createForClass('org.eclipse.elk.alg.force.options', 'StressOptions', 1004); function StressOptions$StressFactory(){ } defineClass(1005, 1, {}, StressOptions$StressFactory); _.create_0 = function create_4(){ var provider; return provider = new StressLayoutProvider , provider; } ; _.destroy = function destroy_1(obj){ } ; var Lorg_eclipse_elk_alg_force_options_StressOptions$StressFactory_2_classLit = createForClass('org.eclipse.elk.alg.force.options', 'StressOptions/StressFactory', 1005); function StressLayoutProvider(){ this.componentsProcessor = new ComponentsProcessor; this.stressMajorization = new StressMajorization; } defineClass(1110, 205, $intern_96, StressLayoutProvider); _.layout = function layout_1(layoutGraph, progressMonitor){ var builder, components, fgraph, subGraph, subGraph$iterator; progressMonitor.begin('ELK Stress', 1); $booleanValue(castToBoolean($getProperty_0(layoutGraph, ($clinit_StressOptions() , INTERACTIVE_0))))?$booleanValue(castToBoolean($getProperty_0(layoutGraph, OMIT_NODE_MICRO_LAYOUT_0))) || $execute((builder = new NodeMicroLayout(($clinit_ElkGraphAdapters() , new ElkGraphAdapters$ElkGraphAdapter(layoutGraph))) , builder)):$layout(new ForceLayoutProvider, layoutGraph, progressMonitor.subTask(1)); fgraph = $importGraph_0(layoutGraph); components = $split_1(this.componentsProcessor, fgraph); for (subGraph$iterator = components.iterator_0(); subGraph$iterator.hasNext_0();) { subGraph = castTo(subGraph$iterator.next_1(), 235); if (subGraph.nodes.array.length <= 1) { continue; } $initialize_1(this.stressMajorization, subGraph); $execute_1(this.stressMajorization); $forEach_1(subGraph.labels, new StressLayoutProvider$lambda$0$Type); } fgraph = $recombine(components); $applyLayout_0(fgraph); progressMonitor.done_1(); } ; var Lorg_eclipse_elk_alg_force_stress_StressLayoutProvider_2_classLit = createForClass('org.eclipse.elk.alg.force.stress', 'StressLayoutProvider', 1110); function StressLayoutProvider$lambda$0$Type(){ } defineClass(1111, 1, $intern_19, StressLayoutProvider$lambda$0$Type); _.accept = function accept_59(arg0){ $refreshPosition(castTo(arg0, 454)); } ; var Lorg_eclipse_elk_alg_force_stress_StressLayoutProvider$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.force.stress', 'StressLayoutProvider/lambda$0$Type', 1111); function $computeNewPosition(this$static, u){ var eucDist, v, v$iterator, weightSum, wij, xDisp, yDisp; weightSum = 0; xDisp = 0; yDisp = 0; for (v$iterator = new ArrayList$1(this$static.graph_0.nodes); v$iterator.i < v$iterator.this$01.array.length;) { v = castTo($next_6(v$iterator), 153); if (u == v) { continue; } wij = this$static.w[u.id_0][v.id_0]; weightSum += wij; eucDist = $distance_0(u.position, v.position); eucDist > 0 && this$static.dim != ($clinit_StressMajorization$Dimension() , Y) && (xDisp += wij * (v.position.x_0 + this$static.apsp[u.id_0][v.id_0] * (u.position.x_0 - v.position.x_0) / eucDist)); eucDist > 0 && this$static.dim != ($clinit_StressMajorization$Dimension() , X) && (yDisp += wij * (v.position.y_0 + this$static.apsp[u.id_0][v.id_0] * (u.position.y_0 - v.position.y_0) / eucDist)); } switch (this$static.dim.ordinal) { case 1: return new KVector_1(xDisp / weightSum, u.position.y_0); case 2: return new KVector_1(u.position.x_0, yDisp / weightSum); default:return new KVector_1(xDisp / weightSum, yDisp / weightSum); } } function $computeStress(this$static){ var eucDisplacement, eucDist, i, j, nodes, stress, u, v; stress = 0; nodes = this$static.graph_0.nodes; for (i = 0; i < nodes.array.length; ++i) { u = (checkCriticalElementIndex(i, nodes.array.length) , castTo(nodes.array[i], 153)); for (j = i + 1; j < nodes.array.length; ++j) { v = (checkCriticalElementIndex(j, nodes.array.length) , castTo(nodes.array[j], 153)); eucDist = $distance_0(u.position, v.position); eucDisplacement = eucDist - this$static.apsp[u.id_0][v.id_0]; stress += this$static.w[u.id_0][v.id_0] * eucDisplacement * eucDisplacement; } } return stress; } function $dijkstra(this$static, source, dist){ var d, e, e$iterator, el, mark, n, n$iterator, nodes, u, v; nodes = new PriorityQueue(new StressMajorization$lambda$0$Type(dist)); mark = initUnidimensionalArray(Z_classLit, $intern_91, 28, this$static.graph_0.nodes.array.length, 16, 1); fill0_3(mark, mark.length); dist[source.id_0] = 0; for (n$iterator = new ArrayList$1(this$static.graph_0.nodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 153); n.id_0 != source.id_0 && (dist[n.id_0] = $intern_0); checkCriticalState_0($offer(nodes, n), 'Unable to add element to queue'); } while (nodes.heap.array.length != 0) { u = castTo($poll_0(nodes), 153); mark[u.id_0] = true; for (e$iterator = $listIterator_0(new LinkedListMultimap$1(this$static.connectedEdges, u), 0); e$iterator.next_0;) { e = castTo($next_2(e$iterator), 290); v = $getOther_0(e, u); if (mark[v.id_0]) { continue; } $hasProperty(e, ($clinit_StressOptions() , DESIRED_EDGE_LENGTH_0))?(el = $doubleValue(castToDouble($getProperty(e, DESIRED_EDGE_LENGTH_0)))):(el = this$static.desiredEdgeLength); d = dist[u.id_0] + el; if (d < dist[v.id_0]) { dist[v.id_0] = d; $remove_25(nodes, v); checkCriticalState_0($offer(nodes, v), 'Unable to add element to queue'); } } } } function $done(this$static, count, prevStress, curStress){ return prevStress == 0 || (prevStress - curStress) / prevStress < this$static.epsilon || count >= this$static.iterationLimit; } function $execute_1(this$static){ var count, curStress, newPos, prevStress, u, u$iterator; if (this$static.graph_0.nodes.array.length <= 1) { return; } count = 0; prevStress = $computeStress(this$static); curStress = $intern_60; do { count > 0 && (prevStress = curStress); for (u$iterator = new ArrayList$1(this$static.graph_0.nodes); u$iterator.i < u$iterator.this$01.array.length;) { u = castTo($next_6(u$iterator), 153); if ($booleanValue(castToBoolean($getProperty(u, ($clinit_StressOptions() , FIXED_0))))) { continue; } newPos = $computeNewPosition(this$static, u); $add_19($reset_5(u.position), newPos); } curStress = $computeStress(this$static); } while (!$done(this$static, count++, prevStress, curStress)); } function $getOther_0(edge, one){ if (edge.source == one) { return edge.target; } else if (edge.target == one) { return edge.source; } else { throw toJs(new IllegalArgumentException_0("Node 'one' must be either source or target of edge 'edge'.")); } } function $initialize_1(this$static, fgraph){ var dij, edge, edge$iterator, i, j, n, source, source$iterator, wij; if (fgraph.nodes.array.length <= 1) { return; } this$static.graph_0 = fgraph; this$static.dim = castTo($getProperty(this$static.graph_0, ($clinit_StressOptions() , DIMENSION_0)), 391); this$static.iterationLimit = castTo($getProperty(this$static.graph_0, ITERATION_LIMIT_0), 17).value_0; this$static.epsilon = $doubleValue(castToDouble($getProperty(this$static.graph_0, EPSILON_0))); this$static.desiredEdgeLength = $doubleValue(castToDouble($getProperty(this$static.graph_0, DESIRED_EDGE_LENGTH_0))); $clear_3(this$static.connectedEdges); for (edge$iterator = new ArrayList$1(this$static.graph_0.edges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 290); $addNode(this$static.connectedEdges, edge.source, edge, null); $addNode(this$static.connectedEdges, edge.target, edge, null); } n = this$static.graph_0.nodes.array.length; this$static.apsp = initMultidimensionalArray(D_classLit, [$intern_16, $intern_66], [109, 28], 15, [n, n], 2); for (source$iterator = new ArrayList$1(this$static.graph_0.nodes); source$iterator.i < source$iterator.this$01.array.length;) { source = castTo($next_6(source$iterator), 153); $dijkstra(this$static, source, this$static.apsp[source.id_0]); } this$static.w = initMultidimensionalArray(D_classLit, [$intern_16, $intern_66], [109, 28], 15, [n, n], 2); for (i = 0; i < n; ++i) { for (j = 0; j < n; ++j) { dij = this$static.apsp[i][j]; wij = 1 / (dij * dij); this$static.w[i][j] = wij; } } } function StressMajorization(){ this.connectedEdges = new LinkedListMultimap; } function lambda$0_16(dist_0, n1_1, n2_2){ return compare_4(dist_0[n1_1.id_0], dist_0[n2_2.id_0]); } defineClass(1002, 1, {}, StressMajorization); _.desiredEdgeLength = 0; _.epsilon = 0; _.iterationLimit = 0; var Lorg_eclipse_elk_alg_force_stress_StressMajorization_2_classLit = createForClass('org.eclipse.elk.alg.force.stress', 'StressMajorization', 1002); function $clinit_StressMajorization$Dimension(){ $clinit_StressMajorization$Dimension = emptyMethod; XY = new StressMajorization$Dimension('XY', 0); X = new StressMajorization$Dimension('X', 1); Y = new StressMajorization$Dimension('Y', 2); } function StressMajorization$Dimension(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_24(name_0){ $clinit_StressMajorization$Dimension(); return valueOf(($clinit_StressMajorization$Dimension$Map() , $MAP_14), name_0); } function values_32(){ $clinit_StressMajorization$Dimension(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_force_stress_StressMajorization$Dimension_2_classLit, 1), $intern_37, 391, 0, [XY, X, Y]); } defineClass(391, 22, {3:1, 34:1, 22:1, 391:1}, StressMajorization$Dimension); var X, XY, Y; var Lorg_eclipse_elk_alg_force_stress_StressMajorization$Dimension_2_classLit = createForEnum('org.eclipse.elk.alg.force.stress', 'StressMajorization/Dimension', 391, Ljava_lang_Enum_2_classLit, values_32, valueOf_24); function $clinit_StressMajorization$Dimension$Map(){ $clinit_StressMajorization$Dimension$Map = emptyMethod; $MAP_14 = createValueOfMap(($clinit_StressMajorization$Dimension() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_force_stress_StressMajorization$Dimension_2_classLit, 1), $intern_37, 391, 0, [XY, X, Y]))); } var $MAP_14; function StressMajorization$lambda$0$Type(dist_0){ this.dist_0 = dist_0; } defineClass(1003, 1, $intern_88, StressMajorization$lambda$0$Type); _.compare_1 = function compare_29(arg0, arg1){ return lambda$0_16(this.dist_0, castTo(arg0, 153), castTo(arg1, 153)); } ; _.equals_0 = function equals_81(other){ return this === other; } ; _.reversed = function reversed_21(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_force_stress_StressMajorization$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.force.stress', 'StressMajorization/lambda$0$Type', 1003); function $collectAllGraphsBottomUp(root){ var collectedGraphs, continueSearchingTheseGraphs, nestedGraph, nextGraph, node, node$iterator; collectedGraphs = new ArrayDeque; continueSearchingTheseGraphs = new ArrayDeque; $addFirst(collectedGraphs, root); $addFirst(continueSearchingTheseGraphs, root); while (continueSearchingTheseGraphs.head != continueSearchingTheseGraphs.tail) { nextGraph = castTo($removeFirst(continueSearchingTheseGraphs), 36); for (node$iterator = new ArrayList$1(nextGraph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (node.nestedGraph) { nestedGraph = node.nestedGraph; $addFirst(collectedGraphs, nestedGraph); $addFirst(continueSearchingTheseGraphs, nestedGraph); } } } return collectedGraphs; } function $doCompoundLayout(this$static, lgraph, monitor){ var theMonitor; theMonitor = monitor; !theMonitor && (theMonitor = $withMaxHierarchyLevels(new BasicProgressMonitor, 0)); theMonitor.begin('Layered layout', 2); $process_1(this$static.compoundGraphPreprocessor, lgraph, theMonitor.subTask(1)); $hierarchicalLayout(this$static, lgraph, theMonitor.subTask(1)); $process_0(lgraph, theMonitor.subTask(1)); theMonitor.done_1(); } function $doLayout(this$static, lgraph, monitor){ var comp, comp$iterator, compWork, components, theMonitor; theMonitor = monitor; !theMonitor && (theMonitor = $withMaxHierarchyLevels(new BasicProgressMonitor, 0)); theMonitor.begin('Layered layout', 1); $prepareGraphForLayout(this$static.graphConfigurator, lgraph); components = $split_2(this$static.componentsProcessor, lgraph); if (components.size_1() == 1) { $layout_1(castTo(components.get_0(0), 36), theMonitor); } else { compWork = 1 / components.size_1(); for (comp$iterator = components.iterator_0(); comp$iterator.hasNext_0();) { comp = castTo(comp$iterator.next_1(), 36); if (monitor.isCanceled()) { return; } $layout_1(comp, theMonitor.subTask(compWork)); } } $combine(this$static.componentsProcessor, components, lgraph); $resizeGraph(lgraph); theMonitor.done_1(); } function $hierarchicalLayout(this$static, lgraph, monitor){ var algorithm, g, g$iterator, graph, graphAndAlgorithm, graphAndAlgorithm$iterator, graphs, graphsAndAlgorithms, processor, processors, rootProcessors, slotIndex, work, parentCms, rootType; graphs = $collectAllGraphsBottomUp(lgraph); parentCms = castTo($getProperty(lgraph, ($clinit_LayeredOptions() , CROSSING_MINIMIZATION_STRATEGY_0)), 322); $forEach_0(graphs, new ElkLayered$lambda$0$Type(parentCms)); rootType = castTo($getProperty(lgraph, CROSSING_MINIMIZATION_GREEDY_SWITCH_HIERARCHICAL_TYPE_0), 299); $forEach_0(graphs, new ElkLayered$lambda$1$Type(rootType)); work = 0; graphsAndAlgorithms = new ArrayList; for (g$iterator = new ArrayDeque$IteratorImpl(graphs); g$iterator.currentIndex != g$iterator.fence;) { g = castTo($next_5(g$iterator), 36); $prepareGraphForLayout(this$static.graphConfigurator, g); processors = castTo($getProperty(g, ($clinit_InternalProperties_1() , PROCESSORS)), 15); work += processors.size_1(); algorithm = processors.iterator_0(); $add_3(graphsAndAlgorithms, new Pair(g, algorithm)); } monitor.begin('Recursive hierarchical layout', work); slotIndex = 0; rootProcessors = castTo(castTo($get_11(graphsAndAlgorithms, graphsAndAlgorithms.array.length - 1), 42).second, 51); while (rootProcessors.hasNext_0()) { for (graphAndAlgorithm$iterator = new ArrayList$1(graphsAndAlgorithms); graphAndAlgorithm$iterator.i < graphAndAlgorithm$iterator.this$01.array.length;) { graphAndAlgorithm = castTo($next_6(graphAndAlgorithm$iterator), 42); processors = castTo(graphAndAlgorithm.second, 51); graph = castTo(graphAndAlgorithm.first, 36); while (processors.hasNext_0()) { processor = castTo(processors.next_1(), 47); if (instanceOf(processor, 514)) { if (!graph.parentNode) { processor.process(graph, monitor.subTask(1)); ++slotIndex; break; } else { break; } } else { processor.process(graph, monitor.subTask(1)); ++slotIndex; } } } } monitor.done_1(); } function $layout_1(lgraph, monitor){ var algorithm, gwtDoesntSupportPrintf, layer, layer$iterator, monitorProgress, monitorWasAlreadyRunning, node, node$iterator, processor, processor$iterator, processor$iterator0, slot, slotIndex; monitorWasAlreadyRunning = monitor.isRunning(); monitorWasAlreadyRunning || monitor.begin('Component Layout', 1); algorithm = castTo($getProperty(lgraph, ($clinit_InternalProperties_1() , PROCESSORS)), 15); monitorProgress = 1 / algorithm.size_1(); if (monitor.isLoggingEnabled()) { monitor.log_0('ELK Layered uses the following ' + algorithm.size_1() + ' modules:'); slot = 0; for (processor$iterator0 = algorithm.iterator_0(); processor$iterator0.hasNext_0();) { processor = castTo(processor$iterator0.next_1(), 47); gwtDoesntSupportPrintf = (slot < 10?'0':'') + slot++; monitor.log_0(' Slot ' + gwtDoesntSupportPrintf + ': ' + $getName(getClass__Ljava_lang_Class___devirtual$(processor))); } } slotIndex = 0; for (processor$iterator = algorithm.iterator_0(); processor$iterator.hasNext_0();) { processor = castTo(processor$iterator.next_1(), 47); if (monitor.isCanceled()) { return; } processor.process(lgraph, monitor.subTask(monitorProgress)); ++slotIndex; } for (layer$iterator = new ArrayList$1(lgraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); $addAll_2(lgraph.layerlessNodes, layer.nodes); layer.nodes.array.length = 0; } for (node$iterator = new ArrayList$1(lgraph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); $setLayer_0(node, null); } lgraph.layers.array.length = 0; monitorWasAlreadyRunning || monitor.done_1(); } function $resizeGraph(lgraph){ var adjustedSize, calculatedSize, minSize, sizeConstraint, sizeOptions; sizeConstraint = castTo($getProperty(lgraph, ($clinit_LayeredOptions() , NODE_SIZE_CONSTRAINTS_1)), 21); sizeOptions = castTo($getProperty(lgraph, NODE_SIZE_OPTIONS_1), 21); calculatedSize = new KVector_1(lgraph.size_0.x_0 + lgraph.padding.left + lgraph.padding.right, lgraph.size_0.y_0 + lgraph.padding.top_0 + lgraph.padding.bottom); adjustedSize = new KVector_2(calculatedSize); if (sizeConstraint.contains(($clinit_SizeConstraint() , MINIMUM_SIZE))) { minSize = castTo($getProperty(lgraph, NODE_SIZE_MINIMUM_0), 8); if (sizeOptions.contains(($clinit_SizeOptions() , DEFAULT_MINIMUM_SIZE))) { minSize.x_0 <= 0 && (minSize.x_0 = 20); minSize.y_0 <= 0 && (minSize.y_0 = 20); } adjustedSize.x_0 = $wnd.Math.max(calculatedSize.x_0, minSize.x_0); adjustedSize.y_0 = $wnd.Math.max(calculatedSize.y_0, minSize.y_0); } $booleanValue(castToBoolean($getProperty(lgraph, NODE_SIZE_FIXED_GRAPH_SIZE_0))) || $resizeGraphNoReallyIMeanIt(lgraph, calculatedSize, adjustedSize); } function $resizeGraphNoReallyIMeanIt(lgraph, oldSize, newSize){ var contentAlignment, extPortSide, lPadding, node, node$iterator; contentAlignment = castTo($getProperty(lgraph, ($clinit_LayeredOptions() , CONTENT_ALIGNMENT)), 21); newSize.x_0 > oldSize.x_0 && (contentAlignment.contains(($clinit_ContentAlignment() , H_CENTER))?(lgraph.offset.x_0 += (newSize.x_0 - oldSize.x_0) / 2):contentAlignment.contains(H_RIGHT) && (lgraph.offset.x_0 += newSize.x_0 - oldSize.x_0)); newSize.y_0 > oldSize.y_0 && (contentAlignment.contains(($clinit_ContentAlignment() , V_CENTER))?(lgraph.offset.y_0 += (newSize.y_0 - oldSize.y_0) / 2):contentAlignment.contains(V_BOTTOM) && (lgraph.offset.y_0 += newSize.y_0 - oldSize.y_0)); if (castTo($getProperty(lgraph, ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21).contains(($clinit_GraphProperties() , EXTERNAL_PORTS)) && (newSize.x_0 > oldSize.x_0 || newSize.y_0 > oldSize.y_0)) { for (node$iterator = new ArrayList$1(lgraph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (node.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { extPortSide = castTo($getProperty(node, EXT_PORT_SIDE), 64); extPortSide == ($clinit_PortSide() , EAST_2)?(node.pos.x_0 += newSize.x_0 - oldSize.x_0):extPortSide == SOUTH_2 && (node.pos.y_0 += newSize.y_0 - oldSize.y_0); } } } lPadding = lgraph.padding; lgraph.size_0.x_0 = newSize.x_0 - lPadding.left - lPadding.right; lgraph.size_0.y_0 = newSize.y_0 - lPadding.top_0 - lPadding.bottom; } function ElkLayered(){ this.graphConfigurator = new GraphConfigurator; this.componentsProcessor = new ComponentsProcessor_0; this.compoundGraphPreprocessor = new CompoundGraphPreprocessor; $clinit_CompoundGraphPostprocessor(); } function lambda$0_17(parentCms_0, child_1){ var childCms; childCms = castTo($getProperty(child_1, ($clinit_LayeredOptions() , CROSSING_MINIMIZATION_STRATEGY_0)), 322); if (childCms != parentCms_0) { throw toJs(new UnsupportedGraphException('The hierarchy aware processor ' + childCms + ' in child node ' + child_1 + ' is only allowed if the root node specifies the same hierarchical processor.')); } } function lambda$1_4(rootType_0, g_1){ return $setProperty_0(g_1, ($clinit_LayeredOptions() , CROSSING_MINIMIZATION_GREEDY_SWITCH_HIERARCHICAL_TYPE_0), rootType_0); } defineClass(1192, 1, {}, ElkLayered); var Lorg_eclipse_elk_alg_layered_ElkLayered_2_classLit = createForClass('org.eclipse.elk.alg.layered', 'ElkLayered', 1192); function ElkLayered$lambda$0$Type(parentCms_0){ this.parentCms_0 = parentCms_0; } defineClass(1193, 1, $intern_19, ElkLayered$lambda$0$Type); _.accept = function accept_60(arg0){ lambda$0_17(this.parentCms_0, castTo(arg0, 36)); } ; var Lorg_eclipse_elk_alg_layered_ElkLayered$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered', 'ElkLayered/lambda$0$Type', 1193); function ElkLayered$lambda$1$Type(rootType_0){ this.rootType_0 = rootType_0; } defineClass(1194, 1, $intern_19, ElkLayered$lambda$1$Type); _.accept = function accept_61(arg0){ lambda$1_4(this.rootType_0, castTo(arg0, 36)); } ; var Lorg_eclipse_elk_alg_layered_ElkLayered$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered', 'ElkLayered/lambda$1$Type', 1194); function $clinit_GraphConfigurator(){ $clinit_GraphConfigurator = emptyMethod; BASELINE_PROCESSING_CONFIGURATION = $addAfter($addBefore($addBefore($addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P4_NODE_PLACEMENT), ($clinit_IntermediateProcessorStrategy() , INNERMOST_NODE_MARGIN_CALCULATOR)), P4_NODE_PLACEMENT, LABEL_AND_NODE_SIZE_PROCESSOR), P5_EDGE_ROUTING, LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR), P5_EDGE_ROUTING, END_LABEL_SORTER); LABEL_MANAGEMENT_ADDITIONS = $addBefore($addBefore(new LayoutProcessorConfiguration, P4_NODE_PLACEMENT, CENTER_LABEL_MANAGEMENT_PROCESSOR), P4_NODE_PLACEMENT, END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR); HIERARCHICAL_ADDITIONS = $addAfter(new LayoutProcessorConfiguration, P5_EDGE_ROUTING, HIERARCHICAL_NODE_RESIZER); } function $copyPortConstraints(this$static, node){ var nestedGraph, originalPortconstraints; originalPortconstraints = castTo($getProperty(node, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101); $setProperty_0(node, ($clinit_InternalProperties_1() , ORIGINAL_PORT_CONSTRAINTS), originalPortconstraints); nestedGraph = node.nestedGraph; !!nestedGraph && ($forEach_3(new StreamImpl(null, new Spliterators$IteratorSpliterator(nestedGraph.layerlessNodes, 16)), new GraphConfigurator$lambda$0$Type(this$static)) , $forEach_3($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(nestedGraph.layers, 16)), new GraphConfigurator$lambda$1$Type), new GraphConfigurator$lambda$2$Type(this$static))); } function $getPhaseIndependentLayoutProcessorConfiguration(lgraph){ var configuration, graphProperties, greedySwitchType, hierarchyHandling, internalGreedyType; graphProperties = castTo($getProperty(lgraph, ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21); configuration = createFrom_0(BASELINE_PROCESSING_CONFIGURATION); hierarchyHandling = castTo($getProperty(lgraph, ($clinit_LayeredOptions() , HIERARCHY_HANDLING)), 346); hierarchyHandling == ($clinit_HierarchyHandling() , INCLUDE_CHILDREN) && $addAll_6(configuration, HIERARCHICAL_ADDITIONS); $booleanValue(castToBoolean($getProperty(lgraph, FEEDBACK_EDGES_0)))?$addBefore(configuration, ($clinit_LayeredPhases() , P1_CYCLE_BREAKING), ($clinit_IntermediateProcessorStrategy() , PORT_SIDE_PROCESSOR)):$addBefore(configuration, ($clinit_LayeredPhases() , P3_NODE_ORDERING), ($clinit_IntermediateProcessorStrategy() , PORT_SIDE_PROCESSOR)); $getProperty(lgraph, ($clinit_LabelManagementOptions() , LABEL_MANAGER)) != null && $addAll_6(configuration, LABEL_MANAGEMENT_ADDITIONS); ($booleanValue(castToBoolean($getProperty(lgraph, INTERACTIVE_LAYOUT))) || $booleanValue(castToBoolean($getProperty(lgraph, GENERATE_POSITION_AND_LAYER_IDS_0)))) && $addAfter(configuration, ($clinit_LayeredPhases() , P5_EDGE_ROUTING), ($clinit_IntermediateProcessorStrategy() , CONSTRAINTS_POSTPROCESSOR)); switch (castTo($getProperty(lgraph, DIRECTION), 88).ordinal) { case 2: case 3: case 4: $addAfter($addBefore(configuration, ($clinit_LayeredPhases() , P1_CYCLE_BREAKING), ($clinit_IntermediateProcessorStrategy() , DIRECTION_PREPROCESSOR)), P5_EDGE_ROUTING, DIRECTION_POSTPROCESSOR); } graphProperties.contains(($clinit_GraphProperties() , COMMENTS)) && $addAfter($addBefore($addBefore(configuration, ($clinit_LayeredPhases() , P1_CYCLE_BREAKING), ($clinit_IntermediateProcessorStrategy() , COMMENT_PREPROCESSOR)), P4_NODE_PLACEMENT, COMMENT_NODE_MARGIN_CALCULATOR), P5_EDGE_ROUTING, COMMENT_POSTPROCESSOR); maskUndefined($getProperty(lgraph, LAYERING_NODE_PROMOTION_STRATEGY_0)) !== maskUndefined(($clinit_NodePromotionStrategy() , NONE_9)) && $addBefore(configuration, ($clinit_LayeredPhases() , P3_NODE_ORDERING), ($clinit_IntermediateProcessorStrategy() , NODE_PROMOTION)); if (graphProperties.contains(PARTITIONS)) { $addBefore(configuration, ($clinit_LayeredPhases() , P1_CYCLE_BREAKING), ($clinit_IntermediateProcessorStrategy() , PARTITION_PREPROCESSOR)); $addBefore(configuration, P2_LAYERING, PARTITION_MIDPROCESSOR); $addBefore(configuration, P3_NODE_ORDERING, PARTITION_POSTPROCESSOR); } maskUndefined($getProperty(lgraph, COMPACTION_POST_COMPACTION_STRATEGY_0)) !== maskUndefined(($clinit_GraphCompactionStrategy() , NONE_5)) && maskUndefined($getProperty(lgraph, EDGE_ROUTING)) !== maskUndefined(($clinit_EdgeRouting() , POLYLINE)) && $addAfter(configuration, ($clinit_LayeredPhases() , P5_EDGE_ROUTING), ($clinit_IntermediateProcessorStrategy() , HORIZONTAL_COMPACTOR)); $booleanValue(castToBoolean($getProperty(lgraph, HIGH_DEGREE_NODES_TREATMENT_0))) && $addBefore(configuration, ($clinit_LayeredPhases() , P3_NODE_ORDERING), ($clinit_IntermediateProcessorStrategy() , HIGH_DEGREE_NODE_LAYER_PROCESSOR)); $booleanValue(castToBoolean($getProperty(lgraph, CROSSING_MINIMIZATION_SEMI_INTERACTIVE_0))) && $addBefore(configuration, ($clinit_LayeredPhases() , P3_NODE_ORDERING), ($clinit_IntermediateProcessorStrategy() , SEMI_INTERACTIVE_CROSSMIN_PROCESSOR)); if (activateGreedySwitchFor(lgraph)) { maskUndefined($getProperty(lgraph, HIERARCHY_HANDLING)) === maskUndefined(INCLUDE_CHILDREN)?(greedySwitchType = castTo($getProperty(lgraph, CROSSING_MINIMIZATION_GREEDY_SWITCH_HIERARCHICAL_TYPE_0), 299)):(greedySwitchType = castTo($getProperty(lgraph, CROSSING_MINIMIZATION_GREEDY_SWITCH_TYPE_0), 299)); internalGreedyType = greedySwitchType == ($clinit_GreedySwitchType() , ONE_SIDED)?($clinit_IntermediateProcessorStrategy() , ONE_SIDED_GREEDY_SWITCH):($clinit_IntermediateProcessorStrategy() , TWO_SIDED_GREEDY_SWITCH); $addBefore(configuration, ($clinit_LayeredPhases() , P4_NODE_PLACEMENT), internalGreedyType); } switch (castTo($getProperty(lgraph, WRAPPING_STRATEGY_0), 388).ordinal) { case 1: $addBefore(configuration, ($clinit_LayeredPhases() , P4_NODE_PLACEMENT), ($clinit_IntermediateProcessorStrategy() , SINGLE_EDGE_GRAPH_WRAPPER)); break; case 2: $addAfter($addBefore($addBefore(configuration, ($clinit_LayeredPhases() , P3_NODE_ORDERING), ($clinit_IntermediateProcessorStrategy() , BREAKING_POINT_INSERTER)), P4_NODE_PLACEMENT, BREAKING_POINT_PROCESSOR), P5_EDGE_ROUTING, BREAKING_POINT_REMOVER); } maskUndefined($getProperty(lgraph, CONSIDER_MODEL_ORDER_STRATEGY_0)) !== maskUndefined(($clinit_OrderingStrategy() , NONE_10)) && $addBefore(configuration, ($clinit_LayeredPhases() , P3_NODE_ORDERING), ($clinit_IntermediateProcessorStrategy() , SORT_BY_INPUT_ORDER_OF_MODEL)); return configuration; } function $prepareGraphForLayout(this$static, lgraph){ var edgeSpacing, direction, randomSeed, favorStraightness, spacings; edgeSpacing = $doubleValue(castToDouble($getProperty(lgraph, ($clinit_LayeredOptions() , SPACING_EDGE_EDGE)))); edgeSpacing < 2 && $setProperty_0(lgraph, SPACING_EDGE_EDGE, 2); direction = castTo($getProperty(lgraph, DIRECTION), 88); direction == ($clinit_Direction_0() , UNDEFINED_2) && $setProperty_0(lgraph, DIRECTION, getDirection_1(lgraph)); randomSeed = castTo($getProperty(lgraph, RANDOM_SEED_0), 17); randomSeed.value_0 == 0?$setProperty_0(lgraph, ($clinit_InternalProperties_1() , RANDOM_0), new Random):$setProperty_0(lgraph, ($clinit_InternalProperties_1() , RANDOM_0), new Random_0(randomSeed.value_0)); favorStraightness = castToBoolean($getProperty(lgraph, NODE_PLACEMENT_FAVOR_STRAIGHT_EDGES_0)); favorStraightness == null && $setProperty_0(lgraph, NODE_PLACEMENT_FAVOR_STRAIGHT_EDGES_0, ($clinit_Boolean() , maskUndefined($getProperty(lgraph, EDGE_ROUTING)) === maskUndefined(($clinit_EdgeRouting() , ORTHOGONAL))?true:false)); $forEach_3(new StreamImpl(null, new Spliterators$IteratorSpliterator(lgraph.layerlessNodes, 16)), new GraphConfigurator$lambda$0$Type(this$static)); $forEach_3($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(lgraph.layers, 16)), new GraphConfigurator$lambda$1$Type), new GraphConfigurator$lambda$2$Type(this$static)); spacings = new Spacings(lgraph); $setProperty_0(lgraph, ($clinit_InternalProperties_1() , SPACINGS), spacings); $reset_4(this$static.algorithmAssembler); $setPhase(this$static.algorithmAssembler, ($clinit_LayeredPhases() , P1_CYCLE_BREAKING), castTo($getProperty(lgraph, CYCLE_BREAKING_STRATEGY_0), 188)); $setPhase(this$static.algorithmAssembler, P2_LAYERING, castTo($getProperty(lgraph, LAYERING_STRATEGY_0), 188)); $setPhase(this$static.algorithmAssembler, P3_NODE_ORDERING, castTo($getProperty(lgraph, CROSSING_MINIMIZATION_STRATEGY_0), 188)); $setPhase(this$static.algorithmAssembler, P4_NODE_PLACEMENT, castTo($getProperty(lgraph, NODE_PLACEMENT_STRATEGY_0), 188)); $setPhase(this$static.algorithmAssembler, P5_EDGE_ROUTING, factoryFor(castTo($getProperty(lgraph, EDGE_ROUTING), 223))); $addProcessorConfiguration(this$static.algorithmAssembler, $getPhaseIndependentLayoutProcessorConfiguration(lgraph)); $setProperty_0(lgraph, PROCESSORS, $build_0(this$static.algorithmAssembler, lgraph)); } function GraphConfigurator(){ $clinit_GraphConfigurator(); this.algorithmAssembler = new AlgorithmAssembler(Lorg_eclipse_elk_alg_layered_LayeredPhases_2_classLit); } function activateGreedySwitchFor(lgraph){ var activationThreshold, graphSize, greedySwitchType, interactiveCrossMin; if (maskUndefined($getProperty(lgraph, ($clinit_LayeredOptions() , HIERARCHY_HANDLING))) === maskUndefined(($clinit_HierarchyHandling() , INCLUDE_CHILDREN))) { return !lgraph.parentNode && maskUndefined($getProperty(lgraph, CROSSING_MINIMIZATION_GREEDY_SWITCH_HIERARCHICAL_TYPE_0)) !== maskUndefined(($clinit_GreedySwitchType() , OFF)); } greedySwitchType = castTo($getProperty(lgraph, CROSSING_MINIMIZATION_GREEDY_SWITCH_TYPE_0), 299); interactiveCrossMin = $booleanValue(castToBoolean($getProperty(lgraph, CROSSING_MINIMIZATION_SEMI_INTERACTIVE_0))) || maskUndefined($getProperty(lgraph, CROSSING_MINIMIZATION_STRATEGY_0)) === maskUndefined(($clinit_CrossingMinimizationStrategy() , INTERACTIVE_1)); activationThreshold = castTo($getProperty(lgraph, CROSSING_MINIMIZATION_GREEDY_SWITCH_ACTIVATION_THRESHOLD_0), 17).value_0; graphSize = lgraph.layerlessNodes.array.length; return !interactiveCrossMin && greedySwitchType != ($clinit_GreedySwitchType() , OFF) && (activationThreshold == 0 || activationThreshold > graphSize); } defineClass(1281, 1, {}, GraphConfigurator); var BASELINE_PROCESSING_CONFIGURATION, HIERARCHICAL_ADDITIONS, LABEL_MANAGEMENT_ADDITIONS; var Lorg_eclipse_elk_alg_layered_GraphConfigurator_2_classLit = createForClass('org.eclipse.elk.alg.layered', 'GraphConfigurator', 1281); function GraphConfigurator$lambda$0$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(770, 1, $intern_19, GraphConfigurator$lambda$0$Type); _.accept = function accept_62(arg0){ $copyPortConstraints(this.$$outer_0, castTo(arg0, 10)); } ; var Lorg_eclipse_elk_alg_layered_GraphConfigurator$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered', 'GraphConfigurator/lambda$0$Type', 770); function GraphConfigurator$lambda$1$Type(){ } defineClass(771, 1, {}, GraphConfigurator$lambda$1$Type); _.apply_0 = function apply_57(arg0){ return $clinit_GraphConfigurator() , new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 30).nodes, 16)); } ; var Lorg_eclipse_elk_alg_layered_GraphConfigurator$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered', 'GraphConfigurator/lambda$1$Type', 771); function GraphConfigurator$lambda$2$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(772, 1, $intern_19, GraphConfigurator$lambda$2$Type); _.accept = function accept_63(arg0){ $copyPortConstraints(this.$$outer_0, castTo(arg0, 10)); } ; var Lorg_eclipse_elk_alg_layered_GraphConfigurator$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered', 'GraphConfigurator/lambda$2$Type', 772); function LayeredLayoutProvider(){ this.elkLayered = new ElkLayered; } defineClass(1109, 205, $intern_96, LayeredLayoutProvider); _.layout = function layout_2(elkgraph, progressMonitor){ var layeredGraph; layeredGraph = $importGraph_1(new ElkGraphImporter, elkgraph); maskUndefined($getProperty_0(elkgraph, ($clinit_LayeredOptions() , HIERARCHY_HANDLING))) === maskUndefined(($clinit_HierarchyHandling() , INCLUDE_CHILDREN))?$doCompoundLayout(this.elkLayered, layeredGraph, progressMonitor):$doLayout(this.elkLayered, layeredGraph, progressMonitor); progressMonitor.isCanceled() || $applyLayout_2(new ElkGraphLayoutTransferrer, layeredGraph); } ; var Lorg_eclipse_elk_alg_layered_LayeredLayoutProvider_2_classLit = createForClass('org.eclipse.elk.alg.layered', 'LayeredLayoutProvider', 1109); function $clinit_LayeredPhases(){ $clinit_LayeredPhases = emptyMethod; P1_CYCLE_BREAKING = new LayeredPhases('P1_CYCLE_BREAKING', 0); P2_LAYERING = new LayeredPhases('P2_LAYERING', 1); P3_NODE_ORDERING = new LayeredPhases('P3_NODE_ORDERING', 2); P4_NODE_PLACEMENT = new LayeredPhases('P4_NODE_PLACEMENT', 3); P5_EDGE_ROUTING = new LayeredPhases('P5_EDGE_ROUTING', 4); } function LayeredPhases(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_25(name_0){ $clinit_LayeredPhases(); return valueOf(($clinit_LayeredPhases$Map() , $MAP_15), name_0); } function values_33(){ $clinit_LayeredPhases(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_LayeredPhases_2_classLit, 1), $intern_37, 367, 0, [P1_CYCLE_BREAKING, P2_LAYERING, P3_NODE_ORDERING, P4_NODE_PLACEMENT, P5_EDGE_ROUTING]); } defineClass(367, 22, {3:1, 34:1, 22:1, 367:1}, LayeredPhases); var P1_CYCLE_BREAKING, P2_LAYERING, P3_NODE_ORDERING, P4_NODE_PLACEMENT, P5_EDGE_ROUTING; var Lorg_eclipse_elk_alg_layered_LayeredPhases_2_classLit = createForEnum('org.eclipse.elk.alg.layered', 'LayeredPhases', 367, Ljava_lang_Enum_2_classLit, values_33, valueOf_25); function $clinit_LayeredPhases$Map(){ $clinit_LayeredPhases$Map = emptyMethod; $MAP_15 = createValueOfMap(($clinit_LayeredPhases() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_LayeredPhases_2_classLit, 1), $intern_37, 367, 0, [P1_CYCLE_BREAKING, P2_LAYERING, P3_NODE_ORDERING, P4_NODE_PLACEMENT, P5_EDGE_ROUTING]))); } var $MAP_15; function $clinit_ComponentsToCGraphTransformer(){ $clinit_ComponentsToCGraphTransformer = emptyMethod; SPACING_HANDLER = new ComponentsToCGraphTransformer$1; } function $applyLayout_1(this$static){ var bottomRight, cNode, cNode$iterator, n, n$iterator, placeholder, placeholder$iterator, topLeft; for (n$iterator = new ArrayList$1(this$static.cGraph.cNodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 86); n.rect.x_0 = n.hitbox.x_0; n.rect.y_0 = n.hitbox.y_0; } topLeft = new KVector_1($intern_60, $intern_60); bottomRight = new KVector_1($intern_61, $intern_61); for (cNode$iterator = new ArrayList$1(this$static.cGraph.cNodes); cNode$iterator.i < cNode$iterator.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator), 86); topLeft.x_0 = $wnd.Math.min(topLeft.x_0, cNode.hitbox.x_0); topLeft.y_0 = $wnd.Math.min(topLeft.y_0, cNode.hitbox.y_0); bottomRight.x_0 = $wnd.Math.max(bottomRight.x_0, cNode.hitbox.x_0 + cNode.hitbox.width_0); bottomRight.y_0 = $wnd.Math.max(bottomRight.y_0, cNode.hitbox.y_0 + cNode.hitbox.height); } for (placeholder$iterator = $values(this$static.externalPlaceholder).this$01.valueIterator_0(); placeholder$iterator.hasNext_0();) { placeholder = castTo(placeholder$iterator.next_1(), 42); cNode = castTo(placeholder.second, 86); topLeft.x_0 = $wnd.Math.min(topLeft.x_0, cNode.hitbox.x_0); topLeft.y_0 = $wnd.Math.min(topLeft.y_0, cNode.hitbox.y_0); bottomRight.x_0 = $wnd.Math.max(bottomRight.x_0, cNode.hitbox.x_0 + cNode.hitbox.width_0); bottomRight.y_0 = $wnd.Math.max(bottomRight.y_0, cNode.hitbox.y_0 + cNode.hitbox.height); } this$static.globalOffset = $negate_0(new KVector_1(topLeft.x_0, topLeft.y_0)); this$static.graphSize = $sub_0(new KVector_1(bottomRight.x_0, bottomRight.y_0), topLeft); this$static.cGraph.cGroups.array.length = 0; this$static.cGraph.cNodes.array.length = 0; } function $getOffset(this$static, c){ var cOffset; cOffset = $sub_0($clone_1(castTo($get_10(this$static.oldPosition, c), 8)), $getPosition(castTo($get_10(this$static.offsets, c), 470).rect)); return cOffset; } function $setLock(cNode, portSides){ portSides.isEmpty() && $set_5(cNode.lock, true, true, true, true); equals_Ljava_lang_Object__Z__devirtual$(portSides, ($clinit_PortSide() , SIDES_NORTH)) && $set_5(cNode.lock, true, true, true, false); equals_Ljava_lang_Object__Z__devirtual$(portSides, SIDES_EAST) && $set_5(cNode.lock, false, true, true, true); equals_Ljava_lang_Object__Z__devirtual$(portSides, SIDES_SOUTH) && $set_5(cNode.lock, true, true, false, true); equals_Ljava_lang_Object__Z__devirtual$(portSides, SIDES_WEST) && $set_5(cNode.lock, true, false, true, true); equals_Ljava_lang_Object__Z__devirtual$(portSides, SIDES_NORTH_EAST) && $set_5(cNode.lock, false, true, true, false); equals_Ljava_lang_Object__Z__devirtual$(portSides, SIDES_EAST_SOUTH) && $set_5(cNode.lock, false, true, false, true); equals_Ljava_lang_Object__Z__devirtual$(portSides, SIDES_SOUTH_WEST) && $set_5(cNode.lock, true, false, false, true); equals_Ljava_lang_Object__Z__devirtual$(portSides, SIDES_NORTH_WEST) && $set_5(cNode.lock, true, false, true, false); equals_Ljava_lang_Object__Z__devirtual$(portSides, SIDES_NORTH_SOUTH) && $set_5(cNode.lock, true, true, true, true); equals_Ljava_lang_Object__Z__devirtual$(portSides, SIDES_EAST_WEST) && $set_5(cNode.lock, true, true, true, true); equals_Ljava_lang_Object__Z__devirtual$(portSides, SIDES_NORTH_SOUTH) && $set_5(cNode.lock, true, true, true, true); equals_Ljava_lang_Object__Z__devirtual$(portSides, SIDES_EAST_SOUTH_WEST) && $set_5(cNode.lock, true, true, true, true); equals_Ljava_lang_Object__Z__devirtual$(portSides, SIDES_NORTH_SOUTH_WEST) && $set_5(cNode.lock, true, true, true, true); equals_Ljava_lang_Object__Z__devirtual$(portSides, SIDES_NORTH_EAST_WEST) && $set_5(cNode.lock, true, true, true, true); equals_Ljava_lang_Object__Z__devirtual$(portSides, SIDES_NORTH_EAST_SOUTH_WEST) && $set_5(cNode.lock, true, true, true, true); } function $transform_0(this$static, ccs){ var comp, comp$iterator, dummyGroup, ee, ee$iterator, group, rect, rect$iterator, rectNode, rectPlaceholder; this$static.cGraph = new CGraph_0(allOf(Lorg_eclipse_elk_core_options_Direction_2_classLit)); for (comp$iterator = new ArrayList$1(ccs.components); comp$iterator.i < comp$iterator.this$01.array.length;) { comp = castTo($next_6(comp$iterator), 855); group = new CGroup_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_compaction_oned_CNode_2_classLit, 1), $intern_2, 86, 0, [])); $add_3(this$static.cGraph.cGroups, group); for (rect$iterator = new ArrayList$1(comp.rectilinearConvexHull); rect$iterator.i < rect$iterator.this$01.array.length;) { rect = castTo($next_6(rect$iterator), 116); rectNode = new ComponentsToCGraphTransformer$CRectNode(this$static, rect); $setLock(rectNode, castTo($getProperty(comp.graph_0, ($clinit_InternalProperties_1() , EXT_PORT_CONNECTIONS)), 21)); if (!$containsKey_3(this$static.oldPosition, comp)) { $put_6(this$static.oldPosition, comp, new KVector_1(rect.x_0, rect.y_0)); $put_6(this$static.offsets, comp, rectNode); } $add_3(this$static.cGraph.cNodes, rectNode); $addCNode_0(group, rectNode); } for (ee$iterator = new ArrayList$1(comp.externalExtensions); ee$iterator.i < ee$iterator.this$01.array.length;) { ee = castTo($next_6(ee$iterator), 602); rectNode = new ComponentsToCGraphTransformer$CRectNode(this$static, ee.getRepresentor()); $put_6(this$static.externalExtensions, ee, new Pair(group, rectNode)); $setLock(rectNode, castTo($getProperty(comp.graph_0, ($clinit_InternalProperties_1() , EXT_PORT_CONNECTIONS)), 21)); if (ee.getPlaceholder()) { rectPlaceholder = new ComponentsToCGraphTransformer$CRectNode_0(this$static, ee.getPlaceholder(), 1); $setLock(rectPlaceholder, castTo($getProperty(comp.graph_0, EXT_PORT_CONNECTIONS), 21)); dummyGroup = new CGroup_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_compaction_oned_CNode_2_classLit, 1), $intern_2, 86, 0, [])); $addCNode_0(dummyGroup, rectPlaceholder); $put(this$static.externalPlaceholder, ee.getDirection(), new Pair(group, rectPlaceholder)); } } } return this$static.cGraph; } function ComponentsToCGraphTransformer(spacing){ $clinit_ComponentsToCGraphTransformer(); this.oldPosition = new HashMap; this.offsets = new HashMap; this.externalExtensions = new HashMap; this.externalPlaceholder = new HashMultimap; this.spacing = spacing; } defineClass(1717, 1, {}, ComponentsToCGraphTransformer); _.spacing = 0; var SPACING_HANDLER; var Lorg_eclipse_elk_alg_layered_compaction_components_ComponentsToCGraphTransformer_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.components', 'ComponentsToCGraphTransformer', 1717); function $clinit_ISpacingsHandler_0(){ $clinit_ISpacingsHandler_0 = emptyMethod; DEFAULT_SPACING_HANDLER_0 = new ISpacingsHandler$1_0; } var DEFAULT_SPACING_HANDLER_0; function ComponentsToCGraphTransformer$1(){ } defineClass(1718, 1, {}, ComponentsToCGraphTransformer$1); _.getHorizontalSpacing_0 = function getHorizontalSpacing_0(cNode1, cNode2){ return $wnd.Math.min(cNode1.individualSpacing != null?$doubleValue(cNode1.individualSpacing):cNode1.this$01.spacing, cNode2.individualSpacing != null?$doubleValue(cNode2.individualSpacing):cNode2.this$01.spacing); } ; _.getVerticalSpacing_0 = function getVerticalSpacing_0(cNode1, cNode2){ return $wnd.Math.min(cNode1.individualSpacing != null?$doubleValue(cNode1.individualSpacing):cNode1.this$01.spacing, cNode2.individualSpacing != null?$doubleValue(cNode2.individualSpacing):cNode2.this$01.spacing); } ; var Lorg_eclipse_elk_alg_layered_compaction_components_ComponentsToCGraphTransformer$1_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.components', 'ComponentsToCGraphTransformer/1', 1718); defineClass(86, 1, {86:1}); _.id_0 = 0; _.reposition = true; _.startPos = $intern_61; var Lorg_eclipse_elk_alg_layered_compaction_oned_CNode_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.oned', 'CNode', 86); function ComponentsToCGraphTransformer$CRectNode(this$0, rect){ ComponentsToCGraphTransformer$CRectNode_0.call(this, this$0, rect, null); } function ComponentsToCGraphTransformer$CRectNode_0(this$0, rect, spacing){ this.this$01 = this$0; this.constraints = new ArrayList; this.cGroupOffset = new KVector; this.lock = new Quadruplet_0; this.spacingIgnore = new Quadruplet_0; this.rect = rect; this.hitbox = new ElkRectangle_0(rect.x_0, rect.y_0, rect.width_0, rect.height); this.individualSpacing = spacing; } defineClass(470, 86, {470:1, 86:1}, ComponentsToCGraphTransformer$CRectNode, ComponentsToCGraphTransformer$CRectNode_0); _.toString_0 = function toString_84(){ return ''; } ; var Lorg_eclipse_elk_alg_layered_compaction_components_ComponentsToCGraphTransformer$CRectNode_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.components', 'ComponentsToCGraphTransformer/CRectNode', 470); function $clinit_OneDimensionalComponentsCompaction(){ $clinit_OneDimensionalComponentsCompaction = emptyMethod; LEFT_RIGHT = newHashSet_1(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_Direction_2_classLit, 1), $intern_37, 88, 0, [($clinit_Direction_0() , LEFT_6), RIGHT_6])); UP_DOWN = newHashSet_1(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_Direction_2_classLit, 1), $intern_37, 88, 0, [UP_1, DOWN_1])); } function $addExternalEdgeRepresentations(this$static, ees){ var p, p$iterator; for (p$iterator = new ArrayList$1(ees); p$iterator.i < p$iterator.this$01.array.length;) { p = castTo($next_6(p$iterator), 42); $add_3(this$static.compactionGraph.cNodes, castTo(p.second, 86)); $addCNode_0(castTo(p.first, 194), castTo(p.second, 86)); } } function $addPlaceholders(this$static, dir_0){ var d, d$iterator, dirs, pair, pair$iterator; dirs = dir_0 == 1?UP_DOWN:LEFT_RIGHT; for (d$iterator = dirs.map_0.keySet_0().iterator_0(); d$iterator.hasNext_0();) { d = castTo(d$iterator.next_1(), 88); for (pair$iterator = castTo($get(this$static.transformer.externalPlaceholder, d), 21).iterator_0(); pair$iterator.hasNext_0();) { pair = castTo(pair$iterator.next_1(), 42); $add_3(this$static.compactionGraph.cNodes, castTo(pair.second, 86)); $add_3(this$static.compactionGraph.cGroups, castTo(pair.second, 86).cGroup); } } } function $compact_1(this$static){ var delta, direction, g, g$iterator, g$iterator0, g$iterator1, g$iterator2; delta = 0; for (g$iterator0 = new ArrayList$1(this$static.compactionGraph.cGroups); g$iterator0.i < g$iterator0.this$01.array.length;) { g = castTo($next_6(g$iterator0), 194); g.delta = 0; g.deltaNormalized = 0; } $addPlaceholders(this$static, 0); $addExternalEdgeRepresentations(this$static, this$static.verticalExternalExtensions); $calculateGroupOffsets_0(this$static.compactor); $forceConstraintsRecalculation(this$static.compactor); direction = ($clinit_Direction_0() , LEFT_6); $compact_3($applyLockingStrategy($changeDirection_0($compact_3($applyLockingStrategy($changeDirection_0($compact_3($changeDirection_0(this$static.compactor, direction)), $opposite(direction)))), direction))); $changeDirection_0(this$static.compactor, LEFT_6); $removeExternalEdgeRepresentations(this$static, this$static.verticalExternalExtensions); $removePlaceholders(this$static, 0); $updateExternalExtensionDimensions(this$static, 0); $updatePlaceholders(this$static, 1); $addPlaceholders(this$static, 1); $addExternalEdgeRepresentations(this$static, this$static.horizontalExternalExtensions); $calculateGroupOffsets_0(this$static.compactor); for (g$iterator1 = new ArrayList$1(this$static.compactionGraph.cGroups); g$iterator1.i < g$iterator1.this$01.array.length;) { g = castTo($next_6(g$iterator1), 194); delta += $wnd.Math.abs(g.deltaNormalized); } for (g$iterator2 = new ArrayList$1(this$static.compactionGraph.cGroups); g$iterator2.i < g$iterator2.this$01.array.length;) { g = castTo($next_6(g$iterator2), 194); g.delta = 0; g.deltaNormalized = 0; } direction = UP_1; $compact_3($applyLockingStrategy($changeDirection_0($compact_3($applyLockingStrategy($changeDirection_0($compact_3($forceConstraintsRecalculation($changeDirection_0(this$static.compactor, direction))), $opposite(direction)))), direction))); $changeDirection_0(this$static.compactor, LEFT_6); $removeExternalEdgeRepresentations(this$static, this$static.horizontalExternalExtensions); $removePlaceholders(this$static, 1); $updateExternalExtensionDimensions(this$static, 1); $updatePlaceholders(this$static, 0); $forceConstraintsRecalculation(this$static.compactor); for (g$iterator = new ArrayList$1(this$static.compactionGraph.cGroups); g$iterator.i < g$iterator.this$01.array.length;) { g = castTo($next_6(g$iterator), 194); delta += $wnd.Math.abs(g.deltaNormalized); } return delta; } function $compact_2(this$static){ var allNodes, cNode, cNode$iterator, delta, entry, entry$iterator, run; allNodes = new ArrayList; this$static.verticalExternalExtensions = new ArrayList; this$static.horizontalExternalExtensions = new ArrayList; for (entry$iterator = new AbstractHashMap$EntrySetIterator((new AbstractHashMap$EntrySet(this$static.transformer.externalExtensions)).this$01); entry$iterator.hasNext;) { entry = $next_3(entry$iterator); $add_3(allNodes, castTo(castTo(entry.getValue(), 42).second, 86)); $isHorizontal(castTo(entry.getKey(), 602).getDirection())?$add_3(this$static.horizontalExternalExtensions, castTo(entry.getValue(), 42)):$add_3(this$static.verticalExternalExtensions, castTo(entry.getValue(), 42)); } $addExternalEdgeRepresentations(this$static, this$static.horizontalExternalExtensions); $addExternalEdgeRepresentations(this$static, this$static.verticalExternalExtensions); this$static.compactor = new OneDimensionalCompactor_0(this$static.compactionGraph); $setSpacingsHandler_0(this$static.compactor, ($clinit_ComponentsToCGraphTransformer() , SPACING_HANDLER)); $removeExternalEdgeRepresentations(this$static, this$static.horizontalExternalExtensions); $removeExternalEdgeRepresentations(this$static, this$static.verticalExternalExtensions); $addAll_2(allNodes, this$static.compactor.cGraph.cNodes); this$static.topLeft = new KVector_1($intern_60, $intern_60); this$static.bottomRight = new KVector_1($intern_61, $intern_61); for (cNode$iterator = new ArrayList$1(allNodes); cNode$iterator.i < cNode$iterator.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator), 86); this$static.topLeft.x_0 = $wnd.Math.min(this$static.topLeft.x_0, cNode.hitbox.x_0); this$static.topLeft.y_0 = $wnd.Math.min(this$static.topLeft.y_0, cNode.hitbox.y_0); this$static.bottomRight.x_0 = $wnd.Math.max(this$static.bottomRight.x_0, cNode.hitbox.x_0 + cNode.hitbox.width_0); this$static.bottomRight.y_0 = $wnd.Math.max(this$static.bottomRight.y_0, cNode.hitbox.y_0 + cNode.hitbox.height); } $setLockingStrategy(this$static.compactor, new OneDimensionalComponentsCompaction$lambda$0$Type); run = 0; do { delta = $compact_1(this$static); ++run; } while ((run < 2 || delta > $intern_42) && run < 10); $setLockingStrategy(this$static.compactor, new OneDimensionalComponentsCompaction$lambda$1$Type); $compact_1(this$static); $finish(this$static.compactor); $applyLayout_1(this$static.transformer); } function $getOffset_0(this$static, c){ var individual; individual = $getOffset(this$static.transformer, c); return $add_19($negate_0(individual), this$static.transformer.globalOffset); } function $removeExternalEdgeRepresentations(this$static, ees){ var p, p$iterator; for (p$iterator = new ArrayList$1(ees); p$iterator.i < p$iterator.this$01.array.length;) { p = castTo($next_6(p$iterator), 42); $remove_12(this$static.compactionGraph.cNodes, p.second); $removeCNode(castTo(p.first, 194), castTo(p.second, 86)); } } function $removePlaceholders(this$static, dir_0){ var d, d$iterator, dirs, pair, pair$iterator; dirs = dir_0 == 1?UP_DOWN:LEFT_RIGHT; for (d$iterator = dirs.map_0.keySet_0().iterator_0(); d$iterator.hasNext_0();) { d = castTo(d$iterator.next_1(), 88); for (pair$iterator = castTo($get(this$static.transformer.externalPlaceholder, d), 21).iterator_0(); pair$iterator.hasNext_0();) { pair = castTo(pair$iterator.next_1(), 42); $remove_12(this$static.compactionGraph.cNodes, pair.second); $remove_12(this$static.compactionGraph.cGroups, castTo(pair.second, 86).cGroup); } } } function $updateExternalExtensionDimensions(this$static, dir_0){ var adelta, cNode, ee, entry, entry$iterator, group; for (entry$iterator = new AbstractHashMap$EntrySetIterator((new AbstractHashMap$EntrySet(this$static.transformer.externalExtensions)).this$01); entry$iterator.hasNext;) { entry = $next_3(entry$iterator); ee = castTo(entry.getKey(), 602); if (dir_0 == 1) { if (ee.getDirection() != ($clinit_Direction_0() , UP_1) && ee.getDirection() != DOWN_1) { continue; } } else { if (ee.getDirection() != ($clinit_Direction_0() , LEFT_6) && ee.getDirection() != RIGHT_6) { continue; } } cNode = castTo(castTo(entry.getValue(), 42).second, 86); group = castTo(castTo(entry.getValue(), 42).first, 194); adelta = group.deltaNormalized; switch (ee.getDirection().ordinal) { case 2: cNode.hitbox.x_0 = this$static.topLeft.x_0; cNode.hitbox.width_0 = $wnd.Math.max(1, cNode.hitbox.width_0 + adelta); break; case 1: cNode.hitbox.x_0 = cNode.hitbox.x_0 + adelta; cNode.hitbox.width_0 = $wnd.Math.max(1, cNode.hitbox.width_0 - adelta); break; case 4: cNode.hitbox.y_0 = this$static.topLeft.y_0; cNode.hitbox.height = $wnd.Math.max(1, cNode.hitbox.height + adelta); break; case 3: cNode.hitbox.y_0 = cNode.hitbox.y_0 + adelta; cNode.hitbox.height = $wnd.Math.max(1, cNode.hitbox.height - adelta); } } } function $updatePlaceholders(this$static, dir_0){ var adelta, cNode, d, d$iterator, dirs, pair, pair$iterator, parentComponentGroup; dirs = dir_0 == 1?UP_DOWN:LEFT_RIGHT; for (d$iterator = dirs.map_0.keySet_0().iterator_0(); d$iterator.hasNext_0();) { d = castTo(d$iterator.next_1(), 88); for (pair$iterator = castTo($get(this$static.transformer.externalPlaceholder, d), 21).iterator_0(); pair$iterator.hasNext_0();) { pair = castTo(pair$iterator.next_1(), 42); cNode = castTo(pair.second, 86); parentComponentGroup = castTo(pair.first, 194); adelta = parentComponentGroup.deltaNormalized; switch (d.ordinal) { case 2: case 1: cNode.hitbox.y_0 += adelta; break; case 4: case 3: cNode.hitbox.x_0 += adelta; } } } } function OneDimensionalComponentsCompaction(){ } function lambda$0_18(pair_0){ $clinit_OneDimensionalComponentsCompaction(); return $clinit_Boolean() , castTo(pair_0.first, 86).cGroup.outDegree != 0?true:false; } function lambda$1_5(pair_0){ $clinit_OneDimensionalComponentsCompaction(); return $clinit_Boolean() , $get_19(castTo(pair_0.first, 86).lock, castTo(pair_0.second, 88)) || castTo(pair_0.first, 86).cGroup.outDegree != 0 && $get_19(castTo(pair_0.first, 86).lock, castTo(pair_0.second, 88))?true:false; } defineClass(1688, 1, {}, OneDimensionalComponentsCompaction); var LEFT_RIGHT, UP_DOWN; var Lorg_eclipse_elk_alg_layered_compaction_components_OneDimensionalComponentsCompaction_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.components', 'OneDimensionalComponentsCompaction', 1688); function OneDimensionalComponentsCompaction$lambda$0$Type(){ } defineClass(1689, 1, {}, OneDimensionalComponentsCompaction$lambda$0$Type); _.apply_0 = function apply_58(arg0){ return lambda$0_18(castTo(arg0, 42)); } ; _.equals_0 = function equals_82(other){ return this === other; } ; var Lorg_eclipse_elk_alg_layered_compaction_components_OneDimensionalComponentsCompaction$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.components', 'OneDimensionalComponentsCompaction/lambda$0$Type', 1689); function OneDimensionalComponentsCompaction$lambda$1$Type(){ } defineClass(1690, 1, {}, OneDimensionalComponentsCompaction$lambda$1$Type); _.apply_0 = function apply_59(arg0){ return lambda$1_5(castTo(arg0, 42)); } ; _.equals_0 = function equals_83(other){ return this === other; } ; var Lorg_eclipse_elk_alg_layered_compaction_components_OneDimensionalComponentsCompaction$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.components', 'OneDimensionalComponentsCompaction/lambda$1$Type', 1690); function $supports_0(this$static, direction){ return $containsEnum(this$static.supportedDirections, direction); } function CGraph_0(supportedDirections){ this.cNodes = new ArrayList; this.cGroups = new ArrayList; this.supportedDirections = supportedDirections; } defineClass(1720, 1, {}, CGraph_0); var Lorg_eclipse_elk_alg_layered_compaction_oned_CGraph_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.oned', 'CGraph', 1720); function $addCNode_0(this$static, cNode){ $add_6(this$static.cNodes, cNode); if (cNode.cGroup) { throw toJs(new RuntimeException_0('CNode belongs to another CGroup.')); } cNode.cGroup = this$static; } function $removeCNode(this$static, cNode){ var removed; removed = $remove_18(this$static.cNodes, cNode); removed && (cNode.cGroup = null); return removed; } function CGroup_0(inputCNodes){ var cNode, cNode$array, cNode$index, cNode$max; this.cNodes = new LinkedHashSet; this.incomingConstraints = new HashSet; this.outDegree = 0; for (cNode$array = inputCNodes , cNode$index = 0 , cNode$max = cNode$array.length; cNode$index < cNode$max; ++cNode$index) { cNode = cNode$array[cNode$index]; !this.reference && (this.reference = cNode); $addCNode_0(this, cNode); } } defineClass(194, 1, {194:1}, CGroup_0); _.delta = 0; _.deltaNormalized = 0; _.outDegree = 0; _.reposition = true; _.startPos = $intern_61; var Lorg_eclipse_elk_alg_layered_compaction_oned_CGroup_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.oned', 'CGroup', 194); function ISpacingsHandler$1_0(){ } defineClass(1719, 1, {}, ISpacingsHandler$1_0); _.getHorizontalSpacing_0 = function getHorizontalSpacing_1(cNode1, cNode2){ return $wnd.Math.max(cNode1.individualSpacing != null?$doubleValue(cNode1.individualSpacing):cNode1.this$01.spacing, cNode2.individualSpacing != null?$doubleValue(cNode2.individualSpacing):cNode2.this$01.spacing); } ; _.getVerticalSpacing_0 = function getVerticalSpacing_1(cNode1, cNode2){ return $wnd.Math.max(cNode1.individualSpacing != null?$doubleValue(cNode1.individualSpacing):cNode1.this$01.spacing, cNode2.individualSpacing != null?$doubleValue(cNode2.individualSpacing):cNode2.this$01.spacing); } ; var Lorg_eclipse_elk_alg_layered_compaction_oned_ISpacingsHandler$1_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.oned', 'ISpacingsHandler/1', 1719); function $clinit_OneDimensionalCompactor_0(){ $clinit_OneDimensionalCompactor_0 = emptyMethod; SCANLINE_CONSTRAINTS_0 = new ScanlineConstraintCalculator_0; } function $applyLockingStrategy(this$static){ $applyLockingStrategy_0(this$static, this$static.direction); return this$static; } function $applyLockingStrategy_0(this$static, dir_0){ var cGroup, cGroup$iterator, cNode, cNode$iterator; for (cGroup$iterator = new ArrayList$1(this$static.cGraph.cGroups); cGroup$iterator.i < cGroup$iterator.this$01.array.length;) { cGroup = castTo($next_6(cGroup$iterator), 194); cGroup.reposition = true; } for (cNode$iterator = new ArrayList$1(this$static.cGraph.cNodes); cNode$iterator.i < cNode$iterator.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator), 86); cNode.reposition = $booleanValue(castToBoolean(this$static.lockingStrategy.apply_0(new Pair(cNode, dir_0)))); cNode.cGroup.reposition = cNode.cGroup.reposition & $booleanValue(castToBoolean(this$static.lockingStrategy.apply_0(new Pair(cNode, dir_0)))); } return this$static; } function $calculateConstraints_0(this$static){ var cNode, cNode$iterator; for (cNode$iterator = new ArrayList$1(this$static.cGraph.cNodes); cNode$iterator.i < cNode$iterator.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator), 86); cNode.constraints.clear_0(); } $calculateConstraints_1(this$static.constraintAlgorithm, this$static); $calculateConstraintsForCGroups_0(this$static); } function $calculateConstraintsForCGroups_0(this$static){ var cNode, cNode$iterator, group, group$iterator, group$iterator0, inc, inc$iterator; for (group$iterator0 = new ArrayList$1(this$static.cGraph.cGroups); group$iterator0.i < group$iterator0.this$01.array.length;) { group = castTo($next_6(group$iterator0), 194); group.outDegree = 0; group.incomingConstraints.map_0.clear_0(); } for (group$iterator = new ArrayList$1(this$static.cGraph.cGroups); group$iterator.i < group$iterator.this$01.array.length;) { group = castTo($next_6(group$iterator), 194); for (cNode$iterator = group.cNodes.map_0.keySet_0().iterator_0(); cNode$iterator.hasNext_0();) { cNode = castTo(cNode$iterator.next_1(), 86); for (inc$iterator = cNode.constraints.iterator_0(); inc$iterator.hasNext_0();) { inc = castTo(inc$iterator.next_1(), 86); if (inc.cGroup != group) { $add_6(group.incomingConstraints, inc); ++inc.cGroup.outDegree; } } } } } function $calculateGroupOffsets_0(this$static){ var group, group$iterator, n, n$iterator, n$iterator0; for (group$iterator = new ArrayList$1(this$static.cGraph.cGroups); group$iterator.i < group$iterator.this$01.array.length;) { group = castTo($next_6(group$iterator), 194); group.reference = null; for (n$iterator0 = group.cNodes.map_0.keySet_0().iterator_0(); n$iterator0.hasNext_0();) { n = castTo(n$iterator0.next_1(), 86); $reset_5(n.cGroupOffset); (!group.reference || n.hitbox.x_0 < group.reference.hitbox.x_0) && (group.reference = n); } for (n$iterator = group.cNodes.map_0.keySet_0().iterator_0(); n$iterator.hasNext_0();) { n = castTo(n$iterator.next_1(), 86); n.cGroupOffset.x_0 = n.hitbox.x_0 - group.reference.hitbox.x_0; n.cGroupOffset.y_0 = n.hitbox.y_0 - group.reference.hitbox.y_0; } } return this$static; } function $changeDirection_0(this$static, dir_0){ var oldDirection; if (this$static.finished) { throw toJs(new IllegalStateException_0(($ensureNamesAreInitialized(Lorg_eclipse_elk_alg_layered_compaction_oned_OneDimensionalCompactor_2_classLit) , 'The ' + Lorg_eclipse_elk_alg_layered_compaction_oned_OneDimensionalCompactor_2_classLit.simpleName + ' instance has been finished already.'))); } if (!$supports_0(this$static.cGraph, dir_0)) { throw toJs(new RuntimeException_0('The direction ' + dir_0 + ' is not supported by the CGraph instance.')); } if (dir_0 == this$static.direction) { return this$static; } oldDirection = this$static.direction; this$static.direction = dir_0; switch (oldDirection.ordinal) { case 0: switch (dir_0.ordinal) { case 2: $calculateConstraints_0(this$static); break; case 1: $mirrorHitboxes_0(this$static); $calculateConstraints_0(this$static); break; case 4: $transposeHitboxes_0(this$static); $calculateConstraints_0(this$static); break; case 3: $transposeHitboxes_0(this$static); $mirrorHitboxes_0(this$static); $calculateConstraints_0(this$static); } break; case 2: switch (dir_0.ordinal) { case 1: $mirrorHitboxes_0(this$static); $reverseConstraints_0(this$static); break; case 4: $transposeHitboxes_0(this$static); $calculateConstraints_0(this$static); break; case 3: $transposeHitboxes_0(this$static); $mirrorHitboxes_0(this$static); $calculateConstraints_0(this$static); } break; case 1: switch (dir_0.ordinal) { case 2: $mirrorHitboxes_0(this$static); $reverseConstraints_0(this$static); break; case 4: $mirrorHitboxes_0(this$static); $transposeHitboxes_0(this$static); $calculateConstraints_0(this$static); break; case 3: $mirrorHitboxes_0(this$static); $transposeHitboxes_0(this$static); $mirrorHitboxes_0(this$static); $calculateConstraints_0(this$static); } break; case 4: switch (dir_0.ordinal) { case 2: $transposeHitboxes_0(this$static); $calculateConstraints_0(this$static); break; case 1: $transposeHitboxes_0(this$static); $mirrorHitboxes_0(this$static); $calculateConstraints_0(this$static); break; case 3: $mirrorHitboxes_0(this$static); $reverseConstraints_0(this$static); } break; case 3: switch (dir_0.ordinal) { case 2: $mirrorHitboxes_0(this$static); $transposeHitboxes_0(this$static); $calculateConstraints_0(this$static); break; case 1: $mirrorHitboxes_0(this$static); $transposeHitboxes_0(this$static); $mirrorHitboxes_0(this$static); $calculateConstraints_0(this$static); break; case 4: $mirrorHitboxes_0(this$static); $reverseConstraints_0(this$static); } } return this$static; } function $compact_3(this$static){ var g, g$iterator, incN, incN$iterator, n, n$iterator, node, node$iterator; if (this$static.finished) { throw toJs(new IllegalStateException_0(($ensureNamesAreInitialized(Lorg_eclipse_elk_alg_layered_compaction_oned_OneDimensionalCompactor_2_classLit) , 'The ' + Lorg_eclipse_elk_alg_layered_compaction_oned_OneDimensionalCompactor_2_classLit.simpleName + ' instance has been finished already.'))); } this$static.direction == ($clinit_Direction_0() , UNDEFINED_2) && $changeDirection_0(this$static, LEFT_6); for (g$iterator = new ArrayList$1(this$static.cGraph.cGroups); g$iterator.i < g$iterator.this$01.array.length;) { g = castTo($next_6(g$iterator), 194); g.outDegree = 0; } for (n$iterator = new ArrayList$1(this$static.cGraph.cNodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 86); n.startPos = $intern_61; for (incN$iterator = n.constraints.iterator_0(); incN$iterator.hasNext_0();) { incN = castTo(incN$iterator.next_1(), 86); ++incN.cGroup.outDegree; } } $compact_4(this$static); for (node$iterator = new ArrayList$1(this$static.cGraph.cNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 86); node.reposition = true; } return this$static; } function $finish(this$static){ $changeDirection_0(this$static, ($clinit_Direction_0() , LEFT_6)); this$static.finished = true; return this$static; } function $forceConstraintsRecalculation(this$static){ $calculateConstraints_0(this$static); return this$static; } function $mirrorHitboxes_0(this$static){ var cNode, cNode$iterator; for (cNode$iterator = new ArrayList$1(this$static.cGraph.cNodes); cNode$iterator.i < cNode$iterator.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator), 86); cNode.hitbox.x_0 = -cNode.hitbox.x_0 - cNode.hitbox.width_0; } $calculateGroupOffsets_0(this$static); } function $reverseConstraints_0(this$static){ var cNode, cNode$iterator, cNode$iterator0, cNode$iterator1, inc, inc$iterator, incMap; incMap = new HashMap; for (cNode$iterator0 = new ArrayList$1(this$static.cGraph.cNodes); cNode$iterator0.i < cNode$iterator0.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator0), 86); $put_6(incMap, cNode, new ArrayList); } for (cNode$iterator1 = new ArrayList$1(this$static.cGraph.cNodes); cNode$iterator1.i < cNode$iterator1.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator1), 86); cNode.startPos = $intern_61; for (inc$iterator = cNode.constraints.iterator_0(); inc$iterator.hasNext_0();) { inc = castTo(inc$iterator.next_1(), 86); castTo(getEntryValueOrNull($getEntry_0(incMap.hashCodeMap, inc)), 15).add_2(cNode); } } for (cNode$iterator = new ArrayList$1(this$static.cGraph.cNodes); cNode$iterator.i < cNode$iterator.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator), 86); cNode.constraints.clear_0(); cNode.constraints = castTo(getEntryValueOrNull($getEntry_0(incMap.hashCodeMap, cNode)), 15); } $calculateConstraintsForCGroups_0(this$static); } function $setLockingStrategy(this$static, strategy){ this$static.lockingStrategy = strategy; return this$static; } function $setSpacingsHandler_0(this$static, handler){ this$static.spacingsHandler = handler; return this$static; } function $transposeHitboxes_0(this$static){ var cNode, cNode$iterator, tmp; for (cNode$iterator = new ArrayList$1(this$static.cGraph.cNodes); cNode$iterator.i < cNode$iterator.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator), 86); tmp = cNode.hitbox.x_0; cNode.hitbox.x_0 = cNode.hitbox.y_0; cNode.hitbox.y_0 = tmp; tmp = cNode.hitbox.width_0; cNode.hitbox.width_0 = cNode.hitbox.height; cNode.hitbox.height = tmp; tmp = cNode.cGroupOffset.x_0; cNode.cGroupOffset.x_0 = cNode.cGroupOffset.y_0; cNode.cGroupOffset.y_0 = tmp; } $calculateGroupOffsets_0(this$static); } function OneDimensionalCompactor_0(cGraph){ $clinit_OneDimensionalCompactor_0(); var group, n, n$iterator; this.constraintAlgorithm = SCANLINE_CONSTRAINTS_0; this.direction = ($clinit_Direction_0() , UNDEFINED_2); this.spacingsHandler = ($clinit_ISpacingsHandler_0() , DEFAULT_SPACING_HANDLER_0); this.cGraph = cGraph; $setLockingStrategy(this, new OneDimensionalCompactor$lambda$0$Type_0); $calculateGroupOffsets_0(this); for (n$iterator = new ArrayList$1(cGraph.cNodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 86); if (!n.cGroup) { group = new CGroup_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_compaction_oned_CNode_2_classLit, 1), $intern_2, 86, 0, [n])); $add_3(cGraph.cGroups, group); } } } defineClass(1721, 1, {}, OneDimensionalCompactor_0); _.finished = false; var SCANLINE_CONSTRAINTS_0; var Lorg_eclipse_elk_alg_layered_compaction_oned_OneDimensionalCompactor_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.oned', 'OneDimensionalCompactor', 1721); function OneDimensionalCompactor$lambda$0$Type_0(){ } defineClass(1722, 1, {}, OneDimensionalCompactor$lambda$0$Type_0); _.apply_0 = function apply_60(arg0){ return $clinit_OneDimensionalCompactor_0() , $clinit_Boolean() , castTo(castTo(arg0, 42).first, 86).cGroup.outDegree != 0?true:false; } ; _.equals_0 = function equals_84(other){ return this === other; } ; var Lorg_eclipse_elk_alg_layered_compaction_oned_OneDimensionalCompactor$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.oned', 'OneDimensionalCompactor/lambda$0$Type', 1722); function $get_19(this$static, direction){ switch (direction.ordinal) { case 2: return this$static.left; case 1: return this$static.right; case 4: return this$static.up; case 3: return this$static.down; default:return false; } } function $set_5(this$static, l, r, u, d){ this$static.left = l; this$static.right = r; this$static.up = u; this$static.down = d; } function Quadruplet_0(){ $set_5(this, false, false, false, false); } defineClass(833, 1, {}, Quadruplet_0); _.down = false; _.left = false; _.right = false; _.up = false; var Lorg_eclipse_elk_alg_layered_compaction_oned_Quadruplet_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.oned', 'Quadruplet', 833); function $compact_4(compactor){ var cNode, cNode$iterator, cNode$iterator0, diff, group, group$iterator, incNode, incNode$iterator, minStartPos, node, node$iterator, node$iterator0, sinks, spacing, suggestedX; minStartPos = $intern_60; for (cNode$iterator0 = new ArrayList$1(compactor.cGraph.cNodes); cNode$iterator0.i < cNode$iterator0.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator0), 86); minStartPos = $wnd.Math.min(minStartPos, cNode.cGroup.reference.hitbox.x_0 + cNode.cGroupOffset.x_0); } sinks = new LinkedList; for (group$iterator = new ArrayList$1(compactor.cGraph.cGroups); group$iterator.i < group$iterator.this$01.array.length;) { group = castTo($next_6(group$iterator), 194); group.startPos = minStartPos; group.outDegree == 0 && ($addNode_0(sinks, group, sinks.tail.prev, sinks.tail) , true); } while (sinks.size_0 != 0) { group = castTo(sinks.size_0 == 0?null:(checkCriticalElement(sinks.size_0 != 0) , $removeNode_0(sinks, sinks.header.next_0)), 194); diff = group.reference.hitbox.x_0; for (node$iterator0 = group.cNodes.map_0.keySet_0().iterator_0(); node$iterator0.hasNext_0();) { node = castTo(node$iterator0.next_1(), 86); suggestedX = group.startPos + node.cGroupOffset.x_0; node.cGroup.reposition || node.hitbox.x_0 < suggestedX?(node.startPos = suggestedX):(node.startPos = node.hitbox.x_0); } diff -= group.reference.startPos; group.delta += diff; compactor.direction == ($clinit_Direction_0() , RIGHT_6) || compactor.direction == DOWN_1?(group.deltaNormalized += diff):(group.deltaNormalized -= diff); for (node$iterator = group.cNodes.map_0.keySet_0().iterator_0(); node$iterator.hasNext_0();) { node = castTo(node$iterator.next_1(), 86); for (incNode$iterator = node.constraints.iterator_0(); incNode$iterator.hasNext_0();) { incNode = castTo(incNode$iterator.next_1(), 86); $isHorizontal(compactor.direction)?(spacing = compactor.spacingsHandler.getHorizontalSpacing_0(node, incNode)):(spacing = compactor.spacingsHandler.getVerticalSpacing_0(node, incNode)); incNode.cGroup.startPos = $wnd.Math.max(incNode.cGroup.startPos, node.startPos + node.hitbox.width_0 + spacing - incNode.cGroupOffset.x_0); incNode.reposition || (incNode.cGroup.startPos = $wnd.Math.max(incNode.cGroup.startPos, incNode.hitbox.x_0 - incNode.cGroupOffset.x_0)); --incNode.cGroup.outDegree; incNode.cGroup.outDegree == 0 && $add_7(sinks, incNode.cGroup); } } } for (cNode$iterator = new ArrayList$1(compactor.cGraph.cNodes); cNode$iterator.i < cNode$iterator.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator), 86); cNode.hitbox.x_0 = cNode.startPos; } } function $blowUpHitboxes(this$static){ var n, n$iterator, spacing; for (n$iterator = new ArrayList$1(this$static.compactor.cGraph.cNodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 86); spacing = (checkCriticalNotNull(0) , 0); if (spacing > 0) { !($isHorizontal(this$static.compactor.direction) && n.spacingIgnore.up) && !($isVertical(this$static.compactor.direction) && n.spacingIgnore.left) && (n.hitbox.y_0 -= $wnd.Math.max(0, spacing / 2 - 0.5)); !($isHorizontal(this$static.compactor.direction) && n.spacingIgnore.down) && !($isVertical(this$static.compactor.direction) && n.spacingIgnore.right) && (n.hitbox.height += $wnd.Math.max(0, spacing - 1)); } } } function $calculateConstraints_1(this$static, theCompactor){ this$static.compactor = theCompactor; $sweep_1(this$static); } function $normalizeHitboxes(this$static){ var n, n$iterator, spacing; for (n$iterator = new ArrayList$1(this$static.compactor.cGraph.cNodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 86); spacing = (checkCriticalNotNull(0) , 0); if (spacing > 0) { !($isHorizontal(this$static.compactor.direction) && n.spacingIgnore.up) && !($isVertical(this$static.compactor.direction) && n.spacingIgnore.left) && (n.hitbox.y_0 += $wnd.Math.max(0, spacing / 2 - 0.5)); !($isHorizontal(this$static.compactor.direction) && n.spacingIgnore.down) && !($isVertical(this$static.compactor.direction) && n.spacingIgnore.right) && (n.hitbox.height -= spacing - 1); } } } function $sweep_1(this$static){ var n, n$iterator, points; $blowUpHitboxes(this$static); points = new ArrayList; for (n$iterator = new ArrayList$1(this$static.compactor.cGraph.cNodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 86); $add_3(points, new ScanlineConstraintCalculator$Timestamp_0(n, true)); $add_3(points, new ScanlineConstraintCalculator$Timestamp_0(n, false)); } $reset_2(this$static.constraintsScanlineHandler); execute_0(points, this$static.constraintsScanlineComparator, new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_compaction_recthull_Scanline$EventHandler_2_classLit, 1), $intern_2, 382, 0, [this$static.constraintsScanlineHandler]))); $normalizeHitboxes(this$static); } function ScanlineConstraintCalculator_0(){ this.constraintsScanlineComparator = new ScanlineConstraintCalculator$lambda$0$Type_0; this.constraintsScanlineHandler = new ScanlineConstraintCalculator$ConstraintsScanlineHandler_0(this); } function lambda$0_19(p1_0, p2_1){ var cmp, y1, y2; y1 = p1_0.node.hitbox.y_0; p1_0.low || (y1 += p1_0.node.hitbox.height); y2 = p2_1.node.hitbox.y_0; p2_1.low || (y2 += p2_1.node.hitbox.height); cmp = compare_4(y1, y2); if (cmp == 0) { if (!p1_0.low && p2_1.low) { return -1; } else if (!p2_1.low && p1_0.low) { return 1; } } return cmp; } defineClass(1898, 1, {}, ScanlineConstraintCalculator_0); var Lorg_eclipse_elk_alg_layered_compaction_oned_algs_ScanlineConstraintCalculator_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.oned.algs', 'ScanlineConstraintCalculator', 1898); var Lorg_eclipse_elk_alg_layered_compaction_recthull_Scanline$EventHandler_2_classLit = createForInterface('org.eclipse.elk.alg.layered.compaction.recthull', 'Scanline/EventHandler'); function $handle_1(this$static, p){ var right, left, right_0; p.low?($add_10(this$static.intervals, p.node) , this$static.cand[p.node.id_0] = castTo($lower(this$static.intervals, p.node), 86) , right = castTo($higher(this$static.intervals, p.node), 86) , !!right && (this$static.cand[right.id_0] = p.node) , undefined):(left = castTo($lower(this$static.intervals, p.node), 86) , !!left && left == this$static.cand[p.node.id_0] && !!left.cGroup && left.cGroup != p.node.cGroup && left.constraints.add_2(p.node) , right_0 = castTo($higher(this$static.intervals, p.node), 86) , !!right_0 && this$static.cand[right_0.id_0] == p.node && !!right_0.cGroup && right_0.cGroup != p.node.cGroup && p.node.constraints.add_2(right_0) , $remove_28(this$static.intervals, p.node) , undefined); } function $reset_2(this$static){ var index_0, n, n$iterator; this$static.intervals.map_0.clear_0(); this$static.cand = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_compaction_oned_CNode_2_classLit, $intern_2, 86, this$static.this$01.compactor.cGraph.cNodes.array.length, 0, 1); index_0 = 0; for (n$iterator = new ArrayList$1(this$static.this$01.compactor.cGraph.cNodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 86); n.id_0 = index_0++; } } function ScanlineConstraintCalculator$ConstraintsScanlineHandler_0(this$0){ this.this$01 = this$0; this.intervals = new TreeSet_0(castTo(checkNotNull(new ScanlineConstraintCalculator$ConstraintsScanlineHandler$lambda$0$Type_0), 50)); } function lambda$0_20(c1_0, c2_1){ return compare_4(c1_0.hitbox.x_0 + c1_0.hitbox.width_0 / 2, c2_1.hitbox.x_0 + c2_1.hitbox.width_0 / 2); } defineClass(1899, 1, {382:1}, ScanlineConstraintCalculator$ConstraintsScanlineHandler_0); _.handle = function handle_1(p){ $handle_1(this, castTo(p, 476)); } ; var Lorg_eclipse_elk_alg_layered_compaction_oned_algs_ScanlineConstraintCalculator$ConstraintsScanlineHandler_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.oned.algs', 'ScanlineConstraintCalculator/ConstraintsScanlineHandler', 1899); function ScanlineConstraintCalculator$ConstraintsScanlineHandler$lambda$0$Type_0(){ } defineClass($intern_48, 1, $intern_88, ScanlineConstraintCalculator$ConstraintsScanlineHandler$lambda$0$Type_0); _.compare_1 = function compare_30(arg0, arg1){ return lambda$0_20(castTo(arg0, 86), castTo(arg1, 86)); } ; _.equals_0 = function equals_85(other){ return this === other; } ; _.reversed = function reversed_22(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_compaction_oned_algs_ScanlineConstraintCalculator$ConstraintsScanlineHandler$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.oned.algs', 'ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type', $intern_48); function ScanlineConstraintCalculator$Timestamp_0(node, low){ this.node = node; this.low = low; } defineClass(476, 1, {476:1}, ScanlineConstraintCalculator$Timestamp_0); _.low = false; var Lorg_eclipse_elk_alg_layered_compaction_oned_algs_ScanlineConstraintCalculator$Timestamp_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.oned.algs', 'ScanlineConstraintCalculator/Timestamp', 476); function ScanlineConstraintCalculator$lambda$0$Type_0(){ } defineClass(1901, 1, $intern_88, ScanlineConstraintCalculator$lambda$0$Type_0); _.compare_1 = function compare_31(arg0, arg1){ return lambda$0_19(castTo(arg0, 476), castTo(arg1, 476)); } ; _.equals_0 = function equals_86(other){ return this === other; } ; _.reversed = function reversed_23(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_compaction_oned_algs_ScanlineConstraintCalculator$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.oned.algs', 'ScanlineConstraintCalculator/lambda$0$Type', 1901); function Point(x_0, y_0){ this.x_0 = x_0; this.y_0 = y_0; } function Point_0(x_0, y_0, quadrant){ Point.call(this, x_0, y_0); this.quadrant = quadrant; } defineClass(148, 1, {148:1}, Point, Point_0); _.equals_0 = function equals_87(obj){ var p2; if (obj == null) { return false; } if (Lorg_eclipse_elk_alg_layered_compaction_recthull_Point_2_classLit != getClass__Ljava_lang_Class___devirtual$(obj)) { return false; } p2 = castTo(obj, 148); return equals_57(this.x_0, p2.x_0) && equals_57(this.y_0, p2.y_0); } ; _.hashCode_1 = function hashCode_61(){ return hashCode_47(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, [this.x_0, this.y_0])); } ; _.toString_0 = function toString_85(){ return '(' + this.x_0 + ', ' + this.y_0 + (this.convex?'cx':'') + this.quadrant + ')'; } ; _.convex = true; _.x_0 = 0; _.y_0 = 0; var Lorg_eclipse_elk_alg_layered_compaction_recthull_Point_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.recthull', 'Point', 148); function $clinit_Point$Quadrant(){ $clinit_Point$Quadrant = emptyMethod; Q1 = new Point$Quadrant('Q1', 0); Q4 = new Point$Quadrant('Q4', 1); Q2 = new Point$Quadrant('Q2', 2); Q3 = new Point$Quadrant('Q3', 3); } function $isLeft(this$static){ return this$static == Q1 || this$static == Q4; } function $isUpper(this$static){ return this$static == Q1 || this$static == Q2; } function Point$Quadrant(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function isBothLeftOrBothRight(q1, q2){ $clinit_Point$Quadrant(); return q1 == Q1 && q2 == Q4 || q1 == Q4 && q2 == Q1 || q1 == Q3 && q2 == Q2 || q1 == Q2 && q2 == Q3; } function isOneLeftOneRight(q1, q2){ $clinit_Point$Quadrant(); return q1 == Q1 && q2 == Q2 || q1 == Q1 && q2 == Q3 || q1 == Q4 && q2 == Q3 || q1 == Q4 && q2 == Q2; } function valueOf_26(name_0){ $clinit_Point$Quadrant(); return valueOf(($clinit_Point$Quadrant$Map() , $MAP_16), name_0); } function values_34(){ $clinit_Point$Quadrant(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_compaction_recthull_Point$Quadrant_2_classLit, 1), $intern_37, 416, 0, [Q1, Q4, Q2, Q3]); } defineClass(416, 22, {3:1, 34:1, 22:1, 416:1}, Point$Quadrant); var Q1, Q2, Q3, Q4; var Lorg_eclipse_elk_alg_layered_compaction_recthull_Point$Quadrant_2_classLit = createForEnum('org.eclipse.elk.alg.layered.compaction.recthull', 'Point/Quadrant', 416, Ljava_lang_Enum_2_classLit, values_34, valueOf_26); function $clinit_Point$Quadrant$Map(){ $clinit_Point$Quadrant$Map = emptyMethod; $MAP_16 = createValueOfMap(($clinit_Point$Quadrant() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_compaction_recthull_Point$Quadrant_2_classLit, 1), $intern_37, 416, 0, [Q1, Q4, Q2, Q3]))); } var $MAP_16; function $clinit_RectilinearConvexHull(){ $clinit_RectilinearConvexHull = emptyMethod; RIGHT_HIGH_FIRST = new RectilinearConvexHull$lambda$0$Type; RIGHT_LOW_FIRST = new RectilinearConvexHull$lambda$1$Type; LEFT_HIGH_FIRST = new RectilinearConvexHull$lambda$2$Type; LEFT_LOW_FIRST = new RectilinearConvexHull$lambda$3$Type; RIGHT_SPECIAL_ORDER = new RectilinearConvexHull$lambda$4$Type; } function $splitIntoRectangles(this$static){ var handler; handler = new RectilinearConvexHull$RectangleEventHandler(this$static); execute_0(this$static.hull, RIGHT_SPECIAL_ORDER, new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_compaction_recthull_Scanline$EventHandler_2_classLit, 1), $intern_2, 382, 0, [handler]))); !!handler.queued && $add_3(handler.rects, handler.queued); return handler.rects; } function RectilinearConvexHull(){ this.hull = new ArrayList; } function addConcaveCorners(pts, q){ var last, next, p, pIt; pIt = new AbstractList$ListIteratorImpl(pts, 0); last = (checkCriticalElement(pIt.i < pIt.this$01_0.size_1()) , castTo(pIt.this$01_0.get_0(pIt.last = pIt.i++), 148)); while (pIt.i < pIt.this$01_0.size_1()) { next = (checkCriticalElement(pIt.i < pIt.this$01_0.size_1()) , castTo(pIt.this$01_0.get_0(pIt.last = pIt.i++), 148)); p = new Point_0(next.x_0, last.y_0, q); checkCriticalElement(pIt.i > 0); pIt.this$01.get_0(pIt.last = --pIt.i); $add_1(pIt, p); checkCriticalElement(pIt.i < pIt.this$01_0.size_1()); pIt.this$01_0.get_0(pIt.last = pIt.i++); p.convex = false; last = next; } } function lambda$0_21(p1_0, p2_1){ $clinit_RectilinearConvexHull(); return p1_0.x_0 == p2_1.x_0?compare_4(p2_1.y_0, p1_0.y_0):compare_4(p1_0.x_0, p2_1.x_0); } function lambda$1_6(p1_0, p2_1){ $clinit_RectilinearConvexHull(); return p1_0.x_0 == p2_1.x_0?compare_4(p1_0.y_0, p2_1.y_0):compare_4(p1_0.x_0, p2_1.x_0); } function lambda$2_2(p1_0, p2_1){ $clinit_RectilinearConvexHull(); return p1_0.x_0 == p2_1.x_0?compare_4(p2_1.y_0, p1_0.y_0):compare_4(p2_1.x_0, p1_0.x_0); } function lambda$3(p1_0, p2_1){ $clinit_RectilinearConvexHull(); return p1_0.x_0 == p2_1.x_0?compare_4(p1_0.y_0, p2_1.y_0):compare_4(p2_1.x_0, p1_0.x_0); } function lambda$4_2(p1_0, p2_1){ $clinit_RectilinearConvexHull(); var val; if (p1_0.x_0 == p2_1.x_0) { if (p1_0.quadrant == p2_1.quadrant || isBothLeftOrBothRight(p1_0.quadrant, p2_1.quadrant)) { val = $isLeft(p1_0.quadrant)?1:-1; if (p1_0.convex && !p2_1.convex) { return val; } else if (!p1_0.convex && p2_1.convex) { return -val; } } return compare_5(p1_0.quadrant.ordinal, p2_1.quadrant.ordinal); } else { return compare_4(p1_0.x_0, p2_1.x_0); } } function of_5(points){ $clinit_RectilinearConvexHull(); var p, p$iterator, q1, q2, q3, q4, rch; rch = new RectilinearConvexHull; for (p$iterator = new ArrayList$1(points); p$iterator.i < p$iterator.this$01.array.length;) { p = castTo($next_6(p$iterator), 148); (!rch.xMax1 || p.x_0 >= rch.xMax1.x_0) && (rch.xMax1 = p); if (!rch.xMin1 || p.x_0 <= rch.xMin1.x_0) { rch.xMin2 = rch.xMin1; rch.xMin1 = p; } (!rch.yMax1 || p.y_0 >= rch.yMax1.y_0) && (rch.yMax1 = p); (!rch.yMin1 || p.y_0 <= rch.yMin1.y_0) && (rch.yMin1 = p); } q1 = new RectilinearConvexHull$MaximalElementsEventHandler(($clinit_Point$Quadrant() , Q1)); execute_0(points, RIGHT_LOW_FIRST, new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_compaction_recthull_Scanline$EventHandler_2_classLit, 1), $intern_2, 382, 0, [q1]))); q4 = new RectilinearConvexHull$MaximalElementsEventHandler(Q4); execute_0(points, RIGHT_HIGH_FIRST, new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_compaction_recthull_Scanline$EventHandler_2_classLit, 1), $intern_2, 382, 0, [q4]))); q2 = new RectilinearConvexHull$MaximalElementsEventHandler(Q2); execute_0(points, LEFT_LOW_FIRST, new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_compaction_recthull_Scanline$EventHandler_2_classLit, 1), $intern_2, 382, 0, [q2]))); q3 = new RectilinearConvexHull$MaximalElementsEventHandler(Q3); execute_0(points, LEFT_HIGH_FIRST, new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_compaction_recthull_Scanline$EventHandler_2_classLit, 1), $intern_2, 382, 0, [q3]))); addConcaveCorners(q1.points, Q1); addConcaveCorners(q2.points, Q2); addConcaveCorners(q3.points, Q3); addConcaveCorners(q4.points, Q4); rch.hull.array.length = 0; $addAll_2(rch.hull, q1.points); $addAll_2(rch.hull, reverse_0(q2.points)); $addAll_2(rch.hull, q3.points); $addAll_2(rch.hull, reverse_0(q4.points)); return rch; } defineClass(1708, 1, {}, RectilinearConvexHull); _.xMax1 = null; _.xMin1 = null; _.xMin2 = null; _.yMax1 = null; _.yMin1 = null; var LEFT_HIGH_FIRST, LEFT_LOW_FIRST, RIGHT_HIGH_FIRST, RIGHT_LOW_FIRST, RIGHT_SPECIAL_ORDER; var Lorg_eclipse_elk_alg_layered_compaction_recthull_RectilinearConvexHull_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.recthull', 'RectilinearConvexHull', 1708); function $clinit_RectilinearConvexHull$MaximalElementsEventHandler(){ $clinit_RectilinearConvexHull$MaximalElementsEventHandler = emptyMethod; DBL_CMP = new RectilinearConvexHull$MaximalElementsEventHandler$lambda$0$Type; } function $handle_2(this$static, p){ if (this$static.compare.compare_1(p.y_0, this$static.maximalY) > 0) { $add_3(this$static.points, new Point_0(p.x_0, p.y_0, this$static.quadrant)); this$static.maximalY = p.y_0; } } function RectilinearConvexHull$MaximalElementsEventHandler(quadrant){ $clinit_RectilinearConvexHull$MaximalElementsEventHandler(); this.points = new ArrayList; this.quadrant = quadrant; switch (quadrant.ordinal) { case 0: case 2: this.compare = reverseOrder(DBL_CMP); this.maximalY = $intern_60; break; case 3: case 1: this.compare = DBL_CMP; this.maximalY = $intern_61; } } function lambda$0_22(d1_0, d2_1){ $clinit_RectilinearConvexHull$MaximalElementsEventHandler(); return compare_4((checkCriticalNotNull(d1_0) , d1_0), (checkCriticalNotNull(d2_1) , d2_1)); } defineClass(583, 1, {382:1}, RectilinearConvexHull$MaximalElementsEventHandler); _.handle = function handle_2(p){ $handle_2(this, castTo(p, 148)); } ; _.maximalY = 0; var DBL_CMP; var Lorg_eclipse_elk_alg_layered_compaction_recthull_RectilinearConvexHull$MaximalElementsEventHandler_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.recthull', 'RectilinearConvexHull/MaximalElementsEventHandler', 583); function RectilinearConvexHull$MaximalElementsEventHandler$lambda$0$Type(){ } defineClass(1710, 1, $intern_88, RectilinearConvexHull$MaximalElementsEventHandler$lambda$0$Type); _.compare_1 = function compare_32(arg0, arg1){ return lambda$0_22(castToDouble(arg0), castToDouble(arg1)); } ; _.equals_0 = function equals_88(other){ return this === other; } ; _.reversed = function reversed_24(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_compaction_recthull_RectilinearConvexHull$MaximalElementsEventHandler$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.recthull', 'RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type', 1710); function $handle_3(this$static, p){ var r; if (!!this$static.queued && (p.x_0 != this$static.queuedPnt.x_0 || isOneLeftOneRight(this$static.queuedPnt.quadrant, p.quadrant))) { $add_3(this$static.rects, this$static.queued); this$static.lastX = this$static.queued.x_0 + this$static.queued.width_0; this$static.queued = null; this$static.queuedPnt = null; } $isUpper(p.quadrant)?(this$static.minY = p):(this$static.maxY = p); if (p.quadrant == ($clinit_Point$Quadrant() , Q1) && !p.convex || p.quadrant == Q2 && p.convex || p.quadrant == Q3 && p.convex || p.quadrant == Q4 && !p.convex) { if (!!this$static.minY && !!this$static.maxY) { r = new ElkRectangle_0(this$static.lastX, this$static.minY.y_0, p.x_0 - this$static.lastX, this$static.maxY.y_0 - this$static.minY.y_0); this$static.queued = r; this$static.queuedPnt = p; } } } function RectilinearConvexHull$RectangleEventHandler(this$0){ this.this$01 = this$0; this.rects = new ArrayList; this.lastX = $wnd.Math.min(this.this$01.xMin1.x_0, this.this$01.xMin2.x_0); } defineClass(1709, 1, {382:1}, RectilinearConvexHull$RectangleEventHandler); _.handle = function handle_3(p){ $handle_3(this, castTo(p, 148)); } ; _.lastX = 0; _.maxY = null; _.minY = null; _.queued = null; _.queuedPnt = null; var Lorg_eclipse_elk_alg_layered_compaction_recthull_RectilinearConvexHull$RectangleEventHandler_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.recthull', 'RectilinearConvexHull/RectangleEventHandler', 1709); function RectilinearConvexHull$lambda$0$Type(){ } defineClass(1711, 1, $intern_88, RectilinearConvexHull$lambda$0$Type); _.compare_1 = function compare_33(arg0, arg1){ return lambda$0_21(castTo(arg0, 148), castTo(arg1, 148)); } ; _.equals_0 = function equals_89(other){ return this === other; } ; _.reversed = function reversed_25(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_compaction_recthull_RectilinearConvexHull$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.recthull', 'RectilinearConvexHull/lambda$0$Type', 1711); function RectilinearConvexHull$lambda$1$Type(){ } defineClass(1712, 1, $intern_88, RectilinearConvexHull$lambda$1$Type); _.compare_1 = function compare_34(arg0, arg1){ return lambda$1_6(castTo(arg0, 148), castTo(arg1, 148)); } ; _.equals_0 = function equals_90(other){ return this === other; } ; _.reversed = function reversed_26(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_compaction_recthull_RectilinearConvexHull$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.recthull', 'RectilinearConvexHull/lambda$1$Type', 1712); function RectilinearConvexHull$lambda$2$Type(){ } defineClass(1713, 1, $intern_88, RectilinearConvexHull$lambda$2$Type); _.compare_1 = function compare_35(arg0, arg1){ return lambda$2_2(castTo(arg0, 148), castTo(arg1, 148)); } ; _.equals_0 = function equals_91(other){ return this === other; } ; _.reversed = function reversed_27(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_compaction_recthull_RectilinearConvexHull$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.recthull', 'RectilinearConvexHull/lambda$2$Type', 1713); function RectilinearConvexHull$lambda$3$Type(){ } defineClass(1714, 1, $intern_88, RectilinearConvexHull$lambda$3$Type); _.compare_1 = function compare_36(arg0, arg1){ return lambda$3(castTo(arg0, 148), castTo(arg1, 148)); } ; _.equals_0 = function equals_92(other){ return this === other; } ; _.reversed = function reversed_28(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_compaction_recthull_RectilinearConvexHull$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.recthull', 'RectilinearConvexHull/lambda$3$Type', 1714); function RectilinearConvexHull$lambda$4$Type(){ } defineClass(1715, 1, $intern_88, RectilinearConvexHull$lambda$4$Type); _.compare_1 = function compare_37(arg0, arg1){ return lambda$4_2(castTo(arg0, 148), castTo(arg1, 148)); } ; _.equals_0 = function equals_93(other){ return this === other; } ; _.reversed = function reversed_29(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_compaction_recthull_RectilinearConvexHull$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.recthull', 'RectilinearConvexHull/lambda$4$Type', 1715); function $go_0(this$static){ var h, h$iterator, p, p$iterator; $clinit_Collections(); $sort(this$static.points, this$static.comparator); for (p$iterator = new ArrayList$1(this$static.points); p$iterator.i < p$iterator.this$01.array.length;) { p = $next_6(p$iterator); for (h$iterator = new ArrayList$1(this$static.eventHandlers); h$iterator.i < h$iterator.this$01.array.length;) { h = castTo($next_6(h$iterator), 382); h.handle(p); } } } function Scanline_0(points, comparator, eventHandlers){ this.comparator = comparator; this.points = points; this.eventHandlers = (checkNotNull(eventHandlers) , new ArrayList_1(eventHandlers)); } function execute_0(points, comparator, eventHandlers){ var copy; copy = (checkNotNull(points) , new ArrayList_1(points)); $go_0(new Scanline_0(copy, comparator, eventHandlers)); } defineClass(1716, 1, {}, Scanline_0); var Lorg_eclipse_elk_alg_layered_compaction_recthull_Scanline_2_classLit = createForClass('org.eclipse.elk.alg.layered.compaction.recthull', 'Scanline', 1716); function $moveGraph_0(destGraph, sourceGraph, offsetx, offsety){ var edge, edge$iterator, graphOffset, junctionPoints, label_0, label$iterator, node, node$iterator, port, port$iterator; graphOffset = $add_18(sourceGraph.offset, offsetx, offsety); for (node$iterator = new ArrayList$1(sourceGraph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); $add_19(node.pos, graphOffset); for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); for (edge$iterator = new ArrayList$1(port.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); $offset_2(edge.bendPoints, graphOffset); junctionPoints = castTo($getProperty(edge, ($clinit_LayeredOptions() , JUNCTION_POINTS)), 75); !!junctionPoints && $offset_2(junctionPoints, graphOffset); for (label$iterator = new ArrayList$1(edge.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 72); $add_19(label_0.pos, graphOffset); } } } $add_3(destGraph.layerlessNodes, node); node.graph_0 = destGraph; } } function $moveGraphs(destGraph, sourceGraphs){ var sourceGraph, sourceGraph$iterator; for (sourceGraph$iterator = sourceGraphs.iterator_0(); sourceGraph$iterator.hasNext_0();) { sourceGraph = castTo(sourceGraph$iterator.next_1(), 36); $moveGraph_0(destGraph, sourceGraph, 0, 0); } } function $offsetGraph(graph, offsetx, offsety){ var edge, edge$iterator, graphOffset, junctionPoints, label_0, label$iterator, node, node$iterator, port, port$iterator; graphOffset = new KVector_1(offsetx, offsety); for (node$iterator = new ArrayList$1(graph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); $add_19(node.pos, graphOffset); for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); for (edge$iterator = new ArrayList$1(port.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); $offset_2(edge.bendPoints, graphOffset); junctionPoints = castTo($getProperty(edge, ($clinit_LayeredOptions() , JUNCTION_POINTS)), 75); !!junctionPoints && $offset_2(junctionPoints, graphOffset); for (label$iterator = new ArrayList$1(edge.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 72); $add_19(label_0.pos, graphOffset); } } } } } function $offsetGraphs(graphs, offsetx, offsety){ var graph, graph$iterator; for (graph$iterator = graphs.iterator_0(); graph$iterator.hasNext_0();) { graph = castTo(graph$iterator.next_1(), 36); $offsetGraph(graph, offsetx, offsety); } } defineClass(2104, 1, {}); var Lorg_eclipse_elk_alg_layered_components_AbstractGraphPlacer_2_classLit = createForClass('org.eclipse.elk.alg.layered.components', 'AbstractGraphPlacer', 2104); function $clinit_ComponentGroup(){ $clinit_ComponentGroup = emptyMethod; CONSTRAINTS = new HashMultimap; $put(CONSTRAINTS, ($clinit_PortSide() , SIDES_NONE), SIDES_NORTH_EAST_SOUTH_WEST); $put(CONSTRAINTS, SIDES_WEST, SIDES_NORTH_EAST_SOUTH_WEST); $put(CONSTRAINTS, SIDES_WEST, SIDES_NORTH_SOUTH_WEST); $put(CONSTRAINTS, SIDES_EAST, SIDES_NORTH_EAST_SOUTH); $put(CONSTRAINTS, SIDES_EAST, SIDES_NORTH_EAST_SOUTH_WEST); $put(CONSTRAINTS, SIDES_NORTH, SIDES_NORTH_EAST_SOUTH_WEST); $put(CONSTRAINTS, SIDES_NORTH, SIDES_NORTH_EAST_WEST); $put(CONSTRAINTS, SIDES_SOUTH, SIDES_EAST_SOUTH_WEST); $put(CONSTRAINTS, SIDES_SOUTH, SIDES_NORTH_EAST_SOUTH_WEST); $put(CONSTRAINTS, SIDES_NORTH_SOUTH, SIDES_EAST_WEST); $put(CONSTRAINTS, SIDES_NORTH_SOUTH, SIDES_NORTH_EAST_SOUTH_WEST); $put(CONSTRAINTS, SIDES_NORTH_SOUTH, SIDES_NORTH_EAST_WEST); $put(CONSTRAINTS, SIDES_NORTH_SOUTH, SIDES_EAST_SOUTH_WEST); $put(CONSTRAINTS, SIDES_EAST_WEST, SIDES_NORTH_SOUTH); $put(CONSTRAINTS, SIDES_EAST_WEST, SIDES_NORTH_SOUTH_WEST); $put(CONSTRAINTS, SIDES_EAST_WEST, SIDES_NORTH_EAST_SOUTH); $put(CONSTRAINTS, SIDES_EAST_WEST, SIDES_NORTH_EAST_SOUTH_WEST); $put(CONSTRAINTS, SIDES_NORTH_WEST, SIDES_NORTH_WEST); $put(CONSTRAINTS, SIDES_NORTH_WEST, SIDES_NORTH_EAST_WEST); $put(CONSTRAINTS, SIDES_NORTH_WEST, SIDES_NORTH_SOUTH_WEST); $put(CONSTRAINTS, SIDES_NORTH_EAST, SIDES_NORTH_EAST); $put(CONSTRAINTS, SIDES_NORTH_EAST, SIDES_NORTH_EAST_WEST); $put(CONSTRAINTS, SIDES_NORTH_EAST, SIDES_NORTH_EAST_SOUTH); $put(CONSTRAINTS, SIDES_SOUTH_WEST, SIDES_SOUTH_WEST); $put(CONSTRAINTS, SIDES_SOUTH_WEST, SIDES_EAST_SOUTH_WEST); $put(CONSTRAINTS, SIDES_SOUTH_WEST, SIDES_NORTH_SOUTH_WEST); $put(CONSTRAINTS, SIDES_EAST_SOUTH, SIDES_EAST_SOUTH); $put(CONSTRAINTS, SIDES_EAST_SOUTH, SIDES_EAST_SOUTH_WEST); $put(CONSTRAINTS, SIDES_EAST_SOUTH, SIDES_NORTH_EAST_SOUTH); $put(CONSTRAINTS, SIDES_NORTH_EAST_WEST, SIDES_NORTH); $put(CONSTRAINTS, SIDES_NORTH_EAST_WEST, SIDES_NORTH_SOUTH); $put(CONSTRAINTS, SIDES_NORTH_EAST_WEST, SIDES_NORTH_WEST); $put(CONSTRAINTS, SIDES_NORTH_EAST_WEST, SIDES_NORTH_EAST); $put(CONSTRAINTS, SIDES_NORTH_EAST_WEST, SIDES_NORTH_EAST_SOUTH_WEST); $put(CONSTRAINTS, SIDES_NORTH_EAST_WEST, SIDES_NORTH_EAST_WEST); $put(CONSTRAINTS, SIDES_NORTH_EAST_WEST, SIDES_NORTH_SOUTH_WEST); $put(CONSTRAINTS, SIDES_NORTH_EAST_WEST, SIDES_NORTH_EAST_SOUTH); $put(CONSTRAINTS, SIDES_EAST_SOUTH_WEST, SIDES_SOUTH); $put(CONSTRAINTS, SIDES_EAST_SOUTH_WEST, SIDES_NORTH_SOUTH); $put(CONSTRAINTS, SIDES_EAST_SOUTH_WEST, SIDES_SOUTH_WEST); $put(CONSTRAINTS, SIDES_EAST_SOUTH_WEST, SIDES_EAST_SOUTH); $put(CONSTRAINTS, SIDES_EAST_SOUTH_WEST, SIDES_EAST_SOUTH_WEST); $put(CONSTRAINTS, SIDES_EAST_SOUTH_WEST, SIDES_NORTH_SOUTH_WEST); $put(CONSTRAINTS, SIDES_EAST_SOUTH_WEST, SIDES_NORTH_EAST_SOUTH); $put(CONSTRAINTS, SIDES_EAST_SOUTH_WEST, SIDES_NORTH_EAST_SOUTH_WEST); $put(CONSTRAINTS, SIDES_NORTH_SOUTH_WEST, SIDES_WEST); $put(CONSTRAINTS, SIDES_NORTH_SOUTH_WEST, SIDES_EAST_WEST); $put(CONSTRAINTS, SIDES_NORTH_SOUTH_WEST, SIDES_NORTH_WEST); $put(CONSTRAINTS, SIDES_NORTH_SOUTH_WEST, SIDES_SOUTH_WEST); $put(CONSTRAINTS, SIDES_NORTH_SOUTH_WEST, SIDES_NORTH_EAST_WEST); $put(CONSTRAINTS, SIDES_NORTH_SOUTH_WEST, SIDES_EAST_SOUTH_WEST); $put(CONSTRAINTS, SIDES_NORTH_SOUTH_WEST, SIDES_NORTH_SOUTH_WEST); $put(CONSTRAINTS, SIDES_NORTH_SOUTH_WEST, SIDES_NORTH_EAST_SOUTH_WEST); $put(CONSTRAINTS, SIDES_NORTH_EAST_SOUTH, SIDES_EAST); $put(CONSTRAINTS, SIDES_NORTH_EAST_SOUTH, SIDES_EAST_WEST); $put(CONSTRAINTS, SIDES_NORTH_EAST_SOUTH, SIDES_NORTH_EAST); $put(CONSTRAINTS, SIDES_NORTH_EAST_SOUTH, SIDES_EAST_SOUTH); $put(CONSTRAINTS, SIDES_NORTH_EAST_SOUTH, SIDES_NORTH_EAST_WEST); $put(CONSTRAINTS, SIDES_NORTH_EAST_SOUTH, SIDES_EAST_SOUTH_WEST); $put(CONSTRAINTS, SIDES_NORTH_EAST_SOUTH, SIDES_NORTH_EAST_SOUTH); $put(CONSTRAINTS, SIDES_NORTH_EAST_SOUTH, SIDES_NORTH_EAST_SOUTH_WEST); $put(CONSTRAINTS, SIDES_NORTH_EAST_SOUTH_WEST, SIDES_NONE); $put(CONSTRAINTS, SIDES_NORTH_EAST_SOUTH_WEST, SIDES_WEST); $put(CONSTRAINTS, SIDES_NORTH_EAST_SOUTH_WEST, SIDES_EAST); $put(CONSTRAINTS, SIDES_NORTH_EAST_SOUTH_WEST, SIDES_NORTH); $put(CONSTRAINTS, SIDES_NORTH_EAST_SOUTH_WEST, SIDES_SOUTH); $put(CONSTRAINTS, SIDES_NORTH_EAST_SOUTH_WEST, SIDES_NORTH_SOUTH); $put(CONSTRAINTS, SIDES_NORTH_EAST_SOUTH_WEST, SIDES_EAST_WEST); $put(CONSTRAINTS, SIDES_NORTH_EAST_SOUTH_WEST, SIDES_NORTH_EAST_WEST); $put(CONSTRAINTS, SIDES_NORTH_EAST_SOUTH_WEST, SIDES_EAST_SOUTH_WEST); $put(CONSTRAINTS, SIDES_NORTH_EAST_SOUTH_WEST, SIDES_NORTH_SOUTH_WEST); $put(CONSTRAINTS, SIDES_NORTH_EAST_SOUTH_WEST, SIDES_NORTH_EAST_SOUTH); $put(CONSTRAINTS, SIDES_NORTH_EAST_SOUTH_WEST, SIDES_NORTH_EAST_SOUTH_WEST); } function $$init_5(this$static){ this$static.components = new ArrayListMultimap; } function $getComponents(this$static, connections){ return castTo($get(this$static.components, connections), 15); } function ComponentGroup(component){ $clinit_ComponentGroup(); $$init_5(this); this.add_4(component); } defineClass(335, 1, {335:1}, ComponentGroup); _.add_4 = function add_43(component){ if (this.canAdd(component)) { $put(this.components, castTo($getProperty(component, ($clinit_InternalProperties_1() , EXT_PORT_CONNECTIONS)), 21), component); return true; } else { return false; } } ; _.canAdd = function canAdd(component){ var candidateSides, constraint, constraint$iterator, constraints; candidateSides = castTo($getProperty(component, ($clinit_InternalProperties_1() , EXT_PORT_CONNECTIONS)), 21); constraints = castTo($get(CONSTRAINTS, candidateSides), 21); for (constraint$iterator = constraints.iterator_0(); constraint$iterator.hasNext_0();) { constraint = castTo(constraint$iterator.next_1(), 21); if (!castTo($get(this.components, constraint), 15).isEmpty()) { return false; } } return true; } ; var CONSTRAINTS; var Lorg_eclipse_elk_alg_layered_components_ComponentGroup_2_classLit = createForClass('org.eclipse.elk.alg.layered.components', 'ComponentGroup', 335); function $placeComponents(group, spacing){ var colLeftWidth, colMidWidth, colNsWidth, colRightWidth, componentSize, rowBottomHeight, rowMidHeight, rowTopHeight, rowWeHeight, sizeC, sizeE, sizeENS, sizeN, sizeNE, sizeNESW, sizeNS, sizeNW, sizeNWE, sizeS, sizeSE, sizeSW, sizeSWE, sizeW, sizeWE, sizeWNS; sizeC = $placeComponentsInRows($getComponents(group, ($clinit_PortSide() , SIDES_NONE)), spacing); sizeN = $placeComponentsHorizontally($getComponents(group, SIDES_NORTH), spacing); sizeS = $placeComponentsHorizontally($getComponents(group, SIDES_SOUTH), spacing); sizeW = $placeComponentsVertically($getComponents(group, SIDES_WEST), spacing); sizeE = $placeComponentsVertically($getComponents(group, SIDES_EAST), spacing); sizeNW = $placeComponentsHorizontally($getComponents(group, SIDES_NORTH_WEST), spacing); sizeNE = $placeComponentsHorizontally($getComponents(group, SIDES_NORTH_EAST), spacing); sizeSW = $placeComponentsHorizontally($getComponents(group, SIDES_SOUTH_WEST), spacing); sizeSE = $placeComponentsHorizontally($getComponents(group, SIDES_EAST_SOUTH), spacing); sizeWE = $placeComponentsVertically($getComponents(group, SIDES_EAST_WEST), spacing); sizeNS = $placeComponentsHorizontally($getComponents(group, SIDES_NORTH_SOUTH), spacing); sizeNWE = $placeComponentsHorizontally($getComponents(group, SIDES_NORTH_EAST_WEST), spacing); sizeSWE = $placeComponentsHorizontally($getComponents(group, SIDES_EAST_SOUTH_WEST), spacing); sizeWNS = $placeComponentsVertically($getComponents(group, SIDES_NORTH_SOUTH_WEST), spacing); sizeENS = $placeComponentsVertically($getComponents(group, SIDES_NORTH_EAST_SOUTH), spacing); sizeNESW = $placeComponentsHorizontally($getComponents(group, SIDES_NORTH_EAST_SOUTH_WEST), spacing); colLeftWidth = maxd(stampJavaTypeInfo(getClassLiteralForArray(D_classLit, 1), $intern_66, 28, 15, [sizeNW.x_0, sizeW.x_0, sizeSW.x_0, sizeWNS.x_0])); colMidWidth = maxd(stampJavaTypeInfo(getClassLiteralForArray(D_classLit, 1), $intern_66, 28, 15, [sizeN.x_0, sizeC.x_0, sizeS.x_0, sizeNESW.x_0])); colNsWidth = sizeNS.x_0; colRightWidth = maxd(stampJavaTypeInfo(getClassLiteralForArray(D_classLit, 1), $intern_66, 28, 15, [sizeNE.x_0, sizeE.x_0, sizeSE.x_0, sizeENS.x_0])); rowTopHeight = maxd(stampJavaTypeInfo(getClassLiteralForArray(D_classLit, 1), $intern_66, 28, 15, [sizeNW.y_0, sizeN.y_0, sizeNE.y_0, sizeNWE.y_0])); rowMidHeight = maxd(stampJavaTypeInfo(getClassLiteralForArray(D_classLit, 1), $intern_66, 28, 15, [sizeW.y_0, sizeC.y_0, sizeE.y_0, sizeNESW.y_0])); rowWeHeight = sizeWE.y_0; rowBottomHeight = maxd(stampJavaTypeInfo(getClassLiteralForArray(D_classLit, 1), $intern_66, 28, 15, [sizeSW.y_0, sizeS.y_0, sizeSE.y_0, sizeSWE.y_0])); $offsetGraphs($getComponents(group, SIDES_NONE), colLeftWidth + colNsWidth, rowTopHeight + rowWeHeight); $offsetGraphs($getComponents(group, SIDES_NORTH_EAST_SOUTH_WEST), colLeftWidth + colNsWidth, rowTopHeight + rowWeHeight); $offsetGraphs($getComponents(group, SIDES_NORTH), colLeftWidth + colNsWidth, 0); $offsetGraphs($getComponents(group, SIDES_SOUTH), colLeftWidth + colNsWidth, rowTopHeight + rowWeHeight + rowMidHeight); $offsetGraphs($getComponents(group, SIDES_WEST), 0, rowTopHeight + rowWeHeight); $offsetGraphs($getComponents(group, SIDES_EAST), colLeftWidth + colNsWidth + colMidWidth, rowTopHeight + rowWeHeight); $offsetGraphs($getComponents(group, SIDES_NORTH_EAST), colLeftWidth + colNsWidth + colMidWidth, 0); $offsetGraphs($getComponents(group, SIDES_SOUTH_WEST), 0, rowTopHeight + rowWeHeight + rowMidHeight); $offsetGraphs($getComponents(group, SIDES_EAST_SOUTH), colLeftWidth + colNsWidth + colMidWidth, rowTopHeight + rowWeHeight + rowMidHeight); $offsetGraphs($getComponents(group, SIDES_EAST_WEST), 0, rowTopHeight); $offsetGraphs($getComponents(group, SIDES_NORTH_SOUTH), colLeftWidth, 0); $offsetGraphs($getComponents(group, SIDES_EAST_SOUTH_WEST), 0, rowTopHeight + rowWeHeight + rowMidHeight); $offsetGraphs($getComponents(group, SIDES_NORTH_EAST_SOUTH), colLeftWidth + colNsWidth + colMidWidth, 0); componentSize = new KVector; componentSize.x_0 = maxd(stampJavaTypeInfo(getClassLiteralForArray(D_classLit, 1), $intern_66, 28, 15, [colLeftWidth + colMidWidth + colNsWidth + colRightWidth, sizeWE.x_0, sizeNWE.x_0, sizeSWE.x_0])); componentSize.y_0 = maxd(stampJavaTypeInfo(getClassLiteralForArray(D_classLit, 1), $intern_66, 28, 15, [rowTopHeight + rowMidHeight + rowWeHeight + rowBottomHeight, sizeNS.y_0, sizeWNS.y_0, sizeENS.y_0])); return componentSize; } function $placeComponentsHorizontally(components, spacing){ var component, component$iterator, size_0; size_0 = new KVector; for (component$iterator = components.iterator_0(); component$iterator.hasNext_0();) { component = castTo(component$iterator.next_1(), 36); $offsetGraph(component, size_0.x_0, 0); size_0.x_0 += component.size_0.x_0 + spacing; size_0.y_0 = $wnd.Math.max(size_0.y_0, component.size_0.y_0); } size_0.y_0 > 0 && (size_0.y_0 += spacing); return size_0; } function $placeComponentsInRows(components, spacing){ var broadestRow, component, component$iterator, componentSize, graph, graph$iterator, highestBox, maxRowWidth, size_0, totalArea, xpos, ypos; if (components.isEmpty()) { return new KVector; } maxRowWidth = 0; totalArea = 0; for (component$iterator = components.iterator_0(); component$iterator.hasNext_0();) { component = castTo(component$iterator.next_1(), 36); componentSize = component.size_0; maxRowWidth = $wnd.Math.max(maxRowWidth, componentSize.x_0); totalArea += componentSize.x_0 * componentSize.y_0; } maxRowWidth = $wnd.Math.max(maxRowWidth, $wnd.Math.sqrt(totalArea) * $doubleValue(castToDouble($getProperty(castTo(components.iterator_0().next_1(), 36), ($clinit_LayeredOptions() , ASPECT_RATIO_1))))); xpos = 0; ypos = 0; highestBox = 0; broadestRow = spacing; for (graph$iterator = components.iterator_0(); graph$iterator.hasNext_0();) { graph = castTo(graph$iterator.next_1(), 36); size_0 = graph.size_0; if (xpos + size_0.x_0 > maxRowWidth) { xpos = 0; ypos += highestBox + spacing; highestBox = 0; } $offsetGraph(graph, xpos, ypos); broadestRow = $wnd.Math.max(broadestRow, xpos + size_0.x_0); highestBox = $wnd.Math.max(highestBox, size_0.y_0); xpos += size_0.x_0 + spacing; } return new KVector_1(broadestRow + spacing, ypos + highestBox + spacing); } function $placeComponentsVertically(components, spacing){ var component, component$iterator, size_0; size_0 = new KVector; for (component$iterator = components.iterator_0(); component$iterator.hasNext_0();) { component = castTo(component$iterator.next_1(), 36); $offsetGraph(component, 0, size_0.y_0); size_0.y_0 += component.size_0.y_0 + spacing; size_0.x_0 = $wnd.Math.max(size_0.x_0, component.size_0.x_0); } size_0.x_0 > 0 && (size_0.x_0 += spacing); return size_0; } function ComponentGroupGraphPlacer(){ this.componentGroups = new ArrayList; } defineClass(779, 2104, {}, ComponentGroupGraphPlacer); _.addComponent = function addComponent(component){ var group, group$iterator; for (group$iterator = new ArrayList$1(this.componentGroups); group$iterator.i < group$iterator.this$01.array.length;) { group = castTo($next_6(group$iterator), 335); if (group.add_4(component)) { return; } } $add_3(this.componentGroups, new ComponentGroup(component)); } ; _.combine = function combine(components, target){ var compactor, component, component$iterator, componentSpacing, firstComponent, group, group$iterator, group$iterator0, groupSize, h, h$iterator, h$iterator0, offset; this.componentGroups.array.length = 0; target.layerlessNodes.array.length = 0; if (components.isEmpty()) { target.size_0.x_0 = 0; target.size_0.y_0 = 0; return; } firstComponent = castTo(components.get_0(0), 36); $copyProperties(target, firstComponent); for (component$iterator = components.iterator_0(); component$iterator.hasNext_0();) { component = castTo(component$iterator.next_1(), 36); this.addComponent(component); } offset = new KVector; componentSpacing = $doubleValue(castToDouble($getProperty(firstComponent, ($clinit_LayeredOptions() , SPACING_COMPONENT_COMPONENT_0)))); for (group$iterator0 = new ArrayList$1(this.componentGroups); group$iterator0.i < group$iterator0.this$01.array.length;) { group = castTo($next_6(group$iterator0), 335); groupSize = $placeComponents(group, componentSpacing); $offsetGraphs($values(group.components), offset.x_0, offset.y_0); offset.x_0 += groupSize.x_0; offset.y_0 += groupSize.y_0; } target.size_0.x_0 = offset.x_0 - componentSpacing; target.size_0.y_0 = offset.y_0 - componentSpacing; if ($booleanValue(castToBoolean($getProperty(firstComponent, COMPACTION_CONNECTED_COMPONENTS_0))) && maskUndefined($getProperty(firstComponent, EDGE_ROUTING)) === maskUndefined(($clinit_EdgeRouting() , ORTHOGONAL))) { for (h$iterator0 = components.iterator_0(); h$iterator0.hasNext_0();) { h = castTo(h$iterator0.next_1(), 36); $offsetGraph(h, h.offset.x_0, h.offset.y_0); } compactor = new ComponentsCompactor; $compact_5(compactor, components, componentSpacing); for (h$iterator = components.iterator_0(); h$iterator.hasNext_0();) { h = castTo(h$iterator.next_1(), 36); $add_19($reset_5(h.offset), compactor.yetAnotherOffset); } $add_19($reset_5(target.size_0), compactor.compactedGraphSize); } for (group$iterator = new ArrayList$1(this.componentGroups); group$iterator.i < group$iterator.this$01.array.length;) { group = castTo($next_6(group$iterator), 335); $moveGraphs(target, $values(group.components)); } } ; var Lorg_eclipse_elk_alg_layered_components_ComponentGroupGraphPlacer_2_classLit = createForClass('org.eclipse.elk.alg.layered.components', 'ComponentGroupGraphPlacer', 779); function $addComponent(this$static, component){ var group; if (this$static.componentGroups.array.length > 0) { group = castTo($get_11(this$static.componentGroups, this$static.componentGroups.array.length - 1), 579); if ($add_14(group, component)) { return; } } $add_3(this$static.componentGroups, new ModelOrderComponentGroup(component)); } function ComponentGroupModelOrderGraphPlacer(){ ComponentGroupGraphPlacer.call(this); } defineClass(1312, 779, {}, ComponentGroupModelOrderGraphPlacer); _.addComponent = function addComponent_0(component){ $addComponent(this, component); } ; _.combine = function combine_0(components, target){ var compactor, component, component$iterator, componentSpacing, firstComponent, group, group$iterator, group$iterator0, groupSize, h, h$iterator, h$iterator0, maxSize, offset, side, side$iterator, spaceBlockedByComponents, spaceBlockedBySouthEdges; this.componentGroups.array.length = 0; target.layerlessNodes.array.length = 0; if (components.isEmpty()) { target.size_0.x_0 = 0; target.size_0.y_0 = 0; return; } firstComponent = castTo(components.get_0(0), 36); $copyProperties(target, firstComponent); for (component$iterator = components.iterator_0(); component$iterator.hasNext_0();) { component = castTo(component$iterator.next_1(), 36); $addComponent(this, component); } spaceBlockedBySouthEdges = new KVector; spaceBlockedByComponents = new KVector; offset = new KVector; maxSize = new KVector; componentSpacing = $doubleValue(castToDouble($getProperty(firstComponent, ($clinit_LayeredOptions() , SPACING_COMPONENT_COMPONENT_0)))); for (group$iterator0 = new ArrayList$1(this.componentGroups); group$iterator0.i < group$iterator0.this$01.array.length;) { group = castTo($next_6(group$iterator0), 335); if ($isHorizontal(castTo($getProperty(target, ($clinit_CoreOptions() , DIRECTION_1)), 88))) { offset.x_0 = spaceBlockedBySouthEdges.x_0; for (side$iterator = new Maps$1($entries($keys(group.components).multimap).this$01.entryIterator()); side$iterator.backingIterator.hasNext_0();) { side = castTo($transform(side$iterator.backingIterator.next_1()), 21); if (side.contains(($clinit_PortSide() , NORTH_3))) { offset.x_0 = spaceBlockedByComponents.x_0; break; } } } else if ($isVertical(castTo($getProperty(target, DIRECTION_1), 88))) { offset.y_0 = spaceBlockedBySouthEdges.y_0; for (side$iterator = new Maps$1($entries($keys(group.components).multimap).this$01.entryIterator()); side$iterator.backingIterator.hasNext_0();) { side = castTo($transform(side$iterator.backingIterator.next_1()), 21); if (side.contains(($clinit_PortSide() , WEST_2))) { offset.y_0 = spaceBlockedByComponents.y_0; break; } } } groupSize = $placeComponents(castTo(group, 579), componentSpacing); $offsetGraphs($values(group.components), offset.x_0, offset.y_0); if ($isHorizontal(castTo($getProperty(target, DIRECTION_1), 88))) { spaceBlockedByComponents.x_0 = offset.x_0 + groupSize.x_0; maxSize.x_0 = $wnd.Math.max(maxSize.x_0, spaceBlockedByComponents.x_0); for (side$iterator = new Maps$1($entries($keys(group.components).multimap).this$01.entryIterator()); side$iterator.backingIterator.hasNext_0();) { side = castTo($transform(side$iterator.backingIterator.next_1()), 21); if (side.contains(($clinit_PortSide() , SOUTH_2))) { spaceBlockedBySouthEdges.x_0 = offset.x_0 + groupSize.x_0; break; } } spaceBlockedByComponents.y_0 = offset.y_0 + groupSize.y_0; offset.y_0 = spaceBlockedByComponents.y_0; maxSize.y_0 = $wnd.Math.max(maxSize.y_0, offset.y_0); } else if ($isVertical(castTo($getProperty(target, DIRECTION_1), 88))) { spaceBlockedByComponents.y_0 = offset.y_0 + groupSize.y_0; maxSize.y_0 = $wnd.Math.max(maxSize.y_0, spaceBlockedByComponents.y_0); for (side$iterator = new Maps$1($entries($keys(group.components).multimap).this$01.entryIterator()); side$iterator.backingIterator.hasNext_0();) { side = castTo($transform(side$iterator.backingIterator.next_1()), 21); if (side.contains(($clinit_PortSide() , EAST_2))) { spaceBlockedBySouthEdges.y_0 = offset.y_0 + groupSize.y_0; break; } } spaceBlockedByComponents.x_0 = offset.x_0 + groupSize.x_0; offset.x_0 = spaceBlockedByComponents.x_0; maxSize.x_0 = $wnd.Math.max(maxSize.x_0, offset.x_0); } } target.size_0.x_0 = maxSize.x_0 - componentSpacing; target.size_0.y_0 = maxSize.y_0 - componentSpacing; if ($booleanValue(castToBoolean($getProperty(firstComponent, COMPACTION_CONNECTED_COMPONENTS_0))) && maskUndefined($getProperty(firstComponent, EDGE_ROUTING)) === maskUndefined(($clinit_EdgeRouting() , ORTHOGONAL))) { for (h$iterator0 = components.iterator_0(); h$iterator0.hasNext_0();) { h = castTo(h$iterator0.next_1(), 36); $offsetGraph(h, h.offset.x_0, h.offset.y_0); } compactor = new ComponentsCompactor; $compact_5(compactor, components, componentSpacing); for (h$iterator = components.iterator_0(); h$iterator.hasNext_0();) { h = castTo(h$iterator.next_1(), 36); $add_19($reset_5(h.offset), compactor.yetAnotherOffset); } $add_19($reset_5(target.size_0), compactor.compactedGraphSize); } for (group$iterator = new ArrayList$1(this.componentGroups); group$iterator.i < group$iterator.this$01.array.length;) { group = castTo($next_6(group$iterator), 335); $moveGraphs(target, $values(group.components)); } } ; var Lorg_eclipse_elk_alg_layered_components_ComponentGroupModelOrderGraphPlacer_2_classLit = createForClass('org.eclipse.elk.alg.layered.components', 'ComponentGroupModelOrderGraphPlacer', 1312); function $clinit_ComponentOrderingStrategy(){ $clinit_ComponentOrderingStrategy = emptyMethod; NONE = new ComponentOrderingStrategy('NONE', 0); INSIDE_PORT_SIDE_GROUPS = new ComponentOrderingStrategy('INSIDE_PORT_SIDE_GROUPS', 1); GROUP_MODEL_ORDER = new ComponentOrderingStrategy('GROUP_MODEL_ORDER', 2); MODEL_ORDER = new ComponentOrderingStrategy('MODEL_ORDER', 3); } function ComponentOrderingStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_27(name_0){ $clinit_ComponentOrderingStrategy(); return valueOf(($clinit_ComponentOrderingStrategy$Map() , $MAP_17), name_0); } function values_35(){ $clinit_ComponentOrderingStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_components_ComponentOrderingStrategy_2_classLit, 1), $intern_37, 389, 0, [NONE, INSIDE_PORT_SIDE_GROUPS, GROUP_MODEL_ORDER, MODEL_ORDER]); } defineClass(389, 22, {3:1, 34:1, 22:1, 389:1}, ComponentOrderingStrategy); var GROUP_MODEL_ORDER, INSIDE_PORT_SIDE_GROUPS, MODEL_ORDER, NONE; var Lorg_eclipse_elk_alg_layered_components_ComponentOrderingStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.layered.components', 'ComponentOrderingStrategy', 389, Ljava_lang_Enum_2_classLit, values_35, valueOf_27); function $clinit_ComponentOrderingStrategy$Map(){ $clinit_ComponentOrderingStrategy$Map = emptyMethod; $MAP_17 = createValueOfMap(($clinit_ComponentOrderingStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_components_ComponentOrderingStrategy_2_classLit, 1), $intern_37, 389, 0, [NONE, INSIDE_PORT_SIDE_GROUPS, GROUP_MODEL_ORDER, MODEL_ORDER]))); } var $MAP_17; function $addLGraphElementBounds(pts, element, offset){ var margins; margins = null; !!element && (margins = element.margin); $add_12(pts, new Point(element.pos.x_0 - margins.left + offset.x_0, element.pos.y_0 - margins.top_0 + offset.y_0)); $add_12(pts, new Point(element.pos.x_0 - margins.left + offset.x_0, element.pos.y_0 + element.size_0.y_0 + margins.bottom + offset.y_0)); $add_12(pts, new Point(element.pos.x_0 + element.size_0.x_0 + margins.right + offset.x_0, element.pos.y_0 - margins.top_0 + offset.y_0)); $add_12(pts, new Point(element.pos.x_0 + element.size_0.x_0 + margins.right + offset.x_0, element.pos.y_0 + element.size_0.y_0 + margins.bottom + offset.y_0)); } function $compact_5(this$static, graphs, spacing){ var c, cc, cc$iterator, cc$iterator0, ccs, e, e$iterator, graph, graph$iterator, graph$iterator0, last, lastArg, n, n$iterator, newPos, node, node$iterator, offset, v, v$iterator, vc, compaction; this$static.graphTopLeft = new KVector_1($intern_60, $intern_60); this$static.graphBottomRight = new KVector_1($intern_61, $intern_61); for (graph$iterator0 = graphs.iterator_0(); graph$iterator0.hasNext_0();) { graph = castTo(graph$iterator0.next_1(), 36); for (node$iterator = new ArrayList$1(graph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); this$static.graphTopLeft.x_0 = $wnd.Math.min(this$static.graphTopLeft.x_0, node.pos.x_0 - node.margin.left); this$static.graphTopLeft.y_0 = $wnd.Math.min(this$static.graphTopLeft.y_0, node.pos.y_0 - node.margin.top_0); this$static.graphBottomRight.x_0 = $wnd.Math.max(this$static.graphBottomRight.x_0, node.pos.x_0 + node.size_0.x_0 + node.margin.right); this$static.graphBottomRight.y_0 = $wnd.Math.max(this$static.graphBottomRight.y_0, node.pos.y_0 + node.size_0.y_0 + node.margin.bottom); } } ccs = new ComponentsCompactor$InternalConnectedComponents; for (graph$iterator = graphs.iterator_0(); graph$iterator.hasNext_0();) { graph = castTo(graph$iterator.next_1(), 36); c = $transformLGraph(this$static, graph); $add_3(ccs.components, c); c.containsRegularNodes = c.containsRegularNodes | !castTo($getProperty(c.graph_0, ($clinit_InternalProperties_1() , EXT_PORT_CONNECTIONS)), 21).isEmpty(); } this$static.compactor = ($clinit_OneDimensionalComponentsCompaction() , compaction = new OneDimensionalComponentsCompaction , compaction.transformer = new ComponentsToCGraphTransformer(spacing) , compaction.compactionGraph = $transform_0(compaction.transformer, ccs) , compaction); $compact_2((lastArg = this$static.compactor , new BasicProgressMonitor , lastArg)); this$static.yetAnotherOffset = new KVector; this$static.compactedGraphSize = this$static.compactor.transformer.graphSize; for (cc$iterator0 = new ArrayList$1(ccs.components); cc$iterator0.i < cc$iterator0.this$01.array.length;) { cc = castTo($next_6(cc$iterator0), 855); offset = $getOffset_0(this$static.compactor, cc); offsetGraph(cc.graph_0, offset.x_0, offset.y_0); for (n$iterator = new ArrayList$1(cc.graph_0.layerlessNodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); if (n.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { newPos = $getExternalPortPosition(this$static, n.pos, castTo($getProperty(n, ($clinit_InternalProperties_1() , EXT_PORT_SIDE)), 64)); $add_19($reset_5(n.pos), newPos); } } } for (cc$iterator = new ArrayList$1(ccs.components); cc$iterator.i < cc$iterator.this$01.array.length;) { cc = castTo($next_6(cc$iterator), 855); for (e$iterator = new ArrayList$1($getExternalEdges(cc)); e$iterator.i < e$iterator.this$01.array.length;) { e = castTo($next_6(e$iterator), 18); vc = new KVectorChain_0(e.bendPoints); $add_0(vc, 0, $getAbsoluteAnchor(e.source)); $add_7(vc, $getAbsoluteAnchor(e.target)); last = null; for (v$iterator = $listIterator_2(vc, 0); v$iterator.currentNode != v$iterator.this$01.tail;) { v = castTo($next_9(v$iterator), 8); if (!last) { last = v; continue; } if (fuzzyEquals(last.x_0, v.x_0)) { this$static.yetAnotherOffset.x_0 = $wnd.Math.min(this$static.yetAnotherOffset.x_0, last.x_0); this$static.compactedGraphSize.x_0 = $wnd.Math.max(this$static.compactedGraphSize.x_0, last.x_0); } else if (fuzzyEquals(last.y_0, v.y_0)) { this$static.yetAnotherOffset.y_0 = $wnd.Math.min(this$static.yetAnotherOffset.y_0, last.y_0); this$static.compactedGraphSize.y_0 = $wnd.Math.max(this$static.compactedGraphSize.y_0, last.y_0); } last = v; } } } $negate_0(this$static.yetAnotherOffset); $add_19(this$static.compactedGraphSize, this$static.yetAnotherOffset); } function $componentHullPoints(graph){ var absolute, bp, bp$iterator, edge, edge$iterator, n, n$iterator, pts; pts = new ComponentsCompactor$Hullpoints; for (n$iterator = new ArrayList$1(graph.layerlessNodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); if (n.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { continue; } $addLGraphElementBounds(pts, n, new KVector); for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(n).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); if (edge.source.owner.type_0 == EXTERNAL_PORT || edge.target.owner.type_0 == EXTERNAL_PORT) { continue; } for (bp$iterator = $listIterator_2(edge.bendPoints, 0); bp$iterator.currentNode != bp$iterator.this$01.tail;) { bp = castTo($next_9(bp$iterator), 8); absolute = bp; $add_12(pts, new Point(absolute.x_0, absolute.y_0)); } } } return pts; } function $createDummyNode(graph){ var dummy, dummyEdge, dummyPort, extPortDummy, extPortDummyPort; extPortDummy = castTo($get_11(graph.layerlessNodes, 0), 10); dummy = new LNode(graph); $add_3(graph.layerlessNodes, dummy); dummy.size_0.x_0 = $wnd.Math.max(1, extPortDummy.size_0.x_0); dummy.size_0.y_0 = $wnd.Math.max(1, extPortDummy.size_0.y_0); dummy.pos.x_0 = extPortDummy.pos.x_0; dummy.pos.y_0 = extPortDummy.pos.y_0; switch (castTo($getProperty(extPortDummy, ($clinit_InternalProperties_1() , EXT_PORT_SIDE)), 64).ordinal) { case 4: dummy.pos.x_0 += 2; break; case 1: dummy.pos.y_0 += 2; break; case 2: dummy.pos.x_0 -= 2; break; case 3: dummy.pos.y_0 -= 2; } dummyPort = new LPort; $setNode(dummyPort, dummy); dummyEdge = new LEdge; extPortDummyPort = castTo($get_11(extPortDummy.ports, 0), 12); $setSource_0(dummyEdge, extPortDummyPort); $setTarget_0(dummyEdge, dummyPort); $add_19($reset_5(dummyPort.pos), extPortDummyPort.pos); $add_19($reset_5(dummyPort.anchor), extPortDummyPort.anchor); return dummy; } function $edgeToSegments(this$static, edge, externalExtension){ var externalPort, externalPortSide, i, outerSegmentIsFirst, p1, p2, points, segment, segments; externalPort = externalExtension.externalPort; externalPortSide = externalExtension.externalPortSide; p1 = $getAbsoluteAnchor(edge.source); p2 = $getAbsoluteAnchor(edge.target); if (externalPort == edge.source) { p1 = $getExternalPortPosition(this$static, p1, externalPortSide); p2 = $getPortPositionOnMargin(edge.target); } else { p1 = $getPortPositionOnMargin(edge.source); p2 = $getExternalPortPosition(this$static, p2, externalPortSide); } points = new KVectorChain_0(edge.bendPoints); $addNode_0(points, p1, points.header, points.header.next_0); $addNode_0(points, p2, points.tail.prev, points.tail); outerSegmentIsFirst = edge.source == externalPort; segments = new ComponentsCompactor$Segments; for (i = 0; i < points.size_0 - 1; ++i) { segment = new Pair(castTo($get_7(points, i), 8), castTo($get_7(points, i + 1), 8)); outerSegmentIsFirst && i == 0 || !outerSegmentIsFirst && i == points.size_0 - 2?(segments.outerSegment = segment):$add_3(segments.innerSegments, segment); } return segments; } function $getExternalPortPosition(this$static, pos, ps){ switch (ps.ordinal) { case 1: return new KVector_1(pos.x_0, $wnd.Math.min(this$static.graphTopLeft.y_0, pos.y_0)); case 2: return new KVector_1($wnd.Math.max(this$static.graphBottomRight.x_0, pos.x_0), pos.y_0); case 3: return new KVector_1(pos.x_0, $wnd.Math.max(this$static.graphBottomRight.y_0, pos.y_0)); case 4: return new KVector_1($wnd.Math.min(pos.x_0, this$static.graphTopLeft.x_0), pos.y_0); } return new KVector_1(pos.x_0, pos.y_0); } function $getPortPositionOnMargin(port){ var margins, pos; pos = $clone_1(sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [port.owner.pos, port.pos, port.anchor]))); margins = port.owner.margin; switch (port.side.ordinal) { case 1: pos.y_0 -= margins.top_0; break; case 2: pos.x_0 += margins.right; break; case 3: pos.y_0 += margins.bottom; break; case 4: pos.x_0 -= margins.left; } return pos; } function $portSideToDirection(side){ switch (side.ordinal) { case 1: return $clinit_Direction_0() , UP_1; case 4: return $clinit_Direction_0() , LEFT_6; case 2: return $clinit_Direction_0() , RIGHT_6; case 3: return $clinit_Direction_0() , DOWN_1; } return $clinit_Direction_0() , UNDEFINED_2; } function $segmentToRectangle(p1, p2, extent){ return new ElkRectangle_0($wnd.Math.min(p1.x_0, p2.x_0) - extent / 2, $wnd.Math.min(p1.y_0, p2.y_0) - extent / 2, $wnd.Math.abs(p1.x_0 - p2.x_0) + extent, $wnd.Math.abs(p1.y_0 - p2.y_0) + extent); } function $transformLEdge(this$static, externalEdge, hullPoints, outerSegments){ var extent, externalExtension, margins, outerSegmentRect, rect, segment, segment$iterator, segments, side, thickness; externalExtension = new ComponentsCompactor$InternalExternalExtension(externalEdge); segments = $edgeToSegments(this$static, externalEdge, externalExtension); thickness = $wnd.Math.max($doubleValue(castToDouble($getProperty(externalEdge, ($clinit_LayeredOptions() , EDGE_THICKNESS_0)))), 1); for (segment$iterator = new ArrayList$1(segments.innerSegments); segment$iterator.i < segment$iterator.this$01.array.length;) { segment = castTo($next_6(segment$iterator), 42); rect = $segmentToRectangle(castTo(segment.first, 8), castTo(segment.second, 8), thickness); returnVal = true; returnVal = returnVal & $add_13(hullPoints, new KVector_1(rect.x_0, rect.y_0)); returnVal = returnVal & $add_13(hullPoints, $add_18(new KVector_1(rect.x_0, rect.y_0), rect.width_0, 0)); returnVal = returnVal & $add_13(hullPoints, $add_18(new KVector_1(rect.x_0, rect.y_0), 0, rect.height)); returnVal & $add_13(hullPoints, $add_18(new KVector_1(rect.x_0, rect.y_0), rect.width_0, rect.height)); } side = externalExtension.externalPortSide; outerSegmentRect = $segmentToRectangle(castTo(segments.outerSegment.first, 8), castTo(segments.outerSegment.second, 8), thickness); if (side == ($clinit_PortSide() , WEST_2) || side == EAST_2) { outerSegments.min_0[side.ordinal] = $wnd.Math.min(outerSegments.min_0[side.ordinal], outerSegmentRect.y_0); outerSegments.max_0[side.ordinal] = $wnd.Math.max(outerSegments.max_0[side.ordinal], outerSegmentRect.y_0 + outerSegmentRect.height); } else { outerSegments.min_0[side.ordinal] = $wnd.Math.min(outerSegments.min_0[side.ordinal], outerSegmentRect.x_0); outerSegments.max_0[side.ordinal] = $wnd.Math.max(outerSegments.max_0[side.ordinal], outerSegmentRect.x_0 + outerSegmentRect.width_0); } extent = $intern_61; margins = externalExtension.externalPort.owner.margin; switch (side.ordinal) { case 4: extent = margins.right; break; case 2: extent = margins.left; break; case 1: extent = margins.bottom; break; case 3: extent = margins.top_0; } outerSegments.extent[side.ordinal] = $wnd.Math.max(outerSegments.extent[side.ordinal], extent); return externalExtension; } function $transformLGraph(this$static, graph){ var component, edge, edge$iterator, extension, extensions, extent, externalExtensions, hullPoints, iee, iuee, max_0, min_0, node, node$iterator, outerSegments, placeholder, ps, ps$iterator; component = new ComponentsCompactor$InternalComponent(graph); component.containsRegularNodes || $createDummyNode(graph); hullPoints = $componentHullPoints(graph); externalExtensions = new HashMultimap; outerSegments = new ComponentsCompactor$OuterSegments; for (node$iterator = new ArrayList$1(graph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); if (edge.source.owner.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT) || edge.target.owner.type_0 == EXTERNAL_PORT) { iee = $transformLEdge(this$static, edge, hullPoints, outerSegments); $put(externalExtensions, $portSideToDirection(iee.externalPortSide), iee.edge); } } } extensions = new ArrayList; for (ps$iterator = castTo($getProperty(component.graph_0, ($clinit_InternalProperties_1() , EXT_PORT_CONNECTIONS)), 21).iterator_0(); ps$iterator.hasNext_0();) { ps = castTo(ps$iterator.next_1(), 64); min_0 = outerSegments.min_0[ps.ordinal]; max_0 = outerSegments.max_0[ps.ordinal]; extent = outerSegments.extent[ps.ordinal]; extension = null; placeholder = null; switch (ps.ordinal) { case 4: extension = new ElkRectangle_0(this$static.graphTopLeft.x_0, min_0, hullPoints.topLeft.x_0 - this$static.graphTopLeft.x_0, max_0 - min_0); placeholder = new ElkRectangle_0(this$static.graphTopLeft.x_0, min_0, extent, max_0 - min_0); $add_13(hullPoints, new KVector_1(extension.x_0 + extension.width_0, extension.y_0)); $add_13(hullPoints, new KVector_1(extension.x_0 + extension.width_0, extension.y_0 + extension.height)); break; case 2: extension = new ElkRectangle_0(hullPoints.bottomRight.x_0, min_0, this$static.graphBottomRight.x_0 - hullPoints.bottomRight.x_0, max_0 - min_0); placeholder = new ElkRectangle_0(this$static.graphBottomRight.x_0 - extent, min_0, extent, max_0 - min_0); $add_13(hullPoints, new KVector_1(extension.x_0, extension.y_0)); $add_13(hullPoints, new KVector_1(extension.x_0, extension.y_0 + extension.height)); break; case 1: extension = new ElkRectangle_0(min_0, this$static.graphTopLeft.y_0, max_0 - min_0, hullPoints.topLeft.y_0 - this$static.graphTopLeft.y_0); placeholder = new ElkRectangle_0(min_0, this$static.graphTopLeft.y_0, max_0 - min_0, extent); $add_13(hullPoints, new KVector_1(extension.x_0, extension.y_0 + extension.height)); $add_13(hullPoints, new KVector_1(extension.x_0 + extension.width_0, extension.y_0 + extension.height)); break; case 3: extension = new ElkRectangle_0(min_0, hullPoints.bottomRight.y_0, max_0 - min_0, this$static.graphBottomRight.y_0 - hullPoints.bottomRight.y_0); placeholder = new ElkRectangle_0(min_0, this$static.graphBottomRight.y_0 - extent, max_0 - min_0, extent); $add_13(hullPoints, new KVector_1(extension.x_0, extension.y_0)); $add_13(hullPoints, new KVector_1(extension.x_0 + extension.width_0, extension.y_0)); } if (extension) { iuee = new ComponentsCompactor$InternalUnionExternalExtension; iuee.side = ps; iuee.extension = extension; iuee.placeholder = placeholder; iuee.edges = newHashSet(castTo($get(externalExtensions, $portSideToDirection(ps)), 21)); push_1(extensions.array, iuee); } } $addAll_2(component.externalExtensions, extensions); component.rectilinearConvexHull = $splitIntoRectangles(of_5(hullPoints)); return component; } function ComponentsCompactor(){ } defineClass(659, 1, {}, ComponentsCompactor); var Lorg_eclipse_elk_alg_layered_components_ComponentsCompactor_2_classLit = createForClass('org.eclipse.elk.alg.layered.components', 'ComponentsCompactor', 659); function $add_12(this$static, e){ this$static.topLeft.x_0 = $wnd.Math.min(this$static.topLeft.x_0, e.x_0); this$static.topLeft.y_0 = $wnd.Math.min(this$static.topLeft.y_0, e.y_0); this$static.bottomRight.x_0 = $wnd.Math.max(this$static.bottomRight.x_0, e.x_0); this$static.bottomRight.y_0 = $wnd.Math.max(this$static.bottomRight.y_0, e.y_0); return push_1(this$static.array, e) , true; } function $add_13(this$static, e){ return $add_12(this$static, new Point(e.x_0, e.y_0)); } function ComponentsCompactor$Hullpoints(){ $$init_1(this); this.topLeft = new KVector_1($intern_60, $intern_60); this.bottomRight = new KVector_1($intern_61, $intern_61); } defineClass(1533, 13, $intern_71, ComponentsCompactor$Hullpoints); _.add_2 = function add_44(e){ return $add_12(this, castTo(e, 148)); } ; var Lorg_eclipse_elk_alg_layered_components_ComponentsCompactor$Hullpoints_2_classLit = createForClass('org.eclipse.elk.alg.layered.components', 'ComponentsCompactor/Hullpoints', 1533); function $getExternalEdges(this$static){ var edges, ee, ee$iterator; edges = new ArrayList; for (ee$iterator = new ArrayList$1(this$static.externalExtensions); ee$iterator.i < ee$iterator.this$01.array.length;) { ee = castTo($next_6(ee$iterator), 602); $addAll_2(edges, castTo(ee.getRepresentative(), 16)); } return edges; } function ComponentsCompactor$InternalComponent(graph){ var n, n$iterator; this.externalExtensions = new ArrayList; this.graph_0 = graph; this.containsRegularNodes = false; for (n$iterator = new ArrayList$1(graph.layerlessNodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); this.containsRegularNodes = this.containsRegularNodes | n.type_0 == ($clinit_LNode$NodeType() , NORMAL); } } defineClass(1530, 1, {855:1}, ComponentsCompactor$InternalComponent); _.containsRegularNodes = false; var Lorg_eclipse_elk_alg_layered_components_ComponentsCompactor$InternalComponent_2_classLit = createForClass('org.eclipse.elk.alg.layered.components', 'ComponentsCompactor/InternalComponent', 1530); function ComponentsCompactor$InternalConnectedComponents(){ this.components = new ArrayList; } defineClass(1529, 1, $intern_23, ComponentsCompactor$InternalConnectedComponents); _.forEach_0 = function forEach_25(action){ $forEach_0(this, action); } ; _.iterator_0 = function iterator_67(){ return new ArrayList$1(this.components); } ; var Lorg_eclipse_elk_alg_layered_components_ComponentsCompactor$InternalConnectedComponents_2_classLit = createForClass('org.eclipse.elk.alg.layered.components', 'ComponentsCompactor/InternalConnectedComponents', 1529); function ComponentsCompactor$InternalExternalExtension(edge){ this.edge = edge; if (edge.source.owner.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { this.externalPort = edge.source; this.externalPortSide = castTo($getProperty(edge.source.owner, ($clinit_InternalProperties_1() , EXT_PORT_SIDE)), 64); } else if (edge.target.owner.type_0 == EXTERNAL_PORT) { this.externalPort = edge.target; this.externalPortSide = castTo($getProperty(edge.target.owner, ($clinit_InternalProperties_1() , EXT_PORT_SIDE)), 64); } else { throw toJs(new IllegalArgumentException_0('Edge ' + edge + ' is not an external edge.')); } } defineClass(1532, 1, {602:1}, ComponentsCompactor$InternalExternalExtension); _.getPlaceholder = function getPlaceholder(){ return null; } ; _.getRepresentative = function getRepresentative(){ return this.edge; } ; _.getDirection = function getDirection(){ return $portSideToDirection(this.externalPortSide); } ; _.getRepresentor = function getRepresentor(){ return this.externalExtension; } ; var Lorg_eclipse_elk_alg_layered_components_ComponentsCompactor$InternalExternalExtension_2_classLit = createForClass('org.eclipse.elk.alg.layered.components', 'ComponentsCompactor/InternalExternalExtension', 1532); function ComponentsCompactor$InternalUnionExternalExtension(){ this.edges = new HashSet; } defineClass(1531, 1, {602:1}, ComponentsCompactor$InternalUnionExternalExtension); _.getRepresentative = function getRepresentative_0(){ return this.edges; } ; _.getDirection = function getDirection_0(){ return $portSideToDirection(this.side); } ; _.getPlaceholder = function getPlaceholder_0(){ return this.placeholder; } ; _.getRepresentor = function getRepresentor_0(){ return this.extension; } ; var Lorg_eclipse_elk_alg_layered_components_ComponentsCompactor$InternalUnionExternalExtension_2_classLit = createForClass('org.eclipse.elk.alg.layered.components', 'ComponentsCompactor/InternalUnionExternalExtension', 1531); function ComponentsCompactor$OuterSegments(){ this.min_0 = initUnidimensionalArray(D_classLit, $intern_66, 28, ($clinit_PortSide() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [UNDEFINED_5, NORTH_3, EAST_2, SOUTH_2, WEST_2])).length, 15, 1); this.max_0 = initUnidimensionalArray(D_classLit, $intern_66, 28, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [UNDEFINED_5, NORTH_3, EAST_2, SOUTH_2, WEST_2]).length, 15, 1); this.extent = initUnidimensionalArray(D_classLit, $intern_66, 28, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [UNDEFINED_5, NORTH_3, EAST_2, SOUTH_2, WEST_2]).length, 15, 1); fill_1(this.min_0, $intern_60); fill_1(this.max_0, $intern_61); fill_1(this.extent, $intern_61); } defineClass(1535, 1, {}, ComponentsCompactor$OuterSegments); var Lorg_eclipse_elk_alg_layered_components_ComponentsCompactor$OuterSegments_2_classLit = createForClass('org.eclipse.elk.alg.layered.components', 'ComponentsCompactor/OuterSegments', 1535); function ComponentsCompactor$Segments(){ this.innerSegments = new ArrayList; } defineClass(1534, 1, {}, ComponentsCompactor$Segments); var Lorg_eclipse_elk_alg_layered_components_ComponentsCompactor$Segments_2_classLit = createForClass('org.eclipse.elk.alg.layered.components', 'ComponentsCompactor/Segments', 1534); function $combine(this$static, components, target){ this$static.graphPlacer.combine(components, target); } function $dfs_1(this$static, node, data_0){ var all, component, extPortSides, mutableData, port1, port1$iterator, port2, port2$iterator; if (node.id_0 == 0) { node.id_0 = 1; mutableData = data_0; if (!mutableData) { component = new ArrayList; extPortSides = (all = castTo($getEnumConstants(Lorg_eclipse_elk_core_options_PortSide_2_classLit), 9) , new EnumSet$EnumSetImpl(all, castTo(createFrom(all, all.length), 9), 0)); mutableData = new Pair(component, extPortSides); } castTo(mutableData.first, 15).add_2(node); node.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT) && castTo(mutableData.second, 21).add_2(castTo($getProperty(node, ($clinit_InternalProperties_1() , EXT_PORT_SIDE)), 64)); for (port1$iterator = new ArrayList$1(node.ports); port1$iterator.i < port1$iterator.this$01.array.length;) { port1 = castTo($next_6(port1$iterator), 12); for (port2$iterator = $iterator(concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [new LPort$1(port1), new LPort$2(port1)]))); $hasNext_1(port2$iterator);) { port2 = castTo($next_0(port2$iterator), 12); $dfs_1(this$static, port2.owner, mutableData); } } return mutableData; } return null; } function $split_2(this$static, graph){ var compatiblePortConstraints, componentData, extPortConstraints, extPorts, n, n$iterator, newGraph, node, node$iterator, node$iterator0, result, separate, separateProperty; this$static.graphPlacer = this$static.simpleRowGraphPlacer; separateProperty = castToBoolean($getProperty(graph, ($clinit_LayeredOptions() , SEPARATE_CONNECTED_COMPONENTS_0))); separate = separateProperty == null || (checkCriticalNotNull(separateProperty) , separateProperty); extPorts = castTo($getProperty(graph, ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21).contains(($clinit_GraphProperties() , EXTERNAL_PORTS)); extPortConstraints = castTo($getProperty(graph, PORT_CONSTRAINTS_0), 101); compatiblePortConstraints = !(extPortConstraints == ($clinit_PortConstraints() , FIXED_ORDER) || extPortConstraints == FIXED_RATIO || extPortConstraints == FIXED_POS); if (separate && (compatiblePortConstraints || !extPorts)) { for (node$iterator0 = new ArrayList$1(graph.layerlessNodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); node.id_0 = 0; } result = new ArrayList; for (node$iterator = new ArrayList$1(graph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); componentData = $dfs_1(this$static, node, null); if (componentData) { newGraph = new LGraph; $copyProperties(newGraph, graph); $setProperty_0(newGraph, EXT_PORT_CONNECTIONS, castTo(componentData.second, 21)); $copy(newGraph.padding, graph.padding); $setProperty_0(newGraph, NODE_SIZE_MINIMUM_0, null); for (n$iterator = castTo(componentData.first, 15).iterator_0(); n$iterator.hasNext_0();) { n = castTo(n$iterator.next_1(), 10); $add_3(newGraph.layerlessNodes, n); n.graph_0 = newGraph; } result.add_2(newGraph); } } extPorts && (maskUndefined($getProperty(graph, CONSIDER_MODEL_ORDER_COMPONENTS_0)) === maskUndefined(($clinit_ComponentOrderingStrategy() , GROUP_MODEL_ORDER))?(this$static.graphPlacer = this$static.componentGroupModelOrderGraphPlacer):maskUndefined($getProperty(graph, CONSIDER_MODEL_ORDER_COMPONENTS_0)) === maskUndefined(MODEL_ORDER)?(this$static.graphPlacer = this$static.modelOrderRowGraphPlacer):(this$static.graphPlacer = this$static.componentGroupGraphPlacer)); } else { result = new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_graph_LGraph_2_classLit, 1), $intern_104, 36, 0, [graph])); } maskUndefined($getProperty(graph, CONSIDER_MODEL_ORDER_COMPONENTS_0)) !== maskUndefined(($clinit_ComponentOrderingStrategy() , NONE)) && ($clinit_Collections() , result.sort_0(new ComponentsProcessor$lambda$0$Type)); return result; } function ComponentsProcessor_0(){ this.componentGroupGraphPlacer = new ComponentGroupGraphPlacer; this.componentGroupModelOrderGraphPlacer = new ComponentGroupModelOrderGraphPlacer; this.modelOrderRowGraphPlacer = new ModelOrderRowGraphPlacer; this.simpleRowGraphPlacer = new SimpleRowGraphPlacer; } function lambda$0_23(g1_0, g2_1){ var g1Order, g2Order; g1Order = getMinimalModelOrder(g1_0); g2Order = getMinimalModelOrder(g2_1); return g1Order < g2Order?-1:g1Order > g2Order?1:0; } defineClass(1282, 1, {}, ComponentsProcessor_0); var Lorg_eclipse_elk_alg_layered_components_ComponentsProcessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.components', 'ComponentsProcessor', 1282); function ComponentsProcessor$lambda$0$Type(){ } defineClass(1283, 1, $intern_88, ComponentsProcessor$lambda$0$Type); _.compare_1 = function compare_38(arg0, arg1){ return lambda$0_23(castTo(arg0, 36), castTo(arg1, 36)); } ; _.equals_0 = function equals_94(other){ return this === other; } ; _.reversed = function reversed_30(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_components_ComponentsProcessor$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.components', 'ComponentsProcessor/lambda$0$Type', 1283); function $clinit_ModelOrderComponentGroup(){ $clinit_ModelOrderComponentGroup = emptyMethod; $clinit_ComponentGroup(); MODEL_ORDER_CONSTRAINTS = new HashMultimap; $put(MODEL_ORDER_CONSTRAINTS, ($clinit_PortSide() , SIDES_NORTH), SIDES_NONE); $put(MODEL_ORDER_CONSTRAINTS, SIDES_WEST, SIDES_NONE); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST, SIDES_NONE); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_WEST, SIDES_NONE); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_SOUTH_WEST, SIDES_NONE); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST_WEST, SIDES_NONE); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_WEST, SIDES_NORTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NONE, SIDES_EAST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH, SIDES_EAST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_WEST, SIDES_EAST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST, SIDES_EAST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_SOUTH, SIDES_EAST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_WEST, SIDES_EAST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_SOUTH_WEST, SIDES_EAST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST_WEST, SIDES_EAST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_EAST_WEST, SIDES_EAST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NONE, SIDES_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH, SIDES_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_EAST, SIDES_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_WEST, SIDES_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST, SIDES_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_SOUTH, SIDES_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_WEST, SIDES_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_EAST_WEST, SIDES_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_SOUTH_WEST, SIDES_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_SOUTH_WEST, SIDES_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST_SOUTH, SIDES_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST_WEST, SIDES_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH, SIDES_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST, SIDES_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_WEST, SIDES_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST_WEST, SIDES_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH, SIDES_NORTH_EAST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_WEST, SIDES_NORTH_EAST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_WEST, SIDES_NORTH_EAST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST, SIDES_NORTH_EAST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_SOUTH_WEST, SIDES_NORTH_EAST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NONE, SIDES_EAST_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH, SIDES_EAST_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_EAST, SIDES_EAST_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_SOUTH, SIDES_EAST_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_WEST, SIDES_EAST_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST, SIDES_EAST_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_SOUTH, SIDES_EAST_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_WEST, SIDES_EAST_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_SOUTH_WEST, SIDES_EAST_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_EAST_WEST, SIDES_EAST_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST_WEST, SIDES_EAST_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_SOUTH_WEST, SIDES_EAST_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST_SOUTH_WEST, SIDES_EAST_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NONE, SIDES_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH, SIDES_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_EAST, SIDES_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_WEST, SIDES_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST, SIDES_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_SOUTH, SIDES_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_WEST, SIDES_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_EAST_WEST, SIDES_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST_WEST, SIDES_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST_SOUTH, SIDES_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST_SOUTH_WEST, SIDES_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH, SIDES_EAST_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_WEST, SIDES_EAST_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST, SIDES_EAST_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_WEST, SIDES_EAST_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_SOUTH_WEST, SIDES_EAST_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST_WEST, SIDES_EAST_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_SOUTH_WEST, SIDES_EAST_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NONE, SIDES_EAST_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH, SIDES_EAST_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_EAST, SIDES_EAST_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_WEST, SIDES_EAST_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST, SIDES_EAST_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_SOUTH, SIDES_EAST_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_WEST, SIDES_EAST_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_EAST_WEST, SIDES_EAST_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST_WEST, SIDES_EAST_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH, SIDES_NORTH_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_EAST, SIDES_NORTH_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_SOUTH, SIDES_NORTH_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST, SIDES_NORTH_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NONE, SIDES_NORTH_EAST_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH, SIDES_NORTH_EAST_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_SOUTH, SIDES_NORTH_EAST_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_WEST, SIDES_NORTH_EAST_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST, SIDES_NORTH_EAST_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_SOUTH, SIDES_NORTH_EAST_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_WEST, SIDES_NORTH_EAST_SOUTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_WEST, SIDES_NORTH_EAST_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_EAST, SIDES_NORTH_EAST_SOUTH_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_EAST_WEST, SIDES_NONE); $put(MODEL_ORDER_CONSTRAINTS, SIDES_EAST_WEST, SIDES_WEST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_EAST_WEST, SIDES_EAST); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_SOUTH, SIDES_NONE); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_SOUTH, SIDES_NORTH); $put(MODEL_ORDER_CONSTRAINTS, SIDES_NORTH_SOUTH, SIDES_SOUTH); } function $add_14(this$static, component){ if ($canAdd(this$static, component)) { $put(this$static.components, castTo($getProperty(component, ($clinit_InternalProperties_1() , EXT_PORT_CONNECTIONS)), 21), component); $add_7(this$static.componentOrder, component); return true; } else { return false; } } function $canAdd(this$static, component){ var candidateSides, constraint, constraint$iterator, constraint$iterator0, constraints, modelOrderConstraints; candidateSides = castTo($getProperty(component, ($clinit_InternalProperties_1() , EXT_PORT_CONNECTIONS)), 21); constraints = castTo($get(($clinit_ComponentGroup() , CONSTRAINTS), candidateSides), 21); modelOrderConstraints = castTo($get(MODEL_ORDER_CONSTRAINTS, candidateSides), 21); for (constraint$iterator0 = constraints.iterator_0(); constraint$iterator0.hasNext_0();) { constraint = castTo(constraint$iterator0.next_1(), 21); if (!castTo($get(this$static.components, constraint), 15).isEmpty()) { return false; } } for (constraint$iterator = modelOrderConstraints.iterator_0(); constraint$iterator.hasNext_0();) { constraint = castTo(constraint$iterator.next_1(), 21); if (!castTo($get(this$static.components, constraint), 15).isEmpty()) { return false; } } return true; } function ModelOrderComponentGroup(component){ $clinit_ModelOrderComponentGroup(); $$init_5(this); this.componentOrder = new LinkedList; $add_14(this, component); $add_7(this.componentOrder, component); } defineClass(579, 335, {335:1, 579:1}, ModelOrderComponentGroup); _.add_4 = function add_45(component){ return $add_14(this, component); } ; _.canAdd = function canAdd_0(component){ return $canAdd(this, component); } ; var MODEL_ORDER_CONSTRAINTS; var Lorg_eclipse_elk_alg_layered_components_ModelOrderComponentGroup_2_classLit = createForClass('org.eclipse.elk.alg.layered.components', 'ModelOrderComponentGroup', 579); function SimpleRowGraphPlacer(){ } defineClass(1310, 2104, {}, SimpleRowGraphPlacer); _.combine = function combine_1(components, target){ var compactor, componentSpacing, firstComponent, graph, graph$iterator, h, h$iterator, maxRowWidth, size_0, source, totalArea; if (components.size_1() == 1) { source = castTo(components.get_0(0), 36); if (source != target) { target.layerlessNodes.array.length = 0; $moveGraph_0(target, source, 0, 0); $copyProperties(target, source); $copy(target.padding, source.padding); target.size_0.x_0 = source.size_0.x_0; target.size_0.y_0 = source.size_0.y_0; } return; } else if (components.isEmpty()) { target.layerlessNodes.array.length = 0; target.size_0.x_0 = 0; target.size_0.y_0 = 0; return; } this.sortComponents(components, target); firstComponent = castTo(components.get_0(0), 36); target.layerlessNodes.array.length = 0; $copyProperties(target, firstComponent); maxRowWidth = 0; totalArea = 0; for (graph$iterator = components.iterator_0(); graph$iterator.hasNext_0();) { graph = castTo(graph$iterator.next_1(), 36); size_0 = graph.size_0; maxRowWidth = $wnd.Math.max(maxRowWidth, size_0.x_0); totalArea += size_0.x_0 * size_0.y_0; } maxRowWidth = $wnd.Math.max(maxRowWidth, $wnd.Math.sqrt(totalArea) * $doubleValue(castToDouble($getProperty(target, ($clinit_LayeredOptions() , ASPECT_RATIO_1))))); componentSpacing = $doubleValue(castToDouble($getProperty(target, SPACING_COMPONENT_COMPONENT_0))); this.placeComponents(components, target, maxRowWidth, componentSpacing); if ($booleanValue(castToBoolean($getProperty(firstComponent, COMPACTION_CONNECTED_COMPONENTS_0)))) { compactor = new ComponentsCompactor; $compact_5(compactor, components, componentSpacing); for (h$iterator = components.iterator_0(); h$iterator.hasNext_0();) { h = castTo(h$iterator.next_1(), 36); $add_19($reset_5(h.offset), compactor.yetAnotherOffset); } $add_19($reset_5(target.size_0), compactor.compactedGraphSize); } $moveGraphs(target, components); } ; _.placeComponents = function placeComponents(components, target, maxRowWidth, componentSpacing){ var broadestRow, graph, graph$iterator, highestBox, offset, size_0, xpos, ypos; xpos = 0; ypos = 0; highestBox = 0; broadestRow = componentSpacing; for (graph$iterator = components.iterator_0(); graph$iterator.hasNext_0();) { graph = castTo(graph$iterator.next_1(), 36); size_0 = graph.size_0; if (xpos + size_0.x_0 > maxRowWidth) { xpos = 0; ypos += highestBox + componentSpacing; highestBox = 0; } offset = graph.offset; $offsetGraph(graph, xpos + offset.x_0, ypos + offset.y_0); $reset_5(offset); broadestRow = $wnd.Math.max(broadestRow, xpos + size_0.x_0); highestBox = $wnd.Math.max(highestBox, size_0.y_0); xpos += size_0.x_0 + componentSpacing; } target.size_0.x_0 = broadestRow; target.size_0.y_0 = ypos + highestBox; } ; _.sortComponents = function sortComponents(components, target){ var graph, graph$iterator, node, node$iterator, priority; if (maskUndefined($getProperty(target, ($clinit_LayeredOptions() , CONSIDER_MODEL_ORDER_COMPONENTS_0))) === maskUndefined(($clinit_ComponentOrderingStrategy() , NONE))) { for (graph$iterator = components.iterator_0(); graph$iterator.hasNext_0();) { graph = castTo(graph$iterator.next_1(), 36); priority = 0; for (node$iterator = new ArrayList$1(graph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); priority += castTo($getProperty(node, PRIORITY_0), 17).value_0; } graph.id_0 = priority; } $clinit_Collections(); components.sort_0(new SimpleRowGraphPlacer$1); } } ; var Lorg_eclipse_elk_alg_layered_components_SimpleRowGraphPlacer_2_classLit = createForClass('org.eclipse.elk.alg.layered.components', 'SimpleRowGraphPlacer', 1310); function ModelOrderRowGraphPlacer(){ } defineClass(1313, 1310, {}, ModelOrderRowGraphPlacer); _.placeComponents = function placeComponents_0(components, target, maxRowWidth, componentSpacing){ var broadestRow, graph, graph$iterator, highestBox, lastComponent, offset, size_0, startXOfRow, xpos, ypos; xpos = 0; ypos = 0; highestBox = 0; broadestRow = componentSpacing; lastComponent = null; startXOfRow = 0; for (graph$iterator = components.iterator_0(); graph$iterator.hasNext_0();) { graph = castTo(graph$iterator.next_1(), 36); size_0 = graph.size_0; if (xpos + size_0.x_0 > maxRowWidth && !castTo($getProperty(graph, ($clinit_InternalProperties_1() , EXT_PORT_CONNECTIONS)), 21).contains(($clinit_PortSide() , NORTH_3)) || !!lastComponent && castTo($getProperty(lastComponent, ($clinit_InternalProperties_1() , EXT_PORT_CONNECTIONS)), 21).contains(($clinit_PortSide() , EAST_2)) || castTo($getProperty(graph, ($clinit_InternalProperties_1() , EXT_PORT_CONNECTIONS)), 21).contains(($clinit_PortSide() , WEST_2))) { xpos = startXOfRow; ypos += highestBox + componentSpacing; highestBox = 0; } offset = graph.offset; castTo($getProperty(graph, ($clinit_InternalProperties_1() , EXT_PORT_CONNECTIONS)), 21).contains(($clinit_PortSide() , NORTH_3)) && (xpos = broadestRow + componentSpacing); $offsetGraph(graph, xpos + offset.x_0, ypos + offset.y_0); broadestRow = $wnd.Math.max(broadestRow, xpos + size_0.x_0); castTo($getProperty(graph, EXT_PORT_CONNECTIONS), 21).contains(SOUTH_2) && (startXOfRow = $wnd.Math.max(startXOfRow, xpos + size_0.x_0 + componentSpacing)); $reset_5(offset); highestBox = $wnd.Math.max(highestBox, size_0.y_0); xpos += size_0.x_0 + componentSpacing; lastComponent = graph; } target.size_0.x_0 = broadestRow; target.size_0.y_0 = ypos + highestBox; } ; _.sortComponents = function sortComponents_0(components, target){ } ; var Lorg_eclipse_elk_alg_layered_components_ModelOrderRowGraphPlacer_2_classLit = createForClass('org.eclipse.elk.alg.layered.components', 'ModelOrderRowGraphPlacer', 1313); function $compare_8(graph1, graph2){ var prio, size1, size2; prio = graph2.id_0 - graph1.id_0; if (prio == 0) { size1 = graph1.size_0.x_0 * graph1.size_0.y_0; size2 = graph2.size_0.x_0 * graph2.size_0.y_0; return compare_4(size1, size2); } return prio; } function SimpleRowGraphPlacer$1(){ } defineClass(1311, 1, $intern_88, SimpleRowGraphPlacer$1); _.compare_1 = function compare_39(graph1, graph2){ return $compare_8(castTo(graph1, 36), castTo(graph2, 36)); } ; _.equals_0 = function equals_95(other){ return this === other; } ; _.reversed = function reversed_31(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_components_SimpleRowGraphPlacer$1_2_classLit = createForClass('org.eclipse.elk.alg.layered.components', 'SimpleRowGraphPlacer/1', 1311); function $clinit_CompoundGraphPostprocessor(){ $clinit_CompoundGraphPostprocessor = emptyMethod; HAS_JUNCTION_POINTS_PREDICATE = new CompoundGraphPostprocessor$1; } function $process_0(graph, monitor){ var addUnnecessaryBendpoints, bendPoints, chEdge, chEdge$iterator, crossHierarchyEdges, crossHierarchyMap, dummyEdge, dummyEdge$iterator, dummyEdges, junctionPoints, lastPoint, ledge, nextPoint, offset, origEdge, origEdge$iterator, referenceGraph, referenceNode, sourcePoint, sourcePort, targetPoint, targetPort, xDiffEnough, yDiffEnough; monitor.begin('Compound graph postprocessor', 1); addUnnecessaryBendpoints = $booleanValue(castToBoolean($getProperty(graph, ($clinit_LayeredOptions() , UNNECESSARY_BENDPOINTS_0)))); crossHierarchyMap = castTo($getProperty(graph, ($clinit_InternalProperties_1() , CROSS_HIERARCHY_MAP)), 229); dummyEdges = new HashSet; for (origEdge$iterator = crossHierarchyMap.keySet_0().iterator_0(); origEdge$iterator.hasNext_0();) { origEdge = castTo(origEdge$iterator.next_1(), 18); crossHierarchyEdges = new ArrayList_1(crossHierarchyMap.get_1(origEdge)); $clinit_Collections(); $sort(crossHierarchyEdges, new CrossHierarchyEdgeComparator(graph)); sourcePort = $getActualSource((checkCriticalElementIndex(0, crossHierarchyEdges.array.length) , castTo(crossHierarchyEdges.array[0], 249))); targetPort = $getActualTarget(castTo($get_11(crossHierarchyEdges, crossHierarchyEdges.array.length - 1), 249)); referenceNode = sourcePort.owner; isDescendant(targetPort.owner, referenceNode)?(referenceGraph = referenceNode.nestedGraph):(referenceGraph = $getGraph(referenceNode)); junctionPoints = clearJunctionPoints(origEdge, crossHierarchyEdges); $reset_0(origEdge.bendPoints); lastPoint = null; for (chEdge$iterator = new ArrayList$1(crossHierarchyEdges); chEdge$iterator.i < chEdge$iterator.this$01.array.length;) { chEdge = castTo($next_6(chEdge$iterator), 249); offset = new KVector; changeCoordSystem(offset, chEdge.graph_0, referenceGraph); ledge = chEdge.newEdge; bendPoints = new KVectorChain; $addAllAsCopies(bendPoints, 0, ledge.bendPoints); $offset_2(bendPoints, offset); sourcePoint = new KVector_2($getAbsoluteAnchor(ledge.source)); targetPoint = new KVector_2($getAbsoluteAnchor(ledge.target)); $add_19(sourcePoint, offset); $add_19(targetPoint, offset); if (lastPoint) { bendPoints.size_0 == 0?(nextPoint = targetPoint):(nextPoint = (checkCriticalElement(bendPoints.size_0 != 0) , castTo(bendPoints.header.next_0.value_0, 8))); xDiffEnough = $wnd.Math.abs(lastPoint.x_0 - nextPoint.x_0) > $intern_101; yDiffEnough = $wnd.Math.abs(lastPoint.y_0 - nextPoint.y_0) > $intern_101; (!addUnnecessaryBendpoints && xDiffEnough && yDiffEnough || addUnnecessaryBendpoints && (xDiffEnough || yDiffEnough)) && $add_7(origEdge.bendPoints, sourcePoint); } $addAll(origEdge.bendPoints, bendPoints); bendPoints.size_0 == 0?(lastPoint = sourcePoint):(lastPoint = (checkCriticalElement(bendPoints.size_0 != 0) , castTo(bendPoints.tail.prev.value_0, 8))); copyJunctionPoints(ledge, junctionPoints, offset); if ($getActualTarget(chEdge) == targetPort) { if ($getGraph(targetPort.owner) != chEdge.graph_0) { offset = new KVector; changeCoordSystem(offset, $getGraph(targetPort.owner), referenceGraph); } $setProperty_0(origEdge, TARGET_OFFSET, offset); } copyLabelsBack(ledge, origEdge, referenceGraph); dummyEdges.map_0.put(ledge, dummyEdges); } $setSource_0(origEdge, sourcePort); $setTarget_0(origEdge, targetPort); } for (dummyEdge$iterator = dummyEdges.map_0.keySet_0().iterator_0(); dummyEdge$iterator.hasNext_0();) { dummyEdge = castTo(dummyEdge$iterator.next_1(), 18); $setSource_0(dummyEdge, null); $setTarget_0(dummyEdge, null); } monitor.done_1(); } function clearJunctionPoints(origEdge, crossHierarchyEdges){ var junctionPoints; junctionPoints = castTo($getProperty(origEdge, ($clinit_LayeredOptions() , JUNCTION_POINTS)), 75); if (any_0(crossHierarchyEdges, HAS_JUNCTION_POINTS_PREDICATE)) { if (!junctionPoints) { junctionPoints = new KVectorChain; $setProperty_0(origEdge, JUNCTION_POINTS, junctionPoints); } else { $reset_0(junctionPoints); } } else !!junctionPoints && $setProperty_0(origEdge, JUNCTION_POINTS, null); return junctionPoints; } function copyJunctionPoints(source, target, offset){ var jpCopies, ledgeJPs; ledgeJPs = castTo($getProperty(source, ($clinit_LayeredOptions() , JUNCTION_POINTS)), 75); if (ledgeJPs) { jpCopies = new KVectorChain; $addAllAsCopies(jpCopies, 0, ledgeJPs); $offset_2(jpCopies, offset); $addAll(target, jpCopies); } } function copyLabelsBack(hierarchySegment, origEdge, referenceGraph){ var currLabel, labelIterator; labelIterator = new AbstractList$ListIteratorImpl(hierarchySegment.labels, 0); while (labelIterator.i < labelIterator.this$01_0.size_1()) { currLabel = (checkCriticalElement(labelIterator.i < labelIterator.this$01_0.size_1()) , castTo(labelIterator.this$01_0.get_0(labelIterator.last = labelIterator.i++), 72)); if (maskUndefined($getProperty(currLabel, ($clinit_InternalProperties_1() , ORIGINAL_LABEL_EDGE))) !== maskUndefined(origEdge)) { continue; } changeCoordSystem(currLabel.pos, $getGraph(hierarchySegment.source.owner), referenceGraph); $remove_8(labelIterator); $add_3(origEdge.labels, currLabel); } } var HAS_JUNCTION_POINTS_PREDICATE; function CompoundGraphPostprocessor$1(){ } defineClass(1280, 1, $intern_89, CompoundGraphPostprocessor$1); _.apply_1 = function apply_61(chEdge){ var jps; return jps = castTo($getProperty(castTo(chEdge, 249).newEdge, ($clinit_LayeredOptions() , JUNCTION_POINTS)), 75) , !!jps && jps.size_0 != 0; } ; _.equals_0 = function equals_96(other){ return this === other; } ; _.test_0 = function test_16(input_0){ var jps; return jps = castTo($getProperty(castTo(input_0, 249).newEdge, ($clinit_LayeredOptions() , JUNCTION_POINTS)), 75) , !!jps && jps.size_0 != 0; } ; var Lorg_eclipse_elk_alg_layered_compound_CompoundGraphPostprocessor$1_2_classLit = createForClass('org.eclipse.elk.alg.layered.compound', 'CompoundGraphPostprocessor/1', 1280); function $calculateNetFlow(port){ var incomingEdge, incomingEdge$iterator, inputPortVote, insideSelfLoopsEnabled, isInsideSelfLoop, isSelfLoop, node, outgoingEdge, outgoingEdge$iterator, outputPortVote, sourceNode, targetNode; node = port.owner; insideSelfLoopsEnabled = $booleanValue(castToBoolean($getProperty(node, ($clinit_LayeredOptions() , INSIDE_SELF_LOOPS_ACTIVATE)))); outputPortVote = 0; inputPortVote = 0; for (outgoingEdge$iterator = new ArrayList$1(port.outgoingEdges); outgoingEdge$iterator.i < outgoingEdge$iterator.this$01.array.length;) { outgoingEdge = castTo($next_6(outgoingEdge$iterator), 18); isSelfLoop = $isSelfLoop(outgoingEdge); isInsideSelfLoop = isSelfLoop && insideSelfLoopsEnabled && $booleanValue(castToBoolean($getProperty(outgoingEdge, INSIDE_SELF_LOOPS_YO))); targetNode = outgoingEdge.target.owner; isSelfLoop && isInsideSelfLoop?++inputPortVote:isSelfLoop && !isInsideSelfLoop?++outputPortVote:$getGraph(targetNode).parentNode == node?++inputPortVote:++outputPortVote; } for (incomingEdge$iterator = new ArrayList$1(port.incomingEdges); incomingEdge$iterator.i < incomingEdge$iterator.this$01.array.length;) { incomingEdge = castTo($next_6(incomingEdge$iterator), 18); isSelfLoop = $isSelfLoop(incomingEdge); isInsideSelfLoop = isSelfLoop && insideSelfLoopsEnabled && $booleanValue(castToBoolean($getProperty(incomingEdge, INSIDE_SELF_LOOPS_YO))); sourceNode = incomingEdge.source.owner; isSelfLoop && isInsideSelfLoop?++outputPortVote:isSelfLoop && !isInsideSelfLoop?++inputPortVote:$getGraph(sourceNode).parentNode == node?++outputPortVote:++inputPortVote; } return outputPortVote - inputPortVote; } function $connectChild(this$static, graph, externalPort, origEdge, sourcePort, targetPort){ var dummyEdge; dummyEdge = $createDummyEdge(origEdge); $setSource_0(dummyEdge, sourcePort); $setTarget_0(dummyEdge, targetPort); $put(this$static.crossHierarchyMap, origEdge, new CrossHierarchyEdge(dummyEdge, graph, externalPort.type_0)); } function $connectSiblings(this$static, graph, externalOutputPort, containedExternalPorts, origEdge){ var dummyEdge, externalPort2, externalPort2$iterator, targetExternalPort; targetExternalPort = null; for (externalPort2$iterator = new ArrayList$1(containedExternalPorts); externalPort2$iterator.i < externalPort2$iterator.this$01.array.length;) { externalPort2 = castTo($next_6(externalPort2$iterator), 453); if (externalPort2 != externalOutputPort && $indexOf_3(externalPort2.origEdges, origEdge, 0) != -1) { targetExternalPort = externalPort2; break; } } dummyEdge = $createDummyEdge(origEdge); $setSource_0(dummyEdge, externalOutputPort.dummyPort); $setTarget_0(dummyEdge, targetExternalPort.dummyPort); $put(this$static.crossHierarchyMap, origEdge, new CrossHierarchyEdge(dummyEdge, graph, externalOutputPort.type_0)); } function $createDummyEdge(origEdge){ var dummyEdge; dummyEdge = new LEdge; $copyProperties(dummyEdge, origEdge); $setProperty_0(dummyEdge, ($clinit_LayeredOptions() , JUNCTION_POINTS), null); return dummyEdge; } function $createExternalPortDummy(this$static, graph, parentNode, portType, portSide, edge){ var dummyNode, dummyPort, layoutDirection, outsidePort, propertyHolder, offset; dummyNode = null; outsidePort = portType == ($clinit_PortType() , INPUT)?edge.source:edge.target; layoutDirection = getDirection_1(graph); if (outsidePort.owner == parentNode) { dummyNode = castTo($get_10(this$static.dummyNodeMap, outsidePort), 10); if (!dummyNode) { dummyNode = createExternalPortDummy(outsidePort, castTo($getProperty(parentNode, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101), portSide, $calculateNetFlow(outsidePort), null, outsidePort.pos, outsidePort.size_0, layoutDirection, graph); $setProperty_0(dummyNode, ($clinit_InternalProperties_1() , ORIGIN_0), outsidePort); $put_6(this$static.dummyNodeMap, outsidePort, dummyNode); } } else { dummyNode = createExternalPortDummy((propertyHolder = new MapPropertyHolder , offset = $doubleValue(castToDouble($getProperty(graph, ($clinit_LayeredOptions() , SPACING_EDGE_EDGE)))) / 2 , $setProperty(propertyHolder, PORT_BORDER_OFFSET, offset) , propertyHolder), castTo($getProperty(parentNode, PORT_CONSTRAINTS_0), 101), portSide, portType == INPUT?-1:1, null, new KVector, new KVector_1(0, 0), layoutDirection, graph); dummyPort = $createPortForDummy(dummyNode, parentNode, portType); $setProperty_0(dummyNode, ($clinit_InternalProperties_1() , ORIGIN_0), dummyPort); $put_6(this$static.dummyNodeMap, dummyPort, dummyNode); } castTo($getProperty(graph, ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21).add_2(($clinit_GraphProperties() , EXTERNAL_PORTS)); $isSideFixed(castTo($getProperty(graph, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101))?$setProperty_0(graph, PORT_CONSTRAINTS_0, ($clinit_PortConstraints() , FIXED_SIDE)):$setProperty_0(graph, PORT_CONSTRAINTS_0, ($clinit_PortConstraints() , FREE)); return dummyNode; } function $createPortForDummy(dummyNode, parentNode, type_0){ var graph, layoutDirection, port; graph = $getGraph(parentNode); layoutDirection = getDirection_1(graph); port = new LPort; $setNode(port, parentNode); switch (type_0.ordinal) { case 1: $setSide(port, $opposed(fromDirection(layoutDirection))); break; case 2: $setSide(port, fromDirection(layoutDirection)); } $setProperty_0(port, ($clinit_LayeredOptions() , PORT_BORDER_OFFSET), castToDouble($getProperty(dummyNode, PORT_BORDER_OFFSET))); return port; } function $getShallowestEdgeSegment(edgeSegments){ var crossHierarchyEdge, crossHierarchyEdge$iterator, index_0, result; result = -1; index_0 = 0; for (crossHierarchyEdge$iterator = new ArrayList$1(edgeSegments); crossHierarchyEdge$iterator.i < crossHierarchyEdge$iterator.this$01.array.length;) { crossHierarchyEdge = castTo($next_6(crossHierarchyEdge$iterator), 249); if (crossHierarchyEdge.type_0 == ($clinit_PortType() , INPUT)) { result = index_0 == 0?0:index_0 - 1; break; } else index_0 == edgeSegments.array.length - 1 && (result = index_0); index_0 += 1; } return result; } function $introduceHierarchicalEdgeSegment(this$static, graph, parentNode, origEdge, oppositePort, portType, defaultExternalPort){ var dummyEdge, dummyNode, externalPort, externalPortSide, mergeExternalPorts, parentEndPort, thickness; mergeExternalPorts = $booleanValue(castToBoolean($getProperty(graph, ($clinit_LayeredOptions() , MERGE_HIERARCHY_EDGES_0)))); parentEndPort = null; portType == ($clinit_PortType() , INPUT) && origEdge.source.owner == parentNode?(parentEndPort = origEdge.source):portType == OUTPUT && origEdge.target.owner == parentNode && (parentEndPort = origEdge.target); externalPort = defaultExternalPort; if (!externalPort || !mergeExternalPorts || !!parentEndPort) { externalPortSide = ($clinit_PortSide() , UNDEFINED_5); parentEndPort?(externalPortSide = parentEndPort.side):$isSideFixed(castTo($getProperty(parentNode, PORT_CONSTRAINTS_0), 101)) && (externalPortSide = portType == INPUT?WEST_2:EAST_2); dummyNode = $createExternalPortDummy(this$static, graph, parentNode, portType, externalPortSide, origEdge); dummyEdge = $createDummyEdge(($getGraph(parentNode) , origEdge)); if (portType == INPUT) { $setSource_0(dummyEdge, castTo($get_11(dummyNode.ports, 0), 12)); $setTarget_0(dummyEdge, oppositePort); } else { $setSource_0(dummyEdge, oppositePort); $setTarget_0(dummyEdge, castTo($get_11(dummyNode.ports, 0), 12)); } externalPort = new CompoundGraphPreprocessor$ExternalPort(origEdge, dummyEdge, dummyNode, castTo($getProperty(dummyNode, ($clinit_InternalProperties_1() , ORIGIN_0)), 12), portType, !parentEndPort); } else { $add_3(externalPort.origEdges, origEdge); thickness = $wnd.Math.max($doubleValue(castToDouble($getProperty(externalPort.newEdge, EDGE_THICKNESS_0))), $doubleValue(castToDouble($getProperty(origEdge, EDGE_THICKNESS_0)))); $setProperty_0(externalPort.newEdge, EDGE_THICKNESS_0, thickness); } $put(this$static.crossHierarchyMap, origEdge, new CrossHierarchyEdge(externalPort.newEdge, graph, portType)); return externalPort; } function $moveLabelsAndRemoveOriginalEdges(this$static, graph){ var currLabel, edgeSegments, labelIterator, origEdge, origEdge$iterator, targetDummyEdgeIndex, targetSegment; for (origEdge$iterator = $keySet(this$static.crossHierarchyMap).iterator_0(); origEdge$iterator.hasNext_0();) { origEdge = castTo(origEdge$iterator.next_1(), 18); if (origEdge.labels.array.length > 0) { edgeSegments = new ArrayList_1(castTo($get(this$static.crossHierarchyMap, origEdge), 21)); $clinit_Collections(); $sort(edgeSegments, new CrossHierarchyEdgeComparator(graph)); labelIterator = new AbstractList$ListIteratorImpl(origEdge.labels, 0); while (labelIterator.i < labelIterator.this$01_0.size_1()) { currLabel = (checkCriticalElement(labelIterator.i < labelIterator.this$01_0.size_1()) , castTo(labelIterator.this$01_0.get_0(labelIterator.last = labelIterator.i++), 72)); targetDummyEdgeIndex = -1; switch (castTo($getProperty(currLabel, ($clinit_LayeredOptions() , EDGE_LABELS_PLACEMENT)), 278).ordinal) { case 1: targetDummyEdgeIndex = edgeSegments.array.length - 1; break; case 0: targetDummyEdgeIndex = $getShallowestEdgeSegment(edgeSegments); break; case 2: targetDummyEdgeIndex = 0; } if (targetDummyEdgeIndex != -1) { targetSegment = (checkCriticalElementIndex(targetDummyEdgeIndex, edgeSegments.array.length) , castTo(edgeSegments.array[targetDummyEdgeIndex], 249)); $add_3(targetSegment.newEdge.labels, currLabel); castTo($getProperty($getGraph(targetSegment.newEdge.source.owner), ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21).add_2(($clinit_GraphProperties() , END_LABELS)); castTo($getProperty($getGraph(targetSegment.newEdge.source.owner), GRAPH_PROPERTIES), 21).add_2(CENTER_LABELS); $remove_8(labelIterator); $setProperty_0(currLabel, ORIGINAL_LABEL_EDGE, origEdge); } } } $setSource_0(origEdge, null); $setTarget_0(origEdge, null); } } function $process_1(this$static, graph, monitor){ monitor.begin('Compound graph preprocessor', 1); this$static.crossHierarchyMap = new HashMultimap; $transformHierarchyEdges(this$static, graph, null); $moveLabelsAndRemoveOriginalEdges(this$static, graph); $setSidesOfPortsToSidesOfDummyNodes(this$static); $setProperty_0(graph, ($clinit_InternalProperties_1() , CROSS_HIERARCHY_MAP), this$static.crossHierarchyMap); this$static.crossHierarchyMap = null; $reset(this$static.dummyNodeMap); monitor.done_1(); } function $processInnerHierarchicalEdgeSegments(this$static, graph, parentNode, containedExternalPorts, exportedExternalPorts){ var createdExternalPorts, currentExternalPort, externalPort, externalPort$iterator, externalPort$iterator0, inEdge, inEdge$iterator, newExternalPort, outEdge, outEdge$iterator, sourceNode, targetNode; createdExternalPorts = new ArrayList; for (externalPort$iterator0 = new ArrayList$1(containedExternalPorts); externalPort$iterator0.i < externalPort$iterator0.this$01.array.length;) { externalPort = castTo($next_6(externalPort$iterator0), 453); currentExternalPort = null; if (externalPort.type_0 == ($clinit_PortType() , OUTPUT)) { for (outEdge$iterator = new ArrayList$1(externalPort.origEdges); outEdge$iterator.i < outEdge$iterator.this$01.array.length;) { outEdge = castTo($next_6(outEdge$iterator), 18); targetNode = outEdge.target.owner; if ($getGraph(targetNode) == graph) { $connectChild(this$static, graph, externalPort, outEdge, externalPort.dummyPort, outEdge.target); } else if (!parentNode || isDescendant(targetNode, parentNode)) { $connectSiblings(this$static, graph, externalPort, containedExternalPorts, outEdge); } else { newExternalPort = $introduceHierarchicalEdgeSegment(this$static, graph, parentNode, outEdge, externalPort.dummyPort, OUTPUT, currentExternalPort); newExternalPort != currentExternalPort && (push_1(createdExternalPorts.array, newExternalPort) , true); newExternalPort.exported && (currentExternalPort = newExternalPort); } } } else { for (inEdge$iterator = new ArrayList$1(externalPort.origEdges); inEdge$iterator.i < inEdge$iterator.this$01.array.length;) { inEdge = castTo($next_6(inEdge$iterator), 18); sourceNode = inEdge.source.owner; if ($getGraph(sourceNode) == graph) { $connectChild(this$static, graph, externalPort, inEdge, inEdge.source, externalPort.dummyPort); } else if (!parentNode || isDescendant(sourceNode, parentNode)) { continue; } else { newExternalPort = $introduceHierarchicalEdgeSegment(this$static, graph, parentNode, inEdge, externalPort.dummyPort, INPUT, currentExternalPort); newExternalPort != currentExternalPort && (push_1(createdExternalPorts.array, newExternalPort) , true); newExternalPort.exported && (currentExternalPort = newExternalPort); } } } } for (externalPort$iterator = new ArrayList$1(createdExternalPorts); externalPort$iterator.i < externalPort$iterator.this$01.array.length;) { externalPort = castTo($next_6(externalPort$iterator), 453); $indexOf_3(graph.layerlessNodes, externalPort.dummyNode, 0) != -1 || $add_3(graph.layerlessNodes, externalPort.dummyNode); externalPort.exported && (push_1(exportedExternalPorts.array, externalPort) , true); } } function $processInsideSelfLoops(this$static, nestedGraph, node){ var dummyEdge, isInsideSelfLoop, isSelfLoop, lport, lport$iterator, outEdge, outEdge$array, outEdge$index, outEdge$max, outEdges, sourceExtPortDummy, sourcePort, targetExtPortDummy, targetPort; if (!$booleanValue(castToBoolean($getProperty(node, ($clinit_LayeredOptions() , INSIDE_SELF_LOOPS_ACTIVATE))))) { return; } for (lport$iterator = new ArrayList$1(node.ports); lport$iterator.i < lport$iterator.this$01.array.length;) { lport = castTo($next_6(lport$iterator), 12); outEdges = toEdgeArray(lport.outgoingEdges); for (outEdge$array = outEdges , outEdge$index = 0 , outEdge$max = outEdge$array.length; outEdge$index < outEdge$max; ++outEdge$index) { outEdge = outEdge$array[outEdge$index]; isSelfLoop = outEdge.target.owner == node; isInsideSelfLoop = isSelfLoop && $booleanValue(castToBoolean($getProperty(outEdge, INSIDE_SELF_LOOPS_YO))); if (isInsideSelfLoop) { sourcePort = outEdge.source; sourceExtPortDummy = castTo($get_10(this$static.dummyNodeMap, sourcePort), 10); if (!sourceExtPortDummy) { sourceExtPortDummy = createExternalPortDummy(sourcePort, ($clinit_PortConstraints() , FREE), sourcePort.side, -1, null, null, sourcePort.size_0, castTo($getProperty(nestedGraph, DIRECTION), 88), nestedGraph); $setProperty_0(sourceExtPortDummy, ($clinit_InternalProperties_1() , ORIGIN_0), sourcePort); $put_6(this$static.dummyNodeMap, sourcePort, sourceExtPortDummy); $add_3(nestedGraph.layerlessNodes, sourceExtPortDummy); } targetPort = outEdge.target; targetExtPortDummy = castTo($get_10(this$static.dummyNodeMap, targetPort), 10); if (!targetExtPortDummy) { targetExtPortDummy = createExternalPortDummy(targetPort, ($clinit_PortConstraints() , FREE), targetPort.side, 1, null, null, targetPort.size_0, castTo($getProperty(nestedGraph, DIRECTION), 88), nestedGraph); $setProperty_0(targetExtPortDummy, ($clinit_InternalProperties_1() , ORIGIN_0), targetPort); $put_6(this$static.dummyNodeMap, targetPort, targetExtPortDummy); $add_3(nestedGraph.layerlessNodes, targetExtPortDummy); } dummyEdge = $createDummyEdge(outEdge); $setSource_0(dummyEdge, castTo($get_11(sourceExtPortDummy.ports, 0), 12)); $setTarget_0(dummyEdge, castTo($get_11(targetExtPortDummy.ports, 0), 12)); $put(this$static.crossHierarchyMap, outEdge, new CrossHierarchyEdge(dummyEdge, nestedGraph, ($clinit_PortType() , OUTPUT))); castTo($getProperty(nestedGraph, ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21).add_2(($clinit_GraphProperties() , EXTERNAL_PORTS)); } } } } function $processOuterHierarchicalEdgeSegments(this$static, graph, parentNode, exportedExternalPorts){ var childNode, childNode$iterator, childPort, childPort$iterator, createdExternalPorts, currentExternalInputPort, currentExternalOutputPort, externalPort, externalPort$iterator, inEdge, inEdge$array, inEdge$index, inEdge$max, newExternalPort, outEdge, outEdge$array, outEdge$index, outEdge$max; createdExternalPorts = new ArrayList; for (childNode$iterator = new ArrayList$1(graph.layerlessNodes); childNode$iterator.i < childNode$iterator.this$01.array.length;) { childNode = castTo($next_6(childNode$iterator), 10); for (childPort$iterator = new ArrayList$1(childNode.ports); childPort$iterator.i < childPort$iterator.this$01.array.length;) { childPort = castTo($next_6(childPort$iterator), 12); currentExternalOutputPort = null; for (outEdge$array = toEdgeArray(childPort.outgoingEdges) , outEdge$index = 0 , outEdge$max = outEdge$array.length; outEdge$index < outEdge$max; ++outEdge$index) { outEdge = outEdge$array[outEdge$index]; if (!isDescendant(outEdge.target.owner, parentNode)) { newExternalPort = $introduceHierarchicalEdgeSegment(this$static, graph, parentNode, outEdge, outEdge.source, ($clinit_PortType() , OUTPUT), currentExternalOutputPort); newExternalPort != currentExternalOutputPort && (push_1(createdExternalPorts.array, newExternalPort) , true); newExternalPort.exported && (currentExternalOutputPort = newExternalPort); } } currentExternalInputPort = null; for (inEdge$array = toEdgeArray(childPort.incomingEdges) , inEdge$index = 0 , inEdge$max = inEdge$array.length; inEdge$index < inEdge$max; ++inEdge$index) { inEdge = inEdge$array[inEdge$index]; if (!isDescendant(inEdge.source.owner, parentNode)) { newExternalPort = $introduceHierarchicalEdgeSegment(this$static, graph, parentNode, inEdge, inEdge.target, ($clinit_PortType() , INPUT), currentExternalInputPort); newExternalPort != currentExternalInputPort && (push_1(createdExternalPorts.array, newExternalPort) , true); newExternalPort.exported && (currentExternalInputPort = newExternalPort); } } } } for (externalPort$iterator = new ArrayList$1(createdExternalPorts); externalPort$iterator.i < externalPort$iterator.this$01.array.length;) { externalPort = castTo($next_6(externalPort$iterator), 453); $indexOf_3(graph.layerlessNodes, externalPort.dummyNode, 0) != -1 || $add_3(graph.layerlessNodes, externalPort.dummyNode); externalPort.exported && (push_1(exportedExternalPorts.array, externalPort) , true); } } function $setSidesOfPortsToSidesOfDummyNodes(this$static){ var dummyNode, e, e$iterator, externalPort; for (e$iterator = new AbstractHashMap$EntrySetIterator((new AbstractHashMap$EntrySet(this$static.dummyNodeMap)).this$01); e$iterator.hasNext;) { e = $next_3(e$iterator); externalPort = castTo(e.getKey(), 12); dummyNode = castTo(e.getValue(), 10); $setProperty_0(dummyNode, ($clinit_InternalProperties_1() , ORIGIN_0), externalPort); $setProperty_0(externalPort, PORT_DUMMY, dummyNode); $setProperty_0(externalPort, INSIDE_CONNECTIONS, ($clinit_Boolean() , true)); $setSide(externalPort, castTo($getProperty(dummyNode, EXT_PORT_SIDE), 64)); $getProperty(dummyNode, EXT_PORT_SIDE); $setProperty_0(externalPort.owner, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0), ($clinit_PortConstraints() , FIXED_SIDE)); castTo($getProperty($getGraph(externalPort.owner), GRAPH_PROPERTIES), 21).add_2(($clinit_GraphProperties() , NON_FREE_PORTS)); } } function $transformHierarchyEdges(this$static, graph, parentNode){ var childPorts, containedExternalPorts, dummyNode, dummyNodePort, dummyPortLabel, exportedExternalPorts, extPortLabel, extPortLabel$iterator, insidePart, insidePortLabels, nestedGraph, node, node$iterator, port, port$iterator, portConstraints, side; containedExternalPorts = new ArrayList; for (node$iterator = new ArrayList$1(graph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); nestedGraph = node.nestedGraph; if (nestedGraph) { childPorts = $transformHierarchyEdges(this$static, nestedGraph, node); $addAll_2(containedExternalPorts, childPorts); $processInsideSelfLoops(this$static, nestedGraph, node); if (castTo($getProperty(nestedGraph, ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21).contains(($clinit_GraphProperties() , EXTERNAL_PORTS))) { portConstraints = castTo($getProperty(node, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101); insidePortLabels = castTo($getProperty(node, PORT_LABELS_PLACEMENT_1), 181).contains(($clinit_PortLabelPlacement() , INSIDE_0)); for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); dummyNode = castTo($get_10(this$static.dummyNodeMap, port), 10); if (!dummyNode) { dummyNode = createExternalPortDummy(port, portConstraints, port.side, -(port.incomingEdges.array.length - port.outgoingEdges.array.length), null, new KVector, port.size_0, castTo($getProperty(nestedGraph, DIRECTION), 88), nestedGraph); $setProperty_0(dummyNode, ORIGIN_0, port); $put_6(this$static.dummyNodeMap, port, dummyNode); $add_3(nestedGraph.layerlessNodes, dummyNode); } dummyNodePort = castTo($get_11(dummyNode.ports, 0), 12); for (extPortLabel$iterator = new ArrayList$1(port.labels); extPortLabel$iterator.i < extPortLabel$iterator.this$01.array.length;) { extPortLabel = castTo($next_6(extPortLabel$iterator), 72); dummyPortLabel = new LLabel; dummyPortLabel.size_0.x_0 = extPortLabel.size_0.x_0; dummyPortLabel.size_0.y_0 = extPortLabel.size_0.y_0; $add_3(dummyNodePort.labels, dummyPortLabel); if (!insidePortLabels) { side = port.side; insidePart = 0; isFixed(castTo($getProperty(node, PORT_LABELS_PLACEMENT_1), 21)) && (insidePart = computeInsidePart(extPortLabel.pos, extPortLabel.size_0, port.size_0, 0, side)); portConstraints == ($clinit_PortConstraints() , FREE) || ($clinit_PortSide() , SIDES_EAST_WEST).contains(side)?(dummyPortLabel.size_0.x_0 = insidePart):(dummyPortLabel.size_0.y_0 = insidePart); } } } } } } exportedExternalPorts = new ArrayList; $processInnerHierarchicalEdgeSegments(this$static, graph, parentNode, containedExternalPorts, exportedExternalPorts); !!parentNode && $processOuterHierarchicalEdgeSegments(this$static, graph, parentNode, exportedExternalPorts); return exportedExternalPorts; } function CompoundGraphPreprocessor(){ this.dummyNodeMap = new HashMap; } defineClass(1279, 1, $intern_105, CompoundGraphPreprocessor); _.process = function process_0(graph, monitor){ $process_1(this, castTo(graph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_compound_CompoundGraphPreprocessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.compound', 'CompoundGraphPreprocessor', 1279); function CompoundGraphPreprocessor$ExternalPort(origEdge, newEdge, dummyNode, dummyPort, portType, exported){ this.origEdges = new ArrayList; this.type_0 = ($clinit_PortType() , UNDEFINED_0); $add_3(this.origEdges, origEdge); this.newEdge = newEdge; this.dummyNode = dummyNode; this.dummyPort = dummyPort; this.type_0 = portType; this.exported = exported; } defineClass(453, 1, {453:1}, CompoundGraphPreprocessor$ExternalPort); _.exported = false; var Lorg_eclipse_elk_alg_layered_compound_CompoundGraphPreprocessor$ExternalPort_2_classLit = createForClass('org.eclipse.elk.alg.layered.compound', 'CompoundGraphPreprocessor/ExternalPort', 453); function $getActualSource(this$static){ if (this$static.newEdge.source.owner.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { return castTo($getProperty(this$static.newEdge.source.owner, ($clinit_InternalProperties_1() , ORIGIN_0)), 12); } return this$static.newEdge.source; } function $getActualTarget(this$static){ if (this$static.newEdge.target.owner.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { return castTo($getProperty(this$static.newEdge.target.owner, ($clinit_InternalProperties_1() , ORIGIN_0)), 12); } return this$static.newEdge.target; } function CrossHierarchyEdge(newEdge, graph, type_0){ this.newEdge = newEdge; this.graph_0 = graph; this.type_0 = type_0; } defineClass(249, 1, {249:1}, CrossHierarchyEdge); _.toString_0 = function toString_86(){ return $toString_3(this.type_0) + ':' + $toString_12(this.newEdge); } ; var Lorg_eclipse_elk_alg_layered_compound_CrossHierarchyEdge_2_classLit = createForClass('org.eclipse.elk.alg.layered.compound', 'CrossHierarchyEdge', 249); function $compare_9(this$static, edge1, edge2){ var level1, level2; if (edge1.type_0 == ($clinit_PortType() , OUTPUT) && edge2.type_0 == INPUT) { return -1; } else if (edge1.type_0 == INPUT && edge2.type_0 == OUTPUT) { return 1; } level1 = hierarchyLevel(edge1.graph_0, this$static.graph_0); level2 = hierarchyLevel(edge2.graph_0, this$static.graph_0); return edge1.type_0 == OUTPUT?level2 - level1:level1 - level2; } function CrossHierarchyEdgeComparator(graph){ this.graph_0 = graph; } function hierarchyLevel(nestedGraph, topLevelGraph){ var currentGraph, currentNode, level; currentGraph = nestedGraph; level = 0; do { if (currentGraph == topLevelGraph) { return level; } currentNode = currentGraph.parentNode; if (!currentNode) { throw toJs(new IllegalArgumentException); } currentGraph = $getGraph(currentNode); ++level; } while (true); } defineClass(777, 1, $intern_88, CrossHierarchyEdgeComparator); _.compare_1 = function compare_40(edge1, edge2){ return $compare_9(this, castTo(edge1, 249), castTo(edge2, 249)); } ; _.equals_0 = function equals_97(other){ return this === other; } ; _.reversed = function reversed_32(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_compound_CrossHierarchyEdgeComparator_2_classLit = createForClass('org.eclipse.elk.alg.layered.compound', 'CrossHierarchyEdgeComparator', 777); function $getDesignation(this$static){ var identifier; identifier = getOriginIdentifier(this$static); if (identifier) { return identifier; } return null; } defineClass(305, 137, {3:1, 305:1, 96:1, 137:1}); _.id_0 = 0; var Lorg_eclipse_elk_alg_layered_graph_LGraphElement_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LGraphElement', 305); function $getDesignation_0(this$static){ if (this$static.labels.array.length != 0 && !!castTo($get_11(this$static.labels, 0), 72).text_0) { return castTo($get_11(this$static.labels, 0), 72).text_0; } return $getDesignation(this$static); } function $getOther_1(this$static, node){ if (node == this$static.source.owner) { return this$static.target.owner; } else if (node == this$static.target.owner) { return this$static.source.owner; } else { throw toJs(new IllegalArgumentException_0("'node' must either be the source node or target node of the edge.")); } } function $getOther_2(this$static, port){ if (port == this$static.source) { return this$static.target; } else if (port == this$static.target) { return this$static.source; } else { throw toJs(new IllegalArgumentException_0("'port' must be either the source port or target port of the edge.")); } } function $isInLayerEdge(this$static){ return !$isSelfLoop(this$static) && this$static.source.owner.layer == this$static.target.owner.layer; } function $isSelfLoop(this$static){ if (!this$static.source || !this$static.target) { return false; } return !!this$static.source.owner && this$static.source.owner == this$static.target.owner; } function $reverse_0(this$static, adaptPorts){ var label_0, label$iterator, labelPlacement, oldSource, oldTarget, reversed; oldSource = this$static.source; oldTarget = this$static.target; $setSource_0(this$static, null); $setTarget_0(this$static, null); adaptPorts && $booleanValue(castToBoolean($getProperty(oldTarget, ($clinit_InternalProperties_1() , INPUT_COLLECT))))?$setSource_0(this$static, provideCollectorPort(oldTarget.owner, ($clinit_PortType() , OUTPUT), ($clinit_PortSide() , EAST_2))):$setSource_0(this$static, oldTarget); adaptPorts && $booleanValue(castToBoolean($getProperty(oldSource, ($clinit_InternalProperties_1() , OUTPUT_COLLECT))))?$setTarget_0(this$static, provideCollectorPort(oldSource.owner, ($clinit_PortType() , INPUT), ($clinit_PortSide() , WEST_2))):$setTarget_0(this$static, oldSource); for (label$iterator = new ArrayList$1(this$static.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 72); labelPlacement = castTo($getProperty(label_0, ($clinit_LayeredOptions() , EDGE_LABELS_PLACEMENT)), 278); labelPlacement == ($clinit_EdgeLabelPlacement() , TAIL)?$setProperty_0(label_0, EDGE_LABELS_PLACEMENT, HEAD):labelPlacement == HEAD && $setProperty_0(label_0, EDGE_LABELS_PLACEMENT, TAIL); } reversed = $booleanValue(castToBoolean($getProperty(this$static, ($clinit_InternalProperties_1() , REVERSED)))); $setProperty_0(this$static, REVERSED, ($clinit_Boolean() , reversed?false:true)); this$static.bendPoints = reverse_3(this$static.bendPoints); } function $setSource_0(this$static, source){ !!this$static.source && $remove_12(this$static.source.outgoingEdges, this$static); this$static.source = source; !!this$static.source && $add_3(this$static.source.outgoingEdges, this$static); } function $setTarget_0(this$static, target){ !!this$static.target && $remove_12(this$static.target.incomingEdges, this$static); this$static.target = target; !!this$static.target && $add_3(this$static.target.incomingEdges, this$static); } function $setTargetAndInsertAtIndex(this$static, targetPort, index_0){ !!this$static.target && $remove_12(this$static.target.incomingEdges, this$static); this$static.target = targetPort; !!this$static.target && $add_2(this$static.target.incomingEdges, index_0, this$static); } function $toString_12(this$static){ var designation, result; result = new StringBuilder; result.string += 'e_'; designation = $getDesignation_0(this$static); designation != null && (result.string += '' + designation , result); if (!!this$static.source && !!this$static.target) { $append_11((result.string += ' ' , result), $getDesignation_3(this$static.source)); $append_11($append_10((result.string += '[' , result), this$static.source.owner), ']'); $append_11((result.string += ' -> ' , result), $getDesignation_3(this$static.target)); $append_11($append_10((result.string += '[' , result), this$static.target.owner), ']'); } return result.string; } function LEdge(){ this.bendPoints = new KVectorChain; this.labels = (checkNonnegative(3, 'initialArraySize') , new ArrayList_0(3)); } defineClass(18, 305, {3:1, 18:1, 305:1, 96:1, 137:1}, LEdge); _.toString_0 = function toString_87(){ return $toString_12(this); } ; var Lorg_eclipse_elk_alg_layered_graph_LEdge_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LEdge', 18); function $toNodeArray(this$static){ var layer, layerIndex, layerIter, lgraphArray; lgraphArray = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LNode_2_classLit, $intern_16, 199, this$static.layers.array.length, 0, 2); layerIter = new AbstractList$ListIteratorImpl(this$static.layers, 0); while (layerIter.i < layerIter.this$01_0.size_1()) { layer = (checkCriticalElement(layerIter.i < layerIter.this$01_0.size_1()) , castTo(layerIter.this$01_0.get_0(layerIter.last = layerIter.i++), 30)); layerIndex = layerIter.i - 1; lgraphArray[layerIndex] = toNodeArray(layer.nodes); } return lgraphArray; } function LGraph(){ this.size_0 = new KVector; this.padding = new LPadding; this.offset = new KVector; this.layerlessNodes = new ArrayList; this.layers = new ArrayList; } defineClass(36, 305, {3:1, 20:1, 36:1, 305:1, 96:1, 137:1}, LGraph); _.forEach_0 = function forEach_26(action){ $forEach_0(this, action); } ; _.iterator_0 = function iterator_68(){ return new ArrayList$1(this.layers); } ; _.toString_0 = function toString_88(){ if (this.layers.array.length == 0) { return 'G-unlayered' + $toString_2(this.layerlessNodes); } else if (this.layerlessNodes.array.length == 0) { return 'G-layered' + $toString_2(this.layers); } return 'G[layerless' + $toString_2(this.layerlessNodes) + ', layers' + $toString_2(this.layers) + ']'; } ; var Lorg_eclipse_elk_alg_layered_graph_LGraph_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LGraph', 36); function $clinit_LGraphAdapters(){ $clinit_LGraphAdapters = emptyMethod; DEFAULT_PORTLIST_SORTER = new LGraphAdapters$PortComparator; } var DEFAULT_PORTLIST_SORTER; defineClass(666, 1, {}); _.getPosition = function getPosition(){ return this.element.pos; } ; _.getProperty = function getProperty_0(prop){ return $getProperty(this.element, prop); } ; _.getSize = function getSize(){ return this.element.size_0; } ; _.getVolatileId = function getVolatileId(){ return this.element.id_0; } ; _.hasProperty = function hasProperty_0(prop){ return $hasProperty(this.element, prop); } ; _.setPosition = function setPosition(pos){ this.element.pos.x_0 = pos.x_0; this.element.pos.y_0 = pos.y_0; } ; _.setSize = function setSize(size_0){ this.element.size_0.x_0 = size_0.x_0; this.element.size_0.y_0 = size_0.y_0; } ; _.setVolatileId = function setVolatileId(volatileId){ this.element.id_0 = volatileId; } ; var Lorg_eclipse_elk_alg_layered_graph_LGraphAdapters$AbstractLShapeAdapter_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LGraphAdapters/AbstractLShapeAdapter', 666); function LGraphAdapters$LEdgeAdapter(edge){ this.element = edge; } defineClass(474, 1, {853:1}, LGraphAdapters$LEdgeAdapter); _.getLabels = function getLabels(){ var l, l$iterator; if (!this.labelAdapters) { this.labelAdapters = newArrayListWithCapacity(this.element.labels.array.length); for (l$iterator = new ArrayList$1(this.element.labels); l$iterator.i < l$iterator.this$01.array.length;) { l = castTo($next_6(l$iterator), 72); $add_3(this.labelAdapters, new LGraphAdapters$LLabelAdapter(l)); } } return this.labelAdapters; } ; _.labelAdapters = null; var Lorg_eclipse_elk_alg_layered_graph_LGraphAdapters$LEdgeAdapter_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LGraphAdapters/LEdgeAdapter', 474); function LGraphAdapters$LGraphAdapter(element, transparentNorthSouthEdges, transparentCommentNodes, nodeFilter){ this.element = element; this.transparentNorthSouthEdges = transparentNorthSouthEdges; this.transparentCommentNodes = transparentCommentNodes; this.nodeFilter = nodeFilter; } defineClass(665, 1, {}, LGraphAdapters$LGraphAdapter); _.getNodes = function getNodes(){ var comment, comment$iterator, l, l$iterator, n, n$iterator; if (!this.nodeAdapters) { this.nodeAdapters = new ArrayList; for (l$iterator = new ArrayList$1(this.element.layers); l$iterator.i < l$iterator.this$01.array.length;) { l = castTo($next_6(l$iterator), 30); for (n$iterator = new ArrayList$1(l.nodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); if (this.nodeFilter.test_0(n)) { $add_3(this.nodeAdapters, new LGraphAdapters$LNodeAdapter(this, n, this.transparentNorthSouthEdges)); if (this.transparentCommentNodes) { if ($hasProperty(n, ($clinit_InternalProperties_1() , TOP_COMMENTS))) { for (comment$iterator = castTo($getProperty(n, TOP_COMMENTS), 15).iterator_0(); comment$iterator.hasNext_0();) { comment = castTo(comment$iterator.next_1(), 10); $add_3(this.nodeAdapters, new LGraphAdapters$LNodeAdapter(this, comment, false)); } } if ($hasProperty(n, BOTTOM_COMMENTS)) { for (comment$iterator = castTo($getProperty(n, BOTTOM_COMMENTS), 15).iterator_0(); comment$iterator.hasNext_0();) { comment = castTo(comment$iterator.next_1(), 10); $add_3(this.nodeAdapters, new LGraphAdapters$LNodeAdapter(this, comment, false)); } } } } } } } return this.nodeAdapters; } ; _.getPosition = function getPosition_0(){ throw toJs(new UnsupportedOperationException_0('Not supported by LGraph')); } ; _.getProperty = function getProperty_1(prop){ return $getProperty(this.element, prop); } ; _.getSize = function getSize_0(){ return this.element.size_0; } ; _.getVolatileId = function getVolatileId_0(){ return this.element.id_0; } ; _.hasProperty = function hasProperty_1(prop){ return $hasProperty(this.element, prop); } ; _.setPosition = function setPosition_0(pos){ throw toJs(new UnsupportedOperationException_0('Not supported by LGraph')); } ; _.setSize = function setSize_0(size_0){ this.element.size_0.x_0 = size_0.x_0; this.element.size_0.y_0 = size_0.y_0; } ; _.setVolatileId = function setVolatileId_0(volatileId){ this.element.id_0 = volatileId; } ; _.nodeAdapters = null; _.transparentCommentNodes = false; _.transparentNorthSouthEdges = false; var Lorg_eclipse_elk_alg_layered_graph_LGraphAdapters$LGraphAdapter_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LGraphAdapters/LGraphAdapter', 665); function LGraphAdapters$LLabelAdapter(element){ this.element = element; } defineClass(585, 666, {187:1}, LGraphAdapters$LLabelAdapter); var Lorg_eclipse_elk_alg_layered_graph_LGraphAdapters$LLabelAdapter_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LGraphAdapters/LLabelAdapter', 585); function $sortPortList(this$static, comparator){ $isOrderFixed(castTo($getProperty(castTo(this$static.element, 10), ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101)) && ($clinit_Collections() , $sort(castTo(this$static.element, 10).ports, comparator)); } function LGraphAdapters$LNodeAdapter(parent_0, element, transparentNorthSouthEdges){ this.element = element; this.parentGraphAdapter = parent_0; this.transparentNorthSouthEdges = transparentNorthSouthEdges; } defineClass(584, 666, {695:1}, LGraphAdapters$LNodeAdapter); _.getGraph = function getGraph(){ return this.parentGraphAdapter; } ; _.getIncomingEdges = function getIncomingEdges(){ return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } ; _.getLabels = function getLabels_0(){ var l, l$iterator; if (!this.labelAdapters) { this.labelAdapters = newArrayListWithCapacity(castTo(this.element, 10).labels.array.length); for (l$iterator = new ArrayList$1(castTo(this.element, 10).labels); l$iterator.i < l$iterator.this$01.array.length;) { l = castTo($next_6(l$iterator), 72); $add_3(this.labelAdapters, new LGraphAdapters$LLabelAdapter(l)); } } return this.labelAdapters; } ; _.getMargin = function getMargin(){ var lmargins; lmargins = castTo(this.element, 10).margin; return new ElkMargin_1(lmargins.top_0, lmargins.right, lmargins.bottom, lmargins.left); } ; _.getOutgoingEdges = function getOutgoingEdges(){ return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } ; _.getPorts = function getPorts(){ var p, p$iterator; if (!this.portAdapters) { this.portAdapters = newArrayListWithCapacity(castTo(this.element, 10).ports.array.length); for (p$iterator = new ArrayList$1(castTo(this.element, 10).ports); p$iterator.i < p$iterator.this$01.array.length;) { p = castTo($next_6(p$iterator), 12); $add_3(this.portAdapters, new LGraphAdapters$LPortAdapter(p, this.transparentNorthSouthEdges)); } } return this.portAdapters; } ; _.isCompoundNode = function isCompoundNode(){ return $booleanValue(castToBoolean($getProperty(castTo(this.element, 10), ($clinit_InternalProperties_1() , COMPOUND_NODE)))); } ; _.setMargin = function setMargin(margin){ castTo(this.element, 10).margin.left = margin.left; castTo(this.element, 10).margin.top_0 = margin.top_0; castTo(this.element, 10).margin.right = margin.right; castTo(this.element, 10).margin.bottom = margin.bottom; } ; _.setPadding = function setPadding(padding){ castTo(this.element, 10).padding.left = padding.left; castTo(this.element, 10).padding.top_0 = padding.top_0; castTo(this.element, 10).padding.right = padding.right; castTo(this.element, 10).padding.bottom = padding.bottom; } ; _.sortPortList = function sortPortList(){ $sortPortList(this, ($clinit_LGraphAdapters() , DEFAULT_PORTLIST_SORTER)); } ; _.labelAdapters = null; _.parentGraphAdapter = null; _.portAdapters = null; _.transparentNorthSouthEdges = false; var Lorg_eclipse_elk_alg_layered_graph_LGraphAdapters$LNodeAdapter_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LGraphAdapters/LNodeAdapter', 584); function LGraphAdapters$LPortAdapter(element, transparentNorthSouthEdges){ this.element = element; this.transparentNorthSouthEdges = transparentNorthSouthEdges; } defineClass(1788, 666, {852:1}, LGraphAdapters$LPortAdapter); _.getIncomingEdges = function getIncomingEdges_0(){ var e, e$iterator, e$iterator0, portDummy, sle, sle$iterator, slh, slp; if (this.transparentNorthSouthEdges && castTo(this.element, 12).owner.type_0 == ($clinit_LNode$NodeType() , NORTH_SOUTH_PORT)) { return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } else if (!this.incomingEdgeAdapters) { this.incomingEdgeAdapters = new ArrayList; for (e$iterator0 = new ArrayList$1(castTo(this.element, 12).incomingEdges); e$iterator0.i < e$iterator0.this$01.array.length;) { e = castTo($next_6(e$iterator0), 18); $add_3(this.incomingEdgeAdapters, new LGraphAdapters$LEdgeAdapter(e)); } if (this.transparentNorthSouthEdges) { portDummy = castTo($getProperty(castTo(this.element, 12), ($clinit_InternalProperties_1() , PORT_DUMMY)), 10); if (portDummy) { for (e$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(portDummy).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 18); $add_3(this.incomingEdgeAdapters, new LGraphAdapters$LEdgeAdapter(e)); } } } if ($hasProperty(castTo(this.element, 12).owner, ($clinit_InternalProperties_1() , SELF_LOOP_HOLDER))) { slh = castTo($getProperty(castTo(this.element, 12).owner, SELF_LOOP_HOLDER), 337); slp = castTo($get_16(slh.slPorts, this.element), 113); if (slp) { for (sle$iterator = new ArrayList$1(slp.incomingSLEdges); sle$iterator.i < sle$iterator.this$01.array.length;) { sle = castTo($next_6(sle$iterator), 340); $add_3(this.incomingEdgeAdapters, new LGraphAdapters$LEdgeAdapter(sle.lEdge)); } } } } return this.incomingEdgeAdapters; } ; _.getLabels = function getLabels_1(){ var l, l$iterator; if (!this.labelAdapters) { this.labelAdapters = newArrayListWithCapacity(castTo(this.element, 12).labels.array.length); for (l$iterator = new ArrayList$1(castTo(this.element, 12).labels); l$iterator.i < l$iterator.this$01.array.length;) { l = castTo($next_6(l$iterator), 72); $add_3(this.labelAdapters, new LGraphAdapters$LLabelAdapter(l)); } } return this.labelAdapters; } ; _.getOutgoingEdges = function getOutgoingEdges_0(){ var e, e$iterator, e$iterator0, portDummy, sle, sle$iterator, slh, slp; if (this.transparentNorthSouthEdges && castTo(this.element, 12).owner.type_0 == ($clinit_LNode$NodeType() , NORTH_SOUTH_PORT)) { return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } else if (!this.outgoingEdgeAdapters) { this.outgoingEdgeAdapters = new ArrayList; for (e$iterator0 = new ArrayList$1(castTo(this.element, 12).outgoingEdges); e$iterator0.i < e$iterator0.this$01.array.length;) { e = castTo($next_6(e$iterator0), 18); $add_3(this.outgoingEdgeAdapters, new LGraphAdapters$LEdgeAdapter(e)); } if (this.transparentNorthSouthEdges) { portDummy = castTo($getProperty(castTo(this.element, 12), ($clinit_InternalProperties_1() , PORT_DUMMY)), 10); if (portDummy) { for (e$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(portDummy).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 18); $add_3(this.outgoingEdgeAdapters, new LGraphAdapters$LEdgeAdapter(e)); } } } if ($hasProperty(castTo(this.element, 12).owner, ($clinit_InternalProperties_1() , SELF_LOOP_HOLDER))) { slh = castTo($getProperty(castTo(this.element, 12).owner, SELF_LOOP_HOLDER), 337); slp = castTo($get_16(slh.slPorts, this.element), 113); if (slp) { for (sle$iterator = new ArrayList$1(slp.outgoingSLEdges); sle$iterator.i < sle$iterator.this$01.array.length;) { sle = castTo($next_6(sle$iterator), 340); $add_3(this.outgoingEdgeAdapters, new LGraphAdapters$LEdgeAdapter(sle.lEdge)); } } } } return this.outgoingEdgeAdapters; } ; _.getSide = function getSide(){ return castTo(this.element, 12).side; } ; _.hasCompoundConnections = function hasCompoundConnections(){ return $booleanValue(castToBoolean($getProperty(castTo(this.element, 12), ($clinit_InternalProperties_1() , INSIDE_CONNECTIONS)))); } ; _.incomingEdgeAdapters = null; _.labelAdapters = null; _.outgoingEdgeAdapters = null; _.transparentNorthSouthEdges = false; var Lorg_eclipse_elk_alg_layered_graph_LGraphAdapters$LPortAdapter_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LGraphAdapters/LPortAdapter', 1788); function $compare_10(port1, port2){ var index1, index2, indexDifference, ordinalDifference; ordinalDifference = port1.side.ordinal - port2.side.ordinal; if (ordinalDifference != 0) { return ordinalDifference; } index1 = castTo($getProperty(port1, ($clinit_LayeredOptions() , PORT_INDEX)), 17); index2 = castTo($getProperty(port2, PORT_INDEX), 17); if (!!index1 && !!index2) { indexDifference = index1.value_0 - index2.value_0; if (indexDifference != 0) { return indexDifference; } } switch (port1.side.ordinal) { case 1: return compare_4(port1.pos.x_0, port2.pos.x_0); case 2: return compare_4(port1.pos.y_0, port2.pos.y_0); case 3: return compare_4(port2.pos.x_0, port1.pos.x_0); case 4: return compare_4(port2.pos.y_0, port1.pos.y_0); default:throw toJs(new IllegalStateException_0('Port side is undefined')); } } function LGraphAdapters$PortComparator(){ } defineClass(1789, 1, $intern_88, LGraphAdapters$PortComparator); _.compare_1 = function compare_41(port1, port2){ return $compare_10(castTo(port1, 12), castTo(port2, 12)); } ; _.equals_0 = function equals_98(other){ return this === other; } ; _.reversed = function reversed_33(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_graph_LGraphAdapters$PortComparator_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LGraphAdapters/PortComparator', 1789); function LGraphAdapters$lambda$0$Type(){ } defineClass(818, 1, $intern_40, LGraphAdapters$lambda$0$Type); _.test_0 = function test_17(arg0){ return castTo(arg0, 10) , $clinit_LGraphAdapters() , true; } ; var Lorg_eclipse_elk_alg_layered_graph_LGraphAdapters$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LGraphAdapters/lambda$0$Type', 818); function calcPortOffset(port, side){ var node; node = port.owner; switch (side.ordinal) { case 1: return -(port.pos.y_0 + port.size_0.y_0); case 2: return port.pos.x_0 - node.size_0.x_0; case 3: return port.pos.y_0 - node.size_0.y_0; case 4: return -(port.pos.x_0 + port.size_0.x_0); } return 0; } function calcPortSide(port, direction){ var height, heightPercent, node, nodeHeight, nodeWidth, width_0, widthPercent, xpos, ypos; node = port.owner; nodeWidth = node.size_0.x_0; nodeHeight = node.size_0.y_0; if (nodeWidth <= 0 && nodeHeight <= 0) { return $clinit_PortSide() , UNDEFINED_5; } xpos = port.pos.x_0; ypos = port.pos.y_0; width_0 = port.size_0.x_0; height = port.size_0.y_0; switch (direction.ordinal) { case 2: case 1: if (xpos < 0) { return $clinit_PortSide() , WEST_2; } else if (xpos + width_0 > nodeWidth) { return $clinit_PortSide() , EAST_2; } break; case 4: case 3: if (ypos < 0) { return $clinit_PortSide() , NORTH_3; } else if (ypos + height > nodeHeight) { return $clinit_PortSide() , SOUTH_2; } } widthPercent = (xpos + width_0 / 2) / nodeWidth; heightPercent = (ypos + height / 2) / nodeHeight; return widthPercent + heightPercent <= 1 && widthPercent - heightPercent <= 0?($clinit_PortSide() , WEST_2):widthPercent + heightPercent >= 1 && widthPercent - heightPercent >= 0?($clinit_PortSide() , EAST_2):heightPercent < 0.5?($clinit_PortSide() , NORTH_3):($clinit_PortSide() , SOUTH_2); } function centerPoint(point, boundary, side){ switch (side.ordinal) { case 1: point.x_0 = boundary.x_0 / 2; point.y_0 = 0; break; case 2: point.x_0 = boundary.x_0; point.y_0 = boundary.y_0 / 2; break; case 3: point.x_0 = boundary.x_0 / 2; point.y_0 = boundary.y_0; break; case 4: point.x_0 = 0; point.y_0 = boundary.y_0 / 2; } } function changeCoordSystem(point, oldGraph, newGraph){ var graph, node, padding; if (oldGraph == newGraph) { return; } graph = oldGraph; do { $add_19(point, graph.offset); node = graph.parentNode; if (node) { padding = graph.padding; $add_18(point, padding.left, padding.top_0); $add_19(point, node.pos); graph = $getGraph(node); } } while (node); graph = newGraph; do { $sub_0(point, graph.offset); node = graph.parentNode; if (node) { padding = graph.padding; $sub(point, padding.left, padding.top_0); $sub_0(point, node.pos); graph = $getGraph(node); } } while (node); } function createExternalPortDummy(propertyHolder, portConstraints, portSide, netFlow, portNodeSize, portPosition, portSize, layoutDirection, layeredGraph){ var anchor, dummy, dummyPort, explicitAnchor, finalExternalPortSide, informationAboutIt, portBorderOffset; finalExternalPortSide = portSide; dummy = new LNode(layeredGraph); $setType(dummy, ($clinit_LNode$NodeType() , EXTERNAL_PORT)); $setProperty_0(dummy, ($clinit_InternalProperties_1() , EXT_PORT_SIZE), portSize); $setProperty_0(dummy, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0), ($clinit_PortConstraints() , FIXED_POS)); portBorderOffset = $doubleValue(castToDouble(propertyHolder.getProperty(PORT_BORDER_OFFSET))); $setProperty_0(dummy, PORT_BORDER_OFFSET, portBorderOffset); dummyPort = new LPort; $setNode(dummyPort, dummy); if (!(portConstraints != FREE && portConstraints != UNDEFINED_4)) { netFlow >= 0?(finalExternalPortSide = fromDirection(layoutDirection)):(finalExternalPortSide = $opposed(fromDirection(layoutDirection))); propertyHolder.setProperty(PORT_SIDE, finalExternalPortSide); } anchor = new KVector; explicitAnchor = false; if (propertyHolder.hasProperty(PORT_ANCHOR)) { $set_8(anchor, castTo(propertyHolder.getProperty(PORT_ANCHOR), 8)); explicitAnchor = true; } else { $set_7(anchor, portSize.x_0 / 2, portSize.y_0 / 2); } switch (finalExternalPortSide.ordinal) { case 4: $setProperty_0(dummy, LAYERING_LAYER_CONSTRAINT_0, ($clinit_LayerConstraint() , FIRST_SEPARATE_0)); $setProperty_0(dummy, EDGE_CONSTRAINT, ($clinit_EdgeConstraint() , OUTGOING_ONLY)); dummy.size_0.y_0 = portSize.y_0; portBorderOffset < 0 && (dummy.size_0.x_0 = -portBorderOffset); $setSide(dummyPort, ($clinit_PortSide() , EAST_2)); explicitAnchor || (anchor.x_0 = portSize.x_0); anchor.x_0 -= portSize.x_0; break; case 2: $setProperty_0(dummy, LAYERING_LAYER_CONSTRAINT_0, ($clinit_LayerConstraint() , LAST_SEPARATE_0)); $setProperty_0(dummy, EDGE_CONSTRAINT, ($clinit_EdgeConstraint() , INCOMING_ONLY)); dummy.size_0.y_0 = portSize.y_0; portBorderOffset < 0 && (dummy.size_0.x_0 = -portBorderOffset); $setSide(dummyPort, ($clinit_PortSide() , WEST_2)); explicitAnchor || (anchor.x_0 = 0); break; case 1: $setProperty_0(dummy, IN_LAYER_CONSTRAINT, ($clinit_InLayerConstraint() , TOP_1)); dummy.size_0.x_0 = portSize.x_0; portBorderOffset < 0 && (dummy.size_0.y_0 = -portBorderOffset); $setSide(dummyPort, ($clinit_PortSide() , SOUTH_2)); explicitAnchor || (anchor.y_0 = portSize.y_0); anchor.y_0 -= portSize.y_0; break; case 3: $setProperty_0(dummy, IN_LAYER_CONSTRAINT, ($clinit_InLayerConstraint() , BOTTOM_0)); dummy.size_0.x_0 = portSize.x_0; portBorderOffset < 0 && (dummy.size_0.y_0 = -portBorderOffset); $setSide(dummyPort, ($clinit_PortSide() , NORTH_3)); explicitAnchor || (anchor.y_0 = 0); } $set_8(dummyPort.pos, anchor); $setProperty_0(dummy, PORT_ANCHOR, anchor); if (portConstraints == FIXED_ORDER || portConstraints == FIXED_RATIO || portConstraints == FIXED_POS) { informationAboutIt = 0; if (portConstraints == FIXED_ORDER && propertyHolder.hasProperty(PORT_INDEX)) { switch (finalExternalPortSide.ordinal) { case 1: case 2: informationAboutIt = castTo(propertyHolder.getProperty(PORT_INDEX), 17).value_0; break; case 3: case 4: informationAboutIt = -castTo(propertyHolder.getProperty(PORT_INDEX), 17).value_0; } } else { switch (finalExternalPortSide.ordinal) { case 4: case 2: informationAboutIt = portPosition.y_0; portConstraints == FIXED_RATIO && (informationAboutIt /= portNodeSize.y_0); break; case 1: case 3: informationAboutIt = portPosition.x_0; portConstraints == FIXED_RATIO && (informationAboutIt /= portNodeSize.x_0); } } $setProperty_0(dummy, PORT_RATIO_OR_POSITION_0, informationAboutIt); } $setProperty_0(dummy, EXT_PORT_SIDE, finalExternalPortSide); return dummy; } function createPort(node, endPoint, type_0, layeredGraph){ var defaultSide, direction, graphProperties, mergePorts, port, portSide, pos; direction = getDirection_1(layeredGraph); mergePorts = $booleanValue(castToBoolean($getProperty(layeredGraph, ($clinit_LayeredOptions() , MERGE_EDGES_0)))); if ((mergePorts || $booleanValue(castToBoolean($getProperty(node, HYPERNODE)))) && !$isSideFixed(castTo($getProperty(node, PORT_CONSTRAINTS_0), 101))) { defaultSide = fromDirection(direction); port = provideCollectorPort(node, type_0, type_0 == ($clinit_PortType() , OUTPUT)?defaultSide:$opposed(defaultSide)); } else { port = new LPort; $setNode(port, node); if (endPoint) { pos = port.pos; pos.x_0 = endPoint.x_0 - node.pos.x_0; pos.y_0 = endPoint.y_0 - node.pos.y_0; $bound(pos, 0, 0, node.size_0.x_0, node.size_0.y_0); $setSide(port, calcPortSide(port, direction)); } else { defaultSide = fromDirection(direction); $setSide(port, type_0 == ($clinit_PortType() , OUTPUT)?defaultSide:$opposed(defaultSide)); } graphProperties = castTo($getProperty(layeredGraph, ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21); portSide = port.side; switch (direction.ordinal) { case 2: case 1: (portSide == ($clinit_PortSide() , NORTH_3) || portSide == SOUTH_2) && graphProperties.add_2(($clinit_GraphProperties() , NORTH_SOUTH_PORTS)); break; case 4: case 3: (portSide == ($clinit_PortSide() , EAST_2) || portSide == WEST_2) && graphProperties.add_2(($clinit_GraphProperties() , NORTH_SOUTH_PORTS)); } } return port; } function findMaxNonDummyNodeWidth(layer){ var maxWidth, node, node$iterator, width_0; if ($isVertical(castTo($getProperty(layer.owner, ($clinit_LayeredOptions() , DIRECTION)), 88))) { return 0; } maxWidth = 0; for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (node.type_0 == ($clinit_LNode$NodeType() , NORMAL)) { width_0 = node.size_0.x_0; maxWidth = $wnd.Math.max(maxWidth, width_0); } } return maxWidth; } function getDirection_1(graph){ var aspectRatio, direction; direction = castTo($getProperty(graph, ($clinit_LayeredOptions() , DIRECTION)), 88); if (direction == ($clinit_Direction_0() , UNDEFINED_2)) { aspectRatio = $doubleValue(castToDouble($getProperty(graph, ASPECT_RATIO_1))); return aspectRatio >= 1?RIGHT_6:DOWN_1; } return direction; } function getExternalPortPosition(graph, portDummy, portWidth, portHeight){ var graphOffset, graphSize, padding, portOffset, portPosition; portPosition = new KVector_2(portDummy.pos); portPosition.x_0 += portDummy.size_0.x_0 / 2; portPosition.y_0 += portDummy.size_0.y_0 / 2; portOffset = $doubleValue(castToDouble($getProperty(portDummy, ($clinit_LayeredOptions() , PORT_BORDER_OFFSET)))); graphSize = graph.size_0; padding = graph.padding; graphOffset = graph.offset; switch (castTo($getProperty(portDummy, ($clinit_InternalProperties_1() , EXT_PORT_SIDE)), 64).ordinal) { case 1: portPosition.x_0 += padding.left + graphOffset.x_0 - portWidth / 2; portPosition.y_0 = -portHeight - portOffset; portDummy.pos.y_0 = -(padding.top_0 + portOffset + graphOffset.y_0); break; case 2: portPosition.x_0 = graphSize.x_0 + padding.left + padding.right + portOffset; portPosition.y_0 += padding.top_0 + graphOffset.y_0 - portHeight / 2; portDummy.pos.x_0 = graphSize.x_0 + padding.right + portOffset - graphOffset.x_0; break; case 3: portPosition.x_0 += padding.left + graphOffset.x_0 - portWidth / 2; portPosition.y_0 = graphSize.y_0 + padding.top_0 + padding.bottom + portOffset; portDummy.pos.y_0 = graphSize.y_0 + padding.bottom + portOffset - graphOffset.y_0; break; case 4: portPosition.x_0 = -portWidth - portOffset; portPosition.y_0 += padding.top_0 + graphOffset.y_0 - portHeight / 2; portDummy.pos.x_0 = -(padding.left + portOffset + graphOffset.x_0); } return portPosition; } function getIndividualOrInherited(node, property){ var individualSpacings, result; result = null; if ($hasProperty(node, ($clinit_CoreOptions() , SPACING_INDIVIDUAL_0))) { individualSpacings = castTo($getProperty(node, SPACING_INDIVIDUAL_0), 96); individualSpacings.hasProperty(property) && (result = individualSpacings.getProperty(property)); } result == null && !!$getGraph(node) && (result = $getProperty($getGraph(node), property)); return result; } function getMinimalModelOrder(graph){ var node, node$iterator, order; order = $intern_0; for (node$iterator = new ArrayList$1(graph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); $hasProperty(node, ($clinit_InternalProperties_1() , MODEL_ORDER_1)) && (order = $wnd.Math.min(order, castTo($getProperty(node, MODEL_ORDER_1), 17).value_0)); } return order; } function initializePort(port, portConstraints, direction, anchorPos){ var nodeHeight, nodeWidth, portAnchor, portSide, portSize, ratio; portSide = port.side; if (portSide == ($clinit_PortSide() , UNDEFINED_5) && portConstraints != ($clinit_PortConstraints() , FREE) && portConstraints != ($clinit_PortConstraints() , UNDEFINED_4)) { portSide = calcPortSide(port, direction); $setSide(port, portSide); !(!port.propertyMap?($clinit_Collections() , $clinit_Collections() , EMPTY_MAP):port.propertyMap).containsKey(($clinit_LayeredOptions() , PORT_BORDER_OFFSET)) && portSide != UNDEFINED_5 && (port.pos.x_0 != 0 || port.pos.y_0 != 0) && $setProperty_0(port, PORT_BORDER_OFFSET, calcPortOffset(port, portSide)); } if (portConstraints == ($clinit_PortConstraints() , FIXED_RATIO)) { ratio = 0; switch (portSide.ordinal) { case 1: case 3: nodeWidth = port.owner.size_0.x_0; nodeWidth > 0 && (ratio = port.pos.x_0 / nodeWidth); break; case 2: case 4: nodeHeight = port.owner.size_0.y_0; nodeHeight > 0 && (ratio = port.pos.y_0 / nodeHeight); } $setProperty_0(port, ($clinit_InternalProperties_1() , PORT_RATIO_OR_POSITION_0), ratio); } portSize = port.size_0; portAnchor = port.anchor; if (anchorPos) { portAnchor.x_0 = anchorPos.x_0; portAnchor.y_0 = anchorPos.y_0; port.explicitlySuppliedPortAnchor = true; } else if (portConstraints != FREE && portConstraints != UNDEFINED_4 && portSide != UNDEFINED_5) { switch (portSide.ordinal) { case 1: portAnchor.x_0 = portSize.x_0 / 2; break; case 2: portAnchor.x_0 = portSize.x_0; portAnchor.y_0 = portSize.y_0 / 2; break; case 3: portAnchor.x_0 = portSize.x_0 / 2; portAnchor.y_0 = portSize.y_0; break; case 4: portAnchor.y_0 = portSize.y_0 / 2; } } else { portAnchor.x_0 = portSize.x_0 / 2; portAnchor.y_0 = portSize.y_0 / 2; } } function isDescendant(child, parent_0){ var current, next; current = child; next = $getGraph(current).parentNode; while (next) { current = next; if (current == parent_0) { return true; } next = $getGraph(current).parentNode; } return false; } function offsetGraph(graph, offsetx, offsety){ var edge, edge$iterator, graphOffset, junctionPoints, label_0, label$iterator, node, node$iterator, port, port$iterator; graphOffset = new KVector_1(offsetx, offsety); for (node$iterator = new ArrayList$1(graph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); $add_19(node.pos, graphOffset); for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); for (edge$iterator = new ArrayList$1(port.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); $offset_2(edge.bendPoints, graphOffset); junctionPoints = castTo($getProperty(edge, ($clinit_LayeredOptions() , JUNCTION_POINTS)), 75); !!junctionPoints && $offset_2(junctionPoints, graphOffset); for (label$iterator = new ArrayList$1(edge.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 72); $add_19(label_0.pos, graphOffset); } } } } } function placeNodesHorizontally(layer, xoffset){ var alignment, inports, leftMargin, maxLeftMargin, maxRightMargin, node, node$iterator, node$iterator0, nodeSize, outports, port, port$iterator, ratio, rightMargin, size_0, xpos; maxLeftMargin = 0; maxRightMargin = 0; for (node$iterator0 = new ArrayList$1(layer.nodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); maxLeftMargin = $wnd.Math.max(maxLeftMargin, node.margin.left); maxRightMargin = $wnd.Math.max(maxRightMargin, node.margin.right); } for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); alignment = castTo($getProperty(node, ($clinit_LayeredOptions() , ALIGNMENT)), 255); switch (alignment.ordinal) { case 1: ratio = 0; break; case 2: ratio = 1; break; case 5: ratio = 0.5; break; default:inports = 0; outports = 0; for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); port.incomingEdges.array.length == 0 || ++inports; port.outgoingEdges.array.length == 0 || ++outports; } inports + outports == 0?(ratio = 0.5):(ratio = outports / (inports + outports)); } size_0 = layer.size_0; nodeSize = node.size_0.x_0; xpos = (size_0.x_0 - nodeSize) * ratio; ratio > 0.5?(xpos -= maxRightMargin * 2 * (ratio - 0.5)):ratio < 0.5 && (xpos += maxLeftMargin * 2 * (0.5 - ratio)); leftMargin = node.margin.left; xpos < leftMargin && (xpos = leftMargin); rightMargin = node.margin.right; xpos > size_0.x_0 - rightMargin - nodeSize && (xpos = size_0.x_0 - rightMargin - nodeSize); node.pos.x_0 = xoffset + xpos; } } function provideCollectorPort(node, type_0, side){ var inport, inport$iterator, outport, outport$iterator, port; port = null; switch (type_0.ordinal) { case 1: for (inport$iterator = new ArrayList$1(node.ports); inport$iterator.i < inport$iterator.this$01.array.length;) { inport = castTo($next_6(inport$iterator), 12); if ($booleanValue(castToBoolean($getProperty(inport, ($clinit_InternalProperties_1() , INPUT_COLLECT))))) { return inport; } } port = new LPort; $setProperty_0(port, ($clinit_InternalProperties_1() , INPUT_COLLECT), ($clinit_Boolean() , true)); break; case 2: for (outport$iterator = new ArrayList$1(node.ports); outport$iterator.i < outport$iterator.this$01.array.length;) { outport = castTo($next_6(outport$iterator), 12); if ($booleanValue(castToBoolean($getProperty(outport, ($clinit_InternalProperties_1() , OUTPUT_COLLECT))))) { return outport; } } port = new LPort; $setProperty_0(port, ($clinit_InternalProperties_1() , OUTPUT_COLLECT), ($clinit_Boolean() , true)); } if (port) { $setNode(port, node); $setSide(port, side); centerPoint(port.pos, node.size_0, side); } return port; } function resizeNode(node, newSize, movePorts){ var all, fixedPorts, heightDiff, heightPercent, heightRatio, label_0, label$iterator, midx, midy, oldSize, port, port$iterator, widthDiff, widthPercent, widthRatio; oldSize = new KVector_2(node.size_0); widthRatio = newSize.x_0 / oldSize.x_0; heightRatio = newSize.y_0 / oldSize.y_0; widthDiff = newSize.x_0 - oldSize.x_0; heightDiff = newSize.y_0 - oldSize.y_0; if (movePorts) { fixedPorts = maskUndefined($getProperty(node, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0))) === maskUndefined(($clinit_PortConstraints() , FIXED_POS)); for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); switch (port.side.ordinal) { case 1: fixedPorts || (port.pos.x_0 *= widthRatio); break; case 2: port.pos.x_0 += widthDiff; fixedPorts || (port.pos.y_0 *= heightRatio); break; case 3: fixedPorts || (port.pos.x_0 *= widthRatio); port.pos.y_0 += heightDiff; break; case 4: fixedPorts || (port.pos.y_0 *= heightRatio); } } } for (label$iterator = new ArrayList$1(node.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 72); midx = label_0.pos.x_0 + label_0.size_0.x_0 / 2; midy = label_0.pos.y_0 + label_0.size_0.y_0 / 2; widthPercent = midx / oldSize.x_0; heightPercent = midy / oldSize.y_0; if (widthPercent + heightPercent >= 1) { if (widthPercent - heightPercent > 0 && midy >= 0) { label_0.pos.x_0 += widthDiff; label_0.pos.y_0 += heightDiff * heightPercent; } else if (widthPercent - heightPercent < 0 && midx >= 0) { label_0.pos.x_0 += widthDiff * widthPercent; label_0.pos.y_0 += heightDiff; } } } node.size_0.x_0 = newSize.x_0; node.size_0.y_0 = newSize.y_0; $setProperty_0(node, ($clinit_LayeredOptions() , NODE_SIZE_CONSTRAINTS_1), ($clinit_SizeConstraint() , all = castTo($getEnumConstants(Lorg_eclipse_elk_core_options_SizeConstraint_2_classLit), 9) , new EnumSet$EnumSetImpl(all, castTo(createFrom(all, all.length), 9), 0))); } function toEdgeArray(edges){ return castTo($toArray_1(edges, initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LEdge_2_classLit, $intern_106, 18, edges.array.length, 0, 1)), 483); } function toNodeArray(nodes){ return castTo($toArray_1(nodes, initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LNode_2_classLit, $intern_107, 10, nodes.array.length, 0, 1)), 199); } function toPortArray(ports){ return castTo($toArray_1(ports, initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LPort_2_classLit, $intern_108, 12, ports.array.length, 0, 1)), 2042); } function LShape(){ this.pos = new KVector; this.size_0 = new KVector; } defineClass(404, 305, {3:1, 305:1, 404:1, 96:1, 137:1}); var Lorg_eclipse_elk_alg_layered_graph_LShape_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LShape', 404); function $getDesignation_1(this$static){ if (this$static.text_0) { return this$static.text_0; } return $getDesignation(this$static); } function LLabel(){ LLabel_0.call(this, ''); } function LLabel_0(thetext){ LShape.call(this); this.text_0 = thetext; } defineClass(72, 404, {3:1, 305:1, 72:1, 404:1, 96:1, 137:1}, LLabel, LLabel_0); _.toString_0 = function toString_89(){ var designation; designation = $getDesignation_1(this); return designation == null?'label':'l_' + designation; } ; var Lorg_eclipse_elk_alg_layered_graph_LLabel_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LLabel', 72); function $$init_6(this$static){ } function $add_15(this$static, other){ this$static.left += other.left; this$static.right += other.right; this$static.top_0 += other.top_0; this$static.bottom += other.bottom; return this$static; } function $copy(this$static, other){ this$static.left = other.left; this$static.right = other.right; this$static.top_0 = other.top_0; this$static.bottom = other.bottom; return this$static; } function $set_6(this$static, newTop, newRight, newBottom, newLeft){ this$static.top_0 = newTop; this$static.right = newRight; this$static.bottom = newBottom; this$static.left = newLeft; } function $setBottom(this$static, bottom){ this$static.bottom = bottom; } function $setLeft(this$static, left){ this$static.left = left; } function $setRight(this$static, right){ this$static.right = right; } function $setTop(this$static, top_0){ this$static.top_0 = top_0; } function Spacing(){ $$init_6(this); } function Spacing_0(top_0, right, bottom, left){ $$init_6(this); $set_6(this, top_0, right, bottom, left); } function isdelim(c, delims){ var i; for (i = 0; i < delims.length; i++) { if (c == (checkCriticalStringElementIndex(i, delims.length) , delims.charCodeAt(i))) { return true; } } return false; } defineClass(214, 1, {3:1, 4:1, 214:1, 423:1}); _.equals_0 = function equals_99(obj){ var other; if (instanceOf(obj, 214)) { other = castTo(obj, 214); return this.top_0 == other.top_0 && this.bottom == other.bottom && this.left == other.left && this.right == other.right; } else { return false; } } ; _.hashCode_1 = function hashCode_62(){ var code1, code2; code1 = $hashCode_1(this.left) << 16; code1 |= $hashCode_1(this.bottom) & $intern_47; code2 = $hashCode_1(this.right) << 16; code2 |= $hashCode_1(this.top_0) & $intern_47; return code1 ^ code2; } ; _.parse_0 = function parse_0(string){ var end, exception, key, keyandvalue, start_0, token, token$array, token$index, token$max, tokens, value_0; start_0 = 0; while (start_0 < string.length && isdelim((checkCriticalStringElementIndex(start_0, string.length) , string.charCodeAt(start_0)), '([{"\' \t\r\n')) { ++start_0; } end = string.length; while (end > 0 && isdelim((checkCriticalStringElementIndex(end - 1, string.length) , string.charCodeAt(end - 1)), ')]}"\' \t\r\n')) { --end; } if (start_0 < end) { tokens = $split_0((checkCriticalStringBounds(start_0, end, string.length) , string.substr(start_0, end - start_0)), ',|;'); try { for (token$array = tokens , token$index = 0 , token$max = token$array.length; token$index < token$max; ++token$index) { token = token$array[token$index]; keyandvalue = $split_0(token, '='); if (keyandvalue.length != 2) { throw toJs(new IllegalArgumentException_0('Expecting a list of key-value pairs.')); } key = $trim(keyandvalue[0]); value_0 = __parseAndValidateDouble($trim(keyandvalue[1])); $equals_5(key, 'top')?(this.top_0 = value_0):$equals_5(key, 'left')?(this.left = value_0):$equals_5(key, 'bottom')?(this.bottom = value_0):$equals_5(key, 'right') && (this.right = value_0); } } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 130)) { exception = $e0; throw toJs(new IllegalArgumentException_0('The given string contains parts that cannot be parsed as numbers.' + exception)); } else throw toJs($e0); } } } ; _.toString_0 = function toString_90(){ return '[top=' + this.top_0 + ',left=' + this.left + ',bottom=' + this.bottom + ',right=' + this.right + ']'; } ; _.bottom = 0; _.left = 0; _.right = 0; _.top_0 = 0; var Lorg_eclipse_elk_core_math_Spacing_2_classLit = createForClass('org.eclipse.elk.core.math', 'Spacing', 214); function ElkMargin(){ Spacing.call(this); } function ElkMargin_0(){ Spacing_0.call(this, 0, 0, 0, 0); } function ElkMargin_1(top_0, right, bottom, left){ Spacing_0.call(this, top_0, right, bottom, left); } function ElkMargin_2(other){ Spacing_0.call(this, other.top_0, other.right, other.bottom, other.left); } defineClass(140, 214, $intern_109, ElkMargin, ElkMargin_0, ElkMargin_1, ElkMargin_2); var Lorg_eclipse_elk_core_math_ElkMargin_2_classLit = createForClass('org.eclipse.elk.core.math', 'ElkMargin', 140); function LMargin(){ ElkMargin.call(this); } defineClass(660, 140, $intern_109, LMargin); var Lorg_eclipse_elk_alg_layered_graph_LMargin_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LMargin', 660); function $borderToContentAreaCoordinates(this$static, horizontal, vertical){ var graphPadding, offset, pos, thegraph; thegraph = $getGraph(this$static); graphPadding = thegraph.padding; offset = thegraph.offset; pos = this$static.pos; horizontal && (pos.x_0 = pos.x_0 - graphPadding.left - offset.x_0); vertical && (pos.y_0 = pos.y_0 - graphPadding.top_0 - offset.y_0); } function $findPortIndices(this$static){ var currentIndex, currentSide, firstIndexForCurrentSide, port; this$static.portSideIndices = new EnumMap(castTo(checkNotNull(Lorg_eclipse_elk_core_options_PortSide_2_classLit), 297)); firstIndexForCurrentSide = 0; currentSide = ($clinit_PortSide() , NORTH_3); currentIndex = 0; for (; currentIndex < this$static.ports.array.length; currentIndex++) { port = castTo($get_11(this$static.ports, currentIndex), 12); if (port.side != currentSide) { firstIndexForCurrentSide != currentIndex && $put_7(this$static.portSideIndices, currentSide, new Pair(valueOf_3(firstIndexForCurrentSide), valueOf_3(currentIndex))); currentSide = port.side; firstIndexForCurrentSide = currentIndex; } } $put_7(this$static.portSideIndices, currentSide, new Pair(valueOf_3(firstIndexForCurrentSide), valueOf_3(currentIndex))); } function $getConnectedEdges_0(this$static){ var iterables, port, port$iterator; iterables = new ArrayList; for (port$iterator = new ArrayList$1(this$static.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); $add_3(iterables, port.connectedEdges); } return checkNotNull(iterables) , new FluentIterable$2(iterables); } function $getDesignation_2(this$static){ var id_0; if (this$static.labels.array.length != 0 && !!castTo($get_11(this$static.labels, 0), 72).text_0) { return castTo($get_11(this$static.labels, 0), 72).text_0; } id_0 = $getDesignation(this$static); if (id_0 != null) { return id_0; } return '' + (!this$static.layer?-1:$indexOf_3(this$static.layer.nodes, this$static, 0)); } function $getGraph(this$static){ if (!this$static.graph_0 && !!this$static.layer) { return this$static.layer.owner; } return this$static.graph_0; } function $getIncomingEdges(this$static){ var iterables, port, port$iterator; iterables = new ArrayList; for (port$iterator = new ArrayList$1(this$static.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); $add_3(iterables, port.incomingEdges); } return checkNotNull(iterables) , new FluentIterable$2(iterables); } function $getIndex(this$static){ return !this$static.layer?-1:$indexOf_3(this$static.layer.nodes, this$static, 0); } function $getInteractiveReferencePoint(this$static){ var nodePos, nodeSize; switch (castTo($getProperty($getGraph(this$static), ($clinit_LayeredOptions() , INTERACTIVE_REFERENCE_POINT_0)), 429).ordinal) { case 0: nodePos = this$static.pos; nodeSize = this$static.size_0; return new KVector_1(nodePos.x_0 + nodeSize.x_0 / 2, nodePos.y_0 + nodeSize.y_0 / 2); case 1: return new KVector_2(this$static.pos); default:return null; } } function $getOutgoingEdges(this$static){ var iterables, port, port$iterator; iterables = new ArrayList; for (port$iterator = new ArrayList$1(this$static.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); $add_3(iterables, port.outgoingEdges); } return checkNotNull(iterables) , new FluentIterable$2(iterables); } function $getPortSideView(this$static, side){ var indices; this$static.portSidesCached || $findPortIndices(this$static); indices = castTo($get_14(this$static.portSideIndices, side), 42); return !indices?($clinit_Collections() , $clinit_Collections() , EMPTY_LIST):new AbstractList$SubList(this$static.ports, castTo(indices.first, 17).value_0, castTo(indices.second, 17).value_0); } function $getPorts(this$static, portType){ switch (portType.ordinal) { case 1: return filter_0(this$static.ports, ($clinit_LPort() , INPUT_PREDICATE)); case 2: return filter_0(this$static.ports, ($clinit_LPort() , OUTPUT_PREDICATE)); default:return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } } function $getPorts_0(this$static, portType, side){ var sidePredicate, typePredicate; typePredicate = null; switch (portType.ordinal) { case 1: typePredicate = ($clinit_LPort() , INPUT_PREDICATE); break; case 2: typePredicate = ($clinit_LPort() , OUTPUT_PREDICATE); } sidePredicate = null; switch (side.ordinal) { case 1: sidePredicate = ($clinit_LPort() , NORTH_PREDICATE); break; case 2: sidePredicate = ($clinit_LPort() , EAST_PREDICATE); break; case 3: sidePredicate = ($clinit_LPort() , SOUTH_PREDICATE); break; case 4: sidePredicate = ($clinit_LPort() , WEST_PREDICATE); } return !!typePredicate && !!sidePredicate?filter_0(this$static.ports, new Predicates$AndPredicate(new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Lcom_google_common_base_Predicate_2_classLit, 1), $intern_2, 178, 0, [castTo(checkNotNull(typePredicate), 178), castTo(checkNotNull(sidePredicate), 178)])))):($clinit_Collections() , $clinit_Collections() , EMPTY_LIST); } function $getPorts_1(this$static, side){ switch (side.ordinal) { case 1: return filter_0(this$static.ports, ($clinit_LPort() , NORTH_PREDICATE)); case 2: return filter_0(this$static.ports, ($clinit_LPort() , EAST_PREDICATE)); case 3: return filter_0(this$static.ports, ($clinit_LPort() , SOUTH_PREDICATE)); case 4: return filter_0(this$static.ports, ($clinit_LPort() , WEST_PREDICATE)); default:return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } } function $setLayer(this$static, index_0, newlayer){ if (!!newlayer && (index_0 < 0 || index_0 > newlayer.nodes.array.length)) { throw toJs(new IllegalArgumentException_0('index must be >= 0 and <= layer node count')); } !!this$static.layer && $remove_12(this$static.layer.nodes, this$static); this$static.layer = newlayer; !!newlayer && $add_2(newlayer.nodes, index_0, this$static); } function $setLayer_0(this$static, thelayer){ !!this$static.layer && $remove_12(this$static.layer.nodes, this$static); this$static.layer = thelayer; !!this$static.layer && $add_3(this$static.layer.nodes, this$static); } function $setType(this$static, type_0){ this$static.type_0 = type_0; } function $toString_13(this$static){ var result; result = new StringBuilder; result.string += 'n'; this$static.type_0 != ($clinit_LNode$NodeType() , NORMAL) && $append_11($append_11((result.string += '(' , result), $toString_3(this$static.type_0).toLowerCase()), ')'); $append_11((result.string += '_' , result), $getDesignation_2(this$static)); return result.string; } function LNode(graph){ LShape.call(this); this.type_0 = ($clinit_LNode$NodeType() , NORMAL); this.ports = (checkNonnegative(6, 'initialArraySize') , new ArrayList_0(6)); this.labels = (checkNonnegative(2, 'initialArraySize') , new ArrayList_0(2)); this.margin = new LMargin; this.padding = new LPadding; this.graph_0 = graph; } defineClass(10, 404, {3:1, 305:1, 10:1, 404:1, 96:1, 137:1}, LNode); _.toString_0 = function toString_91(){ return $toString_13(this); } ; _.portSidesCached = false; var Lorg_eclipse_elk_alg_layered_graph_LNode_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LNode', 10); function $clinit_LNode$NodeType(){ $clinit_LNode$NodeType = emptyMethod; NORMAL = new LNode$NodeType('NORMAL', 0); LONG_EDGE = new LNode$NodeType('LONG_EDGE', 1); EXTERNAL_PORT = new LNode$NodeType('EXTERNAL_PORT', 2); NORTH_SOUTH_PORT = new LNode$NodeType('NORTH_SOUTH_PORT', 3); LABEL = new LNode$NodeType('LABEL', 4); BREAKING_POINT = new LNode$NodeType('BREAKING_POINT', 5); } function LNode$NodeType(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_28(name_0){ $clinit_LNode$NodeType(); return valueOf(($clinit_LNode$NodeType$Map() , $MAP_18), name_0); } function values_36(){ $clinit_LNode$NodeType(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_graph_LNode$NodeType_2_classLit, 1), $intern_37, 273, 0, [NORMAL, LONG_EDGE, EXTERNAL_PORT, NORTH_SOUTH_PORT, LABEL, BREAKING_POINT]); } defineClass(273, 22, {3:1, 34:1, 22:1, 273:1}, LNode$NodeType); var BREAKING_POINT, EXTERNAL_PORT, LABEL, LONG_EDGE, NORMAL, NORTH_SOUTH_PORT; var Lorg_eclipse_elk_alg_layered_graph_LNode$NodeType_2_classLit = createForEnum('org.eclipse.elk.alg.layered.graph', 'LNode/NodeType', 273, Ljava_lang_Enum_2_classLit, values_36, valueOf_28); function $clinit_LNode$NodeType$Map(){ $clinit_LNode$NodeType$Map = emptyMethod; $MAP_18 = createValueOfMap(($clinit_LNode$NodeType() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_graph_LNode$NodeType_2_classLit, 1), $intern_37, 273, 0, [NORMAL, LONG_EDGE, EXTERNAL_PORT, NORTH_SOUTH_PORT, LABEL, BREAKING_POINT]))); } var $MAP_18; function LNode$lambda$0$Type(){ } defineClass(775, 1, $intern_40, LNode$lambda$0$Type); _.test_0 = function test_18(arg0){ return $booleanValue(castToBoolean($getProperty(castTo(arg0, 72), ($clinit_LayeredOptions() , EDGE_LABELS_INLINE_0)))); } ; var Lorg_eclipse_elk_alg_layered_graph_LNode$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LNode/lambda$0$Type', 775); function ElkPadding(){ Spacing.call(this); } function ElkPadding_0(any){ Spacing_0.call(this, any, any, any, any); } function ElkPadding_1(other){ Spacing_0.call(this, other.top_0, other.right, other.bottom, other.left); } defineClass(107, 214, $intern_110, ElkPadding, ElkPadding_0, ElkPadding_1); var Lorg_eclipse_elk_core_math_ElkPadding_2_classLit = createForClass('org.eclipse.elk.core.math', 'ElkPadding', 107); function LPadding(){ ElkPadding.call(this); } defineClass(778, 107, $intern_110, LPadding); var Lorg_eclipse_elk_alg_layered_graph_LPadding_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LPadding', 778); function $clinit_LPort(){ $clinit_LPort = emptyMethod; OUTPUT_PREDICATE = new LPort$lambda$0$Type; INPUT_PREDICATE = new LPort$lambda$1$Type; NORTH_PREDICATE = new LPort$lambda$2$Type; EAST_PREDICATE = new LPort$lambda$3$Type; SOUTH_PREDICATE = new LPort$lambda$4$Type; WEST_PREDICATE = new LPort$lambda$5$Type; } function $getAbsoluteAnchor(this$static){ return sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [this$static.owner.pos, this$static.pos, this$static.anchor])); } function $getDegree(this$static){ return this$static.incomingEdges.array.length + this$static.outgoingEdges.array.length; } function $getDesignation_3(this$static){ var id_0; if (this$static.labels.array.length != 0 && !!castTo($get_11(this$static.labels, 0), 72).text_0) { return castTo($get_11(this$static.labels, 0), 72).text_0; } id_0 = $getDesignation(this$static); if (id_0 != null) { return id_0; } return '' + (!this$static.owner?-1:$indexOf_3(this$static.owner.ports, this$static, 0)); } function $getNetFlow(this$static){ return this$static.incomingEdges.array.length - this$static.outgoingEdges.array.length; } function $setConnectedToExternalNodes(this$static, conn){ this$static.connectedToExternalNodes = conn; } function $setNode(this$static, node){ !!this$static.owner && $remove_12(this$static.owner.ports, this$static); this$static.owner = node; !!this$static.owner && $add_3(this$static.owner.ports, this$static); } function $setSide(this$static, theside){ if (!theside) { throw toJs(new NullPointerException); } this$static.side = theside; if (!this$static.explicitlySuppliedPortAnchor) { switch (this$static.side.ordinal) { case 1: this$static.anchor.x_0 = this$static.size_0.x_0 / 2; this$static.anchor.y_0 = 0; break; case 2: this$static.anchor.x_0 = this$static.size_0.x_0; this$static.anchor.y_0 = this$static.size_0.y_0 / 2; break; case 3: this$static.anchor.x_0 = this$static.size_0.x_0 / 2; this$static.anchor.y_0 = this$static.size_0.y_0; break; case 4: this$static.anchor.x_0 = 0; this$static.anchor.y_0 = this$static.size_0.y_0 / 2; } } } function LPort(){ $clinit_LPort(); LShape.call(this); this.side = ($clinit_PortSide() , UNDEFINED_5); this.anchor = new KVector; new LMargin; this.labels = (checkNonnegative(2, 'initialArraySize') , new ArrayList_0(2)); this.incomingEdges = (checkNonnegative(4, 'initialArraySize') , new ArrayList_0(4)); this.outgoingEdges = (checkNonnegative(4, 'initialArraySize') , new ArrayList_0(4)); this.connectedEdges = new LPort$CombineIter(this.incomingEdges, this.outgoingEdges); } defineClass(12, 404, {3:1, 305:1, 12:1, 404:1, 96:1, 137:1}, LPort); _.toString_0 = function toString_92(){ var result, source, target; result = new StringBuilder; $append_11((result.string += 'p_' , result), $getDesignation_3(this)); !!this.owner && $append_11($append_10((result.string += '[' , result), this.owner), ']'); if (this.incomingEdges.array.length == 1 && this.outgoingEdges.array.length == 0 && castTo($get_11(this.incomingEdges, 0), 18).source != this) { source = castTo($get_11(this.incomingEdges, 0), 18).source; $append_11((result.string += ' << ' , result), $getDesignation_3(source)); $append_11($append_10((result.string += '[' , result), source.owner), ']'); } if (this.incomingEdges.array.length == 0 && this.outgoingEdges.array.length == 1 && castTo($get_11(this.outgoingEdges, 0), 18).target != this) { target = castTo($get_11(this.outgoingEdges, 0), 18).target; $append_11((result.string += ' >> ' , result), $getDesignation_3(target)); $append_11($append_10((result.string += '[' , result), target.owner), ']'); } return result.string; } ; _.connectedToExternalNodes = true; _.explicitlySuppliedPortAnchor = false; var EAST_PREDICATE, INPUT_PREDICATE, NORTH_PREDICATE, OUTPUT_PREDICATE, SOUTH_PREDICATE, WEST_PREDICATE; var Lorg_eclipse_elk_alg_layered_graph_LPort_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LPort', 12); function LPort$1(this$0){ this.this$01 = this$0; } defineClass(408, 1, $intern_23, LPort$1); _.forEach_0 = function forEach_27(action){ $forEach_0(this, action); } ; _.iterator_0 = function iterator_69(){ var edgesIter; edgesIter = new ArrayList$1(this.this$01.incomingEdges); return new LPort$1$1(edgesIter); } ; var Lorg_eclipse_elk_alg_layered_graph_LPort$1_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LPort/1', 408); function LPort$1$1(val$edgesIter){ this.val$edgesIter2 = val$edgesIter; } defineClass(1309, 1, $intern_6, LPort$1$1); _.forEachRemaining = function forEachRemaining_47(consumer){ $forEachRemaining(this, consumer); } ; _.next_1 = function next_37(){ return castTo($next_6(this.val$edgesIter2), 18).source; } ; _.hasNext_0 = function hasNext_36(){ return $hasNext_3(this.val$edgesIter2); } ; _.remove = function remove_93(){ $remove_13(this.val$edgesIter2); } ; var Lorg_eclipse_elk_alg_layered_graph_LPort$1$1_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LPort/1/1', 1309); function LPort$2(this$0){ this.this$01 = this$0; } defineClass(369, 1, $intern_23, LPort$2); _.forEach_0 = function forEach_28(action){ $forEach_0(this, action); } ; _.iterator_0 = function iterator_70(){ var edgesIter; return edgesIter = new ArrayList$1(this.this$01.outgoingEdges) , new LPort$2$1(edgesIter); } ; var Lorg_eclipse_elk_alg_layered_graph_LPort$2_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LPort/2', 369); function LPort$2$1(val$edgesIter){ this.val$edgesIter2 = val$edgesIter; } defineClass(776, 1, $intern_6, LPort$2$1); _.forEachRemaining = function forEachRemaining_48(consumer){ $forEachRemaining(this, consumer); } ; _.next_1 = function next_38(){ return castTo($next_6(this.val$edgesIter2), 18).target; } ; _.hasNext_0 = function hasNext_37(){ return $hasNext_3(this.val$edgesIter2); } ; _.remove = function remove_94(){ $remove_13(this.val$edgesIter2); } ; var Lorg_eclipse_elk_alg_layered_graph_LPort$2$1_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LPort/2/1', 776); function LPort$CombineIter(firstIterable, secondIterable){ this.firstIterable = firstIterable; this.secondIterable = secondIterable; } defineClass(1302, 1, $intern_23, LPort$CombineIter); _.forEach_0 = function forEach_29(action){ $forEach_0(this, action); } ; _.iterator_0 = function iterator_71(){ return new LPort$CombineIter$1(this); } ; var Lorg_eclipse_elk_alg_layered_graph_LPort$CombineIter_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LPort/CombineIter', 1302); function $hasNext_6(this$static){ return $hasNext_3(this$static.firstIterator) || $hasNext_3(this$static.secondIterator); } function LPort$CombineIter$1(this$1){ this.this$11 = this$1; this.firstIterator = new ArrayList$1(this.this$11.firstIterable); this.secondIterator = new ArrayList$1(this.this$11.secondIterable); } defineClass(208, 1, $intern_6, LPort$CombineIter$1); _.forEachRemaining = function forEachRemaining_49(consumer){ $forEachRemaining(this, consumer); } ; _.remove = function remove_95(){ $remove_21(); } ; _.hasNext_0 = function hasNext_38(){ return $hasNext_6(this); } ; _.next_1 = function next_39(){ return $hasNext_3(this.firstIterator)?$next_6(this.firstIterator):$next_6(this.secondIterator); } ; var Lorg_eclipse_elk_alg_layered_graph_LPort$CombineIter$1_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LPort/CombineIter/1', 208); function $apply_13(arg0){ return $clinit_LPort() , castTo(arg0, 12).outgoingEdges.array.length != 0; } function LPort$lambda$0$Type(){ } defineClass(1303, 1, $intern_89, LPort$lambda$0$Type); _.apply_1 = function apply_62(arg0){ return $apply_13(arg0); } ; _.equals_0 = function equals_100(other){ return this === other; } ; _.test_0 = function test_19(input_0){ return $clinit_LPort() , castTo(input_0, 12).outgoingEdges.array.length != 0; } ; var Lorg_eclipse_elk_alg_layered_graph_LPort$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LPort/lambda$0$Type', 1303); function $apply_14(arg0){ return $clinit_LPort() , castTo(arg0, 12).incomingEdges.array.length != 0; } function LPort$lambda$1$Type(){ } defineClass(1304, 1, $intern_89, LPort$lambda$1$Type); _.apply_1 = function apply_63(arg0){ return $apply_14(arg0); } ; _.equals_0 = function equals_101(other){ return this === other; } ; _.test_0 = function test_20(input_0){ return $clinit_LPort() , castTo(input_0, 12).incomingEdges.array.length != 0; } ; var Lorg_eclipse_elk_alg_layered_graph_LPort$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LPort/lambda$1$Type', 1304); function LPort$lambda$2$Type(){ } defineClass(1305, 1, $intern_89, LPort$lambda$2$Type); _.apply_1 = function apply_64(arg0){ return $clinit_LPort() , castTo(arg0, 12).side == ($clinit_PortSide() , NORTH_3); } ; _.equals_0 = function equals_102(other){ return this === other; } ; _.test_0 = function test_21(input_0){ return $clinit_LPort() , castTo(input_0, 12).side == ($clinit_PortSide() , NORTH_3); } ; var Lorg_eclipse_elk_alg_layered_graph_LPort$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LPort/lambda$2$Type', 1305); function LPort$lambda$3$Type(){ } defineClass(1306, 1, $intern_89, LPort$lambda$3$Type); _.apply_1 = function apply_65(arg0){ return $clinit_LPort() , castTo(arg0, 12).side == ($clinit_PortSide() , EAST_2); } ; _.equals_0 = function equals_103(other){ return this === other; } ; _.test_0 = function test_22(input_0){ return $clinit_LPort() , castTo(input_0, 12).side == ($clinit_PortSide() , EAST_2); } ; var Lorg_eclipse_elk_alg_layered_graph_LPort$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LPort/lambda$3$Type', 1306); function LPort$lambda$4$Type(){ } defineClass(1307, 1, $intern_89, LPort$lambda$4$Type); _.apply_1 = function apply_66(arg0){ return $clinit_LPort() , castTo(arg0, 12).side == ($clinit_PortSide() , SOUTH_2); } ; _.equals_0 = function equals_104(other){ return this === other; } ; _.test_0 = function test_23(input_0){ return $clinit_LPort() , castTo(input_0, 12).side == ($clinit_PortSide() , SOUTH_2); } ; var Lorg_eclipse_elk_alg_layered_graph_LPort$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LPort/lambda$4$Type', 1307); function LPort$lambda$5$Type(){ } defineClass(1308, 1, $intern_89, LPort$lambda$5$Type); _.apply_1 = function apply_67(arg0){ return $clinit_LPort() , castTo(arg0, 12).side == ($clinit_PortSide() , WEST_2); } ; _.equals_0 = function equals_105(other){ return this === other; } ; _.test_0 = function test_24(input_0){ return $clinit_LPort() , castTo(input_0, 12).side == ($clinit_PortSide() , WEST_2); } ; var Lorg_eclipse_elk_alg_layered_graph_LPort$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'LPort/lambda$5$Type', 1308); function $getIndex_0(this$static){ return $indexOf_3(this$static.owner.layers, this$static, 0); } function Layer(graph){ this.size_0 = new KVector; this.nodes = new ArrayList; this.owner = graph; } defineClass(30, 305, {3:1, 20:1, 305:1, 30:1, 96:1, 137:1}, Layer); _.forEach_0 = function forEach_30(action){ $forEach_0(this, action); } ; _.iterator_0 = function iterator_72(){ return new ArrayList$1(this.nodes); } ; _.toString_0 = function toString_93(){ return 'L_' + $indexOf_3(this.owner.layers, this, 0) + $toString_2(this.nodes); } ; var Lorg_eclipse_elk_alg_layered_graph_Layer_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph', 'Layer', 30); function $calculateMinimumGraphSize(elkgraph, lgraph){ var configuredMinSize, graphAdapter, minSize, nodeAdapter, sizeConstraints; if (!$getParent_2(elkgraph)) { return; } sizeConstraints = castTo($getProperty(lgraph, ($clinit_LayeredOptions() , NODE_SIZE_CONSTRAINTS_1)), 181); maskUndefined($getProperty_0(elkgraph, PORT_CONSTRAINTS_0)) === maskUndefined(($clinit_PortConstraints() , UNDEFINED_4)) && $setProperty_1(elkgraph, PORT_CONSTRAINTS_0, FREE); graphAdapter = ($clinit_ElkGraphAdapters() , new ElkGraphAdapters$ElkGraphAdapter($getParent_2(elkgraph))); nodeAdapter = new ElkGraphAdapters$ElkNodeAdapter(!$getParent_2(elkgraph)?null:new ElkGraphAdapters$ElkGraphAdapter($getParent_2(elkgraph)), elkgraph); minSize = process(graphAdapter, nodeAdapter, false, true); $add_5(sizeConstraints, ($clinit_SizeConstraint() , MINIMUM_SIZE)); configuredMinSize = castTo($getProperty(lgraph, NODE_SIZE_MINIMUM_0), 8); configuredMinSize.x_0 = $wnd.Math.max(minSize.x_0, configuredMinSize.x_0); configuredMinSize.y_0 = $wnd.Math.max(minSize.y_0, configuredMinSize.y_0); } function $calculateNetFlow_0(elkport){ var elkgraph, incomingEdge, incomingEdge$iterator, inputPortVote, insideSelfLoopsEnabled, isInsideSelfLoop, isSelfLoop, outgoingEdge, outgoingEdge$iterator, outputPortVote, sourceNode, targetNode; elkgraph = $getParent_3(elkport); insideSelfLoopsEnabled = $booleanValue(castToBoolean($getProperty_0(elkgraph, ($clinit_LayeredOptions() , INSIDE_SELF_LOOPS_ACTIVATE)))); outputPortVote = 0; inputPortVote = 0; for (outgoingEdge$iterator = new AbstractEList$EIterator((!elkport.outgoingEdges && (elkport.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, elkport, 7, 4)) , elkport.outgoingEdges)); outgoingEdge$iterator.cursor != outgoingEdge$iterator.this$01_2.size_1();) { outgoingEdge = castTo($doNext(outgoingEdge$iterator), 74); isSelfLoop = $isSelfloop(outgoingEdge); isInsideSelfLoop = isSelfLoop && insideSelfLoopsEnabled && $booleanValue(castToBoolean($getProperty_0(outgoingEdge, INSIDE_SELF_LOOPS_YO))); targetNode = connectableShapeToNode(castTo($get_20((!outgoingEdge.targets && (outgoingEdge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, outgoingEdge, 5, 8)) , outgoingEdge.targets), 0), 84)); isSelfLoop && isInsideSelfLoop?++inputPortVote:isSelfLoop && !isInsideSelfLoop?++outputPortVote:$getParent_2(targetNode) == elkgraph || targetNode == elkgraph?++inputPortVote:++outputPortVote; } for (incomingEdge$iterator = new AbstractEList$EIterator((!elkport.incomingEdges && (elkport.incomingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, elkport, 8, 5)) , elkport.incomingEdges)); incomingEdge$iterator.cursor != incomingEdge$iterator.this$01_2.size_1();) { incomingEdge = castTo($doNext(incomingEdge$iterator), 74); isSelfLoop = $isSelfloop(incomingEdge); isInsideSelfLoop = isSelfLoop && insideSelfLoopsEnabled && $booleanValue(castToBoolean($getProperty_0(incomingEdge, INSIDE_SELF_LOOPS_YO))); sourceNode = connectableShapeToNode(castTo($get_20((!incomingEdge.sources && (incomingEdge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, incomingEdge, 4, 7)) , incomingEdge.sources), 0), 84)); isSelfLoop && isInsideSelfLoop?++outputPortVote:isSelfLoop && !isInsideSelfLoop?++inputPortVote:$getParent_2(sourceNode) == elkgraph || sourceNode == elkgraph?++outputPortVote:++inputPortVote; } return outputPortVote - inputPortVote; } function $checkEdgeValidity(edge){ if ((!edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)) , edge.sources).size_0 == 0) { throw toJs(new UnsupportedGraphException('Edges must have a source.')); } else if ((!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets).size_0 == 0) { throw toJs(new UnsupportedGraphException('Edges must have a target.')); } else { !edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)); if (!(edge.sources.size_0 <= 1 && (!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets.size_0 <= 1))) { throw toJs(new UnsupportedGraphException('Hyperedges are not supported.')); } } } function $checkExternalPorts(elkgraph, graphProperties){ var connectsToChild, elkedge, elkedge$iterator, elkport, enableSelfLoops, externalPortEdges, hasExternalPorts, hasHyperedges, isInsideSelfLoop, portIterator, portLabelPlacement; enableSelfLoops = $booleanValue(castToBoolean($getProperty_0(elkgraph, ($clinit_LayeredOptions() , INSIDE_SELF_LOOPS_ACTIVATE)))); portLabelPlacement = castTo($getProperty_0(elkgraph, PORT_LABELS_PLACEMENT_1), 21); hasExternalPorts = false; hasHyperedges = false; portIterator = new AbstractEList$EIterator((!elkgraph.ports && (elkgraph.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, elkgraph, 9, 9)) , elkgraph.ports)); while (portIterator.cursor != portIterator.this$01_2.size_1() && (!hasExternalPorts || !hasHyperedges)) { elkport = castTo($doNext(portIterator), 123); externalPortEdges = 0; for (elkedge$iterator = $iterator(concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [(!elkport.incomingEdges && (elkport.incomingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, elkport, 8, 5)) , elkport.incomingEdges), (!elkport.outgoingEdges && (elkport.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, elkport, 7, 4)) , elkport.outgoingEdges)]))); $hasNext_1(elkedge$iterator);) { elkedge = castTo($next_0(elkedge$iterator), 74); isInsideSelfLoop = enableSelfLoops && $isSelfloop(elkedge) && $booleanValue(castToBoolean($getProperty_0(elkedge, INSIDE_SELF_LOOPS_YO))); connectsToChild = $contains_11((!elkedge.sources && (elkedge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, elkedge, 4, 7)) , elkedge.sources), elkport)?elkgraph == $getParent_2(connectableShapeToNode(castTo($get_20((!elkedge.targets && (elkedge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, elkedge, 5, 8)) , elkedge.targets), 0), 84))):elkgraph == $getParent_2(connectableShapeToNode(castTo($get_20((!elkedge.sources && (elkedge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, elkedge, 4, 7)) , elkedge.sources), 0), 84))); if (isInsideSelfLoop || connectsToChild) { ++externalPortEdges; if (externalPortEdges > 1) { break; } } } externalPortEdges > 0?(hasExternalPorts = true):portLabelPlacement.contains(($clinit_PortLabelPlacement() , INSIDE_0)) && (!elkport.labels && (elkport.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, elkport, 1, 7)) , elkport.labels).size_0 > 0 && (hasExternalPorts = true); externalPortEdges > 1 && (hasHyperedges = true); } hasExternalPorts && graphProperties.add_2(($clinit_GraphProperties() , EXTERNAL_PORTS)); hasHyperedges && graphProperties.add_2(($clinit_GraphProperties() , HYPEREDGES)); } function $createLGraph(elkgraph){ var all, lPadding, lgraph, nodeLabelpadding, nodePadding, root; lgraph = new LGraph; $copyProperties(lgraph, elkgraph); maskUndefined($getProperty(lgraph, ($clinit_LayeredOptions() , DIRECTION))) === maskUndefined(($clinit_Direction_0() , UNDEFINED_2)) && $setProperty_0(lgraph, DIRECTION, getDirection_1(lgraph)); if ($getProperty(lgraph, ($clinit_LabelManagementOptions() , LABEL_MANAGER)) == null) { root = castTo(getRootContainer(elkgraph), 167); $setProperty_0(lgraph, LABEL_MANAGER, throwClassCastExceptionUnlessNull(root.getProperty(LABEL_MANAGER))); } $setProperty_0(lgraph, ($clinit_InternalProperties_1() , ORIGIN_0), elkgraph); $setProperty_0(lgraph, GRAPH_PROPERTIES, (all = castTo($getEnumConstants(Lorg_eclipse_elk_alg_layered_options_GraphProperties_2_classLit), 9) , new EnumSet$EnumSetImpl(all, castTo(createFrom(all, all.length), 9), 0))); nodeLabelpadding = computeInsideNodeLabelPadding((!$getParent_2(elkgraph)?null:($clinit_ElkGraphAdapters() , new ElkGraphAdapters$ElkGraphAdapter($getParent_2(elkgraph))) , $clinit_ElkGraphAdapters() , new ElkGraphAdapters$ElkNodeAdapter(!$getParent_2(elkgraph)?null:new ElkGraphAdapters$ElkGraphAdapter($getParent_2(elkgraph)), elkgraph)), RIGHT_6); nodePadding = castTo($getProperty(lgraph, PADDING_1), 107); lPadding = lgraph.padding; $add_15(lPadding, nodePadding); $add_15(lPadding, nodeLabelpadding); return lgraph; } function $ensureDefinedPortSide(lgraph, elkport){ var layoutDirection, netFlow, portConstraints, portSide; layoutDirection = castTo($getProperty(lgraph, ($clinit_LayeredOptions() , DIRECTION)), 88); portSide = castTo($getProperty_0(elkport, PORT_SIDE), 64); portConstraints = castTo($getProperty(lgraph, PORT_CONSTRAINTS_0), 101); if (portConstraints != ($clinit_PortConstraints() , FREE) && portConstraints != UNDEFINED_4) { if (portSide == ($clinit_PortSide() , UNDEFINED_5)) { portSide = calcPortSide_0(elkport, layoutDirection); portSide == UNDEFINED_5 && (portSide = fromDirection(layoutDirection)); } } else { netFlow = $calculateNetFlow_0(elkport); netFlow > 0?(portSide = fromDirection(layoutDirection)):(portSide = $opposed(fromDirection(layoutDirection))); } $setProperty_1(elkport, PORT_SIDE, portSide); } function $findCoordinateSystemOrigin(this$static, elkedge, topLevelElkGraph, topLevelLGraph){ var lgraph, lnode, origin_0, source, target; source = connectableShapeToNode(castTo($get_20((!elkedge.sources && (elkedge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, elkedge, 4, 7)) , elkedge.sources), 0), 84)); target = connectableShapeToNode(castTo($get_20((!elkedge.targets && (elkedge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, elkedge, 5, 8)) , elkedge.targets), 0), 84)); if ($getParent_2(source) == $getParent_2(target)) { return null; } if (isDescendant_0(target, source)) { return null; } origin_0 = $getContainingNode(elkedge); if (origin_0 == topLevelElkGraph) { return topLevelLGraph; } else { lnode = castTo($get_10(this$static.nodeAndPortMap, origin_0), 10); if (lnode) { lgraph = lnode.nestedGraph; if (lgraph) { return lgraph; } } } return null; } function $hasInsideSelfLoops(elknode){ var edge, edge$iterator; if ($booleanValue(castToBoolean($getProperty_0(elknode, ($clinit_LayeredOptions() , INSIDE_SELF_LOOPS_ACTIVATE))))) { for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2(allOutgoingEdges(elknode).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 74); if ($isSelfloop(edge)) { if ($booleanValue(castToBoolean($getProperty_0(edge, INSIDE_SELF_LOOPS_YO)))) { return true; } } } } return false; } function $importFlatGraph(this$static, elkgraph0, lgraph){ var child, child$iterator, connectsSiblings, connectsToGraph, elkedge, elkedge$iterator, elkedge$iterator0, elkgraph, enableInsideSelfLoops, index_0, isInsideSelfLoop, isToBeLaidOut, source, target; index_0 = 0; for (child$iterator = new AbstractEList$EIterator((!elkgraph0.children && (elkgraph0.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, elkgraph0, 10, 11)) , elkgraph0.children)); child$iterator.cursor != child$iterator.this$01_2.size_1();) { child = castTo($doNext(child$iterator), 27); if (!$booleanValue(castToBoolean($getProperty_0(child, ($clinit_LayeredOptions() , NO_LAYOUT))))) { elkgraph = $getParent_2(child); if ((maskUndefined($getProperty_0(elkgraph, CONSIDER_MODEL_ORDER_STRATEGY_0)) !== maskUndefined(($clinit_OrderingStrategy() , NONE_10)) || maskUndefined($getProperty_0(elkgraph, CYCLE_BREAKING_STRATEGY_0)) === maskUndefined(($clinit_CycleBreakingStrategy() , MODEL_ORDER_0)) || maskUndefined($getProperty_0(elkgraph, CYCLE_BREAKING_STRATEGY_0)) === maskUndefined(($clinit_CycleBreakingStrategy() , GREEDY_MODEL_ORDER)) || $booleanValue(castToBoolean($getProperty_0(elkgraph, CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER_0))) || maskUndefined($getProperty_0(elkgraph, CONSIDER_MODEL_ORDER_COMPONENTS_0)) !== maskUndefined(($clinit_ComponentOrderingStrategy() , NONE)) || maskUndefined($getProperty_0(elkgraph, LAYERING_NODE_PROMOTION_STRATEGY_0)) === maskUndefined(($clinit_NodePromotionStrategy() , MODEL_ORDER_LEFT_TO_RIGHT)) || maskUndefined($getProperty_0(elkgraph, LAYERING_NODE_PROMOTION_STRATEGY_0)) === maskUndefined(($clinit_NodePromotionStrategy() , MODEL_ORDER_RIGHT_TO_LEFT)) || maskUndefined($getProperty_0(elkgraph, LAYERING_STRATEGY_0)) === maskUndefined(($clinit_LayeringStrategy() , BF_MODEL_ORDER)) || maskUndefined($getProperty_0(elkgraph, LAYERING_STRATEGY_0)) === maskUndefined(($clinit_LayeringStrategy() , DF_MODEL_ORDER))) && !$booleanValue(castToBoolean($getProperty_0(child, CONSIDER_MODEL_ORDER_NO_MODEL_ORDER_0)))) { $setProperty_1(child, ($clinit_InternalProperties_1() , MODEL_ORDER_1), valueOf_3(index_0)); ++index_0; } $transformNode(this$static, child, lgraph); } } index_0 = 0; for (elkedge$iterator0 = new AbstractEList$EIterator((!elkgraph0.containedEdges && (elkgraph0.containedEdges = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, elkgraph0, 12, 3)) , elkgraph0.containedEdges)); elkedge$iterator0.cursor != elkedge$iterator0.this$01_2.size_1();) { elkedge = castTo($doNext(elkedge$iterator0), 74); if (maskUndefined($getProperty_0(elkgraph0, ($clinit_LayeredOptions() , CONSIDER_MODEL_ORDER_STRATEGY_0))) !== maskUndefined(($clinit_OrderingStrategy() , NONE_10)) || maskUndefined($getProperty_0(elkgraph0, CYCLE_BREAKING_STRATEGY_0)) === maskUndefined(($clinit_CycleBreakingStrategy() , MODEL_ORDER_0)) || maskUndefined($getProperty_0(elkgraph0, CYCLE_BREAKING_STRATEGY_0)) === maskUndefined(($clinit_CycleBreakingStrategy() , GREEDY_MODEL_ORDER)) || $booleanValue(castToBoolean($getProperty_0(elkgraph0, CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER_0))) || maskUndefined($getProperty_0(elkgraph0, CONSIDER_MODEL_ORDER_COMPONENTS_0)) !== maskUndefined(($clinit_ComponentOrderingStrategy() , NONE)) || maskUndefined($getProperty_0(elkgraph0, LAYERING_NODE_PROMOTION_STRATEGY_0)) === maskUndefined(($clinit_NodePromotionStrategy() , MODEL_ORDER_LEFT_TO_RIGHT)) || maskUndefined($getProperty_0(elkgraph0, LAYERING_NODE_PROMOTION_STRATEGY_0)) === maskUndefined(($clinit_NodePromotionStrategy() , MODEL_ORDER_RIGHT_TO_LEFT)) || maskUndefined($getProperty_0(elkgraph0, LAYERING_STRATEGY_0)) === maskUndefined(($clinit_LayeringStrategy() , BF_MODEL_ORDER)) || maskUndefined($getProperty_0(elkgraph0, LAYERING_STRATEGY_0)) === maskUndefined(($clinit_LayeringStrategy() , DF_MODEL_ORDER))) { $setProperty_1(elkedge, ($clinit_InternalProperties_1() , MODEL_ORDER_1), valueOf_3(index_0)); ++index_0; } source = getSourceNode(elkedge); target = getTargetNode_0(elkedge); enableInsideSelfLoops = $booleanValue(castToBoolean($getProperty_0(source, INSIDE_SELF_LOOPS_ACTIVATE))); isToBeLaidOut = !$booleanValue(castToBoolean($getProperty_0(elkedge, NO_LAYOUT))); isInsideSelfLoop = enableInsideSelfLoops && $isSelfloop(elkedge) && $booleanValue(castToBoolean($getProperty_0(elkedge, INSIDE_SELF_LOOPS_YO))); connectsSiblings = $getParent_2(source) == elkgraph0 && $getParent_2(source) == $getParent_2(target); connectsToGraph = ($getParent_2(source) == elkgraph0 && target == elkgraph0) ^ ($getParent_2(target) == elkgraph0 && source == elkgraph0); isToBeLaidOut && !isInsideSelfLoop && (connectsToGraph || connectsSiblings) && $transformEdge(this$static, elkedge, elkgraph0, lgraph); } if ($getParent_2(elkgraph0)) { for (elkedge$iterator = new AbstractEList$EIterator($getContainedEdges($getParent_2(elkgraph0))); elkedge$iterator.cursor != elkedge$iterator.this$01_2.size_1();) { elkedge = castTo($doNext(elkedge$iterator), 74); source = getSourceNode(elkedge); if (source == elkgraph0 && $isSelfloop(elkedge)) { isInsideSelfLoop = $booleanValue(castToBoolean($getProperty_0(source, ($clinit_LayeredOptions() , INSIDE_SELF_LOOPS_ACTIVATE)))) && $booleanValue(castToBoolean($getProperty_0(elkedge, INSIDE_SELF_LOOPS_YO))); isInsideSelfLoop && $transformEdge(this$static, elkedge, elkgraph0, lgraph); } } } } function $importGraph_1(this$static, elkgraph){ var elkport, elkport$iterator, graphProperties, topLevelGraph; topLevelGraph = $createLGraph(elkgraph); !elkgraph.ports && (elkgraph.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, elkgraph, 9, 9)); $forEach_3(new StreamImpl(null, (!elkgraph.ports && (elkgraph.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, elkgraph, 9, 9)) , new Spliterators$IteratorSpliterator(elkgraph.ports, 16))), new ElkGraphImporter$lambda$0$Type_0(topLevelGraph)); graphProperties = castTo($getProperty(topLevelGraph, ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21); $checkExternalPorts(elkgraph, graphProperties); if (graphProperties.contains(($clinit_GraphProperties() , EXTERNAL_PORTS))) { for (elkport$iterator = new AbstractEList$EIterator((!elkgraph.ports && (elkgraph.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, elkgraph, 9, 9)) , elkgraph.ports)); elkport$iterator.cursor != elkport$iterator.this$01_2.size_1();) { elkport = castTo($doNext(elkport$iterator), 123); $transformExternalPort(this$static, elkgraph, topLevelGraph, elkport); } } castTo($getProperty_0(elkgraph, ($clinit_LayeredOptions() , NODE_SIZE_CONSTRAINTS_1)), 181).size_1() != 0 && $calculateMinimumGraphSize(elkgraph, topLevelGraph); $booleanValue(castToBoolean($getProperty(topLevelGraph, PARTITIONING_ACTIVATE))) && graphProperties.add_2(PARTITIONS); $hasProperty(topLevelGraph, SPACING_BASE_VALUE_0) && $apply_16(new LayeredSpacings$LayeredSpacingsBuilder($doubleValue(castToDouble($getProperty(topLevelGraph, SPACING_BASE_VALUE_0)))), topLevelGraph); maskUndefined($getProperty_0(elkgraph, HIERARCHY_HANDLING)) === maskUndefined(($clinit_HierarchyHandling() , INCLUDE_CHILDREN))?$importHierarchicalGraph(this$static, elkgraph, topLevelGraph):$importFlatGraph(this$static, elkgraph, topLevelGraph); return topLevelGraph; } function $importHierarchicalGraph(this$static, elkgraph0, lgraph){ var elkChildGraphNode, elkChildGraphNode$iterator, elkGraphNode, elkGraphQueue, elkedge, elkedge$iterator, elkgraph, elknode, finalNestedGraph, hasChildren, hasHierarchyHandlingEnabled, hasInsideSelfLoops, index_0, isInsideSelfLoop, isNodeToBeLaidOut, ledge, lnode, nestedGraph, parentElkGraph, parentGraphDirection, parentLGraph, parentLNode, partOfSameLayoutRun, sourceNode, targetNode, usesElkLayered; elkGraphQueue = new LinkedList; parentGraphDirection = castTo($getProperty(lgraph, ($clinit_LayeredOptions() , DIRECTION)), 88); index_0 = 0; $addAll(elkGraphQueue, (!elkgraph0.children && (elkgraph0.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, elkgraph0, 10, 11)) , elkgraph0.children)); while (elkGraphQueue.size_0 != 0) { elknode = castTo(elkGraphQueue.size_0 == 0?null:(checkCriticalElement(elkGraphQueue.size_0 != 0) , $removeNode_0(elkGraphQueue, elkGraphQueue.header.next_0)), 27); elkgraph = $getParent_2(elknode); (maskUndefined($getProperty_0(elkgraph, CONSIDER_MODEL_ORDER_STRATEGY_0)) !== maskUndefined(($clinit_OrderingStrategy() , NONE_10)) || maskUndefined($getProperty_0(elkgraph, CYCLE_BREAKING_STRATEGY_0)) === maskUndefined(($clinit_CycleBreakingStrategy() , MODEL_ORDER_0)) || maskUndefined($getProperty_0(elkgraph, CYCLE_BREAKING_STRATEGY_0)) === maskUndefined(($clinit_CycleBreakingStrategy() , GREEDY_MODEL_ORDER)) || $booleanValue(castToBoolean($getProperty_0(elkgraph, CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER_0))) || maskUndefined($getProperty_0(elkgraph, CONSIDER_MODEL_ORDER_COMPONENTS_0)) !== maskUndefined(($clinit_ComponentOrderingStrategy() , NONE)) || maskUndefined($getProperty_0(elkgraph, LAYERING_NODE_PROMOTION_STRATEGY_0)) === maskUndefined(($clinit_NodePromotionStrategy() , MODEL_ORDER_LEFT_TO_RIGHT)) || maskUndefined($getProperty_0(elkgraph, LAYERING_NODE_PROMOTION_STRATEGY_0)) === maskUndefined(($clinit_NodePromotionStrategy() , MODEL_ORDER_RIGHT_TO_LEFT)) || maskUndefined($getProperty_0(elkgraph, LAYERING_STRATEGY_0)) === maskUndefined(($clinit_LayeringStrategy() , BF_MODEL_ORDER)) || maskUndefined($getProperty_0(elkgraph, LAYERING_STRATEGY_0)) === maskUndefined(($clinit_LayeringStrategy() , DF_MODEL_ORDER))) && !$booleanValue(castToBoolean($getProperty_0(elknode, CONSIDER_MODEL_ORDER_NO_MODEL_ORDER_0))) && $setProperty_1(elknode, ($clinit_InternalProperties_1() , MODEL_ORDER_1), valueOf_3(index_0++)); isNodeToBeLaidOut = !$booleanValue(castToBoolean($getProperty_0(elknode, NO_LAYOUT))); if (isNodeToBeLaidOut) { hasChildren = (!elknode.children && (elknode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, elknode, 10, 11)) , elknode.children).size_0 != 0; hasInsideSelfLoops = $hasInsideSelfLoops(elknode); hasHierarchyHandlingEnabled = maskUndefined($getProperty_0(elknode, HIERARCHY_HANDLING)) === maskUndefined(($clinit_HierarchyHandling() , INCLUDE_CHILDREN)); usesElkLayered = !$hasProperty_0(elknode, ($clinit_CoreOptions() , ALGORITHM)) || $endsWith(castToString($getProperty_0(elknode, ALGORITHM))); nestedGraph = null; if (usesElkLayered && hasHierarchyHandlingEnabled && (hasChildren || hasInsideSelfLoops)) { nestedGraph = $createLGraph(elknode); $setProperty_0(nestedGraph, DIRECTION, parentGraphDirection); $hasProperty(nestedGraph, SPACING_BASE_VALUE_0) && $apply_16(new LayeredSpacings$LayeredSpacingsBuilder($doubleValue(castToDouble($getProperty(nestedGraph, SPACING_BASE_VALUE_0)))), nestedGraph); if (castTo($getProperty_0(elknode, NODE_SIZE_CONSTRAINTS_1), 181).size_1() != 0) { finalNestedGraph = nestedGraph; $forEach_3(new StreamImpl(null, (!elknode.ports && (elknode.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, elknode, 9, 9)) , new Spliterators$IteratorSpliterator(elknode.ports, 16))), new ElkGraphImporter$lambda$1$Type(finalNestedGraph)); $calculateMinimumGraphSize(elknode, nestedGraph); } } parentLGraph = lgraph; parentLNode = castTo($get_10(this$static.nodeAndPortMap, $getParent_2(elknode)), 10); !!parentLNode && (parentLGraph = parentLNode.nestedGraph); lnode = $transformNode(this$static, elknode, parentLGraph); if (nestedGraph) { lnode.nestedGraph = nestedGraph; nestedGraph.parentNode = lnode; $addAll(elkGraphQueue, (!elknode.children && (elknode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, elknode, 10, 11)) , elknode.children)); } } } index_0 = 0; $addNode_0(elkGraphQueue, elkgraph0, elkGraphQueue.tail.prev, elkGraphQueue.tail); while (elkGraphQueue.size_0 != 0) { elkGraphNode = castTo(elkGraphQueue.size_0 == 0?null:(checkCriticalElement(elkGraphQueue.size_0 != 0) , $removeNode_0(elkGraphQueue, elkGraphQueue.header.next_0)), 27); for (elkedge$iterator = new AbstractEList$EIterator((!elkGraphNode.containedEdges && (elkGraphNode.containedEdges = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, elkGraphNode, 12, 3)) , elkGraphNode.containedEdges)); elkedge$iterator.cursor != elkedge$iterator.this$01_2.size_1();) { elkedge = castTo($doNext(elkedge$iterator), 74); $checkEdgeValidity(elkedge); (maskUndefined($getProperty_0(elkgraph0, CONSIDER_MODEL_ORDER_STRATEGY_0)) !== maskUndefined(($clinit_OrderingStrategy() , NONE_10)) || maskUndefined($getProperty_0(elkgraph0, CYCLE_BREAKING_STRATEGY_0)) === maskUndefined(($clinit_CycleBreakingStrategy() , MODEL_ORDER_0)) || maskUndefined($getProperty_0(elkgraph0, CYCLE_BREAKING_STRATEGY_0)) === maskUndefined(($clinit_CycleBreakingStrategy() , GREEDY_MODEL_ORDER)) || $booleanValue(castToBoolean($getProperty_0(elkgraph0, CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER_0))) || maskUndefined($getProperty_0(elkgraph0, CONSIDER_MODEL_ORDER_COMPONENTS_0)) !== maskUndefined(($clinit_ComponentOrderingStrategy() , NONE)) || maskUndefined($getProperty_0(elkgraph0, LAYERING_NODE_PROMOTION_STRATEGY_0)) === maskUndefined(($clinit_NodePromotionStrategy() , MODEL_ORDER_LEFT_TO_RIGHT)) || maskUndefined($getProperty_0(elkgraph0, LAYERING_NODE_PROMOTION_STRATEGY_0)) === maskUndefined(($clinit_NodePromotionStrategy() , MODEL_ORDER_RIGHT_TO_LEFT)) || maskUndefined($getProperty_0(elkgraph0, LAYERING_STRATEGY_0)) === maskUndefined(($clinit_LayeringStrategy() , BF_MODEL_ORDER)) || maskUndefined($getProperty_0(elkgraph0, LAYERING_STRATEGY_0)) === maskUndefined(($clinit_LayeringStrategy() , DF_MODEL_ORDER))) && $setProperty_1(elkedge, ($clinit_InternalProperties_1() , MODEL_ORDER_1), valueOf_3(index_0++)); sourceNode = connectableShapeToNode(castTo($get_20((!elkedge.sources && (elkedge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, elkedge, 4, 7)) , elkedge.sources), 0), 84)); targetNode = connectableShapeToNode(castTo($get_20((!elkedge.targets && (elkedge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, elkedge, 5, 8)) , elkedge.targets), 0), 84)); if ($booleanValue(castToBoolean($getProperty_0(elkedge, NO_LAYOUT))) || $booleanValue(castToBoolean($getProperty_0(sourceNode, NO_LAYOUT))) || $booleanValue(castToBoolean($getProperty_0(targetNode, NO_LAYOUT)))) { continue; } isInsideSelfLoop = $isSelfloop(elkedge) && $booleanValue(castToBoolean($getProperty_0(sourceNode, INSIDE_SELF_LOOPS_ACTIVATE))) && $booleanValue(castToBoolean($getProperty_0(elkedge, INSIDE_SELF_LOOPS_YO))); parentElkGraph = elkGraphNode; isInsideSelfLoop || isDescendant_0(targetNode, sourceNode)?(parentElkGraph = sourceNode):isDescendant_0(sourceNode, targetNode) && (parentElkGraph = targetNode); parentLGraph = lgraph; parentLNode = castTo($get_10(this$static.nodeAndPortMap, parentElkGraph), 10); !!parentLNode && (parentLGraph = parentLNode.nestedGraph); ledge = $transformEdge(this$static, elkedge, parentElkGraph, parentLGraph); $setProperty_0(ledge, ($clinit_InternalProperties_1() , COORDINATE_SYSTEM_ORIGIN), $findCoordinateSystemOrigin(this$static, elkedge, elkgraph0, lgraph)); } hasHierarchyHandlingEnabled = maskUndefined($getProperty_0(elkGraphNode, HIERARCHY_HANDLING)) === maskUndefined(($clinit_HierarchyHandling() , INCLUDE_CHILDREN)); if (hasHierarchyHandlingEnabled) { for (elkChildGraphNode$iterator = new AbstractEList$EIterator((!elkGraphNode.children && (elkGraphNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, elkGraphNode, 10, 11)) , elkGraphNode.children)); elkChildGraphNode$iterator.cursor != elkChildGraphNode$iterator.this$01_2.size_1();) { elkChildGraphNode = castTo($doNext(elkChildGraphNode$iterator), 27); usesElkLayered = !$hasProperty_0(elkChildGraphNode, ($clinit_CoreOptions() , ALGORITHM)) || $endsWith(castToString($getProperty_0(elkChildGraphNode, ALGORITHM))); partOfSameLayoutRun = maskUndefined($getProperty_0(elkChildGraphNode, HIERARCHY_HANDLING)) === maskUndefined(INCLUDE_CHILDREN); usesElkLayered && partOfSameLayoutRun && ($addNode_0(elkGraphQueue, elkChildGraphNode, elkGraphQueue.tail.prev, elkGraphQueue.tail) , true); } } } } function $isConnectedToExternalNodes(elkport){ var inEdge, inEdge$iterator, outEdge, outEdge$iterator, parent_0, sourceNode, targetNode; parent_0 = $getParent_3(elkport); for (outEdge$iterator = new AbstractEList$EIterator((!elkport.outgoingEdges && (elkport.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, elkport, 7, 4)) , elkport.outgoingEdges)); outEdge$iterator.cursor != outEdge$iterator.this$01_2.size_1();) { outEdge = castTo($doNext(outEdge$iterator), 74); targetNode = connectableShapeToNode(castTo($get_20((!outEdge.targets && (outEdge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, outEdge, 5, 8)) , outEdge.targets), 0), 84)); if (!isDescendant_0(targetNode, parent_0)) { return true; } } for (inEdge$iterator = new AbstractEList$EIterator((!elkport.incomingEdges && (elkport.incomingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, elkport, 8, 5)) , elkport.incomingEdges)); inEdge$iterator.cursor != inEdge$iterator.this$01_2.size_1();) { inEdge = castTo($doNext(inEdge$iterator), 74); sourceNode = connectableShapeToNode(castTo($get_20((!inEdge.sources && (inEdge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, inEdge, 4, 7)) , inEdge.sources), 0), 84)); if (!isDescendant_0(sourceNode, parent_0)) { return true; } } return false; } function $transformEdge(this$static, elkedge, elkparent, lgraph){ var bendPointsRequired, crossMinStrat, edgeSection, elkSourceNode, elkSourceShape, elkTargetNode, elkTargetShape, elklabel, elklabel$iterator, graphProperties, importedBendpoints, ledge, llabel, nodePlaceStrat, originalBendpoints, point, point$iterator, portType, sourceElem, sourceLNode, sourceLPort, sourcePoint, targetElem, targetLNode, targetLPort, targetPoint; $checkEdgeValidity(elkedge); elkSourceShape = castTo($get_20((!elkedge.sources && (elkedge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, elkedge, 4, 7)) , elkedge.sources), 0), 84); elkTargetShape = castTo($get_20((!elkedge.targets && (elkedge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, elkedge, 5, 8)) , elkedge.targets), 0), 84); elkSourceNode = connectableShapeToNode(elkSourceShape); elkTargetNode = connectableShapeToNode(elkTargetShape); edgeSection = (!elkedge.sections && (elkedge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, elkedge, 6, 6)) , elkedge.sections).size_0 == 0?null:castTo($get_20((!elkedge.sections && (elkedge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, elkedge, 6, 6)) , elkedge.sections), 0), 166); sourceLNode = castTo($get_10(this$static.nodeAndPortMap, elkSourceNode), 10); targetLNode = castTo($get_10(this$static.nodeAndPortMap, elkTargetNode), 10); sourceLPort = null; targetLPort = null; if (instanceOf(elkSourceShape, 193)) { sourceElem = castTo($get_10(this$static.nodeAndPortMap, elkSourceShape), 305); if (instanceOf(sourceElem, 12)) { sourceLPort = castTo(sourceElem, 12); } else if (instanceOf(sourceElem, 10)) { sourceLNode = castTo(sourceElem, 10); sourceLPort = castTo($get_11(sourceLNode.ports, 0), 12); } } if (instanceOf(elkTargetShape, 193)) { targetElem = castTo($get_10(this$static.nodeAndPortMap, elkTargetShape), 305); if (instanceOf(targetElem, 12)) { targetLPort = castTo(targetElem, 12); } else if (instanceOf(targetElem, 10)) { targetLNode = castTo(targetElem, 10); targetLPort = castTo($get_11(targetLNode.ports, 0), 12); } } if (!sourceLNode || !targetLNode) { throw toJs(new UnsupportedGraphException('The source or the target of edge ' + elkedge + ' could not be found. ' + 'This usually happens when an edge connects a node laid out by ELK Layered to a node in ' + 'another level of hierarchy laid out by either another instance of ELK Layered or another ' + 'layout algorithm alltogether. The former can be solved by setting the hierarchyHandling ' + 'option to INCLUDE_CHILDREN.')); } ledge = new LEdge; $copyProperties(ledge, elkedge); $setProperty_0(ledge, ($clinit_InternalProperties_1() , ORIGIN_0), elkedge); $setProperty_0(ledge, ($clinit_LayeredOptions() , JUNCTION_POINTS), null); graphProperties = castTo($getProperty(lgraph, GRAPH_PROPERTIES), 21); sourceLNode == targetLNode && graphProperties.add_2(($clinit_GraphProperties() , SELF_LOOPS)); if (!sourceLPort) { portType = ($clinit_PortType() , OUTPUT); sourcePoint = null; if (!!edgeSection && $isSideFixed(castTo($getProperty(sourceLNode, PORT_CONSTRAINTS_0), 101))) { sourcePoint = new KVector_1(edgeSection.startX, edgeSection.startY); toAbsolute(sourcePoint, $getContainingNode(elkedge)); toRelative(sourcePoint, elkparent); if (isDescendant_0(elkTargetNode, elkSourceNode)) { portType = INPUT; $add_19(sourcePoint, sourceLNode.pos); } } sourceLPort = createPort(sourceLNode, sourcePoint, portType, lgraph); } if (!targetLPort) { portType = ($clinit_PortType() , INPUT); targetPoint = null; if (!!edgeSection && $isSideFixed(castTo($getProperty(targetLNode, PORT_CONSTRAINTS_0), 101))) { targetPoint = new KVector_1(edgeSection.endX, edgeSection.endY); toAbsolute(targetPoint, $getContainingNode(elkedge)); toRelative(targetPoint, elkparent); } targetLPort = createPort(targetLNode, targetPoint, portType, $getGraph(targetLNode)); } $setSource_0(ledge, sourceLPort); $setTarget_0(ledge, targetLPort); (sourceLPort.incomingEdges.array.length > 1 || sourceLPort.outgoingEdges.array.length > 1 || targetLPort.incomingEdges.array.length > 1 || targetLPort.outgoingEdges.array.length > 1) && graphProperties.add_2(($clinit_GraphProperties() , HYPEREDGES)); for (elklabel$iterator = new AbstractEList$EIterator((!elkedge.labels && (elkedge.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, elkedge, 1, 7)) , elkedge.labels)); elklabel$iterator.cursor != elklabel$iterator.this$01_2.size_1();) { elklabel = castTo($doNext(elklabel$iterator), 135); if (!$booleanValue(castToBoolean($getProperty_0(elklabel, NO_LAYOUT))) && !!elklabel.text_0) { llabel = $transformLabel(elklabel); $add_3(ledge.labels, llabel); switch (castTo($getProperty(llabel, EDGE_LABELS_PLACEMENT), 278).ordinal) { case 1: case 2: graphProperties.add_2(($clinit_GraphProperties() , END_LABELS)); break; case 0: graphProperties.add_2(($clinit_GraphProperties() , CENTER_LABELS)); $setProperty_0(llabel, EDGE_LABELS_PLACEMENT, ($clinit_EdgeLabelPlacement() , CENTER_5)); } } } crossMinStrat = castTo($getProperty(lgraph, CROSSING_MINIMIZATION_STRATEGY_0), 322); nodePlaceStrat = castTo($getProperty(lgraph, NODE_PLACEMENT_STRATEGY_0), 323); bendPointsRequired = crossMinStrat == ($clinit_CrossingMinimizationStrategy() , INTERACTIVE_1) || nodePlaceStrat == ($clinit_NodePlacementStrategy() , INTERACTIVE_4); if (!!edgeSection && (!edgeSection.bendPoints && (edgeSection.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, edgeSection, 5)) , edgeSection.bendPoints).size_0 != 0 && bendPointsRequired) { originalBendpoints = createVectorChain(edgeSection); importedBendpoints = new KVectorChain; for (point$iterator = $listIterator_2(originalBendpoints, 0); point$iterator.currentNode != point$iterator.this$01.tail;) { point = castTo($next_9(point$iterator), 8); $add_7(importedBendpoints, new KVector_2(point)); } $setProperty_0(ledge, ORIGINAL_BENDPOINTS, importedBendpoints); } return ledge; } function $transformExternalPort(this$static, elkgraph, lgraph, elkport){ var dummy, dummyPort, elklabel, elklabel$iterator, elkportPosition, graphSize, insidePart, insidePortLabels, llabel, netFlow, portConstraints, portOffset, portSide; elkportPosition = new KVector_1(elkport.x_0 + elkport.width_0 / 2, elkport.y_0 + elkport.height / 2); netFlow = $calculateNetFlow_0(elkport); portConstraints = castTo($getProperty_0(elkgraph, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101); portSide = castTo($getProperty_0(elkport, PORT_SIDE), 64); if (!$containsKey_8($getAllProperties_0(elkport), PORT_BORDER_OFFSET)) { elkport.x_0 == 0 && elkport.y_0 == 0?(portOffset = 0):(portOffset = calcPortOffset_0(elkport, portSide)); $setProperty_1(elkport, PORT_BORDER_OFFSET, portOffset); } graphSize = new KVector_1(elkgraph.width_0, elkgraph.height); dummy = createExternalPortDummy(elkport, portConstraints, portSide, netFlow, graphSize, elkportPosition, new KVector_1(elkport.width_0, elkport.height), castTo($getProperty(lgraph, DIRECTION), 88), lgraph); $setProperty_0(dummy, ($clinit_InternalProperties_1() , ORIGIN_0), elkport); dummyPort = castTo($get_11(dummy.ports, 0), 12); $setConnectedToExternalNodes(dummyPort, $isConnectedToExternalNodes(elkport)); $setProperty_0(dummy, PORT_LABELS_PLACEMENT_1, ($clinit_PortLabelPlacement() , of_1(OUTSIDE_0))); insidePortLabels = castTo($getProperty_0(elkgraph, PORT_LABELS_PLACEMENT_1), 181).contains(INSIDE_0); for (elklabel$iterator = new AbstractEList$EIterator((!elkport.labels && (elkport.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, elkport, 1, 7)) , elkport.labels)); elklabel$iterator.cursor != elklabel$iterator.this$01_2.size_1();) { elklabel = castTo($doNext(elklabel$iterator), 135); if (!$booleanValue(castToBoolean($getProperty_0(elklabel, NO_LAYOUT))) && !!elklabel.text_0) { llabel = $transformLabel(elklabel); $add_3(dummyPort.labels, llabel); if (!insidePortLabels) { insidePart = 0; isFixed(castTo($getProperty_0(elkgraph, PORT_LABELS_PLACEMENT_1), 21)) && (insidePart = computeInsidePart(new KVector_1(elklabel.x_0, elklabel.y_0), new KVector_1(elklabel.width_0, elklabel.height), new KVector_1(elkport.width_0, elkport.height), 0, portSide)); switch (portSide.ordinal) { case 2: case 4: llabel.size_0.x_0 = insidePart; break; case 1: case 3: llabel.size_0.y_0 = insidePart; } } } } $setProperty_0(dummy, SPACING_LABEL_PORT_HORIZONTAL, castToDouble($getProperty_0($getParent_2(elkgraph), SPACING_LABEL_PORT_HORIZONTAL))); $setProperty_0(dummy, SPACING_LABEL_PORT_VERTICAL, castToDouble($getProperty_0($getParent_2(elkgraph), SPACING_LABEL_PORT_VERTICAL))); $setProperty_0(dummy, SPACING_LABEL_LABEL, castToDouble($getProperty_0($getParent_2(elkgraph), SPACING_LABEL_LABEL))); $add_3(lgraph.layerlessNodes, dummy); $put_6(this$static.nodeAndPortMap, elkport, dummy); } function $transformLabel(elklabel){ var newLabel; newLabel = new LLabel_0(elklabel.text_0); $copyProperties(newLabel, elklabel); $setProperty_0(newLabel, ($clinit_InternalProperties_1() , ORIGIN_0), elklabel); newLabel.size_0.x_0 = elklabel.width_0; newLabel.size_0.y_0 = elklabel.height; newLabel.pos.x_0 = elklabel.x_0; newLabel.pos.y_0 = elklabel.y_0; return newLabel; } function $transformNode(this$static, elknode, lgraph){ var direction, elkgraph, elklabel, elklabel$iterator, elkport, elkport$iterator, graphProperties, lnode, portConstraints, portModelOrder; lnode = new LNode(lgraph); $copyProperties(lnode, elknode); $setProperty_0(lnode, ($clinit_InternalProperties_1() , ORIGIN_0), elknode); lnode.size_0.x_0 = elknode.width_0; lnode.size_0.y_0 = elknode.height; lnode.pos.x_0 = elknode.x_0; lnode.pos.y_0 = elknode.y_0; $add_3(lgraph.layerlessNodes, lnode); $put_6(this$static.nodeAndPortMap, elknode, lnode); ((!elknode.children && (elknode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, elknode, 10, 11)) , elknode.children).size_0 != 0 || $booleanValue(castToBoolean($getProperty_0(elknode, ($clinit_LayeredOptions() , INSIDE_SELF_LOOPS_ACTIVATE))))) && $setProperty_0(lnode, COMPOUND_NODE, ($clinit_Boolean() , true)); graphProperties = castTo($getProperty(lgraph, GRAPH_PROPERTIES), 21); portConstraints = castTo($getProperty(lnode, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101); portConstraints == ($clinit_PortConstraints() , UNDEFINED_4)?$setProperty_0(lnode, PORT_CONSTRAINTS_0, FREE):portConstraints != FREE && graphProperties.add_2(($clinit_GraphProperties() , NON_FREE_PORTS)); portModelOrder = 0; direction = castTo($getProperty(lgraph, DIRECTION), 88); for (elkport$iterator = new AbstractEList$EIterator((!elknode.ports && (elknode.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, elknode, 9, 9)) , elknode.ports)); elkport$iterator.cursor != elkport$iterator.this$01_2.size_1();) { elkport = castTo($doNext(elkport$iterator), 123); elkgraph = $getParent_2(elknode); (maskUndefined($getProperty_0(elkgraph, CONSIDER_MODEL_ORDER_STRATEGY_0)) !== maskUndefined(($clinit_OrderingStrategy() , NONE_10)) || maskUndefined($getProperty_0(elkgraph, CYCLE_BREAKING_STRATEGY_0)) === maskUndefined(($clinit_CycleBreakingStrategy() , MODEL_ORDER_0)) || maskUndefined($getProperty_0(elkgraph, CYCLE_BREAKING_STRATEGY_0)) === maskUndefined(($clinit_CycleBreakingStrategy() , GREEDY_MODEL_ORDER)) || $booleanValue(castToBoolean($getProperty_0(elkgraph, CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER_0))) || maskUndefined($getProperty_0(elkgraph, CONSIDER_MODEL_ORDER_COMPONENTS_0)) !== maskUndefined(($clinit_ComponentOrderingStrategy() , NONE)) || maskUndefined($getProperty_0(elkgraph, LAYERING_NODE_PROMOTION_STRATEGY_0)) === maskUndefined(($clinit_NodePromotionStrategy() , MODEL_ORDER_LEFT_TO_RIGHT)) || maskUndefined($getProperty_0(elkgraph, LAYERING_NODE_PROMOTION_STRATEGY_0)) === maskUndefined(($clinit_NodePromotionStrategy() , MODEL_ORDER_RIGHT_TO_LEFT)) || maskUndefined($getProperty_0(elkgraph, LAYERING_STRATEGY_0)) === maskUndefined(($clinit_LayeringStrategy() , BF_MODEL_ORDER)) || maskUndefined($getProperty_0(elkgraph, LAYERING_STRATEGY_0)) === maskUndefined(($clinit_LayeringStrategy() , DF_MODEL_ORDER))) && !$booleanValue(castToBoolean($getProperty_0(elknode, CONSIDER_MODEL_ORDER_NO_MODEL_ORDER_0))) && $setProperty_1(elkport, MODEL_ORDER_1, valueOf_3(portModelOrder++)); $booleanValue(castToBoolean($getProperty_0(elkport, NO_LAYOUT))) || $transformPort(this$static, elkport, lnode, graphProperties, direction, portConstraints); } for (elklabel$iterator = new AbstractEList$EIterator((!elknode.labels && (elknode.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, elknode, 1, 7)) , elknode.labels)); elklabel$iterator.cursor != elklabel$iterator.this$01_2.size_1();) { elklabel = castTo($doNext(elklabel$iterator), 135); !$booleanValue(castToBoolean($getProperty_0(elklabel, NO_LAYOUT))) && !!elklabel.text_0 && $add_3(lnode.labels, $transformLabel(elklabel)); } $booleanValue(castToBoolean($getProperty(lnode, COMMENT_BOX))) && graphProperties.add_2(($clinit_GraphProperties() , COMMENTS)); if ($booleanValue(castToBoolean($getProperty(lnode, HYPERNODE)))) { graphProperties.add_2(($clinit_GraphProperties() , HYPERNODES)); graphProperties.add_2(HYPEREDGES); $setProperty_0(lnode, PORT_CONSTRAINTS_0, FREE); } return lnode; } function $transformPort(this$static, elkport, parentLNode, graphProperties, layoutDirection, portConstraints){ var connectionsToDescendants, elklabel, elklabel$iterator, lport, portPos, portSize; lport = new LPort; $copyProperties(lport, elkport); $setSide(lport, castTo($getProperty_0(elkport, ($clinit_LayeredOptions() , PORT_SIDE)), 64)); $setProperty_0(lport, ($clinit_InternalProperties_1() , ORIGIN_0), elkport); $setNode(lport, parentLNode); portSize = lport.size_0; portSize.x_0 = elkport.width_0; portSize.y_0 = elkport.height; portPos = lport.pos; portPos.x_0 = elkport.x_0; portPos.y_0 = elkport.y_0; $put_6(this$static.nodeAndPortMap, elkport, lport); connectionsToDescendants = $anyMatch($map($flatMap(new StreamImpl(null, (!elkport.outgoingEdges && (elkport.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, elkport, 7, 4)) , new Spliterators$IteratorSpliterator(elkport.outgoingEdges, 16))), new ElkGraphImporter$lambda$2$Type), new ElkGraphImporter$0methodref$connectableShapeToNode$Type), new ElkGraphImporter$lambda$4$Type(elkport)); connectionsToDescendants || (connectionsToDescendants = $anyMatch($map($flatMap(new StreamImpl(null, (!elkport.incomingEdges && (elkport.incomingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, elkport, 8, 5)) , new Spliterators$IteratorSpliterator(elkport.incomingEdges, 16))), new ElkGraphImporter$lambda$5$Type), new ElkGraphImporter$1methodref$connectableShapeToNode$Type), new ElkGraphImporter$lambda$7$Type(elkport))); connectionsToDescendants || (connectionsToDescendants = $anyMatch(new StreamImpl(null, (!elkport.outgoingEdges && (elkport.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, elkport, 7, 4)) , new Spliterators$IteratorSpliterator(elkport.outgoingEdges, 16))), new ElkGraphImporter$lambda$8$Type)); $setProperty_0(lport, INSIDE_CONNECTIONS, ($clinit_Boolean() , connectionsToDescendants?true:false)); initializePort(lport, portConstraints, layoutDirection, castTo($getProperty_0(elkport, PORT_ANCHOR), 8)); for (elklabel$iterator = new AbstractEList$EIterator((!elkport.labels && (elkport.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, elkport, 1, 7)) , elkport.labels)); elklabel$iterator.cursor != elklabel$iterator.this$01_2.size_1();) { elklabel = castTo($doNext(elklabel$iterator), 135); !$booleanValue(castToBoolean($getProperty_0(elklabel, NO_LAYOUT))) && !!elklabel.text_0 && $add_3(lport.labels, $transformLabel(elklabel)); } switch (layoutDirection.ordinal) { case 2: case 1: (lport.side == ($clinit_PortSide() , NORTH_3) || lport.side == SOUTH_2) && graphProperties.add_2(($clinit_GraphProperties() , NORTH_SOUTH_PORTS)); break; case 4: case 3: (lport.side == ($clinit_PortSide() , EAST_2) || lport.side == WEST_2) && graphProperties.add_2(($clinit_GraphProperties() , NORTH_SOUTH_PORTS)); } return lport; } function ElkGraphImporter(){ this.nodeAndPortMap = new HashMap; } function lambda$4_3(elkport_0, targetNode_1){ return isDescendant_0(targetNode_1, $getParent_3(elkport_0)); } function lambda$7_0(elkport_0, sourceNode_1){ return isDescendant_0(sourceNode_1, $getParent_3(elkport_0)); } function lambda$8(edge_0){ return $isSelfloop(edge_0) && $booleanValue(castToBoolean($getProperty_0(edge_0, ($clinit_LayeredOptions() , INSIDE_SELF_LOOPS_YO)))); } defineClass(1330, 1, {}, ElkGraphImporter); var Lorg_eclipse_elk_alg_layered_graph_transform_ElkGraphImporter_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph.transform', 'ElkGraphImporter', 1330); function ElkGraphImporter$0methodref$connectableShapeToNode$Type(){ } defineClass(1334, 1, {}, ElkGraphImporter$0methodref$connectableShapeToNode$Type); _.apply_0 = function apply_68(arg0){ return connectableShapeToNode(castTo(arg0, 84)); } ; var Lorg_eclipse_elk_alg_layered_graph_transform_ElkGraphImporter$0methodref$connectableShapeToNode$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph.transform', 'ElkGraphImporter/0methodref$connectableShapeToNode$Type', 1334); function ElkGraphImporter$1methodref$connectableShapeToNode$Type(){ } defineClass(1337, 1, {}, ElkGraphImporter$1methodref$connectableShapeToNode$Type); _.apply_0 = function apply_69(arg0){ return connectableShapeToNode(castTo(arg0, 84)); } ; var Lorg_eclipse_elk_alg_layered_graph_transform_ElkGraphImporter$1methodref$connectableShapeToNode$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph.transform', 'ElkGraphImporter/1methodref$connectableShapeToNode$Type', 1337); function ElkGraphImporter$lambda$0$Type_0(topLevelGraph_1){ this.topLevelGraph_1 = topLevelGraph_1; } defineClass(1331, 1, $intern_19, ElkGraphImporter$lambda$0$Type_0); _.accept = function accept_64(arg0){ $ensureDefinedPortSide(this.topLevelGraph_1, castTo(arg0, 123)); } ; var Lorg_eclipse_elk_alg_layered_graph_transform_ElkGraphImporter$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph.transform', 'ElkGraphImporter/lambda$0$Type', 1331); function ElkGraphImporter$lambda$1$Type(finalNestedGraph_1){ this.finalNestedGraph_1 = finalNestedGraph_1; } defineClass(1332, 1, $intern_19, ElkGraphImporter$lambda$1$Type); _.accept = function accept_65(arg0){ $ensureDefinedPortSide(this.finalNestedGraph_1, castTo(arg0, 123)); } ; var Lorg_eclipse_elk_alg_layered_graph_transform_ElkGraphImporter$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph.transform', 'ElkGraphImporter/lambda$1$Type', 1332); function ElkGraphImporter$lambda$2$Type(){ } defineClass(1333, 1, {}, ElkGraphImporter$lambda$2$Type); _.apply_0 = function apply_70(arg0){ return new StreamImpl(null, new Spliterators$IteratorSpliterator($getTargets(castTo(arg0, 74)), 16)); } ; var Lorg_eclipse_elk_alg_layered_graph_transform_ElkGraphImporter$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph.transform', 'ElkGraphImporter/lambda$2$Type', 1333); function ElkGraphImporter$lambda$4$Type(elkport_0){ this.elkport_0 = elkport_0; } defineClass(1335, 1, $intern_40, ElkGraphImporter$lambda$4$Type); _.test_0 = function test_25(arg0){ return lambda$4_3(this.elkport_0, castTo(arg0, 27)); } ; var Lorg_eclipse_elk_alg_layered_graph_transform_ElkGraphImporter$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph.transform', 'ElkGraphImporter/lambda$4$Type', 1335); function ElkGraphImporter$lambda$5$Type(){ } defineClass(1336, 1, {}, ElkGraphImporter$lambda$5$Type); _.apply_0 = function apply_71(arg0){ return new StreamImpl(null, new Spliterators$IteratorSpliterator($getSources(castTo(arg0, 74)), 16)); } ; var Lorg_eclipse_elk_alg_layered_graph_transform_ElkGraphImporter$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph.transform', 'ElkGraphImporter/lambda$5$Type', 1336); function ElkGraphImporter$lambda$7$Type(elkport_0){ this.elkport_0 = elkport_0; } defineClass(1338, 1, $intern_40, ElkGraphImporter$lambda$7$Type); _.test_0 = function test_26(arg0){ return lambda$7_0(this.elkport_0, castTo(arg0, 27)); } ; var Lorg_eclipse_elk_alg_layered_graph_transform_ElkGraphImporter$lambda$7$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph.transform', 'ElkGraphImporter/lambda$7$Type', 1338); function ElkGraphImporter$lambda$8$Type(){ } defineClass(1339, 1, $intern_40, ElkGraphImporter$lambda$8$Type); _.test_0 = function test_27(arg0){ return lambda$8(castTo(arg0, 74)); } ; var Lorg_eclipse_elk_alg_layered_graph_transform_ElkGraphImporter$lambda$8$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph.transform', 'ElkGraphImporter/lambda$8$Type', 1339); function $clinit_ElkGraphLayoutTransferrer(){ $clinit_ElkGraphLayoutTransferrer = emptyMethod; ZERO_OFFSET = new KVector; } function $applyEdgeLayout(ledge, routing, offset){ var bendPoints, edgeOffset, elkedge, elkedgeSection, elklabel, junctionPoints, llabel, llabel$iterator, sourcePoint, sourcePort, targetPoint; elkedge = castTo($getProperty(ledge, ($clinit_InternalProperties_1() , ORIGIN_0)), 74); if (!elkedge) { return; } bendPoints = ledge.bendPoints; edgeOffset = new KVector_2(offset); $add_19(edgeOffset, $calculateHierarchicalOffset(ledge)); if (isDescendant(ledge.target.owner, ledge.source.owner)) { sourcePort = ledge.source; sourcePoint = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [sourcePort.pos, sourcePort.anchor])); $sub_0(sourcePoint, offset); } else { sourcePoint = $getAbsoluteAnchor(ledge.source); } $addNode_0(bendPoints, sourcePoint, bendPoints.header, bendPoints.header.next_0); targetPoint = $getAbsoluteAnchor(ledge.target); $getProperty(ledge, TARGET_OFFSET) != null && $add_19(targetPoint, castTo($getProperty(ledge, TARGET_OFFSET), 8)); $addNode_0(bendPoints, targetPoint, bendPoints.tail.prev, bendPoints.tail); $offset_2(bendPoints, edgeOffset); elkedgeSection = firstEdgeSection(elkedge, true, true); $setIncomingShape(elkedgeSection, castTo($get_20((!elkedge.sources && (elkedge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, elkedge, 4, 7)) , elkedge.sources), 0), 84)); $setOutgoingShape(elkedgeSection, castTo($get_20((!elkedge.targets && (elkedge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, elkedge, 5, 8)) , elkedge.targets), 0), 84)); applyVectorChain(bendPoints, elkedgeSection); for (llabel$iterator = new ArrayList$1(ledge.labels); llabel$iterator.i < llabel$iterator.this$01.array.length;) { llabel = castTo($next_6(llabel$iterator), 72); elklabel = castTo($getProperty(llabel, ORIGIN_0), 135); $setWidth_0(elklabel, llabel.size_0.x_0); $setHeight_0(elklabel, llabel.size_0.y_0); $setLocation_1(elklabel, llabel.pos.x_0 + edgeOffset.x_0, llabel.pos.y_0 + edgeOffset.y_0); $setProperty_1(elklabel, ($clinit_LabelDummySwitcher() , INCLUDE_LABEL), castToBoolean($getProperty(llabel, INCLUDE_LABEL))); } junctionPoints = castTo($getProperty(ledge, ($clinit_LayeredOptions() , JUNCTION_POINTS)), 75); if (junctionPoints) { $offset_2(junctionPoints, edgeOffset); $setProperty_1(elkedge, JUNCTION_POINTS, junctionPoints); } else { $setProperty_1(elkedge, JUNCTION_POINTS, null); } routing == ($clinit_EdgeRouting() , SPLINES)?$setProperty_1(elkedge, EDGE_ROUTING, SPLINES):$setProperty_1(elkedge, EDGE_ROUTING, null); } function $applyLayout_2(this$static, lgraph){ var edgeList, elkport, graphOrigin, lPadding, ledge, ledge$iterator, lnode, lnode$iterator, lnode$iterator0, nestedGraph, offset, padding, parentElkNode, parentLNode, port, port$iterator, portPosition, routing, sizeOptions; graphOrigin = $getProperty(lgraph, ($clinit_InternalProperties_1() , ORIGIN_0)); if (!instanceOf(graphOrigin, 207)) { return; } parentElkNode = castTo(graphOrigin, 27); parentLNode = lgraph.parentNode; offset = new KVector_2(lgraph.offset); lPadding = lgraph.padding; offset.x_0 += lPadding.left; offset.y_0 += lPadding.top_0; sizeOptions = castTo($getProperty_0(parentElkNode, ($clinit_LayeredOptions() , NODE_SIZE_OPTIONS_1)), 181); if ($containsEnum(sizeOptions, ($clinit_SizeOptions() , COMPUTE_PADDING))) { padding = castTo($getProperty_0(parentElkNode, PADDING_1), 107); $setBottom(padding, lPadding.bottom); $setTop(padding, lPadding.top_0); $setLeft(padding, lPadding.left); $setRight(padding, lPadding.right); } edgeList = new ArrayList; for (lnode$iterator0 = new ArrayList$1(lgraph.layerlessNodes); lnode$iterator0.i < lnode$iterator0.this$01.array.length;) { lnode = castTo($next_6(lnode$iterator0), 10); if (instanceOf($getProperty(lnode, ORIGIN_0), 207)) { $applyNodeLayout(lnode, offset); } else if (instanceOf($getProperty(lnode, ORIGIN_0), 193) && !parentLNode) { elkport = castTo($getProperty(lnode, ORIGIN_0), 123); portPosition = getExternalPortPosition(lgraph, lnode, elkport.width_0, elkport.height); $setLocation_1(elkport, portPosition.x_0, portPosition.y_0); } for (port$iterator = new ArrayList$1(lnode.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); $forEach_3($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(port.outgoingEdges, 16)), new ElkGraphLayoutTransferrer$lambda$0$Type(lnode)), new ElkGraphLayoutTransferrer$lambda$1$Type(edgeList)); } } if (parentLNode) { for (port$iterator = new ArrayList$1(parentLNode.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); $forEach_3($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(port.outgoingEdges, 16)), new ElkGraphLayoutTransferrer$lambda$2$Type(parentLNode)), new ElkGraphLayoutTransferrer$lambda$3$Type(edgeList)); } } routing = castTo($getProperty_0(parentElkNode, EDGE_ROUTING), 223); for (ledge$iterator = new ArrayList$1(edgeList); ledge$iterator.i < ledge$iterator.this$01.array.length;) { ledge = castTo($next_6(ledge$iterator), 18); $applyEdgeLayout(ledge, routing, offset); } $applyParentNodeLayout(lgraph); for (lnode$iterator = new ArrayList$1(lgraph.layerlessNodes); lnode$iterator.i < lnode$iterator.this$01.array.length;) { lnode = castTo($next_6(lnode$iterator), 10); nestedGraph = lnode.nestedGraph; !!nestedGraph && $applyLayout_2(this$static, nestedGraph); } } function $applyNodeLayout(lnode, offset){ var elklabel, elknode, elkport, layerID, llabel, llabel$iterator, llabel$iterator0, lport, lport$iterator, lport$iterator0, nf, nodeHasLabelPlacement, nodeID, origin_0; elknode = castTo($getProperty(lnode, ($clinit_InternalProperties_1() , ORIGIN_0)), 27); nodeID = castTo($getProperty(lnode, ($clinit_LayeredOptions() , CROSSING_MINIMIZATION_POSITION_ID_0)), 17).value_0; layerID = castTo($getProperty(lnode, LAYERING_LAYER_ID_0), 17).value_0; $setProperty_1(elknode, CROSSING_MINIMIZATION_POSITION_ID_0, valueOf_3(nodeID)); $setProperty_1(elknode, LAYERING_LAYER_ID_0, valueOf_3(layerID)); $setX_2(elknode, lnode.pos.x_0 + offset.x_0); $setY_3(elknode, lnode.pos.y_0 + offset.y_0); if (castTo($getProperty_0(elknode, NODE_SIZE_CONSTRAINTS_1), 181).size_1() != 0 || !!lnode.nestedGraph || maskUndefined($getProperty($getGraph(lnode), NODE_PLACEMENT_STRATEGY_0)) === maskUndefined(($clinit_NodePlacementStrategy() , NETWORK_SIMPLEX_0)) && $isFlexibleSizeWhereSpacePermits(($clinit_NodeFlexibility() , (!lnode.propertyMap?($clinit_Collections() , $clinit_Collections() , EMPTY_MAP):lnode.propertyMap).containsKey(NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_0)?(nf = castTo($getProperty(lnode, NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_0), 203)):(nf = castTo($getProperty($getGraph(lnode), NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEFAULT_0), 203)) , nf))) { $setWidth_0(elknode, lnode.size_0.x_0); $setHeight_0(elknode, lnode.size_0.y_0); } for (lport$iterator0 = new ArrayList$1(lnode.ports); lport$iterator0.i < lport$iterator0.this$01.array.length;) { lport = castTo($next_6(lport$iterator0), 12); origin_0 = $getProperty(lport, ORIGIN_0); if (instanceOf(origin_0, 193)) { elkport = castTo(origin_0, 123); $setLocation_1(elkport, lport.pos.x_0, lport.pos.y_0); $setProperty_1(elkport, PORT_SIDE, lport.side); } } nodeHasLabelPlacement = castTo($getProperty(lnode, NODE_LABELS_PLACEMENT_1), 181).size_1() != 0; for (llabel$iterator0 = new ArrayList$1(lnode.labels); llabel$iterator0.i < llabel$iterator0.this$01.array.length;) { llabel = castTo($next_6(llabel$iterator0), 72); if (nodeHasLabelPlacement || castTo($getProperty(llabel, NODE_LABELS_PLACEMENT_1), 181).size_1() != 0) { elklabel = castTo($getProperty(llabel, ORIGIN_0), 135); $setDimensions_0(elklabel, llabel.size_0.x_0, llabel.size_0.y_0); $setLocation_1(elklabel, llabel.pos.x_0, llabel.pos.y_0); } } if (!isFixed(castTo($getProperty(lnode, PORT_LABELS_PLACEMENT_1), 21))) { for (lport$iterator = new ArrayList$1(lnode.ports); lport$iterator.i < lport$iterator.this$01.array.length;) { lport = castTo($next_6(lport$iterator), 12); for (llabel$iterator = new ArrayList$1(lport.labels); llabel$iterator.i < llabel$iterator.this$01.array.length;) { llabel = castTo($next_6(llabel$iterator), 72); elklabel = castTo($getProperty(llabel, ORIGIN_0), 135); $setWidth_0(elklabel, llabel.size_0.x_0); $setHeight_0(elklabel, llabel.size_0.y_0); $setLocation_1(elklabel, llabel.pos.x_0, llabel.pos.y_0); } } } } function $applyParentNodeLayout(lgraph){ var actualGraphSize, all, elknode, graphProps, sizeConstraintsIncludedPortLabels; elknode = castTo($getProperty(lgraph, ($clinit_InternalProperties_1() , ORIGIN_0)), 27); sizeConstraintsIncludedPortLabels = castTo($getProperty_0(elknode, ($clinit_LayeredOptions() , NODE_SIZE_CONSTRAINTS_1)), 181).contains(($clinit_SizeConstraint() , PORT_LABELS)); if (!lgraph.parentNode) { graphProps = castTo($getProperty(lgraph, GRAPH_PROPERTIES), 21); actualGraphSize = new KVector_1(lgraph.size_0.x_0 + lgraph.padding.left + lgraph.padding.right, lgraph.size_0.y_0 + lgraph.padding.top_0 + lgraph.padding.bottom); if (graphProps.contains(($clinit_GraphProperties() , EXTERNAL_PORTS))) { $setProperty_1(elknode, PORT_CONSTRAINTS_0, ($clinit_PortConstraints() , FIXED_POS)); resizeNode_1(elknode, actualGraphSize.x_0, actualGraphSize.y_0, false, true); } else { $booleanValue(castToBoolean($getProperty_0(elknode, NODE_SIZE_FIXED_GRAPH_SIZE_0))) || resizeNode_1(elknode, actualGraphSize.x_0, actualGraphSize.y_0, true, true); } } sizeConstraintsIncludedPortLabels?$setProperty_1(elknode, NODE_SIZE_CONSTRAINTS_1, of_1(PORT_LABELS)):$setProperty_1(elknode, NODE_SIZE_CONSTRAINTS_1, (all = castTo($getEnumConstants(Lorg_eclipse_elk_core_options_SizeConstraint_2_classLit), 9) , new EnumSet$EnumSetImpl(all, castTo(createFrom(all, all.length), 9), 0))); } function $calculateHierarchicalOffset(ledge){ var currentGraph, representingNode, result, targetCoordinateSystem; targetCoordinateSystem = castTo($getProperty(ledge, ($clinit_InternalProperties_1() , COORDINATE_SYSTEM_ORIGIN)), 36); if (targetCoordinateSystem) { result = new KVector; currentGraph = $getGraph(ledge.source.owner); while (currentGraph != targetCoordinateSystem) { representingNode = currentGraph.parentNode; currentGraph = $getGraph(representingNode); $add_18($add_19($add_19(result, representingNode.pos), currentGraph.offset), currentGraph.padding.left, currentGraph.padding.top_0); } return result; } return ZERO_OFFSET; } function ElkGraphLayoutTransferrer(){ $clinit_ElkGraphLayoutTransferrer(); } function lambda$0_24(lnode_0, edge_1){ $clinit_ElkGraphLayoutTransferrer(); return !isDescendant(edge_1.target.owner, lnode_0); } function lambda$2_3(parentLNode_0, edge_1){ $clinit_ElkGraphLayoutTransferrer(); return isDescendant(edge_1.target.owner, parentLNode_0); } defineClass(1297, 1, {}, ElkGraphLayoutTransferrer); var ZERO_OFFSET; var Lorg_eclipse_elk_alg_layered_graph_transform_ElkGraphLayoutTransferrer_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph.transform', 'ElkGraphLayoutTransferrer', 1297); function ElkGraphLayoutTransferrer$lambda$0$Type(lnode_0){ this.lnode_0 = lnode_0; } defineClass(1298, 1, $intern_40, ElkGraphLayoutTransferrer$lambda$0$Type); _.test_0 = function test_28(arg0){ return lambda$0_24(this.lnode_0, castTo(arg0, 18)); } ; var Lorg_eclipse_elk_alg_layered_graph_transform_ElkGraphLayoutTransferrer$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph.transform', 'ElkGraphLayoutTransferrer/lambda$0$Type', 1298); function ElkGraphLayoutTransferrer$lambda$1$Type(edgeList_0){ this.edgeList_0 = edgeList_0; } defineClass(1299, 1, $intern_19, ElkGraphLayoutTransferrer$lambda$1$Type); _.accept = function accept_66(arg0){ $clinit_ElkGraphLayoutTransferrer(); $add_3(this.edgeList_0, castTo(arg0, 18)); } ; var Lorg_eclipse_elk_alg_layered_graph_transform_ElkGraphLayoutTransferrer$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph.transform', 'ElkGraphLayoutTransferrer/lambda$1$Type', 1299); function ElkGraphLayoutTransferrer$lambda$2$Type(parentLNode_0){ this.parentLNode_0 = parentLNode_0; } defineClass(1300, 1, $intern_40, ElkGraphLayoutTransferrer$lambda$2$Type); _.test_0 = function test_29(arg0){ return lambda$2_3(this.parentLNode_0, castTo(arg0, 18)); } ; var Lorg_eclipse_elk_alg_layered_graph_transform_ElkGraphLayoutTransferrer$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph.transform', 'ElkGraphLayoutTransferrer/lambda$2$Type', 1300); function ElkGraphLayoutTransferrer$lambda$3$Type(edgeList_0){ this.edgeList_0 = edgeList_0; } defineClass(1301, 1, $intern_19, ElkGraphLayoutTransferrer$lambda$3$Type); _.accept = function accept_67(arg0){ $clinit_ElkGraphLayoutTransferrer(); $add_3(this.edgeList_0, castTo(arg0, 18)); } ; var Lorg_eclipse_elk_alg_layered_graph_transform_ElkGraphLayoutTransferrer$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.graph.transform', 'ElkGraphLayoutTransferrer/lambda$3$Type', 1301); function getIdentifier(element){ var container, id_0, parentId; id_0 = element.getIdentifier(); if (id_0) { container = element.eContainer_0(); if (instanceOf(container, 167)) { parentId = getIdentifier(castTo(container, 167)); if (parentId != null) { return parentId + '.' + id_0; } } return id_0; } return null; } function getOriginIdentifier(element){ var origin_0; origin_0 = $getProperty(element, ($clinit_InternalProperties_1() , ORIGIN_0)); if (instanceOf(origin_0, 167)) { return getIdentifier(castTo(origin_0, 167)); } return null; } function $getKey_0(this$static, value_0){ return castTo($get_16(this$static.hashMapValuesToKey, value_0), 34); } function $getValues(this$static, key){ var toReturn; toReturn = castTo($get_16(this$static.multiMapKeyToValues, key), 67); !toReturn && (toReturn = new LinkedList); return toReturn; } function $isMaximalKey(this$static, key){ var entry, otherKey, otherKey$iterator, outerIter; for (otherKey$iterator = (outerIter = (new AbstractMap$1(this$static.multiMapKeyToValues)).this$01.entrySet_0().iterator_0() , new AbstractMap$1$1(outerIter)); otherKey$iterator.val$outerIter2.hasNext_0();) { otherKey = (entry = castTo(otherKey$iterator.val$outerIter2.next_1(), 44) , castTo(entry.getKey(), 34)); if ($compareTo_6(key, castTo(otherKey, 17)) < 0) { return false; } } return true; } function $isMinimalKey(this$static, key){ var entry, otherKey, otherKey$iterator, outerIter; for (otherKey$iterator = (outerIter = (new AbstractMap$1(this$static.multiMapKeyToValues)).this$01.entrySet_0().iterator_0() , new AbstractMap$1$1(outerIter)); otherKey$iterator.val$outerIter2.hasNext_0();) { otherKey = (entry = castTo(otherKey$iterator.val$outerIter2.next_1(), 44) , castTo(entry.getKey(), 34)); if ($compareTo_6(key, castTo(otherKey, 17)) > 0) { return false; } } return true; } function $put_13(this$static, key, value_0){ var oldKey, values, values0; oldKey = castTo($get_16(this$static.hashMapValuesToKey, value_0), 34); if (oldKey != null) { values0 = castTo($get_16(this$static.multiMapKeyToValues, oldKey), 67); $advanceToFind(values0, value_0, true); } values = castTo($get_16(this$static.multiMapKeyToValues, key), 67); if (!values) { values = new LinkedList; $put_11(this$static.multiMapKeyToValues, key, values); } $addNode_0(values, value_0, values.tail.prev, values.tail); $put_11(this$static.hashMapValuesToKey, value_0, key); } function $putAll_0(this$static, key, values){ var value_0, value$iterator; for (value$iterator = new ArrayList$1(values); value$iterator.i < value$iterator.this$01.array.length;) { value_0 = $next_6(value$iterator); $put_13(this$static, key, value_0); } } function BiLinkedHashMultiMap(){ this.multiMapKeyToValues = new LinkedHashMap; this.hashMapValuesToKey = new LinkedHashMap; } defineClass(819, 1, {}, BiLinkedHashMultiMap); var Lorg_eclipse_elk_alg_layered_intermediate_BiLinkedHashMultiMap_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'BiLinkedHashMultiMap', 819); function $process_2(layeredGraph, monitor){ monitor.begin('Node margin calculation', 1); $forEach_3($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(layeredGraph.layers, 16)), new CommentNodeMarginCalculator$lambda$0$Type), new CommentNodeMarginCalculator$lambda$1$Type); monitor.done_1(); } function $processComments(node){ var bottomBoxes, bottomWidth, commentBox, commentBox$iterator, commentCommentSpacing, commentNodeSpacing, margin, maxCommentWidth, maxHeight, protrusion, topBoxes, topWidth; margin = node.margin; topBoxes = castTo($getProperty(node, ($clinit_InternalProperties_1() , TOP_COMMENTS)), 15); bottomBoxes = castTo($getProperty(node, BOTTOM_COMMENTS), 15); if (!topBoxes && !bottomBoxes) { return; } commentCommentSpacing = $doubleValue(castToDouble(getIndividualOrDefault(node, ($clinit_LayeredOptions() , SPACING_COMMENT_COMMENT)))); commentNodeSpacing = $doubleValue(castToDouble(getIndividualOrDefault(node, SPACING_COMMENT_NODE))); topWidth = 0; if (topBoxes) { maxHeight = 0; for (commentBox$iterator = topBoxes.iterator_0(); commentBox$iterator.hasNext_0();) { commentBox = castTo(commentBox$iterator.next_1(), 10); maxHeight = $wnd.Math.max(maxHeight, commentBox.size_0.y_0); topWidth += commentBox.size_0.x_0; } topWidth += commentCommentSpacing * (topBoxes.size_1() - 1); margin.top_0 += maxHeight + commentNodeSpacing; } bottomWidth = 0; if (bottomBoxes) { maxHeight = 0; for (commentBox$iterator = bottomBoxes.iterator_0(); commentBox$iterator.hasNext_0();) { commentBox = castTo(commentBox$iterator.next_1(), 10); maxHeight = $wnd.Math.max(maxHeight, commentBox.size_0.y_0); bottomWidth += commentBox.size_0.x_0; } bottomWidth += commentCommentSpacing * (bottomBoxes.size_1() - 1); margin.bottom += maxHeight + commentNodeSpacing; } maxCommentWidth = $wnd.Math.max(topWidth, bottomWidth); if (maxCommentWidth > node.size_0.x_0) { protrusion = (maxCommentWidth - node.size_0.x_0) / 2; margin.left = $wnd.Math.max(margin.left, protrusion); margin.right = $wnd.Math.max(margin.right, protrusion); } } function CommentNodeMarginCalculator(){ } defineClass(1550, 1, $intern_105, CommentNodeMarginCalculator); _.process = function process_1(layeredGraph, monitor){ $process_2(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_CommentNodeMarginCalculator_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'CommentNodeMarginCalculator', 1550); function CommentNodeMarginCalculator$lambda$0$Type(){ } defineClass(1551, 1, {}, CommentNodeMarginCalculator$lambda$0$Type); _.apply_0 = function apply_72(arg0){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 30).nodes, 16)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_CommentNodeMarginCalculator$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'CommentNodeMarginCalculator/lambda$0$Type', 1551); function CommentNodeMarginCalculator$lambda$1$Type(){ } defineClass(1552, 1, $intern_19, CommentNodeMarginCalculator$lambda$1$Type); _.accept = function accept_68(arg0){ $processComments(castTo(arg0, 10)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_CommentNodeMarginCalculator$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'CommentNodeMarginCalculator/lambda$1$Type', 1552); function $getBoxPort(commentBox){ var edge, edge$iterator, edge$iterator0, nodePort, port, port$iterator; nodePort = castTo($getProperty(commentBox, ($clinit_InternalProperties_1() , COMMENT_CONN_PORT)), 12); for (port$iterator = new ArrayList$1(commentBox.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); for (edge$iterator0 = new ArrayList$1(port.outgoingEdges); edge$iterator0.i < edge$iterator0.this$01.array.length;) { edge = castTo($next_6(edge$iterator0), 18); $setTarget_0(edge, nodePort); return port; } for (edge$iterator = new ArrayList$1(port.incomingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); $setSource_0(edge, nodePort); return port; } } return null; } function $process_3(layeredGraph, monitor){ var bottomBoxes, boxes, layer, layer$iterator, node, node$iterator, topBoxes; monitor.begin('Comment post-processing', 1); for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); boxes = new ArrayList; for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); topBoxes = castTo($getProperty(node, ($clinit_InternalProperties_1() , TOP_COMMENTS)), 15); bottomBoxes = castTo($getProperty(node, BOTTOM_COMMENTS), 15); if (!!topBoxes || !!bottomBoxes) { $process_4(node, topBoxes, bottomBoxes); !!topBoxes && $addAll_2(boxes, topBoxes); !!bottomBoxes && $addAll_2(boxes, bottomBoxes); } } $addAll_2(layer.nodes, boxes); } monitor.done_1(); } function $process_4(node, topBoxes, bottomBoxes){ var anchorInc, anchorX, baseLine, box, box$iterator, box$iterator0, boxPort, boxesWidth, commentCommentSpacing, margin, maxHeight, nodePort, nodePos, nodeSize, x_0; nodePos = node.pos; nodeSize = node.size_0; margin = node.margin; commentCommentSpacing = $doubleValue(castToDouble(getIndividualOrDefault(node, ($clinit_LayeredOptions() , SPACING_COMMENT_COMMENT)))); if (topBoxes) { boxesWidth = commentCommentSpacing * (topBoxes.size_1() - 1); maxHeight = 0; for (box$iterator0 = topBoxes.iterator_0(); box$iterator0.hasNext_0();) { box = castTo(box$iterator0.next_1(), 10); boxesWidth += box.size_0.x_0; maxHeight = $wnd.Math.max(maxHeight, box.size_0.y_0); } x_0 = nodePos.x_0 - (boxesWidth - nodeSize.x_0) / 2; baseLine = nodePos.y_0 - margin.top_0 + maxHeight; anchorInc = nodeSize.x_0 / (topBoxes.size_1() + 1); anchorX = anchorInc; for (box$iterator = topBoxes.iterator_0(); box$iterator.hasNext_0();) { box = castTo(box$iterator.next_1(), 10); box.pos.x_0 = x_0; box.pos.y_0 = baseLine - box.size_0.y_0; x_0 += box.size_0.x_0 + commentCommentSpacing; boxPort = $getBoxPort(box); boxPort.pos.x_0 = box.size_0.x_0 / 2 - boxPort.anchor.x_0; boxPort.pos.y_0 = box.size_0.y_0; nodePort = castTo($getProperty(box, ($clinit_InternalProperties_1() , COMMENT_CONN_PORT)), 12); if (nodePort.incomingEdges.array.length + nodePort.outgoingEdges.array.length == 1) { nodePort.pos.x_0 = anchorX - nodePort.anchor.x_0; nodePort.pos.y_0 = 0; $setNode(nodePort, node); } anchorX += anchorInc; } } if (bottomBoxes) { boxesWidth = commentCommentSpacing * (bottomBoxes.size_1() - 1); maxHeight = 0; for (box$iterator0 = bottomBoxes.iterator_0(); box$iterator0.hasNext_0();) { box = castTo(box$iterator0.next_1(), 10); boxesWidth += box.size_0.x_0; maxHeight = $wnd.Math.max(maxHeight, box.size_0.y_0); } x_0 = nodePos.x_0 - (boxesWidth - nodeSize.x_0) / 2; baseLine = nodePos.y_0 + nodeSize.y_0 + margin.bottom - maxHeight; anchorInc = nodeSize.x_0 / (bottomBoxes.size_1() + 1); anchorX = anchorInc; for (box$iterator = bottomBoxes.iterator_0(); box$iterator.hasNext_0();) { box = castTo(box$iterator.next_1(), 10); box.pos.x_0 = x_0; box.pos.y_0 = baseLine; x_0 += box.size_0.x_0 + commentCommentSpacing; boxPort = $getBoxPort(box); boxPort.pos.x_0 = box.size_0.x_0 / 2 - boxPort.anchor.x_0; boxPort.pos.y_0 = 0; nodePort = castTo($getProperty(box, ($clinit_InternalProperties_1() , COMMENT_CONN_PORT)), 12); if (nodePort.incomingEdges.array.length + nodePort.outgoingEdges.array.length == 1) { nodePort.pos.x_0 = anchorX - nodePort.anchor.x_0; nodePort.pos.y_0 = nodeSize.y_0; $setNode(nodePort, node); } anchorX += anchorInc; } } } function CommentPostprocessor(){ } defineClass(1553, 1, $intern_105, CommentPostprocessor); _.process = function process_2(layeredGraph, monitor){ $process_3(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_CommentPostprocessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'CommentPostprocessor', 1553); function $process_5(layeredGraph, monitor){ var commentBoxCount, edge, edgeCount, inedge, inedge$iterator, node, nodeIter, oppositePort, outedge, outedge$iterator, port, port$iterator, port$iterator0, re, re$iterator, revEdges; monitor.begin('Comment pre-processing', 1); commentBoxCount = 0; nodeIter = new ArrayList$1(layeredGraph.layerlessNodes); while (nodeIter.i < nodeIter.this$01.array.length) { node = castTo($next_6(nodeIter), 10); if ($booleanValue(castToBoolean($getProperty(node, ($clinit_LayeredOptions() , COMMENT_BOX))))) { ++commentBoxCount; edgeCount = 0; edge = null; oppositePort = null; for (port$iterator0 = new ArrayList$1(node.ports); port$iterator0.i < port$iterator0.this$01.array.length;) { port = castTo($next_6(port$iterator0), 12); edgeCount += port.incomingEdges.array.length + port.outgoingEdges.array.length; if (port.incomingEdges.array.length == 1) { edge = castTo($get_11(port.incomingEdges, 0), 18); oppositePort = edge.source; } if (port.outgoingEdges.array.length == 1) { edge = castTo($get_11(port.outgoingEdges, 0), 18); oppositePort = edge.target; } } if (edgeCount == 1 && oppositePort.incomingEdges.array.length + oppositePort.outgoingEdges.array.length == 1 && !$booleanValue(castToBoolean($getProperty(oppositePort.owner, COMMENT_BOX)))) { $processBox(node, edge, oppositePort, oppositePort.owner); $remove_13(nodeIter); } else { revEdges = new ArrayList; for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); for (outedge$iterator = new ArrayList$1(port.outgoingEdges); outedge$iterator.i < outedge$iterator.this$01.array.length;) { outedge = castTo($next_6(outedge$iterator), 18); outedge.target.outgoingEdges.array.length == 0 || (push_1(revEdges.array, outedge) , true); } for (inedge$iterator = new ArrayList$1(port.incomingEdges); inedge$iterator.i < inedge$iterator.this$01.array.length;) { inedge = castTo($next_6(inedge$iterator), 18); inedge.source.incomingEdges.array.length == 0 || (push_1(revEdges.array, inedge) , true); } } for (re$iterator = new ArrayList$1(revEdges); re$iterator.i < re$iterator.this$01.array.length;) { re = castTo($next_6(re$iterator), 18); $reverse_0(re, true); } } } } monitor.isLoggingEnabled() && monitor.log_0('Found ' + commentBoxCount + ' comment boxes'); monitor.done_1(); } function $processBox(box, edge, oppositePort, realNode){ var bottomBoxes, boxList, hasNorth, hasSouth, label_0, label$iterator, labelPos, onlyBottom, onlyTop, port1, port1$iterator, port2, port2$iterator, topBoxes, topFirst; onlyTop = false; onlyBottom = false; if ($isSideFixed(castTo($getProperty(realNode, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101))) { hasNorth = false; hasSouth = false; portLoop: for (port1$iterator = new ArrayList$1(realNode.ports); port1$iterator.i < port1$iterator.this$01.array.length;) { port1 = castTo($next_6(port1$iterator), 12); for (port2$iterator = $iterator(concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [new LPort$1(port1), new LPort$2(port1)]))); $hasNext_1(port2$iterator);) { port2 = castTo($next_0(port2$iterator), 12); if (!$booleanValue(castToBoolean($getProperty(port2.owner, COMMENT_BOX)))) { if (port1.side == ($clinit_PortSide() , NORTH_3)) { hasNorth = true; break portLoop; } if (port1.side == SOUTH_2) { hasSouth = true; break portLoop; } } } } onlyTop = hasSouth && !hasNorth; onlyBottom = hasNorth && !hasSouth; } if (!onlyTop && !onlyBottom && realNode.labels.array.length != 0) { labelPos = 0; for (label$iterator = new ArrayList$1(realNode.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 72); labelPos += label_0.pos.y_0 + label_0.size_0.y_0 / 2; } labelPos /= realNode.labels.array.length; topFirst = labelPos >= realNode.size_0.y_0 / 2; } else { topFirst = !onlyBottom; } if (topFirst) { topBoxes = castTo($getProperty(realNode, ($clinit_InternalProperties_1() , TOP_COMMENTS)), 15); if (!topBoxes) { boxList = new ArrayList; $setProperty_0(realNode, TOP_COMMENTS, boxList); } else if (onlyTop) { boxList = topBoxes; } else { bottomBoxes = castTo($getProperty(realNode, BOTTOM_COMMENTS), 15); if (!bottomBoxes) { boxList = new ArrayList; $setProperty_0(realNode, BOTTOM_COMMENTS, boxList); } else { topBoxes.size_1() <= bottomBoxes.size_1()?(boxList = topBoxes):(boxList = bottomBoxes); } } } else { bottomBoxes = castTo($getProperty(realNode, ($clinit_InternalProperties_1() , BOTTOM_COMMENTS)), 15); if (!bottomBoxes) { boxList = new ArrayList; $setProperty_0(realNode, BOTTOM_COMMENTS, boxList); } else if (onlyBottom) { boxList = bottomBoxes; } else { topBoxes = castTo($getProperty(realNode, TOP_COMMENTS), 15); if (!topBoxes) { boxList = new ArrayList; $setProperty_0(realNode, TOP_COMMENTS, boxList); } else { bottomBoxes.size_1() <= topBoxes.size_1()?(boxList = bottomBoxes):(boxList = topBoxes); } } } boxList.add_2(box); $setProperty_0(box, ($clinit_InternalProperties_1() , COMMENT_CONN_PORT), oppositePort); if (edge.target == oppositePort) { $setTarget_0(edge, null); oppositePort.incomingEdges.array.length + oppositePort.outgoingEdges.array.length == 0 && $setNode(oppositePort, null); $removeHierarchicalPortDummyNode(oppositePort); } else { $setSource_0(edge, null); oppositePort.incomingEdges.array.length + oppositePort.outgoingEdges.array.length == 0 && $setNode(oppositePort, null); } $reset_0(edge.bendPoints); } function $removeHierarchicalPortDummyNode(oppositePort){ var dummy, layer; dummy = castTo($getProperty(oppositePort, ($clinit_InternalProperties_1() , PORT_DUMMY)), 10); if (dummy) { layer = dummy.layer; $remove_12(layer.nodes, dummy); layer.nodes.array.length == 0 && $remove_12($getGraph(dummy).layers, layer); } } function CommentPreprocessor(){ } defineClass(1554, 1, $intern_105, CommentPreprocessor); _.process = function process_3(layeredGraph, monitor){ $process_5(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_CommentPreprocessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'CommentPreprocessor', 1554); function $process_6(graph, progressMonitor){ var currentNode, currentNode$iterator, layer, layer$iterator, layerIndex, nodeLayer, posIndex; progressMonitor.begin('Constraints Postprocessor', 1); layerIndex = 0; for (layer$iterator = new ArrayList$1(graph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); posIndex = 0; nodeLayer = false; for (currentNode$iterator = new ArrayList$1(layer.nodes); currentNode$iterator.i < currentNode$iterator.this$01.array.length;) { currentNode = castTo($next_6(currentNode$iterator), 10); if (currentNode.type_0 == ($clinit_LNode$NodeType() , NORMAL)) { nodeLayer = true; $setProperty_0(currentNode, ($clinit_LayeredOptions() , LAYERING_LAYER_ID_0), valueOf_3(layerIndex)); $setProperty_0(currentNode, CROSSING_MINIMIZATION_POSITION_ID_0, valueOf_3(posIndex)); ++posIndex; } } nodeLayer && ++layerIndex; } progressMonitor.done_1(); } function ConstraintsPostprocessor(){ } defineClass(1555, 1, $intern_105, ConstraintsPostprocessor); _.process = function process_4(graph, progressMonitor){ $process_6(castTo(graph, 36), progressMonitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_ConstraintsPostprocessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'ConstraintsPostprocessor', 1555); function $canReverseIncomingEdge(targetNodeLayerConstraint, edge){ var sourceLayerConstraint, sourceNode; if ($booleanValue(castToBoolean($getProperty(edge, ($clinit_InternalProperties_1() , REVERSED))))) { return false; } sourceNode = edge.source.owner; if (targetNodeLayerConstraint == ($clinit_LayerConstraint() , FIRST)) { if (sourceNode.type_0 == ($clinit_LNode$NodeType() , LABEL)) { return false; } } sourceLayerConstraint = castTo($getProperty(sourceNode, ($clinit_LayeredOptions() , LAYERING_LAYER_CONSTRAINT_0)), 171); if (sourceLayerConstraint == FIRST_SEPARATE_0) { return false; } return true; } function $canReverseOutgoingEdge(sourceNodeLayerConstraint, edge){ var targetLayerConstraint, targetNode; if ($booleanValue(castToBoolean($getProperty(edge, ($clinit_InternalProperties_1() , REVERSED))))) { return false; } targetNode = edge.target.owner; if (sourceNodeLayerConstraint == ($clinit_LayerConstraint() , LAST)) { if (targetNode.type_0 == ($clinit_LNode$NodeType() , LABEL)) { return false; } } targetLayerConstraint = castTo($getProperty(targetNode, ($clinit_LayeredOptions() , LAYERING_LAYER_CONSTRAINT_0)), 171); if (targetLayerConstraint == LAST_SEPARATE_0) { return false; } return true; } function $handleInnerNodes(remainingNodes){ var allPortsReversed, e, e$iterator, e$iterator0, edgeConstraint, layerConstraint, lc, node, node$iterator, port, port$iterator; for (node$iterator = new ArrayList$1(remainingNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); layerConstraint = castTo($getProperty(node, ($clinit_LayeredOptions() , LAYERING_LAYER_CONSTRAINT_0)), 171); edgeConstraint = null; switch (layerConstraint.ordinal) { case 1: case 2: edgeConstraint = ($clinit_EdgeConstraint() , OUTGOING_ONLY); break; case 3: case 4: edgeConstraint = ($clinit_EdgeConstraint() , INCOMING_ONLY); } if (edgeConstraint) { $setProperty_0(node, ($clinit_InternalProperties_1() , EDGE_CONSTRAINT), ($clinit_EdgeConstraint() , OUTGOING_ONLY)); edgeConstraint == INCOMING_ONLY?$reverseEdges(node, layerConstraint, ($clinit_PortType() , INPUT)):edgeConstraint == OUTGOING_ONLY && $reverseEdges(node, layerConstraint, ($clinit_PortType() , OUTPUT)); } else { if ($isSideFixed(castTo($getProperty(node, PORT_CONSTRAINTS_0), 101)) && node.ports.array.length != 0) { allPortsReversed = true; for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); if (!(port.side == ($clinit_PortSide() , EAST_2) && port.incomingEdges.array.length - port.outgoingEdges.array.length > 0 || port.side == WEST_2 && port.incomingEdges.array.length - port.outgoingEdges.array.length < 0)) { allPortsReversed = false; break; } for (e$iterator0 = new ArrayList$1(port.outgoingEdges); e$iterator0.i < e$iterator0.this$01.array.length;) { e = castTo($next_6(e$iterator0), 18); lc = castTo($getProperty(e.target.owner, LAYERING_LAYER_CONSTRAINT_0), 171); if (lc == ($clinit_LayerConstraint() , LAST) || lc == LAST_SEPARATE_0) { allPortsReversed = false; break; } } for (e$iterator = new ArrayList$1(port.incomingEdges); e$iterator.i < e$iterator.this$01.array.length;) { e = castTo($next_6(e$iterator), 18); lc = castTo($getProperty(e.source.owner, LAYERING_LAYER_CONSTRAINT_0), 171); if (lc == ($clinit_LayerConstraint() , FIRST) || lc == FIRST_SEPARATE_0) { allPortsReversed = false; break; } } } allPortsReversed && $reverseEdges(node, layerConstraint, ($clinit_PortType() , UNDEFINED_0)); } } } } function $handleOuterNodes(layeredGraph){ var edgeConstraint, layerConstraint, node, node$iterator, remainingNodes; remainingNodes = new ArrayList_0(layeredGraph.layerlessNodes.array.length); for (node$iterator = new ArrayList$1(layeredGraph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); layerConstraint = castTo($getProperty(node, ($clinit_LayeredOptions() , LAYERING_LAYER_CONSTRAINT_0)), 171); edgeConstraint = null; switch (layerConstraint.ordinal) { case 1: case 2: edgeConstraint = ($clinit_EdgeConstraint() , OUTGOING_ONLY); break; case 3: case 4: edgeConstraint = ($clinit_EdgeConstraint() , INCOMING_ONLY); } if (edgeConstraint) { $setProperty_0(node, ($clinit_InternalProperties_1() , EDGE_CONSTRAINT), ($clinit_EdgeConstraint() , OUTGOING_ONLY)); edgeConstraint == INCOMING_ONLY?$reverseEdges(node, layerConstraint, ($clinit_PortType() , INPUT)):edgeConstraint == OUTGOING_ONLY && $reverseEdges(node, layerConstraint, ($clinit_PortType() , OUTPUT)); } else { push_1(remainingNodes.array, node); } } return remainingNodes; } function $process_7(layeredGraph, monitor){ var remainingNodes; monitor.begin('Edge and layer constraint edge reversal', 1); remainingNodes = $handleOuterNodes(layeredGraph); $handleInnerNodes(remainingNodes); monitor.done_1(); } function $reverseEdges(node, nodeLayerConstraint, targetPortType){ var edge, edge$array, edge$index, edge$max, incoming, outgoing, port, port$array, port$index, port$max; for (port$array = toPortArray(node.ports) , port$index = 0 , port$max = port$array.length; port$index < port$max; ++port$index) { port = port$array[port$index]; if (targetPortType == ($clinit_PortType() , INPUT) || targetPortType == UNDEFINED_0) { outgoing = toEdgeArray(port.outgoingEdges); for (edge$array = outgoing , edge$index = 0 , edge$max = edge$array.length; edge$index < edge$max; ++edge$index) { edge = edge$array[edge$index]; $canReverseOutgoingEdge(nodeLayerConstraint, edge) && $reverse_0(edge, true); } } if (targetPortType == OUTPUT || targetPortType == UNDEFINED_0) { incoming = toEdgeArray(port.incomingEdges); for (edge$array = incoming , edge$index = 0 , edge$max = edge$array.length; edge$index < edge$max; ++edge$index) { edge = edge$array[edge$index]; $canReverseIncomingEdge(nodeLayerConstraint, edge) && $reverse_0(edge, true); } } } } function EdgeAndLayerConstraintEdgeReverser(){ } defineClass(1556, 1, $intern_105, EdgeAndLayerConstraintEdgeReverser); _.process = function process_5(layeredGraph, monitor){ $process_7(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_EdgeAndLayerConstraintEdgeReverser_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'EdgeAndLayerConstraintEdgeReverser', 1556); function $process_8(layeredGraph, monitor){ monitor.begin('End label post-processing', 1); $forEach_3($filter($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(layeredGraph.layers, 16)), new EndLabelPostprocessor$lambda$0$Type), new EndLabelPostprocessor$lambda$1$Type), new EndLabelPostprocessor$lambda$2$Type); monitor.done_1(); } function $processNode_1(node){ var endLabelCells, labelCell, labelCell$iterator, labelCellRect, nodePos; endLabelCells = castTo($getProperty(node, ($clinit_InternalProperties_1() , END_LABELS_0)), 85); nodePos = node.pos; for (labelCell$iterator = endLabelCells.values_0().iterator_0(); labelCell$iterator.hasNext_0();) { labelCell = castTo(labelCell$iterator.next_1(), 314); labelCellRect = labelCell.cellRectangle; labelCellRect.x_0 += nodePos.x_0; labelCellRect.y_0 += nodePos.y_0; labelCell.horizontalLayoutMode?$applyHorizontalModeLabelLayout(labelCell):$applyVerticalModeLabelLayout(labelCell); } $setProperty_0(node, END_LABELS_0, null); } function EndLabelPostprocessor(){ } function lambda$1_7(node_0){ return (node_0.type_0 == ($clinit_LNode$NodeType() , NORMAL) || node_0.type_0 == EXTERNAL_PORT) && $hasProperty(node_0, ($clinit_InternalProperties_1() , END_LABELS_0)); } defineClass(1557, 1, $intern_105, EndLabelPostprocessor); _.process = function process_6(layeredGraph, monitor){ $process_8(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_EndLabelPostprocessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'EndLabelPostprocessor', 1557); function EndLabelPostprocessor$lambda$0$Type(){ } defineClass(1558, 1, {}, EndLabelPostprocessor$lambda$0$Type); _.apply_0 = function apply_73(arg0){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 30).nodes, 16)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_EndLabelPostprocessor$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'EndLabelPostprocessor/lambda$0$Type', 1558); function EndLabelPostprocessor$lambda$1$Type(){ } defineClass(1559, 1, $intern_40, EndLabelPostprocessor$lambda$1$Type); _.test_0 = function test_30(arg0){ return lambda$1_7(castTo(arg0, 10)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_EndLabelPostprocessor$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'EndLabelPostprocessor/lambda$1$Type', 1559); function EndLabelPostprocessor$lambda$2$Type(){ } defineClass(1560, 1, $intern_19, EndLabelPostprocessor$lambda$2$Type); _.accept = function accept_69(arg0){ $processNode_1(castTo(arg0, 10)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_EndLabelPostprocessor$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'EndLabelPostprocessor/lambda$2$Type', 1560); function $calculateOverlapStartCoordinate(node, portSide, edgeLabelSpacing){ var nodeMargin, nodeSize; nodeSize = node.size_0; nodeMargin = node.margin; switch (portSide.ordinal) { case 1: return -nodeMargin.top_0 - edgeLabelSpacing; case 3: return nodeSize.y_0 + nodeMargin.bottom + edgeLabelSpacing; case 2: return nodeSize.x_0 + nodeMargin.right + edgeLabelSpacing; case 4: return -nodeMargin.left - edgeLabelSpacing; default:return 0; } } function $createConfiguredLabelCell(labels, labelLabelSpacing, verticalLayout){ var label_0, label$iterator, labelCell, labelCellRect, padding, padding0; if (!labels || labels.array.length == 0) { return null; } labelCell = new LabelCell_1(labelLabelSpacing, !verticalLayout); for (label$iterator = new ArrayList$1(labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 72); $addLabel(labelCell, ($clinit_LGraphAdapters() , new LGraphAdapters$LLabelAdapter(label_0))); } labelCellRect = labelCell.cellRectangle; labelCellRect.height = (padding0 = labelCell.padding , labelCell.minimumContentAreaSize.y_0 + padding0.top_0 + padding0.bottom); labelCellRect.width_0 = (padding = labelCell.padding , labelCell.minimumContentAreaSize.x_0 + padding.left + padding.right); return labelCell; } function $lambda$1_0(edgeLabelSpacing_1, labelLabelSpacing_3, verticalLayout_5, node_3){ $processNode_2(node_3, edgeLabelSpacing_1, labelLabelSpacing_3, verticalLayout_5); } function $placeLabels(node, portLabelCells, labelLabelSpacing, edgeLabelSpacing, verticalLayout){ var all, port, port$iterator, portSidesWithLabels; portSidesWithLabels = (all = castTo($getEnumConstants(Lorg_eclipse_elk_core_options_PortSide_2_classLit), 9) , new EnumSet$EnumSetImpl(all, castTo(createFrom(all, all.length), 9), 0)); for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); if (portLabelCells[port.id_0]) { $placeLabels_0(port, portLabelCells[port.id_0], edgeLabelSpacing); $add_5(portSidesWithLabels, port.side); } } if (verticalLayout) { $removeLabelOverlaps(node, portLabelCells, ($clinit_PortSide() , EAST_2), 2 * labelLabelSpacing, edgeLabelSpacing); $removeLabelOverlaps(node, portLabelCells, WEST_2, 2 * labelLabelSpacing, edgeLabelSpacing); } else { $removeLabelOverlaps(node, portLabelCells, ($clinit_PortSide() , NORTH_3), 2 * labelLabelSpacing, edgeLabelSpacing); $removeLabelOverlaps(node, portLabelCells, SOUTH_2, 2 * labelLabelSpacing, edgeLabelSpacing); } } function $placeLabels_0(port, labelCell, edgeLabelSpacing){ var labelCellRect, nodeMargin, nodeSize, portAnchor, portPos; labelCellRect = labelCell.cellRectangle; nodeSize = port.owner.size_0; nodeMargin = port.owner.margin; portPos = port.pos; portAnchor = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [portPos, port.anchor])); switch (port.side.ordinal) { case 1: $setVerticalAlignment(labelCell, ($clinit_VerticalLabelAlignment() , BOTTOM)); labelCellRect.y_0 = -nodeMargin.top_0 - edgeLabelSpacing - labelCellRect.height; if (castTo(castTo($get_11(labelCell.labels, 0), 187).getProperty(($clinit_InternalProperties_1() , LABEL_SIDE)), 291) == ($clinit_LabelSide() , ABOVE)) { $setHorizontalAlignment(labelCell, ($clinit_HorizontalLabelAlignment() , RIGHT)); labelCellRect.x_0 = portAnchor.x_0 - $doubleValue(castToDouble($getProperty(port, MAX_EDGE_THICKNESS))) - edgeLabelSpacing - labelCellRect.width_0; } else { $setHorizontalAlignment(labelCell, ($clinit_HorizontalLabelAlignment() , LEFT)); labelCellRect.x_0 = portAnchor.x_0 + $doubleValue(castToDouble($getProperty(port, MAX_EDGE_THICKNESS))) + edgeLabelSpacing; } break; case 2: $setHorizontalAlignment(labelCell, ($clinit_HorizontalLabelAlignment() , LEFT)); labelCellRect.x_0 = nodeSize.x_0 + nodeMargin.right + edgeLabelSpacing; if (castTo(castTo($get_11(labelCell.labels, 0), 187).getProperty(($clinit_InternalProperties_1() , LABEL_SIDE)), 291) == ($clinit_LabelSide() , ABOVE)) { $setVerticalAlignment(labelCell, ($clinit_VerticalLabelAlignment() , BOTTOM)); labelCellRect.y_0 = portAnchor.y_0 - $doubleValue(castToDouble($getProperty(port, MAX_EDGE_THICKNESS))) - edgeLabelSpacing - labelCellRect.height; } else { $setVerticalAlignment(labelCell, ($clinit_VerticalLabelAlignment() , TOP)); labelCellRect.y_0 = portAnchor.y_0 + $doubleValue(castToDouble($getProperty(port, MAX_EDGE_THICKNESS))) + edgeLabelSpacing; } break; case 3: $setVerticalAlignment(labelCell, ($clinit_VerticalLabelAlignment() , TOP)); labelCellRect.y_0 = nodeSize.y_0 + nodeMargin.bottom + edgeLabelSpacing; if (castTo(castTo($get_11(labelCell.labels, 0), 187).getProperty(($clinit_InternalProperties_1() , LABEL_SIDE)), 291) == ($clinit_LabelSide() , ABOVE)) { $setHorizontalAlignment(labelCell, ($clinit_HorizontalLabelAlignment() , RIGHT)); labelCellRect.x_0 = portAnchor.x_0 - $doubleValue(castToDouble($getProperty(port, MAX_EDGE_THICKNESS))) - edgeLabelSpacing - labelCellRect.width_0; } else { $setHorizontalAlignment(labelCell, ($clinit_HorizontalLabelAlignment() , LEFT)); labelCellRect.x_0 = portAnchor.x_0 + $doubleValue(castToDouble($getProperty(port, MAX_EDGE_THICKNESS))) + edgeLabelSpacing; } break; case 4: $setHorizontalAlignment(labelCell, ($clinit_HorizontalLabelAlignment() , RIGHT)); labelCellRect.x_0 = -nodeMargin.left - edgeLabelSpacing - labelCellRect.width_0; if (castTo(castTo($get_11(labelCell.labels, 0), 187).getProperty(($clinit_InternalProperties_1() , LABEL_SIDE)), 291) == ($clinit_LabelSide() , ABOVE)) { $setVerticalAlignment(labelCell, ($clinit_VerticalLabelAlignment() , BOTTOM)); labelCellRect.y_0 = portAnchor.y_0 - $doubleValue(castToDouble($getProperty(port, MAX_EDGE_THICKNESS))) - edgeLabelSpacing - labelCellRect.height; } else { $setVerticalAlignment(labelCell, ($clinit_VerticalLabelAlignment() , TOP)); labelCellRect.y_0 = portAnchor.y_0 + $doubleValue(castToDouble($getProperty(port, MAX_EDGE_THICKNESS))) + edgeLabelSpacing; } } } function $portSideToOverlapRemovalDirection(portSide){ switch (portSide.ordinal) { case 1: return $clinit_RectangleStripOverlapRemover$OverlapRemovalDirection() , UP; case 3: return $clinit_RectangleStripOverlapRemover$OverlapRemovalDirection() , DOWN; case 2: return $clinit_RectangleStripOverlapRemover$OverlapRemovalDirection() , RIGHT_0; case 4: return $clinit_RectangleStripOverlapRemover$OverlapRemovalDirection() , LEFT_0; default:return null; } } function $process_9(layeredGraph, monitor){ var edgeLabelSpacing, labelLabelSpacing, verticalLayout; monitor.begin('End label pre-processing', 1); edgeLabelSpacing = $doubleValue(castToDouble($getProperty(layeredGraph, ($clinit_LayeredOptions() , SPACING_EDGE_LABEL_0)))); labelLabelSpacing = $doubleValue(castToDouble($getProperty(layeredGraph, SPACING_LABEL_LABEL))); verticalLayout = $isVertical(castTo($getProperty(layeredGraph, DIRECTION), 88)); $forEach_3($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(layeredGraph.layers, 16)), new EndLabelPreprocessor$lambda$0$Type), new EndLabelPreprocessor$lambda$1$Type(edgeLabelSpacing, labelLabelSpacing, verticalLayout)); monitor.done_1(); } function $processNode_2(node, edgeLabelSpacing, labelLabelSpacing, verticalLayout){ var index_0, port, portCount, portIndex, portLabelCells, portToLabelCellMap; portCount = node.ports.array.length; portLabelCells = initUnidimensionalArray(Lorg_eclipse_elk_alg_common_nodespacing_cellsystem_LabelCell_2_classLit, $intern_93, 314, portCount, 0, 1); for (portIndex = 0; portIndex < portCount; portIndex++) { port = castTo($get_11(node.ports, portIndex), 12); port.id_0 = portIndex; portLabelCells[portIndex] = $createConfiguredLabelCell(gatherLabels(port), labelLabelSpacing, verticalLayout); } $placeLabels(node, portLabelCells, labelLabelSpacing, edgeLabelSpacing, verticalLayout); portToLabelCellMap = new HashMap; for (index_0 = 0; index_0 < portLabelCells.length; index_0++) { !!portLabelCells[index_0] && $put_6(portToLabelCellMap, castTo($get_11(node.ports, index_0), 12), portLabelCells[index_0]); } if (portToLabelCellMap.hashCodeMap.size_0 + portToLabelCellMap.stringMap.size_0 != 0) { $setProperty_0(node, ($clinit_InternalProperties_1() , END_LABELS_0), portToLabelCellMap); $updateNodeMargins(node, portLabelCells); } } function $removeLabelOverlaps(node, portLabelCells, portSide, labelLabelSpacing, edgeLabelSpacing){ var labelCellRect, overlapRemover, port, port$iterator; overlapRemover = $withStartCoordinate($withGap(createForDirection($portSideToOverlapRemovalDirection(portSide)), labelLabelSpacing), $calculateOverlapStartCoordinate(node, portSide, edgeLabelSpacing)); for (port$iterator = $getPorts_1(node, portSide).iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); if (portLabelCells[port.id_0]) { labelCellRect = portLabelCells[port.id_0].cellRectangle; $add_3(overlapRemover.rectangleNodes, new RectangleStripOverlapRemover$RectangleNode(labelCellRect, $importRectangle(overlapRemover, labelCellRect))); } } $removeOverlaps_0(overlapRemover); } function $updateNodeMargins(node, labelCells){ var labelCell, labelCell$array, labelCell$index, labelCell$max, nodeMargin, nodeMarginRectangle, nodeSize; nodeMargin = node.margin; nodeSize = node.size_0; nodeMarginRectangle = new ElkRectangle_0(-nodeMargin.left, -nodeMargin.top_0, nodeMargin.left + nodeSize.x_0 + nodeMargin.right, nodeMargin.top_0 + nodeSize.y_0 + nodeMargin.bottom); for (labelCell$array = labelCells , labelCell$index = 0 , labelCell$max = labelCell$array.length; labelCell$index < labelCell$max; ++labelCell$index) { labelCell = labelCell$array[labelCell$index]; !!labelCell && $union(nodeMarginRectangle, labelCell.cellRectangle); } nodeMargin.left = -nodeMarginRectangle.x_0; nodeMargin.top_0 = -nodeMarginRectangle.y_0; nodeMargin.right = nodeMarginRectangle.width_0 - nodeMargin.left - nodeSize.x_0; nodeMargin.bottom = nodeMarginRectangle.height - nodeMargin.top_0 - nodeSize.y_0; } function EndLabelPreprocessor(){ } function gatherLabels(port){ var dummyNode, dummyPort, dummyPort$iterator, labels, maxEdgeThickness; labels = new ArrayList; maxEdgeThickness = gatherLabels_0(port, labels); dummyNode = castTo($getProperty(port, ($clinit_InternalProperties_1() , PORT_DUMMY)), 10); if (dummyNode) { for (dummyPort$iterator = new ArrayList$1(dummyNode.ports); dummyPort$iterator.i < dummyPort$iterator.this$01.array.length;) { dummyPort = castTo($next_6(dummyPort$iterator), 12); maskUndefined($getProperty(dummyPort, ORIGIN_0)) === maskUndefined(port) && (maxEdgeThickness = $wnd.Math.max(maxEdgeThickness, gatherLabels_0(dummyPort, labels))); } } labels.array.length == 0 || $setProperty_0(port, MAX_EDGE_THICKNESS, maxEdgeThickness); return maxEdgeThickness != -1?labels:null; } function gatherLabels_0(port, targetList){ var incidentEdge, incidentEdge$iterator, label_0, label$iterator, labels, maxEdgeThickness; maxEdgeThickness = -1; labels = new LinkedList; for (incidentEdge$iterator = new LPort$CombineIter$1(port.connectedEdges); $hasNext_3(incidentEdge$iterator.firstIterator) || $hasNext_3(incidentEdge$iterator.secondIterator);) { incidentEdge = castTo($hasNext_3(incidentEdge$iterator.firstIterator)?$next_6(incidentEdge$iterator.firstIterator):$next_6(incidentEdge$iterator.secondIterator), 18); maxEdgeThickness = $wnd.Math.max(maxEdgeThickness, $doubleValue(castToDouble($getProperty(incidentEdge, ($clinit_LayeredOptions() , EDGE_THICKNESS_0))))); incidentEdge.source == port?$forEach_3($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(incidentEdge.labels, 16)), new EndLabelPreprocessor$lambda$2$Type), new EndLabelPreprocessor$lambda$3$Type(labels)):$forEach_3($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(incidentEdge.labels, 16)), new EndLabelPreprocessor$lambda$4$Type), new EndLabelPreprocessor$lambda$5$Type(labels)); for (label$iterator = $listIterator_2(labels, 0); label$iterator.currentNode != label$iterator.this$01.tail;) { label_0 = castTo($next_9(label$iterator), 72); $hasProperty(label_0, ($clinit_InternalProperties_1() , END_LABEL_EDGE)) || $setProperty_0(label_0, END_LABEL_EDGE, incidentEdge); } $addAll_2(targetList, labels); $reset_0(labels); } return maxEdgeThickness; } defineClass(1561, 1, $intern_105, EndLabelPreprocessor); _.process = function process_7(layeredGraph, monitor){ $process_9(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_EndLabelPreprocessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'EndLabelPreprocessor', 1561); function EndLabelPreprocessor$lambda$0$Type(){ } defineClass(1562, 1, {}, EndLabelPreprocessor$lambda$0$Type); _.apply_0 = function apply_74(arg0){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 30).nodes, 16)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_EndLabelPreprocessor$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'EndLabelPreprocessor/lambda$0$Type', 1562); function EndLabelPreprocessor$lambda$1$Type(edgeLabelSpacing_1, labelLabelSpacing_3, verticalLayout_5){ this.edgeLabelSpacing_1 = edgeLabelSpacing_1; this.labelLabelSpacing_3 = labelLabelSpacing_3; this.verticalLayout_5 = verticalLayout_5; } defineClass(1563, 1, $intern_19, EndLabelPreprocessor$lambda$1$Type); _.accept = function accept_70(arg0){ $lambda$1_0(this.edgeLabelSpacing_1, this.labelLabelSpacing_3, this.verticalLayout_5, castTo(arg0, 10)); } ; _.edgeLabelSpacing_1 = 0; _.labelLabelSpacing_3 = 0; _.verticalLayout_5 = false; var Lorg_eclipse_elk_alg_layered_intermediate_EndLabelPreprocessor$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'EndLabelPreprocessor/lambda$1$Type', 1563); function EndLabelPreprocessor$lambda$2$Type(){ } defineClass(1564, 1, $intern_40, EndLabelPreprocessor$lambda$2$Type); _.test_0 = function test_31(arg0){ return maskUndefined($getProperty(castTo(arg0, 72), ($clinit_LayeredOptions() , EDGE_LABELS_PLACEMENT))) === maskUndefined(($clinit_EdgeLabelPlacement() , TAIL)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_EndLabelPreprocessor$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'EndLabelPreprocessor/lambda$2$Type', 1564); function EndLabelPreprocessor$lambda$3$Type(labels_0){ this.labels_0 = labels_0; } defineClass(1565, 1, $intern_19, EndLabelPreprocessor$lambda$3$Type); _.accept = function accept_71(arg0){ $add_7(this.labels_0, castTo(arg0, 72)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_EndLabelPreprocessor$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'EndLabelPreprocessor/lambda$3$Type', 1565); function EndLabelPreprocessor$lambda$4$Type(){ } defineClass(1566, 1, $intern_40, EndLabelPreprocessor$lambda$4$Type); _.test_0 = function test_32(arg0){ return maskUndefined($getProperty(castTo(arg0, 72), ($clinit_LayeredOptions() , EDGE_LABELS_PLACEMENT))) === maskUndefined(($clinit_EdgeLabelPlacement() , HEAD)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_EndLabelPreprocessor$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'EndLabelPreprocessor/lambda$4$Type', 1566); function EndLabelPreprocessor$lambda$5$Type(labels_0){ this.labels_0 = labels_0; } defineClass(1567, 1, $intern_19, EndLabelPreprocessor$lambda$5$Type); _.accept = function accept_72(arg0){ $add_7(this.labels_0, castTo(arg0, 72)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_EndLabelPreprocessor$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'EndLabelPreprocessor/lambda$5$Type', 1567); function $clinit_EndLabelSorter(){ $clinit_EndLabelSorter = emptyMethod; LABEL_GROUP_COMPARATOR = new EndLabelSorter$1; } function $createLabelGroups(portLabelCell){ var edge, edgeToGroupMap, label_0, label$iterator; edgeToGroupMap = new HashMap; for (label$iterator = new ArrayList$1(portLabelCell.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 187); edge = castTo(label_0.getProperty(($clinit_InternalProperties_1() , END_LABEL_EDGE)), 18); !!$getEntry_0(edgeToGroupMap.hashCodeMap, edge) || $put_6(edgeToGroupMap, edge, new EndLabelSorter$LabelGroup(edge)); $add_3(castTo(getEntryValueOrNull($getEntry_0(edgeToGroupMap.hashCodeMap, edge)), 466).labels, label_0); } return new ArrayList_1(new AbstractMap$2(edgeToGroupMap)); } function $initialize_2(lGraph){ var layer, layer$iterator, nextElementID, node, node$iterator, port, port$iterator; nextElementID = 0; for (layer$iterator = new ArrayList$1(lGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); node.id_0 = nextElementID++; for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); port.id_0 = nextElementID++; } } } } function $needsSorting(port){ var edgesWithEndLabels, headLabels, inEdge, inEdge$iterator, outEdge, outEdge$iterator, tailLabels; edgesWithEndLabels = 0; for (inEdge$iterator = new ArrayList$1(port.incomingEdges); inEdge$iterator.i < inEdge$iterator.this$01.array.length;) { inEdge = castTo($next_6(inEdge$iterator), 18); headLabels = $anyMatch(new StreamImpl(null, new Spliterators$IteratorSpliterator(inEdge.labels, 16)), new EndLabelSorter$lambda$3$Type); headLabels && ++edgesWithEndLabels; } for (outEdge$iterator = new ArrayList$1(port.outgoingEdges); outEdge$iterator.i < outEdge$iterator.this$01.array.length;) { outEdge = castTo($next_6(outEdge$iterator), 18); tailLabels = $anyMatch(new StreamImpl(null, new Spliterators$IteratorSpliterator(outEdge.labels, 16)), new EndLabelSorter$lambda$4$Type); tailLabels && ++edgesWithEndLabels; } return edgesWithEndLabels >= 2; } function $process_10(layeredGraph, monitor){ monitor.begin('Sort end labels', 1); $forEach_3($filter($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(layeredGraph.layers, 16)), new EndLabelSorter$lambda$0$Type), new EndLabelSorter$lambda$1$Type), new EndLabelSorter$lambda$2$Type); monitor.done_1(); } function $processNode_3(node){ var initializeMethodCalled, labelCellMap, port, port$iterator; initializeMethodCalled = false; if ($hasProperty(node, ($clinit_InternalProperties_1() , END_LABELS_0))) { labelCellMap = castTo($getProperty(node, END_LABELS_0), 85); for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); if ($needsSorting(port)) { if (!initializeMethodCalled) { $initialize_2($getGraph(node)); initializeMethodCalled = true; } $sort_1(castTo(labelCellMap.get_3(port), 314)); } } } } function $sort_1(portLabelCell){ var group, group$iterator, labelGroups, portLabelCellLabels; labelGroups = $createLabelGroups(portLabelCell); $sort(labelGroups, LABEL_GROUP_COMPARATOR); portLabelCellLabels = portLabelCell.labels; portLabelCellLabels.array.length = 0; for (group$iterator = new ArrayList$1(labelGroups); group$iterator.i < group$iterator.this$01.array.length;) { group = castTo($next_6(group$iterator), 466); $addAll_2(portLabelCellLabels, group.labels); } } function EndLabelSorter(){ $clinit_EndLabelSorter(); } defineClass(1615, 1, $intern_105, EndLabelSorter); _.process = function process_8(layeredGraph, monitor){ $process_10(castTo(layeredGraph, 36), monitor); } ; var LABEL_GROUP_COMPARATOR; var Lorg_eclipse_elk_alg_layered_intermediate_EndLabelSorter_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'EndLabelSorter', 1615); function $compare_11(group1, group2){ var sourcePortDiff, targetNodeDiff; sourcePortDiff = compare_5(group1.edge.source.id_0, group2.edge.source.id_0); if (sourcePortDiff != 0) { return sourcePortDiff; } targetNodeDiff = compare_5(group1.edge.target.owner.id_0, group2.edge.target.owner.id_0); if (targetNodeDiff != 0) { return targetNodeDiff; } return compare_5(group2.edge.target.id_0, group1.edge.target.id_0); } function EndLabelSorter$1(){ } defineClass(1616, 1, $intern_88, EndLabelSorter$1); _.compare_1 = function compare_42(group1, group2){ return $compare_11(castTo(group1, 466), castTo(group2, 466)); } ; _.equals_0 = function equals_106(other){ return this === other; } ; _.reversed = function reversed_34(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_EndLabelSorter$1_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'EndLabelSorter/1', 1616); function EndLabelSorter$LabelGroup(edge){ this.labels = new ArrayList; $addAll_2(this.labels, this.labels); this.edge = edge; } defineClass(466, 1, {466:1}, EndLabelSorter$LabelGroup); var Lorg_eclipse_elk_alg_layered_intermediate_EndLabelSorter$LabelGroup_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'EndLabelSorter/LabelGroup', 466); function EndLabelSorter$lambda$0$Type(){ } defineClass(1617, 1, {}, EndLabelSorter$lambda$0$Type); _.apply_0 = function apply_75(arg0){ return $clinit_EndLabelSorter() , new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 30).nodes, 16)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_EndLabelSorter$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'EndLabelSorter/lambda$0$Type', 1617); function EndLabelSorter$lambda$1$Type(){ } defineClass(1618, 1, $intern_40, EndLabelSorter$lambda$1$Type); _.test_0 = function test_33(arg0){ return $clinit_EndLabelSorter() , castTo(arg0, 10).type_0 == ($clinit_LNode$NodeType() , NORMAL); } ; var Lorg_eclipse_elk_alg_layered_intermediate_EndLabelSorter$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'EndLabelSorter/lambda$1$Type', 1618); function EndLabelSorter$lambda$2$Type(){ } defineClass(1619, 1, $intern_19, EndLabelSorter$lambda$2$Type); _.accept = function accept_73(arg0){ $processNode_3(castTo(arg0, 10)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_EndLabelSorter$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'EndLabelSorter/lambda$2$Type', 1619); function EndLabelSorter$lambda$3$Type(){ } defineClass(1620, 1, $intern_40, EndLabelSorter$lambda$3$Type); _.test_0 = function test_34(arg0){ return $clinit_EndLabelSorter() , maskUndefined($getProperty(castTo(arg0, 72), ($clinit_LayeredOptions() , EDGE_LABELS_PLACEMENT))) === maskUndefined(($clinit_EdgeLabelPlacement() , HEAD)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_EndLabelSorter$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'EndLabelSorter/lambda$3$Type', 1620); function EndLabelSorter$lambda$4$Type(){ } defineClass(1621, 1, $intern_40, EndLabelSorter$lambda$4$Type); _.test_0 = function test_35(arg0){ return $clinit_EndLabelSorter() , maskUndefined($getProperty(castTo(arg0, 72), ($clinit_LayeredOptions() , EDGE_LABELS_PLACEMENT))) === maskUndefined(($clinit_EdgeLabelPlacement() , TAIL)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_EndLabelSorter$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'EndLabelSorter/lambda$4$Type', 1621); function $absMin(d1, d2){ return $wnd.Math.abs(d1) < $wnd.Math.abs(d2)?d1:d2; } function $calculateBezierBendPoints(this$static, edgeChain, survivingEdge){ var addMidPoint, allCP, currentBendPoints, currentEdge, edge, edgeIterator, halfway, lastCP, northSouthCP, nt, nubSpline, sourcePort, targetPort, y_0, first, second, v, v2, straightenBeginning, iter, last, secondLast, straightenEnding; if (edgeChain.isEmpty()) { return; } allCP = new KVectorChain; edge = survivingEdge?survivingEdge:castTo(edgeChain.get_0(0), 18); sourcePort = edge.source; $clinit_SplineEdgeRouter(); nt = sourcePort.owner.type_0; if (!(nt == ($clinit_LNode$NodeType() , NORMAL) || nt == NORTH_SOUTH_PORT || nt == EXTERNAL_PORT || nt == BREAKING_POINT)) { throw toJs(new IllegalArgumentException_0('The target node of the edge must be a normal node or a northSouthPort.')); } $addLast_0(allCP, sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [sourcePort.owner.pos, sourcePort.pos, sourcePort.anchor]))); if (($clinit_PortSide() , SIDES_NORTH_SOUTH).contains(sourcePort.side)) { y_0 = $doubleValue(castToDouble($getProperty(sourcePort, ($clinit_InternalProperties_1() , SPLINE_NS_PORT_Y_COORD)))); northSouthCP = new KVector_1(sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [sourcePort.owner.pos, sourcePort.pos, sourcePort.anchor])).x_0, y_0); $addNode_0(allCP, northSouthCP, allCP.tail.prev, allCP.tail); } lastCP = null; addMidPoint = false; edgeIterator = edgeChain.iterator_0(); while (edgeIterator.hasNext_0()) { currentEdge = castTo(edgeIterator.next_1(), 18); currentBendPoints = currentEdge.bendPoints; if (currentBendPoints.size_0 != 0) { if (addMidPoint) { halfway = $scale($add_19(lastCP, (checkCriticalElement(currentBendPoints.size_0 != 0) , castTo(currentBendPoints.header.next_0.value_0, 8))), 0.5); $addNode_0(allCP, halfway, allCP.tail.prev, allCP.tail); addMidPoint = false; } else { addMidPoint = true; } lastCP = $clone_1((checkCriticalElement(currentBendPoints.size_0 != 0) , castTo(currentBendPoints.tail.prev.value_0, 8))); $addAll(allCP, currentBendPoints); $reset_0(currentBendPoints); } } targetPort = edge.target; if (SIDES_NORTH_SOUTH.contains(targetPort.side)) { y_0 = $doubleValue(castToDouble($getProperty(targetPort, ($clinit_InternalProperties_1() , SPLINE_NS_PORT_Y_COORD)))); northSouthCP = new KVector_1(sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [targetPort.owner.pos, targetPort.pos, targetPort.anchor])).x_0, y_0); $addNode_0(allCP, northSouthCP, allCP.tail.prev, allCP.tail); } $addLast_0(allCP, sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [targetPort.owner.pos, targetPort.pos, targetPort.anchor]))); this$static.splineRoutingMode == ($clinit_SplineRoutingMode() , CONSERVATIVE) && (first = (checkCriticalElement(allCP.size_0 != 0) , castTo(allCP.header.next_0.value_0, 8)) , second = castTo($get_7(allCP, 1), 8) , v = new KVector_0(portSideToDirection(sourcePort.side)) , v.x_0 *= 5 , v.y_0 *= 5 , v2 = $sub_0(new KVector_1(second.x_0, second.y_0), first) , straightenBeginning = new KVector_1($absMin(v.x_0, v2.x_0), $absMin(v.y_0, v2.y_0)) , $add_19(straightenBeginning, first) , iter = $listIterator_2(allCP, 1) , $add_8(iter, straightenBeginning) , last = (checkCriticalElement(allCP.size_0 != 0) , castTo(allCP.tail.prev.value_0, 8)) , secondLast = castTo($get_7(allCP, allCP.size_0 - 2), 8) , v = new KVector_0(portSideToDirection(targetPort.side)) , v.x_0 *= 5 , v.y_0 *= 5 , v2 = $sub_0(new KVector_1(secondLast.x_0, secondLast.y_0), last) , straightenEnding = new KVector_1($absMin(v.x_0, v2.x_0), $absMin(v.y_0, v2.y_0)) , $add_19(straightenEnding, last) , $add_0(allCP, allCP.size_0 - 1, straightenEnding) , undefined); nubSpline = new NubSpline(allCP); $addAll(edge.bendPoints, $getBezierCP(nubSpline)); } function $calculateControlPoints(this$static, segment){ var edge, edge$iterator, ei, sloppy, xStartPos, xEndPos, halfway; if (segment.handled) { return; } segment.handled = true; for (edge$iterator = segment.edges.map_0.keySet_0().iterator_0(); edge$iterator.hasNext_0();) { edge = castTo(edge$iterator.next_1(), 18); if (segment.isStraight && segment.edges.map_0.size_1() <= 1) { xStartPos = segment.boundingBox.x_0; xEndPos = segment.boundingBox.x_0 + segment.boundingBox.width_0; halfway = new KVector_1(xStartPos + (xEndPos - xStartPos) / 2, segment.centerControlPointY); $add_7(castTo(segment.edges.map_0.keySet_0().iterator_0().next_1(), 18).bendPoints, halfway); continue; } ei = castTo($get_10(segment.edgeInformation, edge), 468); if (ei.invertedLeft || ei.invertedRight) { $calculateControlPointsInvertedEdge(this$static, edge, segment); continue; } sloppy = this$static.splineRoutingMode == ($clinit_SplineRoutingMode() , SLOPPY) && (ei.normalSourceNode || ei.normalTargetNode) && $segmentAllowsSloppyRouting(this$static, segment) && segment.edges.map_0.size_1() <= 1; sloppy?$calculateControlPointsSloppy(edge, segment):$calculateControlPointsConservative(this$static, edge, segment); } segment.inverseOrder && $forEach_0(segment.edges, new FinalSplineBendpointsCalculator$lambda$5$Type); } function $calculateControlPointsConservative(this$static, edge, containingSegment){ var center, centerXPos, ei, endXPos, isHyperedge, sourceStraightCP, sourceVerticalCP, startXPos, targetStraightCP, targetVerticalCP, ySourceAnchor, yTargetAnchor; startXPos = containingSegment.boundingBox.x_0; endXPos = containingSegment.boundingBox.x_0 + containingSegment.boundingBox.width_0; ei = castTo($get_10(containingSegment.edgeInformation, edge), 468); ySourceAnchor = ei.startY; yTargetAnchor = ei.endY; sourceStraightCP = new KVector_1(startXPos, ySourceAnchor); targetStraightCP = new KVector_1(endXPos, yTargetAnchor); centerXPos = startXPos; containingSegment.isWestOfInitialLayer || (centerXPos += this$static.edgeNodeSpacing); centerXPos += containingSegment.xDelta + containingSegment.rank * this$static.edgeEdgeSpacing; sourceVerticalCP = new KVector_1(centerXPos, ySourceAnchor); targetVerticalCP = new KVector_1(centerXPos, yTargetAnchor); $addAll_7(edge.bendPoints, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [sourceStraightCP, sourceVerticalCP])); isHyperedge = containingSegment.edges.map_0.size_1() > 1; if (isHyperedge) { center = new KVector_1(centerXPos, containingSegment.centerControlPointY); $add_7(edge.bendPoints, center); } $addAll_7(edge.bendPoints, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [targetVerticalCP, targetStraightCP])); } function $calculateControlPointsInvertedEdge(this$static, edge, containingSegment){ var center, centerXPos, ei, endXPos, isHyperedge, sourceStraightCP, sourceVerticalCP, startXPos, targetStraightCP, targetVerticalCP, ySourceAnchor, yTargetAnchor; startXPos = containingSegment.boundingBox.x_0; endXPos = containingSegment.boundingBox.x_0 + containingSegment.boundingBox.width_0; ei = castTo($get_10(containingSegment.edgeInformation, edge), 468); ySourceAnchor = ei.startY; yTargetAnchor = ei.endY; ei.invertedLeft?(sourceStraightCP = new KVector_1(endXPos, ySourceAnchor)):(sourceStraightCP = new KVector_1(startXPos, ySourceAnchor)); ei.invertedRight?(targetStraightCP = new KVector_1(startXPos, yTargetAnchor)):(targetStraightCP = new KVector_1(endXPos, yTargetAnchor)); centerXPos = startXPos; containingSegment.isWestOfInitialLayer || (centerXPos += this$static.edgeNodeSpacing); centerXPos += containingSegment.xDelta + containingSegment.rank * this$static.edgeEdgeSpacing; sourceVerticalCP = new KVector_1(centerXPos, ySourceAnchor); targetVerticalCP = new KVector_1(centerXPos, yTargetAnchor); $addAll_7(edge.bendPoints, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [sourceStraightCP, sourceVerticalCP])); isHyperedge = containingSegment.edges.map_0.size_1() > 1; if (isHyperedge) { center = new KVector_1(centerXPos, containingSegment.centerControlPointY); $add_7(edge.bendPoints, center); } $addAll_7(edge.bendPoints, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [targetVerticalCP, targetStraightCP])); } function $calculateControlPointsSloppy(edge, containingSegment){ var approx, box, centerXPos, centerYPos, edgePointsDownwards, ei, endXPos, needToCheckSrc, needToCheckTgt, neighbor, neighborIndex, shortCutSource, shortCutTarget, sourceStraightCP, sourceVerticalCP, src_0, startXPos, targetStraightCP, targetVerticalCP, tgt, v1, v2, v3, ySourceAnchor, yTargetAnchor; ei = castTo($get_10(containingSegment.edgeInformation, edge), 468); startXPos = containingSegment.boundingBox.x_0; endXPos = containingSegment.boundingBox.x_0 + containingSegment.boundingBox.width_0; ySourceAnchor = ei.startY; yTargetAnchor = ei.endY; edgePointsDownwards = ySourceAnchor < yTargetAnchor; sourceStraightCP = new KVector_1(startXPos, ySourceAnchor); targetStraightCP = new KVector_1(endXPos, yTargetAnchor); centerXPos = (startXPos + endXPos) / 2; sourceVerticalCP = new KVector_1(centerXPos, ySourceAnchor); targetVerticalCP = new KVector_1(centerXPos, yTargetAnchor); centerYPos = $computeSloppyCenterY(edge, ySourceAnchor, yTargetAnchor); v1 = $getAbsoluteAnchor(containingSegment.sourcePort); v2 = new KVector_1(centerXPos, centerYPos); v3 = $getAbsoluteAnchor(containingSegment.targetPort); approx = approximateBezierSegment(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [v1, v2, v3])); shortCutSource = false; src_0 = containingSegment.sourcePort.owner; if (!!src_0 && !!src_0.layer && ei.normalSourceNode) { needToCheckSrc = edgePointsDownwards && src_0.id_0 < src_0.layer.nodes.array.length - 1 || !edgePointsDownwards && src_0.id_0 > 0; if (needToCheckSrc) { if (needToCheckSrc) { neighborIndex = src_0.id_0; edgePointsDownwards?++neighborIndex:--neighborIndex; neighbor = castTo($get_11(src_0.layer.nodes, neighborIndex), 10); box = $nodeToBoundingBox(neighbor); shortCutSource = !(intersects_0(box, v1, approx[0]) || contains_50(box, v1, approx[0])); } } else { shortCutSource = true; } } shortCutTarget = false; tgt = containingSegment.targetPort.owner; if (!!tgt && !!tgt.layer && ei.normalTargetNode) { needToCheckTgt = edgePointsDownwards && tgt.id_0 > 0 || !edgePointsDownwards && tgt.id_0 < tgt.layer.nodes.array.length - 1; if (needToCheckTgt) { neighborIndex = tgt.id_0; edgePointsDownwards?--neighborIndex:++neighborIndex; neighbor = castTo($get_11(tgt.layer.nodes, neighborIndex), 10); box = $nodeToBoundingBox(neighbor); shortCutTarget = !(intersects_0(box, approx[0], v3) || contains_50(box, approx[0], v3)); } else { shortCutTarget = true; } } shortCutSource && shortCutTarget && $add_7(edge.bendPoints, v2); shortCutSource || $addAll_7(edge.bendPoints, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [sourceStraightCP, sourceVerticalCP])); shortCutTarget || $addAll_7(edge.bendPoints, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [targetVerticalCP, targetStraightCP])); } function $computeSloppyCenterY(edge, ySourceAnchor, yTargetAnchor){ var centerYPos, degreeDiff, indegree, outdegree, port, port$iterator; indegree = 0; outdegree = 0; if (edge.source) { for (port$iterator = new ArrayList$1(edge.target.owner.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); indegree += port.incomingEdges.array.length; } } else { indegree = 1; } if (edge.target) { for (port$iterator = new ArrayList$1(edge.source.owner.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); outdegree += port.outgoingEdges.array.length; } } else { outdegree = 1; } degreeDiff = round_int(signum(outdegree - indegree)); centerYPos = (yTargetAnchor + ySourceAnchor) / 2 + (yTargetAnchor - ySourceAnchor) * (0.4 * degreeDiff); return centerYPos; } function $indexNodesPerLayer(graph){ var index_0, l, l$iterator, n, n$iterator; for (l$iterator = new ArrayList$1(graph.layers); l$iterator.i < l$iterator.this$01.array.length;) { l = castTo($next_6(l$iterator), 30); index_0 = 0; for (n$iterator = new ArrayList$1(l.nodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); n.id_0 = index_0++; } } } function $nodeToBoundingBox(node){ var m, pos, size_0; pos = node.pos; size_0 = node.size_0; m = node.margin; return new ElkRectangle_0(pos.x_0 - m.left, pos.y_0 - m.top_0, size_0.x_0 + (m.left + m.right), size_0.y_0 + (m.top_0 + m.bottom)); } function $process_11(this$static, graph){ var e, e$iterator, e$iterator0, edgeChain, spline, startEdges, survivingEdge; this$static.edgeEdgeSpacing = $doubleValue(castToDouble($getProperty(graph, ($clinit_LayeredOptions() , SPACING_EDGE_EDGE_BETWEEN_LAYERS_0)))); this$static.edgeNodeSpacing = $doubleValue(castToDouble($getProperty(graph, SPACING_EDGE_NODE_BETWEEN_LAYERS_0))); this$static.splineRoutingMode = castTo($getProperty(graph, EDGE_ROUTING_SPLINES_MODE_0), 350); this$static.compactionStrategy = castTo($getProperty(graph, COMPACTION_POST_COMPACTION_STRATEGY_0), 282); $indexNodesPerLayer(graph); startEdges = castTo($collect_1($filter($filter($flatMap($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(graph.layers, 16)), new FinalSplineBendpointsCalculator$lambda$0$Type), new FinalSplineBendpointsCalculator$lambda$1$Type), new FinalSplineBendpointsCalculator$lambda$2$Type), new FinalSplineBendpointsCalculator$lambda$3$Type), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , IDENTITY_FINISH)]))), 15); for (e$iterator0 = startEdges.iterator_0(); e$iterator0.hasNext_0();) { e = castTo(e$iterator0.next_1(), 18); spline = castTo($getProperty(e, ($clinit_InternalProperties_1() , SPLINE_ROUTE_START)), 15); spline.forEach_0(new FinalSplineBendpointsCalculator$lambda$4$Type(this$static)); $setProperty_0(e, SPLINE_ROUTE_START, null); } for (e$iterator = startEdges.iterator_0(); e$iterator.hasNext_0();) { e = castTo(e$iterator.next_1(), 18); survivingEdge = castTo($getProperty(e, ($clinit_InternalProperties_1() , SPLINE_SURVIVING_EDGE)), 18); edgeChain = castTo($getProperty(e, SPLINE_EDGE_CHAIN), 15); $calculateBezierBendPoints(this$static, edgeChain, survivingEdge); $setProperty_0(e, SPLINE_EDGE_CHAIN, null); } } function $segmentAllowsSloppyRouting(this$static, segment){ var endXPos, n, nodeSegmentDistance, startXPos, t; if (this$static.compactionStrategy == ($clinit_GraphCompactionStrategy() , NONE_5)) { return true; } startXPos = segment.boundingBox.x_0; endXPos = segment.boundingBox.x_0 + segment.boundingBox.width_0; if (segment.initialSegment) { n = segment.sourceNode; t = n.layer.size_0.x_0 - n.size_0.x_0 / 2; nodeSegmentDistance = startXPos - (n.pos.x_0 + n.size_0.x_0); if (nodeSegmentDistance > t) { return false; } } if (segment.lastSegment) { n = segment.targetNode; t = n.layer.size_0.x_0 - n.size_0.x_0 / 2; nodeSegmentDistance = n.pos.x_0 - endXPos; if (nodeSegmentDistance > t) { return false; } } return true; } function FinalSplineBendpointsCalculator(){ } defineClass(1568, 1, $intern_105, FinalSplineBendpointsCalculator); _.process = function process_9(graph, progressMonitor){ $process_11(this, castTo(graph, 36)); } ; _.edgeEdgeSpacing = 0; _.edgeNodeSpacing = 0; var Lorg_eclipse_elk_alg_layered_intermediate_FinalSplineBendpointsCalculator_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'FinalSplineBendpointsCalculator', 1568); function FinalSplineBendpointsCalculator$lambda$0$Type(){ } defineClass(1569, 1, {}, FinalSplineBendpointsCalculator$lambda$0$Type); _.apply_0 = function apply_76(arg0){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 30).nodes, 16)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_FinalSplineBendpointsCalculator$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'FinalSplineBendpointsCalculator/lambda$0$Type', 1569); function FinalSplineBendpointsCalculator$lambda$1$Type(){ } defineClass(1570, 1, {}, FinalSplineBendpointsCalculator$lambda$1$Type); _.apply_0 = function apply_77(arg0){ return new StreamImpl(null, new Spliterators$IteratorSpliterator_0(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(castTo(arg0, 10)).val$inputs1.iterator_0(), new Iterables$10)))); } ; var Lorg_eclipse_elk_alg_layered_intermediate_FinalSplineBendpointsCalculator$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'FinalSplineBendpointsCalculator/lambda$1$Type', 1570); function FinalSplineBendpointsCalculator$lambda$2$Type(){ } defineClass(1571, 1, $intern_40, FinalSplineBendpointsCalculator$lambda$2$Type); _.test_0 = function test_36(arg0){ return !$isSelfLoop(castTo(arg0, 18)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_FinalSplineBendpointsCalculator$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'FinalSplineBendpointsCalculator/lambda$2$Type', 1571); function FinalSplineBendpointsCalculator$lambda$3$Type(){ } defineClass(1572, 1, $intern_40, FinalSplineBendpointsCalculator$lambda$3$Type); _.test_0 = function test_37(arg0){ return $hasProperty(castTo(arg0, 18), ($clinit_InternalProperties_1() , SPLINE_ROUTE_START)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_FinalSplineBendpointsCalculator$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'FinalSplineBendpointsCalculator/lambda$3$Type', 1572); function FinalSplineBendpointsCalculator$lambda$4$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1573, 1, $intern_19, FinalSplineBendpointsCalculator$lambda$4$Type); _.accept = function accept_74(arg0){ $calculateControlPoints(this.$$outer_0, castTo(arg0, 131)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_FinalSplineBendpointsCalculator$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'FinalSplineBendpointsCalculator/lambda$4$Type', 1573); function FinalSplineBendpointsCalculator$lambda$5$Type(){ } defineClass(1574, 1, $intern_19, FinalSplineBendpointsCalculator$lambda$5$Type); _.accept = function accept_75(arg0){ reverse_2(castTo(arg0, 18).bendPoints); } ; var Lorg_eclipse_elk_alg_layered_intermediate_FinalSplineBendpointsCalculator$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'FinalSplineBendpointsCalculator/lambda$5$Type', 1574); function $getMirroredPortSideX(side){ switch (side.ordinal) { case 2: return $clinit_PortSide() , WEST_2; case 4: return $clinit_PortSide() , EAST_2; default:return side; } } function $getMirroredPortSideY(side){ switch (side.ordinal) { case 1: return $clinit_PortSide() , SOUTH_2; case 3: return $clinit_PortSide() , NORTH_3; default:return side; } } function $mirrorAllX(layeredGraph, nodes){ $mirrorX(nodes, layeredGraph); $mirrorX_1(layeredGraph.padding); $mirrorX_1(castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , NODE_LABELS_PADDING)), 214)); } function $mirrorAllY(layeredGraph, nodes){ $mirrorY(nodes, layeredGraph); $mirrorY_1(layeredGraph.padding); $mirrorY_1(castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , NODE_LABELS_PADDING)), 214)); } function $mirrorInLayerConstraintY(node){ switch (castTo($getProperty(node, ($clinit_InternalProperties_1() , IN_LAYER_CONSTRAINT)), 311).ordinal) { case 1: $setProperty_0(node, IN_LAYER_CONSTRAINT, ($clinit_InLayerConstraint() , BOTTOM_0)); break; case 2: $setProperty_0(node, IN_LAYER_CONSTRAINT, ($clinit_InLayerConstraint() , TOP_1)); } } function $mirrorLayerConstraintX(node){ switch (castTo($getProperty(node, ($clinit_LayeredOptions() , LAYERING_LAYER_CONSTRAINT_0)), 171).ordinal) { case 1: $setProperty_0(node, LAYERING_LAYER_CONSTRAINT_0, ($clinit_LayerConstraint() , LAST)); break; case 2: $setProperty_0(node, LAYERING_LAYER_CONSTRAINT_0, ($clinit_LayerConstraint() , LAST_SEPARATE_0)); break; case 3: $setProperty_0(node, LAYERING_LAYER_CONSTRAINT_0, ($clinit_LayerConstraint() , FIRST)); break; case 4: $setProperty_0(node, LAYERING_LAYER_CONSTRAINT_0, ($clinit_LayerConstraint() , FIRST_SEPARATE_0)); } } function $mirrorNodeLabelPlacementX(shape_0){ var oldPlacement; if (!$hasProperty(shape_0, ($clinit_LayeredOptions() , NODE_LABELS_PLACEMENT_1))) { return; } oldPlacement = castTo($getProperty(shape_0, NODE_LABELS_PLACEMENT_1), 21); if (oldPlacement.contains(($clinit_NodeLabelPlacement() , H_LEFT_0))) { oldPlacement.remove_1(H_LEFT_0); oldPlacement.add_2(H_RIGHT_0); } else if (oldPlacement.contains(H_RIGHT_0)) { oldPlacement.remove_1(H_RIGHT_0); oldPlacement.add_2(H_LEFT_0); } } function $mirrorNodeLabelPlacementY(shape_0){ var oldPlacement; if (!$hasProperty(shape_0, ($clinit_LayeredOptions() , NODE_LABELS_PLACEMENT_1))) { return; } oldPlacement = castTo($getProperty(shape_0, NODE_LABELS_PLACEMENT_1), 21); if (oldPlacement.contains(($clinit_NodeLabelPlacement() , V_TOP_0))) { oldPlacement.remove_1(V_TOP_0); oldPlacement.add_2(V_BOTTOM_0); } else if (oldPlacement.contains(V_BOTTOM_0)) { oldPlacement.remove_1(V_BOTTOM_0); oldPlacement.add_2(V_TOP_0); } } function $mirrorX(nodes, graph){ var bendPoint, bendPoint$iterator, edge, edge$iterator, index_0, jp, jp$iterator, junctionPoints, label_0, label$iterator, label$iterator0, label$iterator1, node, node$iterator, node$iterator0, nodeSize, offset, port, port$iterator; offset = 0; if (graph.size_0.x_0 == 0) { for (node$iterator0 = new ArrayList$1(nodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); offset = $wnd.Math.max(offset, node.pos.x_0 + node.size_0.x_0 + node.margin.right); } } else { offset = graph.size_0.x_0 - graph.offset.x_0; } offset -= graph.offset.x_0; for (node$iterator = new ArrayList$1(nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); $mirrorX_0(node.pos, offset - node.size_0.x_0); $mirrorX_1(node.padding); $mirrorNodeLabelPlacementX(node); (!node.propertyMap?($clinit_Collections() , $clinit_Collections() , EMPTY_MAP):node.propertyMap).containsKey(($clinit_LayeredOptions() , POSITION)) && $mirrorX_0(castTo($getProperty(node, POSITION), 8), offset - node.size_0.x_0); switch (castTo($getProperty(node, ALIGNMENT), 255).ordinal) { case 1: $setProperty_0(node, ALIGNMENT, ($clinit_Alignment() , RIGHT_5)); break; case 2: $setProperty_0(node, ALIGNMENT, ($clinit_Alignment() , LEFT_5)); } nodeSize = node.size_0; for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); $mirrorX_0(port.pos, nodeSize.x_0 - port.size_0.x_0); $mirrorX_0(port.anchor, port.size_0.x_0); $setSide(port, $getMirroredPortSideX(port.side)); index_0 = castTo($getProperty(port, PORT_INDEX), 17); !!index_0 && $setProperty_0(port, PORT_INDEX, valueOf_3(-index_0.value_0)); for (edge$iterator = new ArrayList$1(port.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); for (bendPoint$iterator = $listIterator_2(edge.bendPoints, 0); bendPoint$iterator.currentNode != bendPoint$iterator.this$01.tail;) { bendPoint = castTo($next_9(bendPoint$iterator), 8); bendPoint.x_0 = offset - bendPoint.x_0; } junctionPoints = castTo($getProperty(edge, JUNCTION_POINTS), 75); if (junctionPoints) { for (jp$iterator = $listIterator_2(junctionPoints, 0); jp$iterator.currentNode != jp$iterator.this$01.tail;) { jp = castTo($next_9(jp$iterator), 8); jp.x_0 = offset - jp.x_0; } } for (label$iterator0 = new ArrayList$1(edge.labels); label$iterator0.i < label$iterator0.this$01.array.length;) { label_0 = castTo($next_6(label$iterator0), 72); $mirrorX_0(label_0.pos, offset - label_0.size_0.x_0); } } for (label$iterator1 = new ArrayList$1(port.labels); label$iterator1.i < label$iterator1.this$01.array.length;) { label_0 = castTo($next_6(label$iterator1), 72); $mirrorX_0(label_0.pos, port.size_0.x_0 - label_0.size_0.x_0); } } if (node.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { $setProperty_0(node, ($clinit_InternalProperties_1() , EXT_PORT_SIDE), $getMirroredPortSideX(castTo($getProperty(node, EXT_PORT_SIDE), 64))); $mirrorLayerConstraintX(node); } for (label$iterator = new ArrayList$1(node.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 72); $mirrorNodeLabelPlacementX(label_0); $mirrorX_0(label_0.pos, nodeSize.x_0 - label_0.size_0.x_0); } } } function $mirrorX_0(v, offset){ v.x_0 = offset - v.x_0; } function $mirrorX_1(spacing){ var oldLeft, oldRight; oldLeft = spacing.left; oldRight = spacing.right; spacing.left = oldRight; spacing.right = oldLeft; } function $mirrorY(nodes, graph){ var bendPoint, bendPoint$iterator, edge, edge$iterator, index_0, jp, jp$iterator, junctionPoints, label_0, label$iterator, label$iterator0, label$iterator1, node, node$iterator, node$iterator0, nodeSize, offset, port, port$iterator; offset = 0; if (graph.size_0.y_0 == 0) { for (node$iterator0 = new ArrayList$1(nodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); offset = $wnd.Math.max(offset, node.pos.y_0 + node.size_0.y_0 + node.margin.bottom); } } else { offset = graph.size_0.y_0 - graph.offset.y_0; } offset -= graph.offset.y_0; for (node$iterator = new ArrayList$1(nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); $mirrorY_0(node.pos, offset - node.size_0.y_0); $mirrorY_1(node.padding); $mirrorNodeLabelPlacementY(node); (!node.propertyMap?($clinit_Collections() , $clinit_Collections() , EMPTY_MAP):node.propertyMap).containsKey(($clinit_LayeredOptions() , POSITION)) && $mirrorY_0(castTo($getProperty(node, POSITION), 8), offset - node.size_0.y_0); switch (castTo($getProperty(node, ALIGNMENT), 255).ordinal) { case 3: $setProperty_0(node, ALIGNMENT, ($clinit_Alignment() , BOTTOM_1)); break; case 4: $setProperty_0(node, ALIGNMENT, ($clinit_Alignment() , TOP_2)); } nodeSize = node.size_0; for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); $mirrorY_0(port.pos, nodeSize.y_0 - port.size_0.y_0); $mirrorY_0(port.anchor, port.size_0.y_0); $setSide(port, $getMirroredPortSideY(port.side)); index_0 = castTo($getProperty(port, PORT_INDEX), 17); !!index_0 && $setProperty_0(port, PORT_INDEX, valueOf_3(-index_0.value_0)); for (edge$iterator = new ArrayList$1(port.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); for (bendPoint$iterator = $listIterator_2(edge.bendPoints, 0); bendPoint$iterator.currentNode != bendPoint$iterator.this$01.tail;) { bendPoint = castTo($next_9(bendPoint$iterator), 8); bendPoint.y_0 = offset - bendPoint.y_0; } junctionPoints = castTo($getProperty(edge, JUNCTION_POINTS), 75); if (junctionPoints) { for (jp$iterator = $listIterator_2(junctionPoints, 0); jp$iterator.currentNode != jp$iterator.this$01.tail;) { jp = castTo($next_9(jp$iterator), 8); jp.y_0 = offset - jp.y_0; } } for (label$iterator0 = new ArrayList$1(edge.labels); label$iterator0.i < label$iterator0.this$01.array.length;) { label_0 = castTo($next_6(label$iterator0), 72); $mirrorY_0(label_0.pos, offset - label_0.size_0.y_0); } } for (label$iterator1 = new ArrayList$1(port.labels); label$iterator1.i < label$iterator1.this$01.array.length;) { label_0 = castTo($next_6(label$iterator1), 72); $mirrorY_0(label_0.pos, port.size_0.y_0 - label_0.size_0.y_0); } } if (node.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { $setProperty_0(node, ($clinit_InternalProperties_1() , EXT_PORT_SIDE), $getMirroredPortSideY(castTo($getProperty(node, EXT_PORT_SIDE), 64))); $mirrorInLayerConstraintY(node); } for (label$iterator = new ArrayList$1(node.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 72); $mirrorNodeLabelPlacementY(label_0); $mirrorY_0(label_0.pos, nodeSize.y_0 - label_0.size_0.y_0); } } } function $mirrorY_0(v, offset){ v.y_0 = offset - v.y_0; } function $mirrorY_1(spacing){ var oldBottom, oldTop; oldTop = spacing.top_0; oldBottom = spacing.bottom; spacing.top_0 = oldBottom; spacing.bottom = oldTop; } function $process_12(this$static, layeredGraph, monitor){ var congruency, layer, layer$iterator, nodes; monitor.begin('Graph transformation (' + this$static.mode + ')', 1); nodes = newArrayList(layeredGraph.layerlessNodes); for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); $addAll_2(nodes, layer.nodes); } congruency = castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , DIRECTION_CONGRUENCY_0)), 428); if (congruency == ($clinit_DirectionCongruency() , READING_DIRECTION)) { switch (castTo($getProperty(layeredGraph, DIRECTION), 88).ordinal) { case 2: $mirrorAllX(layeredGraph, nodes); break; case 3: $transposeAll(layeredGraph, nodes); break; case 4: if (this$static.mode == ($clinit_GraphTransformer$Mode() , TO_INTERNAL_LTR)) { $transposeAll(layeredGraph, nodes); $mirrorAllY(layeredGraph, nodes); } else { $mirrorAllY(layeredGraph, nodes); $transposeAll(layeredGraph, nodes); } } } else { if (this$static.mode == ($clinit_GraphTransformer$Mode() , TO_INTERNAL_LTR)) { switch (castTo($getProperty(layeredGraph, DIRECTION), 88).ordinal) { case 2: $mirrorAllX(layeredGraph, nodes); $mirrorAllY(layeredGraph, nodes); break; case 3: $transposeAll(layeredGraph, nodes); $mirrorAllX(layeredGraph, nodes); break; case 4: $mirrorAllX(layeredGraph, nodes); $transposeAll(layeredGraph, nodes); } } else { switch (castTo($getProperty(layeredGraph, DIRECTION), 88).ordinal) { case 2: $mirrorAllX(layeredGraph, nodes); $mirrorAllY(layeredGraph, nodes); break; case 3: $mirrorAllX(layeredGraph, nodes); $transposeAll(layeredGraph, nodes); break; case 4: $transposeAll(layeredGraph, nodes); $mirrorAllX(layeredGraph, nodes); } } } monitor.done_1(); } function $transpose(nodes){ var bendPoint, bendPoint$iterator, edge, edge$iterator, index_0, jp, jp$iterator, junctionPoints, label_0, label$iterator, label$iterator0, label$iterator1, node, node$iterator, port, port$iterator; for (node$iterator = new ArrayList$1(nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); $transpose_0(node.pos); $transpose_0(node.size_0); $transpose_1(node.padding); $transposeNodeLabelPlacement(node); $transposeProperties(node); for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); $transpose_0(port.pos); $transpose_0(port.anchor); $transpose_0(port.size_0); $setSide(port, $transposePortSide(port.side)); index_0 = castTo($getProperty(port, ($clinit_LayeredOptions() , PORT_INDEX)), 17); !!index_0 && $setProperty_0(port, PORT_INDEX, valueOf_3(-index_0.value_0)); for (edge$iterator = new ArrayList$1(port.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); for (bendPoint$iterator = $listIterator_2(edge.bendPoints, 0); bendPoint$iterator.currentNode != bendPoint$iterator.this$01.tail;) { bendPoint = castTo($next_9(bendPoint$iterator), 8); $transpose_0(bendPoint); } junctionPoints = castTo($getProperty(edge, JUNCTION_POINTS), 75); if (junctionPoints) { for (jp$iterator = $listIterator_2(junctionPoints, 0); jp$iterator.currentNode != jp$iterator.this$01.tail;) { jp = castTo($next_9(jp$iterator), 8); $transpose_0(jp); } } for (label$iterator0 = new ArrayList$1(edge.labels); label$iterator0.i < label$iterator0.this$01.array.length;) { label_0 = castTo($next_6(label$iterator0), 72); $transpose_0(label_0.pos); $transpose_0(label_0.size_0); } } for (label$iterator1 = new ArrayList$1(port.labels); label$iterator1.i < label$iterator1.this$01.array.length;) { label_0 = castTo($next_6(label$iterator1), 72); $transpose_0(label_0.pos); $transpose_0(label_0.size_0); } } if (node.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { $setProperty_0(node, ($clinit_InternalProperties_1() , EXT_PORT_SIDE), $transposePortSide(castTo($getProperty(node, EXT_PORT_SIDE), 64))); $transposeLayerConstraint(node); } for (label$iterator = new ArrayList$1(node.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 72); $transposeNodeLabelPlacement(label_0); $transpose_0(label_0.size_0); $transpose_0(label_0.pos); } } } function $transpose_0(v){ var temp; temp = v.x_0; v.x_0 = v.y_0; v.y_0 = temp; } function $transpose_1(spacing){ var oldBottom, oldLeft, oldRight, oldTop; oldTop = spacing.top_0; oldBottom = spacing.bottom; oldLeft = spacing.left; oldRight = spacing.right; spacing.top_0 = oldLeft; spacing.bottom = oldRight; spacing.left = oldTop; spacing.right = oldBottom; } function $transposeAll(layeredGraph, nodes){ var oldSide; $transpose(nodes); oldSide = castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , EDGE_LABELS_SIDE_SELECTION_0)), 283); !!oldSide && $setProperty_0(layeredGraph, EDGE_LABELS_SIDE_SELECTION_0, $transpose_2(oldSide)); $transpose_0(layeredGraph.offset); $transpose_0(layeredGraph.size_0); $transpose_1(layeredGraph.padding); $transpose_1(castTo($getProperty(layeredGraph, NODE_LABELS_PADDING), 214)); } function $transposeLayerConstraint(node){ var inLayerConstraint, layerConstraint; layerConstraint = castTo($getProperty(node, ($clinit_LayeredOptions() , LAYERING_LAYER_CONSTRAINT_0)), 171); inLayerConstraint = castTo($getProperty(node, ($clinit_InternalProperties_1() , IN_LAYER_CONSTRAINT)), 311); if (layerConstraint == ($clinit_LayerConstraint() , FIRST_SEPARATE_0)) { $setProperty_0(node, LAYERING_LAYER_CONSTRAINT_0, NONE_7); $setProperty_0(node, IN_LAYER_CONSTRAINT, ($clinit_InLayerConstraint() , TOP_1)); } else if (layerConstraint == LAST_SEPARATE_0) { $setProperty_0(node, LAYERING_LAYER_CONSTRAINT_0, NONE_7); $setProperty_0(node, IN_LAYER_CONSTRAINT, ($clinit_InLayerConstraint() , BOTTOM_0)); } else if (inLayerConstraint == ($clinit_InLayerConstraint() , TOP_1)) { $setProperty_0(node, LAYERING_LAYER_CONSTRAINT_0, FIRST_SEPARATE_0); $setProperty_0(node, IN_LAYER_CONSTRAINT, NONE_6); } else if (inLayerConstraint == BOTTOM_0) { $setProperty_0(node, LAYERING_LAYER_CONSTRAINT_0, LAST_SEPARATE_0); $setProperty_0(node, IN_LAYER_CONSTRAINT, NONE_6); } } function $transposeNodeLabelPlacement(shape_0){ var all, newPlacement, oldPlacement; if (!$hasProperty(shape_0, ($clinit_LayeredOptions() , NODE_LABELS_PLACEMENT_1))) { return; } oldPlacement = castTo($getProperty(shape_0, NODE_LABELS_PLACEMENT_1), 21); if (oldPlacement.isEmpty()) { return; } newPlacement = (all = castTo($getEnumConstants(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit), 9) , new EnumSet$EnumSetImpl(all, castTo(createFrom(all, all.length), 9), 0)); oldPlacement.contains(($clinit_NodeLabelPlacement() , INSIDE))?$add_5(newPlacement, INSIDE):$add_5(newPlacement, OUTSIDE); oldPlacement.contains(H_PRIORITY) || $add_5(newPlacement, H_PRIORITY); oldPlacement.contains(H_LEFT_0)?$add_5(newPlacement, V_TOP_0):oldPlacement.contains(H_CENTER_0)?$add_5(newPlacement, V_CENTER_0):oldPlacement.contains(H_RIGHT_0) && $add_5(newPlacement, V_BOTTOM_0); oldPlacement.contains(V_TOP_0)?$add_5(newPlacement, H_LEFT_0):oldPlacement.contains(V_CENTER_0)?$add_5(newPlacement, H_CENTER_0):oldPlacement.contains(V_BOTTOM_0) && $add_5(newPlacement, H_RIGHT_0); $setProperty_0(shape_0, NODE_LABELS_PLACEMENT_1, newPlacement); } function $transposePortSide(side){ switch (side.ordinal) { case 1: return $clinit_PortSide() , WEST_2; case 4: return $clinit_PortSide() , NORTH_3; case 3: return $clinit_PortSide() , EAST_2; case 2: return $clinit_PortSide() , SOUTH_2; default:return $clinit_PortSide() , UNDEFINED_5; } } function $transposeProperties(node){ var minSize, pos, tmp; minSize = castTo($getProperty(node, ($clinit_LayeredOptions() , NODE_SIZE_MINIMUM_0)), 8); $setProperty_0(node, NODE_SIZE_MINIMUM_0, new KVector_1(minSize.y_0, minSize.x_0)); switch (castTo($getProperty(node, ALIGNMENT), 255).ordinal) { case 1: $setProperty_0(node, ALIGNMENT, ($clinit_Alignment() , TOP_2)); break; case 2: $setProperty_0(node, ALIGNMENT, ($clinit_Alignment() , BOTTOM_1)); break; case 3: $setProperty_0(node, ALIGNMENT, ($clinit_Alignment() , LEFT_5)); break; case 4: $setProperty_0(node, ALIGNMENT, ($clinit_Alignment() , RIGHT_5)); } if ((!node.propertyMap?($clinit_Collections() , $clinit_Collections() , EMPTY_MAP):node.propertyMap).containsKey(POSITION)) { pos = castTo($getProperty(node, POSITION), 8); tmp = pos.x_0; pos.x_0 = pos.y_0; pos.y_0 = tmp; } } function GraphTransformer(themode){ this.mode = themode; } defineClass(803, 1, $intern_105, GraphTransformer); _.process = function process_10(layeredGraph, monitor){ $process_12(this, castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_GraphTransformer_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'GraphTransformer', 803); function $clinit_GraphTransformer$Mode(){ $clinit_GraphTransformer$Mode = emptyMethod; TO_INTERNAL_LTR = new GraphTransformer$Mode('TO_INTERNAL_LTR', 0); TO_INPUT_DIRECTION = new GraphTransformer$Mode('TO_INPUT_DIRECTION', 1); } function GraphTransformer$Mode(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_29(name_0){ $clinit_GraphTransformer$Mode(); return valueOf(($clinit_GraphTransformer$Mode$Map() , $MAP_19), name_0); } function values_37(){ $clinit_GraphTransformer$Mode(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_intermediate_GraphTransformer$Mode_2_classLit, 1), $intern_37, 517, 0, [TO_INTERNAL_LTR, TO_INPUT_DIRECTION]); } defineClass(517, 22, {3:1, 34:1, 22:1, 517:1}, GraphTransformer$Mode); var TO_INPUT_DIRECTION, TO_INTERNAL_LTR; var Lorg_eclipse_elk_alg_layered_intermediate_GraphTransformer$Mode_2_classLit = createForEnum('org.eclipse.elk.alg.layered.intermediate', 'GraphTransformer/Mode', 517, Ljava_lang_Enum_2_classLit, values_37, valueOf_29); function $clinit_GraphTransformer$Mode$Map(){ $clinit_GraphTransformer$Mode$Map = emptyMethod; $MAP_19 = createValueOfMap(($clinit_GraphTransformer$Mode() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_intermediate_GraphTransformer$Mode_2_classLit, 1), $intern_37, 517, 0, [TO_INTERNAL_LTR, TO_INPUT_DIRECTION]))); } var $MAP_19; function $graphLayoutToNode(node, lgraph){ var actualGraphSize, childNode, childNode$iterator, origin_0, port, portPosition; for (childNode$iterator = new ArrayList$1(lgraph.layerlessNodes); childNode$iterator.i < childNode$iterator.this$01.array.length;) { childNode = castTo($next_6(childNode$iterator), 10); origin_0 = $getProperty(childNode, ($clinit_InternalProperties_1() , ORIGIN_0)); if (instanceOf(origin_0, 12)) { port = castTo(origin_0, 12); portPosition = getExternalPortPosition(lgraph, childNode, port.size_0.x_0, port.size_0.y_0); port.pos.x_0 = portPosition.x_0; port.pos.y_0 = portPosition.y_0; $setSide(port, castTo($getProperty(childNode, EXT_PORT_SIDE), 64)); } } actualGraphSize = new KVector_1(lgraph.size_0.x_0 + lgraph.padding.left + lgraph.padding.right, lgraph.size_0.y_0 + lgraph.padding.top_0 + lgraph.padding.bottom); if (castTo($getProperty(lgraph, ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21).contains(($clinit_GraphProperties() , EXTERNAL_PORTS))) { $setProperty_0(node, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0), ($clinit_PortConstraints() , FIXED_POS)); castTo($getProperty($getGraph(node), GRAPH_PROPERTIES), 21).add_2(NON_FREE_PORTS); resizeNode(node, actualGraphSize, false); } else { resizeNode(node, actualGraphSize, true); } } function $process_13(graph, progressMonitor){ var layer, layer$iterator, node, node$iterator; progressMonitor.begin('Resize child graph to fit parent.', 1); for (layer$iterator = new ArrayList$1(graph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); $addAll_2(graph.layerlessNodes, layer.nodes); layer.nodes.array.length = 0; } for (node$iterator = new ArrayList$1(graph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); $setLayer_0(node, null); } graph.layers.array.length = 0; $resizeGraph_0(graph); !!graph.parentNode && $graphLayoutToNode(graph.parentNode, graph); progressMonitor.done_1(); } function $resizeGraph_0(lgraph){ var adjustedSize, calculatedSize, minSize, sizeConstraint, sizeOptions; sizeConstraint = castTo($getProperty(lgraph, ($clinit_LayeredOptions() , NODE_SIZE_CONSTRAINTS_1)), 21); sizeOptions = castTo($getProperty(lgraph, NODE_SIZE_OPTIONS_1), 21); calculatedSize = new KVector_1(lgraph.size_0.x_0 + lgraph.padding.left + lgraph.padding.right, lgraph.size_0.y_0 + lgraph.padding.top_0 + lgraph.padding.bottom); adjustedSize = new KVector_2(calculatedSize); if (sizeConstraint.contains(($clinit_SizeConstraint() , MINIMUM_SIZE))) { minSize = castTo($getProperty(lgraph, NODE_SIZE_MINIMUM_0), 8); if (sizeOptions.contains(($clinit_SizeOptions() , DEFAULT_MINIMUM_SIZE))) { minSize.x_0 <= 0 && (minSize.x_0 = 20); minSize.y_0 <= 0 && (minSize.y_0 = 20); } adjustedSize.x_0 = $wnd.Math.max(calculatedSize.x_0, minSize.x_0); adjustedSize.y_0 = $wnd.Math.max(calculatedSize.y_0, minSize.y_0); } $resizeGraphNoReallyIMeanIt_0(lgraph, calculatedSize, adjustedSize); } function $resizeGraphNoReallyIMeanIt_0(lgraph, oldSize, newSize){ var contentAlignment, extPortSide, node, node$iterator, padding; contentAlignment = castTo($getProperty(lgraph, ($clinit_LayeredOptions() , CONTENT_ALIGNMENT)), 21); newSize.x_0 > oldSize.x_0 && (contentAlignment.contains(($clinit_ContentAlignment() , H_CENTER))?(lgraph.offset.x_0 += (newSize.x_0 - oldSize.x_0) / 2):contentAlignment.contains(H_RIGHT) && (lgraph.offset.x_0 += newSize.x_0 - oldSize.x_0)); newSize.y_0 > oldSize.y_0 && (contentAlignment.contains(($clinit_ContentAlignment() , V_CENTER))?(lgraph.offset.y_0 += (newSize.y_0 - oldSize.y_0) / 2):contentAlignment.contains(V_BOTTOM) && (lgraph.offset.y_0 += newSize.y_0 - oldSize.y_0)); if (castTo($getProperty(lgraph, ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21).contains(($clinit_GraphProperties() , EXTERNAL_PORTS)) && (newSize.x_0 > oldSize.x_0 || newSize.y_0 > oldSize.y_0)) { for (node$iterator = new ArrayList$1(lgraph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (node.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { extPortSide = castTo($getProperty(node, EXT_PORT_SIDE), 64); extPortSide == ($clinit_PortSide() , EAST_2)?(node.pos.x_0 += newSize.x_0 - oldSize.x_0):extPortSide == SOUTH_2 && (node.pos.y_0 += newSize.y_0 - oldSize.y_0); } } } padding = lgraph.padding; lgraph.size_0.x_0 = newSize.x_0 - padding.left - padding.right; lgraph.size_0.y_0 = newSize.y_0 - padding.top_0 - padding.bottom; } function HierarchicalNodeResizingProcessor(){ } defineClass(1575, 1, $intern_105, HierarchicalNodeResizingProcessor); _.process = function process_11(graph, progressMonitor){ $process_13(castTo(graph, 36), progressMonitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_HierarchicalNodeResizingProcessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'HierarchicalNodeResizingProcessor', 1575); function $createDummy(layeredGraph, originalDummy){ var inputPort, newDummy, outputPort; newDummy = new LNode(layeredGraph); $copyProperties(newDummy, originalDummy); $setProperty_0(newDummy, ($clinit_InternalProperties_1() , EXT_PORT_REPLACED_DUMMY), originalDummy); $setProperty_0(newDummy, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0), ($clinit_PortConstraints() , FIXED_POS)); $setProperty_0(newDummy, ALIGNMENT, ($clinit_Alignment() , CENTER_4)); $setType(newDummy, ($clinit_LNode$NodeType() , EXTERNAL_PORT)); inputPort = new LPort; $setNode(inputPort, newDummy); $setSide(inputPort, ($clinit_PortSide() , WEST_2)); outputPort = new LPort; $setNode(outputPort, newDummy); $setSide(outputPort, EAST_2); return newDummy; } function $isNorthernOrSouthernDummy(node){ var nodeType, portSide; nodeType = node.type_0; if (nodeType == ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { portSide = castTo($getProperty(node, ($clinit_InternalProperties_1() , EXT_PORT_SIDE)), 64); return portSide == ($clinit_PortSide() , NORTH_3) || portSide == SOUTH_2; } return false; } function $process_14(layeredGraph, monitor){ monitor.begin('Hierarchical port constraint processing', 1); $processEasternAndWesternPortDummies(layeredGraph); $processNorthernAndSouthernPortDummies(layeredGraph); monitor.done_1(); } function $processEasternAndWesternPortDummies(layeredGraph){ var layers; if (!$isOrderFixed(castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101))) { return; } layers = layeredGraph.layers; $processEasternAndWesternPortDummies_0((checkCriticalElementIndex(0, layers.array.length) , castTo(layers.array[0], 30))); $processEasternAndWesternPortDummies_0(castTo($get_11(layers, layers.array.length - 1), 30)); } function $processEasternAndWesternPortDummies_0(layer){ var externalPortSide, lastHierarchicalDummy, node, node$array, node$index, node$max, nodes; nodes = toNodeArray(layer.nodes); sort_5(nodes, new HierarchicalPortConstraintProcessor$NodeComparator); lastHierarchicalDummy = null; for (node$array = nodes , node$index = 0 , node$max = node$array.length; node$index < node$max; ++node$index) { node = node$array[node$index]; if (node.type_0 != ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { break; } externalPortSide = castTo($getProperty(node, ($clinit_InternalProperties_1() , EXT_PORT_SIDE)), 64); if (externalPortSide != ($clinit_PortSide() , WEST_2) && externalPortSide != EAST_2) { continue; } !!lastHierarchicalDummy && castTo($getProperty(lastHierarchicalDummy, IN_LAYER_SUCCESSOR_CONSTRAINTS), 15).add_2(node); lastHierarchicalDummy = node; } } function $processNorthernAndSouthernPortDummies(layeredGraph){ var currLayerIdx, currentLayer, currentNode, currentNode$iterator, dummy, dummy$iterator, edge, edge$iterator, edge$iterator0, extPortToDummyNodeMap, i, layer, layerCount, layers, newDummyNodes, nextExtPortToDummyNodesMap, nextLayerDummy, nextNewDummyNodes, nodeList, originalDummy, originalDummy$iterator, originalExternalPortDummies, portConstraints, prevExtPortToDummyNodesMap, prevLayerDummy, prevNewDummyNodes, sourceNode, targetNode; portConstraints = castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101); if (!(portConstraints != ($clinit_PortConstraints() , FREE) && portConstraints != UNDEFINED_4)) { return; } layers = layeredGraph.layers; layerCount = layers.array.length; extPortToDummyNodeMap = new ArrayList_0((checkNonnegative(layerCount + 2, 'arraySize') , saturatedCast(add_20(add_20(5, layerCount + 2), (layerCount + 2) / 10 | 0)))); newDummyNodes = new ArrayList_0((checkNonnegative(layerCount + 2, 'arraySize') , saturatedCast(add_20(add_20(5, layerCount + 2), (layerCount + 2) / 10 | 0)))); $add_3(extPortToDummyNodeMap, new HashMap); $add_3(extPortToDummyNodeMap, new HashMap); $add_3(newDummyNodes, new ArrayList); $add_3(newDummyNodes, new ArrayList); originalExternalPortDummies = new ArrayList; for (currLayerIdx = 0; currLayerIdx < layerCount; currLayerIdx++) { currentLayer = (checkCriticalElementIndex(currLayerIdx, layers.array.length) , castTo(layers.array[currLayerIdx], 30)); prevExtPortToDummyNodesMap = (checkCriticalElementIndex(currLayerIdx, extPortToDummyNodeMap.array.length) , castTo(extPortToDummyNodeMap.array[currLayerIdx], 85)); nextExtPortToDummyNodesMap = new HashMap; push_1(extPortToDummyNodeMap.array, nextExtPortToDummyNodesMap); prevNewDummyNodes = (checkCriticalElementIndex(currLayerIdx, newDummyNodes.array.length) , castTo(newDummyNodes.array[currLayerIdx], 15)); nextNewDummyNodes = new ArrayList; push_1(newDummyNodes.array, nextNewDummyNodes); for (currentNode$iterator = new ArrayList$1(currentLayer.nodes); currentNode$iterator.i < currentNode$iterator.this$01.array.length;) { currentNode = castTo($next_6(currentNode$iterator), 10); if ($isNorthernOrSouthernDummy(currentNode)) { push_1(originalExternalPortDummies.array, currentNode); continue; } for (edge$iterator0 = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(currentNode).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator0);) { edge = castTo($next_0(edge$iterator0), 18); sourceNode = edge.source.owner; if (!$isNorthernOrSouthernDummy(sourceNode)) { continue; } prevLayerDummy = castTo(prevExtPortToDummyNodesMap.get_3($getProperty(sourceNode, ($clinit_InternalProperties_1() , ORIGIN_0))), 10); if (!prevLayerDummy) { prevLayerDummy = $createDummy(layeredGraph, sourceNode); prevExtPortToDummyNodesMap.put($getProperty(sourceNode, ORIGIN_0), prevLayerDummy); prevNewDummyNodes.add_2(prevLayerDummy); } $setSource_0(edge, castTo($get_11(prevLayerDummy.ports, 1), 12)); } for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(currentNode).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); targetNode = edge.target.owner; if (!$isNorthernOrSouthernDummy(targetNode)) { continue; } nextLayerDummy = castTo($get_10(nextExtPortToDummyNodesMap, $getProperty(targetNode, ($clinit_InternalProperties_1() , ORIGIN_0))), 10); if (!nextLayerDummy) { nextLayerDummy = $createDummy(layeredGraph, targetNode); $put_6(nextExtPortToDummyNodesMap, $getProperty(targetNode, ORIGIN_0), nextLayerDummy); push_1(nextNewDummyNodes.array, nextLayerDummy); } $setTarget_0(edge, castTo($get_11(nextLayerDummy.ports, 0), 12)); } } } for (i = 0; i < newDummyNodes.array.length; i++) { nodeList = (checkCriticalElementIndex(i, newDummyNodes.array.length) , castTo(newDummyNodes.array[i], 15)); if (nodeList.isEmpty()) { continue; } layer = null; if (i == 0) { layer = new Layer(layeredGraph); checkCriticalPositionIndex(0, layers.array.length); insertTo(layers.array, 0, layer); } else if (i == extPortToDummyNodeMap.array.length - 1) { layer = new Layer(layeredGraph); push_1(layers.array, layer); } else { layer = (checkCriticalElementIndex(i - 1, layers.array.length) , castTo(layers.array[i - 1], 30)); } for (dummy$iterator = nodeList.iterator_0(); dummy$iterator.hasNext_0();) { dummy = castTo(dummy$iterator.next_1(), 10); $setLayer_0(dummy, layer); } } for (originalDummy$iterator = new ArrayList$1(originalExternalPortDummies); originalDummy$iterator.i < originalDummy$iterator.this$01.array.length;) { originalDummy = castTo($next_6(originalDummy$iterator), 10); $setLayer_0(originalDummy, null); } $setProperty_0(layeredGraph, ($clinit_InternalProperties_1() , EXT_PORT_REPLACED_DUMMIES), originalExternalPortDummies); } function HierarchicalPortConstraintProcessor(){ } defineClass(1576, 1, $intern_105, HierarchicalPortConstraintProcessor); _.process = function process_12(layeredGraph, monitor){ $process_14(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_HierarchicalPortConstraintProcessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'HierarchicalPortConstraintProcessor', 1576); function $compare_12(node1, node2){ var nodePos1, nodePos2, nodeType1, nodeType2; nodeType1 = node1.type_0; nodePos1 = $doubleValue(castToDouble($getProperty(node1, ($clinit_InternalProperties_1() , PORT_RATIO_OR_POSITION_0)))); nodeType2 = node2.type_0; nodePos2 = $doubleValue(castToDouble($getProperty(node2, PORT_RATIO_OR_POSITION_0))); return nodeType2 != ($clinit_LNode$NodeType() , EXTERNAL_PORT)?-1:nodeType1 != EXTERNAL_PORT?1:nodePos1 == nodePos2?0:nodePos1 < nodePos2?-1:1; } function HierarchicalPortConstraintProcessor$NodeComparator(){ } defineClass(1577, 1, $intern_88, HierarchicalPortConstraintProcessor$NodeComparator); _.compare_1 = function compare_43(node1, node2){ return $compare_12(castTo(node1, 10), castTo(node2, 10)); } ; _.equals_0 = function equals_107(other){ return this === other; } ; _.reversed = function reversed_35(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_HierarchicalPortConstraintProcessor$NodeComparator_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'HierarchicalPortConstraintProcessor/NodeComparator', 1577); function $process_15(layeredGraph, monitor){ var delta, edgeSpacing, layer, layer$iterator, node, node$iterator, northernDummies, side, southernDummies; monitor.begin('Hierarchical port dummy size processing', 1); northernDummies = new ArrayList; southernDummies = new ArrayList; edgeSpacing = $doubleValue(castToDouble($getProperty(layeredGraph, ($clinit_LayeredOptions() , SPACING_EDGE_EDGE_BETWEEN_LAYERS_0)))); delta = edgeSpacing * 2; for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); northernDummies.array.length = 0; southernDummies.array.length = 0; for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (node.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { side = castTo($getProperty(node, ($clinit_InternalProperties_1() , EXT_PORT_SIDE)), 64); side == ($clinit_PortSide() , NORTH_3)?(push_1(northernDummies.array, node) , true):side == SOUTH_2 && (push_1(southernDummies.array, node) , true); } } $setWidths(northernDummies, true, delta); $setWidths(southernDummies, false, delta); } monitor.done_1(); } function $setWidths(nodes, topDown, delta){ var currentWidth, node, node$iterator, port, port$iterator, step; currentWidth = 0; step = delta; if (!topDown) { currentWidth = delta * (nodes.array.length - 1); step *= -1; } for (node$iterator = new ArrayList$1(nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); $setProperty_0(node, ($clinit_LayeredOptions() , ALIGNMENT), ($clinit_Alignment() , CENTER_4)); node.size_0.x_0 = currentWidth; for (port$iterator = $getPorts_1(node, ($clinit_PortSide() , EAST_2)).iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); port.pos.x_0 = currentWidth; } currentWidth += step; } } function HierarchicalPortDummySizeProcessor(){ } defineClass(1578, 1, $intern_105, HierarchicalPortDummySizeProcessor); _.process = function process_13(layeredGraph, monitor){ $process_15(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_HierarchicalPortDummySizeProcessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'HierarchicalPortDummySizeProcessor', 1578); function $assignAscendingCoordinates(dummies, graph){ var currentMargin, currentPosition, currentSize, delta, graphSize, index_0, nextValidCoordinate, spacing; spacing = $doubleValue(castToDouble($getProperty(graph, ($clinit_LayeredOptions() , SPACING_PORT_PORT)))); nextValidCoordinate = dummies[0].pos.x_0 + dummies[0].size_0.x_0 + dummies[0].margin.right + spacing; for (index_0 = 1; index_0 < dummies.length; index_0++) { currentPosition = dummies[index_0].pos; currentSize = dummies[index_0].size_0; currentMargin = dummies[index_0].margin; delta = currentPosition.x_0 - currentMargin.left - nextValidCoordinate; delta < 0 && (currentPosition.x_0 -= delta); graphSize = graph.size_0; graphSize.x_0 = $wnd.Math.max(graphSize.x_0, currentPosition.x_0 + currentSize.x_0); nextValidCoordinate = currentPosition.x_0 + currentSize.x_0 + currentMargin.right + spacing; } } function $calculateNorthSouthDummyPositions(dummy){ var anchor, connectedPort, connectedPort$iterator, dummyInPort, offset, posSum; dummyInPort = castTo($get_11(dummy.ports, 0), 12); if (dummyInPort.incomingEdges.array.length + dummyInPort.outgoingEdges.array.length == 0) { dummy.pos.x_0 = 0; } else { posSum = 0; for (connectedPort$iterator = $iterator(concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [new LPort$1(dummyInPort), new LPort$2(dummyInPort)]))); $hasNext_1(connectedPort$iterator);) { connectedPort = castTo($next_0(connectedPort$iterator), 12); posSum += connectedPort.owner.pos.x_0 + connectedPort.pos.x_0 + connectedPort.anchor.x_0; } anchor = castTo($getProperty(dummy, ($clinit_LayeredOptions() , PORT_ANCHOR)), 8); offset = !anchor?0:anchor.x_0; dummy.pos.x_0 = posSum / (dummyInPort.incomingEdges.array.length + dummyInPort.outgoingEdges.array.length) - offset; } } function $correctSlantedEdgeSegments(layer){ var bendPoints, edge, edge$iterator, extPortSide, firstBendPoint, lastBendPoint, node, node$iterator, sourcePort, targetPort; for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (node.type_0 != ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { continue; } extPortSide = castTo($getProperty(node, ($clinit_InternalProperties_1() , EXT_PORT_SIDE)), 64); if (extPortSide == ($clinit_PortSide() , EAST_2) || extPortSide == WEST_2) { for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getConnectedEdges_0(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); bendPoints = edge.bendPoints; if (bendPoints.size_0 == 0) { continue; } sourcePort = edge.source; if (sourcePort.owner == node) { firstBendPoint = (checkCriticalElement(bendPoints.size_0 != 0) , castTo(bendPoints.header.next_0.value_0, 8)); firstBendPoint.y_0 = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [sourcePort.owner.pos, sourcePort.pos, sourcePort.anchor])).y_0; } targetPort = edge.target; if (targetPort.owner == node) { lastBendPoint = (checkCriticalElement(bendPoints.size_0 != 0) , castTo(bendPoints.tail.prev.value_0, 8)); lastBendPoint.y_0 = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [targetPort.owner.pos, targetPort.pos, targetPort.anchor])).y_0; } } } } } function $ensureUniquePositions(dummies, graph){ var dummyArray; if (dummies.array.length == 0) { return; } dummyArray = castTo($toArray_1(dummies, initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LNode_2_classLit, $intern_107, 10, dummies.array.length, 0, 1)), 199); sort_5(dummyArray, new HierarchicalPortOrthogonalEdgeRouter$1); $assignAscendingCoordinates(dummyArray, graph); } function $fixCoordinates(layer, constraints, graph){ var extPortSide, extPortSize, graphActualSize, newActualGraphHeight, node, node$iterator, node$iterator0, nodePosition, offset, padding, ratio, requiredActualGraphHeight; padding = graph.padding; offset = graph.offset; graphActualSize = new KVector_1(graph.size_0.x_0 + graph.padding.left + graph.padding.right, graph.size_0.y_0 + graph.padding.top_0 + graph.padding.bottom); newActualGraphHeight = graphActualSize.y_0; for (node$iterator0 = new ArrayList$1(layer.nodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); if (node.type_0 != ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { continue; } extPortSide = castTo($getProperty(node, ($clinit_InternalProperties_1() , EXT_PORT_SIDE)), 64); extPortSize = castTo($getProperty(node, EXT_PORT_SIZE), 8); nodePosition = node.pos; switch (extPortSide.ordinal) { case 2: nodePosition.x_0 = graph.size_0.x_0 + padding.right - offset.x_0; break; case 4: nodePosition.x_0 = -offset.x_0 - padding.left; } requiredActualGraphHeight = 0; switch (extPortSide.ordinal) { case 2: case 4: if (constraints == ($clinit_PortConstraints() , FIXED_RATIO)) { ratio = $doubleValue(castToDouble($getProperty(node, PORT_RATIO_OR_POSITION_0))); nodePosition.y_0 = graphActualSize.y_0 * ratio - castTo($getProperty(node, ($clinit_LayeredOptions() , PORT_ANCHOR)), 8).y_0; requiredActualGraphHeight = nodePosition.y_0 + extPortSize.y_0; $borderToContentAreaCoordinates(node, false, true); } else if (constraints == FIXED_POS) { nodePosition.y_0 = $doubleValue(castToDouble($getProperty(node, PORT_RATIO_OR_POSITION_0))) - castTo($getProperty(node, ($clinit_LayeredOptions() , PORT_ANCHOR)), 8).y_0; requiredActualGraphHeight = nodePosition.y_0 + extPortSize.y_0; $borderToContentAreaCoordinates(node, false, true); } } newActualGraphHeight = $wnd.Math.max(newActualGraphHeight, requiredActualGraphHeight); } graph.size_0.y_0 += newActualGraphHeight - graphActualSize.y_0; for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (node.type_0 != ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { continue; } extPortSide = castTo($getProperty(node, ($clinit_InternalProperties_1() , EXT_PORT_SIDE)), 64); nodePosition = node.pos; switch (extPortSide.ordinal) { case 1: nodePosition.y_0 = -offset.y_0 - padding.top_0; break; case 3: nodePosition.y_0 = graph.size_0.y_0 + padding.bottom - offset.y_0; } } } function $process_16(this$static, layeredGraph, monitor){ var northSouthDummies, constraints, layers, layers_0; monitor.begin('Orthogonally routing hierarchical port edges', 1); this$static.northernExtPortEdgeRoutingHeight = 0; northSouthDummies = $restoreNorthSouthDummies(layeredGraph); $setNorthSouthDummyCoordinates(layeredGraph, northSouthDummies); $routeEdges(this$static, layeredGraph, northSouthDummies); $removeTemporaryNorthSouthDummies(layeredGraph); constraints = castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101); layers = layeredGraph.layers; $fixCoordinates((checkCriticalElementIndex(0, layers.array.length) , castTo(layers.array[0], 30)), constraints, layeredGraph); $fixCoordinates(castTo($get_11(layers, layers.array.length - 1), 30), constraints, layeredGraph); layers_0 = layeredGraph.layers; $correctSlantedEdgeSegments((checkCriticalElementIndex(0, layers_0.array.length) , castTo(layers_0.array[0], 30))); $correctSlantedEdgeSegments(castTo($get_11(layers_0, layers_0.array.length - 1), 30)); monitor.done_1(); } function $removeTemporaryNorthSouthDummies(layeredGraph){ var edge, edge$array, edge$array0, edge$index, edge$index0, edge$max, edge$max0, edges, firstBendPoint, incomingEdgeBendPoints, iter, lastBendPoint, layer, layer$iterator, node, node$iterator, node$iterator0, nodeInPort, nodeOriginPort, nodeOutPort, nodeToOriginEdge, nodesToRemove, outgoingEdgeBendPoints, port, port$iterator, replacedDummy, replacedDummyPort; nodesToRemove = new ArrayList; for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); for (node$iterator0 = new ArrayList$1(layer.nodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); if (node.type_0 != ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { continue; } if (!$hasProperty(node, ($clinit_InternalProperties_1() , EXT_PORT_REPLACED_DUMMY))) { continue; } nodeInPort = null; nodeOutPort = null; nodeOriginPort = null; for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); switch (port.side.ordinal) { case 4: nodeInPort = port; break; case 2: nodeOutPort = port; break; default:nodeOriginPort = port; } } nodeToOriginEdge = castTo($get_11(nodeOriginPort.outgoingEdges, 0), 18); incomingEdgeBendPoints = new KVectorChain_0(nodeToOriginEdge.bendPoints); firstBendPoint = new KVector_2(nodeOriginPort.pos); $add_19(firstBendPoint, node.pos); iter = $listIterator_2(incomingEdgeBendPoints, 0); $add_8(iter, firstBendPoint); outgoingEdgeBendPoints = reverse_3(nodeToOriginEdge.bendPoints); lastBendPoint = new KVector_2(nodeOriginPort.pos); $add_19(lastBendPoint, node.pos); $addNode_0(outgoingEdgeBendPoints, lastBendPoint, outgoingEdgeBendPoints.tail.prev, outgoingEdgeBendPoints.tail); replacedDummy = castTo($getProperty(node, EXT_PORT_REPLACED_DUMMY), 10); replacedDummyPort = castTo($get_11(replacedDummy.ports, 0), 12); edges = castTo($toArray_1(nodeInPort.incomingEdges, initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LEdge_2_classLit, $intern_106, 18, 0, 0, 1)), 483); for (edge$array0 = edges , edge$index0 = 0 , edge$max0 = edge$array0.length; edge$index0 < edge$max0; ++edge$index0) { edge = edge$array0[edge$index0]; $setTarget_0(edge, replacedDummyPort); $addAllAsCopies(edge.bendPoints, edge.bendPoints.size_0, incomingEdgeBendPoints); } edges = toEdgeArray(nodeOutPort.outgoingEdges); for (edge$array = edges , edge$index = 0 , edge$max = edge$array.length; edge$index < edge$max; ++edge$index) { edge = edge$array[edge$index]; $setSource_0(edge, replacedDummyPort); $addAllAsCopies(edge.bendPoints, 0, outgoingEdgeBendPoints); } $setSource_0(nodeToOriginEdge, null); $setTarget_0(nodeToOriginEdge, null); push_1(nodesToRemove.array, node); } } for (node$iterator = new ArrayList$1(nodesToRemove); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); $setLayer_0(node, null); } } function $restoreDummy(dummy, graph){ var currentY, dummyPort, label_0, label$iterator, labelLabelSpacing, portLabelPlacement, portLabelSpacingHorizontal, portLabelSpacingVertical, portSide, xCenterRelativeToPort; portSide = castTo($getProperty(dummy, ($clinit_InternalProperties_1() , EXT_PORT_SIDE)), 64); dummyPort = castTo($get_11(dummy.ports, 0), 12); portSide == ($clinit_PortSide() , NORTH_3)?$setSide(dummyPort, SOUTH_2):portSide == SOUTH_2 && $setSide(dummyPort, NORTH_3); if (castTo($getProperty(graph, ($clinit_LayeredOptions() , NODE_SIZE_CONSTRAINTS_1)), 181).contains(($clinit_SizeConstraint() , PORT_LABELS))) { portLabelSpacingHorizontal = $doubleValue(castToDouble($getProperty(dummy, SPACING_LABEL_PORT_HORIZONTAL))); portLabelSpacingVertical = $doubleValue(castToDouble($getProperty(dummy, SPACING_LABEL_PORT_VERTICAL))); labelLabelSpacing = $doubleValue(castToDouble($getProperty(dummy, SPACING_LABEL_LABEL))); portLabelPlacement = castTo($getProperty(graph, PORT_LABELS_PLACEMENT_1), 21); if (portLabelPlacement.contains(($clinit_PortLabelPlacement() , INSIDE_0))) { currentY = portLabelSpacingVertical; xCenterRelativeToPort = dummy.size_0.x_0 / 2 - dummyPort.pos.x_0; for (label$iterator = new ArrayList$1(dummyPort.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 72); label_0.pos.y_0 = currentY; label_0.pos.x_0 = xCenterRelativeToPort - label_0.size_0.x_0 / 2; currentY += label_0.size_0.y_0 + labelLabelSpacing; } } else if (portLabelPlacement.contains(OUTSIDE_0)) { for (label$iterator = new ArrayList$1(dummyPort.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 72); label_0.pos.x_0 = portLabelSpacingHorizontal + dummy.size_0.x_0 - dummyPort.pos.x_0; } } $processNode(new NodeMarginCalculator(($clinit_LGraphAdapters() , new LGraphAdapters$LGraphAdapter(graph, false, false, new LGraphAdapters$lambda$0$Type))), new LGraphAdapters$LNodeAdapter(null, dummy, false)); } } function $restoreNorthSouthDummies(layeredGraph){ var dummy, dummy$iterator, dummy$iterator0, layer, layer$iterator, node, node$iterator, replacedDummy, restoredDummies, outPort, extPortSide, inPort, edge; restoredDummies = new ArrayList; if (!$hasProperty(layeredGraph, ($clinit_InternalProperties_1() , EXT_PORT_REPLACED_DUMMIES))) { return restoredDummies; } for (dummy$iterator0 = castTo($getProperty(layeredGraph, EXT_PORT_REPLACED_DUMMIES), 15).iterator_0(); dummy$iterator0.hasNext_0();) { dummy = castTo(dummy$iterator0.next_1(), 10); $restoreDummy(dummy, layeredGraph); push_1(restoredDummies.array, dummy); } for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (node.type_0 != ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { continue; } replacedDummy = castTo($getProperty(node, EXT_PORT_REPLACED_DUMMY), 10); !!replacedDummy && (outPort = new LPort , $setNode(outPort, node) , extPortSide = castTo($getProperty(node, EXT_PORT_SIDE), 64) , $setSide(outPort, extPortSide) , inPort = castTo($get_11(replacedDummy.ports, 0), 12) , edge = new LEdge , $setSource_0(edge, outPort) , $setTarget_0(edge, inPort) , undefined); } } for (dummy$iterator = new ArrayList$1(restoredDummies); dummy$iterator.i < dummy$iterator.this$01.array.length;) { dummy = castTo($next_6(dummy$iterator), 10); $setLayer_0(dummy, castTo($get_11(layeredGraph.layers, layeredGraph.layers.array.length - 1), 30)); } return restoredDummies; } function $restoreProperOrder(dummies, graph){ var dummyArray; if (dummies.array.length == 0) { return; } dummyArray = castTo($toArray_1(dummies, initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LNode_2_classLit, $intern_107, 10, dummies.array.length, 0, 1)), 199); sort_5(dummyArray, new HierarchicalPortOrthogonalEdgeRouter$2); $assignAscendingCoordinates(dummyArray, graph); } function $routeEdges(this$static, layeredGraph, northSouthDummies){ var edge, edge$iterator, edgeSpacing, hierarchicalPortDummy, hierarchicalPortDummy$iterator, nodeSpacing, northernSourceLayer, northernTargetLayer, portSide, routingGenerator, slots, southernSourceLayer, southernTargetLayer; northernSourceLayer = new LinkedHashSet; northernTargetLayer = new LinkedHashSet; southernSourceLayer = new LinkedHashSet; southernTargetLayer = new LinkedHashSet; nodeSpacing = $doubleValue(castToDouble($getProperty(layeredGraph, ($clinit_LayeredOptions() , SPACING_NODE_NODE_0)))); edgeSpacing = $doubleValue(castToDouble($getProperty(layeredGraph, SPACING_EDGE_EDGE))); for (hierarchicalPortDummy$iterator = new ArrayList$1(northSouthDummies); hierarchicalPortDummy$iterator.i < hierarchicalPortDummy$iterator.this$01.array.length;) { hierarchicalPortDummy = castTo($next_6(hierarchicalPortDummy$iterator), 10); portSide = castTo($getProperty(hierarchicalPortDummy, ($clinit_InternalProperties_1() , EXT_PORT_SIDE)), 64); if (portSide == ($clinit_PortSide() , NORTH_3)) { northernTargetLayer.map_0.put(hierarchicalPortDummy, northernTargetLayer); for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(hierarchicalPortDummy).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); $add_6(northernSourceLayer, edge.source.owner); } } else if (portSide == SOUTH_2) { southernTargetLayer.map_0.put(hierarchicalPortDummy, southernTargetLayer); for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(hierarchicalPortDummy).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); $add_6(southernSourceLayer, edge.source.owner); } } } if (northernSourceLayer.map_0.size_1() != 0) { routingGenerator = new OrthogonalRoutingGenerator(2, edgeSpacing); slots = $routeEdges_0(routingGenerator, layeredGraph, northernSourceLayer, northernTargetLayer, -nodeSpacing - layeredGraph.offset.y_0); if (slots > 0) { this$static.northernExtPortEdgeRoutingHeight = nodeSpacing + (slots - 1) * edgeSpacing; layeredGraph.offset.y_0 += this$static.northernExtPortEdgeRoutingHeight; layeredGraph.size_0.y_0 += this$static.northernExtPortEdgeRoutingHeight; } } if (southernSourceLayer.map_0.size_1() != 0) { routingGenerator = new OrthogonalRoutingGenerator(1, edgeSpacing); slots = $routeEdges_0(routingGenerator, layeredGraph, southernSourceLayer, southernTargetLayer, layeredGraph.size_0.y_0 + nodeSpacing - layeredGraph.offset.y_0); slots > 0 && (layeredGraph.size_0.y_0 += nodeSpacing + (slots - 1) * edgeSpacing); } } function $setNorthSouthDummyCoordinates(layeredGraph, northSouthDummies){ var constraints, dummy, dummy$iterator, graphPadding, graphSize, graphWidth, northY, northernDummies, southY, southernDummies, anchor, offset, anchor_0, offset_0; constraints = castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101); graphSize = layeredGraph.size_0; graphPadding = layeredGraph.padding; graphWidth = graphSize.x_0 + graphPadding.left + graphPadding.right; northY = 0 - graphPadding.top_0 - layeredGraph.offset.y_0; southY = graphSize.y_0 + graphPadding.top_0 + graphPadding.bottom - layeredGraph.offset.y_0; northernDummies = new ArrayList; southernDummies = new ArrayList; for (dummy$iterator = new ArrayList$1(northSouthDummies); dummy$iterator.i < dummy$iterator.this$01.array.length;) { dummy = castTo($next_6(dummy$iterator), 10); switch (constraints.ordinal) { case 1: case 2: case 3: $calculateNorthSouthDummyPositions(dummy); break; case 4: anchor = castTo($getProperty(dummy, PORT_ANCHOR), 8); offset = !anchor?0:anchor.x_0; dummy.pos.x_0 = graphWidth * $doubleValue(castToDouble($getProperty(dummy, ($clinit_InternalProperties_1() , PORT_RATIO_OR_POSITION_0)))) - offset; $borderToContentAreaCoordinates(dummy, true, false); break; case 5: anchor_0 = castTo($getProperty(dummy, PORT_ANCHOR), 8); offset_0 = !anchor_0?0:anchor_0.x_0; dummy.pos.x_0 = $doubleValue(castToDouble($getProperty(dummy, ($clinit_InternalProperties_1() , PORT_RATIO_OR_POSITION_0)))) - offset_0; $borderToContentAreaCoordinates(dummy, true, false); graphSize.x_0 = $wnd.Math.max(graphSize.x_0, dummy.pos.x_0 + dummy.size_0.x_0 / 2); } switch (castTo($getProperty(dummy, ($clinit_InternalProperties_1() , EXT_PORT_SIDE)), 64).ordinal) { case 1: dummy.pos.y_0 = northY; push_1(northernDummies.array, dummy); break; case 3: dummy.pos.y_0 = southY; push_1(southernDummies.array, dummy); } } switch (constraints.ordinal) { case 1: case 2: $ensureUniquePositions(northernDummies, layeredGraph); $ensureUniquePositions(southernDummies, layeredGraph); break; case 3: $restoreProperOrder(northernDummies, layeredGraph); $restoreProperOrder(southernDummies, layeredGraph); } } function HierarchicalPortOrthogonalEdgeRouter(){ } defineClass(1579, 1, $intern_105, HierarchicalPortOrthogonalEdgeRouter); _.process = function process_14(layeredGraph, monitor){ $process_16(this, castTo(layeredGraph, 36), monitor); } ; _.northernExtPortEdgeRoutingHeight = 0; var Lorg_eclipse_elk_alg_layered_intermediate_HierarchicalPortOrthogonalEdgeRouter_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'HierarchicalPortOrthogonalEdgeRouter', 1579); function $compare_13(a, b){ return compare_4(a.pos.x_0, b.pos.x_0); } function HierarchicalPortOrthogonalEdgeRouter$1(){ } defineClass(1580, 1, $intern_88, HierarchicalPortOrthogonalEdgeRouter$1); _.compare_1 = function compare_44(a, b){ return $compare_13(castTo(a, 10), castTo(b, 10)); } ; _.equals_0 = function equals_108(other){ return this === other; } ; _.reversed = function reversed_36(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_HierarchicalPortOrthogonalEdgeRouter$1_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'HierarchicalPortOrthogonalEdgeRouter/1', 1580); function $compare_14(a, b){ return compare_4($doubleValue(castToDouble($getProperty(a, ($clinit_InternalProperties_1() , PORT_RATIO_OR_POSITION_0)))), $doubleValue(castToDouble($getProperty(b, PORT_RATIO_OR_POSITION_0)))); } function HierarchicalPortOrthogonalEdgeRouter$2(){ } defineClass(1581, 1, $intern_88, HierarchicalPortOrthogonalEdgeRouter$2); _.compare_1 = function compare_45(a, b){ return $compare_14(castTo(a, 10), castTo(b, 10)); } ; _.equals_0 = function equals_109(other){ return this === other; } ; _.reversed = function reversed_37(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_HierarchicalPortOrthogonalEdgeRouter$2_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'HierarchicalPortOrthogonalEdgeRouter/2', 1581); function $fixCoordinates_0(layer, layeredGraph){ var extPortSide, finalYCoordinate, graphHeight, node, node$iterator, portConstraints; portConstraints = castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101); if (!(portConstraints == ($clinit_PortConstraints() , FIXED_RATIO) || portConstraints == FIXED_POS)) { return; } graphHeight = (new KVector_1(layeredGraph.size_0.x_0 + layeredGraph.padding.left + layeredGraph.padding.right, layeredGraph.size_0.y_0 + layeredGraph.padding.top_0 + layeredGraph.padding.bottom)).y_0; for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (node.type_0 != ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { continue; } extPortSide = castTo($getProperty(node, ($clinit_InternalProperties_1() , EXT_PORT_SIDE)), 64); if (extPortSide != ($clinit_PortSide() , EAST_2) && extPortSide != WEST_2) { continue; } finalYCoordinate = $doubleValue(castToDouble($getProperty(node, PORT_RATIO_OR_POSITION_0))); portConstraints == FIXED_RATIO && (finalYCoordinate *= graphHeight); node.pos.y_0 = finalYCoordinate - castTo($getProperty(node, PORT_ANCHOR), 8).y_0; $borderToContentAreaCoordinates(node, false, true); } } function $process_17(layeredGraph, monitor){ var layers; monitor.begin('Hierarchical port position processing', 1); layers = layeredGraph.layers; layers.array.length > 0 && $fixCoordinates_0((checkCriticalElementIndex(0, layers.array.length) , castTo(layers.array[0], 30)), layeredGraph); layers.array.length > 1 && $fixCoordinates_0(castTo($get_11(layers, layers.array.length - 1), 30), layeredGraph); monitor.done_1(); } function HierarchicalPortPositionProcessor(){ } defineClass(1582, 1, $intern_105, HierarchicalPortPositionProcessor); _.process = function process_15(layeredGraph, monitor){ $process_17(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_HierarchicalPortPositionProcessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'HierarchicalPortPositionProcessor', 1582); function $clinit_HighDegreeNodeLayeringProcessor(){ $clinit_HighDegreeNodeLayeringProcessor = emptyMethod; INCOMING_EDGES = new HighDegreeNodeLayeringProcessor$lambda$0$Type; OUTGOING_EDGES = new HighDegreeNodeLayeringProcessor$lambda$1$Type; } function $calculateInformation(this$static, hdn){ var hdni, incEdge, incEdge$iterator, outEdge, outEdge$iterator, src_0, tgt, treeHeight; hdni = new HighDegreeNodeLayeringProcessor$HighDegreeNodeInformation; for (incEdge$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(hdn).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(incEdge$iterator);) { incEdge = castTo($next_0(incEdge$iterator), 18); if ($isSelfLoop(incEdge)) { continue; } src_0 = incEdge.source.owner; if ($hasSingleConnection(src_0, OUTGOING_EDGES)) { treeHeight = $isTreeRoot(this$static, src_0, OUTGOING_EDGES, INCOMING_EDGES); if (treeHeight == -1) { continue; } hdni.incTreesMaxHeight = $wnd.Math.max(hdni.incTreesMaxHeight, treeHeight); !hdni.incTreeRoots && (hdni.incTreeRoots = new ArrayList); $add_3(hdni.incTreeRoots, src_0); } } for (outEdge$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(hdn).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(outEdge$iterator);) { outEdge = castTo($next_0(outEdge$iterator), 18); if ($isSelfLoop(outEdge)) { continue; } tgt = outEdge.target.owner; if ($hasSingleConnection(tgt, INCOMING_EDGES)) { treeHeight = $isTreeRoot(this$static, tgt, INCOMING_EDGES, OUTGOING_EDGES); if (treeHeight == -1) { continue; } hdni.outTreesMaxHeight = $wnd.Math.max(hdni.outTreesMaxHeight, treeHeight); !hdni.outTreeRoots && (hdni.outTreeRoots = new ArrayList); $add_3(hdni.outTreeRoots, tgt); } } return hdni; } function $hasSingleConnection(node, edgeSelector){ var connection, e, e$iterator; connection = null; for (e$iterator = castTo(edgeSelector.apply_0(node), 20).iterator_0(); e$iterator.hasNext_0();) { e = castTo(e$iterator.next_1(), 18); if (!connection) { connection = e.source.owner == node?e.target.owner:e.source.owner; } else { if ((e.source.owner == node?e.target.owner:e.source.owner) != connection) { return false; } } } return true; } function $isTreeRoot(this$static, root, ancestorEdges, descendantEdges){ var currentHeight, e, e$iterator, height, other; if (size_24(($clinit_HighDegreeNodeLayeringProcessor() , new Iterators$ConcatenatedIterator(transform_2($getConnectedEdges_0(root).val$inputs1.iterator_0(), new Iterables$10)))) >= this$static.degreeThreshold) { return -1; } if (!$hasSingleConnection(root, ancestorEdges)) { return -1; } if (isEmpty_13(castTo(descendantEdges.apply_0(root), 20))) { return 1; } currentHeight = 0; for (e$iterator = castTo(descendantEdges.apply_0(root), 20).iterator_0(); e$iterator.hasNext_0();) { e = castTo(e$iterator.next_1(), 18); other = e.source.owner == root?e.target.owner:e.source.owner; height = $isTreeRoot(this$static, other, ancestorEdges, descendantEdges); if (height == -1) { return -1; } currentHeight = $wnd.Math.max(currentHeight, height); if (currentHeight > this$static.treeHeightThreshold - 1) { return -1; } } return currentHeight + 1; } function $moveTree(this$static, root, edgesFun, layers){ var e, e$iterator, other, subList; $setLayer_0(root, castTo(layers.get_0(0), 30)); subList = layers.subList(1, layers.size_1()); for (e$iterator = castTo(edgesFun.apply_0(root), 20).iterator_0(); e$iterator.hasNext_0();) { e = castTo(e$iterator.next_1(), 18); other = e.source.owner == root?e.target.owner:e.source.owner; $moveTree(this$static, other, edgesFun, subList); } } function $process_18(this$static, graph){ var afterLayers, hdni, highDegreeNode, highDegreeNode$iterator, highDegreeNode$iterator0, highDegreeNodes, i, i0, incMax, incRoot, incRoot$iterator, incRoots, l, lay, layerIt, layerIt2, n, n$iterator, outMax, outRoot, outRoot$iterator, outRoots, preLayers, l_0, l_1; this$static.layeredGraph = graph; this$static.degreeThreshold = castTo($getProperty(graph, ($clinit_LayeredOptions() , HIGH_DEGREE_NODES_THRESHOLD_0)), 17).value_0; this$static.treeHeightThreshold = castTo($getProperty(graph, HIGH_DEGREE_NODES_TREE_HEIGHT_0), 17).value_0; this$static.treeHeightThreshold == 0 && (this$static.treeHeightThreshold = $intern_0); layerIt = new AbstractList$ListIteratorImpl(graph.layers, 0); while (layerIt.i < layerIt.this$01_0.size_1()) { lay = (checkCriticalElement(layerIt.i < layerIt.this$01_0.size_1()) , castTo(layerIt.this$01_0.get_0(layerIt.last = layerIt.i++), 30)); highDegreeNodes = new ArrayList; incMax = -1; outMax = -1; for (n$iterator = new ArrayList$1(lay.nodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); if (size_24(($clinit_HighDegreeNodeLayeringProcessor() , new Iterators$ConcatenatedIterator(transform_2($getConnectedEdges_0(n).val$inputs1.iterator_0(), new Iterables$10)))) >= this$static.degreeThreshold) { hdni = $calculateInformation(this$static, n); incMax = $wnd.Math.max(incMax, hdni.incTreesMaxHeight); outMax = $wnd.Math.max(outMax, hdni.outTreesMaxHeight); $add_3(highDegreeNodes, new Pair(n, hdni)); } } preLayers = new ArrayList; for (i0 = 0; i0 < incMax; ++i0) { $add_2(preLayers, 0, (checkCriticalElement(layerIt.i > 0) , layerIt.this$01.get_0(layerIt.last = --layerIt.i) , l_0 = new Layer(this$static.layeredGraph) , $add_1(layerIt, l_0) , checkCriticalElement(layerIt.i < layerIt.this$01_0.size_1()) , layerIt.this$01_0.get_0(layerIt.last = layerIt.i++) , l_0)); } for (highDegreeNode$iterator0 = new ArrayList$1(highDegreeNodes); highDegreeNode$iterator0.i < highDegreeNode$iterator0.this$01.array.length;) { highDegreeNode = castTo($next_6(highDegreeNode$iterator0), 42); incRoots = castTo(highDegreeNode.second, 580).incTreeRoots; if (!incRoots) { continue; } for (incRoot$iterator = new ArrayList$1(incRoots); incRoot$iterator.i < incRoot$iterator.this$01.array.length;) { incRoot = castTo($next_6(incRoot$iterator), 10); $moveTree(this$static, incRoot, INCOMING_EDGES, preLayers); } } afterLayers = new ArrayList; for (i = 0; i < outMax; ++i) { $add_3(afterLayers, (l_1 = new Layer(this$static.layeredGraph) , $add_1(layerIt, l_1) , l_1)); } for (highDegreeNode$iterator = new ArrayList$1(highDegreeNodes); highDegreeNode$iterator.i < highDegreeNode$iterator.this$01.array.length;) { highDegreeNode = castTo($next_6(highDegreeNode$iterator), 42); outRoots = castTo(highDegreeNode.second, 580).outTreeRoots; if (!outRoots) { continue; } for (outRoot$iterator = new ArrayList$1(outRoots); outRoot$iterator.i < outRoot$iterator.this$01.array.length;) { outRoot = castTo($next_6(outRoot$iterator), 10); $moveTree(this$static, outRoot, OUTGOING_EDGES, afterLayers); } } } layerIt2 = new AbstractList$ListIteratorImpl(graph.layers, 0); while (layerIt2.i < layerIt2.this$01_0.size_1()) { l = (checkCriticalElement(layerIt2.i < layerIt2.this$01_0.size_1()) , castTo(layerIt2.this$01_0.get_0(layerIt2.last = layerIt2.i++), 30)); l.nodes.array.length == 0 && $remove_8(layerIt2); } } function HighDegreeNodeLayeringProcessor(){ $clinit_HighDegreeNodeLayeringProcessor(); } defineClass(1583, 1, $intern_105, HighDegreeNodeLayeringProcessor); _.process = function process_16(graph, progressMonitor){ $process_18(this, castTo(graph, 36)); } ; _.degreeThreshold = 0; _.treeHeightThreshold = 0; var INCOMING_EDGES, OUTGOING_EDGES; var Lorg_eclipse_elk_alg_layered_intermediate_HighDegreeNodeLayeringProcessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'HighDegreeNodeLayeringProcessor', 1583); function HighDegreeNodeLayeringProcessor$HighDegreeNodeInformation(){ } defineClass(580, 1, {580:1}, HighDegreeNodeLayeringProcessor$HighDegreeNodeInformation); _.incTreesMaxHeight = -1; _.outTreesMaxHeight = -1; var Lorg_eclipse_elk_alg_layered_intermediate_HighDegreeNodeLayeringProcessor$HighDegreeNodeInformation_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'HighDegreeNodeLayeringProcessor/HighDegreeNodeInformation', 580); function HighDegreeNodeLayeringProcessor$lambda$0$Type(){ } defineClass(1584, 1, {}, HighDegreeNodeLayeringProcessor$lambda$0$Type); _.apply_0 = function apply_78(arg0){ return $clinit_HighDegreeNodeLayeringProcessor() , $getIncomingEdges(castTo(arg0, 10)); } ; _.equals_0 = function equals_110(other){ return this === other; } ; var Lorg_eclipse_elk_alg_layered_intermediate_HighDegreeNodeLayeringProcessor$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'HighDegreeNodeLayeringProcessor/lambda$0$Type', 1584); function HighDegreeNodeLayeringProcessor$lambda$1$Type(){ } defineClass(1585, 1, {}, HighDegreeNodeLayeringProcessor$lambda$1$Type); _.apply_0 = function apply_79(arg0){ return $clinit_HighDegreeNodeLayeringProcessor() , $getOutgoingEdges(castTo(arg0, 10)); } ; _.equals_0 = function equals_111(other){ return this === other; } ; var Lorg_eclipse_elk_alg_layered_intermediate_HighDegreeNodeLayeringProcessor$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'HighDegreeNodeLayeringProcessor/lambda$1$Type', 1585); function $checkMergeAllowed(currNode, lastNode){ var currHasLabelDummies, currNodeSource, currNodeTarget, eligibleForSourceMerging, eligibleForTargetMerging, lastHasLabelDummies, lastNodeSource, lastNodeTarget, sameSource, sameTarget; currHasLabelDummies = $booleanValue(castToBoolean($getProperty(currNode, ($clinit_InternalProperties_1() , LONG_EDGE_HAS_LABEL_DUMMIES)))); lastHasLabelDummies = $booleanValue(castToBoolean($getProperty(lastNode, LONG_EDGE_HAS_LABEL_DUMMIES))); currNodeSource = castTo($getProperty(currNode, LONG_EDGE_SOURCE), 12); lastNodeSource = castTo($getProperty(lastNode, LONG_EDGE_SOURCE), 12); currNodeTarget = castTo($getProperty(currNode, LONG_EDGE_TARGET), 12); lastNodeTarget = castTo($getProperty(lastNode, LONG_EDGE_TARGET), 12); sameSource = !!currNodeSource && currNodeSource == lastNodeSource; sameTarget = !!currNodeTarget && currNodeTarget == lastNodeTarget; if (!currHasLabelDummies && !lastHasLabelDummies) { return new HyperedgeDummyMerger$MergeState(castTo($next_6(new ArrayList$1(currNode.ports)), 12).id_0 == castTo($next_6(new ArrayList$1(lastNode.ports)), 12).id_0, sameSource, sameTarget); } eligibleForSourceMerging = (!$booleanValue(castToBoolean($getProperty(currNode, LONG_EDGE_HAS_LABEL_DUMMIES))) || $booleanValue(castToBoolean($getProperty(currNode, LONG_EDGE_BEFORE_LABEL_DUMMY)))) && (!$booleanValue(castToBoolean($getProperty(lastNode, LONG_EDGE_HAS_LABEL_DUMMIES))) || $booleanValue(castToBoolean($getProperty(lastNode, LONG_EDGE_BEFORE_LABEL_DUMMY)))); eligibleForTargetMerging = (!$booleanValue(castToBoolean($getProperty(currNode, LONG_EDGE_HAS_LABEL_DUMMIES))) || !$booleanValue(castToBoolean($getProperty(currNode, LONG_EDGE_BEFORE_LABEL_DUMMY)))) && (!$booleanValue(castToBoolean($getProperty(lastNode, LONG_EDGE_HAS_LABEL_DUMMIES))) || !$booleanValue(castToBoolean($getProperty(lastNode, LONG_EDGE_BEFORE_LABEL_DUMMY)))); return new HyperedgeDummyMerger$MergeState(sameSource && eligibleForSourceMerging || sameTarget && eligibleForTargetMerging, sameSource, sameTarget); } function $dfs_2(this$static, p, index_0){ var p2, p2$iterator, p2$iterator0; p.id_0 = index_0; for (p2$iterator0 = $iterator(concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [new LPort$1(p), new LPort$2(p)]))); $hasNext_1(p2$iterator0);) { p2 = castTo($next_0(p2$iterator0), 12); p2.id_0 == -1 && $dfs_2(this$static, p2, index_0); } if (p.owner.type_0 == ($clinit_LNode$NodeType() , LONG_EDGE)) { for (p2$iterator = new ArrayList$1(p.owner.ports); p2$iterator.i < p2$iterator.this$01.array.length;) { p2 = castTo($next_6(p2$iterator), 12); p2 != p && p2.id_0 == -1 && $dfs_2(this$static, p2, index_0); } } } function $identifyHyperedges(this$static, lGraph){ var index_0, p, p$iterator, ports; ports = castTo($collect_1($flatMap($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(lGraph.layers, 16)), new HyperedgeDummyMerger$lambda$0$Type), new HyperedgeDummyMerger$lambda$1$Type), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , IDENTITY_FINISH)]))), 15); ports.forEach_0(new HyperedgeDummyMerger$lambda$2$Type); index_0 = 0; for (p$iterator = ports.iterator_0(); p$iterator.hasNext_0();) { p = castTo(p$iterator.next_1(), 12); p.id_0 == -1 && $dfs_2(this$static, p, index_0++); } } function $mergeNodes(mergeSource, mergeTarget, keepSourcePort, keepTargetPort){ var mergeTargetInputPort, mergeTargetOutputPort, port, port$iterator; mergeTargetInputPort = castTo($getPorts_1(mergeTarget, ($clinit_PortSide() , WEST_2)).iterator_0().next_1(), 12); mergeTargetOutputPort = castTo($getPorts_1(mergeTarget, EAST_2).iterator_0().next_1(), 12); for (port$iterator = new ArrayList$1(mergeSource.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); while (port.incomingEdges.array.length != 0) { $setTarget_0(castTo($get_11(port.incomingEdges, 0), 18), mergeTargetInputPort); } while (port.outgoingEdges.array.length != 0) { $setSource_0(castTo($get_11(port.outgoingEdges, 0), 18), mergeTargetOutputPort); } } keepSourcePort || $setProperty_0(mergeTarget, ($clinit_InternalProperties_1() , LONG_EDGE_SOURCE), null); keepTargetPort || $setProperty_0(mergeTarget, ($clinit_InternalProperties_1() , LONG_EDGE_TARGET), null); } function $process_19(this$static, layeredGraph, monitor){ var currNode, currNodeType, lastNode, lastNodeType, layer, layerIter, nodeIndex, nodes, state; monitor.begin('Hyperedge merging', 1); $identifyHyperedges(this$static, layeredGraph); layerIter = new AbstractList$ListIteratorImpl(layeredGraph.layers, 0); while (layerIter.i < layerIter.this$01_0.size_1()) { layer = (checkCriticalElement(layerIter.i < layerIter.this$01_0.size_1()) , castTo(layerIter.this$01_0.get_0(layerIter.last = layerIter.i++), 30)); nodes = layer.nodes; if (nodes.array.length == 0) { continue; } currNode = null; currNodeType = null; lastNode = null; lastNodeType = null; for (nodeIndex = 0; nodeIndex < nodes.array.length; nodeIndex++) { currNode = (checkCriticalElementIndex(nodeIndex, nodes.array.length) , castTo(nodes.array[nodeIndex], 10)); currNodeType = currNode.type_0; if (currNodeType == ($clinit_LNode$NodeType() , LONG_EDGE) && lastNodeType == LONG_EDGE) { state = $checkMergeAllowed(currNode, lastNode); if (state.allowMerge) { $mergeNodes(currNode, lastNode, state.sameSource, state.sameTarget); checkCriticalElementIndex(nodeIndex, nodes.array.length); removeFrom(nodes.array, nodeIndex, 1); --nodeIndex; currNode = lastNode; currNodeType = lastNodeType; } } lastNode = currNode; lastNodeType = currNodeType; } } monitor.done_1(); } function HyperedgeDummyMerger(){ } defineClass(1591, 1, $intern_105, HyperedgeDummyMerger); _.process = function process_17(layeredGraph, monitor){ $process_19(this, castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_HyperedgeDummyMerger_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'HyperedgeDummyMerger', 1591); function HyperedgeDummyMerger$MergeState(allowMerge, sameSource, sameTarget){ this.allowMerge = allowMerge; this.sameSource = sameSource; this.sameTarget = sameTarget; } defineClass(804, 1, {}, HyperedgeDummyMerger$MergeState); _.allowMerge = false; _.sameSource = false; _.sameTarget = false; var Lorg_eclipse_elk_alg_layered_intermediate_HyperedgeDummyMerger$MergeState_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'HyperedgeDummyMerger/MergeState', 804); function HyperedgeDummyMerger$lambda$0$Type(){ } defineClass(1592, 1, {}, HyperedgeDummyMerger$lambda$0$Type); _.apply_0 = function apply_80(arg0){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 30).nodes, 16)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_HyperedgeDummyMerger$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'HyperedgeDummyMerger/lambda$0$Type', 1592); function HyperedgeDummyMerger$lambda$1$Type(){ } defineClass(1593, 1, {}, HyperedgeDummyMerger$lambda$1$Type); _.apply_0 = function apply_81(arg0){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 10).ports, 16)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_HyperedgeDummyMerger$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'HyperedgeDummyMerger/lambda$1$Type', 1593); function HyperedgeDummyMerger$lambda$2$Type(){ } defineClass(1594, 1, $intern_19, HyperedgeDummyMerger$lambda$2$Type); _.accept = function accept_76(arg0){ castTo(arg0, 12).id_0 = -1; } ; var Lorg_eclipse_elk_alg_layered_intermediate_HyperedgeDummyMerger$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'HyperedgeDummyMerger/lambda$2$Type', 1594); function $moveHypernode(layeredGraph, hypernode, right){ var bendEdges, bendx, diffx, diffy, edge, edge$iterator, first, firstPoint, junctionPoints, lastPoint, northPort, port, port$iterator, second, southPort; bendEdges = new ArrayList; bendx = $intern_0; diffx = $intern_0; diffy = $intern_0; if (right) { bendx = layeredGraph.size_0.x_0; for (port$iterator = new ArrayList$1(hypernode.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); for (edge$iterator = new ArrayList$1(port.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); if (edge.bendPoints.size_0 != 0) { firstPoint = castTo($getFirst(edge.bendPoints), 8); if (firstPoint.x_0 < bendx) { diffx = bendx - firstPoint.x_0; diffy = $intern_0; bendEdges.array.length = 0; bendx = firstPoint.x_0; } if (firstPoint.x_0 <= bendx) { push_1(bendEdges.array, edge); edge.bendPoints.size_0 > 1 && (diffy = $wnd.Math.min(diffy, $wnd.Math.abs(castTo($get_7(edge.bendPoints, 1), 8).y_0 - firstPoint.y_0))); } } } } } else { for (port$iterator = new ArrayList$1(hypernode.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); for (edge$iterator = new ArrayList$1(port.incomingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); if (edge.bendPoints.size_0 != 0) { lastPoint = castTo($getLast(edge.bendPoints), 8); if (lastPoint.x_0 > bendx) { diffx = lastPoint.x_0 - bendx; diffy = $intern_0; bendEdges.array.length = 0; bendx = lastPoint.x_0; } if (lastPoint.x_0 >= bendx) { push_1(bendEdges.array, edge); edge.bendPoints.size_0 > 1 && (diffy = $wnd.Math.min(diffy, $wnd.Math.abs(castTo($get_7(edge.bendPoints, edge.bendPoints.size_0 - 2), 8).y_0 - lastPoint.y_0))); } } } } } if (bendEdges.array.length != 0 && diffx > hypernode.size_0.x_0 / 2 && diffy > hypernode.size_0.y_0 / 2) { northPort = new LPort; $setNode(northPort, hypernode); $setSide(northPort, ($clinit_PortSide() , NORTH_3)); northPort.pos.x_0 = hypernode.size_0.x_0 / 2; southPort = new LPort; $setNode(southPort, hypernode); $setSide(southPort, SOUTH_2); southPort.pos.x_0 = hypernode.size_0.x_0 / 2; southPort.pos.y_0 = hypernode.size_0.y_0; for (edge$iterator = new ArrayList$1(bendEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); if (right) { first = castTo($removeFirst_0(edge.bendPoints), 8); second = edge.bendPoints.size_0 == 0?$getAbsoluteAnchor(edge.target):castTo($getFirst(edge.bendPoints), 8); second.y_0 >= first.y_0?$setSource_0(edge, southPort):$setSource_0(edge, northPort); } else { first = castTo($removeLast_0(edge.bendPoints), 8); second = edge.bendPoints.size_0 == 0?$getAbsoluteAnchor(edge.source):castTo($getLast(edge.bendPoints), 8); second.y_0 >= first.y_0?$setTarget_0(edge, southPort):$setTarget_0(edge, northPort); } junctionPoints = castTo($getProperty(edge, ($clinit_LayeredOptions() , JUNCTION_POINTS)), 75); !!junctionPoints && $advanceToFind(junctionPoints, first, true); } hypernode.pos.x_0 = bendx - hypernode.size_0.x_0 / 2; } } function $process_20(layeredGraph, monitor){ var bottomEdges, layer, layer$iterator, leftEdges, node, node$iterator, port, port$iterator, rightEdges, topEdges; monitor.begin('Hypernodes processing', 1); for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if ($booleanValue(castToBoolean($getProperty(node, ($clinit_LayeredOptions() , HYPERNODE)))) && node.ports.array.length <= 2) { topEdges = 0; rightEdges = 0; bottomEdges = 0; leftEdges = 0; for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); switch (port.side.ordinal) { case 1: ++topEdges; break; case 2: ++rightEdges; break; case 3: ++bottomEdges; break; case 4: ++leftEdges; } } topEdges == 0 && bottomEdges == 0 && $moveHypernode(layeredGraph, node, leftEdges <= rightEdges); } } } monitor.done_1(); } function HypernodesProcessor(){ } defineClass(1595, 1, $intern_105, HypernodesProcessor); _.process = function process_18(layeredGraph, monitor){ $process_20(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_HypernodesProcessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'HypernodesProcessor', 1595); function $process_21(layeredGraph, monitor){ var bottomConstrainedNodes, constraint, i, layer, layer$iterator, node, node$iterator, nodes, topInsertionIndex; monitor.begin('Layer constraint edge reversal', 1); for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); topInsertionIndex = -1; bottomConstrainedNodes = new ArrayList; nodes = toNodeArray(layer.nodes); for (i = 0; i < nodes.length; i++) { constraint = castTo($getProperty(nodes[i], ($clinit_InternalProperties_1() , IN_LAYER_CONSTRAINT)), 311); if (topInsertionIndex == -1) { constraint != ($clinit_InLayerConstraint() , TOP_1) && (topInsertionIndex = i); } else { if (constraint == ($clinit_InLayerConstraint() , TOP_1)) { $setLayer_0(nodes[i], null); $setLayer(nodes[i], topInsertionIndex++, layer); } } constraint == ($clinit_InLayerConstraint() , BOTTOM_0) && (push_1(bottomConstrainedNodes.array, nodes[i]) , true); } for (node$iterator = new ArrayList$1(bottomConstrainedNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); $setLayer_0(node, null); $setLayer_0(node, layer); } } monitor.done_1(); } function InLayerConstraintProcessor(){ } defineClass(1596, 1, $intern_105, InLayerConstraintProcessor); _.process = function process_19(layeredGraph, monitor){ $process_21(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_InLayerConstraintProcessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'InLayerConstraintProcessor', 1596); function $process_22(layeredGraph, monitor){ monitor.begin('Node margin calculation', 1); $process($excludeEdgeHeadTailLabels(new NodeMarginCalculator(($clinit_LGraphAdapters() , new LGraphAdapters$LGraphAdapter(layeredGraph, false, false, new LGraphAdapters$lambda$0$Type))))); monitor.done_1(); } function InnermostNodeMarginCalculator(){ } defineClass(1597, 1, $intern_105, InnermostNodeMarginCalculator); _.process = function process_20(layeredGraph, monitor){ $process_22(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_InnermostNodeMarginCalculator_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'InnermostNodeMarginCalculator', 1597); function $findNorthSouthPortXCoordinate(dummy){ var e, e$iterator, margins, max_0, min_0, n, port; port = castTo($get_11(dummy.ports, 0), 12); if (port.outgoingEdges.array.length != 0 && port.incomingEdges.array.length != 0) { throw toJs(new IllegalStateException_0('Interactive layout does not support NORTH/SOUTH ports with incoming _and_ outgoing edges.')); } if (port.outgoingEdges.array.length != 0) { min_0 = $intern_60; for (e$iterator = new ArrayList$1(port.outgoingEdges); e$iterator.i < e$iterator.this$01.array.length;) { e = castTo($next_6(e$iterator), 18); n = e.target.owner; margins = castTo($getProperty(n, ($clinit_LayeredOptions() , MARGINS)), 140); min_0 = $wnd.Math.min(min_0, n.pos.x_0 - margins.left); } return new Present(checkNotNull(min_0)); } if (port.incomingEdges.array.length != 0) { max_0 = $intern_61; for (e$iterator = new ArrayList$1(port.incomingEdges); e$iterator.i < e$iterator.this$01.array.length;) { e = castTo($next_6(e$iterator), 18); n = e.source.owner; margins = castTo($getProperty(n, ($clinit_LayeredOptions() , MARGINS)), 140); max_0 = $wnd.Math.max(max_0, n.pos.x_0 + n.size_0.x_0 + margins.right); } return new Present(checkNotNull(max_0)); } return $clinit_Absent() , $clinit_Absent() , INSTANCE; } function $findYCoordinate(dummy, funGetOtherNode){ var e, e$iterator, other; for (e$iterator = new Iterators$ConcatenatedIterator(transform_2($getConnectedEdges_0(dummy).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 18); other = castTo(funGetOtherNode.apply_0(e), 10); return new Present(checkNotNull(other.pos.y_0 + other.size_0.y_0 / 2)); } return $clinit_Absent() , $clinit_Absent() , INSTANCE; } function $process_23(this$static, layeredGraph){ var ilc, lc, margins, node, node$iterator, node$iterator0; if (!castTo($getProperty(layeredGraph, ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21).contains(($clinit_GraphProperties() , EXTERNAL_PORTS))) { return; } for (node$iterator0 = new ArrayList$1(layeredGraph.layerlessNodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); if (node.type_0 == ($clinit_LNode$NodeType() , NORMAL)) { margins = castTo($getProperty(node, ($clinit_LayeredOptions() , MARGINS)), 140); this$static.minX = $wnd.Math.min(this$static.minX, node.pos.x_0 - margins.left); this$static.maxX = $wnd.Math.max(this$static.maxX, node.pos.x_0 + node.size_0.x_0 + margins.right); this$static.minY = $wnd.Math.min(this$static.minY, node.pos.y_0 - margins.top_0); this$static.maxY = $wnd.Math.max(this$static.maxY, node.pos.y_0 + node.size_0.y_0 + margins.bottom); } } for (node$iterator = new ArrayList$1(layeredGraph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (node.type_0 != ($clinit_LNode$NodeType() , NORMAL)) { switch (node.type_0.ordinal) { case 2: lc = castTo($getProperty(node, ($clinit_LayeredOptions() , LAYERING_LAYER_CONSTRAINT_0)), 171); if (lc == ($clinit_LayerConstraint() , FIRST_SEPARATE_0)) { node.pos.x_0 = this$static.minX - 10; $findYCoordinate(node, new InteractiveExternalPortPositioner$lambda$0$Type).transform(new InteractiveExternalPortPositioner$lambda$1$Type(node)); break; } if (lc == LAST_SEPARATE_0) { node.pos.x_0 = this$static.maxX + 10; $findYCoordinate(node, new InteractiveExternalPortPositioner$lambda$2$Type).transform(new InteractiveExternalPortPositioner$lambda$3$Type(node)); break; } ilc = castTo($getProperty(node, IN_LAYER_CONSTRAINT), 311); if (ilc == ($clinit_InLayerConstraint() , TOP_1)) { $findNorthSouthPortXCoordinate(node).transform(new InteractiveExternalPortPositioner$lambda$4$Type(node)); node.pos.y_0 = this$static.minY - 10; break; } if (ilc == BOTTOM_0) { $findNorthSouthPortXCoordinate(node).transform(new InteractiveExternalPortPositioner$lambda$5$Type(node)); node.pos.y_0 = this$static.maxY + 10; break; } break; default:throw toJs(new IllegalArgumentException_0('The node type ' + node.type_0 + ' is not supported by the ' + Lorg_eclipse_elk_alg_layered_intermediate_InteractiveExternalPortPositioner_2_classLit)); } } } } function InteractiveExternalPortPositioner(){ } function lambda$1_8(node_0, d_1){ return node_0.pos.y_0 = (checkCriticalNotNull(d_1) , d_1); } function lambda$3_0(node_0, d_1){ return node_0.pos.y_0 = (checkCriticalNotNull(d_1) , d_1); } function lambda$4_4(node_0, x_1){ return node_0.pos.x_0 = (checkCriticalNotNull(x_1) , x_1) + 10; } function lambda$5_1(node_0, x_1){ return node_0.pos.x_0 = (checkCriticalNotNull(x_1) , x_1) + 10; } defineClass(1598, 1, $intern_105, InteractiveExternalPortPositioner); _.process = function process_21(layeredGraph, progressMonitor){ $process_23(this, castTo(layeredGraph, 36)); } ; _.maxX = $intern_61; _.maxY = $intern_61; _.minX = $intern_60; _.minY = $intern_60; var Lorg_eclipse_elk_alg_layered_intermediate_InteractiveExternalPortPositioner_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'InteractiveExternalPortPositioner', 1598); function InteractiveExternalPortPositioner$lambda$0$Type(){ } defineClass(1599, 1, {}, InteractiveExternalPortPositioner$lambda$0$Type); _.apply_0 = function apply_82(arg0){ return castTo(arg0, 18).target.owner; } ; _.equals_0 = function equals_112(other){ return this === other; } ; var Lorg_eclipse_elk_alg_layered_intermediate_InteractiveExternalPortPositioner$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'InteractiveExternalPortPositioner/lambda$0$Type', 1599); function InteractiveExternalPortPositioner$lambda$1$Type(node_0){ this.node_0 = node_0; } defineClass(1600, 1, {}, InteractiveExternalPortPositioner$lambda$1$Type); _.apply_0 = function apply_83(arg0){ return lambda$1_8(this.node_0, castToDouble(arg0)); } ; _.equals_0 = function equals_113(other){ return this === other; } ; var Lorg_eclipse_elk_alg_layered_intermediate_InteractiveExternalPortPositioner$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'InteractiveExternalPortPositioner/lambda$1$Type', 1600); function InteractiveExternalPortPositioner$lambda$2$Type(){ } defineClass(1601, 1, {}, InteractiveExternalPortPositioner$lambda$2$Type); _.apply_0 = function apply_84(arg0){ return castTo(arg0, 18).source.owner; } ; _.equals_0 = function equals_114(other){ return this === other; } ; var Lorg_eclipse_elk_alg_layered_intermediate_InteractiveExternalPortPositioner$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'InteractiveExternalPortPositioner/lambda$2$Type', 1601); function InteractiveExternalPortPositioner$lambda$3$Type(node_0){ this.node_0 = node_0; } defineClass(1602, 1, {}, InteractiveExternalPortPositioner$lambda$3$Type); _.apply_0 = function apply_85(arg0){ return lambda$3_0(this.node_0, castToDouble(arg0)); } ; _.equals_0 = function equals_115(other){ return this === other; } ; var Lorg_eclipse_elk_alg_layered_intermediate_InteractiveExternalPortPositioner$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'InteractiveExternalPortPositioner/lambda$3$Type', 1602); function InteractiveExternalPortPositioner$lambda$4$Type(node_0){ this.node_0 = node_0; } defineClass(1603, 1, {}, InteractiveExternalPortPositioner$lambda$4$Type); _.apply_0 = function apply_86(arg0){ return lambda$4_4(this.node_0, castToDouble(arg0)); } ; _.equals_0 = function equals_116(other){ return this === other; } ; var Lorg_eclipse_elk_alg_layered_intermediate_InteractiveExternalPortPositioner$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'InteractiveExternalPortPositioner/lambda$4$Type', 1603); function InteractiveExternalPortPositioner$lambda$5$Type(node_0){ this.node_0 = node_0; } defineClass(1604, 1, {}, InteractiveExternalPortPositioner$lambda$5$Type); _.apply_0 = function apply_87(arg0){ return lambda$5_1(this.node_0, castToDouble(arg0)); } ; _.equals_0 = function equals_117(other){ return this === other; } ; var Lorg_eclipse_elk_alg_layered_intermediate_InteractiveExternalPortPositioner$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'InteractiveExternalPortPositioner/lambda$5$Type', 1604); function $clinit_IntermediateProcessorStrategy(){ $clinit_IntermediateProcessorStrategy = emptyMethod; DIRECTION_PREPROCESSOR = new IntermediateProcessorStrategy('DIRECTION_PREPROCESSOR', 0); COMMENT_PREPROCESSOR = new IntermediateProcessorStrategy('COMMENT_PREPROCESSOR', 1); EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER = new IntermediateProcessorStrategy('EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER', 2); INTERACTIVE_EXTERNAL_PORT_POSITIONER = new IntermediateProcessorStrategy('INTERACTIVE_EXTERNAL_PORT_POSITIONER', 3); PARTITION_PREPROCESSOR = new IntermediateProcessorStrategy('PARTITION_PREPROCESSOR', 4); LABEL_DUMMY_INSERTER = new IntermediateProcessorStrategy('LABEL_DUMMY_INSERTER', 5); SELF_LOOP_PREPROCESSOR = new IntermediateProcessorStrategy('SELF_LOOP_PREPROCESSOR', 6); LAYER_CONSTRAINT_PREPROCESSOR = new IntermediateProcessorStrategy('LAYER_CONSTRAINT_PREPROCESSOR', 7); PARTITION_MIDPROCESSOR = new IntermediateProcessorStrategy('PARTITION_MIDPROCESSOR', 8); HIGH_DEGREE_NODE_LAYER_PROCESSOR = new IntermediateProcessorStrategy('HIGH_DEGREE_NODE_LAYER_PROCESSOR', 9); NODE_PROMOTION = new IntermediateProcessorStrategy('NODE_PROMOTION', 10); LAYER_CONSTRAINT_POSTPROCESSOR = new IntermediateProcessorStrategy('LAYER_CONSTRAINT_POSTPROCESSOR', 11); PARTITION_POSTPROCESSOR = new IntermediateProcessorStrategy('PARTITION_POSTPROCESSOR', 12); HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR = new IntermediateProcessorStrategy('HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR', 13); SEMI_INTERACTIVE_CROSSMIN_PROCESSOR = new IntermediateProcessorStrategy('SEMI_INTERACTIVE_CROSSMIN_PROCESSOR', 14); BREAKING_POINT_INSERTER = new IntermediateProcessorStrategy('BREAKING_POINT_INSERTER', 15); LONG_EDGE_SPLITTER = new IntermediateProcessorStrategy('LONG_EDGE_SPLITTER', 16); PORT_SIDE_PROCESSOR = new IntermediateProcessorStrategy('PORT_SIDE_PROCESSOR', 17); INVERTED_PORT_PROCESSOR = new IntermediateProcessorStrategy('INVERTED_PORT_PROCESSOR', 18); PORT_LIST_SORTER = new IntermediateProcessorStrategy('PORT_LIST_SORTER', 19); SORT_BY_INPUT_ORDER_OF_MODEL = new IntermediateProcessorStrategy('SORT_BY_INPUT_ORDER_OF_MODEL', 20); NORTH_SOUTH_PORT_PREPROCESSOR = new IntermediateProcessorStrategy('NORTH_SOUTH_PORT_PREPROCESSOR', 21); BREAKING_POINT_PROCESSOR = new IntermediateProcessorStrategy('BREAKING_POINT_PROCESSOR', 22); ONE_SIDED_GREEDY_SWITCH = new IntermediateProcessorStrategy('ONE_SIDED_GREEDY_SWITCH', 23); TWO_SIDED_GREEDY_SWITCH = new IntermediateProcessorStrategy('TWO_SIDED_GREEDY_SWITCH', 24); SELF_LOOP_PORT_RESTORER = new IntermediateProcessorStrategy('SELF_LOOP_PORT_RESTORER', 25); SINGLE_EDGE_GRAPH_WRAPPER = new IntermediateProcessorStrategy('SINGLE_EDGE_GRAPH_WRAPPER', 26); IN_LAYER_CONSTRAINT_PROCESSOR = new IntermediateProcessorStrategy('IN_LAYER_CONSTRAINT_PROCESSOR', 27); END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR = new IntermediateProcessorStrategy('END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR', 28); LABEL_AND_NODE_SIZE_PROCESSOR = new IntermediateProcessorStrategy('LABEL_AND_NODE_SIZE_PROCESSOR', 29); INNERMOST_NODE_MARGIN_CALCULATOR = new IntermediateProcessorStrategy('INNERMOST_NODE_MARGIN_CALCULATOR', 30); SELF_LOOP_ROUTER = new IntermediateProcessorStrategy('SELF_LOOP_ROUTER', 31); COMMENT_NODE_MARGIN_CALCULATOR = new IntermediateProcessorStrategy('COMMENT_NODE_MARGIN_CALCULATOR', 32); END_LABEL_PREPROCESSOR = new IntermediateProcessorStrategy('END_LABEL_PREPROCESSOR', 33); LABEL_DUMMY_SWITCHER = new IntermediateProcessorStrategy('LABEL_DUMMY_SWITCHER', 34); CENTER_LABEL_MANAGEMENT_PROCESSOR = new IntermediateProcessorStrategy('CENTER_LABEL_MANAGEMENT_PROCESSOR', 35); LABEL_SIDE_SELECTOR = new IntermediateProcessorStrategy('LABEL_SIDE_SELECTOR', 36); HYPEREDGE_DUMMY_MERGER = new IntermediateProcessorStrategy('HYPEREDGE_DUMMY_MERGER', 37); HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR = new IntermediateProcessorStrategy('HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR', 38); LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR = new IntermediateProcessorStrategy('LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR', 39); HIERARCHICAL_PORT_POSITION_PROCESSOR = new IntermediateProcessorStrategy('HIERARCHICAL_PORT_POSITION_PROCESSOR', 40); CONSTRAINTS_POSTPROCESSOR = new IntermediateProcessorStrategy('CONSTRAINTS_POSTPROCESSOR', 41); COMMENT_POSTPROCESSOR = new IntermediateProcessorStrategy('COMMENT_POSTPROCESSOR', 42); HYPERNODE_PROCESSOR = new IntermediateProcessorStrategy('HYPERNODE_PROCESSOR', 43); HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER = new IntermediateProcessorStrategy('HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER', 44); LONG_EDGE_JOINER = new IntermediateProcessorStrategy('LONG_EDGE_JOINER', 45); SELF_LOOP_POSTPROCESSOR = new IntermediateProcessorStrategy('SELF_LOOP_POSTPROCESSOR', 46); BREAKING_POINT_REMOVER = new IntermediateProcessorStrategy('BREAKING_POINT_REMOVER', 47); NORTH_SOUTH_PORT_POSTPROCESSOR = new IntermediateProcessorStrategy('NORTH_SOUTH_PORT_POSTPROCESSOR', 48); HORIZONTAL_COMPACTOR = new IntermediateProcessorStrategy('HORIZONTAL_COMPACTOR', 49); LABEL_DUMMY_REMOVER = new IntermediateProcessorStrategy('LABEL_DUMMY_REMOVER', 50); FINAL_SPLINE_BENDPOINTS_CALCULATOR = new IntermediateProcessorStrategy('FINAL_SPLINE_BENDPOINTS_CALCULATOR', 51); END_LABEL_SORTER = new IntermediateProcessorStrategy('END_LABEL_SORTER', 52); REVERSED_EDGE_RESTORER = new IntermediateProcessorStrategy('REVERSED_EDGE_RESTORER', 53); END_LABEL_POSTPROCESSOR = new IntermediateProcessorStrategy('END_LABEL_POSTPROCESSOR', 54); HIERARCHICAL_NODE_RESIZER = new IntermediateProcessorStrategy('HIERARCHICAL_NODE_RESIZER', 55); DIRECTION_POSTPROCESSOR = new IntermediateProcessorStrategy('DIRECTION_POSTPROCESSOR', 56); } function IntermediateProcessorStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_30(name_0){ $clinit_IntermediateProcessorStrategy(); return valueOf(($clinit_IntermediateProcessorStrategy$Map() , $MAP_20), name_0); } function values_38(){ $clinit_IntermediateProcessorStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_intermediate_IntermediateProcessorStrategy_2_classLit, 1), $intern_37, 81, 0, [DIRECTION_PREPROCESSOR, COMMENT_PREPROCESSOR, EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER, INTERACTIVE_EXTERNAL_PORT_POSITIONER, PARTITION_PREPROCESSOR, LABEL_DUMMY_INSERTER, SELF_LOOP_PREPROCESSOR, LAYER_CONSTRAINT_PREPROCESSOR, PARTITION_MIDPROCESSOR, HIGH_DEGREE_NODE_LAYER_PROCESSOR, NODE_PROMOTION, LAYER_CONSTRAINT_POSTPROCESSOR, PARTITION_POSTPROCESSOR, HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR, SEMI_INTERACTIVE_CROSSMIN_PROCESSOR, BREAKING_POINT_INSERTER, LONG_EDGE_SPLITTER, PORT_SIDE_PROCESSOR, INVERTED_PORT_PROCESSOR, PORT_LIST_SORTER, SORT_BY_INPUT_ORDER_OF_MODEL, NORTH_SOUTH_PORT_PREPROCESSOR, BREAKING_POINT_PROCESSOR, ONE_SIDED_GREEDY_SWITCH, TWO_SIDED_GREEDY_SWITCH, SELF_LOOP_PORT_RESTORER, SINGLE_EDGE_GRAPH_WRAPPER, IN_LAYER_CONSTRAINT_PROCESSOR, END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR, LABEL_AND_NODE_SIZE_PROCESSOR, INNERMOST_NODE_MARGIN_CALCULATOR, SELF_LOOP_ROUTER, COMMENT_NODE_MARGIN_CALCULATOR, END_LABEL_PREPROCESSOR, LABEL_DUMMY_SWITCHER, CENTER_LABEL_MANAGEMENT_PROCESSOR, LABEL_SIDE_SELECTOR, HYPEREDGE_DUMMY_MERGER, HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR, LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR, HIERARCHICAL_PORT_POSITION_PROCESSOR, CONSTRAINTS_POSTPROCESSOR, COMMENT_POSTPROCESSOR, HYPERNODE_PROCESSOR, HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER, LONG_EDGE_JOINER, SELF_LOOP_POSTPROCESSOR, BREAKING_POINT_REMOVER, NORTH_SOUTH_PORT_POSTPROCESSOR, HORIZONTAL_COMPACTOR, LABEL_DUMMY_REMOVER, FINAL_SPLINE_BENDPOINTS_CALCULATOR, END_LABEL_SORTER, REVERSED_EDGE_RESTORER, END_LABEL_POSTPROCESSOR, HIERARCHICAL_NODE_RESIZER, DIRECTION_POSTPROCESSOR]); } defineClass(81, 22, {3:1, 34:1, 22:1, 81:1, 196:1}, IntermediateProcessorStrategy); _.create_1 = function create_5(){ switch (this.ordinal) { case 15: return new BreakingPointInserter; case 22: return new BreakingPointProcessor; case 47: return new BreakingPointRemover; case 28: case 35: return new LabelManagementProcessor; case 32: return new CommentNodeMarginCalculator; case 42: return new CommentPostprocessor; case 1: return new CommentPreprocessor; case 41: return new ConstraintsPostprocessor; case 56: return new GraphTransformer(($clinit_GraphTransformer$Mode() , TO_INTERNAL_LTR)); case 0: return new GraphTransformer(($clinit_GraphTransformer$Mode() , TO_INPUT_DIRECTION)); case 2: return new EdgeAndLayerConstraintEdgeReverser; case 54: return new EndLabelPostprocessor; case 33: return new EndLabelPreprocessor; case 51: return new FinalSplineBendpointsCalculator; case 55: return new HierarchicalNodeResizingProcessor; case 13: return new HierarchicalPortConstraintProcessor; case 38: return new HierarchicalPortDummySizeProcessor; case 44: return new HierarchicalPortOrthogonalEdgeRouter; case 40: return new HierarchicalPortPositionProcessor; case 9: return new HighDegreeNodeLayeringProcessor; case 49: return new HorizontalGraphCompactor; case 37: return new HyperedgeDummyMerger; case 43: return new HypernodesProcessor; case 27: return new InLayerConstraintProcessor; case 30: return new InnermostNodeMarginCalculator; case 3: return new InteractiveExternalPortPositioner; case 18: return new InvertedPortProcessor; case 29: return new LabelAndNodeSizeProcessor; case 5: return new LabelDummyInserter; case 50: return new LabelDummyRemover; case 34: return new LabelDummySwitcher; case 36: return new LabelSideSelector; case 52: return new EndLabelSorter; case 11: return new LayerConstraintPostprocessor; case 7: return new LayerConstraintPreprocessor; case 39: return new LayerSizeAndGraphHeightCalculator; case 45: return new LongEdgeJoiner; case 16: return new LongEdgeSplitter; case 10: return new NodePromotion; case 48: return new NorthSouthPortPostprocessor; case 21: return new NorthSouthPortPreprocessor; case 23: return new LayerSweepCrossingMinimizer(($clinit_LayerSweepCrossingMinimizer$CrossMinType() , ONE_SIDED_GREEDY_SWITCH_0)); case 8: return new PartitionMidprocessor; case 12: return new PartitionPostprocessor; case 4: return new PartitionPreprocessor; case 19: return new PortListSorter; case 17: return new PortSideProcessor; case 53: return new ReversedEdgeRestorer; case 6: return new SelfLoopPreProcessor; case 25: return new SelfLoopPortRestorer; case 46: return new SelfLoopPostProcessor; case 31: return new SelfLoopRouter; case 14: return new SemiInteractiveCrossMinProcessor; case 26: return new SingleEdgeGraphWrapper; case 20: return new SortByInputModelProcessor; case 24: return new LayerSweepCrossingMinimizer(($clinit_LayerSweepCrossingMinimizer$CrossMinType() , TWO_SIDED_GREEDY_SWITCH_0)); default:throw toJs(new IllegalArgumentException_0('No implementation is available for the layout processor ' + (this.name_0 != null?this.name_0:'' + this.ordinal))); } } ; var BREAKING_POINT_INSERTER, BREAKING_POINT_PROCESSOR, BREAKING_POINT_REMOVER, CENTER_LABEL_MANAGEMENT_PROCESSOR, COMMENT_NODE_MARGIN_CALCULATOR, COMMENT_POSTPROCESSOR, COMMENT_PREPROCESSOR, CONSTRAINTS_POSTPROCESSOR, DIRECTION_POSTPROCESSOR, DIRECTION_PREPROCESSOR, EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER, END_LABEL_POSTPROCESSOR, END_LABEL_PREPROCESSOR, END_LABEL_SORTER, END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR, FINAL_SPLINE_BENDPOINTS_CALCULATOR, HIERARCHICAL_NODE_RESIZER, HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR, HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR, HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER, HIERARCHICAL_PORT_POSITION_PROCESSOR, HIGH_DEGREE_NODE_LAYER_PROCESSOR, HORIZONTAL_COMPACTOR, HYPEREDGE_DUMMY_MERGER, HYPERNODE_PROCESSOR, INNERMOST_NODE_MARGIN_CALCULATOR, INTERACTIVE_EXTERNAL_PORT_POSITIONER, INVERTED_PORT_PROCESSOR, IN_LAYER_CONSTRAINT_PROCESSOR, LABEL_AND_NODE_SIZE_PROCESSOR, LABEL_DUMMY_INSERTER, LABEL_DUMMY_REMOVER, LABEL_DUMMY_SWITCHER, LABEL_SIDE_SELECTOR, LAYER_CONSTRAINT_POSTPROCESSOR, LAYER_CONSTRAINT_PREPROCESSOR, LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR, LONG_EDGE_JOINER, LONG_EDGE_SPLITTER, NODE_PROMOTION, NORTH_SOUTH_PORT_POSTPROCESSOR, NORTH_SOUTH_PORT_PREPROCESSOR, ONE_SIDED_GREEDY_SWITCH, PARTITION_MIDPROCESSOR, PARTITION_POSTPROCESSOR, PARTITION_PREPROCESSOR, PORT_LIST_SORTER, PORT_SIDE_PROCESSOR, REVERSED_EDGE_RESTORER, SELF_LOOP_PORT_RESTORER, SELF_LOOP_POSTPROCESSOR, SELF_LOOP_PREPROCESSOR, SELF_LOOP_ROUTER, SEMI_INTERACTIVE_CROSSMIN_PROCESSOR, SINGLE_EDGE_GRAPH_WRAPPER, SORT_BY_INPUT_ORDER_OF_MODEL, TWO_SIDED_GREEDY_SWITCH; var Lorg_eclipse_elk_alg_layered_intermediate_IntermediateProcessorStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.layered.intermediate', 'IntermediateProcessorStrategy', 81, Ljava_lang_Enum_2_classLit, values_38, valueOf_30); function $clinit_IntermediateProcessorStrategy$Map(){ $clinit_IntermediateProcessorStrategy$Map = emptyMethod; $MAP_20 = createValueOfMap(values_38()); } var $MAP_20; function $createEastPortSideDummies(layeredGraph, eastwardPort, edge, layerNodeList){ var dummy, dummyEdge, dummyInput, dummyOutput, label_0, labelIterator, labelPlacement; if (edge.source.owner == eastwardPort.owner) { return; } dummy = new LNode(layeredGraph); $setType(dummy, ($clinit_LNode$NodeType() , LONG_EDGE)); $setProperty_0(dummy, ($clinit_InternalProperties_1() , ORIGIN_0), edge); $setProperty_0(dummy, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0), ($clinit_PortConstraints() , FIXED_POS)); push_1(layerNodeList.array, dummy); dummyInput = new LPort; $setNode(dummyInput, dummy); $setSide(dummyInput, ($clinit_PortSide() , WEST_2)); dummyOutput = new LPort; $setNode(dummyOutput, dummy); $setSide(dummyOutput, EAST_2); $setTarget_0(edge, dummyInput); dummyEdge = new LEdge; $copyProperties(dummyEdge, edge); $setProperty_0(dummyEdge, JUNCTION_POINTS, null); $setSource_0(dummyEdge, dummyOutput); $setTarget_0(dummyEdge, eastwardPort); $setLongEdgeSourceAndTarget(dummy, dummyInput, dummyOutput); labelIterator = new AbstractList$ListIteratorImpl(edge.labels, 0); while (labelIterator.i < labelIterator.this$01_0.size_1()) { label_0 = (checkCriticalElement(labelIterator.i < labelIterator.this$01_0.size_1()) , castTo(labelIterator.this$01_0.get_0(labelIterator.last = labelIterator.i++), 72)); labelPlacement = castTo($getProperty(label_0, EDGE_LABELS_PLACEMENT), 278); if (labelPlacement == ($clinit_EdgeLabelPlacement() , HEAD)) { $hasProperty(label_0, END_LABEL_EDGE) || $setProperty_0(label_0, END_LABEL_EDGE, edge); $remove_8(labelIterator); $add_3(dummyEdge.labels, label_0); } } } function $createWestPortSideDummies(layeredGraph, westwardPort, edge, layerNodeList){ var dummy, dummyEdge, dummyInput, dummyOutput, label_0, labelIterator, originalTarget; if (edge.target.owner == westwardPort.owner) { return; } dummy = new LNode(layeredGraph); $setType(dummy, ($clinit_LNode$NodeType() , LONG_EDGE)); $setProperty_0(dummy, ($clinit_InternalProperties_1() , ORIGIN_0), edge); $setProperty_0(dummy, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0), ($clinit_PortConstraints() , FIXED_POS)); push_1(layerNodeList.array, dummy); dummyInput = new LPort; $setNode(dummyInput, dummy); $setSide(dummyInput, ($clinit_PortSide() , WEST_2)); dummyOutput = new LPort; $setNode(dummyOutput, dummy); $setSide(dummyOutput, EAST_2); originalTarget = edge.target; $setTarget_0(edge, dummyInput); dummyEdge = new LEdge; $copyProperties(dummyEdge, edge); $setProperty_0(dummyEdge, JUNCTION_POINTS, null); $setSource_0(dummyEdge, dummyOutput); $setTarget_0(dummyEdge, originalTarget); labelIterator = new AbstractList$ListIteratorImpl(edge.labels, 0); while (labelIterator.i < labelIterator.this$01_0.size_1()) { label_0 = (checkCriticalElement(labelIterator.i < labelIterator.this$01_0.size_1()) , castTo(labelIterator.this$01_0.get_0(labelIterator.last = labelIterator.i++), 72)); if (maskUndefined($getProperty(label_0, EDGE_LABELS_PLACEMENT)) === maskUndefined(($clinit_EdgeLabelPlacement() , HEAD))) { $setProperty_0(label_0, END_LABEL_EDGE, edge); $remove_8(labelIterator); $add_3(dummyEdge.labels, label_0); } } $setLongEdgeSourceAndTarget(dummy, dummyInput, dummyOutput); } function $process_24(layeredGraph, monitor){ var currentLayer, edge, edge$array, edge$index, edge$max, edgeArray, edges, layerIterator, layers, node, node$iterator, node$iterator0, node$iterator1, port, port$iterator, port$iterator0, previousLayer, unassignedNodes; monitor.begin('Inverted port preprocessing', 1); layers = layeredGraph.layers; layerIterator = new AbstractList$ListIteratorImpl(layers, 0); currentLayer = null; unassignedNodes = new ArrayList; while (layerIterator.i < layerIterator.this$01_0.size_1()) { previousLayer = currentLayer; currentLayer = (checkCriticalElement(layerIterator.i < layerIterator.this$01_0.size_1()) , castTo(layerIterator.this$01_0.get_0(layerIterator.last = layerIterator.i++), 30)); for (node$iterator0 = new ArrayList$1(unassignedNodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); $setLayer_0(node, previousLayer); } unassignedNodes.array.length = 0; for (node$iterator1 = new ArrayList$1(currentLayer.nodes); node$iterator1.i < node$iterator1.this$01.array.length;) { node = castTo($next_6(node$iterator1), 10); if (node.type_0 != ($clinit_LNode$NodeType() , NORMAL)) { continue; } if (!$isSideFixed(castTo($getProperty(node, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101))) { continue; } for (port$iterator0 = $getPorts_0(node, ($clinit_PortType() , INPUT), ($clinit_PortSide() , EAST_2)).iterator_0(); port$iterator0.hasNext_0();) { port = castTo(port$iterator0.next_1(), 12); edges = port.incomingEdges; edgeArray = castTo($toArray_1(edges, initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LEdge_2_classLit, $intern_106, 18, edges.array.length, 0, 1)), 483); for (edge$array = edgeArray , edge$index = 0 , edge$max = edge$array.length; edge$index < edge$max; ++edge$index) { edge = edge$array[edge$index]; $createEastPortSideDummies(layeredGraph, port, edge, unassignedNodes); } } for (port$iterator = $getPorts_0(node, OUTPUT, WEST_2).iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); edges = port.outgoingEdges; edgeArray = castTo($toArray_1(edges, initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LEdge_2_classLit, $intern_106, 18, edges.array.length, 0, 1)), 483); for (edge$array = edgeArray , edge$index = 0 , edge$max = edge$array.length; edge$index < edge$max; ++edge$index) { edge = edge$array[edge$index]; $createWestPortSideDummies(layeredGraph, port, edge, unassignedNodes); } } } } for (node$iterator = new ArrayList$1(unassignedNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); $setLayer_0(node, currentLayer); } monitor.done_1(); } function $setLongEdgeSourceAndTarget(longEdgeDummy, dummyInputPort, dummyOutputPort){ var sourceNode, sourceNodeType, sourcePort, targetNode, targetNodeType, targetPort; sourcePort = castTo($get_11(dummyInputPort.incomingEdges, 0), 18).source; sourceNode = sourcePort.owner; sourceNodeType = sourceNode.type_0; targetPort = castTo($get_11(dummyOutputPort.outgoingEdges, 0), 18).target; targetNode = targetPort.owner; targetNodeType = targetNode.type_0; sourceNodeType == ($clinit_LNode$NodeType() , LONG_EDGE)?$setProperty_0(longEdgeDummy, ($clinit_InternalProperties_1() , LONG_EDGE_SOURCE), castTo($getProperty(sourceNode, LONG_EDGE_SOURCE), 12)):$setProperty_0(longEdgeDummy, ($clinit_InternalProperties_1() , LONG_EDGE_SOURCE), sourcePort); targetNodeType == LONG_EDGE?$setProperty_0(longEdgeDummy, ($clinit_InternalProperties_1() , LONG_EDGE_TARGET), castTo($getProperty(targetNode, LONG_EDGE_TARGET), 12)):$setProperty_0(longEdgeDummy, ($clinit_InternalProperties_1() , LONG_EDGE_TARGET), targetPort); } function InvertedPortProcessor(){ } defineClass(1605, 1, $intern_105, InvertedPortProcessor); _.process = function process_22(layeredGraph, monitor){ $process_24(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_InvertedPortProcessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'InvertedPortProcessor', 1605); function $computePortLabelBox(dummyPort, labelLabelSpacing){ var label_0, label$iterator, labelSize, result; if (dummyPort.labels.array.length == 0) { return null; } else { result = new ElkRectangle; for (label$iterator = new ArrayList$1(dummyPort.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 72); labelSize = label_0.size_0; result.width_0 = $wnd.Math.max(result.width_0, labelSize.x_0); result.height += labelSize.y_0; } result.height += (dummyPort.labels.array.length - 1) * labelLabelSpacing; return result; } } function $lambda$2(portLabelPlacement_1, placeNextToPort_2, treatAsGroup_3, dummy_3){ $placeExternalPortDummyLabels(dummy_3, portLabelPlacement_1, placeNextToPort_2, treatAsGroup_3); } function $placeExternalPortDummyLabels(dummy, graphPortLabelPlacement, placeNextToPortIfPossible, treatAsGroup){ var currentY, dummyPort, dummyPortPos, dummySize, label_0, label$iterator, labelHeight, labelLabelSpacing, labelPortSpacingHorizontal, labelPortSpacingVertical, labelPos, portLabelBox; labelPortSpacingHorizontal = $doubleValue(castToDouble($getProperty(dummy, ($clinit_LayeredOptions() , SPACING_LABEL_PORT_HORIZONTAL)))); labelPortSpacingVertical = $doubleValue(castToDouble($getProperty(dummy, SPACING_LABEL_PORT_VERTICAL))); labelLabelSpacing = $doubleValue(castToDouble($getProperty(dummy, SPACING_LABEL_LABEL))); dummySize = dummy.size_0; dummyPort = castTo($get_11(dummy.ports, 0), 12); dummyPortPos = dummyPort.pos; portLabelBox = $computePortLabelBox(dummyPort, labelLabelSpacing); if (!portLabelBox) { return; } if (graphPortLabelPlacement.contains(($clinit_PortLabelPlacement() , INSIDE_0))) { switch (castTo($getProperty(dummy, ($clinit_InternalProperties_1() , EXT_PORT_SIDE)), 64).ordinal) { case 1: portLabelBox.x_0 = (dummySize.x_0 - portLabelBox.width_0) / 2 - dummyPortPos.x_0; portLabelBox.y_0 = labelPortSpacingVertical; break; case 3: portLabelBox.x_0 = (dummySize.x_0 - portLabelBox.width_0) / 2 - dummyPortPos.x_0; portLabelBox.y_0 = -labelPortSpacingVertical - portLabelBox.height; break; case 2: if (placeNextToPortIfPossible && dummyPort.incomingEdges.array.length == 0 && dummyPort.outgoingEdges.array.length == 0) { labelHeight = treatAsGroup?portLabelBox.height:castTo($get_11(dummyPort.labels, 0), 72).size_0.y_0; portLabelBox.y_0 = (dummySize.y_0 - labelHeight) / 2 - dummyPortPos.y_0; } else { portLabelBox.y_0 = dummySize.y_0 + labelPortSpacingVertical - dummyPortPos.y_0; } portLabelBox.x_0 = -labelPortSpacingHorizontal - portLabelBox.width_0; break; case 4: if (placeNextToPortIfPossible && dummyPort.incomingEdges.array.length == 0 && dummyPort.outgoingEdges.array.length == 0) { labelHeight = treatAsGroup?portLabelBox.height:castTo($get_11(dummyPort.labels, 0), 72).size_0.y_0; portLabelBox.y_0 = (dummySize.y_0 - labelHeight) / 2 - dummyPortPos.y_0; } else { portLabelBox.y_0 = dummySize.y_0 + labelPortSpacingVertical - dummyPortPos.y_0; } portLabelBox.x_0 = labelPortSpacingHorizontal; } } else if (graphPortLabelPlacement.contains(OUTSIDE_0)) { switch (castTo($getProperty(dummy, ($clinit_InternalProperties_1() , EXT_PORT_SIDE)), 64).ordinal) { case 1: case 3: portLabelBox.x_0 = dummyPortPos.x_0 + labelPortSpacingHorizontal; break; case 2: case 4: if (placeNextToPortIfPossible && !dummyPort.connectedToExternalNodes) { labelHeight = treatAsGroup?portLabelBox.height:castTo($get_11(dummyPort.labels, 0), 72).size_0.y_0; portLabelBox.y_0 = (dummySize.y_0 - labelHeight) / 2 - dummyPortPos.y_0; } else { portLabelBox.y_0 = dummyPortPos.y_0 + labelPortSpacingVertical; } } } currentY = portLabelBox.y_0; for (label$iterator = new ArrayList$1(dummyPort.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 72); labelPos = label_0.pos; labelPos.x_0 = portLabelBox.x_0; labelPos.y_0 = currentY; currentY += label_0.size_0.y_0 + labelLabelSpacing; } } function $process_25(layeredGraph, monitor){ var layer, layer$iterator, placeNextToPort, portLabelPlacement, treatAsGroup; monitor.begin('Node and Port Label Placement and Node Sizing', 1); calculateLabelAndNodeSizes(($clinit_LGraphAdapters() , new LGraphAdapters$LGraphAdapter(layeredGraph, true, true, new LabelAndNodeSizeProcessor$lambda$0$Type))); if (castTo($getProperty(layeredGraph, ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21).contains(($clinit_GraphProperties() , EXTERNAL_PORTS))) { portLabelPlacement = castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , PORT_LABELS_PLACEMENT_1)), 21); placeNextToPort = portLabelPlacement.contains(($clinit_PortLabelPlacement() , NEXT_TO_PORT_IF_POSSIBLE_0)); treatAsGroup = $booleanValue(castToBoolean($getProperty(layeredGraph, PORT_LABELS_TREAT_AS_GROUP))); for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); $forEach_3($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(layer.nodes, 16)), new LabelAndNodeSizeProcessor$lambda$1$Type), new LabelAndNodeSizeProcessor$lambda$2$Type(portLabelPlacement, placeNextToPort, treatAsGroup)); } } monitor.done_1(); } function LabelAndNodeSizeProcessor(){ } defineClass(1606, 1, $intern_105, LabelAndNodeSizeProcessor); _.process = function process_23(layeredGraph, monitor){ $process_25(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_LabelAndNodeSizeProcessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LabelAndNodeSizeProcessor', 1606); function LabelAndNodeSizeProcessor$lambda$0$Type(){ } defineClass(1607, 1, $intern_40, LabelAndNodeSizeProcessor$lambda$0$Type); _.test_0 = function test_38(arg0){ return castTo(arg0, 10).type_0 == ($clinit_LNode$NodeType() , NORMAL); } ; var Lorg_eclipse_elk_alg_layered_intermediate_LabelAndNodeSizeProcessor$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LabelAndNodeSizeProcessor/lambda$0$Type', 1607); function LabelAndNodeSizeProcessor$lambda$1$Type(){ } defineClass(1608, 1, $intern_40, LabelAndNodeSizeProcessor$lambda$1$Type); _.test_0 = function test_39(arg0){ return castTo(arg0, 10).type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT); } ; var Lorg_eclipse_elk_alg_layered_intermediate_LabelAndNodeSizeProcessor$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LabelAndNodeSizeProcessor/lambda$1$Type', 1608); function LabelAndNodeSizeProcessor$lambda$2$Type(portLabelPlacement_1, placeNextToPort_2, treatAsGroup_3){ this.portLabelPlacement_1 = portLabelPlacement_1; this.placeNextToPort_2 = placeNextToPort_2; this.treatAsGroup_3 = treatAsGroup_3; } defineClass(1609, 1, $intern_19, LabelAndNodeSizeProcessor$lambda$2$Type); _.accept = function accept_77(arg0){ $lambda$2(this.portLabelPlacement_1, this.placeNextToPort_2, this.treatAsGroup_3, castTo(arg0, 10)); } ; _.placeNextToPort_2 = false; _.treatAsGroup_3 = false; var Lorg_eclipse_elk_alg_layered_intermediate_LabelAndNodeSizeProcessor$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LabelAndNodeSizeProcessor/lambda$2$Type', 1609); function $clinit_LabelDummyInserter(){ $clinit_LabelDummyInserter = emptyMethod; CENTER_LABEL = new LabelDummyInserter$1; } function $createLabelDummy(layeredGraph, edge, thickness, representedLabels){ var dummyNode, dummyPort, dummyPort$iterator, portPos; dummyNode = new LNode(layeredGraph); $setType(dummyNode, ($clinit_LNode$NodeType() , LABEL)); $setProperty_0(dummyNode, ($clinit_InternalProperties_1() , ORIGIN_0), edge); $setProperty_0(dummyNode, REPRESENTED_LABELS, representedLabels); $setProperty_0(dummyNode, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0), ($clinit_PortConstraints() , FIXED_POS)); $setProperty_0(dummyNode, LONG_EDGE_SOURCE, edge.source); $setProperty_0(dummyNode, LONG_EDGE_TARGET, edge.target); splitEdge(edge, dummyNode); portPos = $wnd.Math.floor(thickness / 2); for (dummyPort$iterator = new ArrayList$1(dummyNode.ports); dummyPort$iterator.i < dummyPort$iterator.this$01.array.length;) { dummyPort = castTo($next_6(dummyPort$iterator), 12); dummyPort.pos.y_0 = portPos; } return dummyNode; } function $process_26(layeredGraph, monitor){ var dummyNode, dummySize, edge, edge$iterator, edgeLabelSpacing, iterator, label_0, labelLabelSpacing, layoutDirection, newDummyNodes, node, node$iterator, representedLabels, thickness; monitor.begin('Label dummy insertions', 1); newDummyNodes = new ArrayList; edgeLabelSpacing = $doubleValue(castToDouble($getProperty(layeredGraph, ($clinit_LayeredOptions() , SPACING_EDGE_LABEL_0)))); labelLabelSpacing = $doubleValue(castToDouble($getProperty(layeredGraph, SPACING_LABEL_LABEL))); layoutDirection = castTo($getProperty(layeredGraph, DIRECTION), 88); for (node$iterator = new ArrayList$1(layeredGraph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); if (edge.source.owner != edge.target.owner && any_0(edge.labels, CENTER_LABEL)) { thickness = $retrieveThickness(edge); representedLabels = newArrayListWithCapacity(edge.labels.array.length); dummyNode = $createLabelDummy(layeredGraph, edge, thickness, representedLabels); push_1(newDummyNodes.array, dummyNode); dummySize = dummyNode.size_0; iterator = new AbstractList$ListIteratorImpl(edge.labels, 0); while (iterator.i < iterator.this$01_0.size_1()) { label_0 = (checkCriticalElement(iterator.i < iterator.this$01_0.size_1()) , castTo(iterator.this$01_0.get_0(iterator.last = iterator.i++), 72)); if (maskUndefined($getProperty(label_0, EDGE_LABELS_PLACEMENT)) === maskUndefined(($clinit_EdgeLabelPlacement() , CENTER_5))) { if (layoutDirection == ($clinit_Direction_0() , UP_1) || layoutDirection == DOWN_1) { dummySize.x_0 += label_0.size_0.x_0 + labelLabelSpacing; dummySize.y_0 = $wnd.Math.max(dummySize.y_0, label_0.size_0.y_0); } else { dummySize.x_0 = $wnd.Math.max(dummySize.x_0, label_0.size_0.x_0); dummySize.y_0 += label_0.size_0.y_0 + labelLabelSpacing; } push_1(representedLabels.array, label_0); $remove_8(iterator); } } if (layoutDirection == ($clinit_Direction_0() , UP_1) || layoutDirection == DOWN_1) { dummySize.x_0 -= labelLabelSpacing; dummySize.y_0 += edgeLabelSpacing + thickness; } else { dummySize.y_0 += edgeLabelSpacing - labelLabelSpacing + thickness; } } } } $addAll_2(layeredGraph.layerlessNodes, newDummyNodes); monitor.done_1(); } function $retrieveThickness(edge){ var thickness; thickness = $doubleValue(castToDouble($getProperty(edge, ($clinit_LayeredOptions() , EDGE_THICKNESS_0)))); if (thickness < 0) { thickness = 0; $setProperty_0(edge, EDGE_THICKNESS_0, thickness); } return thickness; } function LabelDummyInserter(){ $clinit_LabelDummyInserter(); } defineClass(1610, 1, $intern_105, LabelDummyInserter); _.process = function process_24(layeredGraph, monitor){ $process_26(castTo(layeredGraph, 36), monitor); } ; var CENTER_LABEL; var Lorg_eclipse_elk_alg_layered_intermediate_LabelDummyInserter_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LabelDummyInserter', 1610); function LabelDummyInserter$1(){ } defineClass(1611, 1, $intern_89, LabelDummyInserter$1); _.apply_1 = function apply_88(label_0){ return maskUndefined($getProperty(castTo(label_0, 72), ($clinit_LayeredOptions() , EDGE_LABELS_PLACEMENT))) === maskUndefined(($clinit_EdgeLabelPlacement() , CENTER_5)); } ; _.equals_0 = function equals_118(other){ return this === other; } ; _.test_0 = function test_40(input_0){ return maskUndefined($getProperty(castTo(input_0, 72), ($clinit_LayeredOptions() , EDGE_LABELS_PLACEMENT))) === maskUndefined(($clinit_EdgeLabelPlacement() , CENTER_5)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_LabelDummyInserter$1_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LabelDummyInserter/1', 1611); function $placeLabelsForHorizontalLayout(labels, labelPos, labelSpacing, labelSpace){ var label_0, label$iterator; for (label$iterator = labels.iterator_0(); label$iterator.hasNext_0();) { label_0 = castTo(label$iterator.next_1(), 72); label_0.pos.x_0 = labelPos.x_0 + (labelSpace.x_0 - label_0.size_0.x_0) / 2; label_0.pos.y_0 = labelPos.y_0; labelPos.y_0 += label_0.size_0.y_0 + labelSpacing; } } function $placeLabelsForVerticalLayout(labels, labelPos, labelSpacing, labelSpace, leftAligned, layoutDirection){ var effectiveLabels, inline, label_0, label$iterator; inline = !$spliterator($filter(labels.stream(), new Predicate$lambda$2$Type(new LabelDummyRemover$lambda$0$Type))).tryAdvance(($clinit_StreamImpl() , NULL_CONSUMER)); effectiveLabels = labels; layoutDirection == ($clinit_Direction_0() , UP_1) && (effectiveLabels = reverse_0(effectiveLabels)); for (label$iterator = effectiveLabels.iterator_0(); label$iterator.hasNext_0();) { label_0 = castTo(label$iterator.next_1(), 72); label_0.pos.x_0 = labelPos.x_0; inline?(label_0.pos.y_0 = labelPos.y_0 + (labelSpace.y_0 - label_0.size_0.y_0) / 2):leftAligned?(label_0.pos.y_0 = labelPos.y_0):(label_0.pos.y_0 = labelPos.y_0 + labelSpace.y_0 - label_0.size_0.y_0); labelPos.x_0 += label_0.size_0.x_0 + labelSpacing; } } function $process_27(layeredGraph, monitor){ var currLabelPos, edgeLabelSpacing, labelLabelSpacing, labelSpace, labelsBelowEdge, layer, layer$iterator, layoutDirection, node, nodeIterator, originEdge, representedLabels, thickness; monitor.begin('Label dummy removal', 1); edgeLabelSpacing = $doubleValue(castToDouble($getProperty(layeredGraph, ($clinit_LayeredOptions() , SPACING_EDGE_LABEL_0)))); labelLabelSpacing = $doubleValue(castToDouble($getProperty(layeredGraph, SPACING_LABEL_LABEL))); layoutDirection = castTo($getProperty(layeredGraph, DIRECTION), 88); for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); nodeIterator = new AbstractList$ListIteratorImpl(layer.nodes, 0); while (nodeIterator.i < nodeIterator.this$01_0.size_1()) { node = (checkCriticalElement(nodeIterator.i < nodeIterator.this$01_0.size_1()) , castTo(nodeIterator.this$01_0.get_0(nodeIterator.last = nodeIterator.i++), 10)); if (node.type_0 == ($clinit_LNode$NodeType() , LABEL)) { originEdge = castTo($getProperty(node, ($clinit_InternalProperties_1() , ORIGIN_0)), 18); thickness = $doubleValue(castToDouble($getProperty(originEdge, EDGE_THICKNESS_0))); labelsBelowEdge = maskUndefined($getProperty(node, LABEL_SIDE)) === maskUndefined(($clinit_LabelSide() , BELOW)); currLabelPos = new KVector_2(node.pos); labelsBelowEdge && (currLabelPos.y_0 += thickness + edgeLabelSpacing); labelSpace = new KVector_1(node.size_0.x_0, node.size_0.y_0 + (node.type_0 == LABEL && !$spliterator($filter(castTo($getProperty(node, REPRESENTED_LABELS), 15).stream(), new Predicate$lambda$2$Type(new LNode$lambda$0$Type))).tryAdvance(($clinit_StreamImpl() , NULL_CONSUMER))?0:-thickness - edgeLabelSpacing)); representedLabels = castTo($getProperty(node, REPRESENTED_LABELS), 15); layoutDirection == ($clinit_Direction_0() , UP_1) || layoutDirection == DOWN_1?$placeLabelsForVerticalLayout(representedLabels, currLabelPos, labelLabelSpacing, labelSpace, labelsBelowEdge, layoutDirection):$placeLabelsForHorizontalLayout(representedLabels, currLabelPos, labelLabelSpacing, labelSpace); $addAll_2(originEdge.labels, representedLabels); joinAt(node, maskUndefined($getProperty(layeredGraph, EDGE_ROUTING)) === maskUndefined(($clinit_EdgeRouting() , POLYLINE))); $remove_8(nodeIterator); } } } monitor.done_1(); } function LabelDummyRemover(){ } defineClass(1612, 1, $intern_105, LabelDummyRemover); _.process = function process_25(layeredGraph, monitor){ $process_27(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_LabelDummyRemover_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LabelDummyRemover', 1612); function LabelDummyRemover$lambda$0$Type(){ } defineClass(1613, 1, $intern_40, LabelDummyRemover$lambda$0$Type); _.test_0 = function test_41(arg0){ return $booleanValue(castToBoolean($getProperty(castTo(arg0, 72), ($clinit_LayeredOptions() , EDGE_LABELS_INLINE_0)))); } ; var Lorg_eclipse_elk_alg_layered_intermediate_LabelDummyRemover$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LabelDummyRemover/lambda$0$Type', 1613); function $clinit_LabelDummySwitcher(){ $clinit_LabelDummySwitcher = emptyMethod; INCLUDE_LABEL = new Property_0('edgelabelcenterednessanalysis.includelabel', ($clinit_Boolean() , FALSE_0)); } function $assignIdsToLayers(layeredGraph){ var layer, layer$iterator, layerIndex; layerIndex = 0; for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); layer.id_0 = layerIndex; ++layerIndex; } } function $assignLayer(this$static, labelDummyInfo, targetLayerIndex){ var label_0, label$iterator, newLayerId; targetLayerIndex != labelDummyInfo.leftmostLayerId + labelDummyInfo.leftLongEdgeDummies.size_1() && $swapNodes(labelDummyInfo.labelDummy, $ithDummyNode(labelDummyInfo, targetLayerIndex - labelDummyInfo.leftmostLayerId)); newLayerId = labelDummyInfo.labelDummy.layer.id_0; this$static.layerWidths[newLayerId] = $wnd.Math.max(this$static.layerWidths[newLayerId], labelDummyInfo.labelDummy.size_0.x_0); for (label$iterator = castTo($getProperty(labelDummyInfo.labelDummy, ($clinit_InternalProperties_1() , REPRESENTED_LABELS)), 15).iterator_0(); label$iterator.hasNext_0();) { label_0 = castTo(label$iterator.next_1(), 72); $setProperty_0(label_0, INCLUDE_LABEL, ($clinit_Boolean() , true)); } } function $assignToWiderLayer(this$static, labelDummyInfo){ var dummyWidth, layer, layer$iterator, validLayers; dummyWidth = labelDummyInfo.labelDummy.size_0.x_0; validLayers = new AbstractList$SubList($getGraph(labelDummyInfo.labelDummy).layers, labelDummyInfo.leftmostLayerId, labelDummyInfo.rightmostLayerId + 1); for (layer$iterator = new AbstractList$IteratorImpl(validLayers); layer$iterator.i < layer$iterator.this$01_0.size_1();) { layer = (checkCriticalElement(layer$iterator.i < layer$iterator.this$01_0.size_1()) , castTo(layer$iterator.this$01_0.get_0(layer$iterator.last = layer$iterator.i++), 30)); if (layer.size_0.x_0 >= dummyWidth) { $assignLayer(this$static, labelDummyInfo, layer.id_0); return true; } } return false; } function $calculateLayerWidths(this$static, layeredGraph){ var layer, layer$iterator; for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); this$static.layerWidths[layer.id_0] = findMaxNonDummyNodeWidth(layer); } } function $computeLayerWidthSums(this$static, labelDummyInfo){ var currentIndex, currentWidthSum, edgeNodeSpacing, layerWidthSums, leftDummy, leftDummy$iterator, lgraph, minSpaceBetweenLayers, nodeNodeSpacing, rightDummy, rightDummy$iterator; lgraph = $getGraph(labelDummyInfo.labelDummy); edgeNodeSpacing = $doubleValue(castToDouble($getProperty(lgraph, ($clinit_LayeredOptions() , SPACING_EDGE_NODE_BETWEEN_LAYERS_0)))) * 2; nodeNodeSpacing = $doubleValue(castToDouble($getProperty(lgraph, SPACING_NODE_NODE_BETWEEN_LAYERS_0))); minSpaceBetweenLayers = $wnd.Math.max(edgeNodeSpacing, nodeNodeSpacing); layerWidthSums = initUnidimensionalArray(D_classLit, $intern_66, 28, labelDummyInfo.rightmostLayerId - labelDummyInfo.leftmostLayerId + 1, 15, 1); currentWidthSum = -minSpaceBetweenLayers; currentIndex = 0; for (leftDummy$iterator = labelDummyInfo.leftLongEdgeDummies.iterator_0(); leftDummy$iterator.hasNext_0();) { leftDummy = castTo(leftDummy$iterator.next_1(), 10); currentWidthSum += this$static.layerWidths[leftDummy.layer.id_0] + minSpaceBetweenLayers; layerWidthSums[currentIndex++] = currentWidthSum; } currentWidthSum += this$static.layerWidths[labelDummyInfo.labelDummy.layer.id_0] + minSpaceBetweenLayers; layerWidthSums[currentIndex++] = currentWidthSum; for (rightDummy$iterator = new ArrayList$1(labelDummyInfo.rightLongEdgeDummies); rightDummy$iterator.i < rightDummy$iterator.this$01.array.length;) { rightDummy = castTo($next_6(rightDummy$iterator), 10); currentWidthSum += this$static.layerWidths[rightDummy.layer.id_0] + minSpaceBetweenLayers; layerWidthSums[currentIndex++] = currentWidthSum; } return layerWidthSums; } function $computeSpaceEfficientAssignment(this$static, labelDummyInfos){ var labelCount, labelIndex, nonTrivialLabels; nonTrivialLabels = $performTrivialAssignments(this$static, labelDummyInfos); if (nonTrivialLabels.array.length == 0) { return; } $sort(nonTrivialLabels, new LabelDummySwitcher$lambda$4$Type); labelCount = nonTrivialLabels.array.length; for (labelIndex = 0; labelIndex < labelCount; labelIndex++) { $assignLayer(this$static, (checkCriticalElementIndex(labelIndex, nonTrivialLabels.array.length) , castTo(nonTrivialLabels.array[labelIndex], 293)), $findPotentiallyWidestLayer(this$static, nonTrivialLabels, labelIndex)); } } function $doUpdateLongEdgeLabelDummyInfo(labelDummy){ var longEdgeDummy; longEdgeDummy = ($clinit_LabelDummySwitcher() , castTo($next_0(new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(labelDummy).val$inputs1.iterator_0(), new Iterables$10))), 18).source.owner); while (longEdgeDummy.type_0 == ($clinit_LNode$NodeType() , LONG_EDGE)) { $setProperty_0(longEdgeDummy, ($clinit_InternalProperties_1() , LONG_EDGE_BEFORE_LABEL_DUMMY), ($clinit_Boolean() , true)); longEdgeDummy = castTo($next_0(new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(longEdgeDummy).val$inputs1.iterator_0(), new Iterables$10))), 18).source.owner; } } function $findCenterLayerTargetId(this$static, labelDummyInfo){ var i, layerWidthSums, threshold; layerWidthSums = $computeLayerWidthSums(this$static, labelDummyInfo); threshold = layerWidthSums[layerWidthSums.length - 1] / 2; for (i = 0; i < layerWidthSums.length; i++) { if (layerWidthSums[i] >= threshold) { return labelDummyInfo.leftmostLayerId + i; } } return labelDummyInfo.leftmostLayerId + labelDummyInfo.leftLongEdgeDummies.size_1(); } function $findPotentiallyWidestLayer(this$static, labelDummyInfos, labelIndex){ var currLabelInfo, label_0, labelCount, labelDummyInfo, labelDummyWidth, largestUnassignedLabel, layer, potentialWidth, widestLayerIndex, widestLayerWidth; labelCount = labelDummyInfos.array.length; labelDummyInfo = (checkCriticalElementIndex(labelIndex, labelDummyInfos.array.length) , castTo(labelDummyInfos.array[labelIndex], 293)); labelDummyWidth = labelDummyInfo.labelDummy.size_0.x_0; widestLayerIndex = labelDummyInfo.leftmostLayerId; widestLayerWidth = 0; for (layer = labelDummyInfo.leftmostLayerId; layer <= labelDummyInfo.rightmostLayerId; layer++) { if (labelDummyWidth <= this$static.layerWidths[layer]) { return layer; } potentialWidth = this$static.layerWidths[layer]; largestUnassignedLabel = null; for (label_0 = labelIndex + 1; label_0 < labelCount; label_0++) { currLabelInfo = (checkCriticalElementIndex(label_0, labelDummyInfos.array.length) , castTo(labelDummyInfos.array[label_0], 293)); currLabelInfo.leftmostLayerId <= layer && currLabelInfo.rightmostLayerId >= layer && (largestUnassignedLabel = currLabelInfo); } !!largestUnassignedLabel && (potentialWidth = $wnd.Math.max(potentialWidth, largestUnassignedLabel.labelDummy.size_0.x_0)); if (potentialWidth > widestLayerWidth) { widestLayerIndex = layer; widestLayerWidth = potentialWidth; } } return widestLayerIndex; } function $findWidestLayerTargetId(this$static, labelDummyInfo){ var index_0, widestLayerIndex; widestLayerIndex = labelDummyInfo.leftmostLayerId; for (index_0 = widestLayerIndex + 1; index_0 <= labelDummyInfo.rightmostLayerId; index_0++) { this$static.layerWidths[index_0] > this$static.layerWidths[widestLayerIndex] && (widestLayerIndex = index_0); } return widestLayerIndex; } function $gatherLabelDummyInfos(layeredGraph, defaultPlacementStrategy){ var infos, strategy, strategy$array, strategy$index, strategy$max; infos = new EnumMap(Lorg_eclipse_elk_alg_layered_options_CenterEdgeLabelPlacementStrategy_2_classLit); for (strategy$array = ($clinit_CenterEdgeLabelPlacementStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_CenterEdgeLabelPlacementStrategy_2_classLit, 1), $intern_37, 232, 0, [MEDIAN_LAYER, TAIL_LAYER, HEAD_LAYER, SPACE_EFFICIENT_LAYER, WIDEST_LAYER, CENTER_LAYER])) , strategy$index = 0 , strategy$max = strategy$array.length; strategy$index < strategy$max; ++strategy$index) { strategy = strategy$array[strategy$index]; $put_8(infos, strategy, new ArrayList); } $forEach_3($map($filter($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(layeredGraph.layers, 16)), new LabelDummySwitcher$lambda$0$Type), new LabelDummySwitcher$lambda$1$Type), new LabelDummySwitcher$lambda$2$Type(defaultPlacementStrategy)), new LabelDummySwitcher$lambda$3$Type(infos)); return infos; } function $isPartOfReversedEdge(labelDummyInfo){ var incoming, outgoing; incoming = castTo($next_0(new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(labelDummyInfo.labelDummy).val$inputs1.iterator_0(), new Iterables$10))), 18); outgoing = castTo($next_0(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(labelDummyInfo.labelDummy).val$inputs1.iterator_0(), new Iterables$10))), 18); return $booleanValue(castToBoolean($getProperty(incoming, ($clinit_InternalProperties_1() , REVERSED)))) || $booleanValue(castToBoolean($getProperty(outgoing, REVERSED))); } function $performTrivialAssignments(this$static, labelDummyInfos){ var labelDummyInfo, labelDummyInfo$iterator, remainingLabels; remainingLabels = new ArrayList_0(labelDummyInfos.size_1()); for (labelDummyInfo$iterator = labelDummyInfos.iterator_0(); labelDummyInfo$iterator.hasNext_0();) { labelDummyInfo = castTo(labelDummyInfo$iterator.next_1(), 293); labelDummyInfo.leftmostLayerId == labelDummyInfo.rightmostLayerId?$assignLayer(this$static, labelDummyInfo, labelDummyInfo.leftmostLayerId):$assignToWiderLayer(this$static, labelDummyInfo) || (push_1(remainingLabels.array, labelDummyInfo) , true); } return remainingLabels; } function $process_28(this$static, layeredGraph, monitor){ var defaultPlacementStrategy, labelDummyInfos, strategy, strategy$array, strategy$array0, strategy$array1, strategy$index, strategy$index0, strategy$index1, strategy$max, strategy$max0, strategy$max1; monitor.begin('Label dummy switching', 1); defaultPlacementStrategy = castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , EDGE_LABELS_CENTER_LABEL_PLACEMENT_STRATEGY_0)), 232); $assignIdsToLayers(layeredGraph); labelDummyInfos = $gatherLabelDummyInfos(layeredGraph, defaultPlacementStrategy); this$static.layerWidths = initUnidimensionalArray(D_classLit, $intern_66, 28, layeredGraph.layers.array.length, 15, 1); for (strategy$array0 = ($clinit_CenterEdgeLabelPlacementStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_CenterEdgeLabelPlacementStrategy_2_classLit, 1), $intern_37, 232, 0, [MEDIAN_LAYER, TAIL_LAYER, HEAD_LAYER, SPACE_EFFICIENT_LAYER, WIDEST_LAYER, CENTER_LAYER])) , strategy$index0 = 0 , strategy$max0 = strategy$array0.length; strategy$index0 < strategy$max0; ++strategy$index0) { strategy = strategy$array0[strategy$index0]; if ((strategy == WIDEST_LAYER || strategy == CENTER_LAYER || strategy == SPACE_EFFICIENT_LAYER) && !castTo($containsEnum(labelDummyInfos.keySet, strategy)?labelDummyInfos.values[strategy.ordinal]:null, 15).isEmpty()) { $calculateLayerWidths(this$static, layeredGraph); break; } } for (strategy$array1 = stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_CenterEdgeLabelPlacementStrategy_2_classLit, 1), $intern_37, 232, 0, [MEDIAN_LAYER, TAIL_LAYER, HEAD_LAYER, SPACE_EFFICIENT_LAYER, WIDEST_LAYER, CENTER_LAYER]) , strategy$index1 = 0 , strategy$max1 = strategy$array1.length; strategy$index1 < strategy$max1; ++strategy$index1) { strategy = strategy$array1[strategy$index1]; strategy == WIDEST_LAYER || strategy == CENTER_LAYER || strategy == SPACE_EFFICIENT_LAYER || $processStrategy(this$static, castTo($containsEnum(labelDummyInfos.keySet, strategy)?labelDummyInfos.values[strategy.ordinal]:null, 15)); } for (strategy$array = stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_CenterEdgeLabelPlacementStrategy_2_classLit, 1), $intern_37, 232, 0, [MEDIAN_LAYER, TAIL_LAYER, HEAD_LAYER, SPACE_EFFICIENT_LAYER, WIDEST_LAYER, CENTER_LAYER]) , strategy$index = 0 , strategy$max = strategy$array.length; strategy$index < strategy$max; ++strategy$index) { strategy = strategy$array[strategy$index]; (strategy == WIDEST_LAYER || strategy == CENTER_LAYER || strategy == SPACE_EFFICIENT_LAYER) && $processStrategy(this$static, castTo($containsEnum(labelDummyInfos.keySet, strategy)?labelDummyInfos.values[strategy.ordinal]:null, 15)); } this$static.layerWidths = null; monitor.done_1(); } function $processStrategy(this$static, labelDummyInfos){ var labelDummyInfo, labelDummyInfo$iterator, reversed, reversed0, layers, lowerMedian; if (labelDummyInfos.isEmpty()) { return; } if (castTo(labelDummyInfos.get_0(0), 293).placementStrategy == ($clinit_CenterEdgeLabelPlacementStrategy() , SPACE_EFFICIENT_LAYER)) { $computeSpaceEfficientAssignment(this$static, labelDummyInfos); } else { for (labelDummyInfo$iterator = labelDummyInfos.iterator_0(); labelDummyInfo$iterator.hasNext_0();) { labelDummyInfo = castTo(labelDummyInfo$iterator.next_1(), 293); switch (labelDummyInfo.placementStrategy.ordinal) { case 5: $assignLayer(this$static, labelDummyInfo, $findCenterLayerTargetId(this$static, labelDummyInfo)); break; case 0: $assignLayer(this$static, labelDummyInfo, (layers = labelDummyInfo.rightmostLayerId - labelDummyInfo.leftmostLayerId + 1 , lowerMedian = (layers - 1) / 2 | 0 , labelDummyInfo.leftmostLayerId + lowerMedian)); break; case 4: $assignLayer(this$static, labelDummyInfo, $findWidestLayerTargetId(this$static, labelDummyInfo)); break; case 2: $setEndLayerNodeAlignment(labelDummyInfo); $assignLayer(this$static, labelDummyInfo, (reversed0 = $isPartOfReversedEdge(labelDummyInfo) , reversed0?labelDummyInfo.leftmostLayerId:labelDummyInfo.rightmostLayerId)); break; case 1: $setEndLayerNodeAlignment(labelDummyInfo); $assignLayer(this$static, labelDummyInfo, (reversed = $isPartOfReversedEdge(labelDummyInfo) , reversed?labelDummyInfo.rightmostLayerId:labelDummyInfo.leftmostLayerId)); } $doUpdateLongEdgeLabelDummyInfo(labelDummyInfo.labelDummy); } } } function $setEndLayerNodeAlignment(labelDummyInfo){ var isHeadLabel, isPartOfReversedEdge; isHeadLabel = labelDummyInfo.placementStrategy == ($clinit_CenterEdgeLabelPlacementStrategy() , HEAD_LAYER); isPartOfReversedEdge = $isPartOfReversedEdge(labelDummyInfo); isHeadLabel && !isPartOfReversedEdge || !isHeadLabel && isPartOfReversedEdge?$setProperty_0(labelDummyInfo.labelDummy, ($clinit_LayeredOptions() , ALIGNMENT), ($clinit_Alignment() , RIGHT_5)):$setProperty_0(labelDummyInfo.labelDummy, ($clinit_LayeredOptions() , ALIGNMENT), ($clinit_Alignment() , LEFT_5)); } function $swapNodes(labelDummy, longEdgeDummy){ var dummy1LayerPosition, dummy2LayerPosition, edge, edge$array, edge$array0, edge$array1, edge$array2, edge$index, edge$index0, edge$index1, edge$index2, edge$max, edge$max0, edge$max1, edge$max2, incomingEdges1, incomingEdges2, inputPort1, inputPort2, layer1, layer2, outgoingEdges1, outgoingEdges2, outputPort1, outputPort2; layer1 = labelDummy.layer; layer2 = longEdgeDummy.layer; dummy1LayerPosition = $indexOf_3(layer1.nodes, labelDummy, 0); dummy2LayerPosition = $indexOf_3(layer2.nodes, longEdgeDummy, 0); inputPort1 = castTo($getPorts(labelDummy, ($clinit_PortType() , INPUT)).iterator_0().next_1(), 12); outputPort1 = castTo($getPorts(labelDummy, OUTPUT).iterator_0().next_1(), 12); inputPort2 = castTo($getPorts(longEdgeDummy, INPUT).iterator_0().next_1(), 12); outputPort2 = castTo($getPorts(longEdgeDummy, OUTPUT).iterator_0().next_1(), 12); incomingEdges1 = toEdgeArray(inputPort1.incomingEdges); outgoingEdges1 = toEdgeArray(outputPort1.outgoingEdges); incomingEdges2 = toEdgeArray(inputPort2.incomingEdges); outgoingEdges2 = toEdgeArray(outputPort2.outgoingEdges); $setLayer(labelDummy, dummy2LayerPosition, layer2); for (edge$array0 = incomingEdges2 , edge$index0 = 0 , edge$max0 = edge$array0.length; edge$index0 < edge$max0; ++edge$index0) { edge = edge$array0[edge$index0]; $setTarget_0(edge, inputPort1); } for (edge$array1 = outgoingEdges2 , edge$index1 = 0 , edge$max1 = edge$array1.length; edge$index1 < edge$max1; ++edge$index1) { edge = edge$array1[edge$index1]; $setSource_0(edge, outputPort1); } $setLayer(longEdgeDummy, dummy1LayerPosition, layer1); for (edge$array2 = incomingEdges1 , edge$index2 = 0 , edge$max2 = edge$array2.length; edge$index2 < edge$max2; ++edge$index2) { edge = edge$array2[edge$index2]; $setTarget_0(edge, inputPort2); } for (edge$array = outgoingEdges1 , edge$index = 0 , edge$max = edge$array.length; edge$index < edge$max; ++edge$index) { edge = edge$array[edge$index]; $setSource_0(edge, outputPort2); } } function LabelDummySwitcher(){ $clinit_LabelDummySwitcher(); } function lambda$2_4(defaultPlacementStrategy_0, labelDummy_1){ $clinit_LabelDummySwitcher(); return new LabelDummySwitcher$LabelDummyInfo(labelDummy_1, defaultPlacementStrategy_0); } function lambda$3_1(infos_0, dummyInfo_1){ $clinit_LabelDummySwitcher(); return castTo($get_14(infos_0, dummyInfo_1.placementStrategy), 15).add_2(dummyInfo_1); } function lambda$4_5(info1_0, info2_1){ $clinit_LabelDummySwitcher(); return compare_4(info2_1.labelDummy.size_0.x_0, info1_0.labelDummy.size_0.x_0); } defineClass(1378, 1, $intern_105, LabelDummySwitcher); _.process = function process_26(layeredGraph, monitor){ $process_28(this, castTo(layeredGraph, 36), monitor); } ; _.layerWidths = null; var INCLUDE_LABEL; var Lorg_eclipse_elk_alg_layered_intermediate_LabelDummySwitcher_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LabelDummySwitcher', 1378); function $gatherLeftLongEdgeDummies(this$static){ var source; source = this$static.labelDummy; do { source = castTo($next_0(new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(source).val$inputs1.iterator_0(), new Iterables$10))), 18).source.owner; source.type_0 == ($clinit_LNode$NodeType() , LONG_EDGE) && this$static.leftLongEdgeDummies.add_2(source); } while (source.type_0 == ($clinit_LNode$NodeType() , LONG_EDGE)); this$static.leftLongEdgeDummies = reverse_0(this$static.leftLongEdgeDummies); } function $gatherRightLongEdgeDummies(this$static){ var target; target = this$static.labelDummy; do { target = castTo($next_0(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(target).val$inputs1.iterator_0(), new Iterables$10))), 18).target.owner; target.type_0 == ($clinit_LNode$NodeType() , LONG_EDGE) && $add_3(this$static.rightLongEdgeDummies, target); } while (target.type_0 == ($clinit_LNode$NodeType() , LONG_EDGE)); } function $ithDummyNode(this$static, i){ return i < this$static.leftLongEdgeDummies.size_1()?castTo(this$static.leftLongEdgeDummies.get_0(i), 10):i == this$static.leftLongEdgeDummies.size_1()?this$static.labelDummy:castTo($get_11(this$static.rightLongEdgeDummies, i - this$static.leftLongEdgeDummies.size_1() - 1), 10); } function LabelDummySwitcher$LabelDummyInfo(labelDummy, defaultPlacementStrategy){ var label_0, label$iterator; this.leftLongEdgeDummies = new ArrayList; this.rightLongEdgeDummies = new ArrayList; this.labelDummy = labelDummy; this.placementStrategy = defaultPlacementStrategy; $gatherLeftLongEdgeDummies(this); $gatherRightLongEdgeDummies(this); this.leftLongEdgeDummies.isEmpty()?(this.leftmostLayerId = labelDummy.layer.id_0):(this.leftmostLayerId = castTo(this.leftLongEdgeDummies.get_0(0), 10).layer.id_0); this.rightLongEdgeDummies.array.length == 0?(this.rightmostLayerId = labelDummy.layer.id_0):(this.rightmostLayerId = castTo($get_11(this.rightLongEdgeDummies, this.rightLongEdgeDummies.array.length - 1), 10).layer.id_0); for (label$iterator = castTo($getProperty(labelDummy, ($clinit_InternalProperties_1() , REPRESENTED_LABELS)), 15).iterator_0(); label$iterator.hasNext_0();) { label_0 = castTo(label$iterator.next_1(), 72); if ($hasProperty(label_0, ($clinit_LayeredOptions() , EDGE_LABELS_CENTER_LABEL_PLACEMENT_STRATEGY_0))) { this.placementStrategy = castTo($getProperty(label_0, EDGE_LABELS_CENTER_LABEL_PLACEMENT_STRATEGY_0), 232); break; } } } defineClass(293, 1, {293:1}, LabelDummySwitcher$LabelDummyInfo); _.leftmostLayerId = 0; _.placementStrategy = null; _.rightmostLayerId = 0; var Lorg_eclipse_elk_alg_layered_intermediate_LabelDummySwitcher$LabelDummyInfo_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LabelDummySwitcher/LabelDummyInfo', 293); function LabelDummySwitcher$lambda$0$Type(){ } defineClass(1379, 1, {}, LabelDummySwitcher$lambda$0$Type); _.apply_0 = function apply_89(arg0){ return $clinit_LabelDummySwitcher() , new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 30).nodes, 16)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_LabelDummySwitcher$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LabelDummySwitcher/lambda$0$Type', 1379); function LabelDummySwitcher$lambda$1$Type(){ } defineClass(1380, 1, $intern_40, LabelDummySwitcher$lambda$1$Type); _.test_0 = function test_42(arg0){ return $clinit_LabelDummySwitcher() , castTo(arg0, 10).type_0 == ($clinit_LNode$NodeType() , LABEL); } ; var Lorg_eclipse_elk_alg_layered_intermediate_LabelDummySwitcher$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LabelDummySwitcher/lambda$1$Type', 1380); function LabelDummySwitcher$lambda$2$Type(defaultPlacementStrategy_0){ this.defaultPlacementStrategy_0 = defaultPlacementStrategy_0; } defineClass(1381, 1, {}, LabelDummySwitcher$lambda$2$Type); _.apply_0 = function apply_90(arg0){ return lambda$2_4(this.defaultPlacementStrategy_0, castTo(arg0, 10)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_LabelDummySwitcher$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LabelDummySwitcher/lambda$2$Type', 1381); function LabelDummySwitcher$lambda$3$Type(infos_0){ this.infos_0 = infos_0; } defineClass(1382, 1, $intern_19, LabelDummySwitcher$lambda$3$Type); _.accept = function accept_78(arg0){ lambda$3_1(this.infos_0, castTo(arg0, 293)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_LabelDummySwitcher$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LabelDummySwitcher/lambda$3$Type', 1382); function LabelDummySwitcher$lambda$4$Type(){ } defineClass(1383, 1, $intern_88, LabelDummySwitcher$lambda$4$Type); _.compare_1 = function compare_46(arg0, arg1){ return lambda$4_5(castTo(arg0, 293), castTo(arg1, 293)); } ; _.equals_0 = function equals_119(other){ return this === other; } ; _.reversed = function reversed_38(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_LabelDummySwitcher$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LabelDummySwitcher/lambda$4$Type', 1383); function $process_29(layeredGraph, monitor){ monitor.begin('Label management', 1); throwClassCastExceptionUnlessNull($getProperty(layeredGraph, ($clinit_LabelManagementOptions() , LABEL_MANAGER))); monitor.done_1(); } function LabelManagementProcessor(){ } defineClass(802, 1, $intern_105, LabelManagementProcessor); _.process = function process_27(layeredGraph, monitor){ $process_29(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_LabelManagementProcessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LabelManagementProcessor', 802); function $applyForDummyNodeRunWithSimpleLoops(dummyNodes, defaultSide){ var currLongEdgeSource, currLongEdgeTarget, currentDummy, currentDummy$iterator, endPort, endPort0, labelDummyRun, prevLongEdgeSource, prevLongEdgeTarget; labelDummyRun = newArrayListWithCapacity(dummyNodes.tail - dummyNodes.head & dummyNodes.array.length - 1); prevLongEdgeSource = null; prevLongEdgeTarget = null; for (currentDummy$iterator = new ArrayDeque$IteratorImpl(dummyNodes); currentDummy$iterator.currentIndex != currentDummy$iterator.fence;) { currentDummy = castTo($next_5(currentDummy$iterator), 10); currLongEdgeSource = (endPort0 = castTo($getProperty(currentDummy, ($clinit_InternalProperties_1() , LONG_EDGE_SOURCE)), 12) , !endPort0?null:endPort0.owner); currLongEdgeTarget = (endPort = castTo($getProperty(currentDummy, LONG_EDGE_TARGET), 12) , !endPort?null:endPort.owner); if (prevLongEdgeSource != currLongEdgeSource || prevLongEdgeTarget != currLongEdgeTarget) { $applyLabelSidesToLabelDummyRun(labelDummyRun, defaultSide); prevLongEdgeSource = currLongEdgeSource; prevLongEdgeTarget = currLongEdgeTarget; } push_1(labelDummyRun.array, currentDummy); } $applyLabelSidesToLabelDummyRun(labelDummyRun, defaultSide); } function $applyLabelSide(labels, side){ var label_0, label$iterator; for (label$iterator = labels.iterator_0(); label$iterator.hasNext_0();) { label_0 = castTo(label$iterator.next_1(), 72); $setProperty_0(label_0, ($clinit_InternalProperties_1() , LABEL_SIDE), side); } } function $applyLabelSide_0(edge, side){ var label_0, label$iterator; for (label$iterator = new ArrayList$1(edge.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 72); $setProperty_0(label_0, ($clinit_InternalProperties_1() , LABEL_SIDE), side); } } function $applyLabelSide_1(labelDummy, side){ var effectiveSide, originEdge, port, port$iterator, portPos, thickness; if (labelDummy.type_0 == ($clinit_LNode$NodeType() , LABEL)) { effectiveSide = labelDummy.type_0 == LABEL && !$spliterator($filter(castTo($getProperty(labelDummy, ($clinit_InternalProperties_1() , REPRESENTED_LABELS)), 15).stream(), new Predicate$lambda$2$Type(new LNode$lambda$0$Type))).tryAdvance(($clinit_StreamImpl() , NULL_CONSUMER))?($clinit_LabelSide() , INLINE):side; $setProperty_0(labelDummy, ($clinit_InternalProperties_1() , LABEL_SIDE), effectiveSide); if (effectiveSide != ($clinit_LabelSide() , BELOW)) { originEdge = castTo($getProperty(labelDummy, ORIGIN_0), 18); thickness = $doubleValue(castToDouble($getProperty(originEdge, ($clinit_LayeredOptions() , EDGE_THICKNESS_0)))); portPos = 0; if (effectiveSide == ABOVE) { portPos = labelDummy.size_0.y_0 - $wnd.Math.ceil(thickness / 2); } else if (effectiveSide == INLINE) { portPos = $wnd.Math.ceil(labelDummy.size_0.y_0 - $doubleValue(castToDouble($getProperty($getGraph(labelDummy), SPACING_EDGE_LABEL_0))) - thickness) / 2; labelDummy.size_0.y_0 -= $doubleValue(castToDouble($getProperty($getGraph(labelDummy), SPACING_EDGE_LABEL_0))); labelDummy.size_0.y_0 -= thickness; } for (port$iterator = new ArrayList$1(labelDummy.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); port.pos.y_0 = portPos; } } } } function $applyLabelSidesToLabelDummyRun(labelDummyRun, defaultSide){ var dummyNode, dummyNode$iterator; if (labelDummyRun.array.length != 0) { if (labelDummyRun.array.length == 2) { $applyLabelSide_1((checkCriticalElementIndex(0, labelDummyRun.array.length) , castTo(labelDummyRun.array[0], 10)), ($clinit_LabelSide() , ABOVE)); $applyLabelSide_1((checkCriticalElementIndex(1, labelDummyRun.array.length) , castTo(labelDummyRun.array[1], 10)), BELOW); } else { for (dummyNode$iterator = new ArrayList$1(labelDummyRun); dummyNode$iterator.i < dummyNode$iterator.this$01.array.length;) { dummyNode = castTo($next_6(dummyNode$iterator), 10); $applyLabelSide_1(dummyNode, defaultSide); } } labelDummyRun.array.length = 0; } } function $basedOnDirection(graph, sideForRightwardEdges){ var edge, edge$iterator, layer, layer$iterator, node, node$iterator, side, incoming, outgoing; for (layer$iterator = new ArrayList$1(graph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (node.type_0 == ($clinit_LNode$NodeType() , LABEL)) { side = (incoming = castTo($next_0(new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10))), 18) , outgoing = castTo($next_0(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10))), 18) , !$booleanValue(castToBoolean($getProperty(incoming, ($clinit_InternalProperties_1() , REVERSED)))) || !$booleanValue(castToBoolean($getProperty(outgoing, REVERSED))))?sideForRightwardEdges:$opposite_0(sideForRightwardEdges); $applyLabelSide_1(node, side); } for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); side = $booleanValue(castToBoolean($getProperty(edge, ($clinit_InternalProperties_1() , REVERSED))))?$opposite_0(sideForRightwardEdges):sideForRightwardEdges; $applyLabelSide_0(edge, side); } } } } function $process_30(layeredGraph, monitor){ var mode; mode = castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , EDGE_LABELS_SIDE_SELECTION_0)), 283); monitor.begin('Label side selection (' + mode + ')', 1); switch (mode.ordinal) { case 0: $sameSide(layeredGraph, ($clinit_LabelSide() , ABOVE)); break; case 1: $sameSide(layeredGraph, ($clinit_LabelSide() , BELOW)); break; case 2: $basedOnDirection(layeredGraph, ($clinit_LabelSide() , ABOVE)); break; case 3: $basedOnDirection(layeredGraph, ($clinit_LabelSide() , BELOW)); break; case 4: $smart(layeredGraph, ($clinit_LabelSide() , ABOVE)); break; case 5: $smart(layeredGraph, ($clinit_LabelSide() , BELOW)); } monitor.done_1(); } function $sameSide(graph, labelSide){ var edge, edge$iterator, layer, layer$iterator, node, node$iterator; for (layer$iterator = new ArrayList$1(graph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); node.type_0 == ($clinit_LNode$NodeType() , LABEL) && $applyLabelSide_1(node, labelSide); for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); $applyLabelSide_0(edge, labelSide); } } } } function $smart(graph, defaultSide){ var dummyNodeQueue, labelDummiesInQueue, layer, layer$iterator, node, node$iterator, topGroup; dummyNodeQueue = new ArrayDeque; for (layer$iterator = new ArrayList$1(graph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); topGroup = true; labelDummiesInQueue = 0; for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); switch (node.type_0.ordinal) { case 4: ++labelDummiesInQueue; case 1: $addLast(dummyNodeQueue, node); break; case 0: $smartForRegularNode(node, defaultSide); default:dummyNodeQueue.head == dummyNodeQueue.tail || $smartForConsecutiveDummyNodeRun(dummyNodeQueue, labelDummiesInQueue, topGroup, false, defaultSide); topGroup = false; labelDummiesInQueue = 0; } } dummyNodeQueue.head == dummyNodeQueue.tail || $smartForConsecutiveDummyNodeRun(dummyNodeQueue, labelDummiesInQueue, topGroup, true, defaultSide); } } function $smartForConsecutiveDummyNodeRun(dummyNodes, labelDummyCount, topGroup, bottomGroup, defaultSide){ if (topGroup && (!bottomGroup || (dummyNodes.tail - dummyNodes.head & dummyNodes.array.length - 1) > 1) && labelDummyCount == 1 && castTo(dummyNodes.array[dummyNodes.head], 10).type_0 == ($clinit_LNode$NodeType() , LABEL)) { $applyLabelSide_1(castTo(dummyNodes.array[dummyNodes.head], 10), ($clinit_LabelSide() , ABOVE)); } else if (bottomGroup && (!topGroup || (dummyNodes.tail - dummyNodes.head & dummyNodes.array.length - 1) > 1) && labelDummyCount == 1 && castTo(dummyNodes.array[dummyNodes.tail - 1 & dummyNodes.array.length - 1], 10).type_0 == ($clinit_LNode$NodeType() , LABEL)) { $applyLabelSide_1(castTo(dummyNodes.array[dummyNodes.tail - 1 & dummyNodes.array.length - 1], 10), ($clinit_LabelSide() , BELOW)); } else if ((dummyNodes.tail - dummyNodes.head & dummyNodes.array.length - 1) == 2) { $applyLabelSide_1(castTo($pollFirst(dummyNodes), 10), ($clinit_LabelSide() , ABOVE)); $applyLabelSide_1(castTo($pollFirst(dummyNodes), 10), BELOW); } else { $applyForDummyNodeRunWithSimpleLoops(dummyNodes, defaultSide); } $clear_4(dummyNodes); } function $smartForRegularNode(node, defaultSide){ var currentPortSide, endLabelQueue, port, port$iterator, portEndLabels; endLabelQueue = new ArrayDeque_0(node.ports.array.length); currentPortSide = null; for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); if (port.side != currentPortSide) { endLabelQueue.head == endLabelQueue.tail || $smartForRegularNodePortEndLabels(endLabelQueue, currentPortSide, defaultSide); $clear_4(endLabelQueue); currentPortSide = port.side; } portEndLabels = gatherLabels(port); !!portEndLabels && ($addLast(endLabelQueue, portEndLabels) , true); } endLabelQueue.head == endLabelQueue.tail || $smartForRegularNodePortEndLabels(endLabelQueue, currentPortSide, defaultSide); } function $smartForRegularNodePortEndLabels(endLabelQueue, portSide, defaultSide){ var labelList, labelList$iterator; if ((endLabelQueue.tail - endLabelQueue.head & endLabelQueue.array.length - 1) == 2) { if (portSide == ($clinit_PortSide() , NORTH_3) || portSide == EAST_2) { $applyLabelSide(castTo($pollFirst(endLabelQueue), 15), ($clinit_LabelSide() , ABOVE)); $applyLabelSide(castTo($pollFirst(endLabelQueue), 15), BELOW); } else { $applyLabelSide(castTo($pollFirst(endLabelQueue), 15), ($clinit_LabelSide() , BELOW)); $applyLabelSide(castTo($pollFirst(endLabelQueue), 15), ABOVE); } } else { for (labelList$iterator = new ArrayDeque$IteratorImpl(endLabelQueue); labelList$iterator.currentIndex != labelList$iterator.fence;) { labelList = castTo($next_5(labelList$iterator), 15); $applyLabelSide(labelList, defaultSide); } } } function LabelSideSelector(){ } defineClass(1614, 1, $intern_105, LabelSideSelector); _.process = function process_28(layeredGraph, monitor){ $process_30(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_LabelSideSelector_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LabelSideSelector', 1614); function $moveFirstAndLastNodes(layeredGraph, firstLayer, lastLayer, firstLabelLayer, lastLabelLayer){ var layer, layer$iterator, layerIter, node, node$array, node$index, node$max, nodes; for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); nodes = toNodeArray(layer.nodes); for (node$array = nodes , node$index = 0 , node$max = node$array.length; node$index < node$max; ++node$index) { node = node$array[node$index]; switch (castTo($getProperty(node, ($clinit_LayeredOptions() , LAYERING_LAYER_CONSTRAINT_0)), 171).ordinal) { case 1: $throwUpUnlessNoIncomingEdges(node); $setLayer_0(node, firstLayer); $moveLabelsToLabelLayer(node, true, firstLabelLayer); break; case 3: $throwUpUnlessNoOutgoingEdges(node); $setLayer_0(node, lastLayer); $moveLabelsToLabelLayer(node, false, lastLabelLayer); } } } layerIter = new AbstractList$ListIteratorImpl(layeredGraph.layers, 0); while (layerIter.i < layerIter.this$01_0.size_1()) { (checkCriticalElement(layerIter.i < layerIter.this$01_0.size_1()) , castTo(layerIter.this$01_0.get_0(layerIter.last = layerIter.i++), 30)).nodes.array.length == 0 && $remove_8(layerIter); } } function $moveLabelsToLabelLayer(node, incoming, labelLayer){ var edge, edge$iterator, possibleLableDummy; for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2((incoming?$getIncomingEdges(node):$getOutgoingEdges(node)).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); possibleLableDummy = incoming?edge.source.owner:edge.target.owner; possibleLableDummy.type_0 == ($clinit_LNode$NodeType() , LABEL) && $setLayer_0(possibleLableDummy, labelLayer); } } function $process_31(layeredGraph, monitor){ var firstLabelLayer, firstLayer, firstSeparateLayer, lastLabelLayer, lastLayer, lastSeparateLayer, layers; monitor.begin('Layer constraint postprocessing', 1); layers = layeredGraph.layers; if (layers.array.length != 0) { firstLayer = (checkCriticalElementIndex(0, layers.array.length) , castTo(layers.array[0], 30)); lastLayer = castTo($get_11(layers, layers.array.length - 1), 30); firstLabelLayer = new Layer(layeredGraph); lastLabelLayer = new Layer(layeredGraph); $moveFirstAndLastNodes(layeredGraph, firstLayer, lastLayer, firstLabelLayer, lastLabelLayer); firstLabelLayer.nodes.array.length == 0 || (checkCriticalPositionIndex(0, layers.array.length) , insertTo(layers.array, 0, firstLabelLayer)); lastLabelLayer.nodes.array.length == 0 || (push_1(layers.array, lastLabelLayer) , true); } if ($hasProperty(layeredGraph, ($clinit_InternalProperties_1() , HIDDEN_NODES))) { firstSeparateLayer = new Layer(layeredGraph); lastSeparateLayer = new Layer(layeredGraph); $restoreHiddenNodes(layeredGraph, firstSeparateLayer, lastSeparateLayer); firstSeparateLayer.nodes.array.length == 0 || (checkCriticalPositionIndex(0, layers.array.length) , insertTo(layers.array, 0, firstSeparateLayer)); lastSeparateLayer.nodes.array.length == 0 || (push_1(layers.array, lastSeparateLayer) , true); } monitor.done_1(); } function $restoreHiddenNodes(layeredGraph, firstSeparateLayer, lastSeparateLayer){ var hiddenEdge, hiddenEdge$iterator, hiddenNode, hiddenNode$iterator, isOutgoing, originalOppositePort; for (hiddenNode$iterator = castTo($getProperty(layeredGraph, ($clinit_InternalProperties_1() , HIDDEN_NODES)), 15).iterator_0(); hiddenNode$iterator.hasNext_0();) { hiddenNode = castTo(hiddenNode$iterator.next_1(), 10); switch (castTo($getProperty(hiddenNode, ($clinit_LayeredOptions() , LAYERING_LAYER_CONSTRAINT_0)), 171).ordinal) { case 2: $setLayer_0(hiddenNode, firstSeparateLayer); break; case 4: $setLayer_0(hiddenNode, lastSeparateLayer); } for (hiddenEdge$iterator = new Iterators$ConcatenatedIterator(transform_2($getConnectedEdges_0(hiddenNode).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(hiddenEdge$iterator);) { hiddenEdge = castTo($next_0(hiddenEdge$iterator), 18); if (!!hiddenEdge.source && !!hiddenEdge.target) { continue; } isOutgoing = !hiddenEdge.target; originalOppositePort = castTo($getProperty(hiddenEdge, ORIGINAL_OPPOSITE_PORT), 12); isOutgoing?$setTarget_0(hiddenEdge, originalOppositePort):$setSource_0(hiddenEdge, originalOppositePort); } } } function $throwUpUnlessNoIncomingEdges(node){ var incoming, incoming$iterator; for (incoming$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(incoming$iterator);) { incoming = castTo($next_0(incoming$iterator), 18); if (incoming.source.owner.type_0 != ($clinit_LNode$NodeType() , LABEL)) { throw toJs(new UnsupportedConfigurationException_0("Node '" + $getDesignation_2(node) + "' has its layer constraint set to FIRST, but has at least one incoming edge that " + ' does not come from a FIRST_SEPARATE node. That must not happen.')); } } } function $throwUpUnlessNoOutgoingEdges(node){ var outgoing, outgoing$iterator; for (outgoing$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(outgoing$iterator);) { outgoing = castTo($next_0(outgoing$iterator), 18); if (outgoing.target.owner.type_0 != ($clinit_LNode$NodeType() , LABEL)) { throw toJs(new UnsupportedConfigurationException_0("Node '" + $getDesignation_2(node) + "' has its layer constraint set to LAST, but has at least one outgoing edge that " + ' does not go to a LAST_SEPARATE node. That must not happen.')); } } } function LayerConstraintPostprocessor(){ } defineClass(1622, 1, $intern_105, LayerConstraintPostprocessor); _.process = function process_29(layeredGraph, monitor){ $process_31(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_LayerConstraintPostprocessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LayerConstraintPostprocessor', 1622); function $clinit_LayerConstraintPreprocessor(){ $clinit_LayerConstraintPreprocessor = emptyMethod; HIDDEN_NODE_CONNECTIONS = new Property_0('separateLayerConnections', ($clinit_LayerConstraintPreprocessor$HiddenNodeConnections() , NONE_0)); } function $ensureNoInacceptableEdges(lNode){ var inEdge, inEdge$iterator, layerConstraint, outEdge, outEdge$iterator; layerConstraint = castTo($getProperty(lNode, ($clinit_LayeredOptions() , LAYERING_LAYER_CONSTRAINT_0)), 171); if (layerConstraint == ($clinit_LayerConstraint() , FIRST_SEPARATE_0)) { for (inEdge$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(lNode).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(inEdge$iterator);) { inEdge = castTo($next_0(inEdge$iterator), 18); if (!$isAcceptableIncidentEdge(inEdge)) { throw toJs(new UnsupportedConfigurationException_0("Node '" + $getDesignation_2(lNode) + "' has its layer constraint set to FIRST_SEPARATE, but has at least one incoming edge. " + 'FIRST_SEPARATE nodes must not have incoming edges.')); } } } else if (layerConstraint == LAST_SEPARATE_0) { for (outEdge$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(lNode).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(outEdge$iterator);) { outEdge = castTo($next_0(outEdge$iterator), 18); if (!$isAcceptableIncidentEdge(outEdge)) { throw toJs(new UnsupportedConfigurationException_0("Node '" + $getDesignation_2(lNode) + "' has its layer constraint set to LAST_SEPARATE, but has at least one outgoing edge. " + 'LAST_SEPARATE nodes must not have outgoing edges.')); } } } } function $hide(lNode){ var lEdge, lEdge$iterator, isOutgoing, oppositePort; $ensureNoInacceptableEdges(lNode); for (lEdge$iterator = new Iterators$ConcatenatedIterator(transform_2($getConnectedEdges_0(lNode).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(lEdge$iterator);) { lEdge = castTo($next_0(lEdge$iterator), 18); isOutgoing = lEdge.source.owner == lNode; oppositePort = isOutgoing?lEdge.target:lEdge.source; isOutgoing?$setTarget_0(lEdge, null):$setSource_0(lEdge, null); $setProperty_0(lEdge, ($clinit_InternalProperties_1() , ORIGINAL_OPPOSITE_PORT), oppositePort); $updateOppositeNodeLayerConstraints(lNode, oppositePort.owner); } } function $isAcceptableIncidentEdge(edge){ var sourceNode, targetNode; sourceNode = edge.source.owner; targetNode = edge.target.owner; return sourceNode.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT) && targetNode.type_0 == EXTERNAL_PORT; } function $isRelevantNode(lNode){ switch (castTo($getProperty(lNode, ($clinit_LayeredOptions() , LAYERING_LAYER_CONSTRAINT_0)), 171).ordinal) { case 2: case 4: return true; default:return false; } } function $process_32(layeredGraph, monitor){ var hiddenNodes, lNode, nodeIterator; monitor.begin('Layer constraint preprocessing', 1); hiddenNodes = new ArrayList; nodeIterator = new AbstractList$ListIteratorImpl(layeredGraph.layerlessNodes, 0); while (nodeIterator.i < nodeIterator.this$01_0.size_1()) { lNode = (checkCriticalElement(nodeIterator.i < nodeIterator.this$01_0.size_1()) , castTo(nodeIterator.this$01_0.get_0(nodeIterator.last = nodeIterator.i++), 10)); if ($isRelevantNode(lNode)) { $hide(lNode); push_1(hiddenNodes.array, lNode); $remove_8(nodeIterator); } } hiddenNodes.array.length == 0 || $setProperty_0(layeredGraph, ($clinit_InternalProperties_1() , HIDDEN_NODES), hiddenNodes); monitor.done_1(); } function $updateOppositeNodeLayerConstraints(hiddenNode, oppositeNode){ var connections; if ($hasProperty(oppositeNode, ($clinit_LayeredOptions() , LAYERING_LAYER_CONSTRAINT_0))) { return; } connections = $combine_0(castTo($getProperty(oppositeNode, HIDDEN_NODE_CONNECTIONS), 371), castTo($getProperty(hiddenNode, LAYERING_LAYER_CONSTRAINT_0), 171)); $setProperty_0(oppositeNode, HIDDEN_NODE_CONNECTIONS, connections); if ($hasNext_1(new Iterators$ConcatenatedIterator(transform_2($getConnectedEdges_0(oppositeNode).val$inputs1.iterator_0(), new Iterables$10)))) { return; } switch (connections.ordinal) { case 1: $setProperty_0(oppositeNode, LAYERING_LAYER_CONSTRAINT_0, ($clinit_LayerConstraint() , FIRST)); break; case 2: $setProperty_0(oppositeNode, LAYERING_LAYER_CONSTRAINT_0, ($clinit_LayerConstraint() , LAST)); } } function LayerConstraintPreprocessor(){ $clinit_LayerConstraintPreprocessor(); } defineClass(1623, 1, $intern_105, LayerConstraintPreprocessor); _.process = function process_30(layeredGraph, monitor){ $process_32(castTo(layeredGraph, 36), monitor); } ; var HIDDEN_NODE_CONNECTIONS; var Lorg_eclipse_elk_alg_layered_intermediate_LayerConstraintPreprocessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LayerConstraintPreprocessor', 1623); function $clinit_LayerConstraintPreprocessor$HiddenNodeConnections(){ $clinit_LayerConstraintPreprocessor$HiddenNodeConnections = emptyMethod; NONE_0 = new LayerConstraintPreprocessor$HiddenNodeConnections('NONE', 0); FIRST_SEPARATE = new LayerConstraintPreprocessor$HiddenNodeConnections('FIRST_SEPARATE', 1); LAST_SEPARATE = new LayerConstraintPreprocessor$HiddenNodeConnections('LAST_SEPARATE', 2); BOTH = new LayerConstraintPreprocessor$HiddenNodeConnections('BOTH', 3); } function $combine_0(this$static, layerConstraint){ switch (this$static.ordinal) { case 0: return layerConstraint == ($clinit_LayerConstraint() , FIRST_SEPARATE_0)?FIRST_SEPARATE:LAST_SEPARATE; case 1: return layerConstraint == ($clinit_LayerConstraint() , FIRST_SEPARATE_0)?FIRST_SEPARATE:BOTH; case 2: return layerConstraint == ($clinit_LayerConstraint() , FIRST_SEPARATE_0)?BOTH:LAST_SEPARATE; default:return BOTH; } } function LayerConstraintPreprocessor$HiddenNodeConnections(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_31(name_0){ $clinit_LayerConstraintPreprocessor$HiddenNodeConnections(); return valueOf(($clinit_LayerConstraintPreprocessor$HiddenNodeConnections$Map() , $MAP_21), name_0); } function values_39(){ $clinit_LayerConstraintPreprocessor$HiddenNodeConnections(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_intermediate_LayerConstraintPreprocessor$HiddenNodeConnections_2_classLit, 1), $intern_37, 371, 0, [NONE_0, FIRST_SEPARATE, LAST_SEPARATE, BOTH]); } defineClass(371, 22, {3:1, 34:1, 22:1, 371:1}, LayerConstraintPreprocessor$HiddenNodeConnections); var BOTH, FIRST_SEPARATE, LAST_SEPARATE, NONE_0; var Lorg_eclipse_elk_alg_layered_intermediate_LayerConstraintPreprocessor$HiddenNodeConnections_2_classLit = createForEnum('org.eclipse.elk.alg.layered.intermediate', 'LayerConstraintPreprocessor/HiddenNodeConnections', 371, Ljava_lang_Enum_2_classLit, values_39, valueOf_31); function $clinit_LayerConstraintPreprocessor$HiddenNodeConnections$Map(){ $clinit_LayerConstraintPreprocessor$HiddenNodeConnections$Map = emptyMethod; $MAP_21 = createValueOfMap(($clinit_LayerConstraintPreprocessor$HiddenNodeConnections() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_intermediate_LayerConstraintPreprocessor$HiddenNodeConnections_2_classLit, 1), $intern_37, 371, 0, [NONE_0, FIRST_SEPARATE, LAST_SEPARATE, BOTH]))); } var $MAP_21; function $process_33(layeredGraph, monitor){ var bottom, firstNode, foundNodes, lastNode, layer, layer$iterator, layerSize, maxY, minY, node, node$iterator, nodeMargin, nodeSize, top_0; monitor.begin('Layer size calculation', 1); minY = $intern_60; maxY = $intern_61; foundNodes = false; for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); layerSize = layer.size_0; layerSize.x_0 = 0; layerSize.y_0 = 0; if (layer.nodes.array.length == 0) { continue; } foundNodes = true; for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); nodeSize = node.size_0; nodeMargin = node.margin; layerSize.x_0 = $wnd.Math.max(layerSize.x_0, nodeSize.x_0 + nodeMargin.left + nodeMargin.right); } firstNode = castTo($get_11(layer.nodes, 0), 10); top_0 = firstNode.pos.y_0 - firstNode.margin.top_0; firstNode.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT) && (top_0 -= castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , SPACING_PORTS_SURROUNDING)), 140).top_0); lastNode = castTo($get_11(layer.nodes, layer.nodes.array.length - 1), 10); bottom = lastNode.pos.y_0 + lastNode.size_0.y_0 + lastNode.margin.bottom; lastNode.type_0 == EXTERNAL_PORT && (bottom += castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , SPACING_PORTS_SURROUNDING)), 140).bottom); layerSize.y_0 = bottom - top_0; minY = $wnd.Math.min(minY, top_0); maxY = $wnd.Math.max(maxY, bottom); } if (!foundNodes) { minY = 0; maxY = 0; } layeredGraph.size_0.y_0 = maxY - minY; layeredGraph.offset.y_0 -= minY; monitor.done_1(); } function LayerSizeAndGraphHeightCalculator(){ } defineClass(1624, 1, $intern_105, LayerSizeAndGraphHeightCalculator); _.process = function process_31(layeredGraph, monitor){ $process_33(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_LayerSizeAndGraphHeightCalculator_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LayerSizeAndGraphHeightCalculator', 1624); function $process_34(layeredGraph, monitor){ var addUnnecessaryBendpoints, layer, layer$iterator, node, nodeIterator; monitor.begin('Edge joining', 1); addUnnecessaryBendpoints = $booleanValue(castToBoolean($getProperty(layeredGraph, ($clinit_LayeredOptions() , UNNECESSARY_BENDPOINTS_0)))); for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); nodeIterator = new AbstractList$ListIteratorImpl(layer.nodes, 0); while (nodeIterator.i < nodeIterator.this$01_0.size_1()) { node = (checkCriticalElement(nodeIterator.i < nodeIterator.this$01_0.size_1()) , castTo(nodeIterator.this$01_0.get_0(nodeIterator.last = nodeIterator.i++), 10)); if (node.type_0 == ($clinit_LNode$NodeType() , LONG_EDGE)) { joinAt(node, addUnnecessaryBendpoints); $remove_8(nodeIterator); } } } monitor.done_1(); } function LongEdgeJoiner(){ } function joinAt(longEdgeDummy, addUnnecessaryBendpoints){ var bendPoint, bendPoint$iterator, droppedEdge, droppedEdgeListIndex, droppedJunctionsPoints, edgeCount, inputPortEdges, jp, jp$iterator, label_0, label$iterator, outputPortEdges, survivingBendPoints, survivingEdge, survivingJunctionPoints, survivingLabels, targetIncomingEdges, unnecessaryBendpoint; inputPortEdges = castTo($getPorts_1(longEdgeDummy, ($clinit_PortSide() , WEST_2)).iterator_0().next_1(), 12).incomingEdges; outputPortEdges = castTo($getPorts_1(longEdgeDummy, EAST_2).iterator_0().next_1(), 12).outgoingEdges; edgeCount = inputPortEdges.array.length; unnecessaryBendpoint = $getAbsoluteAnchor(castTo($get_11(longEdgeDummy.ports, 0), 12)); while (edgeCount-- > 0) { survivingEdge = (checkCriticalElementIndex(0, inputPortEdges.array.length) , castTo(inputPortEdges.array[0], 18)); droppedEdge = (checkCriticalElementIndex(0, outputPortEdges.array.length) , castTo(outputPortEdges.array[0], 18)); targetIncomingEdges = droppedEdge.target.incomingEdges; droppedEdgeListIndex = $indexOf_3(targetIncomingEdges, droppedEdge, 0); $setTargetAndInsertAtIndex(survivingEdge, droppedEdge.target, droppedEdgeListIndex); $setSource_0(droppedEdge, null); $setTarget_0(droppedEdge, null); survivingBendPoints = survivingEdge.bendPoints; addUnnecessaryBendpoints && $add_7(survivingBendPoints, new KVector_2(unnecessaryBendpoint)); for (bendPoint$iterator = $listIterator_2(droppedEdge.bendPoints, 0); bendPoint$iterator.currentNode != bendPoint$iterator.this$01.tail;) { bendPoint = castTo($next_9(bendPoint$iterator), 8); $add_7(survivingBendPoints, new KVector_2(bendPoint)); } survivingLabels = survivingEdge.labels; for (label$iterator = new ArrayList$1(droppedEdge.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 72); push_1(survivingLabels.array, label_0); } survivingJunctionPoints = castTo($getProperty(survivingEdge, ($clinit_LayeredOptions() , JUNCTION_POINTS)), 75); droppedJunctionsPoints = castTo($getProperty(droppedEdge, JUNCTION_POINTS), 75); if (droppedJunctionsPoints) { if (!survivingJunctionPoints) { survivingJunctionPoints = new KVectorChain; $setProperty_0(survivingEdge, JUNCTION_POINTS, survivingJunctionPoints); } for (jp$iterator = $listIterator_2(droppedJunctionsPoints, 0); jp$iterator.currentNode != jp$iterator.this$01.tail;) { jp = castTo($next_9(jp$iterator), 8); $add_7(survivingJunctionPoints, new KVector_2(jp)); } } } } defineClass(1625, 1, $intern_105, LongEdgeJoiner); _.process = function process_32(layeredGraph, monitor){ $process_34(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_LongEdgeJoiner_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LongEdgeJoiner', 1625); function $process_35(layeredGraph, monitor){ var edge, edge$iterator, layer, layerIter, nextLayer, node, node$iterator, port, port$iterator, targetLayer, targetPort, dummyNode; monitor.begin('Edge splitting', 1); if (layeredGraph.layers.array.length <= 2) { monitor.done_1(); return; } layerIter = new AbstractList$ListIteratorImpl(layeredGraph.layers, 0); nextLayer = (checkCriticalElement(layerIter.i < layerIter.this$01_0.size_1()) , castTo(layerIter.this$01_0.get_0(layerIter.last = layerIter.i++), 30)); while (layerIter.i < layerIter.this$01_0.size_1()) { layer = nextLayer; nextLayer = (checkCriticalElement(layerIter.i < layerIter.this$01_0.size_1()) , castTo(layerIter.this$01_0.get_0(layerIter.last = layerIter.i++), 30)); for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); for (edge$iterator = new ArrayList$1(port.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); targetPort = edge.target; targetLayer = targetPort.owner.layer; targetLayer != layer && targetLayer != nextLayer && splitEdge(edge, (dummyNode = new LNode(layeredGraph) , $setType(dummyNode, ($clinit_LNode$NodeType() , LONG_EDGE)) , $setProperty_0(dummyNode, ($clinit_InternalProperties_1() , ORIGIN_0), edge) , $setProperty_0(dummyNode, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0), ($clinit_PortConstraints() , FIXED_POS)) , $setLayer_0(dummyNode, nextLayer) , dummyNode)); } } } } monitor.done_1(); } function LongEdgeSplitter(){ } function moveHeadLabels(oldEdge, newEdge){ var label_0, labelIterator, labelPlacement; labelIterator = new AbstractList$ListIteratorImpl(oldEdge.labels, 0); while (labelIterator.i < labelIterator.this$01_0.size_1()) { label_0 = (checkCriticalElement(labelIterator.i < labelIterator.this$01_0.size_1()) , castTo(labelIterator.this$01_0.get_0(labelIterator.last = labelIterator.i++), 72)); labelPlacement = castTo($getProperty(label_0, ($clinit_LayeredOptions() , EDGE_LABELS_PLACEMENT)), 278); if (labelPlacement == ($clinit_EdgeLabelPlacement() , HEAD)) { $remove_8(labelIterator); $add_3(newEdge.labels, label_0); $hasProperty(label_0, ($clinit_InternalProperties_1() , END_LABEL_EDGE)) || $setProperty_0(label_0, END_LABEL_EDGE, oldEdge); } } } function setDummyNodeProperties(dummyNode, inEdge, outEdge){ var inEdgeSourceNode, outEdgeTargetNode; inEdgeSourceNode = inEdge.source.owner; outEdgeTargetNode = outEdge.target.owner; if (inEdgeSourceNode.type_0 == ($clinit_LNode$NodeType() , LONG_EDGE)) { $setProperty_0(dummyNode, ($clinit_InternalProperties_1() , LONG_EDGE_SOURCE), castTo($getProperty(inEdgeSourceNode, LONG_EDGE_SOURCE), 12)); $setProperty_0(dummyNode, LONG_EDGE_TARGET, castTo($getProperty(inEdgeSourceNode, LONG_EDGE_TARGET), 12)); $setProperty_0(dummyNode, LONG_EDGE_HAS_LABEL_DUMMIES, castToBoolean($getProperty(inEdgeSourceNode, LONG_EDGE_HAS_LABEL_DUMMIES))); } else if (inEdgeSourceNode.type_0 == LABEL) { $setProperty_0(dummyNode, ($clinit_InternalProperties_1() , LONG_EDGE_SOURCE), castTo($getProperty(inEdgeSourceNode, LONG_EDGE_SOURCE), 12)); $setProperty_0(dummyNode, LONG_EDGE_TARGET, castTo($getProperty(inEdgeSourceNode, LONG_EDGE_TARGET), 12)); $setProperty_0(dummyNode, LONG_EDGE_HAS_LABEL_DUMMIES, ($clinit_Boolean() , true)); } else if (outEdgeTargetNode.type_0 == LABEL) { $setProperty_0(dummyNode, ($clinit_InternalProperties_1() , LONG_EDGE_SOURCE), castTo($getProperty(outEdgeTargetNode, LONG_EDGE_SOURCE), 12)); $setProperty_0(dummyNode, LONG_EDGE_TARGET, castTo($getProperty(outEdgeTargetNode, LONG_EDGE_TARGET), 12)); $setProperty_0(dummyNode, LONG_EDGE_HAS_LABEL_DUMMIES, ($clinit_Boolean() , true)); } else { $setProperty_0(dummyNode, ($clinit_InternalProperties_1() , LONG_EDGE_SOURCE), inEdge.source); $setProperty_0(dummyNode, LONG_EDGE_TARGET, outEdge.target); } } function splitEdge(edge, dummyNode){ var dummyEdge, dummyInput, dummyOutput, oldEdgeTarget, portPos, thickness; oldEdgeTarget = edge.target; thickness = $doubleValue(castToDouble($getProperty(edge, ($clinit_LayeredOptions() , EDGE_THICKNESS_0)))); if (thickness < 0) { thickness = 0; $setProperty_0(edge, EDGE_THICKNESS_0, thickness); } dummyNode.size_0.y_0 = thickness; portPos = $wnd.Math.floor(thickness / 2); dummyInput = new LPort; $setSide(dummyInput, ($clinit_PortSide() , WEST_2)); $setNode(dummyInput, dummyNode); dummyInput.pos.y_0 = portPos; dummyOutput = new LPort; $setSide(dummyOutput, EAST_2); $setNode(dummyOutput, dummyNode); dummyOutput.pos.y_0 = portPos; $setTarget_0(edge, dummyInput); dummyEdge = new LEdge; $copyProperties(dummyEdge, edge); $setProperty_0(dummyEdge, JUNCTION_POINTS, null); $setSource_0(dummyEdge, dummyOutput); $setTarget_0(dummyEdge, oldEdgeTarget); setDummyNodeProperties(dummyNode, edge, dummyEdge); moveHeadLabels(edge, dummyEdge); return dummyEdge; } defineClass(1626, 1, $intern_105, LongEdgeSplitter); _.process = function process_33(layeredGraph, monitor){ $process_35(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_LongEdgeSplitter_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'LongEdgeSplitter', 1626); function $clinit_NodePromotion(){ $clinit_NodePromotion = emptyMethod; MODEL_ORDER_NODE_COMPARATOR_DESC = new NodePromotion$1; MODEL_ORDER_NODE_COMPARATOR_ASC = new NodePromotion$2; } function $modelOrderNodePromotion(this$static, leftToRight){ var connectedNode, containsLabels, currentLayer, currentLayerId, modelOrderAllowsPromotion, nextLayer, nextLayerId, nextLayerNode, nextLayerNode$iterator, node, nodeConnectedToNextLayer, nodeIndex, nodeToPromote, nodesToPromote, otherNode, otherNodeIndex, promoteThroughDummyLayer, shallBePromoted, somethingChanged; somethingChanged = false; do { somethingChanged = false; for (currentLayerId = leftToRight?(new AbstractMap$1(this$static.biLayerMap.multiMapKeyToValues)).this$01.size_1() - 2:1; leftToRight?currentLayerId >= 0:currentLayerId < (new AbstractMap$1(this$static.biLayerMap.multiMapKeyToValues)).this$01.size_1(); currentLayerId += leftToRight?-1:1) { currentLayer = $getValues(this$static.biLayerMap, valueOf_3(currentLayerId)); for (nodeIndex = 0; nodeIndex < currentLayer.size_0; nodeIndex++) { node = castTo($get_7(currentLayer, nodeIndex), 10); if (!$hasProperty(node, ($clinit_InternalProperties_1() , MODEL_ORDER_1))) { continue; } if ($isMaximalKey(this$static.biLayerMap, valueOf_3(currentLayerId)) && this$static.promotionStrategy == ($clinit_NodePromotionStrategy() , MODEL_ORDER_LEFT_TO_RIGHT) || $isMinimalKey(this$static.biLayerMap, valueOf_3(currentLayerId)) && this$static.promotionStrategy == ($clinit_NodePromotionStrategy() , MODEL_ORDER_RIGHT_TO_LEFT)) { continue; } shallBePromoted = true; for (otherNodeIndex = 0; otherNodeIndex < currentLayer.size_0; otherNodeIndex++) { otherNode = castTo($get_7(currentLayer, otherNodeIndex), 10); $hasProperty(otherNode, MODEL_ORDER_1) && (leftToRight && castTo($getProperty(node, MODEL_ORDER_1), 17).value_0 < castTo($getProperty(otherNode, MODEL_ORDER_1), 17).value_0 || !leftToRight && castTo($getProperty(node, MODEL_ORDER_1), 17).value_0 > castTo($getProperty(otherNode, MODEL_ORDER_1), 17).value_0) && (shallBePromoted = false); } if (!shallBePromoted) { continue; } nextLayerId = leftToRight?currentLayerId + 1:currentLayerId - 1; nextLayer = $getValues(this$static.biLayerMap, valueOf_3(nextLayerId)); modelOrderAllowsPromotion = false; promoteThroughDummyLayer = true; containsLabels = false; for (nextLayerNode$iterator = $listIterator_2(nextLayer, 0); nextLayerNode$iterator.currentNode != nextLayerNode$iterator.this$01.tail;) { nextLayerNode = castTo($next_9(nextLayerNode$iterator), 10); if ($hasProperty(nextLayerNode, MODEL_ORDER_1)) { if (nextLayerNode.id_0 != node.id_0) { modelOrderAllowsPromotion = modelOrderAllowsPromotion | (leftToRight?castTo($getProperty(nextLayerNode, MODEL_ORDER_1), 17).value_0 < castTo($getProperty(node, MODEL_ORDER_1), 17).value_0:castTo($getProperty(nextLayerNode, MODEL_ORDER_1), 17).value_0 > castTo($getProperty(node, MODEL_ORDER_1), 17).value_0); promoteThroughDummyLayer = false; } } else if (!modelOrderAllowsPromotion && promoteThroughDummyLayer) { if (nextLayerNode.type_0 == ($clinit_LNode$NodeType() , LABEL)) { containsLabels = true; leftToRight?(nodeConnectedToNextLayer = castTo($next_0(new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(nextLayerNode).val$inputs1.iterator_0(), new Iterables$10))), 18).source.owner):(nodeConnectedToNextLayer = castTo($next_0(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(nextLayerNode).val$inputs1.iterator_0(), new Iterables$10))), 18).target.owner); if (nodeConnectedToNextLayer == node) { leftToRight?(connectedNode = castTo($next_0(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(nextLayerNode).val$inputs1.iterator_0(), new Iterables$10))), 18).target.owner):(connectedNode = castTo($next_0(new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(nextLayerNode).val$inputs1.iterator_0(), new Iterables$10))), 18).source.owner); (leftToRight?castTo($getKey_0(this$static.biLayerMap, connectedNode), 17).value_0 - castTo($getKey_0(this$static.biLayerMap, nodeConnectedToNextLayer), 17).value_0:castTo($getKey_0(this$static.biLayerMap, nodeConnectedToNextLayer), 17).value_0 - castTo($getKey_0(this$static.biLayerMap, connectedNode), 17).value_0) <= 2 && (promoteThroughDummyLayer = false); } } } } if (containsLabels && promoteThroughDummyLayer) { leftToRight?(connectedNode = castTo($next_0(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10))), 18).target.owner):(connectedNode = castTo($next_0(new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10))), 18).source.owner); (leftToRight?castTo($getKey_0(this$static.biLayerMap, connectedNode), 17).value_0 - castTo($getKey_0(this$static.biLayerMap, node), 17).value_0:castTo($getKey_0(this$static.biLayerMap, node), 17).value_0 - castTo($getKey_0(this$static.biLayerMap, connectedNode), 17).value_0) <= 2 && connectedNode.type_0 == ($clinit_LNode$NodeType() , NORMAL) && (promoteThroughDummyLayer = false); } if (modelOrderAllowsPromotion || promoteThroughDummyLayer) { nodesToPromote = $promoteNodeByModelOrder(this$static, node, leftToRight); while (nodesToPromote.map_0.size_1() != 0) { nodeToPromote = castTo(nodesToPromote.map_0.keySet_0().iterator_0().next_1(), 10); nodesToPromote.map_0.remove_0(nodeToPromote) != null; $addAll(nodesToPromote, $promoteNodeByModelOrder(this$static, nodeToPromote, leftToRight)); } --nodeIndex; somethingChanged = true; } } } } while (somethingChanged); } function $precalculateAndSetInformation(this$static){ var dummyBaggage, inDegree, incoming, layer, layer$iterator, layer$iterator0, layerID, layerSize, layerSizePixel, node, node$iterator, nodeID, nodesNdummies, outDegree, outcoming; this$static.nodeSizeAffix = $doubleValue(castToDouble($getProperty(this$static.masterGraph, ($clinit_LayeredOptions() , SPACING_NODE_NODE_0)))); this$static.dummySize = $doubleValue(castToDouble($getProperty(this$static.masterGraph, SPACING_EDGE_NODE_BETWEEN_LAYERS_0))); this$static.maxHeight = this$static.masterGraph.layers.array.length; layerID = this$static.maxHeight - 1; nodeID = 0; this$static.maxWidth = 0; this$static.maxWidthPixel = 0; this$static.currentWidth = newArrayList_1(initUnidimensionalArray(Ljava_lang_Integer_2_classLit, $intern_16, 17, this$static.maxHeight, 0, 1)); this$static.currentWidthPixel = newArrayList_1(initUnidimensionalArray(Ljava_lang_Double_2_classLit, $intern_16, 345, this$static.maxHeight, 7, 1)); for (layer$iterator0 = new ArrayList$1(this$static.masterGraph.layers); layer$iterator0.i < layer$iterator0.this$01.array.length;) { layer = castTo($next_6(layer$iterator0), 30); layer.id_0 = layerID; for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); node.id_0 = nodeID; ++nodeID; } --layerID; } this$static.layers = initUnidimensionalArray(I_classLit, $intern_49, 28, nodeID, 15, 1); this$static.degreeDiff = initMultidimensionalArray(I_classLit, [$intern_16, $intern_49], [53, 28], 15, [nodeID, 3], 2); this$static.nodes = new ArrayList; this$static.nodesWithIncomingEdges = new ArrayList; dummyBaggage = 0; this$static.dummyNodeCount = 0; for (layer$iterator = new ArrayList$1(this$static.masterGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); layerID = layer.id_0; incoming = 0; outcoming = 0; layerSize = layer.nodes.array.length; layerSizePixel = 0; for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); nodeID = node.id_0; this$static.layers[nodeID] = node.layer.id_0; layerSizePixel += node.size_0.y_0 + this$static.nodeSizeAffix; inDegree = size_24(new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10))); outDegree = size_24(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10))); this$static.degreeDiff[nodeID][0] = outDegree - inDegree; this$static.degreeDiff[nodeID][1] = inDegree; this$static.degreeDiff[nodeID][2] = outDegree; incoming += inDegree; outcoming += outDegree; inDegree > 0 && $add_3(this$static.nodesWithIncomingEdges, node); $add_3(this$static.nodes, node); } dummyBaggage -= incoming; nodesNdummies = layerSize + dummyBaggage; layerSizePixel += dummyBaggage * this$static.dummySize; $set_1(this$static.currentWidth, layerID, valueOf_3(nodesNdummies)); $set_1(this$static.currentWidthPixel, layerID, layerSizePixel); this$static.maxWidth = $wnd.Math.max(this$static.maxWidth, nodesNdummies); this$static.maxWidthPixel = $wnd.Math.max(this$static.maxWidthPixel, layerSizePixel); this$static.dummyNodeCount += dummyBaggage; dummyBaggage += outcoming; } } function $precalculateAndSetInformationModelOrder(this$static){ var layer, layer$iterator, layer$iterator0, layerId, leftToRight, modelOrderComparator, node, node$iterator, nodeId; this$static.biLayerMap = new BiLinkedHashMultiMap; nodeId = 0; layerId = 0; for (layer$iterator0 = new ArrayList$1(this$static.masterGraph.layers); layer$iterator0.i < layer$iterator0.this$01.array.length;) { layer = castTo($next_6(layer$iterator0), 30); layer.id_0 = layerId; for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); node.id_0 = nodeId; ++nodeId; } ++layerId; } leftToRight = this$static.promotionStrategy == ($clinit_NodePromotionStrategy() , MODEL_ORDER_LEFT_TO_RIGHT); modelOrderComparator = leftToRight?MODEL_ORDER_NODE_COMPARATOR_DESC:MODEL_ORDER_NODE_COMPARATOR_ASC; for (layer$iterator = new ArrayList$1(this$static.masterGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); $sort(layer.nodes, modelOrderComparator); $putAll_0(this$static.biLayerMap, valueOf_3(layer.id_0), layer.nodes); } } function $process_36(this$static, layeredGraph, progressMonitor){ var donna, donna$iterator, funFunction, martha, martha$iterator, newMaxWidth, newMaxWidthPixel, promoteUntil, promoteUntilD, promoteUntilN; progressMonitor.begin('Node promotion heuristic', 1); this$static.masterGraph = layeredGraph; this$static.promotionStrategy = castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , LAYERING_NODE_PROMOTION_STRATEGY_0)), 243); this$static.promotionStrategy != ($clinit_NodePromotionStrategy() , MODEL_ORDER_LEFT_TO_RIGHT) && this$static.promotionStrategy != MODEL_ORDER_RIGHT_TO_LEFT?$precalculateAndSetInformation(this$static):$precalculateAndSetInformationModelOrder(this$static); promoteUntil = castTo($getProperty(this$static.masterGraph, LAYERING_NODE_PROMOTION_MAX_ITERATIONS_0), 17).value_0; funFunction = new NodePromotion$lambda$0$Type; switch (this$static.promotionStrategy.ordinal) { case 2: case 1: $promotionMagic(this$static, funFunction); break; case 3: this$static.promotionStrategy = NO_BOUNDARY; $promotionMagic(this$static, funFunction); newMaxWidth = 0; for (martha$iterator = new ArrayList$1(this$static.currentWidth); martha$iterator.i < martha$iterator.this$01.array.length;) { martha = castTo($next_6(martha$iterator), 17); newMaxWidth = $wnd.Math.max(newMaxWidth, martha.value_0); } if (newMaxWidth > this$static.maxWidth) { this$static.promotionStrategy = NIKOLOV; $promotionMagic(this$static, funFunction); } break; case 4: this$static.promotionStrategy = NO_BOUNDARY; $promotionMagic(this$static, funFunction); newMaxWidthPixel = 0; for (donna$iterator = new ArrayList$1(this$static.currentWidthPixel); donna$iterator.i < donna$iterator.this$01.array.length;) { donna = castToDouble($next_6(donna$iterator)); newMaxWidthPixel = $wnd.Math.max(newMaxWidthPixel, (checkCriticalNotNull(donna) , donna)); } if (newMaxWidthPixel > this$static.maxWidthPixel) { this$static.promotionStrategy = NIKOLOV_PIXEL; $promotionMagic(this$static, funFunction); } break; case 6: promoteUntilN = round_int($wnd.Math.ceil(this$static.layers.length * promoteUntil / 100)); $promotionMagic(this$static, new NodePromotion$lambda$1$Type(promoteUntilN)); break; case 5: promoteUntilD = round_int($wnd.Math.ceil(this$static.dummyNodeCount * promoteUntil / 100)); $promotionMagic(this$static, new NodePromotion$lambda$2$Type(promoteUntilD)); break; case 8: $modelOrderNodePromotion(this$static, true); break; case 9: $modelOrderNodePromotion(this$static, false); break; default:$promotionMagic(this$static, funFunction); } this$static.promotionStrategy != MODEL_ORDER_LEFT_TO_RIGHT && this$static.promotionStrategy != MODEL_ORDER_RIGHT_TO_LEFT?$setNewLayering(this$static, layeredGraph):$setNewLayeringModelOrder(this$static, layeredGraph); progressMonitor.done_1(); } function $promoteNode(this$static, node){ var dummiesBuilt, dummiesReduced, dummydiff, edge, edge$iterator, masterNode, maxWidthNotExceeded, nodeLayerPos, nodeSize, promotion; maxWidthNotExceeded = true; dummydiff = 0; nodeLayerPos = this$static.layers[node.id_0]; nodeSize = node.size_0.y_0 + this$static.nodeSizeAffix; dummiesBuilt = this$static.degreeDiff[node.id_0][2]; $set_1(this$static.currentWidth, nodeLayerPos, valueOf_3(castTo($get_11(this$static.currentWidth, nodeLayerPos), 17).value_0 - 1 + dummiesBuilt)); $set_1(this$static.currentWidthPixel, nodeLayerPos, $doubleValue(castToDouble($get_11(this$static.currentWidthPixel, nodeLayerPos))) - nodeSize + dummiesBuilt * this$static.dummySize); ++nodeLayerPos; if (nodeLayerPos >= this$static.maxHeight) { ++this$static.maxHeight; $add_3(this$static.currentWidth, valueOf_3(1)); $add_3(this$static.currentWidthPixel, nodeSize); } else { dummiesReduced = this$static.degreeDiff[node.id_0][1]; $set_1(this$static.currentWidth, nodeLayerPos, valueOf_3(castTo($get_11(this$static.currentWidth, nodeLayerPos), 17).value_0 + 1 - dummiesReduced)); $set_1(this$static.currentWidthPixel, nodeLayerPos, $doubleValue(castToDouble($get_11(this$static.currentWidthPixel, nodeLayerPos))) + nodeSize - dummiesReduced * this$static.dummySize); } (this$static.promotionStrategy == ($clinit_NodePromotionStrategy() , NIKOLOV) && (castTo($get_11(this$static.currentWidth, nodeLayerPos), 17).value_0 > this$static.maxWidth || castTo($get_11(this$static.currentWidth, nodeLayerPos - 1), 17).value_0 > this$static.maxWidth) || this$static.promotionStrategy == NIKOLOV_PIXEL && ($doubleValue(castToDouble($get_11(this$static.currentWidthPixel, nodeLayerPos))) > this$static.maxWidthPixel || $doubleValue(castToDouble($get_11(this$static.currentWidthPixel, nodeLayerPos - 1))) > this$static.maxWidthPixel)) && (maxWidthNotExceeded = false); for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); masterNode = edge.source.owner; if (this$static.layers[masterNode.id_0] == nodeLayerPos) { promotion = $promoteNode(this$static, masterNode); dummydiff = dummydiff + castTo(promotion.first, 17).value_0; maxWidthNotExceeded = maxWidthNotExceeded && $booleanValue(castToBoolean(promotion.second)); } } this$static.layers[node.id_0] = nodeLayerPos; dummydiff = dummydiff + this$static.degreeDiff[node.id_0][0]; return new Pair(valueOf_3(dummydiff), ($clinit_Boolean() , maxWidthNotExceeded?true:false)); } function $promoteNodeByModelOrder(this$static, node, leftToRight){ var edge, edge$iterator, nextNode, nodesToPromote, old, oldLayerId; oldLayerId = castTo($getKey_0(this$static.biLayerMap, node), 17).value_0; leftToRight?$put_13(this$static.biLayerMap, valueOf_3(oldLayerId + 1), node):$put_13(this$static.biLayerMap, valueOf_3(oldLayerId - 1), node); nodesToPromote = new LinkedHashSet; for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2((leftToRight?$getOutgoingEdges(node):$getIncomingEdges(node)).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); leftToRight?(nextNode = edge.target.owner):(nextNode = edge.source.owner); maskUndefined($getKey_0(this$static.biLayerMap, nextNode)) === maskUndefined($getKey_0(this$static.biLayerMap, node)) && (old = nodesToPromote.map_0.put(nextNode, nodesToPromote) , old == null); } return nodesToPromote; } function $promotionMagic(this$static, funky){ var apply_0, currentWidthBackup, currentWidthPixelBackup, dummyBackup, heightBackup, iterationCounter, layeringBackup, node, node$iterator, promotionFlag, promotionPair, promotions, reducedDummies; iterationCounter = 0; reducedDummies = 0; layeringBackup = copyOf(this$static.layers, this$static.layers.length); dummyBackup = this$static.dummyNodeCount; heightBackup = this$static.maxHeight; currentWidthBackup = this$static.currentWidth; currentWidthPixelBackup = this$static.currentWidthPixel; do { promotions = 0; for (node$iterator = new ArrayList$1(this$static.nodesWithIncomingEdges); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); promotionPair = $promoteNode(this$static, node); apply_0 = true; (this$static.promotionStrategy == ($clinit_NodePromotionStrategy() , NIKOLOV) || this$static.promotionStrategy == NIKOLOV_PIXEL) && (apply_0 = $booleanValue(castToBoolean(promotionPair.second))); if (castTo(promotionPair.first, 17).value_0 < 0 && apply_0) { ++promotions; layeringBackup = copyOf(this$static.layers, this$static.layers.length); this$static.dummyNodeCount = this$static.dummyNodeCount + castTo(promotionPair.first, 17).value_0; reducedDummies += dummyBackup - this$static.dummyNodeCount; dummyBackup = this$static.dummyNodeCount + castTo(promotionPair.first, 17).value_0; heightBackup = this$static.maxHeight; currentWidthBackup = newArrayList(this$static.currentWidth); currentWidthPixelBackup = newArrayList(this$static.currentWidthPixel); } else { this$static.layers = copyOf(layeringBackup, layeringBackup.length); this$static.dummyNodeCount = dummyBackup; this$static.currentWidth = (checkNotNull(currentWidthBackup) , currentWidthBackup?new ArrayList_1(currentWidthBackup):newArrayList_0(new ArrayList$1(currentWidthBackup))); this$static.currentWidthPixel = (checkNotNull(currentWidthPixelBackup) , currentWidthPixelBackup?new ArrayList_1(currentWidthPixelBackup):newArrayList_0(new ArrayList$1(currentWidthPixelBackup))); this$static.maxHeight = heightBackup; } } ++iterationCounter; promotionFlag = promotions != 0 && $booleanValue(castToBoolean(funky.apply_0(new Pair(valueOf_3(reducedDummies), valueOf_3(iterationCounter))))); } while (promotionFlag); } function $setNewLayering(this$static, layeredGraph){ var i, laLaLayer, layList, layerIt, node, node$iterator, possiblyEvilLayer; layList = new ArrayList; for (i = 0; i <= this$static.maxHeight; i++) { laLaLayer = new Layer(layeredGraph); laLaLayer.id_0 = this$static.maxHeight - i; push_1(layList.array, laLaLayer); } for (node$iterator = new ArrayList$1(this$static.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); $setLayer_0(node, castTo($get_11(layList, this$static.maxHeight - this$static.layers[node.id_0]), 30)); } layerIt = new ArrayList$1(layList); while (layerIt.i < layerIt.this$01.array.length) { possiblyEvilLayer = castTo($next_6(layerIt), 30); possiblyEvilLayer.nodes.array.length == 0 && $remove_13(layerIt); } layeredGraph.layers.array.length = 0; $addAll_2(layeredGraph.layers, layList); } function $setNewLayeringModelOrder(this$static, layeredGraph){ var keySet, layerIndex, layerIndex$iterator, layerList, layerNodes, newLayer, node, node$iterator; layerList = new ArrayList; layeredGraph.layers.array.length = 0; keySet = castTo($collect_1($sorted_0(new StreamImpl(null, new Spliterators$IteratorSpliterator(new AbstractMap$1(this$static.biLayerMap.multiMapKeyToValues), 1))), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , IDENTITY_FINISH)]))), 15); for (layerIndex$iterator = keySet.iterator_0(); layerIndex$iterator.hasNext_0();) { layerIndex = castTo(layerIndex$iterator.next_1(), 17); layerNodes = $getValues(this$static.biLayerMap, layerIndex); if (layerNodes.size_0 != 0) { newLayer = new Layer(layeredGraph); push_1(layerList.array, newLayer); newLayer.id_0 = layerIndex.value_0; for (node$iterator = $listIterator_2(layerNodes, 0); node$iterator.currentNode != node$iterator.this$01.tail;) { node = castTo($next_9(node$iterator), 10); $setLayer_0(node, newLayer); } } } $addAll_2(layeredGraph.layers, layerList); } function NodePromotion(){ $clinit_NodePromotion(); this.biLayerMap = new BiLinkedHashMultiMap; } function lambda$1_9(promoteUntilN_0, pair_1){ $clinit_NodePromotion(); return $clinit_Boolean() , castTo(pair_1.second, 17).value_0 < promoteUntilN_0?true:false; } function lambda$2_5(promoteUntilD_0, pair_1){ $clinit_NodePromotion(); return $clinit_Boolean() , castTo(pair_1.first, 17).value_0 < promoteUntilD_0?true:false; } defineClass(1627, 1, $intern_105, NodePromotion); _.process = function process_34(layeredGraph, progressMonitor){ $process_36(this, castTo(layeredGraph, 36), progressMonitor); } ; _.dummyNodeCount = 0; _.dummySize = 0; _.maxHeight = 0; _.maxWidth = 0; _.maxWidthPixel = 0; _.nodeSizeAffix = 0; var MODEL_ORDER_NODE_COMPARATOR_ASC, MODEL_ORDER_NODE_COMPARATOR_DESC; var Lorg_eclipse_elk_alg_layered_intermediate_NodePromotion_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'NodePromotion', 1627); function $compare_15(o1, o2){ if ($hasProperty(o1, ($clinit_InternalProperties_1() , MODEL_ORDER_1)) && $hasProperty(o2, MODEL_ORDER_1)) { return castTo($getProperty(o2, MODEL_ORDER_1), 17).value_0 - castTo($getProperty(o1, MODEL_ORDER_1), 17).value_0; } return 0; } function NodePromotion$1(){ } defineClass(1628, 1, $intern_88, NodePromotion$1); _.compare_1 = function compare_47(o1, o2){ return $compare_15(castTo(o1, 10), castTo(o2, 10)); } ; _.equals_0 = function equals_120(other){ return this === other; } ; _.reversed = function reversed_39(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_NodePromotion$1_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'NodePromotion/1', 1628); function $compare_16(o1, o2){ if ($hasProperty(o1, ($clinit_InternalProperties_1() , MODEL_ORDER_1)) && $hasProperty(o2, MODEL_ORDER_1)) { return castTo($getProperty(o1, MODEL_ORDER_1), 17).value_0 - castTo($getProperty(o2, MODEL_ORDER_1), 17).value_0; } return 0; } function NodePromotion$2(){ } defineClass(1629, 1, $intern_88, NodePromotion$2); _.compare_1 = function compare_48(o1, o2){ return $compare_16(castTo(o1, 10), castTo(o2, 10)); } ; _.equals_0 = function equals_121(other){ return this === other; } ; _.reversed = function reversed_40(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_NodePromotion$2_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'NodePromotion/2', 1629); function NodePromotion$lambda$0$Type(){ } defineClass(1630, 1, {}, NodePromotion$lambda$0$Type); _.apply_0 = function apply_91(arg0){ return castTo(arg0, 42) , $clinit_NodePromotion() , $clinit_Boolean() , true; } ; _.equals_0 = function equals_122(other){ return this === other; } ; var Lorg_eclipse_elk_alg_layered_intermediate_NodePromotion$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'NodePromotion/lambda$0$Type', 1630); function NodePromotion$lambda$1$Type(promoteUntilN_0){ this.promoteUntilN_0 = promoteUntilN_0; } defineClass(1631, 1, {}, NodePromotion$lambda$1$Type); _.apply_0 = function apply_92(arg0){ return lambda$1_9(this.promoteUntilN_0, castTo(arg0, 42)); } ; _.equals_0 = function equals_123(other){ return this === other; } ; _.promoteUntilN_0 = 0; var Lorg_eclipse_elk_alg_layered_intermediate_NodePromotion$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'NodePromotion/lambda$1$Type', 1631); function NodePromotion$lambda$2$Type(promoteUntilD_0){ this.promoteUntilD_0 = promoteUntilD_0; } defineClass(1632, 1, {}, NodePromotion$lambda$2$Type); _.apply_0 = function apply_93(arg0){ return lambda$2_5(this.promoteUntilD_0, castTo(arg0, 42)); } ; _.equals_0 = function equals_124(other){ return this === other; } ; _.promoteUntilD_0 = 0; var Lorg_eclipse_elk_alg_layered_intermediate_NodePromotion$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'NodePromotion/lambda$2$Type', 1632); function $process_37(layeredGraph, monitor){ var currentPort, layer, layer$iterator, node, node$array, node$index, node$max, nodeArray, port, port$iterator, portIterator, previousPort, routing, sameOriginPort, selfLoop, inputPort, outputPort, originInputPort, originOutputPort, bendPoint; monitor.begin('Odd port side processing', 1); routing = castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , EDGE_ROUTING)), 223); for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); nodeArray = toNodeArray(layer.nodes); for (node$array = nodeArray , node$index = 0 , node$max = node$array.length; node$index < node$max; ++node$index) { node = node$array[node$index]; if (node.type_0 != ($clinit_LNode$NodeType() , NORTH_SOUTH_PORT)) { continue; } if (routing == ($clinit_EdgeRouting() , SPLINES)) { for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); port.incomingEdges.array.length == 0 || $processSplineInputPort(port); port.outgoingEdges.array.length == 0 || $processSplineOutputPort(port); } } else if (instanceOf($getProperty(node, ($clinit_InternalProperties_1() , ORIGIN_0)), 18)) { selfLoop = castTo($getProperty(node, ORIGIN_0), 18); inputPort = castTo($getPorts_1(node, ($clinit_PortSide() , WEST_2)).iterator_0().next_1(), 12); outputPort = castTo($getPorts_1(node, EAST_2).iterator_0().next_1(), 12); originInputPort = castTo($getProperty(inputPort, ORIGIN_0), 12); originOutputPort = castTo($getProperty(outputPort, ORIGIN_0), 12); $setSource_0(selfLoop, originOutputPort); $setTarget_0(selfLoop, originInputPort); bendPoint = new KVector_2(outputPort.owner.pos); bendPoint.x_0 = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [originOutputPort.owner.pos, originOutputPort.pos, originOutputPort.anchor])).x_0; $add_7(selfLoop.bendPoints, bendPoint); bendPoint = new KVector_2(inputPort.owner.pos); bendPoint.x_0 = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [originInputPort.owner.pos, originInputPort.pos, originInputPort.anchor])).x_0; $add_7(selfLoop.bendPoints, bendPoint); } else { if (node.ports.array.length >= 2) { sameOriginPort = true; portIterator = new ArrayList$1(node.ports); currentPort = castTo($next_6(portIterator), 12); previousPort = null; while (portIterator.i < portIterator.this$01.array.length) { previousPort = currentPort; currentPort = castTo($next_6(portIterator), 12); if (!equals_Ljava_lang_Object__Z__devirtual$($getProperty(previousPort, ORIGIN_0), $getProperty(currentPort, ORIGIN_0))) { sameOriginPort = false; break; } } } else { sameOriginPort = false; } for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); port.incomingEdges.array.length == 0 || $processInputPort(port, sameOriginPort); port.outgoingEdges.array.length == 0 || $processOutputPort(port, sameOriginPort); } } $setLayer_0(node, null); } } monitor.done_1(); } function $processInputPort(inputPort, addJunctionPoints){ var edgeArray, inEdge, inEdge$array, inEdge$index, inEdge$max, junctionPoints, originPort, x_0, y_0; originPort = castTo($getProperty(inputPort, ($clinit_InternalProperties_1() , ORIGIN_0)), 12); x_0 = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [originPort.owner.pos, originPort.pos, originPort.anchor])).x_0; y_0 = inputPort.owner.pos.y_0; edgeArray = toEdgeArray(inputPort.incomingEdges); for (inEdge$array = edgeArray , inEdge$index = 0 , inEdge$max = inEdge$array.length; inEdge$index < inEdge$max; ++inEdge$index) { inEdge = inEdge$array[inEdge$index]; $setTarget_0(inEdge, originPort); $addLast_0(inEdge.bendPoints, new KVector_1(x_0, y_0)); if (addJunctionPoints) { junctionPoints = castTo($getProperty(inEdge, ($clinit_LayeredOptions() , JUNCTION_POINTS)), 75); if (!junctionPoints) { junctionPoints = new KVectorChain; $setProperty_0(inEdge, JUNCTION_POINTS, junctionPoints); } $add_7(junctionPoints, new KVector_1(x_0, y_0)); } } } function $processOutputPort(outputPort, addJunctionPoints){ var edgeArray, junctionPoints, originPort, outEdge, outEdge$array, outEdge$index, outEdge$max, x_0, y_0; originPort = castTo($getProperty(outputPort, ($clinit_InternalProperties_1() , ORIGIN_0)), 12); x_0 = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [originPort.owner.pos, originPort.pos, originPort.anchor])).x_0; y_0 = outputPort.owner.pos.y_0; edgeArray = toEdgeArray(outputPort.outgoingEdges); for (outEdge$array = edgeArray , outEdge$index = 0 , outEdge$max = outEdge$array.length; outEdge$index < outEdge$max; ++outEdge$index) { outEdge = outEdge$array[outEdge$index]; $setSource_0(outEdge, originPort); $addFirst_0(outEdge.bendPoints, new KVector_1(x_0, y_0)); if (addJunctionPoints) { junctionPoints = castTo($getProperty(outEdge, ($clinit_LayeredOptions() , JUNCTION_POINTS)), 75); if (!junctionPoints) { junctionPoints = new KVectorChain; $setProperty_0(outEdge, JUNCTION_POINTS, junctionPoints); } $add_7(junctionPoints, new KVector_1(x_0, y_0)); } } } function $processSplineInputPort(inputPort){ var edgeArray, inEdge, inEdge$array, inEdge$index, inEdge$max, originPort; originPort = castTo($getProperty(inputPort, ($clinit_InternalProperties_1() , ORIGIN_0)), 12); $setProperty_0(originPort, SPLINE_NS_PORT_Y_COORD, inputPort.owner.pos.y_0); edgeArray = toEdgeArray(inputPort.incomingEdges); for (inEdge$array = edgeArray , inEdge$index = 0 , inEdge$max = inEdge$array.length; inEdge$index < inEdge$max; ++inEdge$index) { inEdge = inEdge$array[inEdge$index]; $setTarget_0(inEdge, originPort); } } function $processSplineOutputPort(outputPort){ var edgeArray, originPort, outEdge, outEdge$array, outEdge$index, outEdge$max; originPort = castTo($getProperty(outputPort, ($clinit_InternalProperties_1() , ORIGIN_0)), 12); $setProperty_0(originPort, SPLINE_NS_PORT_Y_COORD, outputPort.owner.pos.y_0); edgeArray = toEdgeArray(outputPort.outgoingEdges); for (outEdge$array = edgeArray , outEdge$index = 0 , outEdge$max = outEdge$array.length; outEdge$index < outEdge$max; ++outEdge$index) { outEdge = outEdge$array[outEdge$index]; $setSource_0(outEdge, originPort); } } function NorthSouthPortPostprocessor(){ } defineClass(1633, 1, $intern_105, NorthSouthPortPostprocessor); _.process = function process_35(layeredGraph, monitor){ $process_37(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_NorthSouthPortPostprocessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'NorthSouthPortPostprocessor', 1633); function $createDummyNode_0(layeredGraph, inPort, outPort, dummyNodes){ var crossingHint, dummy, dummyInputPort, dummyOutputPort, edge, edge$array, edge$index, edge$max, edgeArray; dummy = new LNode(layeredGraph); $setType(dummy, ($clinit_LNode$NodeType() , NORTH_SOUTH_PORT)); $setProperty_0(dummy, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0), ($clinit_PortConstraints() , FIXED_POS)); crossingHint = 0; if (inPort) { dummyInputPort = new LPort; $setProperty_0(dummyInputPort, ($clinit_InternalProperties_1() , ORIGIN_0), inPort); $setProperty_0(dummy, ORIGIN_0, inPort.owner); $setSide(dummyInputPort, ($clinit_PortSide() , WEST_2)); $setNode(dummyInputPort, dummy); edgeArray = toEdgeArray(inPort.incomingEdges); for (edge$array = edgeArray , edge$index = 0 , edge$max = edge$array.length; edge$index < edge$max; ++edge$index) { edge = edge$array[edge$index]; $setTarget_0(edge, dummyInputPort); } $setProperty_0(inPort, PORT_DUMMY, dummy); ++crossingHint; } if (outPort) { dummyOutputPort = new LPort; $setProperty_0(dummy, ($clinit_InternalProperties_1() , ORIGIN_0), outPort.owner); $setProperty_0(dummyOutputPort, ORIGIN_0, outPort); $setSide(dummyOutputPort, ($clinit_PortSide() , EAST_2)); $setNode(dummyOutputPort, dummy); edgeArray = toEdgeArray(outPort.outgoingEdges); for (edge$array = edgeArray , edge$index = 0 , edge$max = edge$array.length; edge$index < edge$max; ++edge$index) { edge = edge$array[edge$index]; $setSource_0(edge, dummyOutputPort); } $setProperty_0(outPort, PORT_DUMMY, dummy); ++crossingHint; } $setProperty_0(dummy, ($clinit_InternalProperties_1() , CROSSING_HINT), valueOf_3(crossingHint)); push_1(dummyNodes.array, dummy); return dummy; } function $createDummyNodes(layeredGraph, ports, dummyNodes, opposingSideDummyNodes, barycenterAssociates){ var edge, edge$iterator, edge$iterator0, edge$iterator1, in_0, inOutPort, inOutPort$iterator, inOutPorts, inPort, inPort$iterator, inPorts, northSouthSelfLoopEdges, out, outPort, outPort$iterator, outPorts, port, port$iterator, port$iterator0, sameSideSelfLoopEdges, dummy, dummyInputPort, dummyOutputPort; inPorts = new ArrayList_0(ports.size_0); outPorts = new ArrayList_0(ports.size_0); inOutPorts = new ArrayList_0(ports.size_0); sameSideSelfLoopEdges = new ArrayList_0(ports.size_0); northSouthSelfLoopEdges = new ArrayList_0(ports.size_0); for (port$iterator0 = $listIterator_2(ports, 0); port$iterator0.currentNode != port$iterator0.this$01.tail;) { port = castTo($next_9(port$iterator0), 12); for (edge$iterator0 = new ArrayList$1(port.outgoingEdges); edge$iterator0.i < edge$iterator0.this$01.array.length;) { edge = castTo($next_6(edge$iterator0), 18); if (edge.source.owner == edge.target.owner) { if (port.side == edge.target.side) { push_1(sameSideSelfLoopEdges.array, edge); continue; } else if (port.side == ($clinit_PortSide() , NORTH_3) && edge.target.side == SOUTH_2) { push_1(northSouthSelfLoopEdges.array, edge); continue; } } } } for (edge$iterator1 = new ArrayList$1(northSouthSelfLoopEdges); edge$iterator1.i < edge$iterator1.this$01.array.length;) { edge = castTo($next_6(edge$iterator1), 18); $createNorthSouthSelfLoopDummyNodes(layeredGraph, edge, dummyNodes, opposingSideDummyNodes, ($clinit_PortSide() , EAST_2)); } for (edge$iterator = new ArrayList$1(sameSideSelfLoopEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); dummy = new LNode(layeredGraph); $setType(dummy, ($clinit_LNode$NodeType() , NORTH_SOUTH_PORT)); $setProperty_0(dummy, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0), ($clinit_PortConstraints() , FIXED_POS)); $setProperty_0(dummy, ($clinit_InternalProperties_1() , ORIGIN_0), edge); dummyInputPort = new LPort; $setProperty_0(dummyInputPort, ORIGIN_0, edge.target); $setSide(dummyInputPort, ($clinit_PortSide() , WEST_2)); $setNode(dummyInputPort, dummy); dummyOutputPort = new LPort; $setProperty_0(dummyOutputPort, ORIGIN_0, edge.source); $setSide(dummyOutputPort, EAST_2); $setNode(dummyOutputPort, dummy); $setProperty_0(edge.source, PORT_DUMMY, dummy); $setProperty_0(edge.target, PORT_DUMMY, dummy); $setSource_0(edge, null); $setTarget_0(edge, null); push_1(dummyNodes.array, dummy); $setProperty_0(dummy, CROSSING_HINT, valueOf_3(2)); } for (port$iterator = $listIterator_2(ports, 0); port$iterator.currentNode != port$iterator.this$01.tail;) { port = castTo($next_9(port$iterator), 12); in_0 = port.incomingEdges.array.length > 0; out = port.outgoingEdges.array.length > 0; in_0 && out?(push_1(inOutPorts.array, port) , true):in_0?(push_1(inPorts.array, port) , true):out && (push_1(outPorts.array, port) , true); } for (inPort$iterator = new ArrayList$1(inPorts); inPort$iterator.i < inPort$iterator.this$01.array.length;) { inPort = castTo($next_6(inPort$iterator), 12); $add_3(barycenterAssociates, $createDummyNode_0(layeredGraph, inPort, null, dummyNodes)); } for (outPort$iterator = new ArrayList$1(outPorts); outPort$iterator.i < outPort$iterator.this$01.array.length;) { outPort = castTo($next_6(outPort$iterator), 12); $add_3(barycenterAssociates, $createDummyNode_0(layeredGraph, null, outPort, dummyNodes)); } for (inOutPort$iterator = new ArrayList$1(inOutPorts); inOutPort$iterator.i < inOutPort$iterator.this$01.array.length;) { inOutPort = castTo($next_6(inOutPort$iterator), 12); $add_3(barycenterAssociates, $createDummyNode_0(layeredGraph, inOutPort, inOutPort, dummyNodes)); } } function $createNorthSouthSelfLoopDummyNodes(layeredGraph, selfLoop, northDummyNodes, southDummyNodes, portSide){ var northDummy, northDummyOutputPort, southDummy, southDummyInputPort; northDummy = new LNode(layeredGraph); $setType(northDummy, ($clinit_LNode$NodeType() , NORTH_SOUTH_PORT)); $setProperty_0(northDummy, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0), ($clinit_PortConstraints() , FIXED_POS)); $setProperty_0(northDummy, ($clinit_InternalProperties_1() , ORIGIN_0), selfLoop.source.owner); northDummyOutputPort = new LPort; $setProperty_0(northDummyOutputPort, ORIGIN_0, selfLoop.source); $setSide(northDummyOutputPort, portSide); $setNode(northDummyOutputPort, northDummy); $setProperty_0(selfLoop.source, PORT_DUMMY, northDummy); southDummy = new LNode(layeredGraph); $setType(southDummy, NORTH_SOUTH_PORT); $setProperty_0(southDummy, PORT_CONSTRAINTS_0, FIXED_POS); $setProperty_0(southDummy, ORIGIN_0, selfLoop.target.owner); southDummyInputPort = new LPort; $setProperty_0(southDummyInputPort, ORIGIN_0, selfLoop.target); $setSide(southDummyInputPort, portSide); $setNode(southDummyInputPort, southDummy); $setProperty_0(selfLoop.target, PORT_DUMMY, southDummy); $setSource_0(selfLoop, northDummyOutputPort); $setTarget_0(selfLoop, southDummyInputPort); checkCriticalPositionIndex(0, northDummyNodes.array.length); insertTo(northDummyNodes.array, 0, northDummy); push_1(southDummyNodes.array, southDummy); $setProperty_0(northDummy, CROSSING_HINT, valueOf_3(1)); $setProperty_0(southDummy, CROSSING_HINT, valueOf_3(1)); } function $process_38(layeredGraph, monitor){ var barycenterAssociates, dummy, dummy$iterator, dummy$iterator0, dummyPort, insertPoint, layer, layer$iterator, node, node$array, node$index, node$max, nodeArray, northDummyNodes, originPort, pointer, port, port$iterator, portList, predecessor, southDummyNodes, successor; monitor.begin('Odd port side processing', 1); northDummyNodes = new ArrayList; southDummyNodes = new ArrayList; for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); pointer = -1; nodeArray = toNodeArray(layer.nodes); for (node$array = nodeArray , node$index = 0 , node$max = node$array.length; node$index < node$max; ++node$index) { node = node$array[node$index]; ++pointer; if (!(node.type_0 == ($clinit_LNode$NodeType() , NORMAL) && $isSideFixed(castTo($getProperty(node, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101)))) { continue; } $isOrderFixed(castTo($getProperty(node, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101)) || $sortPortList_0(node); $setProperty_0(node, ($clinit_InternalProperties_1() , IN_LAYER_LAYOUT_UNIT), node); northDummyNodes.array.length = 0; southDummyNodes.array.length = 0; barycenterAssociates = new ArrayList; portList = new LinkedList; addAll_6(portList, $getPorts_1(node, ($clinit_PortSide() , NORTH_3))); $createDummyNodes(layeredGraph, portList, northDummyNodes, southDummyNodes, barycenterAssociates); insertPoint = pointer; successor = node; for (dummy$iterator0 = new ArrayList$1(northDummyNodes); dummy$iterator0.i < dummy$iterator0.this$01.array.length;) { dummy = castTo($next_6(dummy$iterator0), 10); $setLayer(dummy, insertPoint, layer); ++pointer; $setProperty_0(dummy, IN_LAYER_LAYOUT_UNIT, node); dummyPort = castTo($get_11(dummy.ports, 0), 12); originPort = castTo($getProperty(dummyPort, ORIGIN_0), 12); $booleanValue(castToBoolean($getProperty(originPort, ALLOW_NON_FLOW_PORTS_TO_SWITCH_SIDES_0))) || castTo($getProperty(dummy, IN_LAYER_SUCCESSOR_CONSTRAINTS), 15).add_2(successor); } $reset_0(portList); for (port$iterator = $getPorts_1(node, SOUTH_2).iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); $addNode_0(portList, port, portList.header, portList.header.next_0); } $createDummyNodes(layeredGraph, portList, southDummyNodes, null, barycenterAssociates); predecessor = node; for (dummy$iterator = new ArrayList$1(southDummyNodes); dummy$iterator.i < dummy$iterator.this$01.array.length;) { dummy = castTo($next_6(dummy$iterator), 10); $setLayer(dummy, ++pointer, layer); $setProperty_0(dummy, IN_LAYER_LAYOUT_UNIT, node); dummyPort = castTo($get_11(dummy.ports, 0), 12); originPort = castTo($getProperty(dummyPort, ORIGIN_0), 12); $booleanValue(castToBoolean($getProperty(originPort, ALLOW_NON_FLOW_PORTS_TO_SWITCH_SIDES_0))) || castTo($getProperty(predecessor, IN_LAYER_SUCCESSOR_CONSTRAINTS), 15).add_2(dummy); } barycenterAssociates.array.length == 0 || $setProperty_0(node, BARYCENTER_ASSOCIATES, barycenterAssociates); } } monitor.done_1(); } function $sortPortList_0(node){ var inOutPorts, inPorts, incoming, outPorts, outgoing, port, port$iterator, ports; ports = node.ports.array.length; inPorts = 0; inOutPorts = ports; outPorts = 2 * ports; for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); switch (port.side.ordinal) { case 2: case 4: port.id_0 = -1; break; case 1: case 3: incoming = port.incomingEdges.array.length; outgoing = port.outgoingEdges.array.length; incoming > 0 && outgoing > 0?(port.id_0 = inOutPorts++):incoming > 0?(port.id_0 = inPorts++):outgoing > 0?(port.id_0 = outPorts++):(port.id_0 = inPorts++); } } $clinit_Collections(); $sort(node.ports, new NorthSouthPortPreprocessor$lambda$0$Type); } function NorthSouthPortPreprocessor(){ } function lambda$0_25(port1_0, port2_1){ var side1, side2; side1 = port1_0.side; side2 = port2_1.side; return side1 != side2?side1.ordinal - side2.ordinal:port1_0.id_0 == port2_1.id_0?0:side1 == ($clinit_PortSide() , NORTH_3)?port1_0.id_0 - port2_1.id_0:port2_1.id_0 - port1_0.id_0; } defineClass(1634, 1, $intern_105, NorthSouthPortPreprocessor); _.process = function process_36(layeredGraph, monitor){ $process_38(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_NorthSouthPortPreprocessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'NorthSouthPortPreprocessor', 1634); function NorthSouthPortPreprocessor$lambda$0$Type(){ } defineClass(1635, 1, $intern_88, NorthSouthPortPreprocessor$lambda$0$Type); _.compare_1 = function compare_49(arg0, arg1){ return lambda$0_25(castTo(arg0, 12), castTo(arg1, 12)); } ; _.equals_0 = function equals_125(other){ return this === other; } ; _.reversed = function reversed_41(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_NorthSouthPortPreprocessor$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'NorthSouthPortPreprocessor/lambda$0$Type', 1635); function $connectNodes(firstPartition, secondPartition){ var edge, node, node$iterator, otherNode, otherNode$iterator, sourcePort, targetPort; for (node$iterator = firstPartition.iterator_0(); node$iterator.hasNext_0();) { node = castTo(node$iterator.next_1(), 10); sourcePort = new LPort; $setNode(sourcePort, node); $setSide(sourcePort, ($clinit_PortSide() , EAST_2)); $setProperty_0(sourcePort, ($clinit_InternalProperties_1() , PARTITION_DUMMY), ($clinit_Boolean() , true)); for (otherNode$iterator = secondPartition.iterator_0(); otherNode$iterator.hasNext_0();) { otherNode = castTo(otherNode$iterator.next_1(), 10); targetPort = new LPort; $setNode(targetPort, otherNode); $setSide(targetPort, WEST_2); $setProperty_0(targetPort, PARTITION_DUMMY, true); edge = new LEdge; $setProperty_0(edge, PARTITION_DUMMY, true); $setSource_0(edge, sourcePort); $setTarget_0(edge, targetPort); } } } function $process_39(lGraph, monitor){ var firstId, idIterator, partitionToNodesMap, result, secondId, sortedPartitionIDs; monitor.begin('Partition midprocessing', 1); partitionToNodesMap = new HashMultimap; $forEach_3($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(lGraph.layerlessNodes, 16)), new PartitionMidprocessor$lambda$0$Type), new PartitionMidprocessor$lambda$1$Type(partitionToNodesMap)); if (partitionToNodesMap.totalSize == 0) { return; } sortedPartitionIDs = castTo($collect_1($sorted_0((result = partitionToNodesMap.keySet , new StreamImpl(null, (!result?(partitionToNodesMap.keySet = new AbstractMapBasedMultimap$KeySet(partitionToNodesMap, partitionToNodesMap.map_0)):result).spliterator_0()))), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , IDENTITY_FINISH)]))), 15); idIterator = sortedPartitionIDs.iterator_0(); firstId = castTo(idIterator.next_1(), 17); while (idIterator.hasNext_0()) { secondId = castTo(idIterator.next_1(), 17); $connectNodes(castTo($get(partitionToNodesMap, firstId), 21), castTo($get(partitionToNodesMap, secondId), 21)); firstId = secondId; } monitor.done_1(); } function PartitionMidprocessor(){ } function lambda$1_10(partitionToNodesMap_0, node_1){ return $put(partitionToNodesMap_0, castTo($getProperty(node_1, ($clinit_LayeredOptions() , PARTITIONING_PARTITION)), 17), node_1); } defineClass(1636, 1, $intern_105, PartitionMidprocessor); _.process = function process_37(lGraph, monitor){ $process_39(castTo(lGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_PartitionMidprocessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'PartitionMidprocessor', 1636); function PartitionMidprocessor$lambda$0$Type(){ } defineClass(1637, 1, $intern_40, PartitionMidprocessor$lambda$0$Type); _.test_0 = function test_43(arg0){ return $hasProperty(castTo(arg0, 10), ($clinit_LayeredOptions() , PARTITIONING_PARTITION)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_PartitionMidprocessor$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'PartitionMidprocessor/lambda$0$Type', 1637); function PartitionMidprocessor$lambda$1$Type(partitionToNodesMap_0){ this.partitionToNodesMap_0 = partitionToNodesMap_0; } defineClass(1638, 1, $intern_19, PartitionMidprocessor$lambda$1$Type); _.accept = function accept_79(arg0){ lambda$1_10(this.partitionToNodesMap_0, castTo(arg0, 10)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_PartitionMidprocessor$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'PartitionMidprocessor/lambda$1$Type', 1638); function $process_40(lGraph, monitor){ var layer, layer$iterator, node, node$iterator, port, ports; monitor.begin('Partition postprocessing', 1); for (layer$iterator = new ArrayList$1(lGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); ports = new ArrayList$1(node.ports); while (ports.i < ports.this$01.array.length) { port = castTo($next_6(ports), 12); $booleanValue(castToBoolean($getProperty(port, ($clinit_InternalProperties_1() , PARTITION_DUMMY)))) && $remove_13(ports); } } } monitor.done_1(); } function PartitionPostprocessor(){ } defineClass(1639, 1, $intern_105, PartitionPostprocessor); _.process = function process_38(lGraph, monitor){ $process_40(castTo(lGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_PartitionPostprocessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'PartitionPostprocessor', 1639); function $mustBeReversed(lEdge){ var sourcePartition, targetPartition; if ($hasProperty(lEdge.target.owner, ($clinit_LayeredOptions() , PARTITIONING_PARTITION))) { sourcePartition = castTo($getProperty(lEdge.source.owner, PARTITIONING_PARTITION), 17); targetPartition = castTo($getProperty(lEdge.target.owner, PARTITIONING_PARTITION), 17); return compare_5(sourcePartition.value_0, targetPartition.value_0) > 0; } else { return false; } } function $process_41(lGraph, monitor){ var edgesToBeReversed; monitor.begin('Partition preprocessing', 1); edgesToBeReversed = castTo($collect_1($filter($flatMap($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(lGraph.layerlessNodes, 16)), new PartitionPreprocessor$lambda$0$Type), new PartitionPreprocessor$lambda$1$Type), new PartitionPreprocessor$lambda$2$Type), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , IDENTITY_FINISH)]))), 15); $forEach_3(edgesToBeReversed.stream(), new PartitionPreprocessor$lambda$3$Type); monitor.done_1(); } function $reverse_1(lEdge){ var priority; $reverse_0(lEdge, true); priority = $intern_46; $hasProperty(lEdge, ($clinit_LayeredOptions() , PRIORITY_DIRECTION_0)) && (priority += castTo($getProperty(lEdge, PRIORITY_DIRECTION_0), 17).value_0); $setProperty_0(lEdge, PRIORITY_DIRECTION_0, valueOf_3(priority)); } function PartitionPreprocessor(){ } defineClass(1640, 1, $intern_105, PartitionPreprocessor); _.process = function process_39(lGraph, monitor){ $process_41(castTo(lGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_PartitionPreprocessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'PartitionPreprocessor', 1640); function PartitionPreprocessor$lambda$0$Type(){ } defineClass(1641, 1, $intern_40, PartitionPreprocessor$lambda$0$Type); _.test_0 = function test_44(arg0){ return $hasProperty(castTo(arg0, 10), ($clinit_LayeredOptions() , PARTITIONING_PARTITION)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_PartitionPreprocessor$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'PartitionPreprocessor/lambda$0$Type', 1641); function PartitionPreprocessor$lambda$1$Type(){ } defineClass(1642, 1, {}, PartitionPreprocessor$lambda$1$Type); _.apply_0 = function apply_94(arg0){ return new StreamImpl(null, new Spliterators$IteratorSpliterator_0(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(castTo(arg0, 10)).val$inputs1.iterator_0(), new Iterables$10)))); } ; var Lorg_eclipse_elk_alg_layered_intermediate_PartitionPreprocessor$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'PartitionPreprocessor/lambda$1$Type', 1642); function PartitionPreprocessor$lambda$2$Type(){ } defineClass(1643, 1, $intern_40, PartitionPreprocessor$lambda$2$Type); _.test_0 = function test_45(arg0){ return $mustBeReversed(castTo(arg0, 18)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_PartitionPreprocessor$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'PartitionPreprocessor/lambda$2$Type', 1643); function PartitionPreprocessor$lambda$3$Type(){ } defineClass(1644, 1, $intern_19, PartitionPreprocessor$lambda$3$Type); _.accept = function accept_80(arg0){ $reverse_1(castTo(arg0, 18)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_PartitionPreprocessor$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'PartitionPreprocessor/lambda$3$Type', 1644); function $clinit_PortListSorter(){ $clinit_PortListSorter = emptyMethod; IN_EDGES = new PortListSorter$lambda$2$Type; OUT_EDGES = new PortListSorter$lambda$3$Type; CMP_PORT_SIDE = new PortListSorter$lambda$0$Type; CMP_PORT_DEGREE_EAST_WEST = new PortListSorter$lambda$4$Type; CMP_FIXED_ORDER_AND_FIXED_POS = new PortListSorter$lambda$1$Type; CMP_COMBINED = (checkCriticalNotNull(CMP_FIXED_ORDER_AND_FIXED_POS) , new Comparator$lambda$0$Type); } function $findPortSideRange(ports, side){ var currentSide, hb, highIdx, lb, lowIdx; if (ports.array.length == 0) { return new Pair(valueOf_3(0), valueOf_3(0)); } currentSide = (checkCriticalElementIndex(0, ports.array.length) , castTo(ports.array[0], 12)).side; lowIdx = 0; lb = side.ordinal; hb = side.ordinal + 1; while (lowIdx < ports.array.length - 1 && currentSide.ordinal < lb) { ++lowIdx; currentSide = (checkCriticalElementIndex(lowIdx, ports.array.length) , castTo(ports.array[lowIdx], 12)).side; } highIdx = lowIdx; while (highIdx < ports.array.length - 1 && currentSide.ordinal < hb) { ++highIdx; currentSide = (checkCriticalElementIndex(lowIdx, ports.array.length) , castTo(ports.array[lowIdx], 12)).side; } return new Pair(valueOf_3(lowIdx), valueOf_3(highIdx)); } function $process_42(layeredGraph, monitor){ var layer, layer$iterator, node, node$iterator, portConstraints, ports, pss; monitor.begin('Port order processing', 1); pss = castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , PORT_SORTING_STRATEGY_0)), 430); for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); portConstraints = castTo($getProperty(node, PORT_CONSTRAINTS_0), 101); ports = node.ports; if (portConstraints == ($clinit_PortConstraints() , FIXED_ORDER) || portConstraints == FIXED_RATIO || portConstraints == FIXED_POS) { $clinit_Collections(); $sort(ports, CMP_COMBINED); } else if (portConstraints != FREE && portConstraints != UNDEFINED_4) { $clinit_Collections(); $sort(ports, CMP_PORT_SIDE); $reverseWestAndSouthSide(ports); pss == ($clinit_PortSortingStrategy() , PORT_DEGREE) && $sort(ports, CMP_PORT_DEGREE_EAST_WEST); } node.portSidesCached = true; $findPortIndices(node); } } monitor.done_1(); } function $reverse_2(ports, lowIdx, highIdx){ var i, n, tmp; if (highIdx <= lowIdx + 2) { return; } n = (highIdx - lowIdx) / 2 | 0; for (i = 0; i < n; ++i) { tmp = (checkCriticalElementIndex(lowIdx + i, ports.array.length) , castTo(ports.array[lowIdx + i], 12)); $set_1(ports, lowIdx + i, (checkCriticalElementIndex(highIdx - i - 1, ports.array.length) , castTo(ports.array[highIdx - i - 1], 12))); checkCriticalElementIndex(highIdx - i - 1, ports.array.length); ports.array[highIdx - i - 1] = tmp; } } function $reverseWestAndSouthSide(ports){ var southIndices, westIndices; if (ports.array.length <= 1) { return; } southIndices = $findPortSideRange(ports, ($clinit_PortSide() , SOUTH_2)); $reverse_2(ports, castTo(southIndices.first, 17).value_0, castTo(southIndices.second, 17).value_0); westIndices = $findPortSideRange(ports, WEST_2); $reverse_2(ports, castTo(westIndices.first, 17).value_0, castTo(westIndices.second, 17).value_0); } function PortListSorter(){ $clinit_PortListSorter(); } function lambda$0_26(p1_0, p2_1){ $clinit_PortListSorter(); var ordinalDifference; ordinalDifference = p1_0.side.ordinal - p2_1.side.ordinal; if (ordinalDifference != 0) { return ordinalDifference; } return 0; } function lambda$1_11(p1_0, p2_1){ $clinit_PortListSorter(); var index1, index2, indexDifference, ordinalDifference, portConstraints; portConstraints = castTo($getProperty(p1_0.owner, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101); ordinalDifference = p1_0.side.ordinal - p2_1.side.ordinal; if (ordinalDifference != 0 || !(portConstraints == ($clinit_PortConstraints() , FIXED_ORDER) || portConstraints == FIXED_RATIO || portConstraints == FIXED_POS)) { return 0; } if (portConstraints == ($clinit_PortConstraints() , FIXED_ORDER)) { index1 = castTo($getProperty(p1_0, PORT_INDEX), 17); index2 = castTo($getProperty(p2_1, PORT_INDEX), 17); if (!!index1 && !!index2) { indexDifference = index1.value_0 - index2.value_0; if (indexDifference != 0) { return indexDifference; } } } switch (p1_0.side.ordinal) { case 1: return compare_4(p1_0.pos.x_0, p2_1.pos.x_0); case 2: return compare_4(p1_0.pos.y_0, p2_1.pos.y_0); case 3: return compare_4(p2_1.pos.x_0, p1_0.pos.x_0); case 4: return compare_4(p2_1.pos.y_0, p1_0.pos.y_0); default:throw toJs(new IllegalStateException_0('Port side is undefined')); } } function lambda$4_6(p1_0, p2_1){ $clinit_PortListSorter(); var ordinalDifference; ordinalDifference = p1_0.side.ordinal - p2_1.side.ordinal; if (ordinalDifference != 0) { return 0; } switch (p1_0.side.ordinal) { case 2: return realDegree_0(p2_1, OUT_EDGES) - realDegree_0(p1_0, OUT_EDGES); case 4: return realDegree_0(p1_0, IN_EDGES) - realDegree_0(p2_1, IN_EDGES); } return 0; } function realDegree_0(p, edgesFun){ var e, e$iterator, realDegree; realDegree = 0; for (e$iterator = castTo(edgesFun.apply_0(p), 20).iterator_0(); e$iterator.hasNext_0();) { e = castTo(e$iterator.next_1(), 18); $booleanValue(castToBoolean($getProperty(e, ($clinit_InternalProperties_1() , REVERSED)))) || ++realDegree; } return realDegree; } defineClass(1645, 1, $intern_105, PortListSorter); _.process = function process_40(layeredGraph, monitor){ $process_42(castTo(layeredGraph, 36), monitor); } ; var CMP_COMBINED, CMP_FIXED_ORDER_AND_FIXED_POS, CMP_PORT_DEGREE_EAST_WEST, CMP_PORT_SIDE, IN_EDGES, OUT_EDGES; var Lorg_eclipse_elk_alg_layered_intermediate_PortListSorter_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'PortListSorter', 1645); function PortListSorter$lambda$0$Type(){ } defineClass(1648, 1, $intern_88, PortListSorter$lambda$0$Type); _.compare_1 = function compare_50(arg0, arg1){ return lambda$0_26(castTo(arg0, 12), castTo(arg1, 12)); } ; _.equals_0 = function equals_126(other){ return this === other; } ; _.reversed = function reversed_42(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_PortListSorter$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'PortListSorter/lambda$0$Type', 1648); function PortListSorter$lambda$1$Type(){ } defineClass(1650, 1, $intern_88, PortListSorter$lambda$1$Type); _.compare_1 = function compare_51(arg0, arg1){ return lambda$1_11(castTo(arg0, 12), castTo(arg1, 12)); } ; _.equals_0 = function equals_127(other){ return this === other; } ; _.reversed = function reversed_43(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_PortListSorter$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'PortListSorter/lambda$1$Type', 1650); function PortListSorter$lambda$2$Type(){ } defineClass(1646, 1, {}, PortListSorter$lambda$2$Type); _.apply_0 = function apply_95(arg0){ return $clinit_PortListSorter() , castTo(arg0, 12).incomingEdges; } ; var Lorg_eclipse_elk_alg_layered_intermediate_PortListSorter$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'PortListSorter/lambda$2$Type', 1646); function PortListSorter$lambda$3$Type(){ } defineClass(1647, 1, {}, PortListSorter$lambda$3$Type); _.apply_0 = function apply_96(arg0){ return $clinit_PortListSorter() , castTo(arg0, 12).outgoingEdges; } ; var Lorg_eclipse_elk_alg_layered_intermediate_PortListSorter$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'PortListSorter/lambda$3$Type', 1647); function PortListSorter$lambda$4$Type(){ } defineClass(1649, 1, $intern_88, PortListSorter$lambda$4$Type); _.compare_1 = function compare_52(arg0, arg1){ return lambda$4_6(castTo(arg0, 12), castTo(arg1, 12)); } ; _.equals_0 = function equals_128(other){ return this === other; } ; _.reversed = function reversed_44(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_PortListSorter$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'PortListSorter/lambda$4$Type', 1649); function $process_43(layeredGraph, monitor){ var layer, layer$iterator, node, node$iterator, node$iterator0; monitor.begin('Port side processing', 1); for (node$iterator0 = new ArrayList$1(layeredGraph.layerlessNodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); $process_44(node); } for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); $process_44(node); } } monitor.done_1(); } function $process_44(node){ var port, port$iterator, portDummy; if ($isSideFixed(castTo($getProperty(node, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101))) { for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); port.side == ($clinit_PortSide() , UNDEFINED_5) && (portDummy = castTo($getProperty(port, ($clinit_InternalProperties_1() , PORT_DUMMY)), 10) , portDummy?$setSide(port, castTo($getProperty(portDummy, EXT_PORT_SIDE), 64)):port.incomingEdges.array.length - port.outgoingEdges.array.length < 0?$setSide(port, EAST_2):$setSide(port, WEST_2)); } } else { for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); portDummy = castTo($getProperty(port, ($clinit_InternalProperties_1() , PORT_DUMMY)), 10); portDummy?$setSide(port, castTo($getProperty(portDummy, EXT_PORT_SIDE), 64)):port.incomingEdges.array.length - port.outgoingEdges.array.length < 0?$setSide(port, ($clinit_PortSide() , EAST_2)):$setSide(port, ($clinit_PortSide() , WEST_2)); } $setProperty_0(node, PORT_CONSTRAINTS_0, ($clinit_PortConstraints() , FIXED_SIDE)); } } function PortSideProcessor(){ } defineClass(1651, 1, $intern_105, PortSideProcessor); _.process = function process_41(layeredGraph, monitor){ $process_43(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_PortSideProcessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'PortSideProcessor', 1651); function $process_45(layeredGraph, monitor){ var edge, edge$array, edge$index, edge$max, edgeArray, layer, layer$iterator, node, node$iterator, port, port$iterator; monitor.begin('Restoring reversed edges', 1); for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); edgeArray = toEdgeArray(port.outgoingEdges); for (edge$array = edgeArray , edge$index = 0 , edge$max = edge$array.length; edge$index < edge$max; ++edge$index) { edge = edge$array[edge$index]; $booleanValue(castToBoolean($getProperty(edge, ($clinit_InternalProperties_1() , REVERSED)))) && $reverse_0(edge, false); } } } } monitor.done_1(); } function ReversedEdgeRestorer(){ } defineClass(1652, 1, $intern_105, ReversedEdgeRestorer); _.process = function process_42(layeredGraph, monitor){ $process_45(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_ReversedEdgeRestorer_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'ReversedEdgeRestorer', 1652); function $process_46(this$static, graph, progressMonitor){ progressMonitor.begin('Self-Loop ordering', 1); $forEach_3($map($filter($filter($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(graph.layers, 16)), new SelfLoopPortRestorer$lambda$0$Type), new SelfLoopPortRestorer$lambda$1$Type), new SelfLoopPortRestorer$lambda$2$Type), new SelfLoopPortRestorer$lambda$3$Type), new SelfLoopPortRestorer$lambda$4$Type(this$static)); progressMonitor.done_1(); } function $processNode_4(this$static, slHolder){ if (slHolder.arePortsHidden) { switch (castTo($getProperty(slHolder.lNode, ($clinit_InternalProperties_1() , ORIGINAL_PORT_CONSTRAINTS)), 101).ordinal) { case 0: case 1: $assignPortSides(slHolder); case 2: $forEach_3(new StreamImpl(null, new Spliterators$IteratorSpliterator(slHolder.slHyperLoops, 16)), new SelfLoopPortRestorer$lambda$5$Type); $restorePorts_0(this$static.portRestorer, slHolder); } } else { $forEach_3(new StreamImpl(null, new Spliterators$IteratorSpliterator(slHolder.slHyperLoops, 16)), new SelfLoopPortRestorer$lambda$5$Type); } } function SelfLoopPortRestorer(){ this.portRestorer = new PortRestorer; } defineClass(1657, 1, $intern_105, SelfLoopPortRestorer); _.process = function process_43(graph, progressMonitor){ $process_46(this, castTo(graph, 36), progressMonitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopPortRestorer_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopPortRestorer', 1657); function SelfLoopPortRestorer$lambda$0$Type(){ } defineClass(1658, 1, {}, SelfLoopPortRestorer$lambda$0$Type); _.apply_0 = function apply_97(arg0){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 30).nodes, 16)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopPortRestorer$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopPortRestorer/lambda$0$Type', 1658); function SelfLoopPortRestorer$lambda$1$Type(){ } defineClass(1659, 1, $intern_40, SelfLoopPortRestorer$lambda$1$Type); _.test_0 = function test_46(arg0){ return castTo(arg0, 10).type_0 == ($clinit_LNode$NodeType() , NORMAL); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopPortRestorer$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopPortRestorer/lambda$1$Type', 1659); function SelfLoopPortRestorer$lambda$2$Type(){ } defineClass(1660, 1, $intern_40, SelfLoopPortRestorer$lambda$2$Type); _.test_0 = function test_47(arg0){ return $hasProperty(castTo(arg0, 10), ($clinit_InternalProperties_1() , SELF_LOOP_HOLDER)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopPortRestorer$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopPortRestorer/lambda$2$Type', 1660); function SelfLoopPortRestorer$lambda$3$Type(){ } defineClass(1661, 1, {}, SelfLoopPortRestorer$lambda$3$Type); _.apply_0 = function apply_98(arg0){ return castTo($getProperty(castTo(arg0, 10), ($clinit_InternalProperties_1() , SELF_LOOP_HOLDER)), 337); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopPortRestorer$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopPortRestorer/lambda$3$Type', 1661); function SelfLoopPortRestorer$lambda$4$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1662, 1, $intern_19, SelfLoopPortRestorer$lambda$4$Type); _.accept = function accept_81(arg0){ $processNode_4(this.$$outer_0, castTo(arg0, 337)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopPortRestorer$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopPortRestorer/lambda$4$Type', 1662); function SelfLoopPortRestorer$lambda$5$Type(){ } defineClass(805, 1, $intern_19, SelfLoopPortRestorer$lambda$5$Type); _.accept = function accept_82(arg0){ $computePortsPerSide(castTo(arg0, 105)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopPortRestorer$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopPortRestorer/lambda$5$Type', 805); function $process_47(graph, progressMonitor){ progressMonitor.begin('Self-Loop post-processing', 1); $forEach_3($filter($filter($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(graph.layers, 16)), new SelfLoopPostProcessor$lambda$0$Type), new SelfLoopPostProcessor$lambda$1$Type), new SelfLoopPostProcessor$lambda$2$Type), new SelfLoopPostProcessor$lambda$3$Type); progressMonitor.done_1(); } function $processNode_5(lNode){ var slHolder; slHolder = castTo($getProperty(lNode, ($clinit_InternalProperties_1() , SELF_LOOP_HOLDER)), 337); $forEach_3($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(slHolder.slHyperLoops, 16)), new SelfLoopPostProcessor$lambda$4$Type), new SelfLoopPostProcessor$lambda$5$Type(lNode)); $forEach_3($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(slHolder.slHyperLoops, 16)), new SelfLoopPostProcessor$lambda$6$Type), new SelfLoopPostProcessor$lambda$7$Type(lNode)); } function $restoreEdge(lNode, slEdge){ var lEdge; lEdge = slEdge.lEdge; $setSource_0(lEdge, slEdge.slSource.lPort); $setTarget_0(lEdge, slEdge.slTarget.lPort); $offset_2(lEdge.bendPoints, lNode.pos); } function SelfLoopPostProcessor(){ } function lambda$7_1(lNode_0, slLoop_1){ $applyPlacement(slLoop_1.slLabels, lNode_0.pos); } defineClass(1663, 1, $intern_105, SelfLoopPostProcessor); _.process = function process_44(graph, progressMonitor){ $process_47(castTo(graph, 36), progressMonitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopPostProcessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopPostProcessor', 1663); function SelfLoopPostProcessor$lambda$0$Type(){ } defineClass(1664, 1, {}, SelfLoopPostProcessor$lambda$0$Type); _.apply_0 = function apply_99(arg0){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 30).nodes, 16)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopPostProcessor$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopPostProcessor/lambda$0$Type', 1664); function SelfLoopPostProcessor$lambda$1$Type(){ } defineClass(1665, 1, $intern_40, SelfLoopPostProcessor$lambda$1$Type); _.test_0 = function test_48(arg0){ return castTo(arg0, 10).type_0 == ($clinit_LNode$NodeType() , NORMAL); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopPostProcessor$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopPostProcessor/lambda$1$Type', 1665); function SelfLoopPostProcessor$lambda$2$Type(){ } defineClass(1666, 1, $intern_40, SelfLoopPostProcessor$lambda$2$Type); _.test_0 = function test_49(arg0){ return $hasProperty(castTo(arg0, 10), ($clinit_InternalProperties_1() , SELF_LOOP_HOLDER)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopPostProcessor$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopPostProcessor/lambda$2$Type', 1666); function SelfLoopPostProcessor$lambda$3$Type(){ } defineClass(1667, 1, $intern_19, SelfLoopPostProcessor$lambda$3$Type); _.accept = function accept_83(arg0){ $processNode_5(castTo(arg0, 10)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopPostProcessor$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopPostProcessor/lambda$3$Type', 1667); function SelfLoopPostProcessor$lambda$4$Type(){ } defineClass(1668, 1, {}, SelfLoopPostProcessor$lambda$4$Type); _.apply_0 = function apply_100(arg0){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 105).slEdges, 1)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopPostProcessor$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopPostProcessor/lambda$4$Type', 1668); function SelfLoopPostProcessor$lambda$5$Type(lNode_1){ this.lNode_1 = lNode_1; } defineClass(1669, 1, $intern_19, SelfLoopPostProcessor$lambda$5$Type); _.accept = function accept_84(arg0){ $restoreEdge(this.lNode_1, castTo(arg0, 340)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopPostProcessor$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopPostProcessor/lambda$5$Type', 1669); function SelfLoopPostProcessor$lambda$6$Type(){ } defineClass(1670, 1, $intern_40, SelfLoopPostProcessor$lambda$6$Type); _.test_0 = function test_50(arg0){ return !!castTo(arg0, 105).slLabels; } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopPostProcessor$lambda$6$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopPostProcessor/lambda$6$Type', 1670); function SelfLoopPostProcessor$lambda$7$Type(lNode_0){ this.lNode_0 = lNode_0; } defineClass(1671, 1, $intern_19, SelfLoopPostProcessor$lambda$7$Type); _.accept = function accept_85(arg0){ lambda$7_1(this.lNode_0, castTo(arg0, 105)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopPostProcessor$lambda$7$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopPostProcessor/lambda$7$Type', 1671); function $hidePorts(slHolder){ var entry, hierarchyMode, lNode, lPort, nestedGraph, orderFixed, outerIter, slPort, slPort$iterator; lNode = slHolder.lNode; nestedGraph = lNode.nestedGraph; orderFixed = $isOrderFixed(castTo($getProperty(lNode, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101)); hierarchyMode = !!nestedGraph && castTo($getProperty(nestedGraph, ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21).contains(($clinit_GraphProperties() , EXTERNAL_PORTS)); if (orderFixed || hierarchyMode) { return; } for (slPort$iterator = (outerIter = (new AbstractMap$2(slHolder.slPorts)).this$01.entrySet_0().iterator_0() , new AbstractMap$2$1(outerIter)); slPort$iterator.val$outerIter2.hasNext_0();) { slPort = (entry = castTo(slPort$iterator.val$outerIter2.next_1(), 44) , castTo(entry.getValue(), 113)); if (slPort.hadOnlySelfLoops) { lPort = slPort.lPort; $setNode(lPort, null); slPort.isHidden = true; slHolder.arePortsHidden = true; } } } function $lambda$2_0(lEdge_0){ $setSource_0(lEdge_0, null); $setTarget_0(lEdge_0, null); } function $process_48(graph, progressMonitor){ var lnode, lnode$iterator, slHolder, holder; progressMonitor.begin('Self-Loop pre-processing', 1); for (lnode$iterator = new ArrayList$1(graph.layerlessNodes); lnode$iterator.i < lnode$iterator.this$01.array.length;) { lnode = castTo($next_6(lnode$iterator), 10); if (needsSelfLoopProcessing(lnode)) { slHolder = (holder = new SelfLoopHolder(lnode) , $setProperty_0(lnode, ($clinit_InternalProperties_1() , SELF_LOOP_HOLDER), holder) , $initialize_3(holder) , holder); $forEach_3($map($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(slHolder.slHyperLoops, 16)), new SelfLoopPreProcessor$lambda$0$Type), new SelfLoopPreProcessor$lambda$1$Type), new SelfLoopPreProcessor$lambda$2$Type); $hidePorts(slHolder); } } progressMonitor.done_1(); } function SelfLoopPreProcessor(){ } defineClass(1653, 1, $intern_105, SelfLoopPreProcessor); _.process = function process_45(graph, progressMonitor){ $process_48(castTo(graph, 36), progressMonitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopPreProcessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopPreProcessor', 1653); function SelfLoopPreProcessor$lambda$0$Type(){ } defineClass(1654, 1, {}, SelfLoopPreProcessor$lambda$0$Type); _.apply_0 = function apply_101(arg0){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 105).slEdges, 1)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopPreProcessor$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopPreProcessor/lambda$0$Type', 1654); function SelfLoopPreProcessor$lambda$1$Type(){ } defineClass(1655, 1, {}, SelfLoopPreProcessor$lambda$1$Type); _.apply_0 = function apply_102(arg0){ return castTo(arg0, 340).lEdge; } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopPreProcessor$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopPreProcessor/lambda$1$Type', 1655); function SelfLoopPreProcessor$lambda$2$Type(){ } defineClass(1656, 1, $intern_19, SelfLoopPreProcessor$lambda$2$Type); _.accept = function accept_86(arg0){ $lambda$2_0(castTo(arg0, 18)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopPreProcessor$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopPreProcessor/lambda$2$Type', 1656); function $lambda$4(this$static, router_2, slHolder_3){ $determineLoopRoutes(this$static.routingDirector, slHolder_3); $placeLabels_1(slHolder_3); $assignRoutingSlots(this$static.routingSlotAssigner, slHolder_3); $routeSelfLoops(router_2, slHolder_3); } function $process_49(this$static, graph, progressMonitor){ var router; progressMonitor.begin('Self-Loop routing', 1); router = $routerForGraph(graph); throwClassCastExceptionUnlessNull($getProperty(graph, ($clinit_LabelManagementOptions() , LABEL_MANAGER))); $forEach_3($map($filter($filter($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(graph.layers, 16)), new SelfLoopRouter$lambda$0$Type), new SelfLoopRouter$lambda$1$Type), new SelfLoopRouter$lambda$2$Type), new SelfLoopRouter$lambda$3$Type), new SelfLoopRouter$lambda$4$Type(this$static, router)); progressMonitor.done_1(); } function $routerForGraph(graph){ switch (castTo($getProperty(graph, ($clinit_LayeredOptions() , EDGE_ROUTING)), 223).ordinal) { case 1: return new PolylineSelfLoopRouter; case 3: return new SplineSelfLoopRouter; default:return new OrthogonalSelfLoopRouter; } } function SelfLoopRouter(){ this.routingDirector = new RoutingDirector; this.routingSlotAssigner = new RoutingSlotAssigner; } defineClass(1672, 1, $intern_105, SelfLoopRouter); _.process = function process_46(graph, progressMonitor){ $process_49(this, castTo(graph, 36), progressMonitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopRouter_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopRouter', 1672); function SelfLoopRouter$lambda$0$Type(){ } defineClass(1673, 1, {}, SelfLoopRouter$lambda$0$Type); _.apply_0 = function apply_103(arg0){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 30).nodes, 16)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopRouter$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopRouter/lambda$0$Type', 1673); function SelfLoopRouter$lambda$1$Type(){ } defineClass(1674, 1, $intern_40, SelfLoopRouter$lambda$1$Type); _.test_0 = function test_51(arg0){ return castTo(arg0, 10).type_0 == ($clinit_LNode$NodeType() , NORMAL); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopRouter$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopRouter/lambda$1$Type', 1674); function SelfLoopRouter$lambda$2$Type(){ } defineClass(1675, 1, $intern_40, SelfLoopRouter$lambda$2$Type); _.test_0 = function test_52(arg0){ return $hasProperty(castTo(arg0, 10), ($clinit_InternalProperties_1() , SELF_LOOP_HOLDER)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopRouter$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopRouter/lambda$2$Type', 1675); function SelfLoopRouter$lambda$3$Type(){ } defineClass(1676, 1, {}, SelfLoopRouter$lambda$3$Type); _.apply_0 = function apply_104(arg0){ return castTo($getProperty(castTo(arg0, 10), ($clinit_InternalProperties_1() , SELF_LOOP_HOLDER)), 337); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopRouter$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopRouter/lambda$3$Type', 1676); function SelfLoopRouter$lambda$4$Type($$outer_0, router_2){ this.$$outer_0 = $$outer_0; this.router_2 = router_2; } defineClass(1677, 1, $intern_19, SelfLoopRouter$lambda$4$Type); _.accept = function accept_87(arg0){ $lambda$4(this.$$outer_0, this.router_2, castTo(arg0, 337)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SelfLoopRouter$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SelfLoopRouter/lambda$4$Type', 1677); function $process_50(layeredGraph, progressMonitor){ var addedConstraints, l, l$iterator, reduced; progressMonitor.begin('Semi-Interactive Crossing Minimization Processor', 1); addedConstraints = false; for (l$iterator = new ArrayList$1(layeredGraph.layers); l$iterator.i < l$iterator.this$01.array.length;) { l = castTo($next_6(l$iterator), 30); reduced = $reduce_0($sorted_1($filter($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(l.nodes, 16)), new SemiInteractiveCrossMinProcessor$lambda$0$Type), new SemiInteractiveCrossMinProcessor$lambda$1$Type), new SemiInteractiveCrossMinProcessor$lambda$2$Type), new SemiInteractiveCrossMinProcessor$lambda$3$Type); addedConstraints = addedConstraints | reduced.ref != null; } addedConstraints && $setProperty_0(layeredGraph, ($clinit_InternalProperties_1() , IN_LAYER_SUCCESSOR_CONSTRAINTS_BETWEEN_NON_DUMMIES), ($clinit_Boolean() , true)); progressMonitor.done_1(); } function SemiInteractiveCrossMinProcessor(){ } function lambda$2_6(n1_0, n2_1){ var origPos1, origPos2; origPos1 = castTo($getProperty(n1_0, ($clinit_LayeredOptions() , POSITION)), 8); origPos2 = castTo($getProperty(n2_1, POSITION), 8); return compare_4(origPos1.y_0, origPos2.y_0); } function lambda$3_2(prev_0, cur_1){ castTo($getProperty(prev_0, ($clinit_InternalProperties_1() , IN_LAYER_SUCCESSOR_CONSTRAINTS)), 15).add_2(cur_1); return cur_1; } defineClass(1678, 1, $intern_105, SemiInteractiveCrossMinProcessor); _.process = function process_47(layeredGraph, progressMonitor){ $process_50(castTo(layeredGraph, 36), progressMonitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SemiInteractiveCrossMinProcessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SemiInteractiveCrossMinProcessor', 1678); function SemiInteractiveCrossMinProcessor$lambda$0$Type(){ } defineClass(1679, 1, $intern_40, SemiInteractiveCrossMinProcessor$lambda$0$Type); _.test_0 = function test_53(arg0){ return castTo(arg0, 10).type_0 == ($clinit_LNode$NodeType() , NORMAL); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SemiInteractiveCrossMinProcessor$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SemiInteractiveCrossMinProcessor/lambda$0$Type', 1679); function SemiInteractiveCrossMinProcessor$lambda$1$Type(){ } defineClass(1680, 1, $intern_40, SemiInteractiveCrossMinProcessor$lambda$1$Type); _.test_0 = function test_54(arg0){ return $getAllProperties(castTo(arg0, 10)).containsKey(($clinit_LayeredOptions() , POSITION)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SemiInteractiveCrossMinProcessor$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SemiInteractiveCrossMinProcessor/lambda$1$Type', 1680); function SemiInteractiveCrossMinProcessor$lambda$2$Type(){ } defineClass(1681, 1, $intern_88, SemiInteractiveCrossMinProcessor$lambda$2$Type); _.compare_1 = function compare_53(arg0, arg1){ return lambda$2_6(castTo(arg0, 10), castTo(arg1, 10)); } ; _.equals_0 = function equals_129(other){ return this === other; } ; _.reversed = function reversed_45(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SemiInteractiveCrossMinProcessor$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SemiInteractiveCrossMinProcessor/lambda$2$Type', 1681); function SemiInteractiveCrossMinProcessor$lambda$3$Type(){ } defineClass(1682, 1, {}, SemiInteractiveCrossMinProcessor$lambda$3$Type); _.apply_3 = function apply_105(arg0, arg1){ return lambda$3_2(castTo(arg0, 10), castTo(arg1, 10)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SemiInteractiveCrossMinProcessor$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SemiInteractiveCrossMinProcessor/lambda$3$Type', 1682); function $process_51(graph, progressMonitor){ var layer, layer$iterator, layerIndex, node, node$iterator, previousLayer, previousLayerIndex; progressMonitor.begin('Sort By Input Model ' + $getProperty(graph, ($clinit_LayeredOptions() , CONSIDER_MODEL_ORDER_STRATEGY_0)), 1); layerIndex = 0; for (layer$iterator = new ArrayList$1(graph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); previousLayerIndex = layerIndex == 0?0:layerIndex - 1; previousLayer = castTo($get_11(graph.layers, previousLayerIndex), 30); for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (maskUndefined($getProperty(node, PORT_CONSTRAINTS_0)) !== maskUndefined(($clinit_PortConstraints() , FIXED_ORDER)) && maskUndefined($getProperty(node, PORT_CONSTRAINTS_0)) !== maskUndefined(FIXED_POS)) { $clinit_Collections(); $sort(node.ports, new ModelOrderPortComparator(previousLayer, castTo($getProperty(graph, CONSIDER_MODEL_ORDER_STRATEGY_0), 284), longEdgeTargetNodePreprocessing(node), $booleanValue(castToBoolean($getProperty(graph, CONSIDER_MODEL_ORDER_PORT_MODEL_ORDER_0))))); progressMonitor.log_0('Node ' + node + ' ports: ' + node.ports); } } $clinit_Collections(); $sort(layer.nodes, new ModelOrderNodeComparator(previousLayer, castTo($getProperty(graph, CONSIDER_MODEL_ORDER_STRATEGY_0), 284), castTo($getProperty(graph, CONSIDER_MODEL_ORDER_LONG_EDGE_STRATEGY_0), 390))); progressMonitor.log_0('Layer ' + layerIndex + ': ' + layer); ++layerIndex; } progressMonitor.done_1(); } function SortByInputModelProcessor(){ } function getTargetNode(port){ var edge, node; node = null; edge = castTo($get_11(port.outgoingEdges, 0), 18); do { node = edge.target.owner; if ($hasProperty(node, ($clinit_InternalProperties_1() , LONG_EDGE_TARGET))) { return castTo($getProperty(node, LONG_EDGE_TARGET), 12).owner; } if (node.type_0 != ($clinit_LNode$NodeType() , NORMAL) && $hasNext_1(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10)))) { edge = castTo($next_0(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10))), 18); } else if (node.type_0 != NORMAL) { return null; } } while (!!node && node.type_0 != ($clinit_LNode$NodeType() , NORMAL)); return node; } function lambda$1_12(targetNodeModelOrder_0, p_1){ var edge, previousOrder, targetNode; targetNode = getTargetNode(p_1); $setProperty_0(p_1, ($clinit_InternalProperties_1() , LONG_EDGE_TARGET_NODE), targetNode); if (targetNode) { previousOrder = $intern_0; !!$getEntry_0(targetNodeModelOrder_0.hashCodeMap, targetNode) && (previousOrder = castTo(getEntryValueOrNull($getEntry_0(targetNodeModelOrder_0.hashCodeMap, targetNode)), 17).value_0); edge = castTo($get_11(p_1.outgoingEdges, 0), 18); $booleanValue(castToBoolean($getProperty(edge, REVERSED))) || $put_6(targetNodeModelOrder_0, targetNode, valueOf_3($wnd.Math.min(castTo($getProperty(edge, MODEL_ORDER_1), 17).value_0, previousOrder))); } } function longEdgeTargetNodePreprocessing(node){ var targetNodeModelOrder; targetNodeModelOrder = new HashMap; if ($hasProperty(node, ($clinit_InternalProperties_1() , TARGET_NODE_MODEL_ORDER))) { return castTo($getProperty(node, TARGET_NODE_MODEL_ORDER), 85); } $forEach_3($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(node.ports, 16)), new SortByInputModelProcessor$lambda$0$Type), new SortByInputModelProcessor$lambda$1$Type(targetNodeModelOrder)); $setProperty_0(node, TARGET_NODE_MODEL_ORDER, targetNodeModelOrder); return targetNodeModelOrder; } defineClass(1684, 1, $intern_105, SortByInputModelProcessor); _.process = function process_48(graph, progressMonitor){ $process_51(castTo(graph, 36), progressMonitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SortByInputModelProcessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SortByInputModelProcessor', 1684); function SortByInputModelProcessor$lambda$0$Type(){ } defineClass(1685, 1, $intern_40, SortByInputModelProcessor$lambda$0$Type); _.test_0 = function test_55(arg0){ return castTo(arg0, 12).outgoingEdges.array.length != 0; } ; var Lorg_eclipse_elk_alg_layered_intermediate_SortByInputModelProcessor$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SortByInputModelProcessor/lambda$0$Type', 1685); function SortByInputModelProcessor$lambda$1$Type(targetNodeModelOrder_0){ this.targetNodeModelOrder_0 = targetNodeModelOrder_0; } defineClass(1686, 1, $intern_19, SortByInputModelProcessor$lambda$1$Type); _.accept = function accept_88(arg0){ lambda$1_12(this.targetNodeModelOrder_0, castTo(arg0, 12)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_SortByInputModelProcessor$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate', 'SortByInputModelProcessor/lambda$1$Type', 1686); function $alterGroupedHitboxOrthogonal(g, spacing, fac){ var delta, master, n, n$iterator, vs; master = g.master; !master && (master = castTo(g.cNodes.map_0.keySet_0().iterator_0().next_1(), 60)); $alterHitbox(master, spacing, fac); if (g.cNodes.map_0.size_1() == 1) { return; } delta = spacing * fac; for (n$iterator = g.cNodes.map_0.keySet_0().iterator_0(); n$iterator.hasNext_0();) { n = castTo(n$iterator.next_1(), 60); if (n != master) { vs = getVerticalSegmentOrNull(n); if (vs.ignoreSpacing.up) { n.hitbox.y_0 += delta + $intern_94; n.hitbox.height -= delta + $intern_94; } else vs.ignoreSpacing.down && (n.hitbox.height -= delta + $intern_94); } } } function $alterHitbox(n, spacing, fac){ var delta, vs; delta = spacing * fac; if (instanceOf(n.origin_0, 154)) { vs = getVerticalSegmentOrNull(n); if (vs.ignoreSpacing.up) { vs.ignoreSpacing.down || (n.hitbox.height += delta + $intern_94); } else { n.hitbox.y_0 -= delta + $intern_94; n.hitbox.height += delta + $intern_94; } } else if (instanceOf(n.origin_0, 10)) { n.hitbox.y_0 -= delta; n.hitbox.height += 2 * delta; } } function $lambda$1_1(this$static, n_0){ var lNode, spacing, vs; if (instanceOf(n_0.origin_0, 10) && castTo(n_0.origin_0, 10).type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { return $intern_60; } vs = getVerticalSegmentOrNull(n_0); if (vs) { return $wnd.Math.max(0, this$static.verticalEdgeEdgeSpacing / 2 - 0.5); } lNode = getLNodeOrNull(n_0); if (lNode) { spacing = $doubleValue(castToDouble(getIndividualOrDefault(lNode, ($clinit_LayeredOptions() , SPACING_NODE_NODE_0)))); return $wnd.Math.max(0, spacing / 2 - 0.5); } return $intern_60; } function $lambda$14(schedule_1, n_1){ var finalSpacing, lNode, spacing; lNode = getLNodeOrNull(n_1); spacing = $doubleValue(castToDouble(getIndividualOrDefault(lNode, ($clinit_LayeredOptions() , SPACING_EDGE_EDGE)))); finalSpacing = $wnd.Math.max(0, spacing / 2 - 0.5); $alterHitbox(n_1, finalSpacing, 1); $add_3(schedule_1, new EdgeAwareScanlineConstraintCalculation$lambda$15$Type(n_1, finalSpacing)); } function $lambda$18(this$static, n_0){ var lNode, spacing, vs; if (instanceOf(n_0.origin_0, 10) && castTo(n_0.origin_0, 10).type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { return $intern_60; } vs = getVerticalSegmentOrNull(n_0); if (vs) { return $wnd.Math.max(0, this$static.verticalEdgeEdgeSpacing / 2 - 0.5); } lNode = getLNodeOrNull(n_0); if (lNode) { spacing = $doubleValue(castToDouble(getIndividualOrDefault(lNode, ($clinit_LayeredOptions() , SPACING_NODE_NODE_0)))); return $wnd.Math.max(0, spacing / 2 - 0.5); } return $intern_60; } function $lambda$20(minSpacing_1, schedule_3, g_2){ $alterGroupedHitboxOrthogonal(g_2, minSpacing_1, 1); $add_3(schedule_3, new EdgeAwareScanlineConstraintCalculation$lambda$21$Type(g_2, minSpacing_1)); } function $lambda$4_0(minSpacing_1, schedule_3, n_2){ $alterHitbox(n_2, minSpacing_1, 1); $add_3(schedule_3, new EdgeAwareScanlineConstraintCalculation$lambda$5$Type(n_2, minSpacing_1)); } function $lambda$9(this$static, schedule_1, n_1){ var spacing; spacing = $wnd.Math.max(0, this$static.verticalEdgeEdgeSpacing / 2 - 0.5); $alterHitbox(n_1, spacing, 1); $add_3(schedule_1, new EdgeAwareScanlineConstraintCalculation$lambda$10$Type(n_1, spacing)); } function EdgeAwareScanlineConstraintCalculation(graph){ ScanlineConstraintCalculator.call(this); this.verticalEdgeEdgeSpacing = $doubleValue(castToDouble($getProperty(graph, ($clinit_LayeredOptions() , SPACING_EDGE_EDGE)))); this.edgeRouting = castTo($getProperty(graph, EDGE_ROUTING), 223); } defineClass(1759, 817, {}, EdgeAwareScanlineConstraintCalculation); _.calculateConstraints = function calculateConstraints_1(theCompactor){ var schedule, minSpacing, schedule_0, minSpacing_0; this.compactor = theCompactor; switch (this.edgeRouting.ordinal) { case 2: schedule = new ArrayList; $forEach_3($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(this.compactor.cGraph.cNodes, 16)), new EdgeAwareScanlineConstraintCalculation$lambda$8$Type), new EdgeAwareScanlineConstraintCalculation$lambda$9$Type(this, schedule)); $sweep(this, new EdgeAwareScanlineConstraintCalculation$lambda$11$Type); $forEach_1(schedule, new EdgeAwareScanlineConstraintCalculation$lambda$12$Type); schedule.array.length = 0; $forEach_3($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(this.compactor.cGraph.cNodes, 16)), new EdgeAwareScanlineConstraintCalculation$lambda$13$Type), new EdgeAwareScanlineConstraintCalculation$lambda$14$Type(schedule)); $sweep(this, new EdgeAwareScanlineConstraintCalculation$lambda$16$Type); $forEach_1(schedule, new EdgeAwareScanlineConstraintCalculation$lambda$17$Type); schedule.array.length = 0; minSpacing = $orElseGet($min($mapToDouble(new StreamImpl(null, new Spliterators$IteratorSpliterator(this.compactor.cGraph.cNodes, 16)), new EdgeAwareScanlineConstraintCalculation$lambda$18$Type(this))), new EdgeAwareScanlineConstraintCalculation$lambda$19$Type); $forEach_3(new StreamImpl(null, new Spliterators$IteratorSpliterator(this.compactor.cGraph.cGroups, 16)), new EdgeAwareScanlineConstraintCalculation$lambda$20$Type(minSpacing, schedule)); $sweep(this, new EdgeAwareScanlineConstraintCalculation$lambda$22$Type); $forEach_1(schedule, new EdgeAwareScanlineConstraintCalculation$lambda$23$Type); schedule.array.length = 0; break; case 3: schedule_0 = new ArrayList; $sweep(this, new EdgeAwareScanlineConstraintCalculation$lambda$0$Type); minSpacing_0 = $orElseGet($min($mapToDouble(new StreamImpl(null, new Spliterators$IteratorSpliterator(this.compactor.cGraph.cNodes, 16)), new EdgeAwareScanlineConstraintCalculation$lambda$1$Type(this))), new EdgeAwareScanlineConstraintCalculation$lambda$2$Type); $forEach_3($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(this.compactor.cGraph.cNodes, 16)), new EdgeAwareScanlineConstraintCalculation$lambda$3$Type), new EdgeAwareScanlineConstraintCalculation$lambda$4$Type(minSpacing_0, schedule_0)); $sweep(this, new EdgeAwareScanlineConstraintCalculation$lambda$6$Type); $forEach_1(schedule_0, new EdgeAwareScanlineConstraintCalculation$lambda$7$Type); schedule_0.array.length = 0; break; default:throw toJs(new UnsupportedConfigurationException); } } ; _.verticalEdgeEdgeSpacing = 0; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation', 1759); function EdgeAwareScanlineConstraintCalculation$lambda$0$Type(){ } defineClass(1760, 1, $intern_89, EdgeAwareScanlineConstraintCalculation$lambda$0$Type); _.apply_1 = function apply_106(arg0){ return instanceOf(castTo(arg0, 60).origin_0, 154); } ; _.equals_0 = function equals_130(other){ return this === other; } ; _.test_0 = function test_56(input_0){ return instanceOf(castTo(input_0, 60).origin_0, 154); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$0$Type', 1760); function EdgeAwareScanlineConstraintCalculation$lambda$1$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1761, 1, {}, EdgeAwareScanlineConstraintCalculation$lambda$1$Type); _.applyAsDouble = function applyAsDouble_1(arg0){ return $lambda$1_1(this.$$outer_0, castTo(arg0, 60)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$1$Type', 1761); function EdgeAwareScanlineConstraintCalculation$lambda$10$Type(n_1, spacing_2){ this.n_1 = n_1; this.spacing_2 = spacing_2; } defineClass(1769, 1, $intern_41, EdgeAwareScanlineConstraintCalculation$lambda$10$Type); _.run = function run_1(){ $alterHitbox(this.n_1, this.spacing_2, -1); } ; _.spacing_2 = 0; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$10$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$10$Type', 1769); function EdgeAwareScanlineConstraintCalculation$lambda$11$Type(){ } defineClass(1771, 1, $intern_89, EdgeAwareScanlineConstraintCalculation$lambda$11$Type); _.apply_1 = function apply_107(arg0){ return instanceOf(castTo(arg0, 60).origin_0, 154); } ; _.equals_0 = function equals_131(other){ return this === other; } ; _.test_0 = function test_57(input_0){ return instanceOf(castTo(input_0, 60).origin_0, 154); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$11$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$11$Type', 1771); function EdgeAwareScanlineConstraintCalculation$lambda$12$Type(){ } defineClass(1772, 1, $intern_19, EdgeAwareScanlineConstraintCalculation$lambda$12$Type); _.accept = function accept_89(arg0){ castTo(arg0, 380).run(); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$12$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$12$Type', 1772); function EdgeAwareScanlineConstraintCalculation$lambda$13$Type(){ } defineClass(1773, 1, $intern_40, EdgeAwareScanlineConstraintCalculation$lambda$13$Type); _.test_0 = function test_58(arg0){ return instanceOf(castTo(arg0, 60).origin_0, 10); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$13$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$13$Type', 1773); function EdgeAwareScanlineConstraintCalculation$lambda$14$Type(schedule_1){ this.schedule_1 = schedule_1; } defineClass(1775, 1, $intern_19, EdgeAwareScanlineConstraintCalculation$lambda$14$Type); _.accept = function accept_90(arg0){ $lambda$14(this.schedule_1, castTo(arg0, 60)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$14$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$14$Type', 1775); function EdgeAwareScanlineConstraintCalculation$lambda$15$Type(n_1, finalSpacing_2){ this.n_1 = n_1; this.finalSpacing_2 = finalSpacing_2; } defineClass(1774, 1, $intern_41, EdgeAwareScanlineConstraintCalculation$lambda$15$Type); _.run = function run_2(){ $alterHitbox(this.n_1, this.finalSpacing_2, -1); } ; _.finalSpacing_2 = 0; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$15$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$15$Type', 1774); function EdgeAwareScanlineConstraintCalculation$lambda$16$Type(){ } defineClass(1776, 1, $intern_89, EdgeAwareScanlineConstraintCalculation$lambda$16$Type); _.apply_1 = function apply_108(arg0){ return instanceOf(castTo(arg0, 60).origin_0, 10); } ; _.equals_0 = function equals_132(other){ return this === other; } ; _.test_0 = function test_59(input_0){ return instanceOf(castTo(input_0, 60).origin_0, 10); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$16$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$16$Type', 1776); function EdgeAwareScanlineConstraintCalculation$lambda$17$Type(){ } defineClass(1777, 1, $intern_19, EdgeAwareScanlineConstraintCalculation$lambda$17$Type); _.accept = function accept_91(arg0){ castTo(arg0, 380).run(); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$17$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$17$Type', 1777); function EdgeAwareScanlineConstraintCalculation$lambda$18$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1778, 1, {}, EdgeAwareScanlineConstraintCalculation$lambda$18$Type); _.applyAsDouble = function applyAsDouble_2(arg0){ return $lambda$18(this.$$outer_0, castTo(arg0, 60)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$18$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$18$Type', 1778); function EdgeAwareScanlineConstraintCalculation$lambda$19$Type(){ } defineClass(1779, 1, {}, EdgeAwareScanlineConstraintCalculation$lambda$19$Type); _.getAsDouble = function getAsDouble(){ return 0; } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$19$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$19$Type', 1779); function EdgeAwareScanlineConstraintCalculation$lambda$2$Type(){ } defineClass(1762, 1, {}, EdgeAwareScanlineConstraintCalculation$lambda$2$Type); _.getAsDouble = function getAsDouble_0(){ return 0; } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$2$Type', 1762); function EdgeAwareScanlineConstraintCalculation$lambda$20$Type(minSpacing_1, schedule_3){ this.minSpacing_1 = minSpacing_1; this.schedule_3 = schedule_3; } defineClass(1781, 1, $intern_19, EdgeAwareScanlineConstraintCalculation$lambda$20$Type); _.accept = function accept_92(arg0){ $lambda$20(this.minSpacing_1, this.schedule_3, castTo(arg0, 316)); } ; _.minSpacing_1 = 0; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$20$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$20$Type', 1781); function EdgeAwareScanlineConstraintCalculation$lambda$21$Type(g_1, minSpacing_2){ this.g_1 = g_1; this.minSpacing_2 = minSpacing_2; } defineClass(1780, 1, $intern_41, EdgeAwareScanlineConstraintCalculation$lambda$21$Type); _.run = function run_3(){ $alterGroupedHitboxOrthogonal(this.g_1, this.minSpacing_2, -1); } ; _.minSpacing_2 = 0; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$21$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$21$Type', 1780); function EdgeAwareScanlineConstraintCalculation$lambda$22$Type(){ } defineClass(1782, 1, $intern_89, EdgeAwareScanlineConstraintCalculation$lambda$22$Type); _.apply_1 = function apply_109(arg0){ return castTo(arg0, 60) , true; } ; _.equals_0 = function equals_133(other){ return this === other; } ; _.test_0 = function test_60(input_0){ return castTo(input_0, 60) , true; } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$22$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$22$Type', 1782); function EdgeAwareScanlineConstraintCalculation$lambda$23$Type(){ } defineClass(1783, 1, $intern_19, EdgeAwareScanlineConstraintCalculation$lambda$23$Type); _.accept = function accept_93(arg0){ castTo(arg0, 380).run(); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$23$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$23$Type', 1783); function EdgeAwareScanlineConstraintCalculation$lambda$3$Type(){ } defineClass(1763, 1, $intern_40, EdgeAwareScanlineConstraintCalculation$lambda$3$Type); _.test_0 = function test_61(arg0){ return instanceOf(castTo(arg0, 60).origin_0, 10); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$3$Type', 1763); function EdgeAwareScanlineConstraintCalculation$lambda$4$Type(minSpacing_1, schedule_3){ this.minSpacing_1 = minSpacing_1; this.schedule_3 = schedule_3; } defineClass(1765, 1, $intern_19, EdgeAwareScanlineConstraintCalculation$lambda$4$Type); _.accept = function accept_94(arg0){ $lambda$4_0(this.minSpacing_1, this.schedule_3, castTo(arg0, 60)); } ; _.minSpacing_1 = 0; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$4$Type', 1765); function EdgeAwareScanlineConstraintCalculation$lambda$5$Type(n_1, minSpacing_2){ this.n_1 = n_1; this.minSpacing_2 = minSpacing_2; } defineClass(1764, 1, $intern_41, EdgeAwareScanlineConstraintCalculation$lambda$5$Type); _.run = function run_4(){ $alterHitbox(this.n_1, this.minSpacing_2, -1); } ; _.minSpacing_2 = 0; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$5$Type', 1764); function EdgeAwareScanlineConstraintCalculation$lambda$6$Type(){ } defineClass(1766, 1, $intern_89, EdgeAwareScanlineConstraintCalculation$lambda$6$Type); _.apply_1 = function apply_110(arg0){ return castTo(arg0, 60) , true; } ; _.equals_0 = function equals_134(other){ return this === other; } ; _.test_0 = function test_62(input_0){ return castTo(input_0, 60) , true; } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$6$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$6$Type', 1766); function EdgeAwareScanlineConstraintCalculation$lambda$7$Type(){ } defineClass(1767, 1, $intern_19, EdgeAwareScanlineConstraintCalculation$lambda$7$Type); _.accept = function accept_95(arg0){ castTo(arg0, 380).run(); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$7$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$7$Type', 1767); function EdgeAwareScanlineConstraintCalculation$lambda$8$Type(){ } defineClass(1768, 1, $intern_40, EdgeAwareScanlineConstraintCalculation$lambda$8$Type); _.test_0 = function test_63(arg0){ return instanceOf(castTo(arg0, 60).origin_0, 154); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$8$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$8$Type', 1768); function EdgeAwareScanlineConstraintCalculation$lambda$9$Type($$outer_0, schedule_1){ this.$$outer_0 = $$outer_0; this.schedule_1 = schedule_1; } defineClass(1770, 1, $intern_19, EdgeAwareScanlineConstraintCalculation$lambda$9$Type); _.accept = function accept_96(arg0){ $lambda$9(this.$$outer_0, this.schedule_1, castTo(arg0, 60)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_EdgeAwareScanlineConstraintCalculation$lambda$9$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'EdgeAwareScanlineConstraintCalculation/lambda$9$Type', 1770); function $clinit_HorizontalGraphCompactor(){ $clinit_HorizontalGraphCompactor = emptyMethod; NETWORK_SIMPLEX_COMPACTION = new NetworkSimplexCompaction; } function $process_52(this$static, layeredGraph, progressMonitor){ var odc, strategy, transformer; strategy = castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , COMPACTION_POST_COMPACTION_STRATEGY_0)), 282); if (strategy == ($clinit_GraphCompactionStrategy() , NONE_5)) { return; } progressMonitor.begin('Horizontal Compaction', 1); this$static.lGraph = layeredGraph; transformer = new LGraphToCGraphTransformer; odc = new OneDimensionalCompactor((transformer.layeredGraph = layeredGraph , transformer.edgeRouting = castTo($getProperty(transformer.layeredGraph, EDGE_ROUTING), 223) , $init(transformer) , $transformNodes_0(transformer) , $transformEdges_0(transformer) , transformer.cGraph)); $setSpacingsHandler(odc, this$static.specialSpacingsHandler); switch (castTo($getProperty(layeredGraph, COMPACTION_POST_COMPACTION_CONSTRAINTS_0), 431).ordinal) { case 1: $setConstraintAlgorithm(odc, new EdgeAwareScanlineConstraintCalculation(this$static.lGraph)); break; default:$setConstraintAlgorithm(odc, ($clinit_OneDimensionalCompactor() , QUADRATIC_CONSTRAINTS)); } switch (strategy.ordinal) { case 1: $compact(odc); break; case 2: $compact($changeDirection(odc, ($clinit_Direction_0() , RIGHT_6))); break; case 3: $compact($setLockFunction($changeDirection($compact(odc), ($clinit_Direction_0() , RIGHT_6)), new HorizontalGraphCompactor$lambda$0$Type)); break; case 4: $compact($setLockFunction($changeDirection($compact(odc), ($clinit_Direction_0() , RIGHT_6)), new HorizontalGraphCompactor$lambda$1$Type(transformer))); break; case 5: $compact($setCompactionAlgorithm(odc, NETWORK_SIMPLEX_COMPACTION)); } $changeDirection(odc, ($clinit_Direction_0() , LEFT_6)); odc.finished = true; $applyLayout_3(transformer); progressMonitor.done_1(); } function HorizontalGraphCompactor(){ $clinit_HorizontalGraphCompactor(); this.specialSpacingsHandler = new HorizontalGraphCompactor$1(this); } function getLNodeOrNull(cNode){ $clinit_HorizontalGraphCompactor(); if (instanceOf(cNode.origin_0, 10)) { return castTo(cNode.origin_0, 10); } return null; } function getVerticalSegmentOrNull(cNode){ $clinit_HorizontalGraphCompactor(); if (instanceOf(cNode.origin_0, 154)) { return castTo(cNode.origin_0, 154); } return null; } function isVerticalSegmentsOfSameEdge(cNode1, cNode2){ $clinit_HorizontalGraphCompactor(); var v1, v2; v1 = getVerticalSegmentOrNull(cNode1); v2 = getVerticalSegmentOrNull(cNode2); return !!v1 && !!v2 && !disjoint(v1.representedLEdges, v2.representedLEdges); } function lambda$1_13(transformer_0, node_1, dir_2){ $clinit_HorizontalGraphCompactor(); return $get_18(castTo($get_10(transformer_0.lockMap, node_1), 529), dir_2); } defineClass(1586, 1, $intern_105, HorizontalGraphCompactor); _.process = function process_49(layeredGraph, progressMonitor){ $process_52(this, castTo(layeredGraph, 36), progressMonitor); } ; var NETWORK_SIMPLEX_COMPACTION; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_HorizontalGraphCompactor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'HorizontalGraphCompactor', 1586); function HorizontalGraphCompactor$1(this$0){ this.this$01 = this$0; } defineClass(1587, 1, {}, HorizontalGraphCompactor$1); _.getHorizontalSpacing = function getHorizontalSpacing_2(cNode1, cNode2){ var node1, node2, spacings; if (isVerticalSegmentsOfSameEdge(cNode1, cNode2)) { return 0; } node1 = getLNodeOrNull(cNode1); node2 = getLNodeOrNull(cNode2); if (!!node1 && node1.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT) || !!node2 && node2.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { return 0; } spacings = castTo($getProperty(this.this$01.lGraph, ($clinit_InternalProperties_1() , SPACINGS)), 312); return $getHorizontalSpacing(spacings, node1?node1.type_0:($clinit_LNode$NodeType() , LONG_EDGE), node2?node2.type_0:($clinit_LNode$NodeType() , LONG_EDGE)); } ; _.getVerticalSpacing = function getVerticalSpacing_2(cNode1, cNode2){ var node1, node2, spacings; if (isVerticalSegmentsOfSameEdge(cNode1, cNode2)) { return 1; } node1 = getLNodeOrNull(cNode1); node2 = getLNodeOrNull(cNode2); spacings = castTo($getProperty(this.this$01.lGraph, ($clinit_InternalProperties_1() , SPACINGS)), 312); return $getVerticalSpacing(spacings, node1?node1.type_0:($clinit_LNode$NodeType() , LONG_EDGE), node2?node2.type_0:($clinit_LNode$NodeType() , LONG_EDGE)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_HorizontalGraphCompactor$1_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'HorizontalGraphCompactor/1', 1587); function HorizontalGraphCompactor$lambda$0$Type(){ } defineClass(1588, 1, {}, HorizontalGraphCompactor$lambda$0$Type); _.isLocked = function isLocked(arg0, arg1){ return $clinit_HorizontalGraphCompactor() , arg0.cGroup.outDegreeReal == 0; } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_HorizontalGraphCompactor$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'HorizontalGraphCompactor/lambda$0$Type', 1588); function HorizontalGraphCompactor$lambda$1$Type(transformer_0){ this.transformer_0 = transformer_0; } defineClass(1589, 1, {}, HorizontalGraphCompactor$lambda$1$Type); _.isLocked = function isLocked_0(arg0, arg1){ return lambda$1_13(this.transformer_0, arg0, arg1); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_HorizontalGraphCompactor$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'HorizontalGraphCompactor/lambda$1$Type', 1589); function $clinit_LGraphToCGraphTransformer(){ $clinit_LGraphToCGraphTransformer = emptyMethod; NODE_TO_STRING_DELEGATE = new LGraphToCGraphTransformer$lambda$0$Type; VS_TO_STRING_DELEGATE = new LGraphToCGraphTransformer$lambda$1$Type; } function $adjustControlPointBetweenSegments(this$static, left, right, leftIdx, rightIdx, spline){ var adjust, chunk, chunks, endX, idx1, idx2, k, n, newPos, startX, strip, width_0; idx1 = leftIdx; if (left.initialSegment && left.isStraight) { n = castTo($get_10(this$static.nodesMap, left.sourceNode), 60); startX = n.hitbox.x_0 + n.hitbox.width_0; --idx1; } else { startX = left.boundingBox.x_0 + left.boundingBox.width_0; } idx2 = rightIdx; if (right.lastSegment && right.isStraight) { n = castTo($get_10(this$static.nodesMap, right.targetNode), 60); endX = n.hitbox.x_0; ++idx2; } else { endX = right.boundingBox.x_0; } strip = endX - startX; chunks = $wnd.Math.max(2, idx2 - idx1); chunk = strip / chunks; newPos = startX + chunk; for (k = idx1; k < idx2; ++k) { adjust = castTo(spline.get_0(k), 131); width_0 = adjust.boundingBox.width_0; adjust.boundingBox.x_0 = newPos - width_0 / 2; newPos += chunk; } } function $adjustSplineControlPoints(this$static, spline){ var i, j, lastSeg, needle, nextSeg; if (spline.isEmpty()) { return; } lastSeg = castTo(spline.get_0(0), 131); if (spline.size_1() == 1) { $adjustControlPointBetweenSegments(this$static, lastSeg, lastSeg, 1, 0, spline); return; } i = 1; while (i < spline.size_1()) { if (lastSeg.initialSegment || !lastSeg.isStraight) { needle = $firstNonStraightSegment(spline, i); if (needle) { j = castTo(needle.first, 17).value_0; nextSeg = castTo(needle.second, 131); $adjustControlPointBetweenSegments(this$static, lastSeg, nextSeg, i, j, spline); i = j + 1; lastSeg = nextSeg; } } } } function $applyCommentPositions(this$static){ var comment, e, e$iterator, offset, other; for (e$iterator = new AbstractHashMap$EntrySetIterator((new AbstractHashMap$EntrySet(this$static.commentOffsets)).this$01); e$iterator.hasNext;) { e = $next_3(e$iterator); comment = castTo(e.getKey(), 10); other = castTo(castTo(e.getValue(), 42).first, 10); offset = castTo(castTo(e.getValue(), 42).second, 8); $add_19($reset_5(comment.pos), $add_19($clone_1(other.pos), offset)); } } function $applyExternalPortPositions(this$static, topLeft, bottomRight){ var cNode, cNode$iterator, lNode; for (cNode$iterator = new ArrayList$1(this$static.cGraph.cNodes); cNode$iterator.i < cNode$iterator.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator), 60); lNode = getLNodeOrNull(cNode); if (lNode) { if (lNode.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { switch (castTo($getProperty(lNode, ($clinit_InternalProperties_1() , EXT_PORT_SIDE)), 64).ordinal) { case 4: lNode.pos.x_0 = topLeft.x_0; break; case 2: lNode.pos.x_0 = bottomRight.x_0 - (lNode.size_0.x_0 + lNode.margin.right); break; case 1: lNode.pos.y_0 = topLeft.y_0; break; case 3: lNode.pos.y_0 = bottomRight.y_0 - (lNode.size_0.y_0 + lNode.margin.bottom); } } } } } function $applyLayout_3(this$static){ var bottomRight, cNode, cNode$iterator, topLeft; $forEach_3($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static.cGraph.cNodes, 16)), new LGraphToCGraphTransformer$lambda$10$Type), new LGraphToCGraphTransformer$lambda$11$Type); $applyCommentPositions(this$static); $forEach_3($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static.cGraph.cNodes, 16)), new LGraphToCGraphTransformer$lambda$12$Type), new LGraphToCGraphTransformer$lambda$13$Type); if (this$static.edgeRouting == ($clinit_EdgeRouting() , SPLINES)) { $forEach_3($filter($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(new AbstractMap$1(this$static.nodesMap), 1)), new LGraphToCGraphTransformer$lambda$17$Type), new LGraphToCGraphTransformer$lambda$18$Type), new LGraphToCGraphTransformer$lambda$19$Type(this$static)); $forEach_3($filter($map($flatMap($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static.layeredGraph.layers, 16)), new LGraphToCGraphTransformer$lambda$20$Type), new LGraphToCGraphTransformer$lambda$21$Type), new LGraphToCGraphTransformer$lambda$22$Type), new LGraphToCGraphTransformer$lambda$23$Type), new LGraphToCGraphTransformer$lambda$24$Type(this$static)); } topLeft = new KVector_1($intern_60, $intern_60); bottomRight = new KVector_1($intern_61, $intern_61); for (cNode$iterator = new ArrayList$1(this$static.cGraph.cNodes); cNode$iterator.i < cNode$iterator.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator), 60); topLeft.x_0 = $wnd.Math.min(topLeft.x_0, cNode.hitbox.x_0); topLeft.y_0 = $wnd.Math.min(topLeft.y_0, cNode.hitbox.y_0); bottomRight.x_0 = $wnd.Math.max(bottomRight.x_0, cNode.hitbox.x_0 + cNode.hitbox.width_0); bottomRight.y_0 = $wnd.Math.max(bottomRight.y_0, cNode.hitbox.y_0 + cNode.hitbox.height); } $add_19($reset_5(this$static.layeredGraph.offset), $negate_0(new KVector_1(topLeft.x_0, topLeft.y_0))); $add_19($reset_5(this$static.layeredGraph.size_0), $sub_0(new KVector_1(bottomRight.x_0, bottomRight.y_0), topLeft)); $applyExternalPortPositions(this$static, topLeft, bottomRight); $reset(this$static.nodesMap); $reset(this$static.commentOffsets); $reset(this$static.verticalSegmentsMap); $reset(this$static.lockMap); this$static.cGraph.cGroups.array.length = 0; this$static.cGraph.cNodes.array.length = 0; this$static.cGraph = null; this$static.layeredGraph = null; } function $collectVerticalSegmentsOrthogonal(this$static){ var bend1, bend2, bends, cNode, cTargetNode, edge, edge$iterator, edge$iterator0, first, lastSegment, layer, layer$iterator, node, node$iterator, verticalSegments, vs; verticalSegments = new ArrayList; for (layer$iterator = new ArrayList$1(this$static.layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); cNode = castTo($get_10(this$static.nodesMap, node), 60); for (edge$iterator0 = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator0);) { edge = castTo($next_0(edge$iterator0), 18); bends = $listIterator_2(edge.bendPoints, 0); first = true; lastSegment = null; if (bends.currentNode != bends.this$01.tail) { bend1 = castTo($next_9(bends), 8); bend2 = null; if (edge.source.side == ($clinit_PortSide() , NORTH_3)) { vs = new VerticalSegment(bend1, new KVector_1(bend1.x_0, cNode.hitbox.y_0), cNode, edge); vs.ignoreSpacing.down = true; vs.aPort = edge.source; push_1(verticalSegments.array, vs); } if (edge.source.side == SOUTH_2) { vs = new VerticalSegment(bend1, new KVector_1(bend1.x_0, cNode.hitbox.y_0 + cNode.hitbox.height), cNode, edge); vs.ignoreSpacing.up = true; vs.aPort = edge.source; push_1(verticalSegments.array, vs); } while (bends.currentNode != bends.this$01.tail) { bend2 = castTo($next_9(bends), 8); if (!eq_0(bend1.y_0, bend2.y_0)) { lastSegment = new VerticalSegment(bend1, bend2, null, edge); push_1(verticalSegments.array, lastSegment); if (first) { first = false; if (bend2.y_0 < cNode.hitbox.y_0) { lastSegment.ignoreSpacing.down = true; } else if (bend2.y_0 > cNode.hitbox.y_0 + cNode.hitbox.height) { lastSegment.ignoreSpacing.up = true; } else { lastSegment.ignoreSpacing.up = true; lastSegment.ignoreSpacing.down = true; } } } bends.currentNode != bends.this$01.tail && (bend1 = bend2); } if (lastSegment) { cTargetNode = castTo($get_10(this$static.nodesMap, edge.target.owner), 60); if (bend1.y_0 < cTargetNode.hitbox.y_0) { lastSegment.ignoreSpacing.down = true; } else if (bend1.y_0 > cTargetNode.hitbox.y_0 + cTargetNode.hitbox.height) { lastSegment.ignoreSpacing.up = true; } else { lastSegment.ignoreSpacing.up = true; lastSegment.ignoreSpacing.down = true; } } } } for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); if (edge.bendPoints.size_0 != 0) { bend1 = castTo($getLast(edge.bendPoints), 8); if (edge.target.side == ($clinit_PortSide() , NORTH_3)) { vs = new VerticalSegment(bend1, new KVector_1(bend1.x_0, cNode.hitbox.y_0), cNode, edge); vs.ignoreSpacing.down = true; vs.aPort = edge.target; push_1(verticalSegments.array, vs); } if (edge.target.side == SOUTH_2) { vs = new VerticalSegment(bend1, new KVector_1(bend1.x_0, cNode.hitbox.y_0 + cNode.hitbox.height), cNode, edge); vs.ignoreSpacing.up = true; vs.aPort = edge.target; push_1(verticalSegments.array, vs); } } } } } return verticalSegments; } function $firstNonStraightSegment(spline, index_0){ var i, seg; if (index_0 < 0 || index_0 >= spline.size_1()) { return null; } for (i = index_0; i < spline.size_1(); ++i) { seg = castTo(spline.get_0(i), 131); if (i == spline.size_1() - 1 || !seg.isStraight) { return new Pair(valueOf_3(i), seg); } } return null; } function $init(this$static){ var hasEdges, index_0, l, l$iterator, n, n$iterator, supportedDirections; hasEdges = false; index_0 = 0; for (l$iterator = new ArrayList$1(this$static.layeredGraph.layers); l$iterator.i < l$iterator.this$01.array.length;) { l = castTo($next_6(l$iterator), 30); l.id_0 = index_0++; for (n$iterator = new ArrayList$1(l.nodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); !hasEdges && !isEmpty_13($getConnectedEdges_0(n)) && (hasEdges = true); } } supportedDirections = of_2(($clinit_Direction_0() , UNDEFINED_2), stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_Direction_2_classLit, 1), $intern_37, 88, 0, [LEFT_6, RIGHT_6])); if (!hasEdges) { $add_5(supportedDirections, UP_1); $add_5(supportedDirections, DOWN_1); } this$static.cGraph = new CGraph(supportedDirections); $reset(this$static.nodesMap); $reset(this$static.commentOffsets); $reset(this$static.lockMap); $reset(this$static.verticalSegmentsMap); } function $lambda$19(this$static, sl_0){ var cNode, deltaX, lNode; lNode = sl_0.source.owner; cNode = castTo($get_10(this$static.nodesMap, lNode), 60); deltaX = cNode.hitbox.x_0 - cNode.hitboxPreCompaction.x_0; $offset_1(sl_0.bendPoints, deltaX, 0); } function $lambda$2_1(this$static, vs_0){ var vsNode; vsNode = castTo($get_10(this$static.verticalSegmentsMap, vs_0), 60); $forEach_1(vs_0.constraints, new LGraphToCGraphTransformer$lambda$3$Type(this$static, vsNode)); } function $lambda$3(this$static, vsNode_1, other_1){ var otherNode; otherNode = castTo($get_10(this$static.verticalSegmentsMap, other_1), 60); $add_3(this$static.cGraph.predefinedHorizontalConstraints, new Pair(vsNode_1, otherNode)); } function $lambda$9_0(this$static, cNode_1, other_1){ return $put_6(this$static.verticalSegmentsMap, other_1, cNode_1); } function $mergeVerticalSegments(this$static, verticalSegments){ var next, survivor, vsIt, newX, newY, maxX, newW, maxY, newH; if (verticalSegments.array.length == 0) { return; } $clinit_Collections(); sort_4(verticalSegments.array, verticalSegments.array.length, null); vsIt = new ArrayList$1(verticalSegments); survivor = castTo($next_6(vsIt), 154); while (vsIt.i < vsIt.this$01.array.length) { next = castTo($next_6(vsIt), 154); if (eq_0(survivor.hitbox.x_0, next.hitbox.x_0) && !(lt_0($getBottomLeft(survivor.hitbox).y_0, next.hitbox.y_0) || lt_0($getBottomLeft(next.hitbox).y_0, survivor.hitbox.y_0))) { survivor = ($addAll_2(survivor.representedLEdges, next.representedLEdges) , $addAll_2(survivor.affectedBends, next.affectedBends) , $addAll_2(survivor.affectedBoundingBoxes, next.affectedBoundingBoxes) , $addAll(survivor.junctionPoints, next.junctionPoints) , $addAll_2(survivor.constraints, next.constraints) , $addAll_2(survivor.potentialGroupParents, next.potentialGroupParents) , newX = $wnd.Math.min(survivor.hitbox.x_0, next.hitbox.x_0) , newY = $wnd.Math.min(survivor.hitbox.y_0, next.hitbox.y_0) , maxX = $wnd.Math.max(survivor.hitbox.x_0 + survivor.hitbox.width_0, next.hitbox.x_0 + next.hitbox.width_0) , newW = maxX - newX , maxY = $wnd.Math.max(survivor.hitbox.y_0 + survivor.hitbox.height, next.hitbox.y_0 + next.hitbox.height) , newH = maxY - newY , $setRect(survivor.hitbox, newX, newY, newW, newH) , $applyOr(survivor.ignoreSpacing, next.ignoreSpacing) , !survivor.aPort && (survivor.aPort = next.aPort) , $addAll_2(survivor.joined, next.joined) , $add_3(survivor.joined, next) , survivor); } else { $verticalSegmentToCNode(this$static, survivor); survivor = next; } } $verticalSegmentToCNode(this$static, survivor); } function $transformEdges_0(this$static){ var style, verticalSegments, verticalSegments_0; style = castTo($getProperty(this$static.layeredGraph, ($clinit_LayeredOptions() , EDGE_ROUTING)), 223); switch (style.ordinal) { case 2: verticalSegments = $collectVerticalSegmentsOrthogonal(this$static); break; case 3: verticalSegments = (verticalSegments_0 = new ArrayList , $forEach_3($filter($map($flatMap($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static.layeredGraph.layers, 16)), new LGraphToCGraphTransformer$lambda$4$Type), new LGraphToCGraphTransformer$lambda$5$Type), new LGraphToCGraphTransformer$lambda$6$Type), new LGraphToCGraphTransformer$0methodref$nonNull$Type), new LGraphToCGraphTransformer$lambda$8$Type(verticalSegments_0)) , verticalSegments_0); break; default:throw toJs(new IllegalStateException_0('Compaction not supported for ' + style + ' edges.')); } $mergeVerticalSegments(this$static, verticalSegments); $forEach_0(new AbstractMap$1(this$static.verticalSegmentsMap), new LGraphToCGraphTransformer$lambda$2$Type(this$static)); } function $transformNodes_0(this$static){ var cNode, difference, e, hitbox, layer, layer$iterator, node, node$iterator, nodeLock, other, p; for (layer$iterator = new ArrayList$1(this$static.layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if ($booleanValue(castToBoolean($getProperty(node, ($clinit_LayeredOptions() , COMMENT_BOX))))) { if (!isEmpty_13($getConnectedEdges_0(node))) { e = castTo(get_22($getConnectedEdges_0(node)), 18); other = e.source.owner; other == node && (other = e.target.owner); p = new Pair(other, $sub_0($clone_1(node.pos), other.pos)); $put_6(this$static.commentOffsets, node, p); continue; } } hitbox = new ElkRectangle_0(node.pos.x_0 - node.margin.left, node.pos.y_0 - node.margin.top_0, node.size_0.x_0 + node.margin.left + node.margin.right, node.size_0.y_0 + node.margin.top_0 + node.margin.bottom); cNode = $create_0($toStringDelegate($hitbox($origin(new CNode$CNodeBuilder, node), hitbox), NODE_TO_STRING_DELEGATE), this$static.cGraph); $create($master($nodes(new CGroup$CGroupBuilder, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_common_compaction_oned_CNode_2_classLit, 1), $intern_2, 60, 0, [cNode])), cNode), this$static.cGraph); nodeLock = new Quadruplet; $put_6(this$static.lockMap, cNode, nodeLock); difference = size_24(new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10))) - size_24(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10))); difference < 0?$set_2(nodeLock, true, ($clinit_Direction_0() , LEFT_6)):difference > 0 && $set_2(nodeLock, true, ($clinit_Direction_0() , RIGHT_6)); node.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT) && $set_3(nodeLock); $put_6(this$static.nodesMap, node, cNode); } } } function $verticalSegmentToCNode(this$static, verticalSegment){ var cNode, difference, e, e$iterator, inc, out, vsLock; cNode = $create_0($toStringDelegate($hitbox($origin(new CNode$CNodeBuilder, verticalSegment), new ElkRectangle_1(verticalSegment.hitbox)), VS_TO_STRING_DELEGATE), this$static.cGraph); verticalSegment.potentialGroupParents.array.length == 0 || $addCNode(castTo($get_11(verticalSegment.potentialGroupParents, 0), 60).cGroup, cNode); vsLock = new Quadruplet; $put_6(this$static.lockMap, cNode, vsLock); inc = new HashSet; out = new HashSet; for (e$iterator = new ArrayList$1(verticalSegment.representedLEdges); e$iterator.i < e$iterator.this$01.array.length;) { e = castTo($next_6(e$iterator), 18); $add_6(inc, e.source); $add_6(out, e.target); } difference = inc.map_0.size_1() - out.map_0.size_1(); if (difference < 0) { $set_2(vsLock, true, ($clinit_Direction_0() , LEFT_6)); $set_2(vsLock, false, RIGHT_6); } else if (difference > 0) { $set_2(vsLock, false, ($clinit_Direction_0() , LEFT_6)); $set_2(vsLock, true, RIGHT_6); } $forEach_1(verticalSegment.joined, new LGraphToCGraphTransformer$lambda$9$Type(this$static, cNode)); $put_6(this$static.verticalSegmentsMap, verticalSegment, cNode); } function LGraphToCGraphTransformer(){ $clinit_LGraphToCGraphTransformer(); this.commentOffsets = new HashMap; this.nodesMap = new HashMap; this.verticalSegmentsMap = new HashMap; this.lockMap = new HashMap; } function lambda$11(cNode_0){ $clinit_LGraphToCGraphTransformer(); var lNode; lNode = castTo(cNode_0.origin_0, 10); lNode.pos.x_0 = cNode_0.hitbox.x_0 + lNode.margin.left; } function lambda$13(cNode_0){ $clinit_LGraphToCGraphTransformer(); var deltaX, vs; deltaX = cNode_0.hitbox.x_0 - cNode_0.hitboxPreCompaction.x_0; vs = castTo(cNode_0.origin_0, 154); $forEach_1(vs.affectedBends, new LGraphToCGraphTransformer$lambda$14$Type(deltaX)); $forEach_1(vs.affectedBoundingBoxes, new LGraphToCGraphTransformer$lambda$15$Type(deltaX)); $forEach_0(vs.junctionPoints, new LGraphToCGraphTransformer$lambda$16$Type(deltaX)); } function lambda$14(deltaX_0, b_1){ $clinit_LGraphToCGraphTransformer(); return b_1.x_0 += deltaX_0; } function lambda$15(deltaX_0, bb_1){ $clinit_LGraphToCGraphTransformer(); return bb_1.x_0 += deltaX_0; } function lambda$16(deltaX_0, jp_1){ $clinit_LGraphToCGraphTransformer(); return jp_1.x_0 += deltaX_0; } function lambda$23(chain_0){ $clinit_LGraphToCGraphTransformer(); return !!chain_0 && !chain_0.isEmpty(); } function lambda$8_0(verticalSegments_0, spline_1){ $clinit_LGraphToCGraphTransformer(); var lastVs, leftTop, rightBottom, s, s$iterator, vs; lastVs = null; for (s$iterator = spline_1.iterator_0(); s$iterator.hasNext_0();) { s = castTo(s$iterator.next_1(), 131); if (s.isStraight) { continue; } leftTop = $getTopLeft(s.boundingBox); rightBottom = $getBottomRight(s.boundingBox); vs = new VerticalSegment(leftTop, rightBottom, null, castTo(s.edges.map_0.keySet_0().iterator_0().next_1(), 18)); $add_3(vs.affectedBoundingBoxes, s.boundingBox); push_1(verticalSegments_0.array, vs); !!lastVs && $add_3(lastVs.constraints, vs); lastVs = vs; } } defineClass(1730, 1, {}, LGraphToCGraphTransformer); var NODE_TO_STRING_DELEGATE, VS_TO_STRING_DELEGATE; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer', 1730); function LGraphToCGraphTransformer$0methodref$nonNull$Type(){ } defineClass(1738, 1, $intern_40, LGraphToCGraphTransformer$0methodref$nonNull$Type); _.test_0 = function test_64(arg0){ return arg0 != null; } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$0methodref$nonNull$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/0methodref$nonNull$Type', 1738); function LGraphToCGraphTransformer$lambda$0$Type(){ } defineClass(1731, 1, {}, LGraphToCGraphTransformer$lambda$0$Type); _.apply_0 = function apply_111(arg0){ return $clinit_LGraphToCGraphTransformer() , toString_40($getProperty(castTo(castTo(arg0, 60).origin_0, 10), ($clinit_InternalProperties_1() , ORIGIN_0))); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$0$Type', 1731); function LGraphToCGraphTransformer$lambda$1$Type(){ } defineClass(1732, 1, {}, LGraphToCGraphTransformer$lambda$1$Type); _.apply_0 = function apply_112(arg0){ return $clinit_LGraphToCGraphTransformer() , $toString_14(castTo(castTo(arg0, 60).origin_0, 154)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$1$Type', 1732); function LGraphToCGraphTransformer$lambda$10$Type(){ } defineClass(1741, 1, $intern_40, LGraphToCGraphTransformer$lambda$10$Type); _.test_0 = function test_65(arg0){ return $clinit_LGraphToCGraphTransformer() , instanceOf(castTo(arg0, 60).origin_0, 10); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$10$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$10$Type', 1741); function LGraphToCGraphTransformer$lambda$11$Type(){ } defineClass(1742, 1, $intern_19, LGraphToCGraphTransformer$lambda$11$Type); _.accept = function accept_97(arg0){ lambda$11(castTo(arg0, 60)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$11$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$11$Type', 1742); function LGraphToCGraphTransformer$lambda$12$Type(){ } defineClass(1743, 1, $intern_40, LGraphToCGraphTransformer$lambda$12$Type); _.test_0 = function test_66(arg0){ return $clinit_LGraphToCGraphTransformer() , instanceOf(castTo(arg0, 60).origin_0, 154); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$12$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$12$Type', 1743); function LGraphToCGraphTransformer$lambda$13$Type(){ } defineClass(1747, 1, $intern_19, LGraphToCGraphTransformer$lambda$13$Type); _.accept = function accept_98(arg0){ lambda$13(castTo(arg0, 60)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$13$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$13$Type', 1747); function LGraphToCGraphTransformer$lambda$14$Type(deltaX_0){ this.deltaX_0 = deltaX_0; } defineClass(1744, 1, $intern_19, LGraphToCGraphTransformer$lambda$14$Type); _.accept = function accept_99(arg0){ lambda$14(this.deltaX_0, castTo(arg0, 8)); } ; _.deltaX_0 = 0; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$14$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$14$Type', 1744); function LGraphToCGraphTransformer$lambda$15$Type(deltaX_0){ this.deltaX_0 = deltaX_0; } defineClass(1745, 1, $intern_19, LGraphToCGraphTransformer$lambda$15$Type); _.accept = function accept_100(arg0){ lambda$15(this.deltaX_0, castTo(arg0, 116)); } ; _.deltaX_0 = 0; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$15$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$15$Type', 1745); function LGraphToCGraphTransformer$lambda$16$Type(deltaX_0){ this.deltaX_0 = deltaX_0; } defineClass(1746, 1, $intern_19, LGraphToCGraphTransformer$lambda$16$Type); _.accept = function accept_101(arg0){ lambda$16(this.deltaX_0, castTo(arg0, 8)); } ; _.deltaX_0 = 0; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$16$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$16$Type', 1746); function LGraphToCGraphTransformer$lambda$17$Type(){ } defineClass(1748, 1, {}, LGraphToCGraphTransformer$lambda$17$Type); _.apply_0 = function apply_113(arg0){ return $clinit_LGraphToCGraphTransformer() , new StreamImpl(null, new Spliterators$IteratorSpliterator_0(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(castTo(arg0, 10)).val$inputs1.iterator_0(), new Iterables$10)))); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$17$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$17$Type', 1748); function LGraphToCGraphTransformer$lambda$18$Type(){ } defineClass(1749, 1, $intern_40, LGraphToCGraphTransformer$lambda$18$Type); _.test_0 = function test_67(arg0){ return $clinit_LGraphToCGraphTransformer() , $isSelfLoop(castTo(arg0, 18)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$18$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$18$Type', 1749); function LGraphToCGraphTransformer$lambda$19$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1750, 1, $intern_19, LGraphToCGraphTransformer$lambda$19$Type); _.accept = function accept_102(arg0){ $lambda$19(this.$$outer_0, castTo(arg0, 18)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$19$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$19$Type', 1750); function LGraphToCGraphTransformer$lambda$2$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1734, 1, $intern_19, LGraphToCGraphTransformer$lambda$2$Type); _.accept = function accept_103(arg0){ $lambda$2_1(this.$$outer_0, castTo(arg0, 154)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$2$Type', 1734); function LGraphToCGraphTransformer$lambda$20$Type(){ } defineClass(1751, 1, {}, LGraphToCGraphTransformer$lambda$20$Type); _.apply_0 = function apply_114(arg0){ return $clinit_LGraphToCGraphTransformer() , new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 30).nodes, 16)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$20$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$20$Type', 1751); function LGraphToCGraphTransformer$lambda$21$Type(){ } defineClass(1752, 1, {}, LGraphToCGraphTransformer$lambda$21$Type); _.apply_0 = function apply_115(arg0){ return $clinit_LGraphToCGraphTransformer() , new StreamImpl(null, new Spliterators$IteratorSpliterator_0(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(castTo(arg0, 10)).val$inputs1.iterator_0(), new Iterables$10)))); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$21$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$21$Type', 1752); function LGraphToCGraphTransformer$lambda$22$Type(){ } defineClass(1753, 1, {}, LGraphToCGraphTransformer$lambda$22$Type); _.apply_0 = function apply_116(arg0){ return $clinit_LGraphToCGraphTransformer() , castTo($getProperty(castTo(arg0, 18), ($clinit_InternalProperties_1() , SPLINE_ROUTE_START)), 15); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$22$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$22$Type', 1753); function LGraphToCGraphTransformer$lambda$23$Type(){ } defineClass(1754, 1, $intern_40, LGraphToCGraphTransformer$lambda$23$Type); _.test_0 = function test_68(arg0){ return lambda$23(castTo(arg0, 15)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$23$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$23$Type', 1754); function LGraphToCGraphTransformer$lambda$24$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1755, 1, $intern_19, LGraphToCGraphTransformer$lambda$24$Type); _.accept = function accept_104(arg0){ $adjustSplineControlPoints(this.$$outer_0, castTo(arg0, 15)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$24$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$24$Type', 1755); function LGraphToCGraphTransformer$lambda$3$Type($$outer_0, vsNode_1){ this.$$outer_0 = $$outer_0; this.vsNode_1 = vsNode_1; } defineClass(1733, 1, $intern_19, LGraphToCGraphTransformer$lambda$3$Type); _.accept = function accept_105(arg0){ $lambda$3(this.$$outer_0, this.vsNode_1, castTo(arg0, 154)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$3$Type', 1733); function LGraphToCGraphTransformer$lambda$4$Type(){ } defineClass(1735, 1, {}, LGraphToCGraphTransformer$lambda$4$Type); _.apply_0 = function apply_117(arg0){ return $clinit_LGraphToCGraphTransformer() , new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 30).nodes, 16)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$4$Type', 1735); function LGraphToCGraphTransformer$lambda$5$Type(){ } defineClass(1736, 1, {}, LGraphToCGraphTransformer$lambda$5$Type); _.apply_0 = function apply_118(arg0){ return $clinit_LGraphToCGraphTransformer() , new StreamImpl(null, new Spliterators$IteratorSpliterator_0(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(castTo(arg0, 10)).val$inputs1.iterator_0(), new Iterables$10)))); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$5$Type', 1736); function LGraphToCGraphTransformer$lambda$6$Type(){ } defineClass(1737, 1, {}, LGraphToCGraphTransformer$lambda$6$Type); _.apply_0 = function apply_119(arg0){ return $clinit_LGraphToCGraphTransformer() , castTo($getProperty(castTo(arg0, 18), ($clinit_InternalProperties_1() , SPLINE_ROUTE_START)), 15); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$6$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$6$Type', 1737); function LGraphToCGraphTransformer$lambda$8$Type(verticalSegments_0){ this.verticalSegments_0 = verticalSegments_0; } defineClass(1739, 1, $intern_19, LGraphToCGraphTransformer$lambda$8$Type); _.accept = function accept_106(arg0){ lambda$8_0(this.verticalSegments_0, castTo(arg0, 15)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$8$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$8$Type', 1739); function LGraphToCGraphTransformer$lambda$9$Type($$outer_0, cNode_1){ this.$$outer_0 = $$outer_0; this.cNode_1 = cNode_1; } defineClass(1740, 1, $intern_19, LGraphToCGraphTransformer$lambda$9$Type); _.accept = function accept_107(arg0){ $lambda$9_0(this.$$outer_0, this.cNode_1, castTo(arg0, 154)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_LGraphToCGraphTransformer$lambda$9$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'LGraphToCGraphTransformer/lambda$9$Type', 1740); function $addArtificialSourceNode(this$static){ var dummySource, lastArg, n, n$iterator, sources, src_0, src$iterator; sources = new LinkedList; for (n$iterator = new ArrayList$1(this$static.networkSimplexGraph.nodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 125); n.incomingEdges.list.array.length == 0 && ($addNode_0(sources, n, sources.tail.prev, sources.tail) , true); } if (sources.size_0 > 1) { dummySource = $create_2((lastArg = new NNode$NNodeBuilder , ++this$static.index_0 , lastArg), this$static.networkSimplexGraph); for (src$iterator = $listIterator_2(sources, 0); src$iterator.currentNode != src$iterator.this$01.tail;) { src_0 = castTo($next_9(src$iterator), 125); $create_1($target($source($weight($delta(new NEdge$NEdgeBuilder, 1), 0), dummySource), src_0)); } } } function $addEdgeConstraints(this$static){ var cNode, cNode$iterator, cNode$iterator0, e, e$iterator, lEdge, lEdge$iterator, lEdgeMap, lNode, lNodeMap, n, n$iterator, src_0, srcPort, target, tgt, tgtPort, vs; lNodeMap = new HashMap; lEdgeMap = new HashMultimap; for (cNode$iterator0 = new ArrayList$1(this$static.compactor.cGraph.cNodes); cNode$iterator0.i < cNode$iterator0.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator0), 60); lNode = getLNodeOrNull(cNode); if (lNode) { $put_9(lNodeMap.hashCodeMap, lNode, cNode); } else { vs = getVerticalSegmentOrNull(cNode); if (vs) { for (e$iterator = new ArrayList$1(vs.representedLEdges); e$iterator.i < e$iterator.this$01.array.length;) { e = castTo($next_6(e$iterator), 18); $put(lEdgeMap, e, cNode); } } } } for (cNode$iterator = new ArrayList$1(this$static.compactor.cGraph.cNodes); cNode$iterator.i < cNode$iterator.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator), 60); lNode = getLNodeOrNull(cNode); if (lNode) { for (lEdge$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(lNode).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(lEdge$iterator);) { lEdge = castTo($next_0(lEdge$iterator), 18); if ($isSelfLoop(lEdge)) { continue; } srcPort = lEdge.source; tgtPort = lEdge.target; if (($clinit_PortSide() , SIDES_NORTH_SOUTH).contains(lEdge.source.side) && SIDES_NORTH_SOUTH.contains(lEdge.target.side)) { continue; } target = castTo($get_10(lNodeMap, lEdge.target.owner), 60); $create_1($target($source($weight($delta(new NEdge$NEdgeBuilder, 0), 100), this$static.nNodes[cNode.cGroup.id_0]), this$static.nNodes[target.cGroup.id_0])); if (srcPort.side == WEST_2 && $apply_13(($clinit_LPort() , OUTPUT_PREDICATE , srcPort))) { for (n$iterator = castTo($get(lEdgeMap, lEdge), 21).iterator_0(); n$iterator.hasNext_0();) { n = castTo(n$iterator.next_1(), 60); if (n.hitbox.x_0 < cNode.hitbox.x_0) { src_0 = this$static.nNodes[n.cGroup.id_0]; tgt = this$static.nNodes[cNode.cGroup.id_0]; if (src_0 == tgt) { continue; } $create_1($target($source($weight($delta(new NEdge$NEdgeBuilder, 1), 100), src_0), tgt)); } } } if (tgtPort.side == EAST_2 && $apply_14(($clinit_LPort() , INPUT_PREDICATE , tgtPort))) { for (n$iterator = castTo($get(lEdgeMap, lEdge), 21).iterator_0(); n$iterator.hasNext_0();) { n = castTo(n$iterator.next_1(), 60); if (n.hitbox.x_0 > cNode.hitbox.x_0) { src_0 = this$static.nNodes[cNode.cGroup.id_0]; tgt = this$static.nNodes[n.cGroup.id_0]; if (src_0 == tgt) { continue; } $create_1($target($source($weight($delta(new NEdge$NEdgeBuilder, 1), 100), src_0), tgt)); } } } } } } } function $addSeparationConstraints(this$static){ var adjust, alterOffset, cNode, cNode$iterator, delta, helper, incNode, incNode$iterator, offsetDelta, port, spacing, weight; for (cNode$iterator = new ArrayList$1(this$static.compactor.cGraph.cNodes); cNode$iterator.i < cNode$iterator.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator), 60); for (incNode$iterator = cNode.constraints.iterator_0(); incNode$iterator.hasNext_0();) { incNode = castTo(incNode$iterator.next_1(), 60); if (cNode.cGroup == incNode.cGroup) { continue; } $isHorizontal(this$static.compactor.direction)?(spacing = this$static.compactor.spacingsHandler.getHorizontalSpacing(cNode, incNode)):(spacing = this$static.compactor.spacingsHandler.getVerticalSpacing(cNode, incNode)); delta = cNode.cGroupOffset.x_0 + cNode.hitbox.width_0 + spacing - incNode.cGroupOffset.x_0; delta = $wnd.Math.ceil(delta); delta = $wnd.Math.max(0, delta); if (isVerticalSegmentsOfSameEdge(cNode, incNode)) { helper = $create_2(new NNode$NNodeBuilder, this$static.networkSimplexGraph); offsetDelta = round_int($wnd.Math.ceil(incNode.cGroupOffset.x_0 - cNode.cGroupOffset.x_0)); adjust = offsetDelta - (incNode.cGroupOffset.x_0 - cNode.cGroupOffset.x_0); port = getVerticalSegmentOrNull(cNode).aPort; alterOffset = cNode; if (!port) { port = getVerticalSegmentOrNull(incNode).aPort; adjust = -adjust; alterOffset = incNode; } if (port) { alterOffset.cGroupOffset.x_0 -= adjust; port.pos.x_0 -= adjust; } $create_1($target($source($weight($delta(new NEdge$NEdgeBuilder, $wnd.Math.max(0, offsetDelta)), 1), helper), this$static.nNodes[cNode.cGroup.id_0])); $create_1($target($source($weight($delta(new NEdge$NEdgeBuilder, $wnd.Math.max(0, -offsetDelta)), 1), helper), this$static.nNodes[incNode.cGroup.id_0])); } else { weight = 1; (instanceOf(cNode.origin_0, 154) && instanceOf(incNode.origin_0, 10) || instanceOf(incNode.origin_0, 154) && instanceOf(cNode.origin_0, 10)) && (weight = 2); $create_1($target($source($weight($delta(new NEdge$NEdgeBuilder, round_int(delta)), weight), this$static.nNodes[cNode.cGroup.id_0]), this$static.nNodes[incNode.cGroup.id_0])); } } } } function NetworkSimplexCompaction(){ } defineClass(1729, 1, {}, NetworkSimplexCompaction); _.compact = function compact_1(theCompactor){ var cGroup, cGroup$iterator, cNode, cNode$iterator, nNode; this.compactor = theCompactor; this.networkSimplexGraph = new NGraph; this.nNodes = initUnidimensionalArray(Lorg_eclipse_elk_alg_common_networksimplex_NNode_2_classLit, $intern_2, 125, this.compactor.cGraph.cGroups.array.length, 0, 1); this.index_0 = 0; for (cGroup$iterator = new ArrayList$1(this.compactor.cGraph.cGroups); cGroup$iterator.i < cGroup$iterator.this$01.array.length;) { cGroup = castTo($next_6(cGroup$iterator), 316); cGroup.id_0 = this.index_0; nNode = $create_2($origin_0(new NNode$NNodeBuilder, cGroup), this.networkSimplexGraph); this.nNodes[this.index_0] = nNode; ++this.index_0; } $addSeparationConstraints(this); $addEdgeConstraints(this); $addArtificialSourceNode(this); $execute_0(forGraph(this.networkSimplexGraph), new BasicProgressMonitor); for (cNode$iterator = new ArrayList$1(this.compactor.cGraph.cNodes); cNode$iterator.i < cNode$iterator.this$01.array.length;) { cNode = castTo($next_6(cNode$iterator), 60); cNode.hitbox.x_0 = this.nNodes[cNode.cGroup.id_0].layer + cNode.cGroupOffset.x_0; } } ; _.index_0 = 0; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_NetworkSimplexCompaction_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'NetworkSimplexCompaction', 1729); function $compareTo_12(this$static, o){ var d; d = fuzzyCompare(this$static.hitbox.x_0, o.hitbox.x_0); if (d == 0) { return compare_4(this$static.hitbox.y_0, o.hitbox.y_0); } return d; } function $toString_14(this$static){ var sb; sb = new StringBuilder; sb.string += 'VerticalSegment '; $append_10(sb, this$static.hitbox); sb.string += ' '; $append_11(sb, $join(new Joiner, new ArrayList$1(this$static.representedLEdges))); return sb.string; } function VerticalSegment(bend1, bend2, cNode, lEdge){ var inJPs, jp, jp$iterator; this.potentialGroupParents = new ArrayList; this.representedLEdges = new ArrayList; this.affectedBends = new ArrayList; this.affectedBoundingBoxes = new ArrayList; this.hitbox = new ElkRectangle; this.junctionPoints = new KVectorChain; this.ignoreSpacing = new Quadruplet; this.constraints = new ArrayList; this.joined = new ArrayList; $add_3(this.affectedBends, bend1); $add_3(this.affectedBends, bend2); this.hitbox.x_0 = $wnd.Math.min(bend1.x_0, bend2.x_0); this.hitbox.y_0 = $wnd.Math.min(bend1.y_0, bend2.y_0); this.hitbox.width_0 = $wnd.Math.abs(bend1.x_0 - bend2.x_0); this.hitbox.height = $wnd.Math.abs(bend1.y_0 - bend2.y_0); inJPs = castTo($getProperty(lEdge, ($clinit_LayeredOptions() , JUNCTION_POINTS)), 75); if (inJPs) { for (jp$iterator = $listIterator_2(inJPs, 0); jp$iterator.currentNode != jp$iterator.this$01.tail;) { jp = castTo($next_9(jp$iterator), 8); eq_0(jp.x_0, bend1.x_0) && $add_7(this.junctionPoints, jp); } } !!cNode && $add_3(this.potentialGroupParents, cNode); $add_3(this.representedLEdges, lEdge); } defineClass(154, 1, {34:1, 154:1}, VerticalSegment); _.compareTo_0 = function compareTo_13(o){ return $compareTo_12(this, castTo(o, 154)); } ; _.toString_0 = function toString_94(){ return $toString_14(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_compaction_VerticalSegment_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.compaction', 'VerticalSegment', 154); function $addEasternCrossings(this$static, upperNode, lowerNode){ this$static.upperAdjacencies = $getAdjacencyFor(this$static, upperNode, ($clinit_PortSide() , EAST_2), this$static.easternAdjacencies); this$static.lowerAdjacencies = $getAdjacencyFor(this$static, lowerNode, EAST_2, this$static.easternAdjacencies); if (this$static.upperAdjacencies.currentSize == 0 || this$static.lowerAdjacencies.currentSize == 0) { return; } $countCrossingsByMergingAdjacencyLists(this$static); } function $addWesternCrossings(this$static, upperNode, lowerNode){ this$static.upperAdjacencies = $getAdjacencyFor(this$static, upperNode, ($clinit_PortSide() , WEST_2), this$static.westernAdjacencies); this$static.lowerAdjacencies = $getAdjacencyFor(this$static, lowerNode, WEST_2, this$static.westernAdjacencies); if (this$static.upperAdjacencies.currentSize == 0 || this$static.lowerAdjacencies.currentSize == 0) { return; } $countCrossingsByMergingAdjacencyLists(this$static); } function $countBothSideCrossings(this$static, upperNode, lowerNode){ this$static.upperLowerCrossings = 0; this$static.lowerUpperCrossings = 0; if (upperNode == lowerNode) { return; } $addWesternCrossings(this$static, upperNode, lowerNode); $addEasternCrossings(this$static, upperNode, lowerNode); } function $countCrossingsByMergingAdjacencyLists(this$static){ while (this$static.upperAdjacencies.currentSize != 0 && this$static.lowerAdjacencies.currentSize != 0) { if ($currentAdjacency(this$static.upperAdjacencies).position > $currentAdjacency(this$static.lowerAdjacencies).position) { this$static.upperLowerCrossings += this$static.upperAdjacencies.currentSize; $removeFirst_1(this$static.lowerAdjacencies); } else if ($currentAdjacency(this$static.lowerAdjacencies).position > $currentAdjacency(this$static.upperAdjacencies).position) { this$static.lowerUpperCrossings += this$static.lowerAdjacencies.currentSize; $removeFirst_1(this$static.upperAdjacencies); } else { this$static.upperLowerCrossings += $countAdjacenciesBelowNodeOfFirstPort(this$static.upperAdjacencies); this$static.lowerUpperCrossings += $countAdjacenciesBelowNodeOfFirstPort(this$static.lowerAdjacencies); $removeFirst_1(this$static.upperAdjacencies); $removeFirst_1(this$static.lowerAdjacencies); } } } function $countEasternEdgeCrossings(this$static, upperNode, lowerNode){ this$static.upperLowerCrossings = 0; this$static.lowerUpperCrossings = 0; if (upperNode == lowerNode) { return; } $addEasternCrossings(this$static, upperNode, lowerNode); } function $countWesternEdgeCrossings(this$static, upperNode, lowerNode){ this$static.upperLowerCrossings = 0; this$static.lowerUpperCrossings = 0; if (upperNode == lowerNode) { return; } $addWesternCrossings(this$static, upperNode, lowerNode); } function $getAdjacencyFor(this$static, node, side, adjacencies){ var aL, n, n$array, n$index, n$max; if (adjacencies.hashCodeMap.size_0 + adjacencies.stringMap.size_0 == 0) { for (n$array = this$static.currentNodeOrder[this$static.freeLayerIndex] , n$index = 0 , n$max = n$array.length; n$index < n$max; ++n$index) { n = n$array[n$index]; $put_6(adjacencies, n, new BetweenLayerEdgeTwoNodeCrossingsCounter$AdjacencyList(this$static, n, side)); } } aL = castTo(getEntryValueOrNull($getEntry_0(adjacencies.hashCodeMap, node)), 677); aL.currentIndex = 0; aL.currentSize = aL.size_0; aL.currentSize == 0 || $reset_3(castTo($get_11(aL.adjacencyList, aL.currentIndex), 294)); return aL; } function $setPortPositionsForLayer(this$static, layerIndex, portSide){ var node, node$array, node$index, node$max, port, port$iterator, portId, ports; portId = 0; for (node$array = this$static.currentNodeOrder[layerIndex] , node$index = 0 , node$max = node$array.length; node$index < node$max; ++node$index) { node = node$array[node$index]; ports = inNorthSouthEastWestOrder(node, portSide); for (port$iterator = ports.iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); $put_6(this$static.portPositions, port, valueOf_3(portId++)); } } } function BetweenLayerEdgeTwoNodeCrossingsCounter(currentNodeOrder, freeLayerIndex){ this.portPositions = new HashMap; this.easternAdjacencies = new HashMap; this.westernAdjacencies = new HashMap; this.currentNodeOrder = currentNodeOrder; this.freeLayerIndex = freeLayerIndex; this.freeLayerIndex > 0 && $setPortPositionsForLayer(this, this.freeLayerIndex - 1, ($clinit_PortSide() , EAST_2)); this.freeLayerIndex < this.currentNodeOrder.length - 1 && $setPortPositionsForLayer(this, this.freeLayerIndex + 1, ($clinit_PortSide() , WEST_2)); } defineClass(841, 1, {}, BetweenLayerEdgeTwoNodeCrossingsCounter); _.freeLayerIndex = 0; _.lowerUpperCrossings = 0; _.upperLowerCrossings = 0; var Lorg_eclipse_elk_alg_layered_intermediate_greedyswitch_BetweenLayerEdgeTwoNodeCrossingsCounter_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.greedyswitch', 'BetweenLayerEdgeTwoNodeCrossingsCounter', 841); function $addAdjacencyOf(this$static, edge){ var adjacentPort, adjacentPortPosition, lastIndex; adjacentPort = $adjacentPortOf(edge, this$static.side); adjacentPortPosition = castTo($get_10(this$static.this$01.portPositions, adjacentPort), 17).value_0; lastIndex = this$static.adjacencyList.array.length - 1; if (this$static.adjacencyList.array.length != 0 && castTo($get_11(this$static.adjacencyList, lastIndex), 294).position == adjacentPortPosition) { ++castTo($get_11(this$static.adjacencyList, lastIndex), 294).cardinality; ++castTo($get_11(this$static.adjacencyList, lastIndex), 294).currentCardinality; } else { $add_3(this$static.adjacencyList, new BetweenLayerEdgeTwoNodeCrossingsCounter$AdjacencyList$Adjacency(adjacentPortPosition)); } } function $adjacentPortOf(e, s){ return s == ($clinit_PortSide() , WEST_2)?e.source:e.target; } function $countAdjacenciesBelowNodeOfFirstPort(this$static){ return this$static.currentSize - castTo($get_11(this$static.adjacencyList, this$static.currentIndex), 294).currentCardinality; } function $currentAdjacency(this$static){ return castTo($get_11(this$static.adjacencyList, this$static.currentIndex), 294); } function $iterateTroughEdgesCollectingAdjacencies(this$static){ var edge, edge$iterator, edges, port, port$iterator, ports; ports = inNorthSouthEastWestOrder(this$static.node, this$static.side); for (port$iterator = ports.iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); edges = this$static.side == ($clinit_PortSide() , WEST_2)?port.incomingEdges:port.outgoingEdges; for (edge$iterator = new ArrayList$1(edges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); if (!$isSelfLoop(edge) && edge.source.owner.layer != edge.target.owner.layer) { $addAdjacencyOf(this$static, edge); ++this$static.size_0; ++this$static.currentSize; } } } } function $removeFirst_1(this$static){ var currentEntry; if (this$static.currentSize == 0) { return; } currentEntry = castTo($get_11(this$static.adjacencyList, this$static.currentIndex), 294); currentEntry.currentCardinality == 1?(++this$static.currentIndex , this$static.currentIndex < this$static.adjacencyList.array.length && $reset_3(castTo($get_11(this$static.adjacencyList, this$static.currentIndex), 294))):--currentEntry.currentCardinality; --this$static.currentSize; } function BetweenLayerEdgeTwoNodeCrossingsCounter$AdjacencyList(this$0, node, side){ this.this$01 = this$0; this.node = node; this.side = side; this.adjacencyList = new ArrayList; $iterateTroughEdgesCollectingAdjacencies(this); $clinit_Collections(); $sort(this.adjacencyList, null); } defineClass(677, 1, {677:1}, BetweenLayerEdgeTwoNodeCrossingsCounter$AdjacencyList); _.toString_0 = function toString_95(){ return 'AdjacencyList [node=' + this.node + ', adjacencies= ' + this.adjacencyList + ']'; } ; _.currentIndex = 0; _.currentSize = 0; _.size_0 = 0; var Lorg_eclipse_elk_alg_layered_intermediate_greedyswitch_BetweenLayerEdgeTwoNodeCrossingsCounter$AdjacencyList_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.greedyswitch', 'BetweenLayerEdgeTwoNodeCrossingsCounter/AdjacencyList', 677); function $compareTo_13(this$static, o){ return this$static.position < o.position?-1:this$static.position == o.position?0:1; } function $reset_3(this$static){ this$static.currentCardinality = this$static.cardinality; } function BetweenLayerEdgeTwoNodeCrossingsCounter$AdjacencyList$Adjacency(adjacentPortPosition){ this.position = adjacentPortPosition; this.cardinality = 1; this.currentCardinality = 1; } defineClass(294, 1, {34:1, 294:1}, BetweenLayerEdgeTwoNodeCrossingsCounter$AdjacencyList$Adjacency); _.compareTo_0 = function compareTo_14(o){ return $compareTo_13(this, castTo(o, 294)); } ; _.toString_0 = function toString_96(){ return 'Adjacency [position=' + this.position + ', cardinality=' + this.cardinality + ', currentCardinality=' + this.currentCardinality + ']'; } ; _.cardinality = 0; _.currentCardinality = 0; _.position = 0; var Lorg_eclipse_elk_alg_layered_intermediate_greedyswitch_BetweenLayerEdgeTwoNodeCrossingsCounter$AdjacencyList$Adjacency_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.greedyswitch', 'BetweenLayerEdgeTwoNodeCrossingsCounter/AdjacencyList/Adjacency', 294); function $fillCrossingMatrix(this$static, upperNode, lowerNode){ if (this$static.oneSided) { switch (this$static.direction) { case 1: $countEasternEdgeCrossings(this$static.inBetweenLayerCrossingCounter, upperNode, lowerNode); break; case 0: $countWesternEdgeCrossings(this$static.inBetweenLayerCrossingCounter, upperNode, lowerNode); } } else { $countBothSideCrossings(this$static.inBetweenLayerCrossingCounter, upperNode, lowerNode); } this$static.crossingMatrix[upperNode.id_0][lowerNode.id_0] = this$static.inBetweenLayerCrossingCounter.upperLowerCrossings; this$static.crossingMatrix[lowerNode.id_0][upperNode.id_0] = this$static.inBetweenLayerCrossingCounter.lowerUpperCrossings; } function $getCrossingMatrixEntry(this$static, upperNode, lowerNode){ if (!this$static.isCrossingMatrixFilled[upperNode.id_0][lowerNode.id_0]) { $fillCrossingMatrix(this$static, upperNode, lowerNode); this$static.isCrossingMatrixFilled[upperNode.id_0][lowerNode.id_0] = true; this$static.isCrossingMatrixFilled[lowerNode.id_0][upperNode.id_0] = true; } return this$static.crossingMatrix[upperNode.id_0][lowerNode.id_0]; } function CrossingMatrixFiller(greedySwitchType, graph, freeLayerIndex, direction){ var freeLayer; this.direction = direction; this.oneSided = greedySwitchType == ($clinit_LayerSweepCrossingMinimizer$CrossMinType() , ONE_SIDED_GREEDY_SWITCH_0); freeLayer = graph[freeLayerIndex]; this.isCrossingMatrixFilled = initMultidimensionalArray(Z_classLit, [$intern_16, $intern_91], [183, 28], 16, [freeLayer.length, freeLayer.length], 2); this.crossingMatrix = initMultidimensionalArray(I_classLit, [$intern_16, $intern_49], [53, 28], 15, [freeLayer.length, freeLayer.length], 2); this.inBetweenLayerCrossingCounter = new BetweenLayerEdgeTwoNodeCrossingsCounter(graph, freeLayerIndex); } defineClass(2026, 1, {}, CrossingMatrixFiller); _.direction = 0; _.oneSided = false; var Lorg_eclipse_elk_alg_layered_intermediate_greedyswitch_CrossingMatrixFiller_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.greedyswitch', 'CrossingMatrixFiller', 2026); function init_0(initializables, order){ var e, edge, edge$iterator, i, i$iterator, i$iterator0, i$iterator1, i$iterator2, i$iterator3, l, n, p, port, ports; for (l = 0; l < order.length; l++) { for (i$iterator0 = initializables.iterator_0(); i$iterator0.hasNext_0();) { i = castTo(i$iterator0.next_1(), 230); i.initAtLayerLevel(l, order); } for (n = 0; n < order[l].length; n++) { for (i$iterator1 = initializables.iterator_0(); i$iterator1.hasNext_0();) { i = castTo(i$iterator1.next_1(), 230); i.initAtNodeLevel(l, n, order); } ports = order[l][n].ports; for (p = 0; p < ports.array.length; p++) { for (i$iterator2 = initializables.iterator_0(); i$iterator2.hasNext_0();) { i = castTo(i$iterator2.next_1(), 230); i.initAtPortLevel(l, n, p, order); } port = (checkCriticalElementIndex(p, ports.array.length) , castTo(ports.array[p], 12)); e = 0; for (edge$iterator = new LPort$CombineIter$1(port.connectedEdges); $hasNext_3(edge$iterator.firstIterator) || $hasNext_3(edge$iterator.secondIterator);) { edge = castTo($hasNext_3(edge$iterator.firstIterator)?$next_6(edge$iterator.firstIterator):$next_6(edge$iterator.secondIterator), 18); for (i$iterator3 = initializables.iterator_0(); i$iterator3.hasNext_0();) { i = castTo(i$iterator3.next_1(), 230); i.initAtEdgeLevel(l, n, p, e++, edge, order); } } } } } for (i$iterator = initializables.iterator_0(); i$iterator.hasNext_0();) { i = castTo(i$iterator.next_1(), 230); i.initAfterTraversal(); } } var Lorg_eclipse_elk_alg_layered_p3order_counting_IInitializable_2_classLit = createForInterface('org.eclipse.elk.alg.layered.p3order.counting', 'IInitializable'); function $continueSwitchingUntilNoImprovementInLayer(this$static, freeLayerIndex){ var continueSwitching, improved; improved = false; do { continueSwitching = $sweepDownwardInLayer(this$static, freeLayerIndex); improved = improved | continueSwitching; } while (continueSwitching); return improved; } function $setUp(this$static, order, freeLayerIndex, forwardSweep){ var crossingMatrixFiller, side; this$static.currentNodeOrder = order; side = forwardSweep?0:1; this$static.switchDecider = (crossingMatrixFiller = new CrossingMatrixFiller(this$static.greedySwitchType, this$static.currentNodeOrder, freeLayerIndex, side) , new SwitchDecider(freeLayerIndex, this$static.currentNodeOrder, crossingMatrixFiller, this$static.portPositions, this$static.graphData, this$static.greedySwitchType == ($clinit_LayerSweepCrossingMinimizer$CrossMinType() , ONE_SIDED_GREEDY_SWITCH_0))); } function $startIndex(isForwardSweep, length_0){ return isForwardSweep?0:length_0 - 1; } function $sweepDownwardInLayer(this$static, layerIndex){ var continueSwitching, lengthOfFreeLayer, lowerNodeIndex, upperNodeIndex; continueSwitching = false; lengthOfFreeLayer = this$static.currentNodeOrder[layerIndex].length; for (upperNodeIndex = 0; upperNodeIndex < lengthOfFreeLayer - 1; upperNodeIndex++) { lowerNodeIndex = upperNodeIndex + 1; continueSwitching = continueSwitching | $switchIfImproves(this$static, layerIndex, upperNodeIndex, lowerNodeIndex); } return continueSwitching; } function $switchIfImproves(this$static, layerIndex, upperNodeIndex, lowerNodeIndex){ var continueSwitching, layer, temp; continueSwitching = false; if ($doesSwitchReduceCrossings(this$static.switchDecider, upperNodeIndex, lowerNodeIndex)) { $notifyOfSwitch(this$static.switchDecider, this$static.currentNodeOrder[layerIndex][upperNodeIndex], this$static.currentNodeOrder[layerIndex][lowerNodeIndex]); layer = this$static.currentNodeOrder[layerIndex]; temp = layer[lowerNodeIndex]; layer[lowerNodeIndex] = layer[upperNodeIndex]; layer[upperNodeIndex] = temp; continueSwitching = true; } return continueSwitching; } function GreedySwitchHeuristic(greedyType, graphData){ this.graphData = graphData; this.greedySwitchType = greedyType; } defineClass(1867, 1, $intern_111, GreedySwitchHeuristic); _.initAtEdgeLevel = function initAtEdgeLevel(l, n, p, e, edge, nodeOrder){ } ; _.initAtNodeLevel = function initAtNodeLevel(l, n, nodeOrder){ } ; _.alwaysImproves = function alwaysImproves(){ return this.greedySwitchType != ($clinit_LayerSweepCrossingMinimizer$CrossMinType() , ONE_SIDED_GREEDY_SWITCH_0); } ; _.initAfterTraversal = function initAfterTraversal(){ this.portPositions = initUnidimensionalArray(I_classLit, $intern_49, 28, this.nPorts, 15, 1); } ; _.initAtLayerLevel = function initAtLayerLevel(l, nodeOrder){ nodeOrder[l][0].layer.id_0 = l; } ; _.initAtPortLevel = function initAtPortLevel(l, n, p, nodeOrder){ ++this.nPorts; } ; _.isDeterministic = function isDeterministic(){ return true; } ; _.minimizeCrossings = function minimizeCrossings(order, freeLayerIndex, forwardSweep, isFirstSweep){ $setUp(this, order, freeLayerIndex, forwardSweep); return $continueSwitchingUntilNoImprovementInLayer(this, freeLayerIndex); } ; _.setFirstLayerOrder = function setFirstLayerOrder(currentOrder, isForwardSweep){ var startIndex; startIndex = $startIndex(isForwardSweep, currentOrder.length); $setUp(this, currentOrder, startIndex, isForwardSweep); return $sweepDownwardInLayer(this, startIndex); } ; _.nPorts = 0; var Lorg_eclipse_elk_alg_layered_intermediate_greedyswitch_GreedySwitchHeuristic_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.greedyswitch', 'GreedySwitchHeuristic', 1867); function $countCrossings(this$static, upperNode, lowerNode){ this$static.upperLowerCrossings = 0; this$static.lowerUpperCrossings = 0; upperNode.type_0 == ($clinit_LNode$NodeType() , NORTH_SOUTH_PORT) && lowerNode.type_0 == NORTH_SOUTH_PORT && castTo($getProperty(upperNode, ($clinit_InternalProperties_1() , ORIGIN_0)), 10) == castTo($getProperty(lowerNode, ORIGIN_0), 10) && ($originPortOf(upperNode).side == ($clinit_PortSide() , NORTH_3)?$countCrossingsOfTwoNorthSouthDummies(this$static, upperNode, lowerNode):$countCrossingsOfTwoNorthSouthDummies(this$static, lowerNode, upperNode)); upperNode.type_0 == NORTH_SOUTH_PORT && lowerNode.type_0 == LONG_EDGE?$originPortOf(upperNode).side == ($clinit_PortSide() , NORTH_3)?(this$static.upperLowerCrossings = 1):(this$static.lowerUpperCrossings = 1):lowerNode.type_0 == NORTH_SOUTH_PORT && upperNode.type_0 == LONG_EDGE && ($originPortOf(lowerNode).side == ($clinit_PortSide() , NORTH_3)?(this$static.lowerUpperCrossings = 1):(this$static.upperLowerCrossings = 1)); $processIfNormalNodeWithNSPortsAndLongEdgeDummy(this$static, upperNode, lowerNode); } function $countCrossingsOfTwoNorthSouthDummies(this$static, furtherFromNormalNode, closerToNormalNode){ var closerEastPorts, closerWestPorts, furtherEastPorts, furtherWestPorts; if ($originPortPositionOf(this$static, furtherFromNormalNode) > $originPortPositionOf(this$static, closerToNormalNode)) { closerEastPorts = $getPortSideView(closerToNormalNode, ($clinit_PortSide() , EAST_2)); this$static.upperLowerCrossings = closerEastPorts.isEmpty()?0:$getDegree(castTo(closerEastPorts.get_0(0), 12)); furtherWestPorts = $getPortSideView(furtherFromNormalNode, WEST_2); this$static.lowerUpperCrossings = furtherWestPorts.isEmpty()?0:$getDegree(castTo(furtherWestPorts.get_0(0), 12)); } else { closerWestPorts = $getPortSideView(closerToNormalNode, ($clinit_PortSide() , WEST_2)); this$static.upperLowerCrossings = closerWestPorts.isEmpty()?0:$getDegree(castTo(closerWestPorts.get_0(0), 12)); furtherEastPorts = $getPortSideView(furtherFromNormalNode, EAST_2); this$static.lowerUpperCrossings = furtherEastPorts.isEmpty()?0:$getDegree(castTo(furtherEastPorts.get_0(0), 12)); } } function $initializePortPositions(this$static){ var node, node$array, node$index, node$max; for (node$array = this$static.layer , node$index = 0 , node$max = node$array.length; node$index < node$max; ++node$index) { node = node$array[node$index]; $setPortIdsOn(this$static, node, ($clinit_PortSide() , SOUTH_2)); $setPortIdsOn(this$static, node, NORTH_3); } } function $numberOfNorthSouthEdges(node, side){ var numberOfEdges, port, port$iterator; numberOfEdges = 0; for (port$iterator = $getPortSideView(node, side).iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); numberOfEdges += $getProperty(port, ($clinit_InternalProperties_1() , PORT_DUMMY)) != null?1:0; } return numberOfEdges; } function $originPortOf(node){ var origin_0, port; port = castTo($get_11(node.ports, 0), 12); origin_0 = castTo($getProperty(port, ($clinit_InternalProperties_1() , ORIGIN_0)), 12); return origin_0; } function $originPortPositionOf(this$static, node){ var origin_0, port; origin_0 = $originPortOf(node); port = origin_0; return castTo($get_10(this$static.portPositions, port), 17).value_0; } function $processIfNormalNodeWithNSPortsAndLongEdgeDummy(this$static, upperNode, lowerNode){ if (upperNode.type_0 == ($clinit_LNode$NodeType() , NORMAL) && lowerNode.type_0 == LONG_EDGE) { this$static.upperLowerCrossings = $numberOfNorthSouthEdges(upperNode, ($clinit_PortSide() , SOUTH_2)); this$static.lowerUpperCrossings = $numberOfNorthSouthEdges(upperNode, NORTH_3); } if (lowerNode.type_0 == NORMAL && upperNode.type_0 == LONG_EDGE) { this$static.upperLowerCrossings = $numberOfNorthSouthEdges(lowerNode, ($clinit_PortSide() , NORTH_3)); this$static.lowerUpperCrossings = $numberOfNorthSouthEdges(lowerNode, SOUTH_2); } } function $setPortIdsOn(this$static, node, side){ var port, port$iterator, portId, ports; ports = inNorthSouthEastWestOrder(node, side); portId = 0; for (port$iterator = ports.iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); $put_6(this$static.portPositions, port, valueOf_3(portId++)); } } function NorthSouthEdgeNeighbouringNodeCrossingsCounter(nodes){ this.layer = nodes; this.portPositions = new HashMap; $initializePortPositions(this); } defineClass(2029, 1, {}, NorthSouthEdgeNeighbouringNodeCrossingsCounter); _.lowerUpperCrossings = 0; _.upperLowerCrossings = 0; var Lorg_eclipse_elk_alg_layered_intermediate_greedyswitch_NorthSouthEdgeNeighbouringNodeCrossingsCounter_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.greedyswitch', 'NorthSouthEdgeNeighbouringNodeCrossingsCounter', 2029); function $doesSwitchReduceCrossings(this$static, upperNodeIndex, lowerNodeIndex){ var crossingNumbers, leftInlayer, lowerNode, lowerPort, lowerUpperCrossings, rightInlayer, upperLowerCrossings, upperNode, upperPort, upperNode_0, lowerNode_0, constraints, neitherNodeIsLongEdgeDummy, upperLayoutUnit, lowerLayoutUnit, areInDifferentLayoutUnits, nodesHaveLayoutUnits, upperNodeHasNorthernEdges, lowerNodeHasSouthernEdges, hasLayoutUnitConstraint; if (upperNode_0 = this$static.freeLayer[upperNodeIndex] , lowerNode_0 = this$static.freeLayer[lowerNodeIndex] , (constraints = castTo($getProperty(upperNode_0, ($clinit_InternalProperties_1() , IN_LAYER_SUCCESSOR_CONSTRAINTS)), 15) , !!constraints && constraints.size_1() != 0 && constraints.contains(lowerNode_0)) || (neitherNodeIsLongEdgeDummy = upperNode_0.type_0 != ($clinit_LNode$NodeType() , LONG_EDGE) && lowerNode_0.type_0 != LONG_EDGE , upperLayoutUnit = castTo($getProperty(upperNode_0, IN_LAYER_LAYOUT_UNIT), 10) , lowerLayoutUnit = castTo($getProperty(lowerNode_0, IN_LAYER_LAYOUT_UNIT), 10) , areInDifferentLayoutUnits = upperLayoutUnit != lowerLayoutUnit , nodesHaveLayoutUnits = !!upperLayoutUnit && upperLayoutUnit != upperNode_0 || !!lowerLayoutUnit && lowerLayoutUnit != lowerNode_0 , upperNodeHasNorthernEdges = $hasEdgesOnSide(upperNode_0, ($clinit_PortSide() , NORTH_3)) , lowerNodeHasSouthernEdges = $hasEdgesOnSide(lowerNode_0, SOUTH_2) , nodesHaveLayoutUnits = nodesHaveLayoutUnits | ($hasEdgesOnSide(upperNode_0, SOUTH_2) || $hasEdgesOnSide(lowerNode_0, NORTH_3)) , hasLayoutUnitConstraint = nodesHaveLayoutUnits && areInDifferentLayoutUnits || upperNodeHasNorthernEdges || lowerNodeHasSouthernEdges , neitherNodeIsLongEdgeDummy && hasLayoutUnitConstraint) || upperNode_0.type_0 == ($clinit_LNode$NodeType() , NORTH_SOUTH_PORT) && lowerNode_0.type_0 == NORMAL || lowerNode_0.type_0 == ($clinit_LNode$NodeType() , NORTH_SOUTH_PORT) && upperNode_0.type_0 == NORMAL) { return false; } upperNode = this$static.freeLayer[upperNodeIndex]; lowerNode = this$static.freeLayer[lowerNodeIndex]; leftInlayer = $countInLayerCrossingsBetweenNodesInBothOrders(this$static.leftInLayerCounter, upperNode, lowerNode, ($clinit_PortSide() , WEST_2)); rightInlayer = $countInLayerCrossingsBetweenNodesInBothOrders(this$static.rightInLayerCounter, upperNode, lowerNode, EAST_2); $countCrossings(this$static.northSouthCounter, upperNode, lowerNode); upperLowerCrossings = $getCrossingMatrixEntry(this$static.crossingMatrixFiller, upperNode, lowerNode) + castTo(leftInlayer.first, 17).value_0 + castTo(rightInlayer.first, 17).value_0 + this$static.northSouthCounter.upperLowerCrossings; lowerUpperCrossings = $getCrossingMatrixEntry(this$static.crossingMatrixFiller, lowerNode, upperNode) + castTo(leftInlayer.second, 17).value_0 + castTo(rightInlayer.second, 17).value_0 + this$static.northSouthCounter.lowerUpperCrossings; if (this$static.countCrossingsCausedByPortSwitch) { upperPort = castTo($getProperty(upperNode, ORIGIN_0), 12); lowerPort = castTo($getProperty(lowerNode, ORIGIN_0), 12); crossingNumbers = $countCrossingsBetweenPortsInBothOrders(this$static.parentCrossCounter, upperPort, lowerPort); upperLowerCrossings += castTo(crossingNumbers.first, 17).value_0; lowerUpperCrossings += castTo(crossingNumbers.second, 17).value_0; } return upperLowerCrossings > lowerUpperCrossings; } function $hasEdgesOnSide(node, side){ var port, port$iterator, ports; ports = $getPortSideView(node, side); for (port$iterator = ports.iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); if ($getProperty(port, ($clinit_InternalProperties_1() , PORT_DUMMY)) != null || $hasNext_6(new LPort$CombineIter$1(port.connectedEdges))) { return true; } } return false; } function $initParentCrossingsCounters(this$static, freeLayerIndex, length_0){ var leftLayer, middleLayer, parentGraphData, parentNodeLayerPos, parentNodeOrder, portPos, rightLayer, rightMostLayer; parentGraphData = this$static.graphData.parentGraphData; parentNodeOrder = parentGraphData.currentNodeOrder; portPos = parentGraphData.portPositions; this$static.parentCrossCounter = new CrossingsCounter(portPos); parentNodeLayerPos = this$static.graphData.parent_0.layer.id_0; leftLayer = parentNodeLayerPos > 0?parentNodeOrder[parentNodeLayerPos - 1]:initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LNode_2_classLit, $intern_107, 10, 0, 0, 1); middleLayer = parentNodeOrder[parentNodeLayerPos]; rightLayer = parentNodeLayerPos < parentNodeOrder.length - 1?parentNodeOrder[parentNodeLayerPos + 1]:initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LNode_2_classLit, $intern_107, 10, 0, 0, 1); rightMostLayer = freeLayerIndex == length_0 - 1; rightMostLayer?$initForCountingBetween(this$static.parentCrossCounter, middleLayer, rightLayer):$initForCountingBetween(this$static.parentCrossCounter, leftLayer, middleLayer); } function $notifyOfSwitch(this$static, upperNode, lowerNode){ var lowerPort, upperPort; $switchNodes(this$static.leftInLayerCounter, upperNode, lowerNode, ($clinit_PortSide() , WEST_2)); $switchNodes(this$static.rightInLayerCounter, upperNode, lowerNode, EAST_2); if (this$static.countCrossingsCausedByPortSwitch) { upperPort = castTo($getProperty(upperNode, ($clinit_InternalProperties_1() , ORIGIN_0)), 12); lowerPort = castTo($getProperty(lowerNode, ORIGIN_0), 12); $switchPorts(this$static.parentCrossCounter, upperPort, lowerPort); } } function SwitchDecider(freeLayerIndex, graph, crossingMatrixFiller, portPositions, graphData, oneSided){ this.crossingMatrixFiller = crossingMatrixFiller; this.graphData = graphData; if (freeLayerIndex >= graph.length) { throw toJs(new IndexOutOfBoundsException_0('Greedy SwitchDecider: Free layer not in graph.')); } this.freeLayer = graph[freeLayerIndex]; this.leftInLayerCounter = new CrossingsCounter(portPositions); $initPortPositionsForInLayerCrossings(this.leftInLayerCounter, this.freeLayer, ($clinit_PortSide() , WEST_2)); this.rightInLayerCounter = new CrossingsCounter(portPositions); $initPortPositionsForInLayerCrossings(this.rightInLayerCounter, this.freeLayer, EAST_2); this.northSouthCounter = new NorthSouthEdgeNeighbouringNodeCrossingsCounter(this.freeLayer); this.countCrossingsCausedByPortSwitch = !oneSided && graphData.hasParent && !graphData.useBottomUp && this.freeLayer[0].type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT); this.countCrossingsCausedByPortSwitch && $initParentCrossingsCounters(this, freeLayerIndex, graph.length); } defineClass(2016, 1, {}, SwitchDecider); _.countCrossingsCausedByPortSwitch = false; var Lorg_eclipse_elk_alg_layered_intermediate_greedyswitch_SwitchDecider_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.greedyswitch', 'SwitchDecider', 2016); function $addSelfLoopEdge(this$static, slEdge){ var lLabels, slSource, slTarget; if ($add_6(this$static.slEdges, slEdge)) { slEdge.slHyperLoop = this$static; slSource = slEdge.slSource; $indexOf_3(this$static.slPorts, slSource, 0) != -1 || $add_3(this$static.slPorts, slSource); slTarget = slEdge.slTarget; $indexOf_3(this$static.slPorts, slTarget, 0) != -1 || $add_3(this$static.slPorts, slTarget); lLabels = slEdge.lEdge.labels; if (lLabels.array.length != 0) { !this$static.slLabels && (this$static.slLabels = new SelfHyperLoopLabels(this$static)); $addLLabels(this$static.slLabels, lLabels); } } } function $computePortsPerSide(this$static){ var portSide, slPort, slPort$iterator; this$static.slPortsBySide = new ArrayListMultimap_0(($clinit_PortSide() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [UNDEFINED_5, NORTH_3, EAST_2, SOUTH_2, WEST_2])).length, this$static.slPorts.array.length); for (slPort$iterator = new ArrayList$1(this$static.slPorts); slPort$iterator.i < slPort$iterator.this$01.array.length;) { slPort = castTo($next_6(slPort$iterator), 113); portSide = slPort.lPort.side; $put(this$static.slPortsBySide, portSide, slPort); } this$static.selfLoopType = fromPortSides($keySet(this$static.slPortsBySide)); } function $setLeftmostPort(this$static, leftmostPort){ this$static.leftmostPort = leftmostPort; } function $setRightmostPort(this$static, rightmostPort){ this$static.rightmostPort = rightmostPort; } function $setRoutingSlot(this$static, portSide, slot){ var slotCount; this$static.routingSlot[portSide.ordinal] = slot; slotCount = this$static.slHolder.routingSlotCount; slotCount[portSide.ordinal] = $wnd.Math.max(slotCount[portSide.ordinal], slot + 1); } function SelfHyperLoop(slHolder){ var all; this.slPorts = new ArrayList; this.slEdges = new HashSet; this.occupiedPortSides = (all = castTo($getEnumConstants(Lorg_eclipse_elk_core_options_PortSide_2_classLit), 9) , new EnumSet$EnumSetImpl(all, castTo(createFrom(all, all.length), 9), 0)); this.routingSlot = initUnidimensionalArray(I_classLit, $intern_49, 28, ($clinit_PortSide() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [UNDEFINED_5, NORTH_3, EAST_2, SOUTH_2, WEST_2])).length, 15, 1); this.slHolder = slHolder; } defineClass(105, 1, {105:1}, SelfHyperLoop); _.leftmostPort = null; _.rightmostPort = null; _.slLabels = null; var Lorg_eclipse_elk_alg_layered_intermediate_loops_SelfHyperLoop_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops', 'SelfHyperLoop', 105); function $addLLabels(this$static, newLLabels){ var newLLabel, newLLabel$iterator; for (newLLabel$iterator = new ArrayList$1(newLLabels); newLLabel$iterator.i < newLLabel$iterator.this$01.array.length;) { newLLabel = castTo($next_6(newLLabel$iterator), 72); $add_3(this$static.lLabels, newLLabel); $updateSize(this$static, newLLabel); } } function $applyPlacement(this$static, offset){ $isHorizontal(this$static.layoutDirection)?$applyPlacementForHorizontalLayout(this$static, offset):$applyPlacementVerticalForVerticalLayout(this$static, offset); } function $applyPlacementForHorizontalLayout(this$static, offset){ var lLabel, lLabel$iterator, labelPos, x_0, y_0; x_0 = this$static.position.x_0; y_0 = this$static.position.y_0; for (lLabel$iterator = new ArrayList$1(this$static.lLabels); lLabel$iterator.i < lLabel$iterator.this$01.array.length;) { lLabel = castTo($next_6(lLabel$iterator), 72); labelPos = lLabel.pos; this$static.alignment == ($clinit_SelfHyperLoopLabels$Alignment() , LEFT_1) || this$static.side == ($clinit_PortSide() , EAST_2)?(labelPos.x_0 = x_0):this$static.alignment == RIGHT_1 || this$static.side == ($clinit_PortSide() , WEST_2)?(labelPos.x_0 = x_0 + this$static.size_0.x_0 - lLabel.size_0.x_0):(labelPos.x_0 = x_0 + (this$static.size_0.x_0 - lLabel.size_0.x_0) / 2); labelPos.y_0 = y_0; $add_19(labelPos, offset); y_0 += lLabel.size_0.y_0 + this$static.labelLabelSpacing; } } function $applyPlacementVerticalForVerticalLayout(this$static, offset){ var lLabel, lLabel$iterator, labelPos, x_0, y_0; x_0 = this$static.position.x_0; y_0 = this$static.position.y_0; for (lLabel$iterator = new ArrayList$1(this$static.lLabels); lLabel$iterator.i < lLabel$iterator.this$01.array.length;) { lLabel = castTo($next_6(lLabel$iterator), 72); labelPos = lLabel.pos; labelPos.x_0 = x_0; this$static.side == ($clinit_PortSide() , NORTH_3)?(labelPos.y_0 = y_0 + this$static.size_0.y_0 - lLabel.size_0.y_0):(labelPos.y_0 = y_0); $add_19(labelPos, offset); x_0 += lLabel.size_0.x_0 + this$static.labelLabelSpacing; } } function $updateSize(this$static, newLLabel){ var newLLabelSize; newLLabelSize = newLLabel.size_0; if ($isHorizontal(this$static.layoutDirection)) { this$static.size_0.x_0 = $wnd.Math.max(this$static.size_0.x_0, newLLabelSize.x_0); this$static.size_0.y_0 += newLLabelSize.y_0; this$static.lLabels.array.length > 1 && (this$static.size_0.y_0 += this$static.labelLabelSpacing); } else { this$static.size_0.x_0 += newLLabelSize.x_0; this$static.size_0.y_0 = $wnd.Math.max(this$static.size_0.y_0, newLLabelSize.y_0); this$static.lLabels.array.length > 1 && (this$static.size_0.x_0 += this$static.labelLabelSpacing); } } function SelfHyperLoopLabels(slLoop){ var lNode; this.lLabels = new ArrayList; this.size_0 = new KVector; this.position = new KVector; lNode = slLoop.slHolder.lNode; this.layoutDirection = castTo($getProperty($getGraph(lNode), ($clinit_LayeredOptions() , DIRECTION)), 88); this.labelLabelSpacing = $doubleValue(castToDouble(getIndividualOrInherited(lNode, SPACING_LABEL_LABEL))); } defineClass(2013, 1, {}, SelfHyperLoopLabels); _.id_0 = 0; _.labelLabelSpacing = 0; var Lorg_eclipse_elk_alg_layered_intermediate_loops_SelfHyperLoopLabels_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops', 'SelfHyperLoopLabels', 2013); function $clinit_SelfHyperLoopLabels$Alignment(){ $clinit_SelfHyperLoopLabels$Alignment = emptyMethod; CENTER_2 = new SelfHyperLoopLabels$Alignment('CENTER', 0); LEFT_1 = new SelfHyperLoopLabels$Alignment('LEFT', 1); RIGHT_1 = new SelfHyperLoopLabels$Alignment('RIGHT', 2); TOP_0 = new SelfHyperLoopLabels$Alignment('TOP', 3); } function SelfHyperLoopLabels$Alignment(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_32(name_0){ $clinit_SelfHyperLoopLabels$Alignment(); return valueOf(($clinit_SelfHyperLoopLabels$Alignment$Map() , $MAP_22), name_0); } function values_40(){ $clinit_SelfHyperLoopLabels$Alignment(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_intermediate_loops_SelfHyperLoopLabels$Alignment_2_classLit, 1), $intern_37, 421, 0, [CENTER_2, LEFT_1, RIGHT_1, TOP_0]); } defineClass(421, 22, {3:1, 34:1, 22:1, 421:1}, SelfHyperLoopLabels$Alignment); var CENTER_2, LEFT_1, RIGHT_1, TOP_0; var Lorg_eclipse_elk_alg_layered_intermediate_loops_SelfHyperLoopLabels$Alignment_2_classLit = createForEnum('org.eclipse.elk.alg.layered.intermediate.loops', 'SelfHyperLoopLabels/Alignment', 421, Ljava_lang_Enum_2_classLit, values_40, valueOf_32); function $clinit_SelfHyperLoopLabels$Alignment$Map(){ $clinit_SelfHyperLoopLabels$Alignment$Map = emptyMethod; $MAP_22 = createValueOfMap(($clinit_SelfHyperLoopLabels$Alignment() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_intermediate_loops_SelfHyperLoopLabels$Alignment_2_classLit, 1), $intern_37, 421, 0, [CENTER_2, LEFT_1, RIGHT_1, TOP_0]))); } var $MAP_22; function SelfLoopEdge(lEdge, slSource, slTarget){ this.lEdge = lEdge; this.slSource = slSource; this.slTarget = slTarget; $add_3(slSource.outgoingSLEdges, this); $add_3(slTarget.incomingSLEdges, this); } defineClass(340, 1, {340:1}, SelfLoopEdge); var Lorg_eclipse_elk_alg_layered_intermediate_loops_SelfLoopEdge_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops', 'SelfLoopEdge', 340); function $initialize_3(this$static){ var entry, lEdge, lEdge$iterator, outerIter, outerIter0, slEdges, slPort, slPort$iterator, slPort$iterator0; slEdges = new ArrayList; for (lEdge$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(this$static.lNode).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(lEdge$iterator);) { lEdge = castTo($next_0(lEdge$iterator), 18); $isSelfLoop(lEdge) && $add_3(slEdges, new SelfLoopEdge(lEdge, $selfLoopPortFor(this$static, lEdge.source), $selfLoopPortFor(this$static, lEdge.target))); } for (slPort$iterator0 = (outerIter0 = (new AbstractMap$2(this$static.slPorts)).this$01.entrySet_0().iterator_0() , new AbstractMap$2$1(outerIter0)); slPort$iterator0.val$outerIter2.hasNext_0();) { slPort = (entry = castTo(slPort$iterator0.val$outerIter2.next_1(), 44) , castTo(entry.getValue(), 113)); slPort.lPort.id_0 = 0; } for (slPort$iterator = (outerIter = (new AbstractMap$2(this$static.slPorts)).this$01.entrySet_0().iterator_0() , new AbstractMap$2$1(outerIter)); slPort$iterator.val$outerIter2.hasNext_0();) { slPort = (entry = castTo(slPort$iterator.val$outerIter2.next_1(), 44) , castTo(entry.getValue(), 113)); slPort.lPort.id_0 == 0 && $add_3(this$static.slHyperLoops, $initializeHyperLoop(this$static, slPort)); } } function $initializeHyperLoop(this$static, slPort){ var bfsQueue, currentSLPort, slEdge, slEdge$iterator, slEdge$iterator0, slLoop, slSourcePort, slTargetPort; slLoop = new SelfHyperLoop(this$static); bfsQueue = new LinkedList; $addNode_0(bfsQueue, slPort, bfsQueue.tail.prev, bfsQueue.tail); while (bfsQueue.size_0 != 0) { currentSLPort = castTo(bfsQueue.size_0 == 0?null:(checkCriticalElement(bfsQueue.size_0 != 0) , $removeNode_0(bfsQueue, bfsQueue.header.next_0)), 113); currentSLPort.lPort.id_0 = 1; for (slEdge$iterator0 = new ArrayList$1(currentSLPort.outgoingSLEdges); slEdge$iterator0.i < slEdge$iterator0.this$01.array.length;) { slEdge = castTo($next_6(slEdge$iterator0), 340); $addSelfLoopEdge(slLoop, slEdge); slTargetPort = slEdge.slTarget; slTargetPort.lPort.id_0 == 0 && ($addNode_0(bfsQueue, slTargetPort, bfsQueue.tail.prev, bfsQueue.tail) , true); } for (slEdge$iterator = new ArrayList$1(currentSLPort.incomingSLEdges); slEdge$iterator.i < slEdge$iterator.this$01.array.length;) { slEdge = castTo($next_6(slEdge$iterator), 340); $addSelfLoopEdge(slLoop, slEdge); slSourcePort = slEdge.slSource; slSourcePort.lPort.id_0 == 0 && ($addNode_0(bfsQueue, slSourcePort, bfsQueue.tail.prev, bfsQueue.tail) , true); } } return slLoop; } function $selfLoopPortFor(this$static, lport){ $containsKey_6(this$static.slPorts, lport) || $put_11(this$static.slPorts, lport, new SelfLoopPort(lport)); return castTo($get_16(this$static.slPorts, lport), 113); } function SelfLoopHolder(node){ this.slHyperLoops = new ArrayList; this.slPorts = new LinkedHashMap; this.routingSlotCount = initUnidimensionalArray(I_classLit, $intern_49, 28, ($clinit_PortSide() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [UNDEFINED_5, NORTH_3, EAST_2, SOUTH_2, WEST_2])).length, 15, 1); this.lNode = node; } function needsSelfLoopProcessing(lNode){ if (lNode.type_0 != ($clinit_LNode$NodeType() , NORMAL)) { return false; } return $anyMatch(new StreamImpl(null, new Spliterators$IteratorSpliterator_0(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(lNode).val$inputs1.iterator_0(), new Iterables$10)))), new SelfLoopHolder$lambda$0$Type); } defineClass(337, 1, {337:1}, SelfLoopHolder); _.arePortsHidden = false; var Lorg_eclipse_elk_alg_layered_intermediate_loops_SelfLoopHolder_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops', 'SelfLoopHolder', 337); function SelfLoopHolder$lambda$0$Type(){ } defineClass(1790, 1, $intern_40, SelfLoopHolder$lambda$0$Type); _.test_0 = function test_69(arg0){ return $isSelfLoop(castTo(arg0, 18)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_SelfLoopHolder$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops', 'SelfLoopHolder/lambda$0$Type', 1790); function $getSLNetFlow(this$static){ return this$static.incomingSLEdges.array.length - this$static.outgoingSLEdges.array.length; } function SelfLoopPort(lPort){ this.incomingSLEdges = new ArrayList; this.outgoingSLEdges = new ArrayList; this.lPort = lPort; this.hadOnlySelfLoops = !$spliterator($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator_0(new LPort$CombineIter$1(lPort.connectedEdges))), new Predicate$lambda$2$Type(new SelfLoopPort$lambda$0$Type))).tryAdvance(($clinit_StreamImpl() , NULL_CONSUMER)); } defineClass(113, 1, {113:1}, SelfLoopPort); _.hadOnlySelfLoops = false; _.isHidden = false; var Lorg_eclipse_elk_alg_layered_intermediate_loops_SelfLoopPort_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops', 'SelfLoopPort', 113); function SelfLoopPort$lambda$0$Type(){ } defineClass(1855, 1, $intern_40, SelfLoopPort$lambda$0$Type); _.test_0 = function test_70(arg0){ return $isSelfLoop(castTo(arg0, 18)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_SelfLoopPort$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops', 'SelfLoopPort/lambda$0$Type', 1855); function $clinit_SelfLoopType(){ $clinit_SelfLoopType = emptyMethod; ONE_SIDE = new SelfLoopType('ONE_SIDE', 0); TWO_SIDES_CORNER = new SelfLoopType('TWO_SIDES_CORNER', 1); TWO_SIDES_OPPOSING = new SelfLoopType('TWO_SIDES_OPPOSING', 2); THREE_SIDES = new SelfLoopType('THREE_SIDES', 3); FOUR_SIDES = new SelfLoopType('FOUR_SIDES', 4); } function SelfLoopType(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function fromPortSides(portSides){ $clinit_SelfLoopType(); var eastWest, northSouth; if (portSides.contains(($clinit_PortSide() , UNDEFINED_5))) { throw toJs(new IllegalArgumentException_0('Port sides must not contain UNDEFINED')); } switch (portSides.size_1()) { case 1: return ONE_SIDE; case 2: eastWest = portSides.contains(EAST_2) && portSides.contains(WEST_2); northSouth = portSides.contains(NORTH_3) && portSides.contains(SOUTH_2); return eastWest || northSouth?TWO_SIDES_OPPOSING:TWO_SIDES_CORNER; case 3: return THREE_SIDES; case 4: return FOUR_SIDES; default:return null; } } function valueOf_33(name_0){ $clinit_SelfLoopType(); return valueOf(($clinit_SelfLoopType$Map() , $MAP_23), name_0); } function values_41(){ $clinit_SelfLoopType(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_intermediate_loops_SelfLoopType_2_classLit, 1), $intern_37, 375, 0, [ONE_SIDE, TWO_SIDES_CORNER, TWO_SIDES_OPPOSING, THREE_SIDES, FOUR_SIDES]); } defineClass(375, 22, {3:1, 34:1, 22:1, 375:1}, SelfLoopType); var FOUR_SIDES, ONE_SIDE, THREE_SIDES, TWO_SIDES_CORNER, TWO_SIDES_OPPOSING; var Lorg_eclipse_elk_alg_layered_intermediate_loops_SelfLoopType_2_classLit = createForEnum('org.eclipse.elk.alg.layered.intermediate.loops', 'SelfLoopType', 375, Ljava_lang_Enum_2_classLit, values_41, valueOf_33); function $clinit_SelfLoopType$Map(){ $clinit_SelfLoopType$Map = emptyMethod; $MAP_23 = createValueOfMap(($clinit_SelfLoopType() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_intermediate_loops_SelfLoopType_2_classLit, 1), $intern_37, 375, 0, [ONE_SIDE, TWO_SIDES_CORNER, TWO_SIDES_OPPOSING, THREE_SIDES, FOUR_SIDES]))); } var $MAP_23; function $clinit_PortRestorer(){ $clinit_PortRestorer = emptyMethod; NES = stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [($clinit_PortSide() , NORTH_3), EAST_2, SOUTH_2]); ESW = stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [EAST_2, SOUTH_2, WEST_2]); SWN = stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [SOUTH_2, WEST_2, NORTH_3]); WNE = stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [WEST_2, NORTH_3, EAST_2]); } function $addAll_5(slPorts, lNode){ $forEach_3($map(slPorts.stream(), new PortRestorer$lambda$11$Type), new PortRestorer$lambda$12$Type(lNode)); } function $addAllThat(lPorts, fromIndex, condition, target){ var i, lPort; for (i = fromIndex; i < lPorts.array.length; i++) { lPort = (checkCriticalElementIndex(i, lPorts.array.length) , castTo(lPorts.array[i], 12)); if (condition.test_0(lPort)) { push_1(target.array, lPort); } else { return i; } } return lPorts.array.length; } function $addToTargetArea(this$static, slPorts, portSide, area, addMode){ var hiddenPorts, targetArea; hiddenPorts = castTo($collect_1($filter(slPorts.stream(), new PortRestorer$lambda$4$Type), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , IDENTITY_FINISH)]))), 15); reverse_2(hiddenPorts); targetArea = castTo($get_1(this$static.targetAreas, portSide, area), 15); addMode == 0?targetArea.addAll_0(0, hiddenPorts):targetArea.addAll(hiddenPorts); } function $addToTargetArea_0(this$static, slLoop, portSide, area, addMode){ $addToTargetArea(this$static, castTo($get(slLoop.slPortsBySide, portSide), 15), portSide, area, addMode); } function $computePortListSplitIndex(sortedPorts){ var nonNegativeNetFlowIndex, positiveNetFlowIndex; positiveNetFlowIndex = 0; for (; positiveNetFlowIndex < sortedPorts.array.length; positiveNetFlowIndex++) { if ($getSLNetFlow((checkCriticalElementIndex(positiveNetFlowIndex, sortedPorts.array.length) , castTo(sortedPorts.array[positiveNetFlowIndex], 113))) > 0) { break; } } if (positiveNetFlowIndex > 0 && positiveNetFlowIndex < sortedPorts.array.length - 1) { return positiveNetFlowIndex; } nonNegativeNetFlowIndex = 0; for (; nonNegativeNetFlowIndex < sortedPorts.array.length; nonNegativeNetFlowIndex++) { if ($getSLNetFlow((checkCriticalElementIndex(nonNegativeNetFlowIndex, sortedPorts.array.length) , castTo(sortedPorts.array[nonNegativeNetFlowIndex], 113))) > 0) { break; } } if (nonNegativeNetFlowIndex > 0 && positiveNetFlowIndex < sortedPorts.array.length - 1) { return nonNegativeNetFlowIndex; } return sortedPorts.array.length / 2 | 0; } function $initTargetAreas(this$static){ var area, area$array, area$index, area$max, side, side$array, side$index, side$max; this$static.targetAreas = new ArrayTable(new Arrays$ArrayList(($clinit_PortSide() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [UNDEFINED_5, NORTH_3, EAST_2, SOUTH_2, WEST_2]))), new Arrays$ArrayList(($clinit_PortRestorer$PortSideArea() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortRestorer$PortSideArea_2_classLit, 1), $intern_37, 372, 0, [START, MIDDLE, END_0])))); for (side$array = stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [UNDEFINED_5, NORTH_3, EAST_2, SOUTH_2, WEST_2]) , side$index = 0 , side$max = side$array.length; side$index < side$max; ++side$index) { side = side$array[side$index]; for (area$array = stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortRestorer$PortSideArea_2_classLit, 1), $intern_37, 372, 0, [START, MIDDLE, END_0]) , area$index = 0 , area$max = area$array.length; area$index < area$max; ++area$index) { area = area$array[area$index]; $put_0(this$static.targetAreas, side, area, new ArrayList); } } } function $lambda$5(lPort_0){ var connections, eastConnections, westConnections; return lPort_0.side == ($clinit_PortSide() , NORTH_3) && (connections = $northSouthPortConnectionSides(lPort_0) , eastConnections = $containsEnum(connections, EAST_2) , westConnections = $containsEnum(connections, WEST_2) , westConnections || westConnections && eastConnections); } function $lambda$8(lPort_0){ var connections; return lPort_0.side == ($clinit_PortSide() , SOUTH_2) && (connections = $northSouthPortConnectionSides(lPort_0) , $containsEnum(connections, EAST_2)); } function $northSouthPortConnectionSides(lPort){ var all, connectionSides, dummyLPort, dummyLPort$iterator, portDummy; connectionSides = (all = castTo($getEnumConstants(Lorg_eclipse_elk_core_options_PortSide_2_classLit), 9) , new EnumSet$EnumSetImpl(all, castTo(createFrom(all, all.length), 9), 0)); portDummy = castTo($getProperty(lPort, ($clinit_InternalProperties_1() , PORT_DUMMY)), 10); if (portDummy) { for (dummyLPort$iterator = new ArrayList$1(portDummy.ports); dummyLPort$iterator.i < dummyLPort$iterator.this$01.array.length;) { dummyLPort = castTo($next_6(dummyLPort$iterator), 12); maskUndefined($getProperty(dummyLPort, ORIGIN_0)) === maskUndefined(lPort) && $hasNext_6(new LPort$CombineIter$1(dummyLPort.connectedEdges)) && $add_5(connectionSides, dummyLPort.side); } } return connectionSides; } function $processFourSideLoops(this$static){ var side, side$iterator, slLoop, slLoop$iterator; for (slLoop$iterator = castTo($get(this$static.slLoopsByType, ($clinit_SelfLoopType() , FOUR_SIDES)), 15).iterator_0(); slLoop$iterator.hasNext_0();) { slLoop = castTo(slLoop$iterator.next_1(), 105); for (side$iterator = $keySet(slLoop.slPortsBySide).iterator_0(); side$iterator.hasNext_0();) { side = castTo(side$iterator.next_1(), 64); $addToTargetArea_0(this$static, slLoop, side, ($clinit_PortRestorer$PortSideArea() , MIDDLE), 1); } } } function $processOneSideLoops(this$static, ordering){ var side, slLoop, slLoop$iterator, sortedPorts, splitIndex; ordering == ($clinit_SelfLoopOrderingStrategy() , REVERSE_STACKED) && reverse_2(castTo($get(this$static.slLoopsByType, ($clinit_SelfLoopType() , ONE_SIDE)), 15)); for (slLoop$iterator = castTo($get(this$static.slLoopsByType, ($clinit_SelfLoopType() , ONE_SIDE)), 15).iterator_0(); slLoop$iterator.hasNext_0();) { slLoop = castTo(slLoop$iterator.next_1(), 105); side = castTo($get_11(slLoop.slPorts, 0), 113).lPort.side; sortedPorts = new ArrayList_1(slLoop.slPorts); $sort(sortedPorts, new PortRestorer$lambda$3$Type); switch (ordering.ordinal) { case 2: $addToTargetArea(this$static, sortedPorts, side, ($clinit_PortRestorer$PortSideArea() , MIDDLE), 1); break; case 1: case 0: splitIndex = $computePortListSplitIndex(sortedPorts); $addToTargetArea(this$static, new AbstractList$SubList(sortedPorts, 0, splitIndex), side, ($clinit_PortRestorer$PortSideArea() , MIDDLE), 0); $addToTargetArea(this$static, new AbstractList$SubList(sortedPorts, splitIndex, sortedPorts.array.length), side, MIDDLE, 1); } } } function $processThreeSideLoops(this$static){ var portSides, sides, slLoop, slLoop$iterator; for (slLoop$iterator = castTo($get(this$static.slLoopsByType, ($clinit_SelfLoopType() , THREE_SIDES)), 15).iterator_0(); slLoop$iterator.hasNext_0();) { slLoop = castTo(slLoop$iterator.next_1(), 105); sides = (portSides = $keySet(slLoop.slPortsBySide) , portSides.contains(($clinit_PortSide() , NORTH_3))?portSides.contains(EAST_2)?portSides.contains(SOUTH_2)?portSides.contains(WEST_2)?null:NES:WNE:SWN:ESW); $addToTargetArea_0(this$static, slLoop, sides[0], ($clinit_PortRestorer$PortSideArea() , END_0), 0); $addToTargetArea_0(this$static, slLoop, sides[1], MIDDLE, 1); $addToTargetArea_0(this$static, slLoop, sides[2], START, 1); } } function $processTwoSideCornerLoops(this$static){ var sides, slLoop, slLoop$iterator; for (slLoop$iterator = castTo($get(this$static.slLoopsByType, ($clinit_SelfLoopType() , TWO_SIDES_CORNER)), 15).iterator_0(); slLoop$iterator.hasNext_0();) { slLoop = castTo(slLoop$iterator.next_1(), 105); sides = sortedTwoSideLoopPortSides(slLoop); $addToTargetArea_0(this$static, slLoop, sides[0], ($clinit_PortRestorer$PortSideArea() , END_0), 0); $addToTargetArea_0(this$static, slLoop, sides[1], START, 1); } } function $processTwoSideOpposingLoops(this$static){ var sides, slLoop, slLoop$iterator; for (slLoop$iterator = castTo($get(this$static.slLoopsByType, ($clinit_SelfLoopType() , TWO_SIDES_OPPOSING)), 15).iterator_0(); slLoop$iterator.hasNext_0();) { slLoop = castTo(slLoop$iterator.next_1(), 105); sides = sortedTwoSideLoopPortSides(slLoop); $addToTargetArea_0(this$static, slLoop, sides[0], ($clinit_PortRestorer$PortSideArea() , END_0), 0); $addToTargetArea_0(this$static, slLoop, sides[1], START, 1); } } function $restorePorts(this$static, slHolder){ var lNode, newPortList, nextOldPortIndex, oldPortList; lNode = slHolder.lNode; oldPortList = new ArrayList_1(lNode.ports); nextOldPortIndex = 0; newPortList = lNode.ports; newPortList.array.length = 0; $addAll_5(castTo($get_1(this$static.targetAreas, ($clinit_PortSide() , NORTH_3), ($clinit_PortRestorer$PortSideArea() , START)), 15), lNode); nextOldPortIndex = $addAllThat(oldPortList, nextOldPortIndex, new PortRestorer$lambda$5$Type, newPortList); $addAll_5(castTo($get_1(this$static.targetAreas, NORTH_3, MIDDLE), 15), lNode); nextOldPortIndex = $addAllThat(oldPortList, nextOldPortIndex, new PortRestorer$lambda$6$Type, newPortList); $addAll_5(castTo($get_1(this$static.targetAreas, NORTH_3, END_0), 15), lNode); $addAll_5(castTo($get_1(this$static.targetAreas, EAST_2, START), 15), lNode); $addAll_5(castTo($get_1(this$static.targetAreas, EAST_2, MIDDLE), 15), lNode); nextOldPortIndex = $addAllThat(oldPortList, nextOldPortIndex, new PortRestorer$lambda$7$Type, newPortList); $addAll_5(castTo($get_1(this$static.targetAreas, EAST_2, END_0), 15), lNode); $addAll_5(castTo($get_1(this$static.targetAreas, SOUTH_2, START), 15), lNode); nextOldPortIndex = $addAllThat(oldPortList, nextOldPortIndex, new PortRestorer$lambda$8$Type, newPortList); $addAll_5(castTo($get_1(this$static.targetAreas, SOUTH_2, MIDDLE), 15), lNode); nextOldPortIndex = $addAllThat(oldPortList, nextOldPortIndex, new PortRestorer$lambda$9$Type, newPortList); $addAll_5(castTo($get_1(this$static.targetAreas, SOUTH_2, END_0), 15), lNode); $addAll_5(castTo($get_1(this$static.targetAreas, WEST_2, START), 15), lNode); nextOldPortIndex = $addAllThat(oldPortList, nextOldPortIndex, new PortRestorer$lambda$10$Type, newPortList); $addAll_5(castTo($get_1(this$static.targetAreas, WEST_2, MIDDLE), 15), lNode); $addAll_5(castTo($get_1(this$static.targetAreas, WEST_2, END_0), 15), lNode); } function $restorePorts_0(this$static, slHolder){ var loops; $initTargetAreas(this$static); this$static.slLoopsByType = (loops = new ArrayListMultimap , $forEach_3(new StreamImpl(null, new Spliterators$IteratorSpliterator(slHolder.slHyperLoops, 16)), new PortRestorer$lambda$2$Type(loops)) , loops); $processOneSideLoops(this$static, castTo($getProperty(slHolder.lNode, ($clinit_LayeredOptions() , EDGE_ROUTING_SELF_LOOP_ORDERING_0)), 349)); $processTwoSideCornerLoops(this$static); $processThreeSideLoops(this$static); $processFourSideLoops(this$static); $processTwoSideOpposingLoops(this$static); $restorePorts(this$static, slHolder); $forEach_3($flatMap(new StreamImpl(null, $valuesSpliterator($values_1(this$static.targetAreas).this$01)), new PortRestorer$lambda$0$Type), new PortRestorer$lambda$1$Type); slHolder.arePortsHidden = false; this$static.slLoopsByType = null; } function PortRestorer(){ $clinit_PortRestorer(); } function lambda$12(lNode_0, lPort_1){ $clinit_PortRestorer(); $setNode(lPort_1, lNode_0); } function lambda$2_7(loops_0, slLoop_1){ $clinit_PortRestorer(); return $put(loops_0, slLoop_1.selfLoopType, slLoop_1); } function lambda$3_3(slPort1_0, slPort2_1){ $clinit_PortRestorer(); return compare_5(slPort1_0.incomingSLEdges.array.length - slPort1_0.outgoingSLEdges.array.length, slPort2_1.incomingSLEdges.array.length - slPort2_1.outgoingSLEdges.array.length); } function sortedTwoSideLoopPortSides(slLoop){ $clinit_PortRestorer(); var sides; sides = castTo($toArray_0($keySet(slLoop.slPortsBySide), initUnidimensionalArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, $intern_103, 64, 2, 0, 1)), 126); mergeSort(sides, 0, sides.length, null); if (sides[0] == ($clinit_PortSide() , NORTH_3) && sides[1] == WEST_2) { setCheck(sides, 0, WEST_2); setCheck(sides, 1, NORTH_3); } return sides; } defineClass(1798, 1, {}, PortRestorer); var ESW, NES, SWN, WNE; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortRestorer_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortRestorer', 1798); function $clinit_PortRestorer$PortSideArea(){ $clinit_PortRestorer$PortSideArea = emptyMethod; START = new PortRestorer$PortSideArea('START', 0); MIDDLE = new PortRestorer$PortSideArea('MIDDLE', 1); END_0 = new PortRestorer$PortSideArea('END', 2); } function PortRestorer$PortSideArea(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_34(name_0){ $clinit_PortRestorer$PortSideArea(); return valueOf(($clinit_PortRestorer$PortSideArea$Map() , $MAP_24), name_0); } function values_42(){ $clinit_PortRestorer$PortSideArea(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortRestorer$PortSideArea_2_classLit, 1), $intern_37, 372, 0, [START, MIDDLE, END_0]); } defineClass(372, 22, {3:1, 34:1, 22:1, 372:1}, PortRestorer$PortSideArea); var END_0, MIDDLE, START; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortRestorer$PortSideArea_2_classLit = createForEnum('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortRestorer/PortSideArea', 372, Ljava_lang_Enum_2_classLit, values_42, valueOf_34); function $clinit_PortRestorer$PortSideArea$Map(){ $clinit_PortRestorer$PortSideArea$Map = emptyMethod; $MAP_24 = createValueOfMap(($clinit_PortRestorer$PortSideArea() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortRestorer$PortSideArea_2_classLit, 1), $intern_37, 372, 0, [START, MIDDLE, END_0]))); } var $MAP_24; function PortRestorer$lambda$0$Type(){ } defineClass(1799, 1, {}, PortRestorer$lambda$0$Type); _.apply_0 = function apply_120(arg0){ return $clinit_PortRestorer() , castTo(arg0, 15).stream(); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortRestorer$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortRestorer/lambda$0$Type', 1799); function PortRestorer$lambda$1$Type(){ } defineClass(1800, 1, $intern_19, PortRestorer$lambda$1$Type); _.accept = function accept_108(arg0){ $clinit_PortRestorer(); castTo(arg0, 113).isHidden = false; } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortRestorer$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortRestorer/lambda$1$Type', 1800); function PortRestorer$lambda$10$Type(){ } defineClass(1809, 1, $intern_40, PortRestorer$lambda$10$Type); _.test_0 = function test_71(arg0){ return $clinit_PortRestorer() , castTo(arg0, 12).side == ($clinit_PortSide() , WEST_2); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortRestorer$lambda$10$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortRestorer/lambda$10$Type', 1809); function PortRestorer$lambda$11$Type(){ } defineClass(1810, 1, {}, PortRestorer$lambda$11$Type); _.apply_0 = function apply_121(arg0){ return $clinit_PortRestorer() , castTo(arg0, 113).lPort; } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortRestorer$lambda$11$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortRestorer/lambda$11$Type', 1810); function PortRestorer$lambda$12$Type(lNode_0){ this.lNode_0 = lNode_0; } defineClass(1811, 1, $intern_19, PortRestorer$lambda$12$Type); _.accept = function accept_109(arg0){ lambda$12(this.lNode_0, castTo(arg0, 12)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortRestorer$lambda$12$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortRestorer/lambda$12$Type', 1811); function PortRestorer$lambda$2$Type(loops_0){ this.loops_0 = loops_0; } defineClass(1801, 1, $intern_19, PortRestorer$lambda$2$Type); _.accept = function accept_110(arg0){ lambda$2_7(this.loops_0, castTo(arg0, 105)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortRestorer$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortRestorer/lambda$2$Type', 1801); function PortRestorer$lambda$3$Type(){ } defineClass(1802, 1, $intern_88, PortRestorer$lambda$3$Type); _.compare_1 = function compare_54(arg0, arg1){ return lambda$3_3(castTo(arg0, 113), castTo(arg1, 113)); } ; _.equals_0 = function equals_135(other){ return this === other; } ; _.reversed = function reversed_46(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortRestorer$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortRestorer/lambda$3$Type', 1802); function PortRestorer$lambda$4$Type(){ } defineClass(1803, 1, $intern_40, PortRestorer$lambda$4$Type); _.test_0 = function test_72(arg0){ return $clinit_PortRestorer() , castTo(arg0, 113).isHidden; } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortRestorer$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortRestorer/lambda$4$Type', 1803); function PortRestorer$lambda$5$Type(){ } defineClass(1804, 1, $intern_40, PortRestorer$lambda$5$Type); _.test_0 = function test_73(arg0){ return $lambda$5(castTo(arg0, 12)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortRestorer$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortRestorer/lambda$5$Type', 1804); function PortRestorer$lambda$6$Type(){ } defineClass(1805, 1, $intern_40, PortRestorer$lambda$6$Type); _.test_0 = function test_74(arg0){ return $clinit_PortRestorer() , castTo(arg0, 12).side == ($clinit_PortSide() , NORTH_3); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortRestorer$lambda$6$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortRestorer/lambda$6$Type', 1805); function PortRestorer$lambda$7$Type(){ } defineClass(1806, 1, $intern_40, PortRestorer$lambda$7$Type); _.test_0 = function test_75(arg0){ return $clinit_PortRestorer() , castTo(arg0, 12).side == ($clinit_PortSide() , EAST_2); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortRestorer$lambda$7$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortRestorer/lambda$7$Type', 1806); function PortRestorer$lambda$8$Type(){ } defineClass(1807, 1, $intern_40, PortRestorer$lambda$8$Type); _.test_0 = function test_76(arg0){ return $lambda$8(castTo(arg0, 12)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortRestorer$lambda$8$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortRestorer/lambda$8$Type', 1807); function PortRestorer$lambda$9$Type(){ } defineClass(1808, 1, $intern_40, PortRestorer$lambda$9$Type); _.test_0 = function test_77(arg0){ return $clinit_PortRestorer() , castTo(arg0, 12).side == ($clinit_PortSide() , SOUTH_2); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortRestorer$lambda$9$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortRestorer/lambda$9$Type', 1808); function $assignPortSides(slHolder){ switch (castTo($getProperty(slHolder.lNode, ($clinit_LayeredOptions() , EDGE_ROUTING_SELF_LOOP_DISTRIBUTION_0)), 387).ordinal) { case 1: $forEach_3($map($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(slHolder.slHyperLoops, 16)), new PortSideAssigner$lambda$1$Type), new PortSideAssigner$lambda$2$Type), new PortSideAssigner$lambda$3$Type); break; case 2: $assignToNorthOrSouthSide(slHolder); break; case 0: $assignToAllSides(slHolder); } } function $assignToAllSides(slHolder){ var assignmentTargets, currLoop, currTarget, slLoop, slLoop$iterator, slSortedLoops; slSortedLoops = new ArrayList_1(slHolder.slHyperLoops); $sort(slSortedLoops, new PortSideAssigner$lambda$6$Type); assignmentTargets = ($clinit_PortSideAssigner$Target() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortSideAssigner$Target_2_classLit, 1), $intern_37, 276, 0, [NORTH_1, SOUTH_1, EAST_1, WEST_1, NORTH_WEST_CORNER, NORTH_EAST_CORNER, SOUTH_WEST_CORNER, SOUTH_EAST_CORNER])); currLoop = 0; for (slLoop$iterator = new ArrayList$1(slSortedLoops); slLoop$iterator.i < slLoop$iterator.this$01.array.length;) { slLoop = castTo($next_6(slLoop$iterator), 105); currTarget = assignmentTargets[currLoop % assignmentTargets.length]; $assignToTarget(slLoop, currTarget); ++currLoop; } } function $assignToNorthOrSouthSide(slHolder){ var finalNewPortSide, newPortSide, northPorts, slHiddenPorts, slLoop, slLoop$iterator, southPorts; northPorts = 0; southPorts = 0; for (slLoop$iterator = new ArrayList$1(slHolder.slHyperLoops); slLoop$iterator.i < slLoop$iterator.this$01.array.length;) { slLoop = castTo($next_6(slLoop$iterator), 105); slHiddenPorts = castTo($collect_1($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(slLoop.slPorts, 16)), new PortSideAssigner$lambda$8$Type), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , IDENTITY_FINISH)]))), 15); newPortSide = null; if (northPorts <= southPorts) { newPortSide = ($clinit_PortSide() , NORTH_3); northPorts += slHiddenPorts.size_1(); } else if (southPorts < northPorts) { newPortSide = ($clinit_PortSide() , SOUTH_2); southPorts += slHiddenPorts.size_1(); } finalNewPortSide = newPortSide; $forEach_3($map(slHiddenPorts.stream(), new PortSideAssigner$lambda$4$Type), new PortSideAssigner$lambda$5$Type(finalNewPortSide)); } } function $assignToTarget(slLoop, target){ var i, i0, secondHalfStartIndex, slPort, slPorts; slPorts = slLoop.slPorts; target.firstSide != target.secondSide && $sort(slPorts, new PortSideAssigner$lambda$7$Type); secondHalfStartIndex = slPorts.array.length / 2 | 0; for (i0 = 0; i0 < secondHalfStartIndex; i0++) { slPort = (checkCriticalElementIndex(i0, slPorts.array.length) , castTo(slPorts.array[i0], 113)); slPort.isHidden && $setSide(slPort.lPort, target.firstSide); } for (i = secondHalfStartIndex; i < slPorts.array.length; i++) { slPort = (checkCriticalElementIndex(i, slPorts.array.length) , castTo(slPorts.array[i], 113)); slPort.isHidden && $setSide(slPort.lPort, target.secondSide); } } function lambda$5_2(finalNewPortSide_0, lPort_1){ $setSide(lPort_1, finalNewPortSide_0); } function lambda$6_0(slLoop1_0, slLoop2_1){ return compare_5(slLoop2_1.slPorts.array.length, slLoop1_0.slPorts.array.length); } function lambda$7_2(slPort1_0, slPort2_1){ return compare_5($getNetFlow(slPort1_0.lPort), $getNetFlow(slPort2_1.lPort)); } function $clinit_PortSideAssigner$Target(){ $clinit_PortSideAssigner$Target = emptyMethod; NORTH_1 = new PortSideAssigner$Target('NORTH', 0, ($clinit_PortSide() , NORTH_3), NORTH_3); SOUTH_1 = new PortSideAssigner$Target('SOUTH', 1, SOUTH_2, SOUTH_2); EAST_1 = new PortSideAssigner$Target('EAST', 2, EAST_2, EAST_2); WEST_1 = new PortSideAssigner$Target('WEST', 3, WEST_2, WEST_2); NORTH_WEST_CORNER = new PortSideAssigner$Target('NORTH_WEST_CORNER', 4, WEST_2, NORTH_3); NORTH_EAST_CORNER = new PortSideAssigner$Target('NORTH_EAST_CORNER', 5, NORTH_3, EAST_2); SOUTH_WEST_CORNER = new PortSideAssigner$Target('SOUTH_WEST_CORNER', 6, SOUTH_2, WEST_2); SOUTH_EAST_CORNER = new PortSideAssigner$Target('SOUTH_EAST_CORNER', 7, EAST_2, SOUTH_2); } function PortSideAssigner$Target(enum$name, enum$ordinal, firstSide, secondSide){ Enum.call(this, enum$name, enum$ordinal); this.firstSide = firstSide; this.secondSide = secondSide; } function valueOf_35(name_0){ $clinit_PortSideAssigner$Target(); return valueOf(($clinit_PortSideAssigner$Target$Map() , $MAP_25), name_0); } function values_43(){ $clinit_PortSideAssigner$Target(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortSideAssigner$Target_2_classLit, 1), $intern_37, 276, 0, [NORTH_1, SOUTH_1, EAST_1, WEST_1, NORTH_WEST_CORNER, NORTH_EAST_CORNER, SOUTH_WEST_CORNER, SOUTH_EAST_CORNER]); } defineClass(276, 22, {3:1, 34:1, 22:1, 276:1}, PortSideAssigner$Target); var EAST_1, NORTH_1, NORTH_EAST_CORNER, NORTH_WEST_CORNER, SOUTH_1, SOUTH_EAST_CORNER, SOUTH_WEST_CORNER, WEST_1; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortSideAssigner$Target_2_classLit = createForEnum('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortSideAssigner/Target', 276, Ljava_lang_Enum_2_classLit, values_43, valueOf_35); function $clinit_PortSideAssigner$Target$Map(){ $clinit_PortSideAssigner$Target$Map = emptyMethod; $MAP_25 = createValueOfMap(($clinit_PortSideAssigner$Target() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortSideAssigner$Target_2_classLit, 1), $intern_37, 276, 0, [NORTH_1, SOUTH_1, EAST_1, WEST_1, NORTH_WEST_CORNER, NORTH_EAST_CORNER, SOUTH_WEST_CORNER, SOUTH_EAST_CORNER]))); } var $MAP_25; function PortSideAssigner$lambda$1$Type(){ } defineClass(1791, 1, {}, PortSideAssigner$lambda$1$Type); _.apply_0 = function apply_122(arg0){ return $filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 105).slPorts, 16)), new PortSideAssigner$lambda$8$Type); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortSideAssigner$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortSideAssigner/lambda$1$Type', 1791); function PortSideAssigner$lambda$2$Type(){ } defineClass(1792, 1, {}, PortSideAssigner$lambda$2$Type); _.apply_0 = function apply_123(arg0){ return castTo(arg0, 113).lPort; } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortSideAssigner$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortSideAssigner/lambda$2$Type', 1792); function PortSideAssigner$lambda$3$Type(){ } defineClass(1793, 1, $intern_19, PortSideAssigner$lambda$3$Type); _.accept = function accept_111(arg0){ $setSide(castTo(arg0, 12), ($clinit_PortSide() , NORTH_3)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortSideAssigner$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortSideAssigner/lambda$3$Type', 1793); function PortSideAssigner$lambda$4$Type(){ } defineClass(1794, 1, {}, PortSideAssigner$lambda$4$Type); _.apply_0 = function apply_124(arg0){ return castTo(arg0, 113).lPort; } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortSideAssigner$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortSideAssigner/lambda$4$Type', 1794); function PortSideAssigner$lambda$5$Type(finalNewPortSide_0){ this.finalNewPortSide_0 = finalNewPortSide_0; } defineClass(1795, 1, $intern_19, PortSideAssigner$lambda$5$Type); _.accept = function accept_112(arg0){ lambda$5_2(this.finalNewPortSide_0, castTo(arg0, 12)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortSideAssigner$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortSideAssigner/lambda$5$Type', 1795); function PortSideAssigner$lambda$6$Type(){ } defineClass(1796, 1, $intern_88, PortSideAssigner$lambda$6$Type); _.compare_1 = function compare_55(arg0, arg1){ return lambda$6_0(castTo(arg0, 105), castTo(arg1, 105)); } ; _.equals_0 = function equals_136(other){ return this === other; } ; _.reversed = function reversed_47(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortSideAssigner$lambda$6$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortSideAssigner/lambda$6$Type', 1796); function PortSideAssigner$lambda$7$Type(){ } defineClass(1797, 1, $intern_88, PortSideAssigner$lambda$7$Type); _.compare_1 = function compare_56(arg0, arg1){ return lambda$7_2(castTo(arg0, 113), castTo(arg1, 113)); } ; _.equals_0 = function equals_137(other){ return this === other; } ; _.reversed = function reversed_48(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortSideAssigner$lambda$7$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortSideAssigner/lambda$7$Type', 1797); function PortSideAssigner$lambda$8$Type(){ } defineClass(820, 1, $intern_40, PortSideAssigner$lambda$8$Type); _.test_0 = function test_78(arg0){ return castTo(arg0, 113).isHidden; } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_ordering_PortSideAssigner$lambda$8$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.ordering', 'PortSideAssigner/lambda$8$Type', 820); defineClass(2108, 1, {}); var Lorg_eclipse_elk_alg_layered_intermediate_loops_routing_AbstractSelfLoopRouter_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.routing', 'AbstractSelfLoopRouter', 2108); function $assignOneSidedSequencedSideAndAlignment(slLoops, portSide){ var id_0, lPort, lPort$iterator, leftLoopAlignmentReference, leftSlLoop, leftSlLoopIdx, rightLoopAlignmentReference, rightSlLoop, rightSlLoopIdx; id_0 = 0; for (lPort$iterator = new ArrayList$1((checkCriticalElementIndex(0, slLoops.array.length) , castTo(slLoops.array[0], 105)).slHolder.lNode.ports); lPort$iterator.i < lPort$iterator.this$01.array.length;) { lPort = castTo($next_6(lPort$iterator), 12); lPort.id_0 = id_0++; } portSide == ($clinit_PortSide() , NORTH_3)?$sort(slLoops, new LabelPlacer$lambda$0$Type_0):$sort(slLoops, new LabelPlacer$lambda$1$Type_0); leftSlLoopIdx = 0; rightSlLoopIdx = slLoops.array.length - 1; while (leftSlLoopIdx < rightSlLoopIdx) { leftSlLoop = (checkCriticalElementIndex(leftSlLoopIdx, slLoops.array.length) , castTo(slLoops.array[leftSlLoopIdx], 105)); rightSlLoop = (checkCriticalElementIndex(rightSlLoopIdx, slLoops.array.length) , castTo(slLoops.array[rightSlLoopIdx], 105)); leftLoopAlignmentReference = portSide == NORTH_3?leftSlLoop.rightmostPort:leftSlLoop.leftmostPort; rightLoopAlignmentReference = portSide == NORTH_3?rightSlLoop.leftmostPort:rightSlLoop.rightmostPort; $assignSideAndAlignment(leftSlLoop, portSide, ($clinit_SelfHyperLoopLabels$Alignment() , RIGHT_1), leftLoopAlignmentReference); $assignSideAndAlignment(rightSlLoop, portSide, LEFT_1, rightLoopAlignmentReference); ++leftSlLoopIdx; --rightSlLoopIdx; } leftSlLoopIdx == rightSlLoopIdx && $assignSideAndAlignment((checkCriticalElementIndex(leftSlLoopIdx, slLoops.array.length) , castTo(slLoops.array[leftSlLoopIdx], 105)), portSide, ($clinit_SelfHyperLoopLabels$Alignment() , CENTER_2), null); } function $assignOneSidedSimpleSideAndAlignment(slLoop, loopSide){ var topmostPort; switch (loopSide.ordinal) { case 2: case 4: topmostPort = slLoop.leftmostPort; slLoop.rightmostPort.lPort.pos.y_0 < topmostPort.lPort.pos.y_0 && (topmostPort = slLoop.rightmostPort); $assignSideAndAlignment(slLoop, loopSide, ($clinit_SelfHyperLoopLabels$Alignment() , TOP_0), topmostPort); break; case 1: case 3: $assignSideAndAlignment(slLoop, loopSide, ($clinit_SelfHyperLoopLabels$Alignment() , CENTER_2), null); } } function $assignSideAndAlignment(slLoop, side, alignment, alignmentReference){ var slLabels; slLabels = slLoop.slLabels; slLabels.side = side; slLabels.alignment = alignment; slLabels.alignmentReferenceSLPort = alignmentReference; } function $assignSideAndAlignment_0(slHolder){ var loopSide, northernOneSidedSLLoops, occupiedSides, orderingStrategy, slLabels, slLoop, slLoop$iterator, southernOneSidedSLLoops, leftmostPortSide, rightmostPortSide, leftmostPortSide_0, rightmostPortSide_0; northernOneSidedSLLoops = null; southernOneSidedSLLoops = null; orderingStrategy = castTo($getProperty(slHolder.lNode, ($clinit_LayeredOptions() , EDGE_ROUTING_SELF_LOOP_ORDERING_0)), 349); if (orderingStrategy == ($clinit_SelfLoopOrderingStrategy() , SEQUENCED)) { northernOneSidedSLLoops = new ArrayList; southernOneSidedSLLoops = new ArrayList; } for (slLoop$iterator = new ArrayList$1(slHolder.slHyperLoops); slLoop$iterator.i < slLoop$iterator.this$01.array.length;) { slLoop = castTo($next_6(slLoop$iterator), 105); slLabels = slLoop.slLabels; if (!slLabels) { continue; } switch (slLoop.selfLoopType.ordinal) { case 0: loopSide = castTo($next_7(new EnumSet$EnumSetImpl$IteratorImpl(slLoop.occupiedPortSides)), 64); orderingStrategy == SEQUENCED && loopSide == ($clinit_PortSide() , NORTH_3)?(push_1(northernOneSidedSLLoops.array, slLoop) , true):orderingStrategy == SEQUENCED && loopSide == ($clinit_PortSide() , SOUTH_2)?(push_1(southernOneSidedSLLoops.array, slLoop) , true):$assignOneSidedSimpleSideAndAlignment(slLoop, loopSide); break; case 1: leftmostPortSide = slLoop.leftmostPort.lPort.side; rightmostPortSide = slLoop.rightmostPort.lPort.side; leftmostPortSide == ($clinit_PortSide() , NORTH_3)?$assignSideAndAlignment(slLoop, NORTH_3, ($clinit_SelfHyperLoopLabels$Alignment() , LEFT_1), slLoop.leftmostPort):rightmostPortSide == NORTH_3?$assignSideAndAlignment(slLoop, NORTH_3, ($clinit_SelfHyperLoopLabels$Alignment() , RIGHT_1), slLoop.rightmostPort):leftmostPortSide == SOUTH_2?$assignSideAndAlignment(slLoop, SOUTH_2, ($clinit_SelfHyperLoopLabels$Alignment() , RIGHT_1), slLoop.leftmostPort):rightmostPortSide == SOUTH_2 && $assignSideAndAlignment(slLoop, SOUTH_2, ($clinit_SelfHyperLoopLabels$Alignment() , LEFT_1), slLoop.rightmostPort); break; case 2: case 3: occupiedSides = slLoop.occupiedPortSides; $containsEnum(occupiedSides, ($clinit_PortSide() , NORTH_3))?$containsEnum(occupiedSides, SOUTH_2)?$containsEnum(occupiedSides, WEST_2)?$containsEnum(occupiedSides, EAST_2) || $assignSideAndAlignment(slLoop, NORTH_3, ($clinit_SelfHyperLoopLabels$Alignment() , RIGHT_1), slLoop.rightmostPort):$assignSideAndAlignment(slLoop, NORTH_3, ($clinit_SelfHyperLoopLabels$Alignment() , LEFT_1), slLoop.leftmostPort):$assignSideAndAlignment(slLoop, NORTH_3, ($clinit_SelfHyperLoopLabels$Alignment() , CENTER_2), null):$assignSideAndAlignment(slLoop, SOUTH_2, ($clinit_SelfHyperLoopLabels$Alignment() , CENTER_2), null); break; case 4: leftmostPortSide_0 = slLoop.leftmostPort.lPort.side; rightmostPortSide_0 = slLoop.leftmostPort.lPort.side; leftmostPortSide_0 == ($clinit_PortSide() , NORTH_3) || rightmostPortSide_0 == NORTH_3?$assignSideAndAlignment(slLoop, SOUTH_2, ($clinit_SelfHyperLoopLabels$Alignment() , CENTER_2), null):$assignSideAndAlignment(slLoop, NORTH_3, ($clinit_SelfHyperLoopLabels$Alignment() , CENTER_2), null); } } if (northernOneSidedSLLoops) { northernOneSidedSLLoops.array.length == 0 || $assignOneSidedSequencedSideAndAlignment(northernOneSidedSLLoops, ($clinit_PortSide() , NORTH_3)); southernOneSidedSLLoops.array.length == 0 || $assignOneSidedSequencedSideAndAlignment(southernOneSidedSLLoops, ($clinit_PortSide() , SOUTH_2)); } } function $computeCoordinates(slLoop){ var alignRef, pos, size_0, slLabels; slLabels = slLoop.slLabels; alignRef = slLabels.alignmentReferenceSLPort; size_0 = slLabels.size_0; pos = slLabels.position; switch (slLabels.alignment.ordinal) { case 0: pos.x_0 = (slLoop.slHolder.lNode.size_0.x_0 - size_0.x_0) / 2; break; case 1: pos.x_0 = alignRef.lPort.pos.x_0 + alignRef.lPort.anchor.x_0; break; case 2: pos.x_0 = alignRef.lPort.pos.x_0 + alignRef.lPort.anchor.x_0 - size_0.x_0; break; case 3: pos.y_0 = alignRef.lPort.pos.y_0 + alignRef.lPort.anchor.y_0; } } function $placeLabels_1(slHolder){ var slLoop, slLoop$iterator; $assignSideAndAlignment_0(slHolder); for (slLoop$iterator = new ArrayList$1(slHolder.slHyperLoops); slLoop$iterator.i < slLoop$iterator.this$01.array.length;) { slLoop = castTo($next_6(slLoop$iterator), 105); !!slLoop.slLabels && $computeCoordinates(slLoop); } } function lambda$0_27(slLoop1_0, slLoop2_1){ return compare_5(slLoop1_0.leftmostPort.lPort.id_0, slLoop2_1.leftmostPort.lPort.id_0); } function lambda$1_14(slLoop1_0, slLoop2_1){ return compare_5(slLoop2_1.leftmostPort.lPort.id_0, slLoop1_0.leftmostPort.lPort.id_0); } function LabelPlacer$lambda$0$Type_0(){ } defineClass(1816, 1, $intern_88, LabelPlacer$lambda$0$Type_0); _.compare_1 = function compare_57(arg0, arg1){ return lambda$0_27(castTo(arg0, 105), castTo(arg1, 105)); } ; _.equals_0 = function equals_138(other){ return this === other; } ; _.reversed = function reversed_49(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_routing_LabelPlacer$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.routing', 'LabelPlacer/lambda$0$Type', 1816); function LabelPlacer$lambda$1$Type_0(){ } defineClass(1817, 1, $intern_88, LabelPlacer$lambda$1$Type_0); _.compare_1 = function compare_58(arg0, arg1){ return lambda$1_14(castTo(arg0, 105), castTo(arg1, 105)); } ; _.equals_0 = function equals_139(other){ return this === other; } ; _.reversed = function reversed_50(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_routing_LabelPlacer$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.routing', 'LabelPlacer/lambda$1$Type', 1817); function $addCornerBendPoints(slEdge, routingDirection, routingSlotPositions, bendPoints){ var currPortSide, currPortSideComponent, lSourcePort, lTargetPort, nextPortSide, nextPortSideComponent, slLoop; lSourcePort = slEdge.slSource.lPort; lTargetPort = slEdge.slTarget.lPort; if (lSourcePort.side == lTargetPort.side) { return; } slLoop = slEdge.slHyperLoop; currPortSide = lSourcePort.side; nextPortSide = null; while (currPortSide != lTargetPort.side) { nextPortSide = routingDirection == 0?$right(currPortSide):$left(currPortSide); currPortSideComponent = $getBaseVector(currPortSide, slLoop.routingSlot[currPortSide.ordinal], routingSlotPositions); nextPortSideComponent = $getBaseVector(nextPortSide, slLoop.routingSlot[nextPortSide.ordinal], routingSlotPositions); $add_7(bendPoints, $add_19(currPortSideComponent, nextPortSideComponent)); currPortSide = nextPortSide; } } function $addOuterBendPoint(slEdge, slPort, routingSlotPositions, bendPoints){ var anchor, lPort, portSide, result, slLoop; slLoop = slEdge.slHyperLoop; lPort = slPort.lPort; portSide = lPort.side; result = $getBaseVector(portSide, slLoop.routingSlot[portSide.ordinal], routingSlotPositions); anchor = $add_19($clone_1(lPort.pos), lPort.anchor); switch (lPort.side.ordinal) { case 1: case 3: result.x_0 += anchor.x_0; break; case 2: case 4: result.y_0 += anchor.y_0; } $addNode_0(bendPoints, result, bendPoints.tail.prev, bendPoints.tail); } function $computeBaselinePosition(slHolder, portSide, nodeSelfLoopDistance){ var lMargins, lNode; lNode = slHolder.lNode; lMargins = lNode.margin; switch (portSide.ordinal) { case 1: return -lMargins.top_0 - nodeSelfLoopDistance; case 2: return lNode.size_0.x_0 + lMargins.right + nodeSelfLoopDistance; case 3: return lNode.size_0.y_0 + lMargins.bottom + nodeSelfLoopDistance; case 4: return -lMargins.left - nodeSelfLoopDistance; default:return -1; } } function $computeEdgeRoutingDirection(slEdge){ var slLoop, sourceLPort, sourcePortSide, targetLPort, targetPortSide; sourceLPort = slEdge.slSource.lPort; sourcePortSide = sourceLPort.side; targetLPort = slEdge.slTarget.lPort; targetPortSide = targetLPort.side; if (sourcePortSide == targetPortSide) { return sourceLPort.id_0 < targetLPort.id_0?0:1; } else if ($right(sourcePortSide) == targetPortSide) { return 0; } else if ($left(sourcePortSide) == targetPortSide) { return 1; } else { slLoop = slEdge.slHyperLoop; return $containsEnum(slLoop.occupiedPortSides, $right(sourcePortSide))?0:1; } } function $computePositions(positions, slHolder, portSide, edgeEdgeDistance, edgeLabelDistance, nodeSelfLoopDistance){ var currPos, factor, largestLabelSize, sidePositions, slot; currPos = $computeBaselinePosition(slHolder, portSide, nodeSelfLoopDistance); factor = portSide == ($clinit_PortSide() , NORTH_3) || portSide == WEST_2?-1:1; sidePositions = positions[portSide.ordinal]; for (slot = 0; slot < sidePositions.length; slot++) { largestLabelSize = sidePositions[slot]; largestLabelSize > 0 && (largestLabelSize += edgeLabelDistance); sidePositions[slot] = currPos; currPos += factor * (largestLabelSize + edgeEdgeDistance); } } function $computeRoutingSlotPositions(slHolder, edgeEdgeDistance, edgeLabelDistance, nodeSLDistance){ var portSide, portSide$array, portSide$index, portSide$max, positions; positions = initUnidimensionalArray(D_classLit, $intern_16, 109, ($clinit_PortSide() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [UNDEFINED_5, NORTH_3, EAST_2, SOUTH_2, WEST_2])).length, 0, 2); for (portSide$array = stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [UNDEFINED_5, NORTH_3, EAST_2, SOUTH_2, WEST_2]) , portSide$index = 0 , portSide$max = portSide$array.length; portSide$index < portSide$max; ++portSide$index) { portSide = portSide$array[portSide$index]; positions[portSide.ordinal] = initUnidimensionalArray(D_classLit, $intern_66, 28, slHolder.routingSlotCount[portSide.ordinal], 15, 1); } $initializeWithMaxLabelHeight(positions, slHolder, NORTH_3); $initializeWithMaxLabelHeight(positions, slHolder, SOUTH_2); $computePositions(positions, slHolder, NORTH_3, edgeEdgeDistance, edgeLabelDistance, nodeSLDistance); $computePositions(positions, slHolder, EAST_2, edgeEdgeDistance, edgeLabelDistance, nodeSLDistance); $computePositions(positions, slHolder, SOUTH_2, edgeEdgeDistance, edgeLabelDistance, nodeSLDistance); $computePositions(positions, slHolder, WEST_2, edgeEdgeDistance, edgeLabelDistance, nodeSLDistance); return positions; } function $getBaseVector(portSide, routingSlot, routingSlotPositions){ var position; position = routingSlotPositions[portSide.ordinal][routingSlot]; switch (portSide.ordinal) { case 1: case 3: return new KVector_1(0, position); case 2: case 4: return new KVector_1(position, 0); default:return null; } } function $initializeWithMaxLabelHeight(positions, slHolder, portSide){ var routingSlot, sidePositions, slLabels, slLoop, slLoop$iterator; sidePositions = positions[portSide.ordinal]; for (slLoop$iterator = new ArrayList$1(slHolder.slHyperLoops); slLoop$iterator.i < slLoop$iterator.this$01.array.length;) { slLoop = castTo($next_6(slLoop$iterator), 105); slLabels = slLoop.slLabels; if (!!slLabels && slLabels.side == portSide) { routingSlot = slLoop.routingSlot[portSide.ordinal]; sidePositions[routingSlot] = $wnd.Math.max(sidePositions[routingSlot], slLabels.size_0.y_0); } } } function $placeLabels_2(slLoop, slLabels, routingSlotPositions, edgeLabelDistance){ var labelPosition, labelSide; labelSide = slLabels.side; labelPosition = routingSlotPositions[labelSide.ordinal][slLoop.routingSlot[labelSide.ordinal]]; switch (labelSide.ordinal) { case 1: labelPosition -= edgeLabelDistance + slLabels.size_0.y_0; slLabels.position.y_0 = labelPosition; break; case 3: labelPosition += edgeLabelDistance; slLabels.position.y_0 = labelPosition; break; case 4: labelPosition -= edgeLabelDistance + slLabels.size_0.x_0; slLabels.position.x_0 = labelPosition; break; case 2: labelPosition += edgeLabelDistance; slLabels.position.x_0 = labelPosition; } } function $routeSelfLoops(this$static, slHolder){ var bendPoints, edgeEdgeDistance, edgeLabelDistance, lEdge, lNode, newNodeMargins, nodeMargins, nodeSLDistance, nodeSize, routingDirection, routingSlotPositions, slEdge, slEdge$iterator, slLabels, slLoop, slLoop$iterator, bendPoints_0, pos; lNode = slHolder.lNode; nodeSize = lNode.size_0; nodeMargins = lNode.margin; edgeEdgeDistance = $doubleValue(castToDouble(getIndividualOrInherited(lNode, ($clinit_LayeredOptions() , SPACING_EDGE_EDGE)))); edgeLabelDistance = $doubleValue(castToDouble(getIndividualOrInherited(lNode, SPACING_EDGE_LABEL_0))); nodeSLDistance = $doubleValue(castToDouble(getIndividualOrInherited(lNode, SPACING_NODE_SELF_LOOP))); newNodeMargins = new LMargin; $set_6(newNodeMargins, nodeMargins.top_0, nodeMargins.right, nodeMargins.bottom, nodeMargins.left); routingSlotPositions = $computeRoutingSlotPositions(slHolder, edgeEdgeDistance, edgeLabelDistance, nodeSLDistance); for (slLoop$iterator = new ArrayList$1(slHolder.slHyperLoops); slLoop$iterator.i < slLoop$iterator.this$01.array.length;) { slLoop = castTo($next_6(slLoop$iterator), 105); for (slEdge$iterator = slLoop.slEdges.map_0.keySet_0().iterator_0(); slEdge$iterator.hasNext_0();) { slEdge = castTo(slEdge$iterator.next_1(), 340); lEdge = slEdge.lEdge; routingDirection = $computeEdgeRoutingDirection(slEdge); bendPoints = (bendPoints_0 = new KVectorChain , $addOuterBendPoint(slEdge, slEdge.slSource, routingSlotPositions, bendPoints_0) , $addCornerBendPoints(slEdge, routingDirection, routingSlotPositions, bendPoints_0) , $addOuterBendPoint(slEdge, slEdge.slTarget, routingSlotPositions, bendPoints_0) , bendPoints_0); bendPoints = this$static.modifyBendPoints(slEdge, routingDirection, bendPoints); $reset_0(lEdge.bendPoints); $addAll(lEdge.bendPoints, bendPoints); $forEach_3(new StreamImpl(null, new Spliterators$IteratorSpliterator(bendPoints, 16)), new OrthogonalSelfLoopRouter$lambda$0$Type(nodeSize, newNodeMargins)); } slLabels = slLoop.slLabels; if (slLabels) { $placeLabels_2(slLoop, slLabels, routingSlotPositions, edgeLabelDistance); pos = new KVector_2(slLabels.position); $updateNewNodeMargins(nodeSize, newNodeMargins, pos); $add_19(pos, slLabels.size_0); $updateNewNodeMargins(nodeSize, newNodeMargins, pos); } } $set_6(nodeMargins, newNodeMargins.top_0, newNodeMargins.right, newNodeMargins.bottom, newNodeMargins.left); } function $updateNewNodeMargins(nodeSize, newNodeMargins, bendPoint){ newNodeMargins.left = $wnd.Math.max(newNodeMargins.left, -bendPoint.x_0); newNodeMargins.right = $wnd.Math.max(newNodeMargins.right, bendPoint.x_0 - nodeSize.x_0); newNodeMargins.top_0 = $wnd.Math.max(newNodeMargins.top_0, -bendPoint.y_0); newNodeMargins.bottom = $wnd.Math.max(newNodeMargins.bottom, bendPoint.y_0 - nodeSize.y_0); } function OrthogonalSelfLoopRouter(){ } defineClass(1856, 2108, {}, OrthogonalSelfLoopRouter); _.modifyBendPoints = function modifyBendPoints(slEdge, routingDirection, bendPoints){ return bendPoints; } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_routing_OrthogonalSelfLoopRouter_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.routing', 'OrthogonalSelfLoopRouter', 1856); function OrthogonalSelfLoopRouter$lambda$0$Type(nodeSize_1, newNodeMargins_2){ this.nodeSize_1 = nodeSize_1; this.newNodeMargins_2 = newNodeMargins_2; } defineClass(1858, 1, $intern_19, OrthogonalSelfLoopRouter$lambda$0$Type); _.accept = function accept_113(arg0){ $updateNewNodeMargins(this.nodeSize_1, this.newNodeMargins_2, castTo(arg0, 8)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_routing_OrthogonalSelfLoopRouter$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.routing', 'OrthogonalSelfLoopRouter/lambda$0$Type', 1858); function $cutCorners(bendPoints){ var bpIterator, corner, effectiveDistance, next, offset1, offset2, previous, result; result = new KVectorChain; bpIterator = $listIterator_2(bendPoints, 0); previous = null; corner = castTo($next_9(bpIterator), 8); next = castTo($next_9(bpIterator), 8); while (bpIterator.currentNode != bpIterator.this$01.tail) { previous = corner; corner = next; next = castTo($next_9(bpIterator), 8); offset1 = $nearZeroToZero($sub_0(new KVector_1(previous.x_0, previous.y_0), corner)); offset2 = $nearZeroToZero($sub_0(new KVector_1(next.x_0, next.y_0), corner)); effectiveDistance = 10; effectiveDistance = $wnd.Math.min(effectiveDistance, $wnd.Math.abs(offset1.x_0 + offset1.y_0) / 2); effectiveDistance = $wnd.Math.min(effectiveDistance, $wnd.Math.abs(offset2.x_0 + offset2.y_0) / 2); offset1.x_0 = signum(offset1.x_0) * effectiveDistance; offset1.y_0 = signum(offset1.y_0) * effectiveDistance; offset2.x_0 = signum(offset2.x_0) * effectiveDistance; offset2.y_0 = signum(offset2.y_0) * effectiveDistance; $add_7(result, $add_19(offset1, corner)); $add_7(result, $add_19(offset2, corner)); } return result; } function $nearZeroToZero(vector){ vector.x_0 >= -0.01 && vector.x_0 <= $intern_94 && (vector.x_0 = 0); vector.y_0 >= -0.01 && vector.y_0 <= $intern_94 && (vector.y_0 = 0); return vector; } function PolylineSelfLoopRouter(){ } defineClass(1857, 1856, {}, PolylineSelfLoopRouter); _.modifyBendPoints = function modifyBendPoints_0(slEdge, routingDirection, bendPoints){ var lSourcePort, lTargetPort; lSourcePort = slEdge.slSource.lPort; $add_0(bendPoints, 0, $add_19($clone_1(lSourcePort.pos), lSourcePort.anchor)); lTargetPort = slEdge.slTarget.lPort; $add_7(bendPoints, $add_19($clone_1(lTargetPort.pos), lTargetPort.anchor)); return $cutCorners(bendPoints); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_routing_PolylineSelfLoopRouter_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.routing', 'PolylineSelfLoopRouter', 1857); function $clinit_RoutingDirector(){ $clinit_RoutingDirector = emptyMethod; COMPARE_BY_ID = new RoutingDirector$lambda$0$Type; } function $assignPortIds(lPorts){ var i; for (i = 0; i < lPorts.array.length; i++) { (checkCriticalElementIndex(i, lPorts.array.length) , castTo(lPorts.array[i], 12)).id_0 = i; } } function $computeEdgePenalty(this$static, slHolder, leftmostPort, rightmostPort){ var leftOfRightmostPortId, leftmostPortId, portCount, rightmostPortId; this$static.portPenalties == null && $computePenalties(this$static, slHolder); portCount = slHolder.lNode.ports.array.length; leftmostPortId = leftmostPort.lPort.id_0; rightmostPortId = rightmostPort.lPort.id_0; leftOfRightmostPortId = rightmostPortId - 1; leftOfRightmostPortId < 0 && (leftOfRightmostPortId = portCount - 1); return leftmostPortId <= leftOfRightmostPortId?this$static.portPenalties[leftOfRightmostPortId] - this$static.portPenalties[leftmostPortId]:this$static.portPenalties[portCount - 1] - this$static.portPenalties[leftmostPortId] + this$static.portPenalties[leftOfRightmostPortId]; } function $computeMissingPortSide(slLoop){ var side, side$array, side$index, side$max, sides; sides = $keySet(slLoop.slPortsBySide); for (side$array = ($clinit_PortSide() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [UNDEFINED_5, NORTH_3, EAST_2, SOUTH_2, WEST_2])) , side$index = 0 , side$max = side$array.length; side$index < side$max; ++side$index) { side = side$array[side$index]; if (side != UNDEFINED_5 && !sides.contains(side)) { return side; } } return null; } function $computeOccupiedPortSides(slLoop){ var currPortSide, targetSide; currPortSide = slLoop.leftmostPort.lPort.side; targetSide = slLoop.rightmostPort.lPort.side; while (currPortSide != targetSide) { $add_5(slLoop.occupiedPortSides, currPortSide); currPortSide = $right(currPortSide); } $add_5(slLoop.occupiedPortSides, currPortSide); } function $computePenalties(this$static, slHolder){ var currPort, i, penaltySum, ports; ports = slHolder.lNode.ports; this$static.portPenalties = initUnidimensionalArray(I_classLit, $intern_49, 28, ports.array.length, 15, 1); penaltySum = 0; for (i = 0; i < ports.array.length; i++) { currPort = (checkCriticalElementIndex(i, ports.array.length) , castTo(ports.array[i], 12)); currPort.incomingEdges.array.length == 0 && currPort.outgoingEdges.array.length == 0?(penaltySum += 1):(penaltySum += 3); this$static.portPenalties[i] = penaltySum; } } function $determineFourSideLoopRoutes(this$static, slLoop){ var currLeftPort, currPenalty, currRightPort, rightPortIndex, slHolder, sortedSLPorts, worstLeftPort, worstPenalty, worstRightPort; sortedSLPorts = slLoop.slPorts; slHolder = slLoop.slHolder; worstLeftPort = castTo($get_11(sortedSLPorts, sortedSLPorts.array.length - 1), 113); worstRightPort = (checkCriticalElementIndex(0, sortedSLPorts.array.length) , castTo(sortedSLPorts.array[0], 113)); worstPenalty = $computeEdgePenalty(this$static, slHolder, worstLeftPort, worstRightPort); for (rightPortIndex = 1; rightPortIndex < sortedSLPorts.array.length; rightPortIndex++) { currLeftPort = (checkCriticalElementIndex(rightPortIndex - 1, sortedSLPorts.array.length) , castTo(sortedSLPorts.array[rightPortIndex - 1], 113)); currRightPort = (checkCriticalElementIndex(rightPortIndex, sortedSLPorts.array.length) , castTo(sortedSLPorts.array[rightPortIndex], 113)); currPenalty = $computeEdgePenalty(this$static, slHolder, currLeftPort, currRightPort); if (currPenalty > worstPenalty) { worstLeftPort = currLeftPort; worstRightPort = currRightPort; worstPenalty = currPenalty; } } slLoop.leftmostPort = worstRightPort; slLoop.rightmostPort = worstLeftPort; } function $determineLoopRoutes(this$static, slHolder){ var side, sides, slLoop, slLoop$iterator; $assignPortIds(slHolder.lNode.ports); $forEach_3($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(slHolder.slHyperLoops, 16)), new RoutingDirector$lambda$1$Type), new RoutingDirector$lambda$2$Type); for (slLoop$iterator = new ArrayList$1(slHolder.slHyperLoops); slLoop$iterator.i < slLoop$iterator.this$01.array.length;) { slLoop = castTo($next_6(slLoop$iterator), 105); switch (slLoop.selfLoopType.ordinal) { case 0: side = castTo($get_11(slLoop.slPorts, 0), 113).lPort.side; $setLeftmostPort(slLoop, castTo($get_17($min_0(castTo($get(slLoop.slPortsBySide, side), 15).stream(), COMPARE_BY_ID)), 113)); $setRightmostPort(slLoop, castTo($get_17($max_1(castTo($get(slLoop.slPortsBySide, side), 15).stream(), COMPARE_BY_ID)), 113)); break; case 1: sides = sortedTwoSideLoopPortSides(slLoop); $setLeftmostPort(slLoop, castTo($get_17($min_0(castTo($get(slLoop.slPortsBySide, sides[0]), 15).stream(), COMPARE_BY_ID)), 113)); $setRightmostPort(slLoop, castTo($get_17($max_1(castTo($get(slLoop.slPortsBySide, sides[1]), 15).stream(), COMPARE_BY_ID)), 113)); break; case 2: $determineTwoSideOpposingLoopRoutes(this$static, slLoop); break; case 3: $determineThreeSideLoopRoutes(slLoop); break; case 4: $determineFourSideLoopRoutes(this$static, slLoop); } $computeOccupiedPortSides(slLoop); } this$static.portPenalties = null; } function $determineThreeSideLoopRoutes(slLoop){ var leftmostSide, rightmostSide; leftmostSide = null; rightmostSide = null; switch ($computeMissingPortSide(slLoop).ordinal) { case 1: leftmostSide = ($clinit_PortSide() , EAST_2); rightmostSide = WEST_2; break; case 2: leftmostSide = ($clinit_PortSide() , SOUTH_2); rightmostSide = NORTH_3; break; case 3: leftmostSide = ($clinit_PortSide() , WEST_2); rightmostSide = EAST_2; break; case 4: leftmostSide = ($clinit_PortSide() , NORTH_3); rightmostSide = SOUTH_2; } $setLeftmostPort(slLoop, castTo($get_17($min_0(castTo($get(slLoop.slPortsBySide, leftmostSide), 15).stream(), COMPARE_BY_ID)), 113)); $setRightmostPort(slLoop, castTo($get_17($max_1(castTo($get(slLoop.slPortsBySide, rightmostSide), 15).stream(), COMPARE_BY_ID)), 113)); } function $determineTwoSideOpposingLoopRoutes(this$static, slLoop){ var option1LeftmostPort, option1Penalty, option1RightmostPort, option2LeftmostPort, option2Penalty, option2RightmostPort, sides, slHolder; sides = castTo($toArray_0($keySet(slLoop.slPortsBySide), initUnidimensionalArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, $intern_103, 64, 2, 0, 1)), 126); slHolder = slLoop.slHolder; option1LeftmostPort = $lowestPortOnSide(slLoop, sides[0]); option1RightmostPort = $highestPortOnSide(slLoop, sides[1]); option1Penalty = $computeEdgePenalty(this$static, slHolder, option1LeftmostPort, option1RightmostPort); option2LeftmostPort = $lowestPortOnSide(slLoop, sides[1]); option2RightmostPort = $highestPortOnSide(slLoop, sides[0]); option2Penalty = $computeEdgePenalty(this$static, slHolder, option2LeftmostPort, option2RightmostPort); if (option1Penalty <= option2Penalty) { slLoop.leftmostPort = option1LeftmostPort; slLoop.rightmostPort = option1RightmostPort; } else { slLoop.leftmostPort = option2LeftmostPort; slLoop.rightmostPort = option2RightmostPort; } } function $highestPortOnSide(slLoop, side){ return castTo($get_17($max_1(castTo($get(slLoop.slPortsBySide, side), 15).stream(), COMPARE_BY_ID)), 113); } function $lowestPortOnSide(slLoop, side){ return castTo($get_17($min_0(castTo($get(slLoop.slPortsBySide, side), 15).stream(), COMPARE_BY_ID)), 113); } function RoutingDirector(){ $clinit_RoutingDirector(); } function lambda$0_28(slPort1_0, slPort2_1){ $clinit_RoutingDirector(); return compare_5(slPort1_0.lPort.id_0, slPort2_1.lPort.id_0); } defineClass(1812, 1, {}, RoutingDirector); _.portPenalties = null; var COMPARE_BY_ID; var Lorg_eclipse_elk_alg_layered_intermediate_loops_routing_RoutingDirector_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.routing', 'RoutingDirector', 1812); function RoutingDirector$lambda$0$Type(){ } defineClass(1813, 1, $intern_88, RoutingDirector$lambda$0$Type); _.compare_1 = function compare_59(arg0, arg1){ return lambda$0_28(castTo(arg0, 113), castTo(arg1, 113)); } ; _.equals_0 = function equals_140(other){ return this === other; } ; _.reversed = function reversed_51(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_routing_RoutingDirector$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.routing', 'RoutingDirector/lambda$0$Type', 1813); function RoutingDirector$lambda$1$Type(){ } defineClass(1814, 1, {}, RoutingDirector$lambda$1$Type); _.apply_0 = function apply_125(arg0){ return $clinit_RoutingDirector() , castTo(arg0, 105).slPorts; } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_routing_RoutingDirector$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.routing', 'RoutingDirector/lambda$1$Type', 1814); function RoutingDirector$lambda$2$Type(){ } defineClass(1815, 1, $intern_19, RoutingDirector$lambda$2$Type); _.accept = function accept_114(arg0){ $clinit_RoutingDirector(); castTo(arg0, 15).sort_0(COMPARE_BY_ID); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_routing_RoutingDirector$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.routing', 'RoutingDirector/lambda$2$Type', 1815); function $assignRawRoutingSlotsToLoops(this$static, slHolder){ var portSide, portSide$iterator, slLoop, slLoop$iterator, slot; for (slLoop$iterator = new ArrayList$1(slHolder.slHyperLoops); slLoop$iterator.i < slLoop$iterator.this$01.array.length;) { slLoop = castTo($next_6(slLoop$iterator), 105); slot = castTo($get_10(this$static.slLoopToSegmentMap, slLoop), 118).routingSlot; for (portSide$iterator = new EnumSet$EnumSetImpl$IteratorImpl(slLoop.occupiedPortSides); portSide$iterator.i < portSide$iterator.this$11.all.length;) { portSide = castTo($next_7(portSide$iterator), 64); $setRoutingSlot(slLoop, portSide, slot); } } } function $assignRawRoutingSlotsToSegments(this$static){ var inDependency, inDependency$iterator, nextRoutingSlot, segment, segment$iterator, sinks, sourceSegment; sinks = new LinkedList; for (segment$iterator = new ArrayList$1(this$static.hyperEdgeSegments); segment$iterator.i < segment$iterator.this$01.array.length;) { segment = castTo($next_6(segment$iterator), 118); $setInWeight(segment, segment.incomingSegmentDependencies.array.length); $setOutWeight(segment, segment.outgoingSegmentDependencies.array.length); if (segment.outDepWeight == 0) { segment.routingSlot = 0; $addNode_0(sinks, segment, sinks.tail.prev, sinks.tail); } } while (sinks.size_0 != 0) { segment = castTo(sinks.size_0 == 0?null:(checkCriticalElement(sinks.size_0 != 0) , $removeNode_0(sinks, sinks.header.next_0)), 118); nextRoutingSlot = segment.routingSlot + 1; for (inDependency$iterator = new ArrayList$1(segment.incomingSegmentDependencies); inDependency$iterator.i < inDependency$iterator.this$01.array.length;) { inDependency = castTo($next_6(inDependency$iterator), 132); sourceSegment = inDependency.source; $setRoutingSlot_0(sourceSegment, $wnd.Math.max(sourceSegment.routingSlot, nextRoutingSlot)); $setOutWeight(sourceSegment, sourceSegment.outDepWeight - 1); sourceSegment.outDepWeight == 0 && ($addNode_0(sinks, sourceSegment, sinks.tail.prev, sinks.tail) , true); } } } function $assignRoutingSlots(this$static, slHolder){ var labelCrossingMatrix, nextFreeRoutingSlotAtPort; labelCrossingMatrix = $computeLabelCrossingMatrix(slHolder); $createCrossingGraph(this$static, slHolder, labelCrossingMatrix); breakNonCriticalCycles(this$static.hyperEdgeSegments, castTo($getProperty($getGraph(slHolder.lNode), ($clinit_InternalProperties_1() , RANDOM_0)), 234)); $assignRawRoutingSlotsToSegments(this$static); $assignRawRoutingSlotsToLoops(this$static, slHolder); nextFreeRoutingSlotAtPort = initUnidimensionalArray(I_classLit, $intern_49, 28, slHolder.lNode.ports.array.length, 15, 1); $shiftTowardsNodeOnSide(this$static, slHolder, ($clinit_PortSide() , NORTH_3), nextFreeRoutingSlotAtPort, labelCrossingMatrix); $shiftTowardsNodeOnSide(this$static, slHolder, EAST_2, nextFreeRoutingSlotAtPort, labelCrossingMatrix); $shiftTowardsNodeOnSide(this$static, slHolder, SOUTH_2, nextFreeRoutingSlotAtPort, labelCrossingMatrix); $shiftTowardsNodeOnSide(this$static, slHolder, WEST_2, nextFreeRoutingSlotAtPort, labelCrossingMatrix); this$static.hyperEdgeSegments = null; this$static.slLoopToSegmentMap = null; this$static.slLoopActivityOverPorts = null; } function $computeLabelCrossingMatrix(slHolder){ var crossingMatrix, labelID, overlap, sl1Idx, sl2Idx, slLoop, slLoop$iterator, slLoop1, slLoop2, slLoops; labelID = 0; for (slLoop$iterator = new ArrayList$1(slHolder.slHyperLoops); slLoop$iterator.i < slLoop$iterator.this$01.array.length;) { slLoop = castTo($next_6(slLoop$iterator), 105); !!slLoop.slLabels && (slLoop.slLabels.id_0 = labelID++); } crossingMatrix = initMultidimensionalArray(Z_classLit, [$intern_16, $intern_91], [183, 28], 16, [labelID, labelID], 2); slLoops = slHolder.slHyperLoops; for (sl1Idx = 0; sl1Idx < slLoops.array.length; sl1Idx++) { slLoop1 = (checkCriticalElementIndex(sl1Idx, slLoops.array.length) , castTo(slLoops.array[sl1Idx], 105)); if (slLoop1.slLabels) { for (sl2Idx = sl1Idx + 1; sl2Idx < slLoops.array.length; sl2Idx++) { slLoop2 = (checkCriticalElementIndex(sl2Idx, slLoops.array.length) , castTo(slLoops.array[sl2Idx], 105)); if (slLoop2.slLabels) { overlap = $labelsOverlap(slLoop1, slLoop2); crossingMatrix[slLoop1.slLabels.id_0][slLoop2.slLabels.id_0] = overlap; crossingMatrix[slLoop2.slLabels.id_0][slLoop1.slLabels.id_0] = overlap; } } } } return crossingMatrix; } function $computeLoopActivity(this$static, slHolder){ var lPortIdx, lPortTargetIdx, lPorts, loopActivity, slLoop, slLoop$iterator, slLoops; slLoops = slHolder.slHyperLoops; lPorts = slHolder.lNode.ports; for (slLoop$iterator = new ArrayList$1(slLoops); slLoop$iterator.i < slLoop$iterator.this$01.array.length;) { slLoop = castTo($next_6(slLoop$iterator), 105); loopActivity = initUnidimensionalArray(Z_classLit, $intern_91, 28, lPorts.array.length, 16, 1); $put_6(this$static.slLoopActivityOverPorts, slLoop, loopActivity); lPortIdx = slLoop.leftmostPort.lPort.id_0 - 1; lPortTargetIdx = slLoop.rightmostPort.lPort.id_0; while (lPortIdx != lPortTargetIdx) { lPortIdx = (lPortIdx + 1) % lPorts.array.length; loopActivity[lPortIdx] = true; } } } function $countCrossings_0(this$static, slUpperLoop, slLowerLoop){ var crossings, lowerLoopActivity, slPort, slPort$iterator; lowerLoopActivity = castTo($get_10(this$static.slLoopActivityOverPorts, slLowerLoop), 183); crossings = 0; for (slPort$iterator = new ArrayList$1(slUpperLoop.slPorts); slPort$iterator.i < slPort$iterator.this$01.array.length;) { slPort = castTo($next_6(slPort$iterator), 113); lowerLoopActivity[slPort.lPort.id_0] && ++crossings; } return crossings; } function $createCrossingGraph(this$static, slHolder, labelCrossingMatrix){ var firstIdx, secondIdx, segment, slLoop, slLoop$iterator, slLoop1, slLoops; slLoops = slHolder.slHyperLoops; this$static.hyperEdgeSegments = new ArrayList_0(slLoops.array.length); this$static.slLoopToSegmentMap = new HashMap; for (slLoop$iterator = new ArrayList$1(slLoops); slLoop$iterator.i < slLoop$iterator.this$01.array.length;) { slLoop = castTo($next_6(slLoop$iterator), 105); segment = new HyperEdgeSegment(null); $add_3(this$static.hyperEdgeSegments, segment); $put_6(this$static.slLoopToSegmentMap, slLoop, segment); } this$static.slLoopActivityOverPorts = new HashMap; $computeLoopActivity(this$static, slHolder); for (firstIdx = 0; firstIdx < slLoops.array.length - 1; firstIdx++) { slLoop1 = castTo($get_11(slHolder.slHyperLoops, firstIdx), 105); for (secondIdx = firstIdx + 1; secondIdx < slLoops.array.length; secondIdx++) { $createDependencies(this$static, slLoop1, castTo($get_11(slHolder.slHyperLoops, secondIdx), 105), labelCrossingMatrix); } } } function $createDependencies(this$static, slLoop1, slLoop2, labelCrossingMatrix){ var firstAboveSecondCrossings, secondAboveFirstCrossings, segment1, segment2; firstAboveSecondCrossings = $countCrossings_0(this$static, slLoop1, slLoop2); secondAboveFirstCrossings = $countCrossings_0(this$static, slLoop2, slLoop1); segment1 = castTo($get_10(this$static.slLoopToSegmentMap, slLoop1), 118); segment2 = castTo($get_10(this$static.slLoopToSegmentMap, slLoop2), 118); if (firstAboveSecondCrossings < secondAboveFirstCrossings) { new HyperEdgeSegmentDependency(($clinit_HyperEdgeSegmentDependency$DependencyType() , REGULAR), segment1, segment2, secondAboveFirstCrossings - firstAboveSecondCrossings); } else if (secondAboveFirstCrossings < firstAboveSecondCrossings) { new HyperEdgeSegmentDependency(($clinit_HyperEdgeSegmentDependency$DependencyType() , REGULAR), segment2, segment1, firstAboveSecondCrossings - secondAboveFirstCrossings); } else if (firstAboveSecondCrossings != 0 || !(!slLoop1.slLabels || !slLoop2.slLabels) && labelCrossingMatrix[slLoop1.slLabels.id_0][slLoop2.slLabels.id_0]) { new HyperEdgeSegmentDependency(($clinit_HyperEdgeSegmentDependency$DependencyType() , REGULAR), segment1, segment2, 0); new HyperEdgeSegmentDependency(REGULAR, segment2, segment1, 0); } } function $labelsOverlap(slLoop1, slLoop2){ var end1, end2, slLabels1, slLabels2, start1, start2; slLabels1 = slLoop1.slLabels; slLabels2 = slLoop2.slLabels; if (!slLabels1 || !slLabels2) { return false; } if (slLabels1.side != slLabels2.side || slLabels1.side == ($clinit_PortSide() , EAST_2) || slLabels1.side == ($clinit_PortSide() , WEST_2)) { return false; } start1 = slLabels1.position.x_0; end1 = start1 + slLabels1.size_0.x_0; start2 = slLabels2.position.x_0; end2 = start2 + slLabels2.size_0.x_0; return start1 <= end2 && end1 >= start2; } function $shiftTowardsNodeOnSide(this$static, slHolder, side, nextFreeRoutingSlotAtPort, labelCrossingMatrix){ var activeAtPort, i, lPort, lPort$iterator, lowestAvailableSlot, maxLPortIndex, minLPortIndex, otherLabelIdx, ourLabelIdx, portIndex, portIndex0, slLoop, slLoop$iterator, slLoops, slotAssignedToLabel, slotsWithLabelConflicts; slLoops = castTo($collect_1($sorted_1($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(slHolder.slHyperLoops, 16)), new RoutingSlotAssigner$lambda$0$Type(side)), new RoutingSlotAssigner$lambda$1$Type(side)), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , IDENTITY_FINISH)]))), 15); minLPortIndex = $intern_0; maxLPortIndex = $intern_43; for (lPort$iterator = new ArrayList$1(slHolder.lNode.ports); lPort$iterator.i < lPort$iterator.this$01.array.length;) { lPort = castTo($next_6(lPort$iterator), 12); if (lPort.side == side) { minLPortIndex = $wnd.Math.min(minLPortIndex, lPort.id_0); maxLPortIndex = $wnd.Math.max(maxLPortIndex, lPort.id_0); } } if (minLPortIndex == $intern_0) { for (i = 0; i < slLoops.size_1(); i++) { $setRoutingSlot(castTo(slLoops.get_0(i), 105), side, i); } } else { slotAssignedToLabel = initUnidimensionalArray(I_classLit, $intern_49, 28, labelCrossingMatrix.length, 15, 1); fill0_1(slotAssignedToLabel, slotAssignedToLabel.length); for (slLoop$iterator = slLoops.iterator_0(); slLoop$iterator.hasNext_0();) { slLoop = castTo(slLoop$iterator.next_1(), 105); activeAtPort = castTo($get_10(this$static.slLoopActivityOverPorts, slLoop), 183); lowestAvailableSlot = 0; for (portIndex0 = minLPortIndex; portIndex0 <= maxLPortIndex; portIndex0++) { activeAtPort[portIndex0] && (lowestAvailableSlot = $wnd.Math.max(lowestAvailableSlot, nextFreeRoutingSlotAtPort[portIndex0])); } if (slLoop.slLabels) { ourLabelIdx = slLoop.slLabels.id_0; slotsWithLabelConflicts = new HashSet; for (otherLabelIdx = 0; otherLabelIdx < labelCrossingMatrix.length; otherLabelIdx++) { labelCrossingMatrix[ourLabelIdx][otherLabelIdx] && $add_6(slotsWithLabelConflicts, valueOf_3(slotAssignedToLabel[otherLabelIdx])); } while ($contains_6(slotsWithLabelConflicts, valueOf_3(lowestAvailableSlot))) { ++lowestAvailableSlot; } } $setRoutingSlot(slLoop, side, lowestAvailableSlot); for (portIndex = minLPortIndex; portIndex <= maxLPortIndex; portIndex++) { activeAtPort[portIndex] && (nextFreeRoutingSlotAtPort[portIndex] = lowestAvailableSlot + 1); } !!slLoop.slLabels && (slotAssignedToLabel[slLoop.slLabels.id_0] = lowestAvailableSlot); } } } function RoutingSlotAssigner(){ } function lambda$0_29(side_0, slLoop_1){ return $containsEnum(slLoop_1.occupiedPortSides, side_0); } function lambda$1_15(side_0, sl1_1, sl2_2){ return compare_5(sl1_1.routingSlot[side_0.ordinal], sl2_2.routingSlot[side_0.ordinal]); } defineClass(1818, 1, {}, RoutingSlotAssigner); var Lorg_eclipse_elk_alg_layered_intermediate_loops_routing_RoutingSlotAssigner_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.routing', 'RoutingSlotAssigner', 1818); function RoutingSlotAssigner$lambda$0$Type(side_0){ this.side_0 = side_0; } defineClass(1819, 1, $intern_40, RoutingSlotAssigner$lambda$0$Type); _.test_0 = function test_79(arg0){ return lambda$0_29(this.side_0, castTo(arg0, 105)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_routing_RoutingSlotAssigner$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.routing', 'RoutingSlotAssigner/lambda$0$Type', 1819); function RoutingSlotAssigner$lambda$1$Type(side_0){ this.side_0 = side_0; } defineClass(1820, 1, $intern_88, RoutingSlotAssigner$lambda$1$Type); _.compare_1 = function compare_60(arg0, arg1){ return lambda$1_15(this.side_0, castTo(arg0, 105), castTo(arg1, 105)); } ; _.equals_0 = function equals_141(other){ return this === other; } ; _.reversed = function reversed_52(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_routing_RoutingSlotAssigner$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.routing', 'RoutingSlotAssigner/lambda$1$Type', 1820); function $addSplineControlPoints(slEdge, routingDirection, orthoBendPoints, newBendPoints, edgeLabelDistance){ var currPortSide, firstBP, midBP, offset, secondBP, secondBPIndex; currPortSide = slEdge.slSource.lPort.side; firstBP = castTo($get_7(orthoBendPoints, 0), 8); for (secondBPIndex = 1; secondBPIndex < orthoBendPoints.size_0; secondBPIndex++) { secondBP = castTo($get_7(orthoBendPoints, secondBPIndex), 8); $addNode_0(newBendPoints, firstBP, newBendPoints.tail.prev, newBendPoints.tail); midBP = $scale($add_19(new KVector_2(firstBP), secondBP), 0.5); offset = $scale(new KVector_0(portSideToDirection(currPortSide)), edgeLabelDistance); $add_19(midBP, offset); $addNode_0(newBendPoints, midBP, newBendPoints.tail.prev, newBendPoints.tail); firstBP = secondBP; currPortSide = routingDirection == 0?$right(currPortSide):$left(currPortSide); } $add_7(newBendPoints, (checkCriticalElement(orthoBendPoints.size_0 != 0) , castTo(orthoBendPoints.tail.prev.value_0, 8))); } function SplineSelfLoopRouter(){ } defineClass(1859, 1856, {}, SplineSelfLoopRouter); _.modifyBendPoints = function modifyBendPoints_1(slEdge, routingDirection, bendPoints){ var edgeLabelDistance, lPort, lPort0, splineBendPoints; edgeLabelDistance = $doubleValue(castToDouble(getIndividualOrInherited(slEdge.slHyperLoop.slHolder.lNode, ($clinit_LayeredOptions() , SPACING_EDGE_LABEL_0)))); splineBendPoints = new KVectorChain_1(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [(lPort0 = slEdge.slSource.lPort , $add_19(new KVector_2(lPort0.pos), lPort0.anchor))])); $addSplineControlPoints(slEdge, routingDirection, bendPoints, splineBendPoints, edgeLabelDistance); $add_7(splineBendPoints, (lPort = slEdge.slTarget.lPort , $add_19(new KVector_2(lPort.pos), lPort.anchor))); return $getBezierCP(new NubSpline(splineBendPoints)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_loops_routing_SplineSelfLoopRouter_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.loops.routing', 'SplineSelfLoopRouter', 1859); function $compare_17(this$static, n1, n2){ var n1ModelOrder, n1ModelOrder0, n2ModelOrder, n2ModelOrder0, p, p$iterator, p$iterator0, p1Node, p1SourcePort, p2Node, p2SourcePort, port, port$iterator, previousNode, previousNode$array, previousNode$index, previousNode$max; if ($containsKey_3(this$static.biggerThan, n1)) { if ($contains_6(castTo($get_10(this$static.biggerThan, n1), 49), n2)) { return 1; } } else { $put_6(this$static.biggerThan, n1, new HashSet); } if ($containsKey_3(this$static.biggerThan, n2)) { if ($contains_6(castTo($get_10(this$static.biggerThan, n2), 49), n1)) { return -1; } } else { $put_6(this$static.biggerThan, n2, new HashSet); } if ($containsKey_3(this$static.smallerThan, n1)) { if ($contains_6(castTo($get_10(this$static.smallerThan, n1), 49), n2)) { return -1; } } else { $put_6(this$static.smallerThan, n1, new HashSet); } if ($containsKey_3(this$static.smallerThan, n2)) { if ($contains_6(castTo($get_10(this$static.biggerThan, n2), 49), n1)) { return 1; } } else { $put_6(this$static.smallerThan, n2, new HashSet); } if (this$static.orderingStrategy == ($clinit_OrderingStrategy() , PREFER_EDGES) || !$hasProperty(n1, ($clinit_InternalProperties_1() , MODEL_ORDER_1)) || !$hasProperty(n2, ($clinit_InternalProperties_1() , MODEL_ORDER_1))) { p1SourcePort = null; for (p$iterator0 = new ArrayList$1(n1.ports); p$iterator0.i < p$iterator0.this$01.array.length;) { p = castTo($next_6(p$iterator0), 12); p.incomingEdges.array.length == 0 || castTo($get_11(p.incomingEdges, 0), 18).source.owner.layer != n1.layer && (p1SourcePort = castTo($get_11(p.incomingEdges, 0), 18).source); } p2SourcePort = null; for (p$iterator = new ArrayList$1(n2.ports); p$iterator.i < p$iterator.this$01.array.length;) { p = castTo($next_6(p$iterator), 12); p.incomingEdges.array.length == 0 || castTo($get_11(p.incomingEdges, 0), 18).source.owner.layer != n2.layer && (p2SourcePort = castTo($get_11(p.incomingEdges, 0), 18).source); } if (!!p1SourcePort && !!p2SourcePort) { p1Node = p1SourcePort.owner; p2Node = p2SourcePort.owner; if (!!p1Node && p1Node == p2Node) { for (port$iterator = new ArrayList$1(p1Node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); if (port == p1SourcePort) { $updateBiggerAndSmallerAssociations(this$static, n2, n1); return -1; } else if (port == p2SourcePort) { $updateBiggerAndSmallerAssociations(this$static, n1, n2); return 1; } } return compare_5($getModelOrderFromConnectedEdges(this$static, n1), $getModelOrderFromConnectedEdges(this$static, n2)); } for (previousNode$array = this$static.previousLayer , previousNode$index = 0 , previousNode$max = previousNode$array.length; previousNode$index < previousNode$max; ++previousNode$index) { previousNode = previousNode$array[previousNode$index]; if (previousNode == p1Node) { $updateBiggerAndSmallerAssociations(this$static, n2, n1); return -1; } else if (previousNode == p2Node) { $updateBiggerAndSmallerAssociations(this$static, n1, n2); return 1; } } } if (!$hasProperty(n1, ($clinit_InternalProperties_1() , MODEL_ORDER_1)) || !$hasProperty(n2, MODEL_ORDER_1)) { n1ModelOrder0 = $getModelOrderFromConnectedEdges(this$static, n1); n2ModelOrder0 = $getModelOrderFromConnectedEdges(this$static, n2); n1ModelOrder0 > n2ModelOrder0?$updateBiggerAndSmallerAssociations(this$static, n1, n2):$updateBiggerAndSmallerAssociations(this$static, n2, n1); return n1ModelOrder0 < n2ModelOrder0?-1:n1ModelOrder0 > n2ModelOrder0?1:0; } } n1ModelOrder = castTo($getProperty(n1, ($clinit_InternalProperties_1() , MODEL_ORDER_1)), 17).value_0; n2ModelOrder = castTo($getProperty(n2, MODEL_ORDER_1), 17).value_0; n1ModelOrder > n2ModelOrder?$updateBiggerAndSmallerAssociations(this$static, n1, n2):$updateBiggerAndSmallerAssociations(this$static, n2, n1); return n1ModelOrder < n2ModelOrder?-1:n1ModelOrder > n2ModelOrder?1:0; } function $getModelOrderFromConnectedEdges(this$static, n){ var edge, sourcePort; sourcePort = castTo($orElse($findFirst($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(n.ports, 16)), new ModelOrderNodeComparator$lambda$0$Type))), 12); if (sourcePort) { edge = castTo($get_11(sourcePort.incomingEdges, 0), 18); if (edge) { return castTo($getProperty(edge, ($clinit_InternalProperties_1() , MODEL_ORDER_1)), 17).value_0; } } return $returnValue(this$static.longEdgeNodeOrder); } function $updateBiggerAndSmallerAssociations(this$static, bigger, smaller){ var biggerNodeBiggerThan, biggerNodeSmallerThan, smallerNodeBiggerThan, smallerNodeSmallerThan, veryBig, veryBig$iterator, verySmall, verySmall$iterator; biggerNodeBiggerThan = castTo($get_10(this$static.biggerThan, bigger), 49); smallerNodeBiggerThan = castTo($get_10(this$static.biggerThan, smaller), 49); biggerNodeSmallerThan = castTo($get_10(this$static.smallerThan, bigger), 49); smallerNodeSmallerThan = castTo($get_10(this$static.smallerThan, smaller), 49); biggerNodeBiggerThan.map_0.put(smaller, biggerNodeBiggerThan); smallerNodeSmallerThan.map_0.put(bigger, smallerNodeSmallerThan); for (verySmall$iterator = smallerNodeBiggerThan.map_0.keySet_0().iterator_0(); verySmall$iterator.hasNext_0();) { verySmall = castTo(verySmall$iterator.next_1(), 10); biggerNodeBiggerThan.map_0.put(verySmall, biggerNodeBiggerThan); $add_6(castTo($get_10(this$static.smallerThan, verySmall), 49), bigger); $addAll(castTo($get_10(this$static.smallerThan, verySmall), 49), biggerNodeSmallerThan); } for (veryBig$iterator = biggerNodeSmallerThan.map_0.keySet_0().iterator_0(); veryBig$iterator.hasNext_0();) { veryBig = castTo(veryBig$iterator.next_1(), 10); smallerNodeSmallerThan.map_0.put(veryBig, smallerNodeSmallerThan); $add_6(castTo($get_10(this$static.biggerThan, veryBig), 49), smaller); $addAll(castTo($get_10(this$static.biggerThan, veryBig), 49), smallerNodeBiggerThan); } } function ModelOrderNodeComparator(thePreviousLayer, orderingStrategy, longEdgeOrderingStrategy){ ModelOrderNodeComparator_0.call(this, orderingStrategy, longEdgeOrderingStrategy); this.previousLayer = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LNode_2_classLit, $intern_107, 10, thePreviousLayer.nodes.array.length, 0, 1); $toArray_1(thePreviousLayer.nodes, this.previousLayer); } function ModelOrderNodeComparator_0(orderingStrategy, longEdgeOrderingStrategy){ this.biggerThan = new HashMap; this.smallerThan = new HashMap; this.longEdgeNodeOrder = ($clinit_LongEdgeOrderingStrategy() , EQUAL); this.orderingStrategy = orderingStrategy; this.longEdgeNodeOrder = longEdgeOrderingStrategy; } function ModelOrderNodeComparator_1(previousLayer, orderingStrategy, longEdgeOrderingStrategy){ ModelOrderNodeComparator_0.call(this, orderingStrategy, longEdgeOrderingStrategy); this.previousLayer = previousLayer; } defineClass(586, 1, $intern_88, ModelOrderNodeComparator, ModelOrderNodeComparator_1); _.compare_1 = function compare_61(n1, n2){ return $compare_17(this, castTo(n1, 10), castTo(n2, 10)); } ; _.equals_0 = function equals_142(other){ return this === other; } ; _.reversed = function reversed_53(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_intermediate_preserveorder_ModelOrderNodeComparator_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.preserveorder', 'ModelOrderNodeComparator', 586); function ModelOrderNodeComparator$lambda$0$Type(){ } defineClass(1821, 1, $intern_40, ModelOrderNodeComparator$lambda$0$Type); _.test_0 = function test_80(arg0){ return castTo(arg0, 12).incomingEdges.array.length != 0; } ; var Lorg_eclipse_elk_alg_layered_intermediate_preserveorder_ModelOrderNodeComparator$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.preserveorder', 'ModelOrderNodeComparator/lambda$0$Type', 1821); function $$init_7(this$static){ this$static.biggerThan = new HashMap; this$static.smallerThan = new HashMap; } function $checkPortModelOrder(p1, p2){ if ($hasProperty(p1, ($clinit_InternalProperties_1() , MODEL_ORDER_1)) && $hasProperty(p2, MODEL_ORDER_1)) { return compare_5(castTo($getProperty(p1, MODEL_ORDER_1), 17).value_0, castTo($getProperty(p2, MODEL_ORDER_1), 17).value_0); } return 0; } function $compare_18(this$static, originalP1, originalP2){ return $compare_19(this$static, castTo(originalP1, 12), castTo(originalP2, 12)); } function $compare_19(this$static, originalP1, originalP2){ var p1, p1MO, p1Node, p1Order, p1TargetNode, p2, p2MO, p2Node, p2Order, p2TargetNode, previousNode, previousNode$array, previousNode$index, previousNode$max, result, temp; p1 = originalP1; p2 = originalP2; if (this$static.portModelOrder && p1.side == ($clinit_PortSide() , WEST_2) && p2.side == ($clinit_PortSide() , WEST_2)) { temp = p1; p1 = p2; p2 = temp; } if ($containsKey_3(this$static.biggerThan, p1)) { if ($contains_6(castTo($get_10(this$static.biggerThan, p1), 49), p2)) { return 1; } } else { $put_6(this$static.biggerThan, p1, new HashSet); } if ($containsKey_3(this$static.biggerThan, p2)) { if ($contains_6(castTo($get_10(this$static.biggerThan, p2), 49), p1)) { return -1; } } else { $put_6(this$static.biggerThan, p2, new HashSet); } if ($containsKey_3(this$static.smallerThan, p1)) { if ($contains_6(castTo($get_10(this$static.smallerThan, p1), 49), p2)) { return -1; } } else { $put_6(this$static.smallerThan, p1, new HashSet); } if ($containsKey_3(this$static.smallerThan, p2)) { if ($contains_6(castTo($get_10(this$static.biggerThan, p2), 49), p1)) { return 1; } } else { $put_6(this$static.smallerThan, p2, new HashSet); } if (p1.side != p2.side) { result = $compare_20(p1.side, p2.side); result == -1?$updateBiggerAndSmallerAssociations_0(this$static, p2, p1):$updateBiggerAndSmallerAssociations_0(this$static, p1, p2); return result; } if (p1.incomingEdges.array.length != 0 && p2.incomingEdges.array.length != 0) { if (this$static.portModelOrder) { result = $checkPortModelOrder(p1, p2); if (result != 0) { result == -1?$updateBiggerAndSmallerAssociations_0(this$static, p2, p1):result == 1 && $updateBiggerAndSmallerAssociations_0(this$static, p1, p2); return result; } } p1Node = castTo($get_11(p1.incomingEdges, 0), 18).source.owner; p2Node = castTo($get_11(p2.incomingEdges, 0), 18).source.owner; if (p1Node == p2Node) { p1MO = castTo($getProperty(castTo($get_11(p1.incomingEdges, 0), 18), ($clinit_InternalProperties_1() , MODEL_ORDER_1)), 17).value_0; p2MO = castTo($getProperty(castTo($get_11(p2.incomingEdges, 0), 18), MODEL_ORDER_1), 17).value_0; p1MO > p2MO?$updateBiggerAndSmallerAssociations_0(this$static, p1, p2):$updateBiggerAndSmallerAssociations_0(this$static, p2, p1); return p1MO < p2MO?-1:p1MO > p2MO?1:0; } for (previousNode$array = this$static.previousLayer , previousNode$index = 0 , previousNode$max = previousNode$array.length; previousNode$index < previousNode$max; ++previousNode$index) { previousNode = previousNode$array[previousNode$index]; if (previousNode == p1Node) { $updateBiggerAndSmallerAssociations_0(this$static, p1, p2); return 1; } else if (previousNode == p2Node) { $updateBiggerAndSmallerAssociations_0(this$static, p2, p1); return -1; } } } if (p1.outgoingEdges.array.length != 0 && p2.outgoingEdges.array.length != 0) { p1TargetNode = castTo($getProperty(p1, ($clinit_InternalProperties_1() , LONG_EDGE_TARGET_NODE)), 10); p2TargetNode = castTo($getProperty(p2, LONG_EDGE_TARGET_NODE), 10); if (this$static.strategy == ($clinit_OrderingStrategy() , PREFER_NODES) && !!p1TargetNode && !!p2TargetNode && $hasProperty(p1TargetNode, MODEL_ORDER_1) && $hasProperty(p2TargetNode, MODEL_ORDER_1)) { p1MO = castTo($getProperty(p1TargetNode, MODEL_ORDER_1), 17).value_0; p2MO = castTo($getProperty(p2TargetNode, MODEL_ORDER_1), 17).value_0; p1MO > p2MO?$updateBiggerAndSmallerAssociations_0(this$static, p1, p2):$updateBiggerAndSmallerAssociations_0(this$static, p2, p1); return p1MO < p2MO?-1:p1MO > p2MO?1:0; } if (this$static.portModelOrder) { result = $checkPortModelOrder(p1, p2); if (result != 0) { result == -1?$updateBiggerAndSmallerAssociations_0(this$static, p2, p1):result == 1 && $updateBiggerAndSmallerAssociations_0(this$static, p1, p2); return result; } } p1Order = 0; p2Order = 0; $hasProperty(castTo($get_11(p1.outgoingEdges, 0), 18), MODEL_ORDER_1) && (p1Order = castTo($getProperty(castTo($get_11(p1.outgoingEdges, 0), 18), MODEL_ORDER_1), 17).value_0); $hasProperty(castTo($get_11(p2.outgoingEdges, 0), 18), MODEL_ORDER_1) && (p2Order = castTo($getProperty(castTo($get_11(p1.outgoingEdges, 0), 18), MODEL_ORDER_1), 17).value_0); if (!!p1TargetNode && p1TargetNode == p2TargetNode) { if ($booleanValue(castToBoolean($getProperty(castTo($get_11(p1.outgoingEdges, 0), 18), REVERSED))) && !$booleanValue(castToBoolean($getProperty(castTo($get_11(p2.outgoingEdges, 0), 18), REVERSED)))) { $updateBiggerAndSmallerAssociations_0(this$static, p1, p2); return 1; } else if (!$booleanValue(castToBoolean($getProperty(castTo($get_11(p1.outgoingEdges, 0), 18), REVERSED))) && $booleanValue(castToBoolean($getProperty(castTo($get_11(p2.outgoingEdges, 0), 18), REVERSED)))) { $updateBiggerAndSmallerAssociations_0(this$static, p2, p1); return -1; } p1Order > p2Order?$updateBiggerAndSmallerAssociations_0(this$static, p1, p2):$updateBiggerAndSmallerAssociations_0(this$static, p2, p1); return p1Order < p2Order?-1:p1Order > p2Order?1:0; } if (this$static.targetNodeModelOrder) { this$static.targetNodeModelOrder.containsKey(p1TargetNode) && (p1Order = castTo(this$static.targetNodeModelOrder.get_3(p1TargetNode), 17).value_0); this$static.targetNodeModelOrder.containsKey(p2TargetNode) && (p2Order = castTo(this$static.targetNodeModelOrder.get_3(p2TargetNode), 17).value_0); } p1Order > p2Order?$updateBiggerAndSmallerAssociations_0(this$static, p1, p2):$updateBiggerAndSmallerAssociations_0(this$static, p2, p1); return p1Order < p2Order?-1:p1Order > p2Order?1:0; } if (p1.incomingEdges.array.length != 0 && p2.outgoingEdges.array.length != 0) { $updateBiggerAndSmallerAssociations_0(this$static, p1, p2); return 1; } else if (p1.outgoingEdges.array.length != 0 && p2.incomingEdges.array.length != 0) { $updateBiggerAndSmallerAssociations_0(this$static, p2, p1); return -1; } else if ($hasProperty(p1, ($clinit_InternalProperties_1() , MODEL_ORDER_1)) && $hasProperty(p2, MODEL_ORDER_1)) { p1MO = castTo($getProperty(p1, MODEL_ORDER_1), 17).value_0; p2MO = castTo($getProperty(p2, MODEL_ORDER_1), 17).value_0; p1MO > p2MO?$updateBiggerAndSmallerAssociations_0(this$static, p1, p2):$updateBiggerAndSmallerAssociations_0(this$static, p2, p1); return p1MO < p2MO?-1:p1MO > p2MO?1:0; } else { $updateBiggerAndSmallerAssociations_0(this$static, p2, p1); return -1; } } function $updateBiggerAndSmallerAssociations_0(this$static, bigger, smaller){ var biggerPortBiggerThan, biggerPortSmallerThan, smallerPortBiggerThan, smallerPortSmallerThan, veryBig, veryBig$iterator, verySmall, verySmall$iterator; biggerPortBiggerThan = castTo($get_10(this$static.biggerThan, bigger), 49); smallerPortBiggerThan = castTo($get_10(this$static.biggerThan, smaller), 49); biggerPortSmallerThan = castTo($get_10(this$static.smallerThan, bigger), 49); smallerPortSmallerThan = castTo($get_10(this$static.smallerThan, smaller), 49); biggerPortBiggerThan.map_0.put(smaller, biggerPortBiggerThan); smallerPortSmallerThan.map_0.put(bigger, smallerPortSmallerThan); for (verySmall$iterator = smallerPortBiggerThan.map_0.keySet_0().iterator_0(); verySmall$iterator.hasNext_0();) { verySmall = castTo(verySmall$iterator.next_1(), 12); biggerPortBiggerThan.map_0.put(verySmall, biggerPortBiggerThan); $add_6(castTo($get_10(this$static.smallerThan, verySmall), 49), bigger); $addAll(castTo($get_10(this$static.smallerThan, verySmall), 49), biggerPortSmallerThan); } for (veryBig$iterator = biggerPortSmallerThan.map_0.keySet_0().iterator_0(); veryBig$iterator.hasNext_0();) { veryBig = castTo(veryBig$iterator.next_1(), 12); smallerPortSmallerThan.map_0.put(veryBig, smallerPortSmallerThan); $add_6(castTo($get_10(this$static.biggerThan, veryBig), 49), smaller); $addAll(castTo($get_10(this$static.biggerThan, veryBig), 49), smallerPortBiggerThan); } } function ModelOrderPortComparator(previousLayer, strategy, targetNodeModelOrder, portModelOrder){ $$init_7(this); this.previousLayer = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LNode_2_classLit, $intern_107, 10, previousLayer.nodes.array.length, 0, 1); this.strategy = strategy; $toArray_1(previousLayer.nodes, this.previousLayer); this.targetNodeModelOrder = targetNodeModelOrder; this.portModelOrder = portModelOrder; } function ModelOrderPortComparator_0(previousLayer, strategy, targetNodeModelOrder, portModelOrder){ $$init_7(this); this.previousLayer = previousLayer; this.strategy = strategy; this.targetNodeModelOrder = targetNodeModelOrder; this.portModelOrder = portModelOrder; } defineClass(821, 1, $intern_88, ModelOrderPortComparator, ModelOrderPortComparator_0); _.compare_1 = function compare_62(originalP1, originalP2){ return $compare_18(this, originalP1, originalP2); } ; _.equals_0 = function equals_143(other){ return this === other; } ; _.reversed = function reversed_54(){ return new Comparators$ReversedComparator(this); } ; _.portModelOrder = false; var Lorg_eclipse_elk_alg_layered_intermediate_preserveorder_ModelOrderPortComparator_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.preserveorder', 'ModelOrderPortComparator', 821); function $compare_20(ps1, ps2){ return compare_5(ps1.ordinal, ps2.ordinal); } function ARDCutIndexHeuristic(){ } function getChunkCount(gs){ var rows_0, rowsd; rowsd = $wnd.Math.sqrt((gs.sumWidth == null && (gs.sumWidth = $determineWidth(gs, new GraphStats$lambda$1$Type)) , $doubleValue(gs.sumWidth) / (gs.dar * (gs.maxHeight == null && (gs.maxHeight = $determineHeight(gs, new GraphStats$2methodref$max$Type)) , $doubleValue(gs.maxHeight))))); rows_0 = toInt_0(fromDouble_0($wnd.Math.round(rowsd))); rows_0 = $wnd.Math.min(rows_0, gs.longestPath); return rows_0; } defineClass(815, 1, {}, ARDCutIndexHeuristic); _.getCutIndexes = function getCutIndexes(graph, gs){ var cuts, idx, rows_0, step; rows_0 = getChunkCount(gs); cuts = new ArrayList; step = gs.longestPath / rows_0; for (idx = 1; idx < rows_0; ++idx) { $add_3(cuts, valueOf_3(toInt_0(fromDouble_0($wnd.Math.round(idx * step))))); } return cuts; } ; _.guaranteeValid = function guaranteeValid(){ return false; } ; var Lorg_eclipse_elk_alg_layered_intermediate_wrapping_ARDCutIndexHeuristic_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.wrapping', 'ARDCutIndexHeuristic', 815); function $applyCuts(graph, cuts){ var alreadySplit, bpEndMarker, bpLayer1, bpLayer2, bpStartMarker, bpi, bpiPrev, cut, cutIt, e, e$iterator, e$iterator0, idx, inPortBp1, inPortBp2, layer, layerIt, n, n$iterator, noSplitEdges, nodeStartEdge, openEdges, originalEdge, originalEdge$iterator, outPortBp1, outPortBp2, prevNode, startEndEdge; layerIt = new AbstractList$ListIteratorImpl(graph.layers, 0); cutIt = cuts.iterator_0(); idx = 0; cut = castTo(cutIt.next_1(), 17).value_0; noSplitEdges = 0; alreadySplit = new HashSet; openEdges = new LinkedHashSet; while (layerIt.i < layerIt.this$01_0.size_1()) { layer = (checkCriticalElement(layerIt.i < layerIt.this$01_0.size_1()) , castTo(layerIt.this$01_0.get_0(layerIt.last = layerIt.i++), 30)); for (n$iterator = new ArrayList$1(layer.nodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); for (e$iterator0 = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(n).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator0);) { e = castTo($next_0(e$iterator0), 18); openEdges.map_0.put(e, openEdges); } for (e$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(n).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 18); openEdges.map_0.remove_0(e) != null; } } if (idx + 1 == cut) { bpLayer1 = new Layer(graph); $add_1(layerIt, bpLayer1); bpLayer2 = new Layer(graph); $add_1(layerIt, bpLayer2); for (originalEdge$iterator = openEdges.map_0.keySet_0().iterator_0(); originalEdge$iterator.hasNext_0();) { originalEdge = castTo(originalEdge$iterator.next_1(), 18); if (!alreadySplit.map_0.containsKey(originalEdge)) { ++noSplitEdges; alreadySplit.map_0.put(originalEdge, alreadySplit); } bpStartMarker = new LNode(graph); $setProperty_0(bpStartMarker, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0), ($clinit_PortConstraints() , FIXED_SIDE)); $setLayer_0(bpStartMarker, bpLayer1); $setType(bpStartMarker, ($clinit_LNode$NodeType() , BREAKING_POINT)); inPortBp1 = new LPort; $setNode(inPortBp1, bpStartMarker); $setSide(inPortBp1, ($clinit_PortSide() , WEST_2)); outPortBp1 = new LPort; $setNode(outPortBp1, bpStartMarker); $setSide(outPortBp1, EAST_2); bpEndMarker = new LNode(graph); $setProperty_0(bpEndMarker, PORT_CONSTRAINTS_0, FIXED_SIDE); $setLayer_0(bpEndMarker, bpLayer2); $setType(bpEndMarker, BREAKING_POINT); inPortBp2 = new LPort; $setNode(inPortBp2, bpEndMarker); $setSide(inPortBp2, WEST_2); outPortBp2 = new LPort; $setNode(outPortBp2, bpEndMarker); $setSide(outPortBp2, EAST_2); nodeStartEdge = new LEdge; $setSource_0(nodeStartEdge, originalEdge.source); $setTarget_0(nodeStartEdge, inPortBp1); $setProperty_0(nodeStartEdge, ($clinit_InternalProperties_1() , MODEL_ORDER_1), castTo($getProperty(originalEdge, MODEL_ORDER_1), 17)); startEndEdge = new LEdge; $setSource_0(startEndEdge, outPortBp1); $setTarget_0(startEndEdge, inPortBp2); $setProperty_0(startEndEdge, MODEL_ORDER_1, castTo($getProperty(originalEdge, MODEL_ORDER_1), 17)); $setSource_0(originalEdge, outPortBp2); bpi = new BreakingPointInserter$BPInfo(bpStartMarker, bpEndMarker, nodeStartEdge, startEndEdge, originalEdge); $setProperty_0(bpStartMarker, BREAKING_POINT_INFO, bpi); $setProperty_0(bpEndMarker, BREAKING_POINT_INFO, bpi); prevNode = nodeStartEdge.source.owner; if (prevNode.type_0 == BREAKING_POINT) { bpiPrev = castTo($getProperty(prevNode, BREAKING_POINT_INFO), 313); bpiPrev.next_0 = bpi; bpi.prev = bpiPrev; } } if (cutIt.hasNext_0()) { cut = castTo(cutIt.next_1(), 17).value_0; } else { break; } } ++idx; } return valueOf_3(noSplitEdges); } function $computeEdgeSpans(graph){ var e, e$iterator, i, l, l$iterator, n, n$iterator, n$iterator0, open_0, spans; spans = initUnidimensionalArray(I_classLit, $intern_49, 28, graph.layers.array.length + 1, 15, 1); open_0 = new HashSet; i = 0; for (l$iterator = new ArrayList$1(graph.layers); l$iterator.i < l$iterator.this$01.array.length;) { l = castTo($next_6(l$iterator), 30); spans[i++] = open_0.map_0.size_1(); for (n$iterator0 = new ArrayList$1(l.nodes); n$iterator0.i < n$iterator0.this$01.array.length;) { n = castTo($next_6(n$iterator0), 10); for (e$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(n).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 18); open_0.map_0.put(e, open_0); } } for (n$iterator = new ArrayList$1(l.nodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); for (e$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(n).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 18); open_0.map_0.remove_0(e) != null; } } } return spans; } function $improveCuts(graph, cuts){ var bestCut, bestScore, ccuts, cut, cutIdx, cutIdx$iterator, dist, hit, i, idx, improvedCuts, lCut, lDist, lastCut, rCut, rDist, score, spans, distancePenalty; improvedCuts = new ArrayList; ccuts = new ArrayList; lastCut = null; for (cutIdx$iterator = cuts.iterator_0(); cutIdx$iterator.hasNext_0();) { cutIdx = castTo(cutIdx$iterator.next_1(), 17); cut = new BreakingPointInserter$Cut(cutIdx.value_0); push_1(ccuts.array, cut); if (lastCut) { cut.prev = lastCut; lastCut.suc = cut; } lastCut = cut; } spans = $computeEdgeSpans(graph); for (i = 0; i < ccuts.array.length; ++i) { lCut = null; rCut = $selfOrNext((checkCriticalElementIndex(0, ccuts.array.length) , castTo(ccuts.array[0], 661))); bestCut = null; bestScore = $intern_60; for (idx = 1; idx < graph.layers.array.length; ++idx) { rDist = rCut?$wnd.Math.abs(rCut.index_0 - idx):$wnd.Math.abs(idx - lCut.index_0) + 1; lDist = lCut?$wnd.Math.abs(idx - lCut.index_0):rDist + 1; if (lDist < rDist) { hit = lCut; dist = lDist; } else { hit = rCut; dist = rDist; } score = (distancePenalty = $doubleValue(castToDouble($getProperty(graph, ($clinit_LayeredOptions() , WRAPPING_MULTI_EDGE_DISTANCE_PENALTY_0)))) , spans[idx] + $wnd.Math.pow(dist, distancePenalty)); if (score < bestScore) { bestScore = score; bestCut = hit; bestCut.newIndex = idx; } if (!!rCut && idx == rCut.index_0) { lCut = rCut; rCut = $next_11(rCut); } } if (bestCut) { $add_3(improvedCuts, valueOf_3(bestCut.newIndex)); bestCut.assigned = true; $offset(bestCut); } } $clinit_Collections(); sort_4(improvedCuts.array, improvedCuts.array.length, null); return improvedCuts; } function $process_53(graph, progressMonitor){ var cuts, gs, icic; progressMonitor.begin('Breaking Point Insertion', 1); gs = new GraphStats(graph); switch (castTo($getProperty(graph, ($clinit_LayeredOptions() , WRAPPING_CUTTING_STRATEGY_0)), 351).ordinal) { case 2: icic = new ICutIndexCalculator$ManualCutIndexCalculator; break; case 0: icic = new ARDCutIndexHeuristic; break; default:icic = new MSDCutIndexHeuristic; } cuts = icic.getCutIndexes(graph, gs); $booleanValue(castToBoolean($getProperty(graph, WRAPPING_MULTI_EDGE_IMPROVE_CUTS_0))) && (cuts = $improveCuts(graph, cuts)); if (!icic.guaranteeValid() && $hasProperty(graph, WRAPPING_VALIDIFY_STRATEGY_0)) { switch (castTo($getProperty(graph, WRAPPING_VALIDIFY_STRATEGY_0), 352).ordinal) { case 2: cuts = validifyIndexesLookingBack_0(gs, cuts); break; case 1: cuts = validifyIndexesGreedily(gs, cuts); } } if (cuts.isEmpty()) { progressMonitor.done_1(); return; } $applyCuts(graph, cuts); progressMonitor.done_1(); } function BreakingPointInserter(){ } defineClass(1544, 1, $intern_105, BreakingPointInserter); _.process = function process_50(graph, progressMonitor){ $process_53(castTo(graph, 36), progressMonitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_wrapping_BreakingPointInserter_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.wrapping', 'BreakingPointInserter', 1544); function BreakingPointInserter$BPInfo(startDummy, endDummy, nodeStartEdge, startEndEdge, originalEdge){ this.start_0 = startDummy; this.end = endDummy; this.nodeStartEdge = nodeStartEdge; this.startEndEdge = startEndEdge; this.originalEdge = originalEdge; } function isEnd(n){ var bpi; bpi = castTo($getProperty(n, ($clinit_InternalProperties_1() , BREAKING_POINT_INFO)), 313); if (bpi) { return bpi.end == n; } return false; } function isStart(n){ var bpi; bpi = castTo($getProperty(n, ($clinit_InternalProperties_1() , BREAKING_POINT_INFO)), 313); if (bpi) { return bpi.start_0 == n; } return false; } defineClass(313, 1, {313:1}, BreakingPointInserter$BPInfo); _.toString_0 = function toString_97(){ var sb; sb = new StringBuilder; sb.string += 'BPInfo['; sb.string += '\n\tstart='; $append_10(sb, this.start_0); sb.string += '\n\tend='; $append_10(sb, this.end); sb.string += '\n\tnodeStartEdge='; $append_10(sb, this.nodeStartEdge); sb.string += '\n\tstartEndEdge='; $append_10(sb, this.startEndEdge); sb.string += '\n\toriginalEdge='; $append_10(sb, this.originalEdge); sb.string += '\n\tstartInLayerDummy='; $append_10(sb, this.startInLayerDummy); sb.string += '\n\tstartInLayerEdge='; $append_10(sb, this.startInLayerEdge); sb.string += '\n\tendInLayerDummy='; $append_10(sb, this.endInLayerDummy); sb.string += '\n\tendInLayerEdge='; $append_10(sb, this.endInLayerEdge); return sb.string; } ; var Lorg_eclipse_elk_alg_layered_intermediate_wrapping_BreakingPointInserter$BPInfo_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.wrapping', 'BreakingPointInserter/BPInfo', 313); function $next_11(this$static){ if (this$static.suc) { return $selfOrNext(this$static.suc); } return null; } function $offset(this$static){ var offset; if (!this$static.assigned) { throw toJs(new IllegalStateException_0('Cannot offset an unassigned cut.')); } offset = this$static.newIndex - this$static.index_0; this$static.index_0 += offset; $offsetPrev(this$static, offset); $offsetSuc(this$static, offset); } function $offset_0(this$static, offset){ this$static.index_0 += offset; } function $offsetPrev(this$static, offset){ if (!!this$static.prev && !this$static.prev.assigned) { $offset_0(this$static.prev, offset); $offsetPrev(this$static.prev, offset); } } function $offsetSuc(this$static, offset){ if (!!this$static.suc && !this$static.suc.assigned) { $offset_0(this$static.suc, offset); $offsetSuc(this$static.suc, offset); } } function $selfOrNext(this$static){ if (this$static.assigned) { if (this$static.suc) { return $selfOrNext(this$static.suc); } } else { return this$static; } return null; } function BreakingPointInserter$Cut(index_0){ this.index_0 = index_0; } defineClass(661, 1, {661:1}, BreakingPointInserter$Cut); _.assigned = false; _.index_0 = 0; _.newIndex = 0; var Lorg_eclipse_elk_alg_layered_intermediate_wrapping_BreakingPointInserter$Cut_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.wrapping', 'BreakingPointInserter/Cut', 661); function $dropDummies(bpNode, inLayerDummy, forwards, force){ var didsome, newLayer, nextOne, nextTwo, predOne, predTwo; predOne = $nextLongEdgeDummy(bpNode, forwards); predTwo = $nextLongEdgeDummy(inLayerDummy, forwards); didsome = false; while (!!predOne && !!predTwo) { if (force || $isAdjacentOrSeparatedByBreakingpoints(predOne, predTwo, forwards)) { nextOne = $nextLongEdgeDummy(predOne, forwards); nextTwo = $nextLongEdgeDummy(predTwo, forwards); $updateIndexesAfter(inLayerDummy); $updateIndexesAfter(bpNode); newLayer = predOne.layer; joinAt(predOne, false); joinAt(predTwo, false); if (forwards) { $setLayer(inLayerDummy, predTwo.id_0, newLayer); inLayerDummy.id_0 = predTwo.id_0; $setLayer(bpNode, predOne.id_0 + 1, newLayer); bpNode.id_0 = predOne.id_0; } else { $setLayer(bpNode, predOne.id_0, newLayer); bpNode.id_0 = predOne.id_0; $setLayer(inLayerDummy, predTwo.id_0 + 1, newLayer); inLayerDummy.id_0 = predTwo.id_0; } $setLayer_0(predOne, null); $setLayer_0(predTwo, null); predOne = nextOne; predTwo = nextTwo; didsome = true; } else { break; } } return didsome; } function $improveMultiCutIndexEdges(graph){ var current, info, l, l$iterator, n, n$iterator, newInfo, next; for (l$iterator = new ArrayList$1(graph.layers); l$iterator.i < l$iterator.this$01.array.length;) { l = castTo($next_6(l$iterator), 30); for (n$iterator = new ArrayList$1(newArrayList(l.nodes)); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); if (isStart(n)) { info = castTo($getProperty(n, ($clinit_InternalProperties_1() , BREAKING_POINT_INFO)), 313); if (!info.prev && !!info.next_0) { current = info; next = info.next_0; while (next) { $dropDummies(next.start_0, next.startInLayerDummy, false, true); $updateIndexesAfter(current.end); $updateIndexesAfter(next.start_0); $updateIndexesAfter(next.startInLayerDummy); $updateIndexesAfter(next.endInLayerDummy); $setTarget_0(next.endInLayerEdge, current.endInLayerEdge.target); $setTarget_0(current.endInLayerEdge, null); $setLayer_0(current.end, null); $setLayer_0(next.start_0, null); $setLayer_0(next.startInLayerDummy, null); $setLayer_0(next.endInLayerDummy, null); newInfo = new BreakingPointInserter$BPInfo(current.start_0, next.end, current.nodeStartEdge, next.startEndEdge, next.originalEdge); newInfo.startInLayerDummy = current.startInLayerDummy; newInfo.startInLayerEdge = current.startInLayerEdge; newInfo.endInLayerDummy = current.endInLayerDummy; newInfo.endInLayerEdge = next.endInLayerEdge; newInfo.prev = current.prev; newInfo.next_0 = next.next_0; $setProperty_0(current.start_0, BREAKING_POINT_INFO, newInfo); $setProperty_0(next.end, BREAKING_POINT_INFO, newInfo); next = next.next_0; current = newInfo; } } } } } } function $improveUnneccesarilyLongEdges(graph, forwards){ var bpInfo, bpNode, check, didsome, dummy, layer, layer$iterator, layers, n, n$iterator, nodes; check = forwards?new BreakingPointProcessor$0methodref$isEnd$Type:new BreakingPointProcessor$1methodref$isStart$Type; didsome = false; do { didsome = false; layers = forwards?reverse_0(graph.layers):graph.layers; for (layer$iterator = layers.iterator_0(); layer$iterator.hasNext_0();) { layer = castTo(layer$iterator.next_1(), 30); nodes = newArrayList(layer.nodes); forwards || reverse_0(nodes); for (n$iterator = new ArrayList$1(nodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); if (check.test_0(n)) { bpNode = n; bpInfo = castTo($getProperty(n, ($clinit_InternalProperties_1() , BREAKING_POINT_INFO)), 313); dummy = forwards?bpInfo.endInLayerDummy:bpInfo.startInLayerDummy; didsome = $dropDummies(bpNode, dummy, forwards, false); } } } } while (didsome); } function $isAdjacentOrSeparatedByBreakingpoints(dummy1, dummy2, forwards){ var end, i, layer, node, start_0; layer = dummy1.layer; start_0 = forwards?dummy2:dummy1; end = forwards?dummy1:dummy2; for (i = start_0.id_0 + 1; i < end.id_0; ++i) { node = castTo($get_11(layer.nodes, i), 10); if (!(node.type_0 == ($clinit_LNode$NodeType() , BREAKING_POINT) || $isInLayerDummy(node))) { return false; } } return true; } function $isInLayerDummy(node){ var e, e$iterator; if (node.type_0 == ($clinit_LNode$NodeType() , LONG_EDGE)) { for (e$iterator = new Iterators$ConcatenatedIterator(transform_2($getConnectedEdges_0(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 18); if (!$isSelfLoop(e) && node.layer == $getOther_1(e, node).layer) { return true; } } } return false; } function $nextLongEdgeDummy(start_0, forwards){ var e, e$iterator, edges, other; edges = forwards?$getOutgoingEdges(start_0):$getIncomingEdges(start_0); for (e$iterator = new Iterators$ConcatenatedIterator(transform_2(edges.val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 18); other = $getOther_1(e, start_0); if (other.type_0 == ($clinit_LNode$NodeType() , LONG_EDGE) && other.layer != start_0.layer) { return other; } } return null; } function $performWrapping(graph){ var aNode, bpi, dummyEdges, e, e$iterator, idx, it, l, layer, layerIt, layers, n, n$iterator, n$iterator0, newLayer, nodesToMove, offset, reverse, startInLayerEdge; layers = graph.layers; layerIt = new AbstractList$ListIteratorImpl(layers, 0); $add_1(layerIt, new Layer(graph)); reverse = false; idx = 1; while (layerIt.i < layerIt.this$01_0.size_1()) { layer = (checkCriticalElement(layerIt.i < layerIt.this$01_0.size_1()) , castTo(layerIt.this$01_0.get_0(layerIt.last = layerIt.i++), 30)); newLayer = (checkCriticalElementIndex(idx, layers.array.length) , castTo(layers.array[idx], 30)); nodesToMove = newArrayList(layer.nodes); offset = nodesToMove.array.length; for (n$iterator0 = new ArrayList$1(nodesToMove); n$iterator0.i < n$iterator0.this$01.array.length;) { n = castTo($next_6(n$iterator0), 10); $setLayer_0(n, newLayer); } if (reverse) { for (n$iterator = reverse_0(nodesToMove).iterator_0(); n$iterator.hasNext_0();) { n = castTo(n$iterator.next_1(), 10); for (e$iterator = new ArrayList$1(newArrayList($getIncomingEdges(n))); e$iterator.i < e$iterator.this$01.array.length;) { e = castTo($next_6(e$iterator), 18); $reverse_0(e, true); $setProperty_0(graph, ($clinit_InternalProperties_1() , CYCLIC), ($clinit_Boolean() , true)); dummyEdges = insertDummies(graph, e, offset); bpi = castTo($getProperty(n, BREAKING_POINT_INFO), 313); startInLayerEdge = castTo($get_11(dummyEdges, dummyEdges.array.length - 1), 18); bpi.startInLayerDummy = startInLayerEdge.source.owner; bpi.startInLayerEdge = startInLayerEdge; bpi.endInLayerDummy = e.target.owner; bpi.endInLayerEdge = e; } } reverse = false; } else { if (nodesToMove.array.length != 0) { aNode = (checkCriticalElementIndex(0, nodesToMove.array.length) , castTo(nodesToMove.array[0], 10)); if (aNode.type_0 == ($clinit_LNode$NodeType() , BREAKING_POINT)) { reverse = true; idx = -1; } } } ++idx; } it = new AbstractList$ListIteratorImpl(graph.layers, 0); while (it.i < it.this$01_0.size_1()) { l = (checkCriticalElement(it.i < it.this$01_0.size_1()) , castTo(it.this$01_0.get_0(it.last = it.i++), 30)); l.nodes.array.length == 0 && $remove_8(it); } } function $process_54(graph, progressMonitor){ var index_0, l, l$iterator, n, n$iterator; progressMonitor.begin('Breaking Point Processor', 1); $performWrapping(graph); if ($booleanValue(castToBoolean($getProperty(graph, ($clinit_LayeredOptions() , WRAPPING_MULTI_EDGE_IMPROVE_WRAPPED_EDGES_0))))) { for (l$iterator = new ArrayList$1(graph.layers); l$iterator.i < l$iterator.this$01.array.length;) { l = castTo($next_6(l$iterator), 30); index_0 = 0; for (n$iterator = new ArrayList$1(l.nodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); n.id_0 = index_0++; } } $improveMultiCutIndexEdges(graph); $improveUnneccesarilyLongEdges(graph, true); $improveUnneccesarilyLongEdges(graph, false); } progressMonitor.done_1(); } function $updateIndexesAfter(node){ var i; for (i = node.id_0 + 1; i < node.layer.nodes.array.length; ++i) { --castTo($get_11(node.layer.nodes, i), 10).id_0; } } function BreakingPointProcessor(){ } defineClass(1545, 1, $intern_105, BreakingPointProcessor); _.process = function process_51(graph, progressMonitor){ $process_54(castTo(graph, 36), progressMonitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_wrapping_BreakingPointProcessor_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.wrapping', 'BreakingPointProcessor', 1545); function BreakingPointProcessor$0methodref$isEnd$Type(){ } defineClass(1546, 1, $intern_40, BreakingPointProcessor$0methodref$isEnd$Type); _.test_0 = function test_81(arg0){ return isEnd(castTo(arg0, 10)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_wrapping_BreakingPointProcessor$0methodref$isEnd$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.wrapping', 'BreakingPointProcessor/0methodref$isEnd$Type', 1546); function BreakingPointProcessor$1methodref$isStart$Type(){ } defineClass(1547, 1, $intern_40, BreakingPointProcessor$1methodref$isStart$Type); _.test_0 = function test_82(arg0){ return isStart(castTo(arg0, 10)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_wrapping_BreakingPointProcessor$1methodref$isStart$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.wrapping', 'BreakingPointProcessor/1methodref$isStart$Type', 1547); function $addNullSafe(container, toAdd){ if (!toAdd) { return false; } return $addAll(container, toAdd); } function $process_55(this$static, graph, progressMonitor){ var bpi, l, l$iterator, node, node$iterator; progressMonitor.begin('Breaking Point Removing', 1); this$static.edgeRouting = castTo($getProperty(graph, ($clinit_LayeredOptions() , EDGE_ROUTING)), 223); for (l$iterator = new ArrayList$1(graph.layers); l$iterator.i < l$iterator.this$01.array.length;) { l = castTo($next_6(l$iterator), 30); for (node$iterator = new ArrayList$1(newArrayList(l.nodes)); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (isEnd(node)) { bpi = castTo($getProperty(node, ($clinit_InternalProperties_1() , BREAKING_POINT_INFO)), 313); !bpi.next_0 && $remove_30(this$static, bpi); } } } progressMonitor.done_1(); } function $remove_30(this$static, bpi){ var e1, e2, e3, joinedEdges, joinedSegments, junctionPointsOne, junctionPointsThree, junctionPointsTwo, newBends, newJunctionPoints, s1, s2, s3; newBends = new KVectorChain; switch (this$static.edgeRouting.ordinal) { case 3: s1 = castTo($getProperty(bpi.nodeStartEdge, ($clinit_InternalProperties_1() , SPLINE_ROUTE_START)), 15); s2 = castTo($getProperty(bpi.startEndEdge, SPLINE_ROUTE_START), 15); s3 = castTo($getProperty(bpi.originalEdge, SPLINE_ROUTE_START), 15); e1 = castTo($getProperty(bpi.nodeStartEdge, SPLINE_EDGE_CHAIN), 15); e2 = castTo($getProperty(bpi.startEndEdge, SPLINE_EDGE_CHAIN), 15); e3 = castTo($getProperty(bpi.originalEdge, SPLINE_EDGE_CHAIN), 15); joinedSegments = new ArrayList; $addAll_2(joinedSegments, s1); s2.forEach_0(new BreakingPointRemover$lambda$0$Type); $addAll_2(joinedSegments, reverse_0(s2)); $addAll_2(joinedSegments, s3); joinedEdges = new ArrayList; $addAll_2(joinedEdges, e1); $addAll_2(joinedEdges, reverse_0(e2)); $addAll_2(joinedEdges, e3); $setProperty_0(bpi.originalEdge, SPLINE_ROUTE_START, joinedSegments); $setProperty_0(bpi.originalEdge, SPLINE_EDGE_CHAIN, joinedEdges); $setProperty_0(bpi.originalEdge, SPLINE_SURVIVING_EDGE, bpi.originalEdge); $setProperty_0(bpi.nodeStartEdge, SPLINE_ROUTE_START, null); $setProperty_0(bpi.nodeStartEdge, SPLINE_EDGE_CHAIN, null); $setProperty_0(bpi.startEndEdge, SPLINE_ROUTE_START, null); $setProperty_0(bpi.startEndEdge, SPLINE_EDGE_CHAIN, null); break; case 1: $addAll(newBends, bpi.nodeStartEdge.bendPoints); $add_7(newBends, bpi.start_0.pos); $addAll(newBends, reverse_0(bpi.startEndEdge.bendPoints)); $add_7(newBends, bpi.end.pos); $addAll(newBends, bpi.originalEdge.bendPoints); break; default:$addAll(newBends, bpi.nodeStartEdge.bendPoints); $addAll(newBends, reverse_0(bpi.startEndEdge.bendPoints)); $addAll(newBends, bpi.originalEdge.bendPoints); } $reset_0(bpi.originalEdge.bendPoints); $addAll(bpi.originalEdge.bendPoints, newBends); $setSource_0(bpi.originalEdge, bpi.nodeStartEdge.source); junctionPointsOne = castTo($getProperty(bpi.nodeStartEdge, ($clinit_LayeredOptions() , JUNCTION_POINTS)), 75); junctionPointsTwo = castTo($getProperty(bpi.startEndEdge, JUNCTION_POINTS), 75); junctionPointsThree = castTo($getProperty(bpi.originalEdge, JUNCTION_POINTS), 75); if (!!junctionPointsOne || !!junctionPointsTwo || !!junctionPointsThree) { newJunctionPoints = new KVectorChain; $addNullSafe(newJunctionPoints, junctionPointsThree); $addNullSafe(newJunctionPoints, junctionPointsTwo); $addNullSafe(newJunctionPoints, junctionPointsOne); $setProperty_0(bpi.originalEdge, JUNCTION_POINTS, newJunctionPoints); } $setSource_0(bpi.startEndEdge, null); $setTarget_0(bpi.startEndEdge, null); $setSource_0(bpi.nodeStartEdge, null); $setTarget_0(bpi.nodeStartEdge, null); $setLayer_0(bpi.end, null); $setLayer_0(bpi.start_0, null); !!bpi.prev && $remove_30(this$static, bpi.prev); } function BreakingPointRemover(){ } defineClass(1548, 1, $intern_105, BreakingPointRemover); _.process = function process_52(graph, progressMonitor){ $process_55(this, castTo(graph, 36), progressMonitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_wrapping_BreakingPointRemover_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.wrapping', 'BreakingPointRemover', 1548); function BreakingPointRemover$lambda$0$Type(){ } defineClass(1549, 1, $intern_19, BreakingPointRemover$lambda$0$Type); _.accept = function accept_115(arg0){ castTo(arg0, 131).inverseOrder = true; } ; var Lorg_eclipse_elk_alg_layered_intermediate_wrapping_BreakingPointRemover$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.wrapping', 'BreakingPointRemover/lambda$0$Type', 1549); function insertDummies(layeredGraph, originalEdge, offsetFirstInLayerDummy){ var additionalSpacing, createdEdges, dummyEdge, dummyInput, dummyNode, dummyOutput, edge, edgeNodeSpacing, i, is, nextLayer, portPos, src_0, srcIndex, targetPort, tgt, tgtIndex, thickness; edgeNodeSpacing = $doubleValue(castToDouble($getProperty(layeredGraph, ($clinit_LayeredOptions() , SPACING_EDGE_NODE)))); additionalSpacing = $doubleValue(castToDouble($getProperty(layeredGraph, WRAPPING_ADDITIONAL_EDGE_SPACING_0))); is = new IndividualSpacings; $setProperty_0(is, SPACING_EDGE_NODE, edgeNodeSpacing + additionalSpacing); edge = originalEdge; targetPort = edge.target; src_0 = edge.source.owner; tgt = edge.target.owner; srcIndex = $getIndex_0(src_0.layer); tgtIndex = $getIndex_0(tgt.layer); createdEdges = new ArrayList; for (i = srcIndex; i <= tgtIndex; i++) { dummyNode = new LNode(layeredGraph); $setType(dummyNode, ($clinit_LNode$NodeType() , LONG_EDGE)); $setProperty_0(dummyNode, ($clinit_InternalProperties_1() , ORIGIN_0), edge); $setProperty_0(dummyNode, PORT_CONSTRAINTS_0, ($clinit_PortConstraints() , FIXED_POS)); $setProperty_0(dummyNode, SPACING_INDIVIDUAL, is); nextLayer = castTo($get_11(layeredGraph.layers, i), 30); i == srcIndex?$setLayer(dummyNode, nextLayer.nodes.array.length - offsetFirstInLayerDummy, nextLayer):$setLayer_0(dummyNode, nextLayer); thickness = $doubleValue(castToDouble($getProperty(edge, EDGE_THICKNESS_0))); if (thickness < 0) { thickness = 0; $setProperty_0(edge, EDGE_THICKNESS_0, thickness); } dummyNode.size_0.y_0 = thickness; portPos = $wnd.Math.floor(thickness / 2); dummyInput = new LPort; $setSide(dummyInput, ($clinit_PortSide() , WEST_2)); $setNode(dummyInput, dummyNode); dummyInput.pos.y_0 = portPos; dummyOutput = new LPort; $setSide(dummyOutput, EAST_2); $setNode(dummyOutput, dummyNode); dummyOutput.pos.y_0 = portPos; $setTarget_0(edge, dummyInput); dummyEdge = new LEdge; $copyProperties(dummyEdge, edge); $setProperty_0(dummyEdge, JUNCTION_POINTS, null); $setSource_0(dummyEdge, dummyOutput); $setTarget_0(dummyEdge, targetPort); setDummyProperties(dummyNode, edge, dummyEdge); push_1(createdEdges.array, dummyEdge); edge = dummyEdge; } return createdEdges; } function setDummyProperties(dummy, inEdge, outEdge){ var inEdgeSourceNode; inEdgeSourceNode = inEdge.source.owner; if (inEdgeSourceNode.type_0 == ($clinit_LNode$NodeType() , LONG_EDGE)) { $setProperty_0(dummy, ($clinit_InternalProperties_1() , LONG_EDGE_SOURCE), castTo($getProperty(inEdgeSourceNode, LONG_EDGE_SOURCE), 12)); $setProperty_0(dummy, LONG_EDGE_TARGET, castTo($getProperty(inEdgeSourceNode, LONG_EDGE_TARGET), 12)); } else { $setProperty_0(dummy, ($clinit_InternalProperties_1() , LONG_EDGE_SOURCE), inEdge.source); $setProperty_0(dummy, LONG_EDGE_TARGET, outEdge.target); } } function $determineHeight(this$static, fun){ return $doubleValue(castToDouble($get_17($reduce_0($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static.graph_0.layers, 16)), new GraphStats$lambda$6$Type(this$static)), fun)))); } function $determineLayerHeight(this$static, layer){ var inc, inc$iterator, lH, n, n$iterator, origin_0, src_0; lH = 0; for (n$iterator = new ArrayList$1(layer.nodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); lH += n.size_0.y_0 + n.margin.bottom + n.margin.top_0 + this$static.inLayerSpacing; for (inc$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(n).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(inc$iterator);) { inc = castTo($next_0(inc$iterator), 18); if (inc.source.owner.type_0 == ($clinit_LNode$NodeType() , NORTH_SOUTH_PORT)) { src_0 = inc.source.owner; origin_0 = castTo($getProperty(src_0, ($clinit_InternalProperties_1() , ORIGIN_0)), 10); lH += origin_0.size_0.y_0 + origin_0.margin.bottom + origin_0.margin.top_0; } } } return lH; } function $determineLayerWidth(this$static, l){ var maxW, n, n$iterator, nW; maxW = 0; for (n$iterator = new ArrayList$1(l.nodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); nW = n.size_0.x_0 + n.margin.right + n.margin.left + this$static.spacing; maxW = $wnd.Math.max(maxW, nW); } return maxW; } function $determineWidth(this$static, fun){ return $doubleValue(castToDouble($get_17($reduce_0($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static.graph_0.layers, 16)), new GraphStats$lambda$2$Type(this$static)), fun)))); } function $initCutAllowed(this$static){ var f, f$iterator, forbidden, i, layer, layerIt; if (this$static.cutsAllowed != null) { return; } this$static.cutsAllowed = initUnidimensionalArray(Z_classLit, $intern_91, 28, this$static.graph_0.layers.array.length, 16, 1); this$static.cutsAllowed[0] = false; if ($hasProperty(this$static.graph_0, ($clinit_LayeredOptions() , WRAPPING_VALIDIFY_FORBIDDEN_INDICES_0))) { forbidden = castTo($getProperty(this$static.graph_0, WRAPPING_VALIDIFY_FORBIDDEN_INDICES_0), 15); for (f$iterator = forbidden.iterator_0(); f$iterator.hasNext_0();) { f = castTo(f$iterator.next_1(), 17).value_0; f > 0 && f < this$static.cutsAllowed.length && (this$static.cutsAllowed[f] = false); } } else { layerIt = new ArrayList$1(this$static.graph_0.layers); layerIt.i < layerIt.this$01.array.length && $next_6(layerIt); i = 1; while (layerIt.i < layerIt.this$01.array.length) { layer = castTo($next_6(layerIt), 30); this$static.cutsAllowed[i++] = $isCutAllowed_0(layer); } } } function $initWidthsAndHeights(this$static){ var i, l, n; n = this$static.longestPath; this$static.widths = initUnidimensionalArray(D_classLit, $intern_66, 28, n, 15, 1); this$static.heights = initUnidimensionalArray(D_classLit, $intern_66, 28, n, 15, 1); for (i = 0; i < n; i++) { l = castTo($get_11(this$static.graph_0.layers, i), 30); this$static.widths[i] = $determineLayerWidth(this$static, l); this$static.heights[i] = $determineLayerHeight(this$static, l); } } function $isCutAllowed(this$static, layerIndex){ this$static.cutsAllowed == null && $initCutAllowed(this$static); return this$static.cutsAllowed[layerIndex]; } function $isCutAllowed_0(layer){ var cutAllowed, e, e$iterator, n1, n2, src_0, tgt, tgt$iterator; cutAllowed = true; n1 = null; n2 = null; check: for (tgt$iterator = new ArrayList$1(layer.nodes); tgt$iterator.i < tgt$iterator.this$01.array.length;) { tgt = castTo($next_6(tgt$iterator), 10); for (e$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(tgt).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 18); if (!!n1 && n1 != tgt) { cutAllowed = false; break check; } n1 = tgt; src_0 = e.source.owner; if (!!n2 && n2 != src_0) { cutAllowed = false; break check; } n2 = src_0; } } return cutAllowed; } function GraphStats(graph){ var aspectRatio, correction, dir_0; this.graph_0 = graph; dir_0 = castTo($getProperty(graph, ($clinit_LayeredOptions() , DIRECTION)), 88); aspectRatio = $doubleValue(castToDouble($getProperty(graph, ASPECT_RATIO_1))); correction = $doubleValue(castToDouble($getProperty(graph, WRAPPING_CORRECTION_FACTOR_0))); dir_0 == ($clinit_Direction_0() , LEFT_6) || dir_0 == RIGHT_6 || dir_0 == UNDEFINED_2?(this.dar = aspectRatio * correction):(this.dar = 1 / (aspectRatio * correction)); this.spacing = $doubleValue(castToDouble($getProperty(graph, SPACING_NODE_NODE_BETWEEN_LAYERS_0))); this.inLayerSpacing = $doubleValue(castToDouble($getProperty(graph, SPACING_NODE_NODE_0))); this.longestPath = graph.layers.array.length; } function lambda$1_16(a_0, b_1){ return (checkCriticalNotNull(a_0) , a_0) + (checkCriticalNotNull(b_1) , b_1); } defineClass(811, 1, {}, GraphStats); _.dar = 0; _.inLayerSpacing = 0; _.longestPath = 0; _.spacing = 0; var Lorg_eclipse_elk_alg_layered_intermediate_wrapping_GraphStats_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.wrapping', 'GraphStats', 811); function GraphStats$0methodref$max$Type(){ } defineClass(812, 1, {}, GraphStats$0methodref$max$Type); _.apply_3 = function apply_126(arg0, arg1){ return $wnd.Math.max($doubleValue(castToDouble(arg0)), $doubleValue(castToDouble(arg1))); } ; var Lorg_eclipse_elk_alg_layered_intermediate_wrapping_GraphStats$0methodref$max$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.wrapping', 'GraphStats/0methodref$max$Type', 812); function GraphStats$2methodref$max$Type(){ } defineClass(813, 1, {}, GraphStats$2methodref$max$Type); _.apply_3 = function apply_127(arg0, arg1){ return $wnd.Math.max($doubleValue(castToDouble(arg0)), $doubleValue(castToDouble(arg1))); } ; var Lorg_eclipse_elk_alg_layered_intermediate_wrapping_GraphStats$2methodref$max$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.wrapping', 'GraphStats/2methodref$max$Type', 813); function GraphStats$lambda$1$Type(){ } defineClass(1726, 1, {}, GraphStats$lambda$1$Type); _.apply_3 = function apply_128(arg0, arg1){ return lambda$1_16(castToDouble(arg0), castToDouble(arg1)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_wrapping_GraphStats$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.wrapping', 'GraphStats/lambda$1$Type', 1726); function GraphStats$lambda$2$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1727, 1, {}, GraphStats$lambda$2$Type); _.apply_0 = function apply_129(arg0){ return $determineLayerWidth(this.$$outer_0, castTo(arg0, 30)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_wrapping_GraphStats$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.wrapping', 'GraphStats/lambda$2$Type', 1727); function GraphStats$lambda$6$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1728, 1, {}, GraphStats$lambda$6$Type); _.apply_0 = function apply_130(arg0){ return $determineLayerHeight(this.$$outer_0, castTo(arg0, 30)); } ; var Lorg_eclipse_elk_alg_layered_intermediate_wrapping_GraphStats$lambda$6$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.wrapping', 'GraphStats/lambda$6$Type', 1728); function ICutIndexCalculator$ManualCutIndexCalculator(){ } defineClass(814, 1, {}, ICutIndexCalculator$ManualCutIndexCalculator); _.getCutIndexes = function getCutIndexes_0(graph, gs){ var cuts; cuts = castTo($getProperty(graph, ($clinit_LayeredOptions() , WRAPPING_CUTTING_CUTS_0)), 15); return cuts?cuts:($clinit_Collections() , $clinit_Collections() , EMPTY_LIST); } ; _.guaranteeValid = function guaranteeValid_0(){ return false; } ; var Lorg_eclipse_elk_alg_layered_intermediate_wrapping_ICutIndexCalculator$ManualCutIndexCalculator_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.wrapping', 'ICutIndexCalculator/ManualCutIndexCalculator', 814); function MSDCutIndexHeuristic(){ } defineClass(816, 1, {}, MSDCutIndexHeuristic); _.getCutIndexes = function getCutIndexes_1(graph, gs){ var bestCuts, bestMaxScale, cutCnt, cuts, freedom, height, heights, i, index_0, lastCutWidth, m, maxScale, rowHeightMax, rowSum, sumSoFar, total, width_0, widthAtIndex, widths; widths = (gs.widths == null && $initWidthsAndHeights(gs) , gs.widths); heights = (gs.heights == null && $initWidthsAndHeights(gs) , gs.heights); widthAtIndex = initUnidimensionalArray(D_classLit, $intern_66, 28, widths.length, 15, 1); widthAtIndex[0] = widths[0]; total = widths[0]; for (i = 1; i < widths.length; i++) { widthAtIndex[i] = widthAtIndex[i - 1] + widths[i]; total += widths[i]; } cutCnt = getChunkCount(gs) - 1; freedom = castTo($getProperty(graph, ($clinit_LayeredOptions() , WRAPPING_CUTTING_MSD_FREEDOM_0)), 17).value_0; bestMaxScale = $intern_61; bestCuts = new ArrayList; for (m = $wnd.Math.max(0, cutCnt - freedom); m <= $wnd.Math.min(gs.longestPath - 1, cutCnt + freedom); m++) { rowSum = total / (m + 1); sumSoFar = 0; index_0 = 1; cuts = new ArrayList; width_0 = $intern_61; lastCutWidth = 0; height = 0; rowHeightMax = heights[0]; if (m == 0) { width_0 = total; height = (gs.maxHeight == null && (gs.maxHeight = $determineHeight(gs, new GraphStats$2methodref$max$Type)) , $doubleValue(gs.maxHeight)); } else { while (index_0 < gs.longestPath) { if (widthAtIndex[index_0 - 1] - sumSoFar >= rowSum) { $add_3(cuts, valueOf_3(index_0)); width_0 = $wnd.Math.max(width_0, widthAtIndex[index_0 - 1] - lastCutWidth); height += rowHeightMax; sumSoFar += widthAtIndex[index_0 - 1] - sumSoFar; lastCutWidth = widthAtIndex[index_0 - 1]; rowHeightMax = heights[index_0]; } rowHeightMax = $wnd.Math.max(rowHeightMax, heights[index_0]); ++index_0; } height += rowHeightMax; } maxScale = $wnd.Math.min(1 / width_0, 1 / gs.dar / height); if (maxScale > bestMaxScale) { bestMaxScale = maxScale; bestCuts = cuts; } } return bestCuts; } ; _.guaranteeValid = function guaranteeValid_1(){ return false; } ; var Lorg_eclipse_elk_alg_layered_intermediate_wrapping_MSDCutIndexHeuristic_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.wrapping', 'MSDCutIndexHeuristic', 816); function $performCuts(graph, gs, cuts){ var cutIt, e, e$iterator, incEdges, index_0, it, l, n, n$iterator, newIndex, newLayer, nextCut, nodesToMove, oldLayer; if (cuts.isEmpty()) { return; } index_0 = 0; newIndex = 0; cutIt = cuts.iterator_0(); nextCut = castTo(cutIt.next_1(), 17).value_0; while (index_0 < gs.longestPath) { if (index_0 == nextCut) { newIndex = 0; cutIt.hasNext_0()?(nextCut = castTo(cutIt.next_1(), 17).value_0):(nextCut = gs.longestPath + 1); } if (index_0 != newIndex) { oldLayer = castTo($get_11(graph.layers, index_0), 30); newLayer = castTo($get_11(graph.layers, newIndex), 30); nodesToMove = newArrayList(oldLayer.nodes); for (n$iterator = new ArrayList$1(nodesToMove); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); $setLayer(n, newLayer.nodes.array.length, newLayer); if (newIndex == 0) { incEdges = newArrayList($getIncomingEdges(n)); for (e$iterator = new ArrayList$1(incEdges); e$iterator.i < e$iterator.this$01.array.length;) { e = castTo($next_6(e$iterator), 18); $reverse_0(e, true); $setProperty_0(graph, ($clinit_InternalProperties_1() , CYCLIC), ($clinit_Boolean() , true)); insertDummies(graph, e, 1); } } } } ++newIndex; ++index_0; } it = new AbstractList$ListIteratorImpl(graph.layers, 0); while (it.i < it.this$01_0.size_1()) { l = (checkCriticalElement(it.i < it.this$01_0.size_1()) , castTo(it.this$01_0.get_0(it.last = it.i++), 30)); l.nodes.array.length == 0 && $remove_8(it); } } function $process_56(graph, progressMonitor){ var currentAR, cuts, gs, icic, sumWidth; progressMonitor.begin('Path-Like Graph Wrapping', 1); if (graph.layers.array.length == 0) { progressMonitor.done_1(); return; } gs = new GraphStats(graph); sumWidth = (gs.maxWidth == null && (gs.maxWidth = $determineWidth(gs, new GraphStats$0methodref$max$Type)) , $doubleValue(gs.maxWidth) * gs.longestPath); currentAR = sumWidth / (gs.maxWidth == null && (gs.maxWidth = $determineWidth(gs, new GraphStats$0methodref$max$Type)) , $doubleValue(gs.maxWidth)); if (gs.dar > currentAR) { progressMonitor.done_1(); return; } switch (castTo($getProperty(graph, ($clinit_LayeredOptions() , WRAPPING_CUTTING_STRATEGY_0)), 351).ordinal) { case 2: icic = new ICutIndexCalculator$ManualCutIndexCalculator; break; case 0: icic = new ARDCutIndexHeuristic; break; default:icic = new MSDCutIndexHeuristic; } cuts = icic.getCutIndexes(graph, gs); if (!icic.guaranteeValid()) { switch (castTo($getProperty(graph, WRAPPING_VALIDIFY_STRATEGY_0), 352).ordinal) { case 2: cuts = validifyIndexesLookingBack_0(gs, cuts); break; case 1: cuts = validifyIndexesGreedily(gs, cuts); } } $performCuts(graph, gs, cuts); progressMonitor.done_1(); } function SingleEdgeGraphWrapper(){ } function validifyIndexesGreedily(gs, cuts){ var cut, cutIt, offset, validCuts; validCuts = new ArrayList; offset = 0; cutIt = cuts.iterator_0(); while (cutIt.hasNext_0()) { cut = valueOf_3(castTo(cutIt.next_1(), 17).value_0 + offset); while (cut.value_0 < gs.longestPath && !$isCutAllowed(gs, cut.value_0)) { cut = valueOf_3(cut.value_0 + 1); ++offset; } if (cut.value_0 >= gs.longestPath) { break; } push_1(validCuts.array, cut); } return validCuts; } function validifyIndexesLookingBack(desiredCuts, validCuts){ var cIdx, current, distHigher, distLower, finalCuts, iIdx, offset, select; finalCuts = new ArrayList; iIdx = 0; cIdx = 0; offset = 0; while (iIdx < validCuts.array.length - 1 && cIdx < desiredCuts.size_1()) { current = castTo(desiredCuts.get_0(cIdx), 17).value_0 + offset; while ((checkCriticalElementIndex(iIdx + 1, validCuts.array.length) , castTo(validCuts.array[iIdx + 1], 17)).value_0 < current) { ++iIdx; } select = 0; distLower = current - (checkCriticalElementIndex(iIdx, validCuts.array.length) , castTo(validCuts.array[iIdx], 17)).value_0; distHigher = (checkCriticalElementIndex(iIdx + 1, validCuts.array.length) , castTo(validCuts.array[iIdx + 1], 17)).value_0 - current; distLower > distHigher && ++select; $add_3(finalCuts, (checkCriticalElementIndex(iIdx + select, validCuts.array.length) , castTo(validCuts.array[iIdx + select], 17))); offset += (checkCriticalElementIndex(iIdx + select, validCuts.array.length) , castTo(validCuts.array[iIdx + select], 17)).value_0 - current; ++cIdx; while (cIdx < desiredCuts.size_1() && castTo(desiredCuts.get_0(cIdx), 17).value_0 + offset <= (checkCriticalElementIndex(iIdx + select, validCuts.array.length) , castTo(validCuts.array[iIdx + select], 17)).value_0) { ++cIdx; } iIdx += 1 + select; } return finalCuts; } function validifyIndexesLookingBack_0(gs, desiredCuts){ var i, validCuts; if (desiredCuts.isEmpty()) { return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } validCuts = new ArrayList; $add_3(validCuts, valueOf_3($intern_43)); for (i = 1; i < gs.longestPath; ++i) { gs.cutsAllowed == null && $initCutAllowed(gs); gs.cutsAllowed[i] && $add_3(validCuts, valueOf_3(i)); } if (validCuts.array.length == 1) { return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } $add_3(validCuts, valueOf_3($intern_0)); return validifyIndexesLookingBack(desiredCuts, validCuts); } defineClass(1683, 1, $intern_105, SingleEdgeGraphWrapper); _.process = function process_53(graph, progressMonitor){ $process_56(castTo(graph, 36), progressMonitor); } ; var Lorg_eclipse_elk_alg_layered_intermediate_wrapping_SingleEdgeGraphWrapper_2_classLit = createForClass('org.eclipse.elk.alg.layered.intermediate.wrapping', 'SingleEdgeGraphWrapper', 1683); function $clinit_CenterEdgeLabelPlacementStrategy(){ $clinit_CenterEdgeLabelPlacementStrategy = emptyMethod; MEDIAN_LAYER = new CenterEdgeLabelPlacementStrategy('MEDIAN_LAYER', 0); TAIL_LAYER = new CenterEdgeLabelPlacementStrategy('TAIL_LAYER', 1); HEAD_LAYER = new CenterEdgeLabelPlacementStrategy('HEAD_LAYER', 2); SPACE_EFFICIENT_LAYER = new CenterEdgeLabelPlacementStrategy('SPACE_EFFICIENT_LAYER', 3); WIDEST_LAYER = new CenterEdgeLabelPlacementStrategy('WIDEST_LAYER', 4); CENTER_LAYER = new CenterEdgeLabelPlacementStrategy('CENTER_LAYER', 5); } function CenterEdgeLabelPlacementStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_36(name_0){ $clinit_CenterEdgeLabelPlacementStrategy(); return valueOf(($clinit_CenterEdgeLabelPlacementStrategy$Map() , $MAP_26), name_0); } function values_44(){ $clinit_CenterEdgeLabelPlacementStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_CenterEdgeLabelPlacementStrategy_2_classLit, 1), $intern_37, 232, 0, [MEDIAN_LAYER, TAIL_LAYER, HEAD_LAYER, SPACE_EFFICIENT_LAYER, WIDEST_LAYER, CENTER_LAYER]); } defineClass(232, 22, {3:1, 34:1, 22:1, 232:1}, CenterEdgeLabelPlacementStrategy); var CENTER_LAYER, HEAD_LAYER, MEDIAN_LAYER, SPACE_EFFICIENT_LAYER, TAIL_LAYER, WIDEST_LAYER; var Lorg_eclipse_elk_alg_layered_options_CenterEdgeLabelPlacementStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'CenterEdgeLabelPlacementStrategy', 232, Ljava_lang_Enum_2_classLit, values_44, valueOf_36); function $clinit_CenterEdgeLabelPlacementStrategy$Map(){ $clinit_CenterEdgeLabelPlacementStrategy$Map = emptyMethod; $MAP_26 = createValueOfMap(($clinit_CenterEdgeLabelPlacementStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_CenterEdgeLabelPlacementStrategy_2_classLit, 1), $intern_37, 232, 0, [MEDIAN_LAYER, TAIL_LAYER, HEAD_LAYER, SPACE_EFFICIENT_LAYER, WIDEST_LAYER, CENTER_LAYER]))); } var $MAP_26; function $clinit_ConstraintCalculationStrategy(){ $clinit_ConstraintCalculationStrategy = emptyMethod; QUADRATIC = new ConstraintCalculationStrategy('QUADRATIC', 0); SCANLINE = new ConstraintCalculationStrategy('SCANLINE', 1); } function ConstraintCalculationStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_37(name_0){ $clinit_ConstraintCalculationStrategy(); return valueOf(($clinit_ConstraintCalculationStrategy$Map() , $MAP_27), name_0); } function values_45(){ $clinit_ConstraintCalculationStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_ConstraintCalculationStrategy_2_classLit, 1), $intern_37, 431, 0, [QUADRATIC, SCANLINE]); } defineClass(431, 22, {3:1, 34:1, 22:1, 431:1}, ConstraintCalculationStrategy); var QUADRATIC, SCANLINE; var Lorg_eclipse_elk_alg_layered_options_ConstraintCalculationStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'ConstraintCalculationStrategy', 431, Ljava_lang_Enum_2_classLit, values_45, valueOf_37); function $clinit_ConstraintCalculationStrategy$Map(){ $clinit_ConstraintCalculationStrategy$Map = emptyMethod; $MAP_27 = createValueOfMap(($clinit_ConstraintCalculationStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_ConstraintCalculationStrategy_2_classLit, 1), $intern_37, 431, 0, [QUADRATIC, SCANLINE]))); } var $MAP_27; function $clinit_CrossingMinimizationStrategy(){ $clinit_CrossingMinimizationStrategy = emptyMethod; LAYER_SWEEP = new CrossingMinimizationStrategy('LAYER_SWEEP', 0); INTERACTIVE_1 = new CrossingMinimizationStrategy('INTERACTIVE', 1); NONE_1 = new CrossingMinimizationStrategy('NONE', 2); } function $create_3(this$static){ switch (this$static.ordinal) { case 0: return new LayerSweepCrossingMinimizer(($clinit_LayerSweepCrossingMinimizer$CrossMinType() , BARYCENTER)); case 1: return new InteractiveCrossingMinimizer; case 2: return new NoCrossingMinimizer; default:throw toJs(new IllegalArgumentException_0('No implementation is available for the crossing minimizer ' + (this$static.name_0 != null?this$static.name_0:'' + this$static.ordinal))); } } function CrossingMinimizationStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_38(name_0){ $clinit_CrossingMinimizationStrategy(); return valueOf(($clinit_CrossingMinimizationStrategy$Map() , $MAP_28), name_0); } function values_46(){ $clinit_CrossingMinimizationStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_CrossingMinimizationStrategy_2_classLit, 1), $intern_37, 322, 0, [LAYER_SWEEP, INTERACTIVE_1, NONE_1]); } defineClass(322, 22, {3:1, 34:1, 22:1, 322:1, 188:1, 196:1}, CrossingMinimizationStrategy); _.create_1 = function create_7(){ return $create_3(this); } ; _.create_2 = function create_6(){ return $create_3(this); } ; var INTERACTIVE_1, LAYER_SWEEP, NONE_1; var Lorg_eclipse_elk_alg_layered_options_CrossingMinimizationStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'CrossingMinimizationStrategy', 322, Ljava_lang_Enum_2_classLit, values_46, valueOf_38); function $clinit_CrossingMinimizationStrategy$Map(){ $clinit_CrossingMinimizationStrategy$Map = emptyMethod; $MAP_28 = createValueOfMap(($clinit_CrossingMinimizationStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_CrossingMinimizationStrategy_2_classLit, 1), $intern_37, 322, 0, [LAYER_SWEEP, INTERACTIVE_1, NONE_1]))); } var $MAP_28; function $clinit_CuttingStrategy(){ $clinit_CuttingStrategy = emptyMethod; ARD = new CuttingStrategy('ARD', 0); MSD = new CuttingStrategy('MSD', 1); MANUAL = new CuttingStrategy('MANUAL', 2); } function CuttingStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_39(name_0){ $clinit_CuttingStrategy(); return valueOf(($clinit_CuttingStrategy$Map() , $MAP_29), name_0); } function values_47(){ $clinit_CuttingStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_CuttingStrategy_2_classLit, 1), $intern_37, 351, 0, [ARD, MSD, MANUAL]); } defineClass(351, 22, {3:1, 34:1, 22:1, 351:1}, CuttingStrategy); var ARD, MANUAL, MSD; var Lorg_eclipse_elk_alg_layered_options_CuttingStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'CuttingStrategy', 351, Ljava_lang_Enum_2_classLit, values_47, valueOf_39); function $clinit_CuttingStrategy$Map(){ $clinit_CuttingStrategy$Map = emptyMethod; $MAP_29 = createValueOfMap(($clinit_CuttingStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_CuttingStrategy_2_classLit, 1), $intern_37, 351, 0, [ARD, MSD, MANUAL]))); } var $MAP_29; function $clinit_CycleBreakingStrategy(){ $clinit_CycleBreakingStrategy = emptyMethod; GREEDY = new CycleBreakingStrategy('GREEDY', 0); DEPTH_FIRST = new CycleBreakingStrategy('DEPTH_FIRST', 1); INTERACTIVE_2 = new CycleBreakingStrategy('INTERACTIVE', 2); MODEL_ORDER_0 = new CycleBreakingStrategy('MODEL_ORDER', 3); GREEDY_MODEL_ORDER = new CycleBreakingStrategy('GREEDY_MODEL_ORDER', 4); } function $create_4(this$static){ switch (this$static.ordinal) { case 0: return new GreedyCycleBreaker; case 1: return new DepthFirstCycleBreaker; case 2: return new InteractiveCycleBreaker; case 3: return new ModelOrderCycleBreaker; case 4: return new GreedyModelOrderCycleBreaker; default:throw toJs(new IllegalArgumentException_0('No implementation is available for the cycle breaker ' + (this$static.name_0 != null?this$static.name_0:'' + this$static.ordinal))); } } function CycleBreakingStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_40(name_0){ $clinit_CycleBreakingStrategy(); return valueOf(($clinit_CycleBreakingStrategy$Map() , $MAP_30), name_0); } function values_48(){ $clinit_CycleBreakingStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_CycleBreakingStrategy_2_classLit, 1), $intern_37, 348, 0, [GREEDY, DEPTH_FIRST, INTERACTIVE_2, MODEL_ORDER_0, GREEDY_MODEL_ORDER]); } defineClass(348, 22, {3:1, 34:1, 22:1, 348:1, 188:1, 196:1}, CycleBreakingStrategy); _.create_1 = function create_9(){ return $create_4(this); } ; _.create_2 = function create_8(){ return $create_4(this); } ; var DEPTH_FIRST, GREEDY, GREEDY_MODEL_ORDER, INTERACTIVE_2, MODEL_ORDER_0; var Lorg_eclipse_elk_alg_layered_options_CycleBreakingStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'CycleBreakingStrategy', 348, Ljava_lang_Enum_2_classLit, values_48, valueOf_40); function $clinit_CycleBreakingStrategy$Map(){ $clinit_CycleBreakingStrategy$Map = emptyMethod; $MAP_30 = createValueOfMap(($clinit_CycleBreakingStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_CycleBreakingStrategy_2_classLit, 1), $intern_37, 348, 0, [GREEDY, DEPTH_FIRST, INTERACTIVE_2, MODEL_ORDER_0, GREEDY_MODEL_ORDER]))); } var $MAP_30; function $clinit_DirectionCongruency(){ $clinit_DirectionCongruency = emptyMethod; READING_DIRECTION = new DirectionCongruency('READING_DIRECTION', 0); ROTATION = new DirectionCongruency('ROTATION', 1); } function DirectionCongruency(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_41(name_0){ $clinit_DirectionCongruency(); return valueOf(($clinit_DirectionCongruency$Map() , $MAP_31), name_0); } function values_49(){ $clinit_DirectionCongruency(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_DirectionCongruency_2_classLit, 1), $intern_37, 428, 0, [READING_DIRECTION, ROTATION]); } defineClass(428, 22, {3:1, 34:1, 22:1, 428:1}, DirectionCongruency); var READING_DIRECTION, ROTATION; var Lorg_eclipse_elk_alg_layered_options_DirectionCongruency_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'DirectionCongruency', 428, Ljava_lang_Enum_2_classLit, values_49, valueOf_41); function $clinit_DirectionCongruency$Map(){ $clinit_DirectionCongruency$Map = emptyMethod; $MAP_31 = createValueOfMap(($clinit_DirectionCongruency() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_DirectionCongruency_2_classLit, 1), $intern_37, 428, 0, [READING_DIRECTION, ROTATION]))); } var $MAP_31; function $clinit_EdgeConstraint(){ $clinit_EdgeConstraint = emptyMethod; NONE_2 = new EdgeConstraint('NONE', 0); INCOMING_ONLY = new EdgeConstraint('INCOMING_ONLY', 1); OUTGOING_ONLY = new EdgeConstraint('OUTGOING_ONLY', 2); } function EdgeConstraint(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_42(name_0){ $clinit_EdgeConstraint(); return valueOf(($clinit_EdgeConstraint$Map() , $MAP_32), name_0); } function values_50(){ $clinit_EdgeConstraint(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_EdgeConstraint_2_classLit, 1), $intern_37, 460, 0, [NONE_2, INCOMING_ONLY, OUTGOING_ONLY]); } defineClass(460, 22, {3:1, 34:1, 22:1, 460:1}, EdgeConstraint); var INCOMING_ONLY, NONE_2, OUTGOING_ONLY; var Lorg_eclipse_elk_alg_layered_options_EdgeConstraint_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'EdgeConstraint', 460, Ljava_lang_Enum_2_classLit, values_50, valueOf_42); function $clinit_EdgeConstraint$Map(){ $clinit_EdgeConstraint$Map = emptyMethod; $MAP_32 = createValueOfMap(($clinit_EdgeConstraint() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_EdgeConstraint_2_classLit, 1), $intern_37, 460, 0, [NONE_2, INCOMING_ONLY, OUTGOING_ONLY]))); } var $MAP_32; function $clinit_EdgeLabelSideSelection(){ $clinit_EdgeLabelSideSelection = emptyMethod; ALWAYS_UP = new EdgeLabelSideSelection('ALWAYS_UP', 0); ALWAYS_DOWN = new EdgeLabelSideSelection('ALWAYS_DOWN', 1); DIRECTION_UP = new EdgeLabelSideSelection('DIRECTION_UP', 2); DIRECTION_DOWN = new EdgeLabelSideSelection('DIRECTION_DOWN', 3); SMART_UP = new EdgeLabelSideSelection('SMART_UP', 4); SMART_DOWN = new EdgeLabelSideSelection('SMART_DOWN', 5); } function $transpose_2(this$static){ switch (this$static.ordinal) { case 0: return ALWAYS_DOWN; case 1: return ALWAYS_UP; case 2: return DIRECTION_DOWN; case 3: return DIRECTION_UP; case 4: return SMART_DOWN; case 5: return SMART_UP; default:return null; } } function EdgeLabelSideSelection(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_43(name_0){ $clinit_EdgeLabelSideSelection(); return valueOf(($clinit_EdgeLabelSideSelection$Map() , $MAP_33), name_0); } function values_51(){ $clinit_EdgeLabelSideSelection(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_EdgeLabelSideSelection_2_classLit, 1), $intern_37, 283, 0, [ALWAYS_UP, ALWAYS_DOWN, DIRECTION_UP, DIRECTION_DOWN, SMART_UP, SMART_DOWN]); } defineClass(283, 22, {3:1, 34:1, 22:1, 283:1}, EdgeLabelSideSelection); var ALWAYS_DOWN, ALWAYS_UP, DIRECTION_DOWN, DIRECTION_UP, SMART_DOWN, SMART_UP; var Lorg_eclipse_elk_alg_layered_options_EdgeLabelSideSelection_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'EdgeLabelSideSelection', 283, Ljava_lang_Enum_2_classLit, values_51, valueOf_43); function $clinit_EdgeLabelSideSelection$Map(){ $clinit_EdgeLabelSideSelection$Map = emptyMethod; $MAP_33 = createValueOfMap(($clinit_EdgeLabelSideSelection() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_EdgeLabelSideSelection_2_classLit, 1), $intern_37, 283, 0, [ALWAYS_UP, ALWAYS_DOWN, DIRECTION_UP, DIRECTION_DOWN, SMART_UP, SMART_DOWN]))); } var $MAP_33; function $clinit_EdgeStraighteningStrategy(){ $clinit_EdgeStraighteningStrategy = emptyMethod; NONE_3 = new EdgeStraighteningStrategy('NONE', 0); IMPROVE_STRAIGHTNESS = new EdgeStraighteningStrategy('IMPROVE_STRAIGHTNESS', 1); } function EdgeStraighteningStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_44(name_0){ $clinit_EdgeStraighteningStrategy(); return valueOf(($clinit_EdgeStraighteningStrategy$Map() , $MAP_34), name_0); } function values_52(){ $clinit_EdgeStraighteningStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_EdgeStraighteningStrategy_2_classLit, 1), $intern_37, 488, 0, [NONE_3, IMPROVE_STRAIGHTNESS]); } defineClass(488, 22, {3:1, 34:1, 22:1, 488:1}, EdgeStraighteningStrategy); var IMPROVE_STRAIGHTNESS, NONE_3; var Lorg_eclipse_elk_alg_layered_options_EdgeStraighteningStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'EdgeStraighteningStrategy', 488, Ljava_lang_Enum_2_classLit, values_52, valueOf_44); function $clinit_EdgeStraighteningStrategy$Map(){ $clinit_EdgeStraighteningStrategy$Map = emptyMethod; $MAP_34 = createValueOfMap(($clinit_EdgeStraighteningStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_EdgeStraighteningStrategy_2_classLit, 1), $intern_37, 488, 0, [NONE_3, IMPROVE_STRAIGHTNESS]))); } var $MAP_34; function $clinit_FixedAlignment(){ $clinit_FixedAlignment = emptyMethod; NONE_4 = new FixedAlignment('NONE', 0); LEFTUP = new FixedAlignment('LEFTUP', 1); RIGHTUP = new FixedAlignment('RIGHTUP', 2); LEFTDOWN = new FixedAlignment('LEFTDOWN', 3); RIGHTDOWN = new FixedAlignment('RIGHTDOWN', 4); BALANCED = new FixedAlignment('BALANCED', 5); } function FixedAlignment(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_45(name_0){ $clinit_FixedAlignment(); return valueOf(($clinit_FixedAlignment$Map() , $MAP_35), name_0); } function values_53(){ $clinit_FixedAlignment(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_FixedAlignment_2_classLit, 1), $intern_37, 281, 0, [NONE_4, LEFTUP, RIGHTUP, LEFTDOWN, RIGHTDOWN, BALANCED]); } defineClass(281, 22, {3:1, 34:1, 22:1, 281:1}, FixedAlignment); var BALANCED, LEFTDOWN, LEFTUP, NONE_4, RIGHTDOWN, RIGHTUP; var Lorg_eclipse_elk_alg_layered_options_FixedAlignment_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'FixedAlignment', 281, Ljava_lang_Enum_2_classLit, values_53, valueOf_45); function $clinit_FixedAlignment$Map(){ $clinit_FixedAlignment$Map = emptyMethod; $MAP_35 = createValueOfMap(($clinit_FixedAlignment() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_FixedAlignment_2_classLit, 1), $intern_37, 281, 0, [NONE_4, LEFTUP, RIGHTUP, LEFTDOWN, RIGHTDOWN, BALANCED]))); } var $MAP_35; function $clinit_GraphCompactionStrategy(){ $clinit_GraphCompactionStrategy = emptyMethod; NONE_5 = new GraphCompactionStrategy('NONE', 0); LEFT_2 = new GraphCompactionStrategy('LEFT', 1); RIGHT_2 = new GraphCompactionStrategy('RIGHT', 2); LEFT_RIGHT_CONSTRAINT_LOCKING = new GraphCompactionStrategy('LEFT_RIGHT_CONSTRAINT_LOCKING', 3); LEFT_RIGHT_CONNECTION_LOCKING = new GraphCompactionStrategy('LEFT_RIGHT_CONNECTION_LOCKING', 4); EDGE_LENGTH = new GraphCompactionStrategy('EDGE_LENGTH', 5); } function GraphCompactionStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_46(name_0){ $clinit_GraphCompactionStrategy(); return valueOf(($clinit_GraphCompactionStrategy$Map() , $MAP_36), name_0); } function values_54(){ $clinit_GraphCompactionStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_GraphCompactionStrategy_2_classLit, 1), $intern_37, 282, 0, [NONE_5, LEFT_2, RIGHT_2, LEFT_RIGHT_CONSTRAINT_LOCKING, LEFT_RIGHT_CONNECTION_LOCKING, EDGE_LENGTH]); } defineClass(282, 22, {3:1, 34:1, 22:1, 282:1}, GraphCompactionStrategy); var EDGE_LENGTH, LEFT_2, LEFT_RIGHT_CONNECTION_LOCKING, LEFT_RIGHT_CONSTRAINT_LOCKING, NONE_5, RIGHT_2; var Lorg_eclipse_elk_alg_layered_options_GraphCompactionStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'GraphCompactionStrategy', 282, Ljava_lang_Enum_2_classLit, values_54, valueOf_46); function $clinit_GraphCompactionStrategy$Map(){ $clinit_GraphCompactionStrategy$Map = emptyMethod; $MAP_36 = createValueOfMap(($clinit_GraphCompactionStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_GraphCompactionStrategy_2_classLit, 1), $intern_37, 282, 0, [NONE_5, LEFT_2, RIGHT_2, LEFT_RIGHT_CONSTRAINT_LOCKING, LEFT_RIGHT_CONNECTION_LOCKING, EDGE_LENGTH]))); } var $MAP_36; function $clinit_GraphProperties(){ $clinit_GraphProperties = emptyMethod; COMMENTS = new GraphProperties('COMMENTS', 0); EXTERNAL_PORTS = new GraphProperties('EXTERNAL_PORTS', 1); HYPEREDGES = new GraphProperties('HYPEREDGES', 2); HYPERNODES = new GraphProperties('HYPERNODES', 3); NON_FREE_PORTS = new GraphProperties('NON_FREE_PORTS', 4); NORTH_SOUTH_PORTS = new GraphProperties('NORTH_SOUTH_PORTS', 5); SELF_LOOPS = new GraphProperties('SELF_LOOPS', 6); CENTER_LABELS = new GraphProperties('CENTER_LABELS', 7); END_LABELS = new GraphProperties('END_LABELS', 8); PARTITIONS = new GraphProperties('PARTITIONS', 9); } function GraphProperties(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_47(name_0){ $clinit_GraphProperties(); return valueOf(($clinit_GraphProperties$Map() , $MAP_37), name_0); } function values_55(){ $clinit_GraphProperties(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_GraphProperties_2_classLit, 1), $intern_37, 259, 0, [COMMENTS, EXTERNAL_PORTS, HYPEREDGES, HYPERNODES, NON_FREE_PORTS, NORTH_SOUTH_PORTS, SELF_LOOPS, CENTER_LABELS, END_LABELS, PARTITIONS]); } defineClass(259, 22, {3:1, 34:1, 22:1, 259:1}, GraphProperties); var CENTER_LABELS, COMMENTS, END_LABELS, EXTERNAL_PORTS, HYPEREDGES, HYPERNODES, NON_FREE_PORTS, NORTH_SOUTH_PORTS, PARTITIONS, SELF_LOOPS; var Lorg_eclipse_elk_alg_layered_options_GraphProperties_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'GraphProperties', 259, Ljava_lang_Enum_2_classLit, values_55, valueOf_47); function $clinit_GraphProperties$Map(){ $clinit_GraphProperties$Map = emptyMethod; $MAP_37 = createValueOfMap(($clinit_GraphProperties() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_GraphProperties_2_classLit, 1), $intern_37, 259, 0, [COMMENTS, EXTERNAL_PORTS, HYPEREDGES, HYPERNODES, NON_FREE_PORTS, NORTH_SOUTH_PORTS, SELF_LOOPS, CENTER_LABELS, END_LABELS, PARTITIONS]))); } var $MAP_37; function $clinit_GreedySwitchType(){ $clinit_GreedySwitchType = emptyMethod; ONE_SIDED = new GreedySwitchType('ONE_SIDED', 0); TWO_SIDED = new GreedySwitchType('TWO_SIDED', 1); OFF = new GreedySwitchType('OFF', 2); } function GreedySwitchType(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_48(name_0){ $clinit_GreedySwitchType(); return valueOf(($clinit_GreedySwitchType$Map() , $MAP_38), name_0); } function values_56(){ $clinit_GreedySwitchType(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_GreedySwitchType_2_classLit, 1), $intern_37, 299, 0, [ONE_SIDED, TWO_SIDED, OFF]); } defineClass(299, 22, {3:1, 34:1, 22:1, 299:1}, GreedySwitchType); var OFF, ONE_SIDED, TWO_SIDED; var Lorg_eclipse_elk_alg_layered_options_GreedySwitchType_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'GreedySwitchType', 299, Ljava_lang_Enum_2_classLit, values_56, valueOf_48); function $clinit_GreedySwitchType$Map(){ $clinit_GreedySwitchType$Map = emptyMethod; $MAP_38 = createValueOfMap(($clinit_GreedySwitchType() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_GreedySwitchType_2_classLit, 1), $intern_37, 299, 0, [ONE_SIDED, TWO_SIDED, OFF]))); } var $MAP_38; function $clinit_InLayerConstraint(){ $clinit_InLayerConstraint = emptyMethod; NONE_6 = new InLayerConstraint('NONE', 0); TOP_1 = new InLayerConstraint('TOP', 1); BOTTOM_0 = new InLayerConstraint('BOTTOM', 2); } function InLayerConstraint(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_49(name_0){ $clinit_InLayerConstraint(); return valueOf(($clinit_InLayerConstraint$Map() , $MAP_39), name_0); } function values_57(){ $clinit_InLayerConstraint(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_InLayerConstraint_2_classLit, 1), $intern_37, 311, 0, [NONE_6, TOP_1, BOTTOM_0]); } defineClass(311, 22, {3:1, 34:1, 22:1, 311:1}, InLayerConstraint); var BOTTOM_0, NONE_6, TOP_1; var Lorg_eclipse_elk_alg_layered_options_InLayerConstraint_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'InLayerConstraint', 311, Ljava_lang_Enum_2_classLit, values_57, valueOf_49); function $clinit_InLayerConstraint$Map(){ $clinit_InLayerConstraint$Map = emptyMethod; $MAP_39 = createValueOfMap(($clinit_InLayerConstraint() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_InLayerConstraint_2_classLit, 1), $intern_37, 311, 0, [NONE_6, TOP_1, BOTTOM_0]))); } var $MAP_39; function $clinit_InteractiveReferencePoint(){ $clinit_InteractiveReferencePoint = emptyMethod; CENTER_3 = new InteractiveReferencePoint('CENTER', 0); TOP_LEFT = new InteractiveReferencePoint('TOP_LEFT', 1); } function InteractiveReferencePoint(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_50(name_0){ $clinit_InteractiveReferencePoint(); return valueOf(($clinit_InteractiveReferencePoint$Map() , $MAP_40), name_0); } function values_58(){ $clinit_InteractiveReferencePoint(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_InteractiveReferencePoint_2_classLit, 1), $intern_37, 429, 0, [CENTER_3, TOP_LEFT]); } defineClass(429, 22, {3:1, 34:1, 22:1, 429:1}, InteractiveReferencePoint); var CENTER_3, TOP_LEFT; var Lorg_eclipse_elk_alg_layered_options_InteractiveReferencePoint_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'InteractiveReferencePoint', 429, Ljava_lang_Enum_2_classLit, values_58, valueOf_50); function $clinit_InteractiveReferencePoint$Map(){ $clinit_InteractiveReferencePoint$Map = emptyMethod; $MAP_40 = createValueOfMap(($clinit_InteractiveReferencePoint() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_InteractiveReferencePoint_2_classLit, 1), $intern_37, 429, 0, [CENTER_3, TOP_LEFT]))); } var $MAP_40; function $clinit_InternalProperties_1(){ $clinit_InternalProperties_1 = emptyMethod; var all, all0; ORIGIN_0 = new Property('origin'); COORDINATE_SYSTEM_ORIGIN = new Property('coordinateOrigin'); PROCESSORS = new Property('processors'); COMPOUND_NODE = new Property_0('compoundNode', ($clinit_Boolean() , false)); INSIDE_CONNECTIONS = new Property_0('insideConnections', false); ORIGINAL_BENDPOINTS = new Property('originalBendpoints'); ORIGINAL_DUMMY_NODE_POSITION = new Property('originalDummyNodePosition'); ORIGINAL_LABEL_EDGE = new Property('originalLabelEdge'); REPRESENTED_LABELS = new Property('representedLabels'); END_LABELS_0 = new Property('endLabels'); END_LABEL_EDGE = new Property('endLabel.origin'); LABEL_SIDE = new Property_0('labelSide', ($clinit_LabelSide() , UNKNOWN)); MAX_EDGE_THICKNESS = new Property_0('maxEdgeThickness', 0); REVERSED = new Property_0('reversed', false); RANDOM_0 = new Property('random'); LONG_EDGE_SOURCE = new Property_0('longEdgeSource', null); LONG_EDGE_TARGET = new Property_0('longEdgeTarget', null); LONG_EDGE_HAS_LABEL_DUMMIES = new Property_0('longEdgeHasLabelDummies', false); LONG_EDGE_BEFORE_LABEL_DUMMY = new Property_0('longEdgeBeforeLabelDummy', false); EDGE_CONSTRAINT = new Property_0('edgeConstraint', ($clinit_EdgeConstraint() , NONE_2)); IN_LAYER_LAYOUT_UNIT = new Property('inLayerLayoutUnit'); IN_LAYER_CONSTRAINT = new Property_0('inLayerConstraint', ($clinit_InLayerConstraint() , NONE_6)); IN_LAYER_SUCCESSOR_CONSTRAINTS = new Property_0('inLayerSuccessorConstraint', new ArrayList); IN_LAYER_SUCCESSOR_CONSTRAINTS_BETWEEN_NON_DUMMIES = new Property_0('inLayerSuccessorConstraintBetweenNonDummies', false); PORT_DUMMY = new Property('portDummy'); CROSSING_HINT = new Property_0('crossingHint', valueOf_3(0)); GRAPH_PROPERTIES = new Property_0('graphProperties', (all0 = castTo($getEnumConstants(Lorg_eclipse_elk_alg_layered_options_GraphProperties_2_classLit), 9) , new EnumSet$EnumSetImpl(all0, castTo(createFrom(all0, all0.length), 9), 0))); EXT_PORT_SIDE = new Property_0('externalPortSide', ($clinit_PortSide() , UNDEFINED_5)); EXT_PORT_SIZE = new Property_0('externalPortSize', new KVector); EXT_PORT_REPLACED_DUMMIES = new Property('externalPortReplacedDummies'); EXT_PORT_REPLACED_DUMMY = new Property('externalPortReplacedDummy'); EXT_PORT_CONNECTIONS = new Property_0('externalPortConnections', (all = castTo($getEnumConstants(Lorg_eclipse_elk_core_options_PortSide_2_classLit), 9) , new EnumSet$EnumSetImpl(all, castTo(createFrom(all, all.length), 9), 0))); PORT_RATIO_OR_POSITION_0 = new Property_0('portRatioOrPosition', 0); BARYCENTER_ASSOCIATES = new Property('barycenterAssociates'); TOP_COMMENTS = new Property('TopSideComments'); BOTTOM_COMMENTS = new Property('BottomSideComments'); COMMENT_CONN_PORT = new Property('CommentConnectionPort'); INPUT_COLLECT = new Property_0('inputCollect', false); OUTPUT_COLLECT = new Property_0('outputCollect', false); CYCLIC = new Property_0('cyclic', false); CROSS_HIERARCHY_MAP = new Property('crossHierarchyMap'); TARGET_OFFSET = new Property('targetOffset'); new Property_0('splineLabelSize', new KVector); SPACINGS = new Property('spacings'); PARTITION_DUMMY = new Property_0('partitionConstraint', false); BREAKING_POINT_INFO = new Property('breakingPoint.info'); SPLINE_SURVIVING_EDGE = new Property('splines.survivingEdge'); SPLINE_ROUTE_START = new Property('splines.route.start'); SPLINE_EDGE_CHAIN = new Property('splines.edgeChain'); ORIGINAL_PORT_CONSTRAINTS = new Property('originalPortConstraints'); SELF_LOOP_HOLDER = new Property('selfLoopHolder'); SPLINE_NS_PORT_Y_COORD = new Property('splines.nsPortY'); MODEL_ORDER_1 = new Property('modelOrder'); LONG_EDGE_TARGET_NODE = new Property('longEdgeTargetNode'); FIRST_TRY_WITH_INITIAL_ORDER = new Property_0('firstTryWithInitialOrder', false); SECOND_TRY_WITH_INITIAL_ORDER = new Property_0('firstTryWithInitialOrder', false); HIDDEN_NODES = new Property('layerConstraints.hiddenNodes'); ORIGINAL_OPPOSITE_PORT = new Property('layerConstraints.opposidePort'); TARGET_NODE_MODEL_ORDER = new Property('targetNode.modelOrder'); } var BARYCENTER_ASSOCIATES, BOTTOM_COMMENTS, BREAKING_POINT_INFO, COMMENT_CONN_PORT, COMPOUND_NODE, COORDINATE_SYSTEM_ORIGIN, CROSSING_HINT, CROSS_HIERARCHY_MAP, CYCLIC, EDGE_CONSTRAINT, END_LABELS_0, END_LABEL_EDGE, EXT_PORT_CONNECTIONS, EXT_PORT_REPLACED_DUMMIES, EXT_PORT_REPLACED_DUMMY, EXT_PORT_SIDE, EXT_PORT_SIZE, FIRST_TRY_WITH_INITIAL_ORDER, GRAPH_PROPERTIES, HIDDEN_NODES, INPUT_COLLECT, INSIDE_CONNECTIONS, IN_LAYER_CONSTRAINT, IN_LAYER_LAYOUT_UNIT, IN_LAYER_SUCCESSOR_CONSTRAINTS, IN_LAYER_SUCCESSOR_CONSTRAINTS_BETWEEN_NON_DUMMIES, LABEL_SIDE, LONG_EDGE_BEFORE_LABEL_DUMMY, LONG_EDGE_HAS_LABEL_DUMMIES, LONG_EDGE_SOURCE, LONG_EDGE_TARGET, LONG_EDGE_TARGET_NODE, MAX_EDGE_THICKNESS, MODEL_ORDER_1, ORIGIN_0, ORIGINAL_BENDPOINTS, ORIGINAL_DUMMY_NODE_POSITION, ORIGINAL_LABEL_EDGE, ORIGINAL_OPPOSITE_PORT, ORIGINAL_PORT_CONSTRAINTS, OUTPUT_COLLECT, PARTITION_DUMMY, PORT_DUMMY, PORT_RATIO_OR_POSITION_0, PROCESSORS, RANDOM_0, REPRESENTED_LABELS, REVERSED, SECOND_TRY_WITH_INITIAL_ORDER, SELF_LOOP_HOLDER, SPACINGS, SPLINE_EDGE_CHAIN, SPLINE_NS_PORT_Y_COORD, SPLINE_ROUTE_START, SPLINE_SURVIVING_EDGE, TARGET_NODE_MODEL_ORDER, TARGET_OFFSET, TOP_COMMENTS; function $clinit_LayerConstraint(){ $clinit_LayerConstraint = emptyMethod; NONE_7 = new LayerConstraint('NONE', 0); FIRST = new LayerConstraint('FIRST', 1); FIRST_SEPARATE_0 = new LayerConstraint('FIRST_SEPARATE', 2); LAST = new LayerConstraint('LAST', 3); LAST_SEPARATE_0 = new LayerConstraint('LAST_SEPARATE', 4); } function LayerConstraint(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_51(name_0){ $clinit_LayerConstraint(); return valueOf(($clinit_LayerConstraint$Map() , $MAP_41), name_0); } function values_59(){ $clinit_LayerConstraint(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_LayerConstraint_2_classLit, 1), $intern_37, 171, 0, [NONE_7, FIRST, FIRST_SEPARATE_0, LAST, LAST_SEPARATE_0]); } defineClass(171, 22, {3:1, 34:1, 22:1, 171:1}, LayerConstraint); var FIRST, FIRST_SEPARATE_0, LAST, LAST_SEPARATE_0, NONE_7; var Lorg_eclipse_elk_alg_layered_options_LayerConstraint_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'LayerConstraint', 171, Ljava_lang_Enum_2_classLit, values_59, valueOf_51); function $clinit_LayerConstraint$Map(){ $clinit_LayerConstraint$Map = emptyMethod; $MAP_41 = createValueOfMap(($clinit_LayerConstraint() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_LayerConstraint_2_classLit, 1), $intern_37, 171, 0, [NONE_7, FIRST, FIRST_SEPARATE_0, LAST, LAST_SEPARATE_0]))); } var $MAP_41; function $clinit_LayeredMetaDataProvider(){ $clinit_LayeredMetaDataProvider = emptyMethod; DIRECTION_CONGRUENCY_DEFAULT = ($clinit_DirectionCongruency() , READING_DIRECTION); DIRECTION_CONGRUENCY = new Property_1('org.eclipse.elk.layered.directionCongruency', DIRECTION_CONGRUENCY_DEFAULT); FEEDBACK_EDGES = new Property_1('org.eclipse.elk.layered.feedbackEdges', ($clinit_Boolean() , false)); INTERACTIVE_REFERENCE_POINT_DEFAULT = ($clinit_InteractiveReferencePoint() , CENTER_3); INTERACTIVE_REFERENCE_POINT = new Property_1('org.eclipse.elk.layered.interactiveReferencePoint', INTERACTIVE_REFERENCE_POINT_DEFAULT); MERGE_EDGES = new Property_1('org.eclipse.elk.layered.mergeEdges', false); MERGE_HIERARCHY_EDGES = new Property_1('org.eclipse.elk.layered.mergeHierarchyEdges', true); ALLOW_NON_FLOW_PORTS_TO_SWITCH_SIDES = new Property_1('org.eclipse.elk.layered.allowNonFlowPortsToSwitchSides', false); PORT_SORTING_STRATEGY_DEFAULT = ($clinit_PortSortingStrategy() , INPUT_ORDER); PORT_SORTING_STRATEGY = new Property_1('org.eclipse.elk.layered.portSortingStrategy', PORT_SORTING_STRATEGY_DEFAULT); valueOf_3(1); THOROUGHNESS = new Property_1('org.eclipse.elk.layered.thoroughness', valueOf_3(7)); UNNECESSARY_BENDPOINTS = new Property_1('org.eclipse.elk.layered.unnecessaryBendpoints', false); GENERATE_POSITION_AND_LAYER_IDS = new Property_1('org.eclipse.elk.layered.generatePositionAndLayerIds', false); CYCLE_BREAKING_STRATEGY_DEFAULT = ($clinit_CycleBreakingStrategy() , GREEDY); CYCLE_BREAKING_STRATEGY = new Property_1('org.eclipse.elk.layered.cycleBreaking.strategy', CYCLE_BREAKING_STRATEGY_DEFAULT); LAYERING_STRATEGY_DEFAULT = ($clinit_LayeringStrategy() , NETWORK_SIMPLEX); LAYERING_STRATEGY = new Property_1('org.eclipse.elk.layered.layering.strategy', LAYERING_STRATEGY_DEFAULT); LAYERING_LAYER_CONSTRAINT_DEFAULT = ($clinit_LayerConstraint() , NONE_7); LAYERING_LAYER_CONSTRAINT = new Property_1('org.eclipse.elk.layered.layering.layerConstraint', LAYERING_LAYER_CONSTRAINT_DEFAULT); valueOf_3(-1); LAYERING_LAYER_CHOICE_CONSTRAINT = new Property_1('org.eclipse.elk.layered.layering.layerChoiceConstraint', null); valueOf_3(-1); LAYERING_LAYER_ID = new Property_1('org.eclipse.elk.layered.layering.layerId', valueOf_3(-1)); valueOf_3(-1); LAYERING_MIN_WIDTH_UPPER_BOUND_ON_WIDTH = new Property_1('org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth', valueOf_3(4)); valueOf_3(-1); LAYERING_MIN_WIDTH_UPPER_LAYER_ESTIMATION_SCALING_FACTOR = new Property_1('org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor', valueOf_3(2)); LAYERING_NODE_PROMOTION_STRATEGY_DEFAULT = ($clinit_NodePromotionStrategy() , NONE_9); LAYERING_NODE_PROMOTION_STRATEGY = new Property_1('org.eclipse.elk.layered.layering.nodePromotion.strategy', LAYERING_NODE_PROMOTION_STRATEGY_DEFAULT); valueOf_3(0); LAYERING_NODE_PROMOTION_MAX_ITERATIONS = new Property_1('org.eclipse.elk.layered.layering.nodePromotion.maxIterations', valueOf_3(0)); LAYERING_COFFMAN_GRAHAM_LAYER_BOUND = new Property_1('org.eclipse.elk.layered.layering.coffmanGraham.layerBound', valueOf_3($intern_0)); CROSSING_MINIMIZATION_STRATEGY_DEFAULT = ($clinit_CrossingMinimizationStrategy() , LAYER_SWEEP); CROSSING_MINIMIZATION_STRATEGY = new Property_1('org.eclipse.elk.layered.crossingMinimization.strategy', CROSSING_MINIMIZATION_STRATEGY_DEFAULT); CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER = new Property_1('org.eclipse.elk.layered.crossingMinimization.forceNodeModelOrder', false); CROSSING_MINIMIZATION_HIERARCHICAL_SWEEPINESS = new Property_1('org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness', 0.1); CROSSING_MINIMIZATION_SEMI_INTERACTIVE = new Property_1('org.eclipse.elk.layered.crossingMinimization.semiInteractive', false); CROSSING_MINIMIZATION_IN_LAYER_PRED_OF = new Property_1('org.eclipse.elk.layered.crossingMinimization.inLayerPredOf', null); CROSSING_MINIMIZATION_IN_LAYER_SUCC_OF = new Property_1('org.eclipse.elk.layered.crossingMinimization.inLayerSuccOf', null); valueOf_3(-1); CROSSING_MINIMIZATION_POSITION_CHOICE_CONSTRAINT = new Property_1('org.eclipse.elk.layered.crossingMinimization.positionChoiceConstraint', null); valueOf_3(-1); CROSSING_MINIMIZATION_POSITION_ID = new Property_1('org.eclipse.elk.layered.crossingMinimization.positionId', valueOf_3(-1)); valueOf_3(0); CROSSING_MINIMIZATION_GREEDY_SWITCH_ACTIVATION_THRESHOLD = new Property_1('org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold', valueOf_3(40)); CROSSING_MINIMIZATION_GREEDY_SWITCH_TYPE_DEFAULT = ($clinit_GreedySwitchType() , TWO_SIDED); CROSSING_MINIMIZATION_GREEDY_SWITCH_TYPE = new Property_1('org.eclipse.elk.layered.crossingMinimization.greedySwitch.type', CROSSING_MINIMIZATION_GREEDY_SWITCH_TYPE_DEFAULT); CROSSING_MINIMIZATION_GREEDY_SWITCH_HIERARCHICAL_TYPE_DEFAULT = OFF; CROSSING_MINIMIZATION_GREEDY_SWITCH_HIERARCHICAL_TYPE = new Property_1('org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type', CROSSING_MINIMIZATION_GREEDY_SWITCH_HIERARCHICAL_TYPE_DEFAULT); NODE_PLACEMENT_STRATEGY_DEFAULT = ($clinit_NodePlacementStrategy() , BRANDES_KOEPF); NODE_PLACEMENT_STRATEGY = new Property_1('org.eclipse.elk.layered.nodePlacement.strategy', NODE_PLACEMENT_STRATEGY_DEFAULT); NODE_PLACEMENT_FAVOR_STRAIGHT_EDGES = new Property('org.eclipse.elk.layered.nodePlacement.favorStraightEdges'); NODE_PLACEMENT_BK_EDGE_STRAIGHTENING_DEFAULT = ($clinit_EdgeStraighteningStrategy() , IMPROVE_STRAIGHTNESS); NODE_PLACEMENT_BK_EDGE_STRAIGHTENING = new Property_1('org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening', NODE_PLACEMENT_BK_EDGE_STRAIGHTENING_DEFAULT); NODE_PLACEMENT_BK_FIXED_ALIGNMENT_DEFAULT = ($clinit_FixedAlignment() , NONE_4); NODE_PLACEMENT_BK_FIXED_ALIGNMENT = new Property_1('org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment', NODE_PLACEMENT_BK_FIXED_ALIGNMENT_DEFAULT); new ExclusiveBounds$ExclusiveLowerBound; NODE_PLACEMENT_LINEAR_SEGMENTS_DEFLECTION_DAMPENING = new Property_1('org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening', 0.3); NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY = new Property('org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility'); NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEFAULT_DEFAULT = ($clinit_NodeFlexibility() , NONE_8); NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEFAULT = new Property_1('org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default', NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEFAULT_DEFAULT); EDGE_ROUTING_SELF_LOOP_DISTRIBUTION_DEFAULT = ($clinit_SelfLoopDistributionStrategy() , NORTH_2); EDGE_ROUTING_SELF_LOOP_DISTRIBUTION = new Property_1('org.eclipse.elk.layered.edgeRouting.selfLoopDistribution', EDGE_ROUTING_SELF_LOOP_DISTRIBUTION_DEFAULT); EDGE_ROUTING_SELF_LOOP_ORDERING_DEFAULT = ($clinit_SelfLoopOrderingStrategy() , STACKED); EDGE_ROUTING_SELF_LOOP_ORDERING = new Property_1('org.eclipse.elk.layered.edgeRouting.selfLoopOrdering', EDGE_ROUTING_SELF_LOOP_ORDERING_DEFAULT); EDGE_ROUTING_SPLINES_MODE_DEFAULT = ($clinit_SplineRoutingMode() , SLOPPY); EDGE_ROUTING_SPLINES_MODE = new Property_1('org.eclipse.elk.layered.edgeRouting.splines.mode', EDGE_ROUTING_SPLINES_MODE_DEFAULT); EDGE_ROUTING_SPLINES_SLOPPY_LAYER_SPACING_FACTOR = new Property_1('org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor', 0.2); EDGE_ROUTING_POLYLINE_SLOPED_EDGE_ZONE_WIDTH = new Property_1('org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth', 2); SPACING_BASE_VALUE = new Property_1('org.eclipse.elk.layered.spacing.baseValue', null); SPACING_EDGE_NODE_BETWEEN_LAYERS = new Property_1('org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers', 10); SPACING_EDGE_EDGE_BETWEEN_LAYERS = new Property_1('org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers', 10); SPACING_NODE_NODE_BETWEEN_LAYERS = new Property_1('org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers', 20); valueOf_3(0); PRIORITY_DIRECTION = new Property_1('org.eclipse.elk.layered.priority.direction', valueOf_3(0)); valueOf_3(0); PRIORITY_SHORTNESS = new Property_1('org.eclipse.elk.layered.priority.shortness', valueOf_3(0)); valueOf_3(0); PRIORITY_STRAIGHTNESS = new Property_1('org.eclipse.elk.layered.priority.straightness', valueOf_3(0)); COMPACTION_CONNECTED_COMPONENTS = new Property_1('org.eclipse.elk.layered.compaction.connectedComponents', false); COMPACTION_POST_COMPACTION_STRATEGY_DEFAULT = ($clinit_GraphCompactionStrategy() , NONE_5); COMPACTION_POST_COMPACTION_STRATEGY = new Property_1('org.eclipse.elk.layered.compaction.postCompaction.strategy', COMPACTION_POST_COMPACTION_STRATEGY_DEFAULT); COMPACTION_POST_COMPACTION_CONSTRAINTS_DEFAULT = ($clinit_ConstraintCalculationStrategy() , SCANLINE); COMPACTION_POST_COMPACTION_CONSTRAINTS = new Property_1('org.eclipse.elk.layered.compaction.postCompaction.constraints', COMPACTION_POST_COMPACTION_CONSTRAINTS_DEFAULT); HIGH_DEGREE_NODES_TREATMENT = new Property_1('org.eclipse.elk.layered.highDegreeNodes.treatment', false); valueOf_3(0); HIGH_DEGREE_NODES_THRESHOLD = new Property_1('org.eclipse.elk.layered.highDegreeNodes.threshold', valueOf_3(16)); valueOf_3(0); HIGH_DEGREE_NODES_TREE_HEIGHT = new Property_1('org.eclipse.elk.layered.highDegreeNodes.treeHeight', valueOf_3(5)); WRAPPING_STRATEGY_DEFAULT = ($clinit_WrappingStrategy() , OFF_0); WRAPPING_STRATEGY = new Property_1('org.eclipse.elk.layered.wrapping.strategy', WRAPPING_STRATEGY_DEFAULT); WRAPPING_ADDITIONAL_EDGE_SPACING = new Property_1('org.eclipse.elk.layered.wrapping.additionalEdgeSpacing', 10); WRAPPING_CORRECTION_FACTOR = new Property_1('org.eclipse.elk.layered.wrapping.correctionFactor', 1); WRAPPING_CUTTING_STRATEGY_DEFAULT = ($clinit_CuttingStrategy() , MSD); WRAPPING_CUTTING_STRATEGY = new Property_1('org.eclipse.elk.layered.wrapping.cutting.strategy', WRAPPING_CUTTING_STRATEGY_DEFAULT); WRAPPING_CUTTING_CUTS = new Property('org.eclipse.elk.layered.wrapping.cutting.cuts'); WRAPPING_CUTTING_MSD_FREEDOM_DEFAULT = valueOf_3(1); valueOf_3(0); WRAPPING_CUTTING_MSD_FREEDOM = new Property_1('org.eclipse.elk.layered.wrapping.cutting.msd.freedom', WRAPPING_CUTTING_MSD_FREEDOM_DEFAULT); WRAPPING_VALIDIFY_STRATEGY_DEFAULT = ($clinit_ValidifyStrategy() , GREEDY_0); WRAPPING_VALIDIFY_STRATEGY = new Property_1('org.eclipse.elk.layered.wrapping.validify.strategy', WRAPPING_VALIDIFY_STRATEGY_DEFAULT); WRAPPING_VALIDIFY_FORBIDDEN_INDICES = new Property('org.eclipse.elk.layered.wrapping.validify.forbiddenIndices'); WRAPPING_MULTI_EDGE_IMPROVE_CUTS = new Property_1('org.eclipse.elk.layered.wrapping.multiEdge.improveCuts', true); WRAPPING_MULTI_EDGE_DISTANCE_PENALTY = new Property_1('org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty', 2); WRAPPING_MULTI_EDGE_IMPROVE_WRAPPED_EDGES = new Property_1('org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges', true); EDGE_LABELS_SIDE_SELECTION_DEFAULT = ($clinit_EdgeLabelSideSelection() , SMART_DOWN); EDGE_LABELS_SIDE_SELECTION = new Property_1('org.eclipse.elk.layered.edgeLabels.sideSelection', EDGE_LABELS_SIDE_SELECTION_DEFAULT); EDGE_LABELS_CENTER_LABEL_PLACEMENT_STRATEGY_DEFAULT = ($clinit_CenterEdgeLabelPlacementStrategy() , MEDIAN_LAYER); EDGE_LABELS_CENTER_LABEL_PLACEMENT_STRATEGY = new Property_1('org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy', EDGE_LABELS_CENTER_LABEL_PLACEMENT_STRATEGY_DEFAULT); CONSIDER_MODEL_ORDER_STRATEGY_DEFAULT = ($clinit_OrderingStrategy() , NONE_10); CONSIDER_MODEL_ORDER_STRATEGY = new Property_1('org.eclipse.elk.layered.considerModelOrder.strategy', CONSIDER_MODEL_ORDER_STRATEGY_DEFAULT); CONSIDER_MODEL_ORDER_PORT_MODEL_ORDER = new Property_1('org.eclipse.elk.layered.considerModelOrder.portModelOrder', false); CONSIDER_MODEL_ORDER_NO_MODEL_ORDER = new Property_1('org.eclipse.elk.layered.considerModelOrder.noModelOrder', false); CONSIDER_MODEL_ORDER_COMPONENTS_DEFAULT = ($clinit_ComponentOrderingStrategy() , NONE); CONSIDER_MODEL_ORDER_COMPONENTS = new Property_1('org.eclipse.elk.layered.considerModelOrder.components', CONSIDER_MODEL_ORDER_COMPONENTS_DEFAULT); CONSIDER_MODEL_ORDER_LONG_EDGE_STRATEGY_DEFAULT = ($clinit_LongEdgeOrderingStrategy() , DUMMY_NODE_OVER); CONSIDER_MODEL_ORDER_LONG_EDGE_STRATEGY = new Property_1('org.eclipse.elk.layered.considerModelOrder.longEdgeStrategy', CONSIDER_MODEL_ORDER_LONG_EDGE_STRATEGY_DEFAULT); CONSIDER_MODEL_ORDER_CROSSING_COUNTER_NODE_INFLUENCE = new Property_1('org.eclipse.elk.layered.considerModelOrder.crossingCounterNodeInfluence', 0); CONSIDER_MODEL_ORDER_CROSSING_COUNTER_PORT_INFLUENCE = new Property_1('org.eclipse.elk.layered.considerModelOrder.crossingCounterPortInfluence', 0); INTERACTIVE_REFERENCE_POINT_DEP_CYCLE_BREAKING_STRATEGY_0 = INTERACTIVE_2; INTERACTIVE_REFERENCE_POINT_DEP_CROSSING_MINIMIZATION_STRATEGY_1 = INTERACTIVE_1; LAYERING_MIN_WIDTH_UPPER_BOUND_ON_WIDTH_DEP_LAYERING_STRATEGY_0 = MIN_WIDTH; LAYERING_MIN_WIDTH_UPPER_LAYER_ESTIMATION_SCALING_FACTOR_DEP_LAYERING_STRATEGY_0 = MIN_WIDTH; LAYERING_COFFMAN_GRAHAM_LAYER_BOUND_DEP_LAYERING_STRATEGY_0 = COFFMAN_GRAHAM; CROSSING_MINIMIZATION_HIERARCHICAL_SWEEPINESS_DEP_HIERARCHY_HANDLING_0 = ($clinit_HierarchyHandling() , INCLUDE_CHILDREN); CROSSING_MINIMIZATION_SEMI_INTERACTIVE_DEP_CROSSING_MINIMIZATION_STRATEGY_0 = LAYER_SWEEP; CROSSING_MINIMIZATION_GREEDY_SWITCH_TYPE_DEP_CROSSING_MINIMIZATION_STRATEGY_0 = LAYER_SWEEP; CROSSING_MINIMIZATION_GREEDY_SWITCH_HIERARCHICAL_TYPE_DEP_CROSSING_MINIMIZATION_STRATEGY_0 = LAYER_SWEEP; CROSSING_MINIMIZATION_GREEDY_SWITCH_HIERARCHICAL_TYPE_DEP_HIERARCHY_HANDLING_1 = INCLUDE_CHILDREN; NODE_PLACEMENT_FAVOR_STRAIGHT_EDGES_DEP_NODE_PLACEMENT_STRATEGY_0 = NETWORK_SIMPLEX_0; NODE_PLACEMENT_FAVOR_STRAIGHT_EDGES_DEP_NODE_PLACEMENT_STRATEGY_1 = BRANDES_KOEPF; NODE_PLACEMENT_BK_EDGE_STRAIGHTENING_DEP_NODE_PLACEMENT_STRATEGY_0 = BRANDES_KOEPF; NODE_PLACEMENT_BK_FIXED_ALIGNMENT_DEP_NODE_PLACEMENT_STRATEGY_0 = BRANDES_KOEPF; NODE_PLACEMENT_LINEAR_SEGMENTS_DEFLECTION_DAMPENING_DEP_NODE_PLACEMENT_STRATEGY_0 = LINEAR_SEGMENTS; NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEP_NODE_PLACEMENT_STRATEGY_0 = NETWORK_SIMPLEX_0; NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEFAULT_DEP_NODE_PLACEMENT_STRATEGY_0 = NETWORK_SIMPLEX_0; EDGE_ROUTING_SPLINES_MODE_DEP_EDGE_ROUTING_0 = ($clinit_EdgeRouting() , SPLINES); EDGE_ROUTING_SPLINES_SLOPPY_LAYER_SPACING_FACTOR_DEP_EDGE_ROUTING_0 = SPLINES; EDGE_ROUTING_SPLINES_SLOPPY_LAYER_SPACING_FACTOR_DEP_EDGE_ROUTING_SPLINES_MODE_1 = SLOPPY; EDGE_ROUTING_POLYLINE_SLOPED_EDGE_ZONE_WIDTH_DEP_EDGE_ROUTING_0 = POLYLINE; WRAPPING_ADDITIONAL_EDGE_SPACING_DEP_WRAPPING_STRATEGY_0 = SINGLE_EDGE; WRAPPING_ADDITIONAL_EDGE_SPACING_DEP_WRAPPING_STRATEGY_1 = MULTI_EDGE; WRAPPING_CORRECTION_FACTOR_DEP_WRAPPING_STRATEGY_0 = SINGLE_EDGE; WRAPPING_CORRECTION_FACTOR_DEP_WRAPPING_STRATEGY_1 = MULTI_EDGE; WRAPPING_CUTTING_STRATEGY_DEP_WRAPPING_STRATEGY_0 = SINGLE_EDGE; WRAPPING_CUTTING_STRATEGY_DEP_WRAPPING_STRATEGY_1 = MULTI_EDGE; WRAPPING_CUTTING_CUTS_DEP_WRAPPING_CUTTING_STRATEGY_0 = MANUAL; WRAPPING_CUTTING_MSD_FREEDOM_DEP_WRAPPING_CUTTING_STRATEGY_0 = MSD; WRAPPING_VALIDIFY_STRATEGY_DEP_WRAPPING_STRATEGY_0 = SINGLE_EDGE; WRAPPING_VALIDIFY_STRATEGY_DEP_WRAPPING_STRATEGY_1 = MULTI_EDGE; WRAPPING_VALIDIFY_FORBIDDEN_INDICES_DEP_WRAPPING_STRATEGY_0 = SINGLE_EDGE; WRAPPING_VALIDIFY_FORBIDDEN_INDICES_DEP_WRAPPING_STRATEGY_1 = MULTI_EDGE; WRAPPING_MULTI_EDGE_IMPROVE_CUTS_DEP_WRAPPING_STRATEGY_0 = MULTI_EDGE; WRAPPING_MULTI_EDGE_DISTANCE_PENALTY_DEP_WRAPPING_STRATEGY_0 = MULTI_EDGE; WRAPPING_MULTI_EDGE_IMPROVE_WRAPPED_EDGES_DEP_WRAPPING_STRATEGY_0 = MULTI_EDGE; } function LayeredMetaDataProvider(){ $clinit_LayeredMetaDataProvider(); } defineClass(859, 1, $intern_90, LayeredMetaDataProvider); _.apply_4 = function apply_131(registry){ $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.directionCongruency'), ''), 'Direction Congruency'), 'Specifies how drawings of the same graph with different layout directions compare to each other: either a natural reading direction is preserved or the drawings are rotated versions of each other.'), DIRECTION_CONGRUENCY_DEFAULT), ($clinit_LayoutOptionData$Type() , ENUM)), Lorg_eclipse_elk_alg_layered_options_DirectionCongruency_2_classLit), of_1(($clinit_LayoutOptionData$Target() , PARENTS))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.feedbackEdges'), ''), 'Feedback Edges'), 'Whether feedback edges should be highlighted by routing around the nodes.'), ($clinit_Boolean() , false)), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.interactiveReferencePoint'), ''), 'Interactive Reference Point'), 'Determines which point of a node is considered by interactive layout phases.'), INTERACTIVE_REFERENCE_POINT_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_InteractiveReferencePoint_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.interactiveReferencePoint', 'org.eclipse.elk.layered.cycleBreaking.strategy', INTERACTIVE_REFERENCE_POINT_DEP_CYCLE_BREAKING_STRATEGY_0); $addDependency(registry, 'org.eclipse.elk.layered.interactiveReferencePoint', 'org.eclipse.elk.layered.crossingMinimization.strategy', INTERACTIVE_REFERENCE_POINT_DEP_CROSSING_MINIMIZATION_STRATEGY_1); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.mergeEdges'), ''), 'Merge Edges'), 'Edges that have no ports are merged so they touch the connected nodes at the same points. When this option is disabled, one port is created for each edge directly connected to a node. When it is enabled, all such incoming edges share an input port, and all outgoing edges share an output port.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.mergeHierarchyEdges'), ''), 'Merge Hierarchy-Crossing Edges'), 'If hierarchical layout is active, hierarchy-crossing edges use as few hierarchical ports as possible. They are broken by the algorithm, with hierarchical ports inserted as required. Usually, one such port is created for each edge at each hierarchy crossing point. With this option set to true, we try to create as few hierarchical ports as possible in the process. In particular, all edges that form a hyperedge can share a port.'), true), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($legacyIds($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.allowNonFlowPortsToSwitchSides'), ''), 'Allow Non-Flow Ports To Switch Sides'), "Specifies whether non-flow ports may switch sides if their node's port constraints are either FIXED_SIDE or FIXED_ORDER. A non-flow port is a port on a side that is not part of the currently configured layout flow. For instance, given a left-to-right layout direction, north and south ports would be considered non-flow ports. Further note that the underlying criterium whether to switch sides or not solely relies on the minimization of edge crossings. Hence, edge length and other aesthetics criteria are not addressed."), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PORTS)), stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['org.eclipse.elk.layered.northOrSouthPort'])))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.portSortingStrategy'), ''), 'Port Sorting Strategy'), "Only relevant for nodes with FIXED_SIDE port constraints. Determines the way a node's ports are distributed on the sides of a node if their order is not prescribed. The option is set on parent nodes."), PORT_SORTING_STRATEGY_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_PortSortingStrategy_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.thoroughness'), ''), 'Thoroughness'), 'How much effort should be spent to produce a nice layout.'), valueOf_3(7)), INT), Ljava_lang_Integer_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.unnecessaryBendpoints'), ''), 'Add Unnecessary Bendpoints'), 'Adds bend points even if an edge does not change direction. If true, each long edge dummy will contribute a bend point to its edges and hierarchy-crossing edges will always get a bend point where they cross hierarchy boundaries. By default, bend points are only added where an edge changes direction.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.generatePositionAndLayerIds'), ''), 'Generate Position and Layer IDs'), 'If enabled position id and layer id are generated, which are usually only used internally when setting the interactiveLayout option. This option should be specified on the root node.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.cycleBreaking.strategy'), 'cycleBreaking'), 'Cycle Breaking Strategy'), 'Strategy for cycle breaking. Cycle breaking looks for cycles in the graph and determines which edges to reverse to break the cycles. Reversed edges will end up pointing to the opposite direction of regular edges (that is, reversed edges will point left if edges usually point right).'), CYCLE_BREAKING_STRATEGY_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_CycleBreakingStrategy_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.layering.strategy'), 'layering'), 'Node Layering Strategy'), 'Strategy for node layering.'), LAYERING_STRATEGY_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_LayeringStrategy_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.layering.layerConstraint'), 'layering'), 'Layer Constraint'), 'Determines a constraint on the placement of the node regarding the layering.'), LAYERING_LAYER_CONSTRAINT_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_LayerConstraint_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.layering.layerChoiceConstraint'), 'layering'), 'Layer Choice Constraint'), "Allows to set a constraint regarding the layer placement of a node. Let i be the value of teh constraint. Assumed the drawing has n layers and i < n. If set to i, it expresses that the node should be placed in i-th layer. Should i>=n be true then the node is placed in the last layer of the drawing. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."), null), INT), Ljava_lang_Integer_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.layering.layerId'), 'layering'), 'Layer ID'), 'Layer identifier that was calculated by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set.'), valueOf_3(-1)), INT), Ljava_lang_Integer_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth'), 'layering.minWidth'), 'Upper Bound On Width [MinWidth Layerer]'), "Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."), valueOf_3(4)), INT), Ljava_lang_Integer_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth', 'org.eclipse.elk.layered.layering.strategy', LAYERING_MIN_WIDTH_UPPER_BOUND_ON_WIDTH_DEP_LAYERING_STRATEGY_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor'), 'layering.minWidth'), 'Upper Layer Estimation Scaling Factor [MinWidth Layerer]'), "Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."), valueOf_3(2)), INT), Ljava_lang_Integer_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor', 'org.eclipse.elk.layered.layering.strategy', LAYERING_MIN_WIDTH_UPPER_LAYER_ESTIMATION_SCALING_FACTOR_DEP_LAYERING_STRATEGY_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.layering.nodePromotion.strategy'), 'layering.nodePromotion'), 'Node Promotion Strategy'), 'Reduces number of dummy nodes after layering phase (if possible).'), LAYERING_NODE_PROMOTION_STRATEGY_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_NodePromotionStrategy_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.layering.nodePromotion.maxIterations'), 'layering.nodePromotion'), 'Max Node Promotion Iterations'), 'Limits the number of iterations for node promotion.'), valueOf_3(0)), INT), Ljava_lang_Integer_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.layering.nodePromotion.maxIterations', 'org.eclipse.elk.layered.layering.nodePromotion.strategy', null); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.layering.coffmanGraham.layerBound'), 'layering.coffmanGraham'), 'Layer Bound'), 'The maximum number of nodes allowed per layer.'), valueOf_3($intern_0)), INT), Ljava_lang_Integer_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.layering.coffmanGraham.layerBound', 'org.eclipse.elk.layered.layering.strategy', LAYERING_COFFMAN_GRAHAM_LAYER_BOUND_DEP_LAYERING_STRATEGY_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.crossingMinimization.strategy'), 'crossingMinimization'), 'Crossing Minimization Strategy'), 'Strategy for crossing minimization.'), CROSSING_MINIMIZATION_STRATEGY_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_CrossingMinimizationStrategy_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.crossingMinimization.forceNodeModelOrder'), 'crossingMinimization'), 'Force Node Model Order'), 'The node order given by the model does not change to produce a better layout. E.g. if node A is before node B in the model this is not changed during crossing minimization. This assumes that the node model order is already respected before crossing minimization. This can be achieved by setting considerModelOrder.strategy to NODES_AND_EDGES.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness'), 'crossingMinimization'), 'Hierarchical Sweepiness'), 'How likely it is to use cross-hierarchy (1) vs bottom-up (-1).'), 0.1), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness', 'org.eclipse.elk.hierarchyHandling', CROSSING_MINIMIZATION_HIERARCHICAL_SWEEPINESS_DEP_HIERARCHY_HANDLING_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.crossingMinimization.semiInteractive'), 'crossingMinimization'), 'Semi-Interactive Crossing Minimization'), "Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.crossingMinimization.semiInteractive', 'org.eclipse.elk.layered.crossingMinimization.strategy', CROSSING_MINIMIZATION_SEMI_INTERACTIVE_DEP_CROSSING_MINIMIZATION_STRATEGY_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.crossingMinimization.inLayerPredOf'), 'crossingMinimization'), 'In Layer Predecessor of'), "Allows to set a constraint which specifies of which node the current node is the predecessor. If set to 's' then the node is the predecessor of 's' and is in the same layer"), null), STRING), Ljava_lang_String_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.crossingMinimization.inLayerSuccOf'), 'crossingMinimization'), 'In Layer Successor of'), "Allows to set a constraint which specifies of which node the current node is the successor. If set to 's' then the node is the successor of 's' and is in the same layer"), null), STRING), Ljava_lang_String_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.crossingMinimization.positionChoiceConstraint'), 'crossingMinimization'), 'Position Choice Constraint'), "Allows to set a constraint regarding the position placement of a node in a layer. Assumed the layer in which the node placed includes n other nodes and i < n. If set to i, it expresses that the node should be placed at the i-th position. Should i>=n be true then the node is placed at the last position in the layer. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."), null), INT), Ljava_lang_Integer_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.crossingMinimization.positionId'), 'crossingMinimization'), 'Position ID'), 'Position within a layer that was determined by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set.'), valueOf_3(-1)), INT), Ljava_lang_Integer_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold'), 'crossingMinimization.greedySwitch'), 'Greedy Switch Activation Threshold'), "By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."), valueOf_3(40)), INT), Ljava_lang_Integer_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.crossingMinimization.greedySwitch.type'), 'crossingMinimization.greedySwitch'), 'Greedy Switch Crossing Minimization'), "Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular crossing minimization as a post-processor. Note that if 'hierarchyHandling' is set to 'INCLUDE_CHILDREN', the 'greedySwitchHierarchical.type' option must be used."), CROSSING_MINIMIZATION_GREEDY_SWITCH_TYPE_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_GreedySwitchType_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.crossingMinimization.greedySwitch.type', 'org.eclipse.elk.layered.crossingMinimization.strategy', CROSSING_MINIMIZATION_GREEDY_SWITCH_TYPE_DEP_CROSSING_MINIMIZATION_STRATEGY_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type'), 'crossingMinimization.greedySwitchHierarchical'), 'Greedy Switch Crossing Minimization (hierarchical)'), "Activates the greedy switch heuristic in case hierarchical layout is used. The differences to the non-hierarchical case (see 'greedySwitch.type') are: 1) greedy switch is inactive by default, 3) only the option value set on the node at which hierarchical layout starts is relevant, and 2) if it's activated by the user, it properly addresses hierarchy-crossing edges."), CROSSING_MINIMIZATION_GREEDY_SWITCH_HIERARCHICAL_TYPE_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_GreedySwitchType_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type', 'org.eclipse.elk.layered.crossingMinimization.strategy', CROSSING_MINIMIZATION_GREEDY_SWITCH_HIERARCHICAL_TYPE_DEP_CROSSING_MINIMIZATION_STRATEGY_0); $addDependency(registry, 'org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type', 'org.eclipse.elk.hierarchyHandling', CROSSING_MINIMIZATION_GREEDY_SWITCH_HIERARCHICAL_TYPE_DEP_HIERARCHY_HANDLING_1); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.nodePlacement.strategy'), 'nodePlacement'), 'Node Placement Strategy'), 'Strategy for node placement.'), NODE_PLACEMENT_STRATEGY_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_NodePlacementStrategy_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.nodePlacement.favorStraightEdges'), 'nodePlacement'), 'Favor Straight Edges Over Balancing'), "Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.nodePlacement.favorStraightEdges', 'org.eclipse.elk.layered.nodePlacement.strategy', NODE_PLACEMENT_FAVOR_STRAIGHT_EDGES_DEP_NODE_PLACEMENT_STRATEGY_0); $addDependency(registry, 'org.eclipse.elk.layered.nodePlacement.favorStraightEdges', 'org.eclipse.elk.layered.nodePlacement.strategy', NODE_PLACEMENT_FAVOR_STRAIGHT_EDGES_DEP_NODE_PLACEMENT_STRATEGY_1); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening'), 'nodePlacement.bk'), 'BK Edge Straightening'), "Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."), NODE_PLACEMENT_BK_EDGE_STRAIGHTENING_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_EdgeStraighteningStrategy_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening', 'org.eclipse.elk.layered.nodePlacement.strategy', NODE_PLACEMENT_BK_EDGE_STRAIGHTENING_DEP_NODE_PLACEMENT_STRATEGY_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment'), 'nodePlacement.bk'), 'BK Fixed Alignment'), 'Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four.'), NODE_PLACEMENT_BK_FIXED_ALIGNMENT_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_FixedAlignment_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment', 'org.eclipse.elk.layered.nodePlacement.strategy', NODE_PLACEMENT_BK_FIXED_ALIGNMENT_DEP_NODE_PLACEMENT_STRATEGY_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening'), 'nodePlacement.linearSegments'), 'Linear Segments Deflection Dampening'), 'Dampens the movement of nodes to keep the diagram from getting too large.'), 0.3), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening', 'org.eclipse.elk.layered.nodePlacement.strategy', NODE_PLACEMENT_LINEAR_SEGMENTS_DEFLECTION_DAMPENING_DEP_NODE_PLACEMENT_STRATEGY_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility'), 'nodePlacement.networkSimplex'), 'Node Flexibility'), "Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."), ENUM), Lorg_eclipse_elk_alg_layered_options_NodeFlexibility_2_classLit), of_1(NODES)))); $addDependency(registry, 'org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility', 'org.eclipse.elk.layered.nodePlacement.strategy', NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEP_NODE_PLACEMENT_STRATEGY_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default'), 'nodePlacement.networkSimplex.nodeFlexibility'), 'Node Flexibility Default'), "Default value of the 'nodeFlexibility' option for the children of a hierarchical node."), NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEFAULT_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_NodeFlexibility_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default', 'org.eclipse.elk.layered.nodePlacement.strategy', NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEFAULT_DEP_NODE_PLACEMENT_STRATEGY_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.edgeRouting.selfLoopDistribution'), 'edgeRouting'), 'Self-Loop Distribution'), 'Alter the distribution of the loops around the node. It only takes effect for PortConstraints.FREE.'), EDGE_ROUTING_SELF_LOOP_DISTRIBUTION_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_SelfLoopDistributionStrategy_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.edgeRouting.selfLoopOrdering'), 'edgeRouting'), 'Self-Loop Ordering'), 'Alter the ordering of the loops they can either be stacked or sequenced. It only takes effect for PortConstraints.FREE.'), EDGE_ROUTING_SELF_LOOP_ORDERING_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_SelfLoopOrderingStrategy_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.edgeRouting.splines.mode'), 'edgeRouting.splines'), 'Spline Routing Mode'), 'Specifies the way control points are assembled for each individual edge. CONSERVATIVE ensures that edges are properly routed around the nodes but feels rather orthogonal at times. SLOPPY uses fewer control points to obtain curvier edge routes but may result in edges overlapping nodes.'), EDGE_ROUTING_SPLINES_MODE_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_SplineRoutingMode_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.edgeRouting.splines.mode', 'org.eclipse.elk.edgeRouting', EDGE_ROUTING_SPLINES_MODE_DEP_EDGE_ROUTING_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor'), 'edgeRouting.splines.sloppy'), 'Sloppy Spline Layer Spacing Factor'), 'Spacing factor for routing area between layers when using sloppy spline routing.'), 0.2), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor', 'org.eclipse.elk.edgeRouting', EDGE_ROUTING_SPLINES_SLOPPY_LAYER_SPACING_FACTOR_DEP_EDGE_ROUTING_0); $addDependency(registry, 'org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor', 'org.eclipse.elk.layered.edgeRouting.splines.mode', EDGE_ROUTING_SPLINES_SLOPPY_LAYER_SPACING_FACTOR_DEP_EDGE_ROUTING_SPLINES_MODE_1); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth'), 'edgeRouting.polyline'), 'Sloped Edge Zone Width'), 'Width of the strip to the left and to the right of each layer where the polyline edge router is allowed to refrain from ensuring that edges are routed horizontally. This prevents awkward bend points for nodes that extent almost to the edge of their layer.'), 2), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth', 'org.eclipse.elk.edgeRouting', EDGE_ROUTING_POLYLINE_SLOPED_EDGE_ZONE_WIDTH_DEP_EDGE_ROUTING_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.spacing.baseValue'), 'spacing'), 'Spacing Base Value'), "An optional base value for all other layout options of the 'spacing' group. It can be used to conveniently alter the overall 'spaciousness' of the drawing. Whenever an explicit value is set for the other layout options, this base value will have no effect. The base value is not inherited, i.e. it must be set for each hierarchical node."), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers'), 'spacing'), 'Edge Node Between Layers Spacing'), "The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."), 10), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers'), 'spacing'), 'Edge Edge Between Layer Spacing'), "Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."), 10), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers'), 'spacing'), 'Node Node Between Layers Spacing'), "The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."), 20), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.priority.direction'), 'priority'), 'Direction Priority'), 'Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase.'), valueOf_3(0)), INT), Ljava_lang_Integer_2_classLit), of_1(EDGES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.priority.shortness'), 'priority'), 'Shortness Priority'), 'Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase.'), valueOf_3(0)), INT), Ljava_lang_Integer_2_classLit), of_1(EDGES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.priority.straightness'), 'priority'), 'Straightness Priority'), 'Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement.'), valueOf_3(0)), INT), Ljava_lang_Integer_2_classLit), of_1(EDGES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.compaction.connectedComponents'), 'compaction'), 'Connected Components Compaction'), 'Tries to further compact components (disconnected sub-graphs).'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.compaction.connectedComponents', 'org.eclipse.elk.separateConnectedComponents', true); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.compaction.postCompaction.strategy'), 'compaction.postCompaction'), 'Post Compaction Strategy'), 'Specifies whether and how post-process compaction is applied.'), COMPACTION_POST_COMPACTION_STRATEGY_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_GraphCompactionStrategy_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.compaction.postCompaction.constraints'), 'compaction.postCompaction'), 'Post Compaction Constraint Calculation'), 'Specifies whether and how post-process compaction is applied.'), COMPACTION_POST_COMPACTION_CONSTRAINTS_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_ConstraintCalculationStrategy_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.highDegreeNodes.treatment'), 'highDegreeNodes'), 'High Degree Node Treatment'), 'Makes room around high degree nodes to place leafs and trees.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.highDegreeNodes.threshold'), 'highDegreeNodes'), 'High Degree Node Threshold'), 'Whether a node is considered to have a high degree.'), valueOf_3(16)), INT), Ljava_lang_Integer_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.highDegreeNodes.threshold', 'org.eclipse.elk.layered.highDegreeNodes.treatment', true); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.highDegreeNodes.treeHeight'), 'highDegreeNodes'), 'High Degree Node Maximum Tree Height'), 'Maximum height of a subtree connected to a high degree node to be moved to separate layers.'), valueOf_3(5)), INT), Ljava_lang_Integer_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.highDegreeNodes.treeHeight', 'org.eclipse.elk.layered.highDegreeNodes.treatment', true); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.wrapping.strategy'), 'wrapping'), 'Graph Wrapping Strategy'), "For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."), WRAPPING_STRATEGY_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_WrappingStrategy_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.wrapping.additionalEdgeSpacing'), 'wrapping'), 'Additional Wrapped Edges Spacing'), 'To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing.'), 10), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.wrapping.additionalEdgeSpacing', 'org.eclipse.elk.layered.wrapping.strategy', WRAPPING_ADDITIONAL_EDGE_SPACING_DEP_WRAPPING_STRATEGY_0); $addDependency(registry, 'org.eclipse.elk.layered.wrapping.additionalEdgeSpacing', 'org.eclipse.elk.layered.wrapping.strategy', WRAPPING_ADDITIONAL_EDGE_SPACING_DEP_WRAPPING_STRATEGY_1); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.wrapping.correctionFactor'), 'wrapping'), 'Correction Factor for Wrapping'), "At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simply multiplied with the 'aspect ratio' layout option."), 1), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.wrapping.correctionFactor', 'org.eclipse.elk.layered.wrapping.strategy', WRAPPING_CORRECTION_FACTOR_DEP_WRAPPING_STRATEGY_0); $addDependency(registry, 'org.eclipse.elk.layered.wrapping.correctionFactor', 'org.eclipse.elk.layered.wrapping.strategy', WRAPPING_CORRECTION_FACTOR_DEP_WRAPPING_STRATEGY_1); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.wrapping.cutting.strategy'), 'wrapping.cutting'), 'Cutting Strategy'), 'The strategy by which the layer indexes are determined at which the layering crumbles into chunks.'), WRAPPING_CUTTING_STRATEGY_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_CuttingStrategy_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.wrapping.cutting.strategy', 'org.eclipse.elk.layered.wrapping.strategy', WRAPPING_CUTTING_STRATEGY_DEP_WRAPPING_STRATEGY_0); $addDependency(registry, 'org.eclipse.elk.layered.wrapping.cutting.strategy', 'org.eclipse.elk.layered.wrapping.strategy', WRAPPING_CUTTING_STRATEGY_DEP_WRAPPING_STRATEGY_1); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.wrapping.cutting.cuts'), 'wrapping.cutting'), 'Manually Specified Cuts'), 'Allows the user to specify her own cuts for a certain graph.'), OBJECT), Ljava_util_List_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.wrapping.cutting.cuts', 'org.eclipse.elk.layered.wrapping.cutting.strategy', WRAPPING_CUTTING_CUTS_DEP_WRAPPING_CUTTING_STRATEGY_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.wrapping.cutting.msd.freedom'), 'wrapping.cutting.msd'), 'MSD Freedom'), 'The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts.'), WRAPPING_CUTTING_MSD_FREEDOM_DEFAULT), INT), Ljava_lang_Integer_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.wrapping.cutting.msd.freedom', 'org.eclipse.elk.layered.wrapping.cutting.strategy', WRAPPING_CUTTING_MSD_FREEDOM_DEP_WRAPPING_CUTTING_STRATEGY_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.wrapping.validify.strategy'), 'wrapping.validify'), 'Validification Strategy'), 'When wrapping graphs, one can specify indices that are not allowed as split points. The validification strategy makes sure every computed split point is allowed.'), WRAPPING_VALIDIFY_STRATEGY_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_ValidifyStrategy_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.wrapping.validify.strategy', 'org.eclipse.elk.layered.wrapping.strategy', WRAPPING_VALIDIFY_STRATEGY_DEP_WRAPPING_STRATEGY_0); $addDependency(registry, 'org.eclipse.elk.layered.wrapping.validify.strategy', 'org.eclipse.elk.layered.wrapping.strategy', WRAPPING_VALIDIFY_STRATEGY_DEP_WRAPPING_STRATEGY_1); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.wrapping.validify.forbiddenIndices'), 'wrapping.validify'), 'Valid Indices for Wrapping'), null), OBJECT), Ljava_util_List_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.wrapping.validify.forbiddenIndices', 'org.eclipse.elk.layered.wrapping.strategy', WRAPPING_VALIDIFY_FORBIDDEN_INDICES_DEP_WRAPPING_STRATEGY_0); $addDependency(registry, 'org.eclipse.elk.layered.wrapping.validify.forbiddenIndices', 'org.eclipse.elk.layered.wrapping.strategy', WRAPPING_VALIDIFY_FORBIDDEN_INDICES_DEP_WRAPPING_STRATEGY_1); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.wrapping.multiEdge.improveCuts'), 'wrapping.multiEdge'), 'Improve Cuts'), 'For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought.'), true), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.wrapping.multiEdge.improveCuts', 'org.eclipse.elk.layered.wrapping.strategy', WRAPPING_MULTI_EDGE_IMPROVE_CUTS_DEP_WRAPPING_STRATEGY_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty'), 'wrapping.multiEdge'), 'Distance Penalty When Improving Cuts'), null), 2), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty', 'org.eclipse.elk.layered.wrapping.strategy', WRAPPING_MULTI_EDGE_DISTANCE_PENALTY_DEP_WRAPPING_STRATEGY_0); $addDependency(registry, 'org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty', 'org.eclipse.elk.layered.wrapping.multiEdge.improveCuts', true); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges'), 'wrapping.multiEdge'), 'Improve Wrapped Edges'), 'The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges.'), true), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges', 'org.eclipse.elk.layered.wrapping.strategy', WRAPPING_MULTI_EDGE_IMPROVE_WRAPPED_EDGES_DEP_WRAPPING_STRATEGY_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.edgeLabels.sideSelection'), 'edgeLabels'), 'Edge Label Side Selection'), 'Method to decide on edge label sides.'), EDGE_LABELS_SIDE_SELECTION_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_EdgeLabelSideSelection_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy'), 'edgeLabels'), 'Edge Center Label Placement Strategy'), 'Determines in which layer center labels of long edges should be placed.'), EDGE_LABELS_CENTER_LABEL_PLACEMENT_STRATEGY_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_CenterEdgeLabelPlacementStrategy_2_classLit), of_2(PARENTS, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_LayoutOptionData$Target_2_classLit, 1), $intern_37, 170, 0, [LABELS]))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.considerModelOrder.strategy'), 'considerModelOrder'), 'Consider Model Order'), 'Preserves the order of nodes and edges in the model file if this does not lead to additional edge crossings. Depending on the strategy this is not always possible since the node and edge order might be conflicting.'), CONSIDER_MODEL_ORDER_STRATEGY_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_OrderingStrategy_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.considerModelOrder.portModelOrder'), 'considerModelOrder'), 'Consider Port Order'), 'If disabled the port order of output ports is derived from the edge order and input ports are ordered by their incoming connections. If enabled all ports are ordered by the port model order.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.considerModelOrder.noModelOrder'), 'considerModelOrder'), 'No Model Order'), 'Set on a node to not set a model order for this node even though it is a real node.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.considerModelOrder.components'), 'considerModelOrder'), 'Consider Model Order for Components'), 'If set to NONE the usual ordering strategy (by cumulative node priority and size of nodes) is used. INSIDE_PORT_SIDES orders the components with external ports only inside the groups with the same port side. FORCE_MODEL_ORDER enforces the mode order on components. This option might produce bad alignments and sub optimal drawings in terms of used area since the ordering should be respected.'), CONSIDER_MODEL_ORDER_COMPONENTS_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_components_ComponentOrderingStrategy_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.considerModelOrder.components', 'org.eclipse.elk.separateConnectedComponents', null); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.considerModelOrder.longEdgeStrategy'), 'considerModelOrder'), 'Long Edge Ordering Strategy'), 'Indicates whether long edges are sorted under, over, or equal to nodes that have no connection to a previous layer in a left-to-right or right-to-left layout. Under and over changes to right and left in a vertical layout.'), CONSIDER_MODEL_ORDER_LONG_EDGE_STRATEGY_DEFAULT), ENUM), Lorg_eclipse_elk_alg_layered_options_LongEdgeOrderingStrategy_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.considerModelOrder.crossingCounterNodeInfluence'), 'considerModelOrder'), 'Crossing Counter Node Order Influence'), 'Indicates with what percentage (1 for 100%) violations of the node model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal node order. Defaults to no influence (0).'), 0), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.considerModelOrder.crossingCounterNodeInfluence', 'org.eclipse.elk.layered.considerModelOrder.strategy', null); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layered.considerModelOrder.crossingCounterPortInfluence'), 'considerModelOrder'), 'Crossing Counter Port Order Influence'), 'Indicates with what percentage (1 for 100%) violations of the port model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal port order. Defaults to no influence (0).'), 0), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.layered.considerModelOrder.crossingCounterPortInfluence', 'org.eclipse.elk.layered.considerModelOrder.strategy', null); $apply_15((new LayeredOptions , registry)); } ; var ALLOW_NON_FLOW_PORTS_TO_SWITCH_SIDES, COMPACTION_CONNECTED_COMPONENTS, COMPACTION_POST_COMPACTION_CONSTRAINTS, COMPACTION_POST_COMPACTION_CONSTRAINTS_DEFAULT, COMPACTION_POST_COMPACTION_STRATEGY, COMPACTION_POST_COMPACTION_STRATEGY_DEFAULT, CONSIDER_MODEL_ORDER_COMPONENTS, CONSIDER_MODEL_ORDER_COMPONENTS_DEFAULT, CONSIDER_MODEL_ORDER_CROSSING_COUNTER_NODE_INFLUENCE, CONSIDER_MODEL_ORDER_CROSSING_COUNTER_PORT_INFLUENCE, CONSIDER_MODEL_ORDER_LONG_EDGE_STRATEGY, CONSIDER_MODEL_ORDER_LONG_EDGE_STRATEGY_DEFAULT, CONSIDER_MODEL_ORDER_NO_MODEL_ORDER, CONSIDER_MODEL_ORDER_PORT_MODEL_ORDER, CONSIDER_MODEL_ORDER_STRATEGY, CONSIDER_MODEL_ORDER_STRATEGY_DEFAULT, CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER, CROSSING_MINIMIZATION_GREEDY_SWITCH_ACTIVATION_THRESHOLD, CROSSING_MINIMIZATION_GREEDY_SWITCH_HIERARCHICAL_TYPE, CROSSING_MINIMIZATION_GREEDY_SWITCH_HIERARCHICAL_TYPE_DEFAULT, CROSSING_MINIMIZATION_GREEDY_SWITCH_HIERARCHICAL_TYPE_DEP_CROSSING_MINIMIZATION_STRATEGY_0, CROSSING_MINIMIZATION_GREEDY_SWITCH_HIERARCHICAL_TYPE_DEP_HIERARCHY_HANDLING_1, CROSSING_MINIMIZATION_GREEDY_SWITCH_TYPE, CROSSING_MINIMIZATION_GREEDY_SWITCH_TYPE_DEFAULT, CROSSING_MINIMIZATION_GREEDY_SWITCH_TYPE_DEP_CROSSING_MINIMIZATION_STRATEGY_0, CROSSING_MINIMIZATION_HIERARCHICAL_SWEEPINESS, CROSSING_MINIMIZATION_HIERARCHICAL_SWEEPINESS_DEP_HIERARCHY_HANDLING_0, CROSSING_MINIMIZATION_IN_LAYER_PRED_OF, CROSSING_MINIMIZATION_IN_LAYER_SUCC_OF, CROSSING_MINIMIZATION_POSITION_CHOICE_CONSTRAINT, CROSSING_MINIMIZATION_POSITION_ID, CROSSING_MINIMIZATION_SEMI_INTERACTIVE, CROSSING_MINIMIZATION_SEMI_INTERACTIVE_DEP_CROSSING_MINIMIZATION_STRATEGY_0, CROSSING_MINIMIZATION_STRATEGY, CROSSING_MINIMIZATION_STRATEGY_DEFAULT, CYCLE_BREAKING_STRATEGY, CYCLE_BREAKING_STRATEGY_DEFAULT, DIRECTION_CONGRUENCY, DIRECTION_CONGRUENCY_DEFAULT, EDGE_LABELS_CENTER_LABEL_PLACEMENT_STRATEGY, EDGE_LABELS_CENTER_LABEL_PLACEMENT_STRATEGY_DEFAULT, EDGE_LABELS_SIDE_SELECTION, EDGE_LABELS_SIDE_SELECTION_DEFAULT, EDGE_ROUTING_POLYLINE_SLOPED_EDGE_ZONE_WIDTH, EDGE_ROUTING_POLYLINE_SLOPED_EDGE_ZONE_WIDTH_DEP_EDGE_ROUTING_0, EDGE_ROUTING_SELF_LOOP_DISTRIBUTION, EDGE_ROUTING_SELF_LOOP_DISTRIBUTION_DEFAULT, EDGE_ROUTING_SELF_LOOP_ORDERING, EDGE_ROUTING_SELF_LOOP_ORDERING_DEFAULT, EDGE_ROUTING_SPLINES_MODE, EDGE_ROUTING_SPLINES_MODE_DEFAULT, EDGE_ROUTING_SPLINES_MODE_DEP_EDGE_ROUTING_0, EDGE_ROUTING_SPLINES_SLOPPY_LAYER_SPACING_FACTOR, EDGE_ROUTING_SPLINES_SLOPPY_LAYER_SPACING_FACTOR_DEP_EDGE_ROUTING_0, EDGE_ROUTING_SPLINES_SLOPPY_LAYER_SPACING_FACTOR_DEP_EDGE_ROUTING_SPLINES_MODE_1, FEEDBACK_EDGES, GENERATE_POSITION_AND_LAYER_IDS, HIGH_DEGREE_NODES_THRESHOLD, HIGH_DEGREE_NODES_TREATMENT, HIGH_DEGREE_NODES_TREE_HEIGHT, INTERACTIVE_REFERENCE_POINT, INTERACTIVE_REFERENCE_POINT_DEFAULT, INTERACTIVE_REFERENCE_POINT_DEP_CROSSING_MINIMIZATION_STRATEGY_1, INTERACTIVE_REFERENCE_POINT_DEP_CYCLE_BREAKING_STRATEGY_0, LAYERING_COFFMAN_GRAHAM_LAYER_BOUND, LAYERING_COFFMAN_GRAHAM_LAYER_BOUND_DEP_LAYERING_STRATEGY_0, LAYERING_LAYER_CHOICE_CONSTRAINT, LAYERING_LAYER_CONSTRAINT, LAYERING_LAYER_CONSTRAINT_DEFAULT, LAYERING_LAYER_ID, LAYERING_MIN_WIDTH_UPPER_BOUND_ON_WIDTH, LAYERING_MIN_WIDTH_UPPER_BOUND_ON_WIDTH_DEP_LAYERING_STRATEGY_0, LAYERING_MIN_WIDTH_UPPER_LAYER_ESTIMATION_SCALING_FACTOR, LAYERING_MIN_WIDTH_UPPER_LAYER_ESTIMATION_SCALING_FACTOR_DEP_LAYERING_STRATEGY_0, LAYERING_NODE_PROMOTION_MAX_ITERATIONS, LAYERING_NODE_PROMOTION_STRATEGY, LAYERING_NODE_PROMOTION_STRATEGY_DEFAULT, LAYERING_STRATEGY, LAYERING_STRATEGY_DEFAULT, MERGE_EDGES, MERGE_HIERARCHY_EDGES, NODE_PLACEMENT_BK_EDGE_STRAIGHTENING, NODE_PLACEMENT_BK_EDGE_STRAIGHTENING_DEFAULT, NODE_PLACEMENT_BK_EDGE_STRAIGHTENING_DEP_NODE_PLACEMENT_STRATEGY_0, NODE_PLACEMENT_BK_FIXED_ALIGNMENT, NODE_PLACEMENT_BK_FIXED_ALIGNMENT_DEFAULT, NODE_PLACEMENT_BK_FIXED_ALIGNMENT_DEP_NODE_PLACEMENT_STRATEGY_0, NODE_PLACEMENT_FAVOR_STRAIGHT_EDGES, NODE_PLACEMENT_FAVOR_STRAIGHT_EDGES_DEP_NODE_PLACEMENT_STRATEGY_0, NODE_PLACEMENT_FAVOR_STRAIGHT_EDGES_DEP_NODE_PLACEMENT_STRATEGY_1, NODE_PLACEMENT_LINEAR_SEGMENTS_DEFLECTION_DAMPENING, NODE_PLACEMENT_LINEAR_SEGMENTS_DEFLECTION_DAMPENING_DEP_NODE_PLACEMENT_STRATEGY_0, NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY, NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEFAULT, NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEFAULT_DEFAULT, NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEFAULT_DEP_NODE_PLACEMENT_STRATEGY_0, NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEP_NODE_PLACEMENT_STRATEGY_0, NODE_PLACEMENT_STRATEGY, NODE_PLACEMENT_STRATEGY_DEFAULT, PORT_SORTING_STRATEGY, PORT_SORTING_STRATEGY_DEFAULT, PRIORITY_DIRECTION, PRIORITY_SHORTNESS, PRIORITY_STRAIGHTNESS, SPACING_BASE_VALUE, SPACING_EDGE_EDGE_BETWEEN_LAYERS, SPACING_EDGE_NODE_BETWEEN_LAYERS, SPACING_NODE_NODE_BETWEEN_LAYERS, THOROUGHNESS, UNNECESSARY_BENDPOINTS, WRAPPING_ADDITIONAL_EDGE_SPACING, WRAPPING_ADDITIONAL_EDGE_SPACING_DEP_WRAPPING_STRATEGY_0, WRAPPING_ADDITIONAL_EDGE_SPACING_DEP_WRAPPING_STRATEGY_1, WRAPPING_CORRECTION_FACTOR, WRAPPING_CORRECTION_FACTOR_DEP_WRAPPING_STRATEGY_0, WRAPPING_CORRECTION_FACTOR_DEP_WRAPPING_STRATEGY_1, WRAPPING_CUTTING_CUTS, WRAPPING_CUTTING_CUTS_DEP_WRAPPING_CUTTING_STRATEGY_0, WRAPPING_CUTTING_MSD_FREEDOM, WRAPPING_CUTTING_MSD_FREEDOM_DEFAULT, WRAPPING_CUTTING_MSD_FREEDOM_DEP_WRAPPING_CUTTING_STRATEGY_0, WRAPPING_CUTTING_STRATEGY, WRAPPING_CUTTING_STRATEGY_DEFAULT, WRAPPING_CUTTING_STRATEGY_DEP_WRAPPING_STRATEGY_0, WRAPPING_CUTTING_STRATEGY_DEP_WRAPPING_STRATEGY_1, WRAPPING_MULTI_EDGE_DISTANCE_PENALTY, WRAPPING_MULTI_EDGE_DISTANCE_PENALTY_DEP_WRAPPING_STRATEGY_0, WRAPPING_MULTI_EDGE_IMPROVE_CUTS, WRAPPING_MULTI_EDGE_IMPROVE_CUTS_DEP_WRAPPING_STRATEGY_0, WRAPPING_MULTI_EDGE_IMPROVE_WRAPPED_EDGES, WRAPPING_MULTI_EDGE_IMPROVE_WRAPPED_EDGES_DEP_WRAPPING_STRATEGY_0, WRAPPING_STRATEGY, WRAPPING_STRATEGY_DEFAULT, WRAPPING_VALIDIFY_FORBIDDEN_INDICES, WRAPPING_VALIDIFY_FORBIDDEN_INDICES_DEP_WRAPPING_STRATEGY_0, WRAPPING_VALIDIFY_FORBIDDEN_INDICES_DEP_WRAPPING_STRATEGY_1, WRAPPING_VALIDIFY_STRATEGY, WRAPPING_VALIDIFY_STRATEGY_DEFAULT, WRAPPING_VALIDIFY_STRATEGY_DEP_WRAPPING_STRATEGY_0, WRAPPING_VALIDIFY_STRATEGY_DEP_WRAPPING_STRATEGY_1; var Lorg_eclipse_elk_alg_layered_options_LayeredMetaDataProvider_2_classLit = createForClass('org.eclipse.elk.alg.layered.options', 'LayeredMetaDataProvider', 859); function $clinit_LayeredOptions(){ $clinit_LayeredOptions = emptyMethod; SPACING_COMMENT_COMMENT = ($clinit_CoreOptions() , SPACING_COMMENT_COMMENT_0); SPACING_COMMENT_NODE = SPACING_COMMENT_NODE_0; SPACING_COMPONENT_COMPONENT_0 = SPACING_COMPONENT_COMPONENT_1; SPACING_EDGE_EDGE = SPACING_EDGE_EDGE_0; SPACING_EDGE_LABEL_0 = SPACING_EDGE_LABEL_1; SPACING_EDGE_NODE = SPACING_EDGE_NODE_1; SPACING_LABEL_LABEL = SPACING_LABEL_LABEL_0; SPACING_LABEL_PORT_HORIZONTAL = SPACING_LABEL_PORT_HORIZONTAL_0; SPACING_LABEL_PORT_VERTICAL = SPACING_LABEL_PORT_VERTICAL_0; SPACING_LABEL_NODE = SPACING_LABEL_NODE_0; SPACING_NODE_NODE_0 = SPACING_NODE_NODE_6; SPACING_NODE_SELF_LOOP = SPACING_NODE_SELF_LOOP_0; SPACING_PORT_PORT = SPACING_PORT_PORT_0; SPACING_INDIVIDUAL = SPACING_INDIVIDUAL_0; SPACING_BASE_VALUE_0 = ($clinit_LayeredMetaDataProvider() , SPACING_BASE_VALUE); SPACING_EDGE_EDGE_BETWEEN_LAYERS_0 = SPACING_EDGE_EDGE_BETWEEN_LAYERS; SPACING_EDGE_NODE_BETWEEN_LAYERS_0 = SPACING_EDGE_NODE_BETWEEN_LAYERS; SPACING_NODE_NODE_BETWEEN_LAYERS_0 = SPACING_NODE_NODE_BETWEEN_LAYERS; PRIORITY_0 = new Property_2(PRIORITY_3, valueOf_3(0)); PRIORITY_DIRECTION_0 = PRIORITY_DIRECTION; PRIORITY_SHORTNESS_0 = PRIORITY_SHORTNESS; PRIORITY_STRAIGHTNESS_0 = PRIORITY_STRAIGHTNESS; WRAPPING_STRATEGY_0 = WRAPPING_STRATEGY; WRAPPING_ADDITIONAL_EDGE_SPACING_0 = WRAPPING_ADDITIONAL_EDGE_SPACING; WRAPPING_CORRECTION_FACTOR_0 = WRAPPING_CORRECTION_FACTOR; WRAPPING_CUTTING_STRATEGY_0 = WRAPPING_CUTTING_STRATEGY; WRAPPING_CUTTING_CUTS_0 = WRAPPING_CUTTING_CUTS; WRAPPING_CUTTING_MSD_FREEDOM_0 = WRAPPING_CUTTING_MSD_FREEDOM; WRAPPING_VALIDIFY_STRATEGY_0 = WRAPPING_VALIDIFY_STRATEGY; WRAPPING_VALIDIFY_FORBIDDEN_INDICES_0 = WRAPPING_VALIDIFY_FORBIDDEN_INDICES; WRAPPING_MULTI_EDGE_IMPROVE_CUTS_0 = WRAPPING_MULTI_EDGE_IMPROVE_CUTS; WRAPPING_MULTI_EDGE_DISTANCE_PENALTY_0 = WRAPPING_MULTI_EDGE_DISTANCE_PENALTY; WRAPPING_MULTI_EDGE_IMPROVE_WRAPPED_EDGES_0 = WRAPPING_MULTI_EDGE_IMPROVE_WRAPPED_EDGES; NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_0 = NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY; NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEFAULT_0 = NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEFAULT; EDGE_ROUTING_SPLINES_MODE_0 = EDGE_ROUTING_SPLINES_MODE; EDGE_ROUTING_SPLINES_SLOPPY_LAYER_SPACING_FACTOR_0 = EDGE_ROUTING_SPLINES_SLOPPY_LAYER_SPACING_FACTOR; TOPDOWN_LAYOUT_0 = TOPDOWN_LAYOUT_2; TOPDOWN_SCALE_FACTOR_0 = TOPDOWN_SCALE_FACTOR_2; TOPDOWN_HIERARCHICAL_NODE_WIDTH_0 = TOPDOWN_HIERARCHICAL_NODE_WIDTH_2; TOPDOWN_HIERARCHICAL_NODE_ASPECT_RATIO_0 = TOPDOWN_HIERARCHICAL_NODE_ASPECT_RATIO_2; TOPDOWN_NODE_TYPE_DEFAULT_0 = ($clinit_TopdownNodeTypes() , HIERARCHICAL_NODE); new Property_2(TOPDOWN_NODE_TYPE, TOPDOWN_NODE_TYPE_DEFAULT_0); PADDING_DEFAULT_0 = new ElkPadding_0(12); PADDING_1 = new Property_2(PADDING_6, PADDING_DEFAULT_0); EDGE_ROUTING_DEFAULT = ($clinit_EdgeRouting() , ORTHOGONAL); EDGE_ROUTING = new Property_2(EDGE_ROUTING_0, EDGE_ROUTING_DEFAULT); PORT_BORDER_OFFSET = new Property_2(PORT_BORDER_OFFSET_0, 0); RANDOM_SEED_0 = new Property_2(RANDOM_SEED_1, valueOf_3(1)); ASPECT_RATIO_1 = new Property_2(ASPECT_RATIO_5, $intern_102); NO_LAYOUT = NO_LAYOUT_0; PORT_CONSTRAINTS_0 = PORT_CONSTRAINTS_1; PORT_SIDE = PORT_SIDE_0; DEBUG_MODE = DEBUG_MODE_3; ALIGNMENT = ALIGNMENT_0; HIERARCHY_HANDLING = HIERARCHY_HANDLING_0; SEPARATE_CONNECTED_COMPONENTS_0 = new Property_2(SEPARATE_CONNECTED_COMPONENTS_2, ($clinit_Boolean() , true)); INSIDE_SELF_LOOPS_ACTIVATE = INSIDE_SELF_LOOPS_ACTIVATE_0; INSIDE_SELF_LOOPS_YO = INSIDE_SELF_LOOPS_YO_0; NODE_SIZE_CONSTRAINTS_1 = NODE_SIZE_CONSTRAINTS_6; NODE_SIZE_OPTIONS_1 = NODE_SIZE_OPTIONS_6; NODE_SIZE_FIXED_GRAPH_SIZE_0 = NODE_SIZE_FIXED_GRAPH_SIZE_3; DIRECTION_DEFAULT = ($clinit_Direction_0() , UNDEFINED_2); DIRECTION = new Property_2(DIRECTION_1, DIRECTION_DEFAULT); NODE_LABELS_PLACEMENT_1 = NODE_LABELS_PLACEMENT_5; NODE_LABELS_PADDING = NODE_LABELS_PADDING_0; PORT_LABELS_PLACEMENT_1 = PORT_LABELS_PLACEMENT_5; PORT_LABELS_NEXT_TO_PORT_IF_POSSIBLE = PORT_LABELS_NEXT_TO_PORT_IF_POSSIBLE_0; PORT_LABELS_TREAT_AS_GROUP = PORT_LABELS_TREAT_AS_GROUP_0; PORT_ALIGNMENT_DEFAULT_DEFAULT = ($clinit_PortAlignment() , JUSTIFIED); new Property_2(PORT_ALIGNMENT_DEFAULT, PORT_ALIGNMENT_DEFAULT_DEFAULT); PORT_ALIGNMENT_NORTH = PORT_ALIGNMENT_NORTH_0; PORT_ALIGNMENT_SOUTH = PORT_ALIGNMENT_SOUTH_0; PORT_ALIGNMENT_WEST = PORT_ALIGNMENT_WEST_0; PORT_ALIGNMENT_EAST = PORT_ALIGNMENT_EAST_0; UNNECESSARY_BENDPOINTS_0 = UNNECESSARY_BENDPOINTS; LAYERING_STRATEGY_0 = LAYERING_STRATEGY; LAYERING_NODE_PROMOTION_STRATEGY_0 = LAYERING_NODE_PROMOTION_STRATEGY; THOROUGHNESS_0 = THOROUGHNESS; LAYERING_LAYER_CONSTRAINT_0 = LAYERING_LAYER_CONSTRAINT; CYCLE_BREAKING_STRATEGY_0 = CYCLE_BREAKING_STRATEGY; CROSSING_MINIMIZATION_STRATEGY_0 = CROSSING_MINIMIZATION_STRATEGY; CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER_0 = CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER; CROSSING_MINIMIZATION_GREEDY_SWITCH_ACTIVATION_THRESHOLD_0 = CROSSING_MINIMIZATION_GREEDY_SWITCH_ACTIVATION_THRESHOLD; CROSSING_MINIMIZATION_GREEDY_SWITCH_TYPE_0 = CROSSING_MINIMIZATION_GREEDY_SWITCH_TYPE; CROSSING_MINIMIZATION_GREEDY_SWITCH_HIERARCHICAL_TYPE_0 = CROSSING_MINIMIZATION_GREEDY_SWITCH_HIERARCHICAL_TYPE; CROSSING_MINIMIZATION_SEMI_INTERACTIVE_0 = CROSSING_MINIMIZATION_SEMI_INTERACTIVE; MERGE_EDGES_0 = MERGE_EDGES; MERGE_HIERARCHY_EDGES_0 = MERGE_HIERARCHY_EDGES; INTERACTIVE_REFERENCE_POINT_0 = INTERACTIVE_REFERENCE_POINT; NODE_PLACEMENT_STRATEGY_0 = NODE_PLACEMENT_STRATEGY; NODE_PLACEMENT_BK_FIXED_ALIGNMENT_0 = NODE_PLACEMENT_BK_FIXED_ALIGNMENT; FEEDBACK_EDGES_0 = FEEDBACK_EDGES; NODE_PLACEMENT_LINEAR_SEGMENTS_DEFLECTION_DAMPENING_0 = NODE_PLACEMENT_LINEAR_SEGMENTS_DEFLECTION_DAMPENING; EDGE_ROUTING_SELF_LOOP_DISTRIBUTION_0 = EDGE_ROUTING_SELF_LOOP_DISTRIBUTION; EDGE_ROUTING_SELF_LOOP_ORDERING_0 = EDGE_ROUTING_SELF_LOOP_ORDERING; CONTENT_ALIGNMENT = CONTENT_ALIGNMENT_2; NODE_PLACEMENT_BK_EDGE_STRAIGHTENING_0 = NODE_PLACEMENT_BK_EDGE_STRAIGHTENING; COMPACTION_POST_COMPACTION_STRATEGY_0 = COMPACTION_POST_COMPACTION_STRATEGY; COMPACTION_POST_COMPACTION_CONSTRAINTS_0 = COMPACTION_POST_COMPACTION_CONSTRAINTS; COMPACTION_CONNECTED_COMPONENTS_0 = COMPACTION_CONNECTED_COMPONENTS; HIGH_DEGREE_NODES_TREATMENT_0 = HIGH_DEGREE_NODES_TREATMENT; HIGH_DEGREE_NODES_THRESHOLD_0 = HIGH_DEGREE_NODES_THRESHOLD; HIGH_DEGREE_NODES_TREE_HEIGHT_0 = HIGH_DEGREE_NODES_TREE_HEIGHT; NODE_SIZE_MINIMUM_0 = NODE_SIZE_MINIMUM_5; JUNCTION_POINTS = JUNCTION_POINTS_0; EDGE_THICKNESS_0 = EDGE_THICKNESS_1; EDGE_LABELS_PLACEMENT = EDGE_LABELS_PLACEMENT_0; EDGE_LABELS_INLINE_0 = EDGE_LABELS_INLINE_1; CROSSING_MINIMIZATION_HIERARCHICAL_SWEEPINESS_0 = CROSSING_MINIMIZATION_HIERARCHICAL_SWEEPINESS; PORT_INDEX = PORT_INDEX_0; COMMENT_BOX = COMMENT_BOX_0; HYPERNODE = HYPERNODE_0; PORT_ANCHOR = PORT_ANCHOR_0; PARTITIONING_ACTIVATE = PARTITIONING_ACTIVATE_0; PARTITIONING_PARTITION = PARTITIONING_PARTITION_0; LAYERING_MIN_WIDTH_UPPER_BOUND_ON_WIDTH_0 = LAYERING_MIN_WIDTH_UPPER_BOUND_ON_WIDTH; LAYERING_MIN_WIDTH_UPPER_LAYER_ESTIMATION_SCALING_FACTOR_0 = LAYERING_MIN_WIDTH_UPPER_LAYER_ESTIMATION_SCALING_FACTOR; POSITION = POSITION_2; ALLOW_NON_FLOW_PORTS_TO_SWITCH_SIDES_0 = ALLOW_NON_FLOW_PORTS_TO_SWITCH_SIDES; LAYERING_NODE_PROMOTION_MAX_ITERATIONS_0 = LAYERING_NODE_PROMOTION_MAX_ITERATIONS; EDGE_LABELS_SIDE_SELECTION_0 = EDGE_LABELS_SIDE_SELECTION; EDGE_LABELS_CENTER_LABEL_PLACEMENT_STRATEGY_0 = EDGE_LABELS_CENTER_LABEL_PLACEMENT_STRATEGY; MARGINS = MARGINS_0; LAYERING_COFFMAN_GRAHAM_LAYER_BOUND_0 = LAYERING_COFFMAN_GRAHAM_LAYER_BOUND; NODE_PLACEMENT_FAVOR_STRAIGHT_EDGES_0 = NODE_PLACEMENT_FAVOR_STRAIGHT_EDGES; SPACING_PORTS_SURROUNDING = SPACING_PORTS_SURROUNDING_0; DIRECTION_CONGRUENCY_0 = DIRECTION_CONGRUENCY; PORT_SORTING_STRATEGY_0 = PORT_SORTING_STRATEGY; EDGE_ROUTING_POLYLINE_SLOPED_EDGE_ZONE_WIDTH_0 = EDGE_ROUTING_POLYLINE_SLOPED_EDGE_ZONE_WIDTH; CROSSING_MINIMIZATION_IN_LAYER_PRED_OF_0 = CROSSING_MINIMIZATION_IN_LAYER_PRED_OF; CROSSING_MINIMIZATION_IN_LAYER_SUCC_OF_0 = CROSSING_MINIMIZATION_IN_LAYER_SUCC_OF; LAYERING_LAYER_CHOICE_CONSTRAINT_0 = LAYERING_LAYER_CHOICE_CONSTRAINT; CROSSING_MINIMIZATION_POSITION_CHOICE_CONSTRAINT_0 = CROSSING_MINIMIZATION_POSITION_CHOICE_CONSTRAINT; INTERACTIVE_LAYOUT = INTERACTIVE_LAYOUT_2; LAYERING_LAYER_ID_0 = LAYERING_LAYER_ID; CROSSING_MINIMIZATION_POSITION_ID_0 = CROSSING_MINIMIZATION_POSITION_ID; CONSIDER_MODEL_ORDER_STRATEGY_0 = CONSIDER_MODEL_ORDER_STRATEGY; CONSIDER_MODEL_ORDER_LONG_EDGE_STRATEGY_0 = CONSIDER_MODEL_ORDER_LONG_EDGE_STRATEGY; CONSIDER_MODEL_ORDER_CROSSING_COUNTER_NODE_INFLUENCE_0 = CONSIDER_MODEL_ORDER_CROSSING_COUNTER_NODE_INFLUENCE; CONSIDER_MODEL_ORDER_CROSSING_COUNTER_PORT_INFLUENCE_0 = CONSIDER_MODEL_ORDER_CROSSING_COUNTER_PORT_INFLUENCE; CONSIDER_MODEL_ORDER_NO_MODEL_ORDER_0 = CONSIDER_MODEL_ORDER_NO_MODEL_ORDER; CONSIDER_MODEL_ORDER_COMPONENTS_0 = CONSIDER_MODEL_ORDER_COMPONENTS; CONSIDER_MODEL_ORDER_PORT_MODEL_ORDER_0 = CONSIDER_MODEL_ORDER_PORT_MODEL_ORDER; GENERATE_POSITION_AND_LAYER_IDS_0 = GENERATE_POSITION_AND_LAYER_IDS; } function $apply_15(registry){ $register(registry, new LayoutAlgorithmData($supportedFeatures($category($providerFactory($description($name_0($id(new LayoutAlgorithmData$Builder, 'org.eclipse.elk.layered'), 'ELK Layered'), 'Layer-based algorithm provided by the Eclipse Layout Kernel. Arranges as many edges as possible into one direction by placing nodes into subsequent layers. This implementation supports different routing styles (straight, orthogonal, splines); if orthogonal routing is selected, arbitrary port constraints are respected, thus enabling the layout of block diagrams such as actor-oriented models or circuit schematics. Furthermore, full layout of compound graphs with cross-hierarchy edges is supported when the respective option is activated on the top level.'), new LayeredOptions$LayeredFactory), 'org.eclipse.elk.layered'), of_2(($clinit_GraphFeature() , SELF_LOOPS_0), stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_graph_properties_GraphFeature_2_classLit, 1), $intern_37, 245, 0, [INSIDE_SELF_LOOPS, MULTI_EDGES, EDGE_LABELS, PORTS_1, COMPOUND, CLUSTERS]))))); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.spacing.commentComment', $getDefault(SPACING_COMMENT_COMMENT)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.spacing.commentNode', $getDefault(SPACING_COMMENT_NODE)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.spacing.componentComponent', $getDefault(SPACING_COMPONENT_COMPONENT_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.spacing.edgeEdge', $getDefault(SPACING_EDGE_EDGE)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.spacing.edgeLabel', $getDefault(SPACING_EDGE_LABEL_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.spacing.edgeNode', $getDefault(SPACING_EDGE_NODE)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.spacing.labelLabel', $getDefault(SPACING_LABEL_LABEL)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.spacing.labelPortHorizontal', $getDefault(SPACING_LABEL_PORT_HORIZONTAL)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.spacing.labelPortVertical', $getDefault(SPACING_LABEL_PORT_VERTICAL)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.spacing.labelNode', $getDefault(SPACING_LABEL_NODE)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.spacing.nodeNode', $getDefault(SPACING_NODE_NODE_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.spacing.nodeSelfLoop', $getDefault(SPACING_NODE_SELF_LOOP)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.spacing.portPort', $getDefault(SPACING_PORT_PORT)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.spacing.individual', $getDefault(SPACING_INDIVIDUAL)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.spacing.baseValue', $getDefault(SPACING_BASE_VALUE_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers', $getDefault(SPACING_EDGE_EDGE_BETWEEN_LAYERS_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers', $getDefault(SPACING_EDGE_NODE_BETWEEN_LAYERS_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers', $getDefault(SPACING_NODE_NODE_BETWEEN_LAYERS_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.priority', valueOf_3(0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.priority.direction', $getDefault(PRIORITY_DIRECTION_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.priority.shortness', $getDefault(PRIORITY_SHORTNESS_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.priority.straightness', $getDefault(PRIORITY_STRAIGHTNESS_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.wrapping.strategy', $getDefault(WRAPPING_STRATEGY_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.wrapping.additionalEdgeSpacing', $getDefault(WRAPPING_ADDITIONAL_EDGE_SPACING_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.wrapping.correctionFactor', $getDefault(WRAPPING_CORRECTION_FACTOR_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.wrapping.cutting.strategy', $getDefault(WRAPPING_CUTTING_STRATEGY_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.wrapping.cutting.cuts', $getDefault(WRAPPING_CUTTING_CUTS_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.wrapping.cutting.msd.freedom', $getDefault(WRAPPING_CUTTING_MSD_FREEDOM_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.wrapping.validify.strategy', $getDefault(WRAPPING_VALIDIFY_STRATEGY_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.wrapping.validify.forbiddenIndices', $getDefault(WRAPPING_VALIDIFY_FORBIDDEN_INDICES_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.wrapping.multiEdge.improveCuts', $getDefault(WRAPPING_MULTI_EDGE_IMPROVE_CUTS_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty', $getDefault(WRAPPING_MULTI_EDGE_DISTANCE_PENALTY_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges', $getDefault(WRAPPING_MULTI_EDGE_IMPROVE_WRAPPED_EDGES_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility', $getDefault(NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default', $getDefault(NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEFAULT_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.edgeRouting.splines.mode', $getDefault(EDGE_ROUTING_SPLINES_MODE_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor', $getDefault(EDGE_ROUTING_SPLINES_SLOPPY_LAYER_SPACING_FACTOR_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.topdownLayout', $getDefault(TOPDOWN_LAYOUT_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.topdown.scaleFactor', $getDefault(TOPDOWN_SCALE_FACTOR_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.topdown.hierarchicalNodeWidth', $getDefault(TOPDOWN_HIERARCHICAL_NODE_WIDTH_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.topdown.hierarchicalNodeAspectRatio', $getDefault(TOPDOWN_HIERARCHICAL_NODE_ASPECT_RATIO_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.topdown.nodeType', TOPDOWN_NODE_TYPE_DEFAULT_0); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.padding', PADDING_DEFAULT_0); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.edgeRouting', EDGE_ROUTING_DEFAULT); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.port.borderOffset', 0); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.randomSeed', valueOf_3(1)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.aspectRatio', $intern_102); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.noLayout', $getDefault(NO_LAYOUT)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.portConstraints', $getDefault(PORT_CONSTRAINTS_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.port.side', $getDefault(PORT_SIDE)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.debugMode', $getDefault(DEBUG_MODE)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.alignment', $getDefault(ALIGNMENT)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.hierarchyHandling', $getDefault(HIERARCHY_HANDLING)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.separateConnectedComponents', ($clinit_Boolean() , true)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.insideSelfLoops.activate', $getDefault(INSIDE_SELF_LOOPS_ACTIVATE)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.insideSelfLoops.yo', $getDefault(INSIDE_SELF_LOOPS_YO)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.nodeSize.constraints', $getDefault(NODE_SIZE_CONSTRAINTS_1)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.nodeSize.options', $getDefault(NODE_SIZE_OPTIONS_1)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.nodeSize.fixedGraphSize', $getDefault(NODE_SIZE_FIXED_GRAPH_SIZE_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.direction', DIRECTION_DEFAULT); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.nodeLabels.placement', $getDefault(NODE_LABELS_PLACEMENT_1)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.nodeLabels.padding', $getDefault(NODE_LABELS_PADDING)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.portLabels.placement', $getDefault(PORT_LABELS_PLACEMENT_1)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.portLabels.nextToPortIfPossible', $getDefault(PORT_LABELS_NEXT_TO_PORT_IF_POSSIBLE)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.portLabels.treatAsGroup', $getDefault(PORT_LABELS_TREAT_AS_GROUP)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.portAlignment.default', PORT_ALIGNMENT_DEFAULT_DEFAULT); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.portAlignment.north', $getDefault(PORT_ALIGNMENT_NORTH)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.portAlignment.south', $getDefault(PORT_ALIGNMENT_SOUTH)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.portAlignment.west', $getDefault(PORT_ALIGNMENT_WEST)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.portAlignment.east', $getDefault(PORT_ALIGNMENT_EAST)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.unnecessaryBendpoints', $getDefault(UNNECESSARY_BENDPOINTS_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.layering.strategy', $getDefault(LAYERING_STRATEGY_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.layering.nodePromotion.strategy', $getDefault(LAYERING_NODE_PROMOTION_STRATEGY_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.thoroughness', $getDefault(THOROUGHNESS_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.layering.layerConstraint', $getDefault(LAYERING_LAYER_CONSTRAINT_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.cycleBreaking.strategy', $getDefault(CYCLE_BREAKING_STRATEGY_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.crossingMinimization.strategy', $getDefault(CROSSING_MINIMIZATION_STRATEGY_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.crossingMinimization.forceNodeModelOrder', $getDefault(CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold', $getDefault(CROSSING_MINIMIZATION_GREEDY_SWITCH_ACTIVATION_THRESHOLD_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.crossingMinimization.greedySwitch.type', $getDefault(CROSSING_MINIMIZATION_GREEDY_SWITCH_TYPE_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type', $getDefault(CROSSING_MINIMIZATION_GREEDY_SWITCH_HIERARCHICAL_TYPE_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.crossingMinimization.semiInteractive', $getDefault(CROSSING_MINIMIZATION_SEMI_INTERACTIVE_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.mergeEdges', $getDefault(MERGE_EDGES_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.mergeHierarchyEdges', $getDefault(MERGE_HIERARCHY_EDGES_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.interactiveReferencePoint', $getDefault(INTERACTIVE_REFERENCE_POINT_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.nodePlacement.strategy', $getDefault(NODE_PLACEMENT_STRATEGY_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment', $getDefault(NODE_PLACEMENT_BK_FIXED_ALIGNMENT_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.feedbackEdges', $getDefault(FEEDBACK_EDGES_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening', $getDefault(NODE_PLACEMENT_LINEAR_SEGMENTS_DEFLECTION_DAMPENING_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.edgeRouting.selfLoopDistribution', $getDefault(EDGE_ROUTING_SELF_LOOP_DISTRIBUTION_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.edgeRouting.selfLoopOrdering', $getDefault(EDGE_ROUTING_SELF_LOOP_ORDERING_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.contentAlignment', $getDefault(CONTENT_ALIGNMENT)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening', $getDefault(NODE_PLACEMENT_BK_EDGE_STRAIGHTENING_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.compaction.postCompaction.strategy', $getDefault(COMPACTION_POST_COMPACTION_STRATEGY_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.compaction.postCompaction.constraints', $getDefault(COMPACTION_POST_COMPACTION_CONSTRAINTS_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.compaction.connectedComponents', $getDefault(COMPACTION_CONNECTED_COMPONENTS_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.highDegreeNodes.treatment', $getDefault(HIGH_DEGREE_NODES_TREATMENT_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.highDegreeNodes.threshold', $getDefault(HIGH_DEGREE_NODES_THRESHOLD_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.highDegreeNodes.treeHeight', $getDefault(HIGH_DEGREE_NODES_TREE_HEIGHT_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.nodeSize.minimum', $getDefault(NODE_SIZE_MINIMUM_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.junctionPoints', $getDefault(JUNCTION_POINTS)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.edge.thickness', $getDefault(EDGE_THICKNESS_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.edgeLabels.placement', $getDefault(EDGE_LABELS_PLACEMENT)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.edgeLabels.inline', $getDefault(EDGE_LABELS_INLINE_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness', $getDefault(CROSSING_MINIMIZATION_HIERARCHICAL_SWEEPINESS_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.port.index', $getDefault(PORT_INDEX)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.commentBox', $getDefault(COMMENT_BOX)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.hypernode', $getDefault(HYPERNODE)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.port.anchor', $getDefault(PORT_ANCHOR)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.partitioning.activate', $getDefault(PARTITIONING_ACTIVATE)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.partitioning.partition', $getDefault(PARTITIONING_PARTITION)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth', $getDefault(LAYERING_MIN_WIDTH_UPPER_BOUND_ON_WIDTH_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor', $getDefault(LAYERING_MIN_WIDTH_UPPER_LAYER_ESTIMATION_SCALING_FACTOR_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.position', $getDefault(POSITION)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.allowNonFlowPortsToSwitchSides', $getDefault(ALLOW_NON_FLOW_PORTS_TO_SWITCH_SIDES_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.layering.nodePromotion.maxIterations', $getDefault(LAYERING_NODE_PROMOTION_MAX_ITERATIONS_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.edgeLabels.sideSelection', $getDefault(EDGE_LABELS_SIDE_SELECTION_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy', $getDefault(EDGE_LABELS_CENTER_LABEL_PLACEMENT_STRATEGY_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.margins', $getDefault(MARGINS)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.layering.coffmanGraham.layerBound', $getDefault(LAYERING_COFFMAN_GRAHAM_LAYER_BOUND_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.nodePlacement.favorStraightEdges', $getDefault(NODE_PLACEMENT_FAVOR_STRAIGHT_EDGES_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.spacing.portsSurrounding', $getDefault(SPACING_PORTS_SURROUNDING)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.directionCongruency', $getDefault(DIRECTION_CONGRUENCY_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.portSortingStrategy', $getDefault(PORT_SORTING_STRATEGY_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth', $getDefault(EDGE_ROUTING_POLYLINE_SLOPED_EDGE_ZONE_WIDTH_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.crossingMinimization.inLayerPredOf', $getDefault(CROSSING_MINIMIZATION_IN_LAYER_PRED_OF_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.crossingMinimization.inLayerSuccOf', $getDefault(CROSSING_MINIMIZATION_IN_LAYER_SUCC_OF_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.layering.layerChoiceConstraint', $getDefault(LAYERING_LAYER_CHOICE_CONSTRAINT_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.crossingMinimization.positionChoiceConstraint', $getDefault(CROSSING_MINIMIZATION_POSITION_CHOICE_CONSTRAINT_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.interactiveLayout', $getDefault(INTERACTIVE_LAYOUT)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.layering.layerId', $getDefault(LAYERING_LAYER_ID_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.crossingMinimization.positionId', $getDefault(CROSSING_MINIMIZATION_POSITION_ID_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.considerModelOrder.strategy', $getDefault(CONSIDER_MODEL_ORDER_STRATEGY_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.considerModelOrder.longEdgeStrategy', $getDefault(CONSIDER_MODEL_ORDER_LONG_EDGE_STRATEGY_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.considerModelOrder.crossingCounterNodeInfluence', $getDefault(CONSIDER_MODEL_ORDER_CROSSING_COUNTER_NODE_INFLUENCE_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.considerModelOrder.crossingCounterPortInfluence', $getDefault(CONSIDER_MODEL_ORDER_CROSSING_COUNTER_PORT_INFLUENCE_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.considerModelOrder.noModelOrder', $getDefault(CONSIDER_MODEL_ORDER_NO_MODEL_ORDER_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.considerModelOrder.components', $getDefault(CONSIDER_MODEL_ORDER_COMPONENTS_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.considerModelOrder.portModelOrder', $getDefault(CONSIDER_MODEL_ORDER_PORT_MODEL_ORDER_0)); $addOptionSupport(registry, 'org.eclipse.elk.layered', 'org.eclipse.elk.layered.generatePositionAndLayerIds', $getDefault(GENERATE_POSITION_AND_LAYER_IDS_0)); } function LayeredOptions(){ $clinit_LayeredOptions(); } defineClass(998, 1, $intern_90, LayeredOptions); _.apply_4 = function apply_132(registry){ $apply_15(registry); } ; var ALIGNMENT, ALLOW_NON_FLOW_PORTS_TO_SWITCH_SIDES_0, ASPECT_RATIO_1, COMMENT_BOX, COMPACTION_CONNECTED_COMPONENTS_0, COMPACTION_POST_COMPACTION_CONSTRAINTS_0, COMPACTION_POST_COMPACTION_STRATEGY_0, CONSIDER_MODEL_ORDER_COMPONENTS_0, CONSIDER_MODEL_ORDER_CROSSING_COUNTER_NODE_INFLUENCE_0, CONSIDER_MODEL_ORDER_CROSSING_COUNTER_PORT_INFLUENCE_0, CONSIDER_MODEL_ORDER_LONG_EDGE_STRATEGY_0, CONSIDER_MODEL_ORDER_NO_MODEL_ORDER_0, CONSIDER_MODEL_ORDER_PORT_MODEL_ORDER_0, CONSIDER_MODEL_ORDER_STRATEGY_0, CONTENT_ALIGNMENT, CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER_0, CROSSING_MINIMIZATION_GREEDY_SWITCH_ACTIVATION_THRESHOLD_0, CROSSING_MINIMIZATION_GREEDY_SWITCH_HIERARCHICAL_TYPE_0, CROSSING_MINIMIZATION_GREEDY_SWITCH_TYPE_0, CROSSING_MINIMIZATION_HIERARCHICAL_SWEEPINESS_0, CROSSING_MINIMIZATION_IN_LAYER_PRED_OF_0, CROSSING_MINIMIZATION_IN_LAYER_SUCC_OF_0, CROSSING_MINIMIZATION_POSITION_CHOICE_CONSTRAINT_0, CROSSING_MINIMIZATION_POSITION_ID_0, CROSSING_MINIMIZATION_SEMI_INTERACTIVE_0, CROSSING_MINIMIZATION_STRATEGY_0, CYCLE_BREAKING_STRATEGY_0, DEBUG_MODE, DIRECTION, DIRECTION_CONGRUENCY_0, DIRECTION_DEFAULT, EDGE_LABELS_CENTER_LABEL_PLACEMENT_STRATEGY_0, EDGE_LABELS_INLINE_0, EDGE_LABELS_PLACEMENT, EDGE_LABELS_SIDE_SELECTION_0, EDGE_ROUTING, EDGE_ROUTING_DEFAULT, EDGE_ROUTING_POLYLINE_SLOPED_EDGE_ZONE_WIDTH_0, EDGE_ROUTING_SELF_LOOP_DISTRIBUTION_0, EDGE_ROUTING_SELF_LOOP_ORDERING_0, EDGE_ROUTING_SPLINES_MODE_0, EDGE_ROUTING_SPLINES_SLOPPY_LAYER_SPACING_FACTOR_0, EDGE_THICKNESS_0, FEEDBACK_EDGES_0, GENERATE_POSITION_AND_LAYER_IDS_0, HIERARCHY_HANDLING, HIGH_DEGREE_NODES_THRESHOLD_0, HIGH_DEGREE_NODES_TREATMENT_0, HIGH_DEGREE_NODES_TREE_HEIGHT_0, HYPERNODE, INSIDE_SELF_LOOPS_ACTIVATE, INSIDE_SELF_LOOPS_YO, INTERACTIVE_LAYOUT, INTERACTIVE_REFERENCE_POINT_0, JUNCTION_POINTS, LAYERING_COFFMAN_GRAHAM_LAYER_BOUND_0, LAYERING_LAYER_CHOICE_CONSTRAINT_0, LAYERING_LAYER_CONSTRAINT_0, LAYERING_LAYER_ID_0, LAYERING_MIN_WIDTH_UPPER_BOUND_ON_WIDTH_0, LAYERING_MIN_WIDTH_UPPER_LAYER_ESTIMATION_SCALING_FACTOR_0, LAYERING_NODE_PROMOTION_MAX_ITERATIONS_0, LAYERING_NODE_PROMOTION_STRATEGY_0, LAYERING_STRATEGY_0, MARGINS, MERGE_EDGES_0, MERGE_HIERARCHY_EDGES_0, NODE_LABELS_PADDING, NODE_LABELS_PLACEMENT_1, NODE_PLACEMENT_BK_EDGE_STRAIGHTENING_0, NODE_PLACEMENT_BK_FIXED_ALIGNMENT_0, NODE_PLACEMENT_FAVOR_STRAIGHT_EDGES_0, NODE_PLACEMENT_LINEAR_SEGMENTS_DEFLECTION_DAMPENING_0, NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_0, NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEFAULT_0, NODE_PLACEMENT_STRATEGY_0, NODE_SIZE_CONSTRAINTS_1, NODE_SIZE_FIXED_GRAPH_SIZE_0, NODE_SIZE_MINIMUM_0, NODE_SIZE_OPTIONS_1, NO_LAYOUT, PADDING_1, PADDING_DEFAULT_0, PARTITIONING_ACTIVATE, PARTITIONING_PARTITION, PORT_ALIGNMENT_DEFAULT_DEFAULT, PORT_ALIGNMENT_EAST, PORT_ALIGNMENT_NORTH, PORT_ALIGNMENT_SOUTH, PORT_ALIGNMENT_WEST, PORT_ANCHOR, PORT_BORDER_OFFSET, PORT_CONSTRAINTS_0, PORT_INDEX, PORT_LABELS_NEXT_TO_PORT_IF_POSSIBLE, PORT_LABELS_PLACEMENT_1, PORT_LABELS_TREAT_AS_GROUP, PORT_SIDE, PORT_SORTING_STRATEGY_0, POSITION, PRIORITY_0, PRIORITY_DIRECTION_0, PRIORITY_SHORTNESS_0, PRIORITY_STRAIGHTNESS_0, RANDOM_SEED_0, SEPARATE_CONNECTED_COMPONENTS_0, SPACING_BASE_VALUE_0, SPACING_COMMENT_COMMENT, SPACING_COMMENT_NODE, SPACING_COMPONENT_COMPONENT_0, SPACING_EDGE_EDGE, SPACING_EDGE_EDGE_BETWEEN_LAYERS_0, SPACING_EDGE_LABEL_0, SPACING_EDGE_NODE, SPACING_EDGE_NODE_BETWEEN_LAYERS_0, SPACING_INDIVIDUAL, SPACING_LABEL_LABEL, SPACING_LABEL_NODE, SPACING_LABEL_PORT_HORIZONTAL, SPACING_LABEL_PORT_VERTICAL, SPACING_NODE_NODE_0, SPACING_NODE_NODE_BETWEEN_LAYERS_0, SPACING_NODE_SELF_LOOP, SPACING_PORTS_SURROUNDING, SPACING_PORT_PORT, THOROUGHNESS_0, TOPDOWN_HIERARCHICAL_NODE_ASPECT_RATIO_0, TOPDOWN_HIERARCHICAL_NODE_WIDTH_0, TOPDOWN_LAYOUT_0, TOPDOWN_NODE_TYPE_DEFAULT_0, TOPDOWN_SCALE_FACTOR_0, UNNECESSARY_BENDPOINTS_0, WRAPPING_ADDITIONAL_EDGE_SPACING_0, WRAPPING_CORRECTION_FACTOR_0, WRAPPING_CUTTING_CUTS_0, WRAPPING_CUTTING_MSD_FREEDOM_0, WRAPPING_CUTTING_STRATEGY_0, WRAPPING_MULTI_EDGE_DISTANCE_PENALTY_0, WRAPPING_MULTI_EDGE_IMPROVE_CUTS_0, WRAPPING_MULTI_EDGE_IMPROVE_WRAPPED_EDGES_0, WRAPPING_STRATEGY_0, WRAPPING_VALIDIFY_FORBIDDEN_INDICES_0, WRAPPING_VALIDIFY_STRATEGY_0; var Lorg_eclipse_elk_alg_layered_options_LayeredOptions_2_classLit = createForClass('org.eclipse.elk.alg.layered.options', 'LayeredOptions', 998); function LayeredOptions$LayeredFactory(){ } defineClass(999, 1, {}, LayeredOptions$LayeredFactory); _.create_0 = function create_10(){ var provider; return provider = new LayeredLayoutProvider , provider; } ; _.destroy = function destroy_2(obj){ } ; var Lorg_eclipse_elk_alg_layered_options_LayeredOptions$LayeredFactory_2_classLit = createForClass('org.eclipse.elk.alg.layered.options', 'LayeredOptions/LayeredFactory', 999); function $clinit_ElkSpacings$AbstractSpacingsBuilder(){ $clinit_ElkSpacings$AbstractSpacingsBuilder = emptyMethod; ELK_OPTION_TARGET_FILTER = new ElkSpacings$AbstractSpacingsBuilder$lambda$0$Type; } function $apply_16(this$static, holder){ $build(this$static).accept(holder); } function $build(this$static){ $add_3(this$static.filters, ($clinit_LayoutConfigurator() , NO_OVERWRITE_HOLDER)); if (fuzzyEquals(this$static.baseSpacing, $doubleValue(castToDouble($getDefault(($clinit_LayeredSpacings$LayeredSpacingsBuilder() , BASE_SPACING_OPTION)))))) { return new ElkSpacings$AbstractSpacingsBuilder$lambda$2$Type; } return new ElkSpacings$AbstractSpacingsBuilder$lambda$3$Type(this$static); } function $lambda$1_2(this$static, option_0){ var factor; factor = $getDefault(($clinit_LayeredSpacings$LayeredSpacingsBuilder() , BASE_SPACING_OPTION)) != null && option_0.getDefault() != null?$doubleValue(castToDouble(option_0.getDefault())) / $doubleValue(castToDouble($getDefault(BASE_SPACING_OPTION))):1; $put_6(this$static.factorMap, option_0, factor); } function $lambda$3_0(this$static, element_0){ $forEach_3($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(new AbstractMap$1(this$static.factorMap), 1)), new ElkSpacings$AbstractSpacingsBuilder$lambda$4$Type(this$static, element_0)), new ElkSpacings$AbstractSpacingsBuilder$lambda$6$Type(this$static, element_0)); } function $lambda$4_1(this$static, element_1, p_1){ return !$spliterator($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static.filters, 16)), new Predicate$lambda$2$Type(new ElkSpacings$AbstractSpacingsBuilder$lambda$5$Type(element_1, p_1)))).tryAdvance(($clinit_StreamImpl() , NULL_CONSUMER)); } function $lambda$6(this$static, element_1, p_1){ element_1.setProperty(p_1, $doubleValue(castToDouble($get_10(this$static.factorMap, p_1))) * this$static.baseSpacing); } function lambda$5_3(element_0, p_1, filter_2){ $clinit_ElkSpacings$AbstractSpacingsBuilder(); return filter_2.accept_4(element_0, p_1); } defineClass(1391, 1, {}); _.baseSpacing = 0; var ELK_OPTION_TARGET_FILTER; var Lorg_eclipse_elk_core_util_ElkSpacings$AbstractSpacingsBuilder_2_classLit = createForClass('org.eclipse.elk.core.util', 'ElkSpacings/AbstractSpacingsBuilder', 1391); function $clinit_LayeredSpacings$LayeredSpacingsBuilder(){ $clinit_LayeredSpacings$LayeredSpacingsBuilder = emptyMethod; $clinit_ElkSpacings$AbstractSpacingsBuilder(); BASE_SPACING_OPTION = ($clinit_LayeredOptions() , SPACING_NODE_NODE_0); DEPENDENT_SPACING_OPTIONS = newArrayList_1(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_graph_properties_IProperty_2_classLit, 1), $intern_112, 149, 0, [SPACING_COMPONENT_COMPONENT_0, SPACING_EDGE_EDGE, SPACING_EDGE_LABEL_0, SPACING_EDGE_NODE, SPACING_LABEL_LABEL, SPACING_LABEL_NODE, SPACING_LABEL_PORT_HORIZONTAL, SPACING_LABEL_PORT_VERTICAL, SPACING_NODE_SELF_LOOP, SPACING_PORT_PORT, SPACING_EDGE_EDGE_BETWEEN_LAYERS_0, SPACING_EDGE_NODE_BETWEEN_LAYERS_0, SPACING_NODE_NODE_BETWEEN_LAYERS_0])); } function LayeredSpacings$LayeredSpacingsBuilder(d){ $clinit_LayeredSpacings$LayeredSpacingsBuilder(); this.filters = newArrayList_1(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_LayoutConfigurator$IPropertyHolderOptionFilter_2_classLit, 1), $intern_2, 845, 0, [ELK_OPTION_TARGET_FILTER])); this.factorMap = new HashMap; this.baseSpacing = d; $put_6(this.factorMap, BASE_SPACING_OPTION, 1); $forEach_1(DEPENDENT_SPACING_OPTIONS, new ElkSpacings$AbstractSpacingsBuilder$lambda$1$Type(this)); } defineClass(792, 1391, {}, LayeredSpacings$LayeredSpacingsBuilder); var BASE_SPACING_OPTION, DEPENDENT_SPACING_OPTIONS; var Lorg_eclipse_elk_alg_layered_options_LayeredSpacings$LayeredSpacingsBuilder_2_classLit = createForClass('org.eclipse.elk.alg.layered.options', 'LayeredSpacings/LayeredSpacingsBuilder', 792); function $clinit_LayeringStrategy(){ $clinit_LayeringStrategy = emptyMethod; NETWORK_SIMPLEX = new LayeringStrategy('NETWORK_SIMPLEX', 0); LONGEST_PATH = new LayeringStrategy('LONGEST_PATH', 1); LONGEST_PATH_SOURCE = new LayeringStrategy('LONGEST_PATH_SOURCE', 2); COFFMAN_GRAHAM = new LayeringStrategy('COFFMAN_GRAHAM', 3); INTERACTIVE_3 = new LayeringStrategy('INTERACTIVE', 4); STRETCH_WIDTH = new LayeringStrategy('STRETCH_WIDTH', 5); MIN_WIDTH = new LayeringStrategy('MIN_WIDTH', 6); BF_MODEL_ORDER = new LayeringStrategy('BF_MODEL_ORDER', 7); DF_MODEL_ORDER = new LayeringStrategy('DF_MODEL_ORDER', 8); } function $create_5(this$static){ switch (this$static.ordinal) { case 0: return new NetworkSimplexLayerer; case 1: return new LongestPathLayerer; case 3: return new CoffmanGrahamLayerer; case 4: return new InteractiveLayerer; case 5: return new StretchWidthLayerer; case 6: return new MinWidthLayerer; case 2: return new LongestPathSourceLayerer; case 7: return new BreadthFirstModelOrderLayerer; case 8: return new DepthFirstModelOrderLayerer; default:throw toJs(new IllegalArgumentException_0('No implementation is available for the layerer ' + (this$static.name_0 != null?this$static.name_0:'' + this$static.ordinal))); } } function LayeringStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_52(name_0){ $clinit_LayeringStrategy(); return valueOf(($clinit_LayeringStrategy$Map() , $MAP_42), name_0); } function values_60(){ $clinit_LayeringStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_LayeringStrategy_2_classLit, 1), $intern_37, 265, 0, [NETWORK_SIMPLEX, LONGEST_PATH, LONGEST_PATH_SOURCE, COFFMAN_GRAHAM, INTERACTIVE_3, STRETCH_WIDTH, MIN_WIDTH, BF_MODEL_ORDER, DF_MODEL_ORDER]); } defineClass(265, 22, {3:1, 34:1, 22:1, 265:1, 188:1, 196:1}, LayeringStrategy); _.create_1 = function create_12(){ return $create_5(this); } ; _.create_2 = function create_11(){ return $create_5(this); } ; var BF_MODEL_ORDER, COFFMAN_GRAHAM, DF_MODEL_ORDER, INTERACTIVE_3, LONGEST_PATH, LONGEST_PATH_SOURCE, MIN_WIDTH, NETWORK_SIMPLEX, STRETCH_WIDTH; var Lorg_eclipse_elk_alg_layered_options_LayeringStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'LayeringStrategy', 265, Ljava_lang_Enum_2_classLit, values_60, valueOf_52); function $clinit_LayeringStrategy$Map(){ $clinit_LayeringStrategy$Map = emptyMethod; $MAP_42 = createValueOfMap(($clinit_LayeringStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_LayeringStrategy_2_classLit, 1), $intern_37, 265, 0, [NETWORK_SIMPLEX, LONGEST_PATH, LONGEST_PATH_SOURCE, COFFMAN_GRAHAM, INTERACTIVE_3, STRETCH_WIDTH, MIN_WIDTH, BF_MODEL_ORDER, DF_MODEL_ORDER]))); } var $MAP_42; function $clinit_LongEdgeOrderingStrategy(){ $clinit_LongEdgeOrderingStrategy = emptyMethod; DUMMY_NODE_OVER = new LongEdgeOrderingStrategy('DUMMY_NODE_OVER', 0); DUMMY_NODE_UNDER = new LongEdgeOrderingStrategy('DUMMY_NODE_UNDER', 1); EQUAL = new LongEdgeOrderingStrategy('EQUAL', 2); } function $returnValue(this$static){ switch (this$static.ordinal) { case 0: return $intern_0; case 1: return -1; default:return 0; } } function LongEdgeOrderingStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_53(name_0){ $clinit_LongEdgeOrderingStrategy(); return valueOf(($clinit_LongEdgeOrderingStrategy$Map() , $MAP_43), name_0); } function values_61(){ $clinit_LongEdgeOrderingStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_LongEdgeOrderingStrategy_2_classLit, 1), $intern_37, 390, 0, [DUMMY_NODE_OVER, DUMMY_NODE_UNDER, EQUAL]); } defineClass(390, 22, {3:1, 34:1, 22:1, 390:1}, LongEdgeOrderingStrategy); var DUMMY_NODE_OVER, DUMMY_NODE_UNDER, EQUAL; var Lorg_eclipse_elk_alg_layered_options_LongEdgeOrderingStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'LongEdgeOrderingStrategy', 390, Ljava_lang_Enum_2_classLit, values_61, valueOf_53); function $clinit_LongEdgeOrderingStrategy$Map(){ $clinit_LongEdgeOrderingStrategy$Map = emptyMethod; $MAP_43 = createValueOfMap(($clinit_LongEdgeOrderingStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_LongEdgeOrderingStrategy_2_classLit, 1), $intern_37, 390, 0, [DUMMY_NODE_OVER, DUMMY_NODE_UNDER, EQUAL]))); } var $MAP_43; function $clinit_NodeFlexibility(){ $clinit_NodeFlexibility = emptyMethod; NONE_8 = new NodeFlexibility('NONE', 0); PORT_POSITION = new NodeFlexibility('PORT_POSITION', 1); NODE_SIZE_WHERE_SPACE_PERMITS = new NodeFlexibility('NODE_SIZE_WHERE_SPACE_PERMITS', 2); NODE_SIZE = new NodeFlexibility('NODE_SIZE', 3); } function $isFlexibleSizeWhereSpacePermits(this$static){ return this$static == NODE_SIZE_WHERE_SPACE_PERMITS || this$static == NODE_SIZE; } function NodeFlexibility(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function getNodeFlexibility(lNode){ $clinit_NodeFlexibility(); var nf; (!lNode.propertyMap?($clinit_Collections() , $clinit_Collections() , EMPTY_MAP):lNode.propertyMap).containsKey(($clinit_LayeredOptions() , NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_0))?(nf = castTo($getProperty(lNode, NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_0), 203)):(nf = castTo($getProperty($getGraph(lNode), NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEFAULT_0), 203)); return nf; } function valueOf_54(name_0){ $clinit_NodeFlexibility(); return valueOf(($clinit_NodeFlexibility$Map() , $MAP_44), name_0); } function values_62(){ $clinit_NodeFlexibility(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_NodeFlexibility_2_classLit, 1), $intern_37, 203, 0, [NONE_8, PORT_POSITION, NODE_SIZE_WHERE_SPACE_PERMITS, NODE_SIZE]); } defineClass(203, 22, {3:1, 34:1, 22:1, 203:1}, NodeFlexibility); var NODE_SIZE, NODE_SIZE_WHERE_SPACE_PERMITS, NONE_8, PORT_POSITION; var Lorg_eclipse_elk_alg_layered_options_NodeFlexibility_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'NodeFlexibility', 203, Ljava_lang_Enum_2_classLit, values_62, valueOf_54); function $clinit_NodeFlexibility$Map(){ $clinit_NodeFlexibility$Map = emptyMethod; $MAP_44 = createValueOfMap(($clinit_NodeFlexibility() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_NodeFlexibility_2_classLit, 1), $intern_37, 203, 0, [NONE_8, PORT_POSITION, NODE_SIZE_WHERE_SPACE_PERMITS, NODE_SIZE]))); } var $MAP_44; function $clinit_NodePlacementStrategy(){ $clinit_NodePlacementStrategy = emptyMethod; SIMPLE = new NodePlacementStrategy('SIMPLE', 0); INTERACTIVE_4 = new NodePlacementStrategy('INTERACTIVE', 1); LINEAR_SEGMENTS = new NodePlacementStrategy('LINEAR_SEGMENTS', 2); BRANDES_KOEPF = new NodePlacementStrategy('BRANDES_KOEPF', 3); NETWORK_SIMPLEX_0 = new NodePlacementStrategy('NETWORK_SIMPLEX', 4); } function $create_6(this$static){ switch (this$static.ordinal) { case 0: return new SimpleNodePlacer; case 1: return new InteractiveNodePlacer; case 2: return new LinearSegmentsNodePlacer; case 3: return new BKNodePlacer; case 4: return new NetworkSimplexPlacer; default:throw toJs(new IllegalArgumentException_0('No implementation is available for the node placer ' + (this$static.name_0 != null?this$static.name_0:'' + this$static.ordinal))); } } function NodePlacementStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_55(name_0){ $clinit_NodePlacementStrategy(); return valueOf(($clinit_NodePlacementStrategy$Map() , $MAP_45), name_0); } function values_63(){ $clinit_NodePlacementStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_NodePlacementStrategy_2_classLit, 1), $intern_37, 323, 0, [SIMPLE, INTERACTIVE_4, LINEAR_SEGMENTS, BRANDES_KOEPF, NETWORK_SIMPLEX_0]); } defineClass(323, 22, {3:1, 34:1, 22:1, 323:1, 188:1, 196:1}, NodePlacementStrategy); _.create_1 = function create_14(){ return $create_6(this); } ; _.create_2 = function create_13(){ return $create_6(this); } ; var BRANDES_KOEPF, INTERACTIVE_4, LINEAR_SEGMENTS, NETWORK_SIMPLEX_0, SIMPLE; var Lorg_eclipse_elk_alg_layered_options_NodePlacementStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'NodePlacementStrategy', 323, Ljava_lang_Enum_2_classLit, values_63, valueOf_55); function $clinit_NodePlacementStrategy$Map(){ $clinit_NodePlacementStrategy$Map = emptyMethod; $MAP_45 = createValueOfMap(($clinit_NodePlacementStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_NodePlacementStrategy_2_classLit, 1), $intern_37, 323, 0, [SIMPLE, INTERACTIVE_4, LINEAR_SEGMENTS, BRANDES_KOEPF, NETWORK_SIMPLEX_0]))); } var $MAP_45; function $clinit_NodePromotionStrategy(){ $clinit_NodePromotionStrategy = emptyMethod; NONE_9 = new NodePromotionStrategy('NONE', 0); NIKOLOV = new NodePromotionStrategy('NIKOLOV', 1); NIKOLOV_PIXEL = new NodePromotionStrategy('NIKOLOV_PIXEL', 2); NIKOLOV_IMPROVED = new NodePromotionStrategy('NIKOLOV_IMPROVED', 3); NIKOLOV_IMPROVED_PIXEL = new NodePromotionStrategy('NIKOLOV_IMPROVED_PIXEL', 4); DUMMYNODE_PERCENTAGE = new NodePromotionStrategy('DUMMYNODE_PERCENTAGE', 5); NODECOUNT_PERCENTAGE = new NodePromotionStrategy('NODECOUNT_PERCENTAGE', 6); NO_BOUNDARY = new NodePromotionStrategy('NO_BOUNDARY', 7); MODEL_ORDER_LEFT_TO_RIGHT = new NodePromotionStrategy('MODEL_ORDER_LEFT_TO_RIGHT', 8); MODEL_ORDER_RIGHT_TO_LEFT = new NodePromotionStrategy('MODEL_ORDER_RIGHT_TO_LEFT', 9); } function NodePromotionStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_56(name_0){ $clinit_NodePromotionStrategy(); return valueOf(($clinit_NodePromotionStrategy$Map() , $MAP_46), name_0); } function values_64(){ $clinit_NodePromotionStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_NodePromotionStrategy_2_classLit, 1), $intern_37, 243, 0, [NONE_9, NIKOLOV, NIKOLOV_PIXEL, NIKOLOV_IMPROVED, NIKOLOV_IMPROVED_PIXEL, DUMMYNODE_PERCENTAGE, NODECOUNT_PERCENTAGE, NO_BOUNDARY, MODEL_ORDER_LEFT_TO_RIGHT, MODEL_ORDER_RIGHT_TO_LEFT]); } defineClass(243, 22, {3:1, 34:1, 22:1, 243:1}, NodePromotionStrategy); var DUMMYNODE_PERCENTAGE, MODEL_ORDER_LEFT_TO_RIGHT, MODEL_ORDER_RIGHT_TO_LEFT, NIKOLOV, NIKOLOV_IMPROVED, NIKOLOV_IMPROVED_PIXEL, NIKOLOV_PIXEL, NODECOUNT_PERCENTAGE, NONE_9, NO_BOUNDARY; var Lorg_eclipse_elk_alg_layered_options_NodePromotionStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'NodePromotionStrategy', 243, Ljava_lang_Enum_2_classLit, values_64, valueOf_56); function $clinit_NodePromotionStrategy$Map(){ $clinit_NodePromotionStrategy$Map = emptyMethod; $MAP_46 = createValueOfMap(($clinit_NodePromotionStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_NodePromotionStrategy_2_classLit, 1), $intern_37, 243, 0, [NONE_9, NIKOLOV, NIKOLOV_PIXEL, NIKOLOV_IMPROVED, NIKOLOV_IMPROVED_PIXEL, DUMMYNODE_PERCENTAGE, NODECOUNT_PERCENTAGE, NO_BOUNDARY, MODEL_ORDER_LEFT_TO_RIGHT, MODEL_ORDER_RIGHT_TO_LEFT]))); } var $MAP_46; function $clinit_OrderingStrategy(){ $clinit_OrderingStrategy = emptyMethod; NONE_10 = new OrderingStrategy('NONE', 0); NODES_AND_EDGES = new OrderingStrategy('NODES_AND_EDGES', 1); PREFER_EDGES = new OrderingStrategy('PREFER_EDGES', 2); PREFER_NODES = new OrderingStrategy('PREFER_NODES', 3); } function OrderingStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_57(name_0){ $clinit_OrderingStrategy(); return valueOf(($clinit_OrderingStrategy$Map() , $MAP_47), name_0); } function values_65(){ $clinit_OrderingStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_OrderingStrategy_2_classLit, 1), $intern_37, 284, 0, [NONE_10, NODES_AND_EDGES, PREFER_EDGES, PREFER_NODES]); } defineClass(284, 22, {3:1, 34:1, 22:1, 284:1}, OrderingStrategy); var NODES_AND_EDGES, NONE_10, PREFER_EDGES, PREFER_NODES; var Lorg_eclipse_elk_alg_layered_options_OrderingStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'OrderingStrategy', 284, Ljava_lang_Enum_2_classLit, values_65, valueOf_57); function $clinit_OrderingStrategy$Map(){ $clinit_OrderingStrategy$Map = emptyMethod; $MAP_47 = createValueOfMap(($clinit_OrderingStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_OrderingStrategy_2_classLit, 1), $intern_37, 284, 0, [NONE_10, NODES_AND_EDGES, PREFER_EDGES, PREFER_NODES]))); } var $MAP_47; function $clinit_PortSortingStrategy(){ $clinit_PortSortingStrategy = emptyMethod; INPUT_ORDER = new PortSortingStrategy('INPUT_ORDER', 0); PORT_DEGREE = new PortSortingStrategy('PORT_DEGREE', 1); } function PortSortingStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_58(name_0){ $clinit_PortSortingStrategy(); return valueOf(($clinit_PortSortingStrategy$Map() , $MAP_48), name_0); } function values_66(){ $clinit_PortSortingStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_PortSortingStrategy_2_classLit, 1), $intern_37, 430, 0, [INPUT_ORDER, PORT_DEGREE]); } defineClass(430, 22, {3:1, 34:1, 22:1, 430:1}, PortSortingStrategy); var INPUT_ORDER, PORT_DEGREE; var Lorg_eclipse_elk_alg_layered_options_PortSortingStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'PortSortingStrategy', 430, Ljava_lang_Enum_2_classLit, values_66, valueOf_58); function $clinit_PortSortingStrategy$Map(){ $clinit_PortSortingStrategy$Map = emptyMethod; $MAP_48 = createValueOfMap(($clinit_PortSortingStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_PortSortingStrategy_2_classLit, 1), $intern_37, 430, 0, [INPUT_ORDER, PORT_DEGREE]))); } var $MAP_48; function $clinit_PortType(){ $clinit_PortType = emptyMethod; UNDEFINED_0 = new PortType('UNDEFINED', 0); INPUT = new PortType('INPUT', 1); OUTPUT = new PortType('OUTPUT', 2); } function PortType(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_59(name_0){ $clinit_PortType(); return valueOf(($clinit_PortType$Map() , $MAP_49), name_0); } function values_67(){ $clinit_PortType(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_PortType_2_classLit, 1), $intern_37, 463, 0, [UNDEFINED_0, INPUT, OUTPUT]); } defineClass(463, 22, {3:1, 34:1, 22:1, 463:1}, PortType); var INPUT, OUTPUT, UNDEFINED_0; var Lorg_eclipse_elk_alg_layered_options_PortType_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'PortType', 463, Ljava_lang_Enum_2_classLit, values_67, valueOf_59); function $clinit_PortType$Map(){ $clinit_PortType$Map = emptyMethod; $MAP_49 = createValueOfMap(($clinit_PortType() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_PortType_2_classLit, 1), $intern_37, 463, 0, [UNDEFINED_0, INPUT, OUTPUT]))); } var $MAP_49; function $clinit_SelfLoopDistributionStrategy(){ $clinit_SelfLoopDistributionStrategy = emptyMethod; EQUALLY = new SelfLoopDistributionStrategy('EQUALLY', 0); NORTH_2 = new SelfLoopDistributionStrategy('NORTH', 1); NORTH_SOUTH = new SelfLoopDistributionStrategy('NORTH_SOUTH', 2); } function SelfLoopDistributionStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_60(name_0){ $clinit_SelfLoopDistributionStrategy(); return valueOf(($clinit_SelfLoopDistributionStrategy$Map() , $MAP_50), name_0); } function values_68(){ $clinit_SelfLoopDistributionStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_SelfLoopDistributionStrategy_2_classLit, 1), $intern_37, 387, 0, [EQUALLY, NORTH_2, NORTH_SOUTH]); } defineClass(387, 22, {3:1, 34:1, 22:1, 387:1}, SelfLoopDistributionStrategy); var EQUALLY, NORTH_2, NORTH_SOUTH; var Lorg_eclipse_elk_alg_layered_options_SelfLoopDistributionStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'SelfLoopDistributionStrategy', 387, Ljava_lang_Enum_2_classLit, values_68, valueOf_60); function $clinit_SelfLoopDistributionStrategy$Map(){ $clinit_SelfLoopDistributionStrategy$Map = emptyMethod; $MAP_50 = createValueOfMap(($clinit_SelfLoopDistributionStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_SelfLoopDistributionStrategy_2_classLit, 1), $intern_37, 387, 0, [EQUALLY, NORTH_2, NORTH_SOUTH]))); } var $MAP_50; function $clinit_SelfLoopOrderingStrategy(){ $clinit_SelfLoopOrderingStrategy = emptyMethod; STACKED = new SelfLoopOrderingStrategy('STACKED', 0); REVERSE_STACKED = new SelfLoopOrderingStrategy('REVERSE_STACKED', 1); SEQUENCED = new SelfLoopOrderingStrategy('SEQUENCED', 2); } function SelfLoopOrderingStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_61(name_0){ $clinit_SelfLoopOrderingStrategy(); return valueOf(($clinit_SelfLoopOrderingStrategy$Map() , $MAP_51), name_0); } function values_69(){ $clinit_SelfLoopOrderingStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_SelfLoopOrderingStrategy_2_classLit, 1), $intern_37, 349, 0, [STACKED, REVERSE_STACKED, SEQUENCED]); } defineClass(349, 22, {3:1, 34:1, 22:1, 349:1}, SelfLoopOrderingStrategy); var REVERSE_STACKED, SEQUENCED, STACKED; var Lorg_eclipse_elk_alg_layered_options_SelfLoopOrderingStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'SelfLoopOrderingStrategy', 349, Ljava_lang_Enum_2_classLit, values_69, valueOf_61); function $clinit_SelfLoopOrderingStrategy$Map(){ $clinit_SelfLoopOrderingStrategy$Map = emptyMethod; $MAP_51 = createValueOfMap(($clinit_SelfLoopOrderingStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_SelfLoopOrderingStrategy_2_classLit, 1), $intern_37, 349, 0, [STACKED, REVERSE_STACKED, SEQUENCED]))); } var $MAP_51; function $getHorizontalSpacing(this$static, nt1, nt2){ return $getLocalSpacing(this$static, nt1, nt2, this$static.nodeTypeSpacingOptionsHorizontal); } function $getLocalSpacing(this$static, nt1, nt2, nodeTypeSpacingMapping){ var layoutOption; layoutOption = nodeTypeSpacingMapping[nt1.ordinal][nt2.ordinal]; return $doubleValue(castToDouble($getProperty(this$static.graph_0, layoutOption))); } function $getLocalSpacing_0(n1, n2, nodeTypeSpacingMapping){ var layoutOption, s1, s2, t1, t2; t1 = n1.type_0; t2 = n2.type_0; layoutOption = nodeTypeSpacingMapping[t1.ordinal][t2.ordinal]; s1 = castToDouble(getIndividualOrDefault(n1, layoutOption)); s2 = castToDouble(getIndividualOrDefault(n2, layoutOption)); return $wnd.Math.max((checkCriticalNotNull(s1) , s1), (checkCriticalNotNull(s2) , s2)); } function $getVerticalSpacing(this$static, nt1, nt2){ return $getLocalSpacing(this$static, nt1, nt2, this$static.nodeTypeSpacingOptionsVertical); } function $getVerticalSpacing_0(this$static, n1, n2){ return $getLocalSpacing_0(n1, n2, this$static.nodeTypeSpacingOptionsVertical); } function $nodeTypeSpacing(this$static, n1, n2, spacing){ setCheck(this$static.nodeTypeSpacingOptionsVertical[n1.ordinal], n2.ordinal, spacing); setCheck(this$static.nodeTypeSpacingOptionsVertical[n2.ordinal], n1.ordinal, spacing); } function $nodeTypeSpacing_0(this$static, n1, n2, spacingVert, spacingHorz){ setCheck(this$static.nodeTypeSpacingOptionsVertical[n1.ordinal], n2.ordinal, spacingVert); setCheck(this$static.nodeTypeSpacingOptionsVertical[n2.ordinal], n1.ordinal, spacingVert); setCheck(this$static.nodeTypeSpacingOptionsHorizontal[n1.ordinal], n2.ordinal, spacingHorz); setCheck(this$static.nodeTypeSpacingOptionsHorizontal[n2.ordinal], n1.ordinal, spacingHorz); } function $nodeTypeSpacing_1(this$static, nt, spacing){ setCheck(this$static.nodeTypeSpacingOptionsVertical[nt.ordinal], nt.ordinal, spacing); } function $nodeTypeSpacing_2(this$static, nt, spacingVert, spacingHorz){ setCheck(this$static.nodeTypeSpacingOptionsVertical[nt.ordinal], nt.ordinal, spacingVert); setCheck(this$static.nodeTypeSpacingOptionsHorizontal[nt.ordinal], nt.ordinal, spacingHorz); } function Spacings(graph){ var n; this.graph_0 = graph; n = ($clinit_LNode$NodeType() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_graph_LNode$NodeType_2_classLit, 1), $intern_37, 273, 0, [NORMAL, LONG_EDGE, EXTERNAL_PORT, NORTH_SOUTH_PORT, LABEL, BREAKING_POINT])).length; this.nodeTypeSpacingOptionsHorizontal = initMultidimensionalArray(Lorg_eclipse_elk_graph_properties_IProperty_2_classLit, [$intern_16, $intern_112], [601, 149], 0, [n, n], 2); this.nodeTypeSpacingOptionsVertical = initMultidimensionalArray(Lorg_eclipse_elk_graph_properties_IProperty_2_classLit, [$intern_16, $intern_112], [601, 149], 0, [n, n], 2); $nodeTypeSpacing_2(this, NORMAL, ($clinit_LayeredOptions() , SPACING_NODE_NODE_0), SPACING_NODE_NODE_BETWEEN_LAYERS_0); $nodeTypeSpacing_0(this, NORMAL, LONG_EDGE, SPACING_EDGE_NODE, SPACING_EDGE_NODE_BETWEEN_LAYERS_0); $nodeTypeSpacing(this, NORMAL, NORTH_SOUTH_PORT, SPACING_EDGE_NODE); $nodeTypeSpacing(this, NORMAL, EXTERNAL_PORT, SPACING_EDGE_NODE); $nodeTypeSpacing_0(this, NORMAL, LABEL, SPACING_NODE_NODE_0, SPACING_NODE_NODE_BETWEEN_LAYERS_0); $nodeTypeSpacing_2(this, LONG_EDGE, SPACING_EDGE_EDGE, SPACING_EDGE_EDGE_BETWEEN_LAYERS_0); $nodeTypeSpacing(this, LONG_EDGE, NORTH_SOUTH_PORT, SPACING_EDGE_EDGE); $nodeTypeSpacing(this, LONG_EDGE, EXTERNAL_PORT, SPACING_EDGE_EDGE); $nodeTypeSpacing_0(this, LONG_EDGE, LABEL, SPACING_EDGE_NODE, SPACING_EDGE_NODE_BETWEEN_LAYERS_0); $nodeTypeSpacing_1(this, NORTH_SOUTH_PORT, SPACING_EDGE_EDGE); $nodeTypeSpacing(this, NORTH_SOUTH_PORT, EXTERNAL_PORT, SPACING_EDGE_EDGE); $nodeTypeSpacing(this, NORTH_SOUTH_PORT, LABEL, SPACING_LABEL_NODE); $nodeTypeSpacing_1(this, EXTERNAL_PORT, SPACING_PORT_PORT); $nodeTypeSpacing_0(this, EXTERNAL_PORT, LABEL, SPACING_LABEL_PORT_VERTICAL, SPACING_LABEL_PORT_HORIZONTAL); $nodeTypeSpacing_2(this, LABEL, SPACING_EDGE_EDGE, SPACING_EDGE_EDGE); $nodeTypeSpacing_2(this, BREAKING_POINT, SPACING_EDGE_EDGE, SPACING_EDGE_EDGE_BETWEEN_LAYERS_0); $nodeTypeSpacing_0(this, BREAKING_POINT, NORMAL, SPACING_EDGE_NODE, SPACING_EDGE_NODE_BETWEEN_LAYERS_0); $nodeTypeSpacing_0(this, BREAKING_POINT, LABEL, SPACING_EDGE_NODE, SPACING_EDGE_NODE_BETWEEN_LAYERS_0); $nodeTypeSpacing_0(this, BREAKING_POINT, LONG_EDGE, SPACING_EDGE_NODE, SPACING_EDGE_NODE_BETWEEN_LAYERS_0); } function getIndividualOrDefault(node, property){ var individualSpacings, result; result = null; if ($hasProperty(node, ($clinit_LayeredOptions() , SPACING_INDIVIDUAL))) { individualSpacings = castTo($getProperty(node, SPACING_INDIVIDUAL), 96); individualSpacings.hasProperty(property) && (result = individualSpacings.getProperty(property)); } result == null && (result = $getProperty($getGraph(node), property)); return result; } defineClass(312, 1, {312:1}, Spacings); var Lorg_eclipse_elk_alg_layered_options_Spacings_2_classLit = createForClass('org.eclipse.elk.alg.layered.options', 'Spacings', 312); function $clinit_SplineRoutingMode(){ $clinit_SplineRoutingMode = emptyMethod; CONSERVATIVE = new SplineRoutingMode('CONSERVATIVE', 0); CONSERVATIVE_SOFT = new SplineRoutingMode('CONSERVATIVE_SOFT', 1); SLOPPY = new SplineRoutingMode('SLOPPY', 2); } function SplineRoutingMode(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_62(name_0){ $clinit_SplineRoutingMode(); return valueOf(($clinit_SplineRoutingMode$Map() , $MAP_52), name_0); } function values_70(){ $clinit_SplineRoutingMode(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_SplineRoutingMode_2_classLit, 1), $intern_37, 350, 0, [CONSERVATIVE, CONSERVATIVE_SOFT, SLOPPY]); } defineClass(350, 22, {3:1, 34:1, 22:1, 350:1}, SplineRoutingMode); var CONSERVATIVE, CONSERVATIVE_SOFT, SLOPPY; var Lorg_eclipse_elk_alg_layered_options_SplineRoutingMode_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'SplineRoutingMode', 350, Ljava_lang_Enum_2_classLit, values_70, valueOf_62); function $clinit_SplineRoutingMode$Map(){ $clinit_SplineRoutingMode$Map = emptyMethod; $MAP_52 = createValueOfMap(($clinit_SplineRoutingMode() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_SplineRoutingMode_2_classLit, 1), $intern_37, 350, 0, [CONSERVATIVE, CONSERVATIVE_SOFT, SLOPPY]))); } var $MAP_52; function $clinit_ValidifyStrategy(){ $clinit_ValidifyStrategy = emptyMethod; NO = new ValidifyStrategy('NO', 0); GREEDY_0 = new ValidifyStrategy('GREEDY', 1); LOOK_BACK = new ValidifyStrategy('LOOK_BACK', 2); } function ValidifyStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_63(name_0){ $clinit_ValidifyStrategy(); return valueOf(($clinit_ValidifyStrategy$Map() , $MAP_53), name_0); } function values_71(){ $clinit_ValidifyStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_ValidifyStrategy_2_classLit, 1), $intern_37, 352, 0, [NO, GREEDY_0, LOOK_BACK]); } defineClass(352, 22, {3:1, 34:1, 22:1, 352:1}, ValidifyStrategy); var GREEDY_0, LOOK_BACK, NO; var Lorg_eclipse_elk_alg_layered_options_ValidifyStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'ValidifyStrategy', 352, Ljava_lang_Enum_2_classLit, values_71, valueOf_63); function $clinit_ValidifyStrategy$Map(){ $clinit_ValidifyStrategy$Map = emptyMethod; $MAP_53 = createValueOfMap(($clinit_ValidifyStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_ValidifyStrategy_2_classLit, 1), $intern_37, 352, 0, [NO, GREEDY_0, LOOK_BACK]))); } var $MAP_53; function $clinit_WrappingStrategy(){ $clinit_WrappingStrategy = emptyMethod; OFF_0 = new WrappingStrategy('OFF', 0); SINGLE_EDGE = new WrappingStrategy('SINGLE_EDGE', 1); MULTI_EDGE = new WrappingStrategy('MULTI_EDGE', 2); } function WrappingStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_64(name_0){ $clinit_WrappingStrategy(); return valueOf(($clinit_WrappingStrategy$Map() , $MAP_54), name_0); } function values_72(){ $clinit_WrappingStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_WrappingStrategy_2_classLit, 1), $intern_37, 388, 0, [OFF_0, SINGLE_EDGE, MULTI_EDGE]); } defineClass(388, 22, {3:1, 34:1, 22:1, 388:1}, WrappingStrategy); var MULTI_EDGE, OFF_0, SINGLE_EDGE; var Lorg_eclipse_elk_alg_layered_options_WrappingStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.layered.options', 'WrappingStrategy', 388, Ljava_lang_Enum_2_classLit, values_72, valueOf_64); function $clinit_WrappingStrategy$Map(){ $clinit_WrappingStrategy$Map = emptyMethod; $MAP_54 = createValueOfMap(($clinit_WrappingStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_options_WrappingStrategy_2_classLit, 1), $intern_37, 388, 0, [OFF_0, SINGLE_EDGE, MULTI_EDGE]))); } var $MAP_54; function $clinit_DepthFirstCycleBreaker(){ $clinit_DepthFirstCycleBreaker = emptyMethod; INTERMEDIATE_PROCESSING_CONFIGURATION = $addAfter(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P5_EDGE_ROUTING), ($clinit_IntermediateProcessorStrategy() , REVERSED_EDGE_RESTORER)); } function $dfs_3(this$static, n){ var out, out$iterator, target; if (this$static.visited[n.id_0]) { return; } this$static.visited[n.id_0] = true; this$static.active[n.id_0] = true; for (out$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(n).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(out$iterator);) { out = castTo($next_0(out$iterator), 18); if ($isSelfLoop(out)) { continue; } target = out.target.owner; this$static.active[target.id_0]?$add_3(this$static.edgesToBeReversed, out):$dfs_3(this$static, target); } this$static.active[n.id_0] = false; } function $process_57(this$static, graph, monitor){ var edge, edge$iterator, i, index_0, n, node, node$iterator, nodeCount, nodes, source, source$iterator; monitor.begin('Depth-first cycle removal', 1); nodes = graph.layerlessNodes; nodeCount = nodes.array.length; this$static.sources = new ArrayList; this$static.visited = initUnidimensionalArray(Z_classLit, $intern_91, 28, nodeCount, 16, 1); this$static.active = initUnidimensionalArray(Z_classLit, $intern_91, 28, nodeCount, 16, 1); this$static.edgesToBeReversed = new ArrayList; index_0 = 0; for (node$iterator = new ArrayList$1(nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); node.id_0 = index_0; isEmpty_13($getIncomingEdges(node)) && $add_3(this$static.sources, node); ++index_0; } for (source$iterator = new ArrayList$1(this$static.sources); source$iterator.i < source$iterator.this$01.array.length;) { source = castTo($next_6(source$iterator), 10); $dfs_3(this$static, source); } for (i = 0; i < nodeCount; i++) { if (!this$static.visited[i]) { n = (checkCriticalElementIndex(i, nodes.array.length) , castTo(nodes.array[i], 10)); $dfs_3(this$static, n); } } for (edge$iterator = new ArrayList$1(this$static.edgesToBeReversed); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); $reverse_0(edge, true); $setProperty_0(graph, ($clinit_InternalProperties_1() , CYCLIC), ($clinit_Boolean() , true)); } this$static.sources = null; this$static.visited = null; this$static.active = null; this$static.edgesToBeReversed = null; monitor.done_1(); } function DepthFirstCycleBreaker(){ $clinit_DepthFirstCycleBreaker(); } defineClass(1398, 1, $intern_113, DepthFirstCycleBreaker); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration(graph){ return castTo(graph, 36) , INTERMEDIATE_PROCESSING_CONFIGURATION; } ; _.process = function process_54(graph, monitor){ $process_57(this, castTo(graph, 36), monitor); } ; var INTERMEDIATE_PROCESSING_CONFIGURATION; var Lorg_eclipse_elk_alg_layered_p1cycles_DepthFirstCycleBreaker_2_classLit = createForClass('org.eclipse.elk.alg.layered.p1cycles', 'DepthFirstCycleBreaker', 1398); function $clinit_GreedyCycleBreaker(){ $clinit_GreedyCycleBreaker = emptyMethod; INTERMEDIATE_PROCESSING_CONFIGURATION_0 = $addAfter(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P5_EDGE_ROUTING), ($clinit_IntermediateProcessorStrategy() , REVERSED_EDGE_RESTORER)); } function $process_58(this$static, layeredGraph, monitor){ var edge, edge$array, edge$index, edge$iterator, edge$iterator0, edge$max, index_0, maxNode, maxNodes, maxOutflow, nextLeft, nextRight, node, node$iterator, node$iterator0, node$iterator1, nodes, outflow, outgoingEdges, port, port$array, port$index, port$iterator, port$max, ports, priority, shiftBase, sink, source, targetIx, unprocessedNodeCount; monitor.begin('Greedy cycle removal', 1); nodes = layeredGraph.layerlessNodes; unprocessedNodeCount = nodes.array.length; this$static.indeg = initUnidimensionalArray(I_classLit, $intern_49, 28, unprocessedNodeCount, 15, 1); this$static.outdeg = initUnidimensionalArray(I_classLit, $intern_49, 28, unprocessedNodeCount, 15, 1); this$static.mark = initUnidimensionalArray(I_classLit, $intern_49, 28, unprocessedNodeCount, 15, 1); index_0 = 0; for (node$iterator0 = new ArrayList$1(nodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); node.id_0 = index_0; for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); for (edge$iterator0 = new ArrayList$1(port.incomingEdges); edge$iterator0.i < edge$iterator0.this$01.array.length;) { edge = castTo($next_6(edge$iterator0), 18); if (edge.source.owner == node) { continue; } priority = castTo($getProperty(edge, ($clinit_LayeredOptions() , PRIORITY_DIRECTION_0)), 17).value_0; this$static.indeg[index_0] += priority > 0?priority + 1:1; } for (edge$iterator = new ArrayList$1(port.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); if (edge.target.owner == node) { continue; } priority = castTo($getProperty(edge, ($clinit_LayeredOptions() , PRIORITY_DIRECTION_0)), 17).value_0; this$static.outdeg[index_0] += priority > 0?priority + 1:1; } } this$static.outdeg[index_0] == 0?$add_7(this$static.sinks, node):this$static.indeg[index_0] == 0 && $add_7(this$static.sources, node); ++index_0; } nextRight = -1; nextLeft = 1; maxNodes = new ArrayList; this$static.random_0 = castTo($getProperty(layeredGraph, ($clinit_InternalProperties_1() , RANDOM_0)), 234); while (unprocessedNodeCount > 0) { while (this$static.sinks.size_0 != 0) { sink = castTo($removeFirst_0(this$static.sinks), 10); this$static.mark[sink.id_0] = nextRight--; $updateNeighbors(this$static, sink); --unprocessedNodeCount; } while (this$static.sources.size_0 != 0) { source = castTo($removeFirst_0(this$static.sources), 10); this$static.mark[source.id_0] = nextLeft++; $updateNeighbors(this$static, source); --unprocessedNodeCount; } if (unprocessedNodeCount > 0) { maxOutflow = $intern_43; for (node$iterator1 = new ArrayList$1(nodes); node$iterator1.i < node$iterator1.this$01.array.length;) { node = castTo($next_6(node$iterator1), 10); if (this$static.mark[node.id_0] == 0) { outflow = this$static.outdeg[node.id_0] - this$static.indeg[node.id_0]; if (outflow >= maxOutflow) { if (outflow > maxOutflow) { maxNodes.array.length = 0; maxOutflow = outflow; } push_1(maxNodes.array, node); } } } maxNode = this$static.chooseNodeWithMaxOutflow(maxNodes); this$static.mark[maxNode.id_0] = nextLeft++; $updateNeighbors(this$static, maxNode); --unprocessedNodeCount; } } shiftBase = nodes.array.length + 1; for (index_0 = 0; index_0 < nodes.array.length; index_0++) { this$static.mark[index_0] < 0 && (this$static.mark[index_0] += shiftBase); } for (node$iterator = new ArrayList$1(nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); ports = toPortArray(node.ports); for (port$array = ports , port$index = 0 , port$max = port$array.length; port$index < port$max; ++port$index) { port = port$array[port$index]; outgoingEdges = toEdgeArray(port.outgoingEdges); for (edge$array = outgoingEdges , edge$index = 0 , edge$max = edge$array.length; edge$index < edge$max; ++edge$index) { edge = edge$array[edge$index]; targetIx = edge.target.owner.id_0; if (this$static.mark[node.id_0] > this$static.mark[targetIx]) { $reverse_0(edge, true); $setProperty_0(layeredGraph, CYCLIC, ($clinit_Boolean() , true)); } } } } this$static.indeg = null; this$static.outdeg = null; this$static.mark = null; $reset_0(this$static.sources); $reset_0(this$static.sinks); monitor.done_1(); } function $updateNeighbors(this$static, node){ var connectedPort, edge, edge$iterator, endpoint, index_0, port, port$iterator, priority; for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); for (edge$iterator = new LPort$CombineIter$1(port.connectedEdges); $hasNext_3(edge$iterator.firstIterator) || $hasNext_3(edge$iterator.secondIterator);) { edge = castTo($hasNext_3(edge$iterator.firstIterator)?$next_6(edge$iterator.firstIterator):$next_6(edge$iterator.secondIterator), 18); connectedPort = edge.source == port?edge.target:edge.source; endpoint = connectedPort.owner; if (node == endpoint) { continue; } priority = castTo($getProperty(edge, ($clinit_LayeredOptions() , PRIORITY_DIRECTION_0)), 17).value_0; priority < 0 && (priority = 0); index_0 = endpoint.id_0; if (this$static.mark[index_0] == 0) { if (edge.target == connectedPort) { this$static.indeg[index_0] -= priority + 1; this$static.indeg[index_0] <= 0 && this$static.outdeg[index_0] > 0 && $add_7(this$static.sources, endpoint); } else { this$static.outdeg[index_0] -= priority + 1; this$static.outdeg[index_0] <= 0 && this$static.indeg[index_0] > 0 && $add_7(this$static.sinks, endpoint); } } } } } function GreedyCycleBreaker(){ $clinit_GreedyCycleBreaker(); this.sources = new LinkedList; this.sinks = new LinkedList; } defineClass(793, 1, $intern_113, GreedyCycleBreaker); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_0(graph){ return castTo(graph, 36) , INTERMEDIATE_PROCESSING_CONFIGURATION_0; } ; _.process = function process_55(layeredGraph, monitor){ $process_58(this, castTo(layeredGraph, 36), monitor); } ; _.chooseNodeWithMaxOutflow = function chooseNodeWithMaxOutflow(nodes){ return castTo($get_11(nodes, $nextInt(this.random_0, nodes.array.length)), 10); } ; var INTERMEDIATE_PROCESSING_CONFIGURATION_0; var Lorg_eclipse_elk_alg_layered_p1cycles_GreedyCycleBreaker_2_classLit = createForClass('org.eclipse.elk.alg.layered.p1cycles', 'GreedyCycleBreaker', 793); function GreedyModelOrderCycleBreaker(){ $clinit_GreedyCycleBreaker(); GreedyCycleBreaker.call(this); } defineClass(1401, 793, $intern_113, GreedyModelOrderCycleBreaker); _.chooseNodeWithMaxOutflow = function chooseNodeWithMaxOutflow_0(nodes){ var minimumModelOrder, node, node$iterator, returnNode; returnNode = null; minimumModelOrder = $intern_0; for (node$iterator = new ArrayList$1(nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if ($hasProperty(node, ($clinit_InternalProperties_1() , MODEL_ORDER_1)) && castTo($getProperty(node, MODEL_ORDER_1), 17).value_0 < minimumModelOrder) { minimumModelOrder = castTo($getProperty(node, MODEL_ORDER_1), 17).value_0; returnNode = node; } } if (!returnNode) { return castTo($get_11(nodes, $nextInt(this.random_0, nodes.array.length)), 10); } return returnNode; } ; var Lorg_eclipse_elk_alg_layered_p1cycles_GreedyModelOrderCycleBreaker_2_classLit = createForClass('org.eclipse.elk.alg.layered.p1cycles', 'GreedyModelOrderCycleBreaker', 1401); function $clinit_InteractiveCycleBreaker(){ $clinit_InteractiveCycleBreaker = emptyMethod; INTERMEDIATE_PROCESSING_CONFIGURATION_1 = $addAfter($addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P1_CYCLE_BREAKING), ($clinit_IntermediateProcessorStrategy() , INTERACTIVE_EXTERNAL_PORT_POSITIONER)), P5_EDGE_ROUTING, REVERSED_EDGE_RESTORER); } function $findCycles(this$static, node1, revEdges){ var edge, edge$iterator, node2, port, port$iterator; node1.id_0 = -1; for (port$iterator = $getPorts(node1, ($clinit_PortType() , OUTPUT)).iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); for (edge$iterator = new ArrayList$1(port.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); node2 = edge.target.owner; node1 != node2 && (node2.id_0 < 0?revEdges.add_2(edge):node2.id_0 > 0 && $findCycles(this$static, node2, revEdges)); } } node1.id_0 = 0; } function $process_59(this$static, layeredGraph, monitor){ var edge, edge$iterator, edge$iterator0, edge$iterator1, node, node$iterator, port, port$iterator, revEdges, source, source$iterator, sourcex, target, targetx; monitor.begin('Interactive cycle breaking', 1); revEdges = new ArrayList; for (source$iterator = new ArrayList$1(layeredGraph.layerlessNodes); source$iterator.i < source$iterator.this$01.array.length;) { source = castTo($next_6(source$iterator), 10); source.id_0 = 1; sourcex = $getInteractiveReferencePoint(source).x_0; for (port$iterator = $getPorts(source, ($clinit_PortType() , OUTPUT)).iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); for (edge$iterator0 = new ArrayList$1(port.outgoingEdges); edge$iterator0.i < edge$iterator0.this$01.array.length;) { edge = castTo($next_6(edge$iterator0), 18); target = edge.target.owner; if (target != source) { targetx = $getInteractiveReferencePoint(target).x_0; targetx < sourcex && (push_1(revEdges.array, edge) , true); } } } } for (edge$iterator1 = new ArrayList$1(revEdges); edge$iterator1.i < edge$iterator1.this$01.array.length;) { edge = castTo($next_6(edge$iterator1), 18); $reverse_0(edge, true); } revEdges.array.length = 0; for (node$iterator = new ArrayList$1(layeredGraph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); node.id_0 > 0 && $findCycles(this$static, node, revEdges); } for (edge$iterator = new ArrayList$1(revEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); $reverse_0(edge, true); } revEdges.array.length = 0; monitor.done_1(); } function InteractiveCycleBreaker(){ $clinit_InteractiveCycleBreaker(); } defineClass(1399, 1, $intern_113, InteractiveCycleBreaker); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_1(graph){ return castTo(graph, 36) , INTERMEDIATE_PROCESSING_CONFIGURATION_1; } ; _.process = function process_56(layeredGraph, monitor){ $process_59(this, castTo(layeredGraph, 36), monitor); } ; var INTERMEDIATE_PROCESSING_CONFIGURATION_1; var Lorg_eclipse_elk_alg_layered_p1cycles_InteractiveCycleBreaker_2_classLit = createForClass('org.eclipse.elk.alg.layered.p1cycles', 'InteractiveCycleBreaker', 1399); function $clinit_ModelOrderCycleBreaker(){ $clinit_ModelOrderCycleBreaker = emptyMethod; INTERMEDIATE_PROCESSING_CONFIGURATION_2 = $addAfter(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P5_EDGE_ROUTING), ($clinit_IntermediateProcessorStrategy() , REVERSED_EDGE_RESTORER)); } function $computeConstraintModelOrder(this$static, node, offset){ var modelOrder; modelOrder = 0; switch (castTo($getProperty(node, ($clinit_LayeredOptions() , LAYERING_LAYER_CONSTRAINT_0)), 171).ordinal) { case 2: modelOrder = 2 * -offset + this$static.firstSeparateModelOrder; ++this$static.firstSeparateModelOrder; break; case 1: modelOrder = -offset; break; case 3: modelOrder = offset; break; case 4: modelOrder = 2 * offset + this$static.lastSeparateModelOrder; ++this$static.lastSeparateModelOrder; } $hasProperty(node, ($clinit_InternalProperties_1() , MODEL_ORDER_1)) && (modelOrder += castTo($getProperty(node, MODEL_ORDER_1), 17).value_0); return modelOrder; } function $process_60(this$static, layeredGraph, monitor){ var edge, edge$iterator, edge$iterator0, modelOrderSource, modelOrderTarget, node, node$iterator, offset, port, port$iterator, revEdges, source, source$iterator, target; monitor.begin('Model order cycle breaking', 1); this$static.firstSeparateModelOrder = 0; this$static.lastSeparateModelOrder = 0; revEdges = new ArrayList; offset = layeredGraph.layerlessNodes.array.length; for (node$iterator = new ArrayList$1(layeredGraph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); $hasProperty(node, ($clinit_InternalProperties_1() , MODEL_ORDER_1)) && (offset = $wnd.Math.max(offset, castTo($getProperty(node, MODEL_ORDER_1), 17).value_0 + 1)); } for (source$iterator = new ArrayList$1(layeredGraph.layerlessNodes); source$iterator.i < source$iterator.this$01.array.length;) { source = castTo($next_6(source$iterator), 10); modelOrderSource = $computeConstraintModelOrder(this$static, source, offset); for (port$iterator = $getPorts(source, ($clinit_PortType() , OUTPUT)).iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); for (edge$iterator0 = new ArrayList$1(port.outgoingEdges); edge$iterator0.i < edge$iterator0.this$01.array.length;) { edge = castTo($next_6(edge$iterator0), 18); target = edge.target.owner; modelOrderTarget = $computeConstraintModelOrder(this$static, target, offset); modelOrderTarget < modelOrderSource && (push_1(revEdges.array, edge) , true); } } } for (edge$iterator = new ArrayList$1(revEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); $reverse_0(edge, true); $setProperty_0(layeredGraph, ($clinit_InternalProperties_1() , CYCLIC), ($clinit_Boolean() , true)); } revEdges.array.length = 0; monitor.done_1(); } function ModelOrderCycleBreaker(){ $clinit_ModelOrderCycleBreaker(); } defineClass(1400, 1, $intern_113, ModelOrderCycleBreaker); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_2(graph){ return castTo(graph, 36) , INTERMEDIATE_PROCESSING_CONFIGURATION_2; } ; _.process = function process_57(layeredGraph, monitor){ $process_60(this, castTo(layeredGraph, 36), monitor); } ; _.firstSeparateModelOrder = 0; _.lastSeparateModelOrder = 0; var INTERMEDIATE_PROCESSING_CONFIGURATION_2; var Lorg_eclipse_elk_alg_layered_p1cycles_ModelOrderCycleBreaker_2_classLit = createForClass('org.eclipse.elk.alg.layered.p1cycles', 'ModelOrderCycleBreaker', 1400); function $clinit_BreadthFirstModelOrderLayerer(){ $clinit_BreadthFirstModelOrderLayerer = emptyMethod; BASELINE_PROCESSING_CONFIGURATION_0 = $addBefore($addBefore($addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P1_CYCLE_BREAKING), ($clinit_IntermediateProcessorStrategy() , EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER)), P2_LAYERING, LAYER_CONSTRAINT_PREPROCESSOR), P3_NODE_ORDERING, LAYER_CONSTRAINT_POSTPROCESSOR); } function $process_61(this$static, thelayeredGraph, monitor){ var currentDummyLayer, currentLayer, edge, edge$iterator, edge$iterator0, firstNode, layer, layer$iterator, layer$iterator0, layerId, node, node$iterator, node$iterator0, realNodes, toDelete; monitor.begin('Breadth first model order layering', 1); this$static.layeredGraph = thelayeredGraph; realNodes = new ArrayList; for (node$iterator0 = new ArrayList$1(this$static.layeredGraph.layerlessNodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); node.type_0 == ($clinit_LNode$NodeType() , NORMAL) && (push_1(realNodes.array, node) , true); } $clinit_Collections(); $sort(realNodes, new BreadthFirstModelOrderLayerer$lambda$0$Type); firstNode = true; currentLayer = new Layer(this$static.layeredGraph); currentDummyLayer = null; $add_3(this$static.layeredGraph.layers, currentLayer); for (node$iterator = new ArrayList$1(realNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (firstNode) { $setLayer_0(node, currentLayer); firstNode = false; } else { for (edge$iterator0 = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator0);) { edge = castTo($next_0(edge$iterator0), 18); if (edge.source.owner.type_0 == ($clinit_LNode$NodeType() , NORMAL) && edge.source.owner.layer == currentLayer || edge.source.owner.type_0 == LABEL && castTo($next_0(new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(edge.source.owner).val$inputs1.iterator_0(), new Iterables$10))), 18).source.owner.layer == currentLayer) { currentDummyLayer = new Layer(this$static.layeredGraph); $add_3(this$static.layeredGraph.layers, currentDummyLayer); currentLayer = new Layer(this$static.layeredGraph); $add_3(this$static.layeredGraph.layers, currentLayer); } } for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); edge.source.owner.type_0 == ($clinit_LNode$NodeType() , LABEL) && !edge.source.owner.layer && $setLayer_0(edge.source.owner, currentDummyLayer); } $setLayer_0(node, currentLayer); } } this$static.layeredGraph.layerlessNodes.array.length = 0; toDelete = new ArrayList; for (layer$iterator0 = new ArrayList$1(this$static.layeredGraph.layers); layer$iterator0.i < layer$iterator0.this$01.array.length;) { layer = castTo($next_6(layer$iterator0), 30); layer.nodes.array.length == 0 && (push_1(toDelete.array, layer) , true); } $removeAll_0(this$static.layeredGraph.layers, toDelete); layerId = 0; for (layer$iterator = new ArrayList$1(this$static.layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); layer.id_0 = layerId; ++layerId; } monitor.done_1(); } function BreadthFirstModelOrderLayerer(){ $clinit_BreadthFirstModelOrderLayerer(); } function lambda$0_30(n1_0, n2_1){ $clinit_BreadthFirstModelOrderLayerer(); if ($hasProperty(n1_0, ($clinit_InternalProperties_1() , MODEL_ORDER_1)) && $hasProperty(n2_1, MODEL_ORDER_1)) { return compare_5(castTo($getProperty(n1_0, MODEL_ORDER_1), 17).value_0, castTo($getProperty(n2_1, MODEL_ORDER_1), 17).value_0); } throw toJs(new UnsupportedGraphException('The BF model order layer assigner requires all real nodes to have a model order.')); } defineClass(1413, 1, $intern_113, BreadthFirstModelOrderLayerer); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_3(graph){ return castTo(graph, 36) , BASELINE_PROCESSING_CONFIGURATION_0; } ; _.process = function process_58(thelayeredGraph, monitor){ $process_61(this, castTo(thelayeredGraph, 36), monitor); } ; var BASELINE_PROCESSING_CONFIGURATION_0; var Lorg_eclipse_elk_alg_layered_p2layers_BreadthFirstModelOrderLayerer_2_classLit = createForClass('org.eclipse.elk.alg.layered.p2layers', 'BreadthFirstModelOrderLayerer', 1413); function BreadthFirstModelOrderLayerer$lambda$0$Type(){ } defineClass(1414, 1, $intern_88, BreadthFirstModelOrderLayerer$lambda$0$Type); _.compare_1 = function compare_63(arg0, arg1){ return lambda$0_30(castTo(arg0, 10), castTo(arg1, 10)); } ; _.equals_0 = function equals_144(other){ return this === other; } ; _.reversed = function reversed_55(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_p2layers_BreadthFirstModelOrderLayerer$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p2layers', 'BreadthFirstModelOrderLayerer/lambda$0$Type', 1414); function $clinit_CoffmanGrahamLayerer(){ $clinit_CoffmanGrahamLayerer = emptyMethod; BASELINE_PROCESSING_CONFIGURATION_1 = $addBefore($addBefore($addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P1_CYCLE_BREAKING), ($clinit_IntermediateProcessorStrategy() , EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER)), P2_LAYERING, LAYER_CONSTRAINT_PREPROCESSOR), P3_NODE_ORDERING, LAYER_CONSTRAINT_POSTPROCESSOR); } function $canAdd_0(n, l){ var e, e$iterator, v; for (e$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(n).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 18); v = e.target.owner; if (v.layer == l) { return false; } } return true; } function $compareNodesInTopo(this$static, u, v){ var inListU, inLsitV, itU, itV, iu, iv; inListU = castTo($get(this$static.inTopo, u), 15); inLsitV = castTo($get(this$static.inTopo, v), 15); itU = inListU.listIterator_1(inListU.size_1()); itV = inLsitV.listIterator_1(inLsitV.size_1()); while (itU.hasPrevious() && itV.hasPrevious()) { iu = castTo(itU.previous_0(), 17); iv = castTo(itV.previous_0(), 17); if (iu != iv) { return compare_5(iu.value_0, iv.value_0); } } return !itU.hasNext_0() && !itV.hasNext_0()?0:itU.hasNext_0()?1:-1; } function $createLayer(graph, layers){ var aLayer; aLayer = new Layer(graph); push_1(layers.array, aLayer); return aLayer; } function $dfs_4(this$static, start_0, v){ var out, out$iterator, transitive, transitive$iterator, w; if (this$static.nodeMark[v.id_0]) { return; } for (out$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(v).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(out$iterator);) { out = castTo($next_0(out$iterator), 18); w = out.target.owner; for (transitive$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(w).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(transitive$iterator);) { transitive = castTo($next_0(transitive$iterator), 18); transitive.source.owner == start_0 && (this$static.edgeMark[transitive.id_0] = true); } $dfs_4(this$static, start_0, w); } this$static.nodeMark[v.id_0] = true; } function $lambda$1_3(this$static, n1_0, n2_1){ return -compare_5(this$static.topoOrd[n1_0.id_0], this$static.topoOrd[n2_1.id_0]); } function $process_62(this$static, layeredGraph, progressMonitor){ var currentLayer, e, e$iterator, edgeIndex, i, index_0, j, layers, n, n$iterator, sinks, sources, src_0, tgt, u, v, v$iterator, v$iterator0, w; progressMonitor.begin('Coffman-Graham Layering', 1); if (layeredGraph.layerlessNodes.array.length == 0) { progressMonitor.done_1(); return; } w = castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , LAYERING_COFFMAN_GRAHAM_LAYER_BOUND_0)), 17).value_0; index_0 = 0; edgeIndex = 0; for (n$iterator = new ArrayList$1(layeredGraph.layerlessNodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); n.id_0 = index_0++; for (e$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(n).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 18); e.id_0 = edgeIndex++; } } this$static.nodeMark = initUnidimensionalArray(Z_classLit, $intern_91, 28, index_0, 16, 1); this$static.edgeMark = initUnidimensionalArray(Z_classLit, $intern_91, 28, edgeIndex, 16, 1); this$static.inDeg = initUnidimensionalArray(I_classLit, $intern_49, 28, index_0, 15, 1); this$static.outDeg = initUnidimensionalArray(I_classLit, $intern_49, 28, index_0, 15, 1); this$static.topoOrd = initUnidimensionalArray(I_classLit, $intern_49, 28, index_0, 15, 1); $clear(this$static.inTopo); $transitiveReduction(this$static, layeredGraph); sources = new PriorityQueue(new CoffmanGrahamLayerer$0methodref$compareNodesInTopo$Type(this$static)); for (v$iterator0 = new ArrayList$1(layeredGraph.layerlessNodes); v$iterator0.i < v$iterator0.this$01.array.length;) { v = castTo($next_6(v$iterator0), 10); for (e$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(v).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 18); this$static.edgeMark[e.id_0] || ++this$static.inDeg[v.id_0]; } this$static.inDeg[v.id_0] == 0 && (checkCriticalState_0($offer(sources, v), 'Unable to add element to queue') , true); } i = 0; while (sources.heap.array.length != 0) { v = castTo($poll_0(sources), 10); this$static.topoOrd[v.id_0] = i++; for (e$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(v).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 18); if (this$static.edgeMark[e.id_0]) { continue; } tgt = e.target.owner; --this$static.inDeg[tgt.id_0]; $put(this$static.inTopo, tgt, valueOf_3(this$static.topoOrd[v.id_0])); this$static.inDeg[tgt.id_0] == 0 && (checkCriticalState_0($offer(sources, tgt), 'Unable to add element to queue') , true); } } sinks = new PriorityQueue(new CoffmanGrahamLayerer$lambda$1$Type(this$static)); for (v$iterator = new ArrayList$1(layeredGraph.layerlessNodes); v$iterator.i < v$iterator.this$01.array.length;) { v = castTo($next_6(v$iterator), 10); for (e$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(v).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 18); this$static.edgeMark[e.id_0] || ++this$static.outDeg[v.id_0]; } this$static.outDeg[v.id_0] == 0 && (checkCriticalState_0($offer(sinks, v), 'Unable to add element to queue') , true); } layers = new ArrayList; currentLayer = $createLayer(layeredGraph, layers); while (sinks.heap.array.length != 0) { u = castTo($poll_0(sinks), 10); (currentLayer.nodes.array.length >= w || !$canAdd_0(u, currentLayer)) && (currentLayer = $createLayer(layeredGraph, layers)); $setLayer_0(u, currentLayer); for (e$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(u).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 18); if (this$static.edgeMark[e.id_0]) { continue; } src_0 = e.source.owner; --this$static.outDeg[src_0.id_0]; this$static.outDeg[src_0.id_0] == 0 && (checkCriticalState_0($offer(sinks, src_0), 'Unable to add element to queue') , true); } } for (j = layers.array.length - 1; j >= 0; --j) { $add_3(layeredGraph.layers, (checkCriticalElementIndex(j, layers.array.length) , castTo(layers.array[j], 30))); } layeredGraph.layerlessNodes.array.length = 0; progressMonitor.done_1(); } function $transitiveReduction(this$static, graph){ var out, out$iterator, start_0, start$iterator; for (start$iterator = new ArrayList$1(graph.layerlessNodes); start$iterator.i < start$iterator.this$01.array.length;) { start_0 = castTo($next_6(start$iterator), 10); fill_3(this$static.nodeMark); for (out$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(start_0).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(out$iterator);) { out = castTo($next_0(out$iterator), 18); $dfs_4(this$static, start_0, out.target.owner); } } } function CoffmanGrahamLayerer(){ $clinit_CoffmanGrahamLayerer(); this.inTopo = new ArrayListMultimap; } defineClass(1404, 1, $intern_113, CoffmanGrahamLayerer); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_4(graph){ return castTo(graph, 36) , BASELINE_PROCESSING_CONFIGURATION_1; } ; _.process = function process_59(layeredGraph, progressMonitor){ $process_62(this, castTo(layeredGraph, 36), progressMonitor); } ; var BASELINE_PROCESSING_CONFIGURATION_1; var Lorg_eclipse_elk_alg_layered_p2layers_CoffmanGrahamLayerer_2_classLit = createForClass('org.eclipse.elk.alg.layered.p2layers', 'CoffmanGrahamLayerer', 1404); function CoffmanGrahamLayerer$0methodref$compareNodesInTopo$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1405, 1, $intern_88, CoffmanGrahamLayerer$0methodref$compareNodesInTopo$Type); _.compare_1 = function compare_64(arg0, arg1){ return $compareNodesInTopo(this.$$outer_0, castTo(arg0, 10), castTo(arg1, 10)); } ; _.equals_0 = function equals_145(other){ return this === other; } ; _.reversed = function reversed_56(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_p2layers_CoffmanGrahamLayerer$0methodref$compareNodesInTopo$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p2layers', 'CoffmanGrahamLayerer/0methodref$compareNodesInTopo$Type', 1405); function CoffmanGrahamLayerer$lambda$1$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1406, 1, $intern_88, CoffmanGrahamLayerer$lambda$1$Type); _.compare_1 = function compare_65(arg0, arg1){ return $lambda$1_3(this.$$outer_0, castTo(arg0, 10), castTo(arg1, 10)); } ; _.equals_0 = function equals_146(other){ return this === other; } ; _.reversed = function reversed_57(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_p2layers_CoffmanGrahamLayerer$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p2layers', 'CoffmanGrahamLayerer/lambda$1$Type', 1406); function $clinit_DepthFirstModelOrderLayerer(){ $clinit_DepthFirstModelOrderLayerer = emptyMethod; BASELINE_PROCESSING_CONFIGURATION_2 = $addBefore($addBefore($addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P1_CYCLE_BREAKING), ($clinit_IntermediateProcessorStrategy() , EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER)), P2_LAYERING, LAYER_CONSTRAINT_PREPROCESSOR), P3_NODE_ORDERING, LAYER_CONSTRAINT_POSTPROCESSOR); } function $addNodeToLayer(this$static, layerId, node){ var edge, edge$iterator; if (layerId < this$static.layeredGraph.layers.array.length) { this$static.currentLayer = castTo($get_11(this$static.layeredGraph.layers, layerId), 30); this$static.currentDummyLayer = castTo($get_11(this$static.layeredGraph.layers, layerId - 1), 30); this$static.currentLayerId = layerId; } else { this$static.currentDummyLayer = new Layer(this$static.layeredGraph); this$static.currentDummyLayer.id_0 = layerId - 1; $add_3(this$static.layeredGraph.layers, this$static.currentDummyLayer); this$static.currentLayer = new Layer(this$static.layeredGraph); this$static.currentLayer.id_0 = layerId; $add_3(this$static.layeredGraph.layers, this$static.currentLayer); this$static.currentLayerId = layerId; } $setLayer_0(node, this$static.currentLayer); for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); !edge.source.owner.layer && edge.source.owner.type_0 == ($clinit_LNode$NodeType() , LABEL) && $setLayer_0(edge.source.owner, this$static.currentDummyLayer); } } function $getMaxConnectedLayer(layerId, node){ var edge, edge$iterator, maxLayer; maxLayer = layerId; for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); !!edge.source.owner.layer && (maxLayer = $wnd.Math.max(maxLayer, edge.source.owner.layer.id_0)); } return maxLayer; } function $isConnectedToCurrentLayer(this$static, node){ var connectedLayerViaDummy, connectedViaLabelDummy, directlyConnected, edge, edge$iterator; for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); if (this$static.nodesToPlace.size_0 == 0) { directlyConnected = edge.source.owner.type_0 == ($clinit_LNode$NodeType() , NORMAL) && !!edge.source.owner.layer && edge.source.owner.layer.id_0 == this$static.currentLayerId; if ($hasNext_1(new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(edge.source.owner).val$inputs1.iterator_0(), new Iterables$10)))) { connectedLayerViaDummy = castTo($next_0(new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(edge.source.owner).val$inputs1.iterator_0(), new Iterables$10))), 18).source.owner.layer; connectedViaLabelDummy = edge.source.owner.type_0 == LABEL && !!connectedLayerViaDummy && connectedLayerViaDummy.id_0 == this$static.currentLayerId; } else { connectedViaLabelDummy = false; } } else { directlyConnected = edge.source.owner.type_0 == ($clinit_LNode$NodeType() , NORMAL) && edge.source.owner.id_0 == this$static.currentLayerId; connectedViaLabelDummy = edge.source.owner.type_0 == LABEL && castTo($next_0(new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(edge.source.owner).val$inputs1.iterator_0(), new Iterables$10))), 18).source.owner.id_0 == this$static.currentLayerId; } if (directlyConnected || connectedViaLabelDummy) { return true; } } return false; } function $placeNodesToPlace(this$static){ var dummyLayer, newLayer, nodeToPlace, nodeToPlace$iterator; this$static.maxToPlace = 0; for (nodeToPlace$iterator = $listIterator_2(this$static.nodesToPlace, 0); nodeToPlace$iterator.currentNode != nodeToPlace$iterator.this$01.tail;) { nodeToPlace = castTo($next_9(nodeToPlace$iterator), 10); if (nodeToPlace.id_0 >= this$static.layeredGraph.layers.array.length) { dummyLayer = new Layer(this$static.layeredGraph); dummyLayer.id_0 = nodeToPlace.id_0 - 1; $add_3(this$static.layeredGraph.layers, dummyLayer); newLayer = new Layer(this$static.layeredGraph); newLayer.id_0 = nodeToPlace.id_0; $add_3(this$static.layeredGraph.layers, newLayer); } $setLayer_0(nodeToPlace, castTo($get_11(this$static.layeredGraph.layers, nodeToPlace.id_0), 30)); } } function $process_63(this$static, thelayeredGraph, monitor){ var desiredLayer, edge, edge$iterator, firstNode, layer, layer$iterator, layer$iterator0, layerDiff, layerId, maxLayer, node, node$iterator, node$iterator0, realNodes, toDelete, toPlace, toPlace$iterator; monitor.begin('Depth first model order layering', 1); this$static.layeredGraph = thelayeredGraph; realNodes = new ArrayList; for (node$iterator0 = new ArrayList$1(this$static.layeredGraph.layerlessNodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); node.type_0 == ($clinit_LNode$NodeType() , NORMAL) && (push_1(realNodes.array, node) , true); } $clinit_Collections(); $sort(realNodes, new DepthFirstModelOrderLayerer$lambda$0$Type); firstNode = true; this$static.currentLayer = new Layer(this$static.layeredGraph); this$static.currentDummyLayer = null; $add_3(this$static.layeredGraph.layers, this$static.currentLayer); this$static.currentLayer.id_0 = 0; this$static.currentLayerId = 0; this$static.nodesToPlace = new LinkedList; for (node$iterator = new ArrayList$1(realNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (firstNode) { $setLayer_0(node, this$static.currentLayer); firstNode = false; } else { if ($isConnectedToCurrentLayer(this$static, node)) { maxLayer = this$static.currentLayerId; maxLayer = $getMaxConnectedLayer(maxLayer, node); desiredLayer = maxLayer + 2; layerDiff = maxLayer - this$static.currentLayerId; if (this$static.nodesToPlace.size_0 == 0) { $addNodeToLayer(this$static, desiredLayer, node); } else { if (layerDiff > 0) { for (toPlace$iterator = $listIterator_2(this$static.nodesToPlace, 0); toPlace$iterator.currentNode != toPlace$iterator.this$01.tail;) { toPlace = castTo($next_9(toPlace$iterator), 10); toPlace.id_0 += maxLayer - this$static.maxToPlace; } $placeNodesToPlace(this$static); $reset_0(this$static.nodesToPlace); $addNodeToLayer(this$static, desiredLayer, node); } else { $add_7(this$static.nodesToPlace, node); node.id_0 = desiredLayer; this$static.maxToPlace = $wnd.Math.max(this$static.maxToPlace, desiredLayer); for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); if (!edge.source.owner.layer && edge.source.owner.type_0 == ($clinit_LNode$NodeType() , LABEL)) { $add_7(this$static.nodesToPlace, edge.source.owner); edge.source.owner.id_0 = desiredLayer - 1; } } this$static.currentLayerId = desiredLayer; } } } else { $placeNodesToPlace(this$static); $reset_0(this$static.nodesToPlace); desiredLayer = 0; if ($hasNext_1(new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10)))) { maxLayer = 0; maxLayer = $getMaxConnectedLayer(maxLayer, node); desiredLayer = maxLayer + 2; $addNodeToLayer(this$static, desiredLayer, node); } else { $add_7(this$static.nodesToPlace, node); node.id_0 = 0; this$static.maxToPlace = $wnd.Math.max(this$static.maxToPlace, 0); this$static.currentLayer = castTo($get_11(this$static.layeredGraph.layers, 0), 30); this$static.currentLayerId = 0; } } } } this$static.nodesToPlace.size_0 == 0 || $placeNodesToPlace(this$static); this$static.layeredGraph.layerlessNodes.array.length = 0; toDelete = new ArrayList; for (layer$iterator0 = new ArrayList$1(this$static.layeredGraph.layers); layer$iterator0.i < layer$iterator0.this$01.array.length;) { layer = castTo($next_6(layer$iterator0), 30); layer.nodes.array.length == 0 && (push_1(toDelete.array, layer) , true); } $removeAll_0(this$static.layeredGraph.layers, toDelete); layerId = 0; for (layer$iterator = new ArrayList$1(this$static.layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); layer.id_0 = layerId; ++layerId; } monitor.done_1(); } function DepthFirstModelOrderLayerer(){ $clinit_DepthFirstModelOrderLayerer(); } function lambda$0_31(n1_0, n2_1){ $clinit_DepthFirstModelOrderLayerer(); if ($hasProperty(n1_0, ($clinit_InternalProperties_1() , MODEL_ORDER_1)) && $hasProperty(n2_1, MODEL_ORDER_1)) { return compare_5(castTo($getProperty(n1_0, MODEL_ORDER_1), 17).value_0, castTo($getProperty(n2_1, MODEL_ORDER_1), 17).value_0); } throw toJs(new UnsupportedGraphException('The DF model order layer assigner requires all real nodes to have a model order.')); } defineClass(1415, 1, $intern_113, DepthFirstModelOrderLayerer); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_5(graph){ return castTo(graph, 36) , BASELINE_PROCESSING_CONFIGURATION_2; } ; _.process = function process_60(thelayeredGraph, monitor){ $process_63(this, castTo(thelayeredGraph, 36), monitor); } ; _.currentLayerId = 0; _.maxToPlace = 0; var BASELINE_PROCESSING_CONFIGURATION_2; var Lorg_eclipse_elk_alg_layered_p2layers_DepthFirstModelOrderLayerer_2_classLit = createForClass('org.eclipse.elk.alg.layered.p2layers', 'DepthFirstModelOrderLayerer', 1415); function DepthFirstModelOrderLayerer$lambda$0$Type(){ } defineClass(1416, 1, $intern_88, DepthFirstModelOrderLayerer$lambda$0$Type); _.compare_1 = function compare_66(arg0, arg1){ return lambda$0_31(castTo(arg0, 10), castTo(arg1, 10)); } ; _.equals_0 = function equals_147(other){ return this === other; } ; _.reversed = function reversed_58(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_p2layers_DepthFirstModelOrderLayerer$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p2layers', 'DepthFirstModelOrderLayerer/lambda$0$Type', 1416); function $checkNode(node1, graph){ var edge, edge$iterator, layer1, layer2, newIndex, newLayer, node2, port, port$iterator, shiftNodes; node1.id_0 = 1; layer1 = node1.layer; shiftNodes = new LinkedHashSet; for (port$iterator = $getPorts(node1, ($clinit_PortType() , OUTPUT)).iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); for (edge$iterator = new ArrayList$1(port.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); node2 = edge.target.owner; if (node1 != node2) { layer2 = node2.layer; if (layer2.id_0 <= layer1.id_0) { newIndex = layer1.id_0 + 1; if (newIndex == graph.layers.array.length) { newLayer = new Layer(graph); newLayer.id_0 = newIndex; $add_3(graph.layers, newLayer); $setLayer_0(node2, newLayer); } else { newLayer = castTo($get_11(graph.layers, newIndex), 30); $setLayer_0(node2, newLayer); } shiftNodes.map_0.put(node2, shiftNodes); } } } } return shiftNodes; } function $process_64(layeredGraph, monitor){ var currentSpans, foundSpan, layer, layerIterator, layers, maxx, minx, nextIndex, node, node$iterator, node$iterator0, node$iterator1, nodeToCheck, shiftedNodes, span_0, span$iterator, spanIter; monitor.begin('Interactive node layering', 1); currentSpans = new ArrayList; for (node$iterator0 = new ArrayList$1(layeredGraph.layerlessNodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); minx = node.pos.x_0; maxx = minx + node.size_0.x_0; maxx = $wnd.Math.max(minx + 1, maxx); spanIter = new AbstractList$ListIteratorImpl(currentSpans, 0); foundSpan = null; while (spanIter.i < spanIter.this$01_0.size_1()) { span_0 = (checkCriticalElement(spanIter.i < spanIter.this$01_0.size_1()) , castTo(spanIter.this$01_0.get_0(spanIter.last = spanIter.i++), 578)); if (span_0.start_0 >= maxx) { checkCriticalElement(spanIter.i > 0); spanIter.this$01.get_0(spanIter.last = --spanIter.i); break; } else if (span_0.end > minx) { if (!foundSpan) { $add_3(span_0.nodes, node); span_0.start_0 = $wnd.Math.min(span_0.start_0, minx); span_0.end = $wnd.Math.max(span_0.end, maxx); foundSpan = span_0; } else { $addAll_2(foundSpan.nodes, span_0.nodes); foundSpan.end = $wnd.Math.max(foundSpan.end, span_0.end); $remove_8(spanIter); } } } if (!foundSpan) { foundSpan = new InteractiveLayerer$LayerSpan; foundSpan.start_0 = minx; foundSpan.end = maxx; $add_1(spanIter, foundSpan); $add_3(foundSpan.nodes, node); } } layers = layeredGraph.layers; nextIndex = 0; for (span$iterator = new ArrayList$1(currentSpans); span$iterator.i < span$iterator.this$01.array.length;) { span_0 = castTo($next_6(span$iterator), 578); layer = new Layer(layeredGraph); layer.id_0 = nextIndex++; push_1(layers.array, layer); for (node$iterator1 = new ArrayList$1(span_0.nodes); node$iterator1.i < node$iterator1.this$01.array.length;) { node = castTo($next_6(node$iterator1), 10); $setLayer_0(node, layer); node.id_0 = 0; } } for (node$iterator = new ArrayList$1(layeredGraph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (node.id_0 == 0) { shiftedNodes = $checkNode(node, layeredGraph); while (shiftedNodes.map_0.size_1() != 0) { nodeToCheck = castTo(shiftedNodes.map_0.keySet_0().iterator_0().next_1(), 10); shiftedNodes.map_0.remove_0(nodeToCheck) != null; $addAll(shiftedNodes, $checkNode(nodeToCheck, layeredGraph)); } } } layerIterator = new AbstractList$ListIteratorImpl(layers, 0); while (layerIterator.i < layerIterator.this$01_0.size_1()) { (checkCriticalElement(layerIterator.i < layerIterator.this$01_0.size_1()) , castTo(layerIterator.this$01_0.get_0(layerIterator.last = layerIterator.i++), 30)).nodes.array.length == 0 && $remove_8(layerIterator); } layeredGraph.layerlessNodes.array.length = 0; monitor.done_1(); } function InteractiveLayerer(){ } defineClass(1407, 1, $intern_113, InteractiveLayerer); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_6(graph){ return castTo(graph, 36) , $addBefore($addBefore($addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P1_CYCLE_BREAKING), ($clinit_IntermediateProcessorStrategy() , INTERACTIVE_EXTERNAL_PORT_POSITIONER)), P2_LAYERING, LAYER_CONSTRAINT_PREPROCESSOR), P3_NODE_ORDERING, LAYER_CONSTRAINT_POSTPROCESSOR); } ; _.process = function process_61(layeredGraph, monitor){ $process_64(castTo(layeredGraph, 36), monitor); } ; var Lorg_eclipse_elk_alg_layered_p2layers_InteractiveLayerer_2_classLit = createForClass('org.eclipse.elk.alg.layered.p2layers', 'InteractiveLayerer', 1407); function InteractiveLayerer$LayerSpan(){ this.nodes = new ArrayList; } defineClass(578, 1, {578:1}, InteractiveLayerer$LayerSpan); _.end = 0; _.start_0 = 0; var Lorg_eclipse_elk_alg_layered_p2layers_InteractiveLayerer$LayerSpan_2_classLit = createForClass('org.eclipse.elk.alg.layered.p2layers', 'InteractiveLayerer/LayerSpan', 578); function $clinit_LongestPathLayerer(){ $clinit_LongestPathLayerer = emptyMethod; BASELINE_PROCESSING_CONFIGURATION_3 = $addBefore($addBefore($addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P1_CYCLE_BREAKING), ($clinit_IntermediateProcessorStrategy() , EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER)), P2_LAYERING, LAYER_CONSTRAINT_PREPROCESSOR), P3_NODE_ORDERING, LAYER_CONSTRAINT_POSTPROCESSOR); } function $process_65(this$static, thelayeredGraph, monitor){ var index_0, node, node$iterator, node$iterator0, nodes; monitor.begin('Longest path layering', 1); this$static.layeredGraph = thelayeredGraph; nodes = this$static.layeredGraph.layerlessNodes; this$static.nodeHeights = initUnidimensionalArray(I_classLit, $intern_49, 28, nodes.array.length, 15, 1); index_0 = 0; for (node$iterator0 = new ArrayList$1(nodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); node.id_0 = index_0; this$static.nodeHeights[index_0] = -1; ++index_0; } for (node$iterator = new ArrayList$1(nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); $visit(this$static, node); } nodes.array.length = 0; this$static.layeredGraph = null; this$static.nodeHeights = null; monitor.done_1(); } function $putNode(this$static, node, height){ var i, layers; layers = this$static.layeredGraph.layers; for (i = layers.array.length; i < height; i++) { $add_2(layers, 0, new Layer(this$static.layeredGraph)); } $setLayer_0(node, castTo($get_11(layers, layers.array.length - height), 30)); this$static.nodeHeights[node.id_0] = height; } function $visit(this$static, node){ var edge, edge$iterator, height, maxHeight, port, port$iterator, targetHeight, targetNode; height = this$static.nodeHeights[node.id_0]; if (height >= 0) { return height; } else { maxHeight = 1; for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); for (edge$iterator = new ArrayList$1(port.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); targetNode = edge.target.owner; if (node != targetNode) { targetHeight = $visit(this$static, targetNode); maxHeight = $wnd.Math.max(maxHeight, targetHeight + 1); } } } $putNode(this$static, node, maxHeight); return maxHeight; } } function LongestPathLayerer(){ $clinit_LongestPathLayerer(); } defineClass(1403, 1, $intern_113, LongestPathLayerer); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_7(graph){ return castTo(graph, 36) , BASELINE_PROCESSING_CONFIGURATION_3; } ; _.process = function process_62(thelayeredGraph, monitor){ $process_65(this, castTo(thelayeredGraph, 36), monitor); } ; var BASELINE_PROCESSING_CONFIGURATION_3; var Lorg_eclipse_elk_alg_layered_p2layers_LongestPathLayerer_2_classLit = createForClass('org.eclipse.elk.alg.layered.p2layers', 'LongestPathLayerer', 1403); function $clinit_LongestPathSourceLayerer(){ $clinit_LongestPathSourceLayerer = emptyMethod; BASELINE_PROCESSING_CONFIGURATION_4 = $addBefore($addBefore($addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P1_CYCLE_BREAKING), ($clinit_IntermediateProcessorStrategy() , EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER)), P2_LAYERING, LAYER_CONSTRAINT_PREPROCESSOR), P3_NODE_ORDERING, LAYER_CONSTRAINT_POSTPROCESSOR); } function $process_66(this$static, thelayeredGraph, monitor){ var index_0, node, node$iterator, node$iterator0, nodes; monitor.begin('Longest path to source layering', 1); this$static.layeredGraph = thelayeredGraph; nodes = this$static.layeredGraph.layerlessNodes; this$static.nodeHeights = initUnidimensionalArray(I_classLit, $intern_49, 28, nodes.array.length, 15, 1); index_0 = 0; for (node$iterator0 = new ArrayList$1(nodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); node.id_0 = index_0; this$static.nodeHeights[index_0] = -1; ++index_0; } for (node$iterator = new ArrayList$1(nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); $visit_0(this$static, node); } nodes.array.length = 0; this$static.layeredGraph = null; this$static.nodeHeights = null; monitor.done_1(); } function $putNode_0(this$static, node, height){ var i, layers; layers = this$static.layeredGraph.layers; for (i = layers.array.length; i < height; i++) { $add_2(layers, layers.array.length, new Layer(this$static.layeredGraph)); } $setLayer_0(node, (checkCriticalElementIndex(height - 1, layers.array.length) , castTo(layers.array[height - 1], 30))); this$static.nodeHeights[node.id_0] = height; } function $visit_0(this$static, node){ var edge, edge$iterator, height, maxHeight, port, port$iterator, sourceHeight, sourceNode; height = this$static.nodeHeights[node.id_0]; if (height >= 0) { return height; } else { maxHeight = 1; for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); for (edge$iterator = new ArrayList$1(port.incomingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); sourceNode = edge.source.owner; if (node != sourceNode) { sourceHeight = $visit_0(this$static, sourceNode); maxHeight = $wnd.Math.max(maxHeight, sourceHeight + 1); } } } $putNode_0(this$static, node, maxHeight); return maxHeight; } } function LongestPathSourceLayerer(){ $clinit_LongestPathSourceLayerer(); } defineClass(1412, 1, $intern_113, LongestPathSourceLayerer); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_8(graph){ return castTo(graph, 36) , BASELINE_PROCESSING_CONFIGURATION_4; } ; _.process = function process_63(thelayeredGraph, monitor){ $process_66(this, castTo(thelayeredGraph, 36), monitor); } ; var BASELINE_PROCESSING_CONFIGURATION_4; var Lorg_eclipse_elk_alg_layered_p2layers_LongestPathSourceLayerer_2_classLit = createForClass('org.eclipse.elk.alg.layered.p2layers', 'LongestPathSourceLayerer', 1412); function $clinit_MinWidthLayerer(){ $clinit_MinWidthLayerer = emptyMethod; UPPERBOUND_ON_WIDTH_RANGE = closed_0(valueOf_3(1), valueOf_3(4)); COMPENSATOR_RANGE = closed_0(valueOf_3(1), valueOf_3(2)); } function $computeMinWidthLayering(this$static, upperBoundOnWidth, compensator, nodes, nodeSuccessors){ var alreadyPlacedInCurrentLayer, alreadyPlacedInOtherLayers, currentLayer, currentNode, currentSpanningEdges, goingOutFromThisLayer, inDeg, layers, maxWidth, outDeg, realWidth, ubwConsiderSize, unplacedNodes, widthCurrent, widthUp; layers = new ArrayList; unplacedNodes = newLinkedHashSet(nodes); ubwConsiderSize = upperBoundOnWidth * this$static.avgSize; inDeg = 0; outDeg = 0; alreadyPlacedInCurrentLayer = new HashSet; alreadyPlacedInOtherLayers = new HashSet; currentLayer = new ArrayList; widthCurrent = 0; widthUp = 0; maxWidth = 0; realWidth = 0; currentSpanningEdges = 0; goingOutFromThisLayer = 0; while (unplacedNodes.map_0.size_1() != 0) { currentNode = $selectNode(unplacedNodes, nodeSuccessors, alreadyPlacedInOtherLayers); if (currentNode) { unplacedNodes.map_0.remove_0(currentNode) != null; push_1(currentLayer.array, currentNode); alreadyPlacedInCurrentLayer.map_0.put(currentNode, alreadyPlacedInCurrentLayer); outDeg = this$static.outDegree[currentNode.id_0]; widthCurrent += this$static.normSize[currentNode.id_0] - outDeg * this$static.dummySize; inDeg = this$static.inDegree[currentNode.id_0]; widthUp += inDeg * this$static.dummySize; goingOutFromThisLayer += outDeg * this$static.dummySize; realWidth += this$static.normSize[currentNode.id_0]; } if (!currentNode || unplacedNodes.map_0.size_1() == 0 || widthCurrent >= ubwConsiderSize && this$static.normSize[currentNode.id_0] > outDeg * this$static.dummySize || widthUp >= compensator * ubwConsiderSize) { push_1(layers.array, currentLayer); currentLayer = new ArrayList; $addAll(alreadyPlacedInOtherLayers, alreadyPlacedInCurrentLayer); alreadyPlacedInCurrentLayer.map_0.clear_0(); currentSpanningEdges -= goingOutFromThisLayer; maxWidth = $wnd.Math.max(maxWidth, currentSpanningEdges * this$static.dummySize + realWidth); currentSpanningEdges += widthUp; widthCurrent = widthUp; widthUp = 0; goingOutFromThisLayer = 0; realWidth = 0; } } return new Pair(maxWidth, layers); } function $countEdgesExceptSelfLoops(edges){ var edge, edge$iterator, i; i = 0; for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2(edges.val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); edge.source.owner == edge.target.owner || ++i; } return i; } function $precalcSuccessors(nodes){ var edge, edge$iterator, node, node$iterator, outEdges, outNodes, successors; successors = newArrayListWithCapacity(nodes.array.length); for (node$iterator = new ArrayList$1(nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); outNodes = new HashSet; outEdges = $getOutgoingEdges(node); for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2(outEdges.val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); edge.source.owner == edge.target.owner || $add_6(outNodes, edge.target.owner); } push_1(successors.array, outNodes); } return successors; } function $process_67(this$static, layeredGraph, progressMonitor){ var c, cEnd, cStart, candidateLayering, compensator, currentLayer, i, layerList, layerList$iterator, layering, layers, minNumOfLayers, minWidth, newNumOfLayers, newWidth, node, node$iterator, node$iterator0, node$iterator1, nodeSuccessors, notInserted, numOfNodes, result, size_0, ubw, ubwEnd, ubwStart, upperBoundOnWidth; progressMonitor.begin('MinWidth layering', 1); layers = layeredGraph.layers; notInserted = layeredGraph.layerlessNodes; upperBoundOnWidth = castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , LAYERING_MIN_WIDTH_UPPER_BOUND_ON_WIDTH_0)), 17).value_0; compensator = castTo($getProperty(layeredGraph, LAYERING_MIN_WIDTH_UPPER_LAYER_ESTIMATION_SCALING_FACTOR_0), 17).value_0; this$static.dummySize = $doubleValue(castToDouble($getProperty(layeredGraph, SPACING_EDGE_EDGE))); this$static.minimumNodeSize = $intern_60; for (node$iterator0 = new ArrayList$1(notInserted); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); if (node.type_0 != ($clinit_LNode$NodeType() , NORMAL)) { continue; } size_0 = node.size_0.y_0; this$static.minimumNodeSize = $wnd.Math.min(this$static.minimumNodeSize, size_0); } this$static.minimumNodeSize = $wnd.Math.max(1, this$static.minimumNodeSize); numOfNodes = notInserted.array.length; this$static.inDegree = initUnidimensionalArray(I_classLit, $intern_49, 28, numOfNodes, 15, 1); this$static.outDegree = initUnidimensionalArray(I_classLit, $intern_49, 28, numOfNodes, 15, 1); this$static.normSize = initUnidimensionalArray(D_classLit, $intern_66, 28, numOfNodes, 15, 1); i = 0; this$static.avgSize = 0; for (node$iterator1 = new ArrayList$1(notInserted); node$iterator1.i < node$iterator1.this$01.array.length;) { node = castTo($next_6(node$iterator1), 10); node.id_0 = i++; this$static.inDegree[node.id_0] = $countEdgesExceptSelfLoops($getIncomingEdges(node)); this$static.outDegree[node.id_0] = $countEdgesExceptSelfLoops($getOutgoingEdges(node)); this$static.normSize[node.id_0] = node.size_0.y_0 / this$static.minimumNodeSize; this$static.avgSize += this$static.normSize[node.id_0]; } this$static.dummySize /= this$static.minimumNodeSize; this$static.avgSize /= numOfNodes; nodeSuccessors = $precalcSuccessors(notInserted); $sort(notInserted, reverseOrder(new MinWidthLayerer$MinOutgoingEdgesComparator(this$static))); minWidth = $intern_60; minNumOfLayers = $intern_0; candidateLayering = null; ubwStart = upperBoundOnWidth; ubwEnd = upperBoundOnWidth; cStart = compensator; cEnd = compensator; if (upperBoundOnWidth < 0) { ubwStart = castTo(UPPERBOUND_ON_WIDTH_RANGE.lowerBound.endpoint_0(), 17).value_0; ubwEnd = castTo(UPPERBOUND_ON_WIDTH_RANGE.upperBound.endpoint_0(), 17).value_0; } if (compensator < 0) { cStart = castTo(COMPENSATOR_RANGE.lowerBound.endpoint_0(), 17).value_0; cEnd = castTo(COMPENSATOR_RANGE.upperBound.endpoint_0(), 17).value_0; } for (ubw = ubwStart; ubw <= ubwEnd; ubw++) { for (c = cStart; c <= cEnd; c++) { result = $computeMinWidthLayering(this$static, ubw, c, notInserted, nodeSuccessors); newWidth = $doubleValue(castToDouble(result.first)); layering = castTo(result.second, 15); newNumOfLayers = layering.size_1(); if (newWidth < minWidth || newWidth == minWidth && newNumOfLayers < minNumOfLayers) { minWidth = newWidth; minNumOfLayers = newNumOfLayers; candidateLayering = layering; } } } for (layerList$iterator = candidateLayering.iterator_0(); layerList$iterator.hasNext_0();) { layerList = castTo(layerList$iterator.next_1(), 15); currentLayer = new Layer(layeredGraph); for (node$iterator = layerList.iterator_0(); node$iterator.hasNext_0();) { node = castTo(node$iterator.next_1(), 10); $setLayer_0(node, currentLayer); } push_1(layers.array, currentLayer); } reverse_2(layers); notInserted.array.length = 0; progressMonitor.done_1(); } function $selectNode(nodes, successors, targets){ var node, node$iterator; for (node$iterator = nodes.map_0.keySet_0().iterator_0(); node$iterator.hasNext_0();) { node = castTo(node$iterator.next_1(), 10); if ($containsAll(targets, castTo($get_11(successors, node.id_0), 16))) { return node; } } return null; } function MinWidthLayerer(){ $clinit_MinWidthLayerer(); } defineClass(1410, 1, $intern_113, MinWidthLayerer); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_9(graph){ return castTo(graph, 36) , $addBefore($addBefore($addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P1_CYCLE_BREAKING), ($clinit_IntermediateProcessorStrategy() , EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER)), P2_LAYERING, LAYER_CONSTRAINT_PREPROCESSOR), P3_NODE_ORDERING, LAYER_CONSTRAINT_POSTPROCESSOR); } ; _.process = function process_64(layeredGraph, progressMonitor){ $process_67(this, castTo(layeredGraph, 36), progressMonitor); } ; _.avgSize = 0; _.dummySize = 0; _.minimumNodeSize = 0; var COMPENSATOR_RANGE, UPPERBOUND_ON_WIDTH_RANGE; var Lorg_eclipse_elk_alg_layered_p2layers_MinWidthLayerer_2_classLit = createForClass('org.eclipse.elk.alg.layered.p2layers', 'MinWidthLayerer', 1410); function $compare_21(this$static, o1, o2){ var outs1, outs2; outs1 = this$static.this$01.outDegree[o1.id_0]; outs2 = this$static.this$01.outDegree[o2.id_0]; if (outs1 < outs2) { return -1; } if (outs1 == outs2) { return 0; } return 1; } function MinWidthLayerer$MinOutgoingEdgesComparator(this$0){ this.this$01 = this$0; } defineClass(1411, 1, $intern_88, MinWidthLayerer$MinOutgoingEdgesComparator); _.compare_1 = function compare_67(o1, o2){ return $compare_21(this, castTo(o1, 10), castTo(o2, 10)); } ; _.equals_0 = function equals_148(other){ return this === other; } ; _.reversed = function reversed_59(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_p2layers_MinWidthLayerer$MinOutgoingEdgesComparator_2_classLit = createForClass('org.eclipse.elk.alg.layered.p2layers', 'MinWidthLayerer/MinOutgoingEdgesComparator', 1411); function $clinit_NetworkSimplexLayerer(){ $clinit_NetworkSimplexLayerer = emptyMethod; BASELINE_PROCESSING_CONFIGURATION_5 = $addBefore($addBefore($addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P1_CYCLE_BREAKING), ($clinit_IntermediateProcessorStrategy() , EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER)), P2_LAYERING, LAYER_CONSTRAINT_PREPROCESSOR), P3_NODE_ORDERING, LAYER_CONSTRAINT_POSTPROCESSOR); } function $connectedComponents(this$static, theNodes){ var components, counter, node, node$iterator, node$iterator0; this$static.nodeVisited == null || this$static.nodeVisited.length < theNodes.array.length?(this$static.nodeVisited = initUnidimensionalArray(Z_classLit, $intern_91, 28, theNodes.array.length, 16, 1)):fill_3(this$static.nodeVisited); this$static.componentNodes = new ArrayList; counter = 0; for (node$iterator0 = new ArrayList$1(theNodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); node.id_0 = counter++; } components = new LinkedList; for (node$iterator = new ArrayList$1(theNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (!this$static.nodeVisited[node.id_0]) { $connectedComponentsDFS(this$static, node); components.size_0 == 0 || (checkCriticalElement(components.size_0 != 0) , castTo(components.header.next_0.value_0, 15)).size_1() < this$static.componentNodes.array.length?$addFirst_0(components, this$static.componentNodes):$addLast_0(components, this$static.componentNodes); this$static.componentNodes = new ArrayList; } } return components; } function $connectedComponentsDFS(this$static, node){ var edge, edge$iterator, opposite, port, port$iterator; this$static.nodeVisited[node.id_0] = true; $add_3(this$static.componentNodes, node); for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); for (edge$iterator = new LPort$CombineIter$1(port.connectedEdges); $hasNext_3(edge$iterator.firstIterator) || $hasNext_3(edge$iterator.secondIterator);) { edge = castTo($hasNext_3(edge$iterator.firstIterator)?$next_6(edge$iterator.firstIterator):$next_6(edge$iterator.secondIterator), 18); opposite = $getOpposite(port, edge).owner; this$static.nodeVisited[opposite.id_0] || $connectedComponentsDFS(this$static, opposite); } } } function $getOpposite(port, edge){ if (edge.source == port) { return edge.target; } else if (edge.target == port) { return edge.source; } throw toJs(new IllegalArgumentException_0('Input edge is not connected to the input port.')); } function $initialize_4(theNodes){ var graph, lEdge, lEdge$iterator, lNode, lNode$iterator, lNode$iterator0, nNode, nodeMap; nodeMap = new HashMap; graph = new NGraph; for (lNode$iterator0 = theNodes.iterator_0(); lNode$iterator0.hasNext_0();) { lNode = castTo(lNode$iterator0.next_1(), 10); nNode = $create_2($origin_0(new NNode$NNodeBuilder, lNode), graph); $put_9(nodeMap.hashCodeMap, lNode, nNode); } for (lNode$iterator = theNodes.iterator_0(); lNode$iterator.hasNext_0();) { lNode = castTo(lNode$iterator.next_1(), 10); for (lEdge$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(lNode).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(lEdge$iterator);) { lEdge = castTo($next_0(lEdge$iterator), 18); if ($isSelfLoop(lEdge)) { continue; } $create_1($target($source($delta($weight(new NEdge$NEdgeBuilder, $wnd.Math.max(1, castTo($getProperty(lEdge, ($clinit_LayeredOptions() , PRIORITY_SHORTNESS_0)), 17).value_0)), 1), castTo($get_10(nodeMap, lEdge.source.owner), 125)), castTo($get_10(nodeMap, lEdge.target.owner), 125))); } } return graph; } function $process_68(this$static, theLayeredGraph, monitor){ var connComp, connComp$iterator, connectedComponents, graph, iterLimit, l, l$iterator, lNode, layerIdx, layers, nNode, nNode$iterator, previousLayeringNodeCounts, theNodes, thoroughness; monitor.begin('Network simplex layering', 1); this$static.layeredGraph = theLayeredGraph; thoroughness = castTo($getProperty(theLayeredGraph, ($clinit_LayeredOptions() , THOROUGHNESS_0)), 17).value_0 * 4; theNodes = this$static.layeredGraph.layerlessNodes; if (theNodes.array.length < 1) { monitor.done_1(); return; } connectedComponents = $connectedComponents(this$static, theNodes); previousLayeringNodeCounts = null; for (connComp$iterator = $listIterator_2(connectedComponents, 0); connComp$iterator.currentNode != connComp$iterator.this$01.tail;) { connComp = castTo($next_9(connComp$iterator), 15); iterLimit = thoroughness * round_int($wnd.Math.sqrt(connComp.size_1())); graph = $initialize_4(connComp); $execute_0($withBalancing($withPreviousLayering($withIterationLimit(forGraph(graph), iterLimit), previousLayeringNodeCounts), true), monitor.subTask(1)); layers = this$static.layeredGraph.layers; for (nNode$iterator = new ArrayList$1(graph.nodes); nNode$iterator.i < nNode$iterator.this$01.array.length;) { nNode = castTo($next_6(nNode$iterator), 125); while (layers.array.length <= nNode.layer) { $add_2(layers, layers.array.length, new Layer(this$static.layeredGraph)); } lNode = castTo(nNode.origin_0, 10); $setLayer_0(lNode, castTo($get_11(layers, nNode.layer), 30)); } if (connectedComponents.size_0 > 1) { previousLayeringNodeCounts = initUnidimensionalArray(I_classLit, $intern_49, 28, this$static.layeredGraph.layers.array.length, 15, 1); layerIdx = 0; for (l$iterator = new ArrayList$1(this$static.layeredGraph.layers); l$iterator.i < l$iterator.this$01.array.length;) { l = castTo($next_6(l$iterator), 30); previousLayeringNodeCounts[layerIdx++] = l.nodes.array.length; } } } theNodes.array.length = 0; this$static.componentNodes = null; this$static.layeredGraph = null; this$static.nodeVisited = null; monitor.done_1(); } function NetworkSimplexLayerer(){ $clinit_NetworkSimplexLayerer(); } defineClass(1402, 1, $intern_113, NetworkSimplexLayerer); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_10(graph){ return castTo(graph, 36) , BASELINE_PROCESSING_CONFIGURATION_5; } ; _.process = function process_65(theLayeredGraph, monitor){ $process_68(this, castTo(theLayeredGraph, 36), monitor); } ; var BASELINE_PROCESSING_CONFIGURATION_5; var Lorg_eclipse_elk_alg_layered_p2layers_NetworkSimplexLayerer_2_classLit = createForClass('org.eclipse.elk.alg.layered.p2layers', 'NetworkSimplexLayerer', 1402); function $computeDegrees(this$static){ var node, node$iterator; this$static.inDegree = initUnidimensionalArray(I_classLit, $intern_49, 28, this$static.sortedLayerlessNodes.array.length, 15, 1); this$static.outDegree = initUnidimensionalArray(I_classLit, $intern_49, 28, this$static.sortedLayerlessNodes.array.length, 15, 1); for (node$iterator = new ArrayList$1(this$static.sortedLayerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); this$static.inDegree[node.id_0] = size_24(new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10))); this$static.outDegree[node.id_0] = size_24(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10))); } } function $computeNormalizedSize(this$static){ var node, node$iterator; this$static.normSize = initUnidimensionalArray(D_classLit, $intern_66, 28, this$static.sortedLayerlessNodes.array.length, 15, 1); for (node$iterator = new ArrayList$1(this$static.sortedLayerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); this$static.normSize[node.id_0] = node.size_0.y_0 / this$static.minimumNodeSize; } } function $computeSortedNodes(this$static){ var node, node$iterator, unsortedNodes; unsortedNodes = this$static.currentGraph.layerlessNodes; this$static.sortedLayerlessNodes = (checkNotNull(unsortedNodes) , new ArrayList_1(unsortedNodes)); for (node$iterator = new ArrayList$1(unsortedNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); node.id_0 = $getRank(node).value_0; } $clinit_Collections(); $sort(this$static.sortedLayerlessNodes, new StretchWidthLayerer$1); } function $computeSuccessors(this$static){ var currSucc, edge, edge$iterator, i, node, node$iterator; i = 0; this$static.successors = new ArrayList; currSucc = new HashSet; for (node$iterator = new ArrayList$1(this$static.sortedLayerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); node.id_0 = i; for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); $add_6(currSucc, edge.target.owner); } currSucc.map_0.remove_0(node) != null; $add_3(this$static.successors, new HashSet_1(currSucc)); currSucc.map_0.clear_0(); ++i; } } function $conditionGoUp(this$static){ var a, b; a = this$static.widthCurrent - this$static.outDegree[this$static.selectedNode.id_0] * this$static.dummySize + this$static.normSize[this$static.selectedNode.id_0] > this$static.maxWidth; b = this$static.widthUp + this$static.inDegree[this$static.selectedNode.id_0] * this$static.dummySize > this$static.maxWidth * this$static.upperLayerInfluence * this$static.dummySize; return a || b; } function $getAverageOutDegree(this$static){ var allOut, node, node$iterator; allOut = 0; for (node$iterator = new ArrayList$1(this$static.currentGraph.layerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); allOut += size_24(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10))); } return allOut / this$static.currentGraph.layerlessNodes.array.length; } function $getRank(node){ var max_0, pre, preEdge, preEdge$iterator, temp; max_0 = size_24(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10))); for (preEdge$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(preEdge$iterator);) { preEdge = castTo($next_0(preEdge$iterator), 18); pre = preEdge.source.owner; temp = size_24(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(pre).val$inputs1.iterator_0(), new Iterables$10))); max_0 = $wnd.Math.max(max_0, temp); } return valueOf_3(max_0); } function $minMaxNodeSize(this$static){ var node, node$iterator, size_0; for (node$iterator = new ArrayList$1(this$static.sortedLayerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (node.type_0 != ($clinit_LNode$NodeType() , NORMAL)) { continue; } size_0 = node.size_0.y_0; this$static.minimumNodeSize = $wnd.Math.min(this$static.minimumNodeSize, size_0); this$static.maximumNodeSize = $wnd.Math.max(this$static.maximumNodeSize, size_0); } } function $process_69(this$static, layeredGraph, progressMonitor){ var currentLayer; progressMonitor.begin('StretchWidth layering', 1); if (layeredGraph.layerlessNodes.array.length == 0) { progressMonitor.done_1(); return; } this$static.currentGraph = layeredGraph; this$static.widthCurrent = 0; this$static.widthUp = 0; this$static.minimumNodeSize = $intern_60; this$static.maximumNodeSize = $intern_61; this$static.dummySize = $doubleValue(castToDouble($getProperty(layeredGraph, ($clinit_LayeredOptions() , SPACING_EDGE_EDGE)))); $computeSortedNodes(this$static); $computeSuccessors(this$static); $computeDegrees(this$static); $minMaxNodeSize(this$static); $computeNormalizedSize(this$static); this$static.minimumNodeSize = $wnd.Math.max(1, this$static.minimumNodeSize); this$static.maximumNodeSize = $wnd.Math.max(1, this$static.maximumNodeSize); this$static.dummySize = this$static.dummySize / this$static.minimumNodeSize; this$static.maxWidth = this$static.maximumNodeSize / this$static.minimumNodeSize; this$static.upperLayerInfluence = $getAverageOutDegree(this$static); currentLayer = new Layer(this$static.currentGraph); $add_3(this$static.currentGraph.layers, currentLayer); this$static.tempLayerlessNodes = newArrayList(this$static.sortedLayerlessNodes); this$static.remainingOutGoing = copyOf(this$static.outDegree, this$static.outDegree.length); while (this$static.tempLayerlessNodes.array.length != 0) { this$static.selectedNode = $selectNode_0(this$static); if (!this$static.selectedNode || $conditionGoUp(this$static) && this$static.alreadyPlacedNodes.map_0.size_1() != 0) { $updateOutGoing(this$static, currentLayer); currentLayer = new Layer(this$static.currentGraph); $add_3(this$static.currentGraph.layers, currentLayer); $addAll(this$static.alreadyPlacedInOtherLayers, this$static.alreadyPlacedNodes); this$static.alreadyPlacedNodes.map_0.clear_0(); this$static.widthCurrent = this$static.widthUp; this$static.widthUp = 0; } else { if ($conditionGoUp(this$static)) { this$static.currentGraph.layers.array.length = 0; currentLayer = new Layer(this$static.currentGraph); $add_3(this$static.currentGraph.layers, currentLayer); this$static.widthCurrent = 0; this$static.widthUp = 0; this$static.alreadyPlacedNodes.map_0.clear_0(); this$static.alreadyPlacedInOtherLayers.map_0.clear_0(); ++this$static.maxWidth; this$static.tempLayerlessNodes = newArrayList(this$static.sortedLayerlessNodes); this$static.remainingOutGoing = copyOf(this$static.outDegree, this$static.outDegree.length); } else { $setLayer_0(this$static.selectedNode, currentLayer); $remove_12(this$static.tempLayerlessNodes, this$static.selectedNode); $add_6(this$static.alreadyPlacedNodes, this$static.selectedNode); this$static.widthCurrent = this$static.widthCurrent - this$static.outDegree[this$static.selectedNode.id_0] * this$static.dummySize + this$static.normSize[this$static.selectedNode.id_0]; this$static.widthUp += this$static.inDegree[this$static.selectedNode.id_0] * this$static.dummySize; } } } layeredGraph.layerlessNodes.array.length = 0; reverse_2(layeredGraph.layers); progressMonitor.done_1(); } function $selectNode_0(this$static){ var node, node$iterator; for (node$iterator = new ArrayList$1(this$static.tempLayerlessNodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (this$static.remainingOutGoing[node.id_0] <= 0) { return node; } } return null; } function $updateOutGoing(this$static, currentLayer){ var edge, edge$iterator, node, node$iterator, pos; for (node$iterator = new ArrayList$1(currentLayer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); pos = edge.source.owner.id_0; this$static.remainingOutGoing[pos] = this$static.remainingOutGoing[pos] - 1; } } } function StretchWidthLayerer(){ this.alreadyPlacedNodes = new HashSet; this.alreadyPlacedInOtherLayers = new HashSet; } defineClass(1408, 1, $intern_113, StretchWidthLayerer); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_11(graph){ return castTo(graph, 36) , $addBefore($addBefore($addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P1_CYCLE_BREAKING), ($clinit_IntermediateProcessorStrategy() , EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER)), P2_LAYERING, LAYER_CONSTRAINT_PREPROCESSOR), P3_NODE_ORDERING, LAYER_CONSTRAINT_POSTPROCESSOR); } ; _.process = function process_66(layeredGraph, progressMonitor){ $process_69(this, castTo(layeredGraph, 36), progressMonitor); } ; _.dummySize = 0; _.maxWidth = 0; _.maximumNodeSize = 0; _.minimumNodeSize = 0; _.upperLayerInfluence = 0; _.widthCurrent = 0; _.widthUp = 0; var Lorg_eclipse_elk_alg_layered_p2layers_StretchWidthLayerer_2_classLit = createForClass('org.eclipse.elk.alg.layered.p2layers', 'StretchWidthLayerer', 1408); function $compare_22(o1, o2){ if (o1.id_0 < o2.id_0) { return 1; } else if (o1.id_0 > o2.id_0) { return -1; } return 0; } function StretchWidthLayerer$1(){ } defineClass(1409, 1, $intern_88, StretchWidthLayerer$1); _.compare_1 = function compare_68(o1, o2){ return $compare_22(castTo(o1, 10), castTo(o2, 10)); } ; _.equals_0 = function equals_149(other){ return this === other; } ; _.reversed = function reversed_60(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_p2layers_StretchWidthLayerer$1_2_classLit = createForClass('org.eclipse.elk.alg.layered.p2layers', 'StretchWidthLayerer/1', 1409); function create_15(cmt, r, currentOrder){ return cmt == ($clinit_LayerSweepCrossingMinimizer$CrossMinType() , TWO_SIDED_GREEDY_SWITCH_0)?new GreedyPortDistributor:$nextInternal(r, 1) != 0?new NodeRelativePortDistributor(currentOrder.length):new LayerTotalPortDistributor(currentOrder.length); } function $calculateInLayerPortsBarycenterValues(this$static, node){ var barycenter, connectedPort, connectedPort$iterator, inLayerConnections, inLayerPort, inLayerPort$iterator, layerSize, nodeIndexInLayer, portSide, sum; nodeIndexInLayer = this$static.nodePositions[node.layer.id_0][node.id_0] + 1; layerSize = node.layer.nodes.array.length + 1; for (inLayerPort$iterator = new ArrayList$1(this$static.inLayerPorts); inLayerPort$iterator.i < inLayerPort$iterator.this$01.array.length;) { inLayerPort = castTo($next_6(inLayerPort$iterator), 12); sum = 0; inLayerConnections = 0; for (connectedPort$iterator = $iterator(concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [new LPort$1(inLayerPort), new LPort$2(inLayerPort)]))); $hasNext_1(connectedPort$iterator);) { connectedPort = castTo($next_0(connectedPort$iterator), 12); if (connectedPort.owner.layer == node.layer) { sum += $positionOf(this$static, connectedPort.owner) + 1; ++inLayerConnections; } } barycenter = sum / inLayerConnections; portSide = inLayerPort.side; portSide == ($clinit_PortSide() , EAST_2)?barycenter < nodeIndexInLayer?(this$static.portBarycenter[inLayerPort.id_0] = this$static.minBarycenter - barycenter):(this$static.portBarycenter[inLayerPort.id_0] = this$static.maxBarycenter + (layerSize - barycenter)):portSide == WEST_2 && (barycenter < nodeIndexInLayer?(this$static.portBarycenter[inLayerPort.id_0] = this$static.maxBarycenter + barycenter):(this$static.portBarycenter[inLayerPort.id_0] = this$static.minBarycenter - (layerSize - barycenter))); } } function $calculatePortRanks(this$static, layer, portType){ var consumedRank, nodeIx; consumedRank = 0; for (nodeIx = 0; nodeIx < layer.length; nodeIx++) { consumedRank += this$static.calculatePortRanks(layer[nodeIx], consumedRank, portType); } } function $dealWithNorthSouthPorts(this$static, absurdlyLargeFloat, port, portDummy){ var input_0, output, portDummyPort, portDummyPort$iterator, sum; input_0 = false; output = false; for (portDummyPort$iterator = new ArrayList$1(portDummy.ports); portDummyPort$iterator.i < portDummyPort$iterator.this$01.array.length;) { portDummyPort = castTo($next_6(portDummyPort$iterator), 12); maskUndefined($getProperty(portDummyPort, ($clinit_InternalProperties_1() , ORIGIN_0))) === maskUndefined(port) && (portDummyPort.outgoingEdges.array.length == 0?portDummyPort.incomingEdges.array.length == 0 || (input_0 = true):(output = true)); } sum = 0; input_0 && input_0 ^ output?(sum = port.side == ($clinit_PortSide() , NORTH_3)?-this$static.nodePositions[portDummy.layer.id_0][portDummy.id_0]:absurdlyLargeFloat - this$static.nodePositions[portDummy.layer.id_0][portDummy.id_0]):output && input_0 ^ output?(sum = this$static.nodePositions[portDummy.layer.id_0][portDummy.id_0] + 1):input_0 && output && (sum = port.side == ($clinit_PortSide() , NORTH_3)?0:absurdlyLargeFloat / 2); return sum; } function $distributePorts(this$static, node, ports){ this$static.inLayerPorts.array.length = 0; $iteratePortsAndCollectInLayerPorts(this$static, node, ports); this$static.inLayerPorts.array.length == 0 || $calculateInLayerPortsBarycenterValues(this$static, node); } function $distributePorts_0(this$static, node, side){ if (!$isOrderFixed(castTo($getProperty(node, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101))) { $distributePorts(this$static, node, $getPorts_1(node, side)); $distributePorts(this$static, node, $getPorts_1(node, ($clinit_PortSide() , SOUTH_2))); $distributePorts(this$static, node, $getPorts_1(node, NORTH_3)); $clinit_Collections(); $sort(node.ports, new AbstractBarycenterPortDistributor$lambda$0$Type(this$static)); } } function $distributePortsWhileSweeping(this$static, nodeOrder, currentIndex, isForwardSweep){ var fixedLayer, freeLayer, node, node$array, node$array0, node$index, node$index0, node$max, node$max0, side; $updateNodePositions(this$static, nodeOrder, currentIndex); freeLayer = nodeOrder[currentIndex]; side = isForwardSweep?($clinit_PortSide() , WEST_2):($clinit_PortSide() , EAST_2); if ($isNotFirstLayer(nodeOrder.length, currentIndex, isForwardSweep)) { fixedLayer = nodeOrder[isForwardSweep?currentIndex - 1:currentIndex + 1]; $calculatePortRanks(this$static, fixedLayer, isForwardSweep?($clinit_PortType() , OUTPUT):($clinit_PortType() , INPUT)); for (node$array0 = freeLayer , node$index0 = 0 , node$max0 = node$array0.length; node$index0 < node$max0; ++node$index0) { node = node$array0[node$index0]; $distributePorts_0(this$static, node, side); } $calculatePortRanks(this$static, freeLayer, isForwardSweep?($clinit_PortType() , INPUT):($clinit_PortType() , OUTPUT)); for (node$array = fixedLayer , node$index = 0 , node$max = node$array.length; node$index < node$max; ++node$index) { node = node$array[node$index]; !!node.nestedGraph || $distributePorts_0(this$static, node, $opposed(side)); } } else { for (node$array = freeLayer , node$index = 0 , node$max = node$array.length; node$index < node$max; ++node$index) { node = node$array[node$index]; $distributePorts_0(this$static, node, side); } } return false; } function $isNotFirstLayer(length_0, currentIndex, isForwardSweep){ return isForwardSweep?currentIndex != 0:currentIndex != length_0 - 1; } function $iteratePortsAndCollectInLayerPorts(this$static, node, ports){ var absurdlyLargeFloat, connectedPort, incomingEdge, incomingEdge$iterator, northSouthPort, outgoingEdge, outgoingEdge$iterator, port, port$iterator, portDummy, sum; this$static.minBarycenter = 0; this$static.maxBarycenter = 0; absurdlyLargeFloat = 2 * node.layer.nodes.array.length + 1; PortIteration: for (port$iterator = ports.iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); northSouthPort = port.side == ($clinit_PortSide() , NORTH_3) || port.side == SOUTH_2; sum = 0; if (northSouthPort) { portDummy = castTo($getProperty(port, ($clinit_InternalProperties_1() , PORT_DUMMY)), 10); if (!portDummy) { continue; } sum += $dealWithNorthSouthPorts(this$static, absurdlyLargeFloat, port, portDummy); } else { for (outgoingEdge$iterator = new ArrayList$1(port.outgoingEdges); outgoingEdge$iterator.i < outgoingEdge$iterator.this$01.array.length;) { outgoingEdge = castTo($next_6(outgoingEdge$iterator), 18); connectedPort = outgoingEdge.target; if (connectedPort.owner.layer == node.layer) { $add_3(this$static.inLayerPorts, port); continue PortIteration; } else { sum += this$static.portRanks[connectedPort.id_0]; } } for (incomingEdge$iterator = new ArrayList$1(port.incomingEdges); incomingEdge$iterator.i < incomingEdge$iterator.this$01.array.length;) { incomingEdge = castTo($next_6(incomingEdge$iterator), 18); connectedPort = incomingEdge.source; if (connectedPort.owner.layer == node.layer) { $add_3(this$static.inLayerPorts, port); continue PortIteration; } else { sum -= this$static.portRanks[connectedPort.id_0]; } } } if (port.incomingEdges.array.length + port.outgoingEdges.array.length > 0) { this$static.portBarycenter[port.id_0] = sum / (port.incomingEdges.array.length + port.outgoingEdges.array.length); this$static.minBarycenter = $wnd.Math.min(this$static.minBarycenter, this$static.portBarycenter[port.id_0]); this$static.maxBarycenter = $wnd.Math.max(this$static.maxBarycenter, this$static.portBarycenter[port.id_0]); } else northSouthPort && (this$static.portBarycenter[port.id_0] = sum); } } function $lambda$0_6(this$static, port1_0, port2_1){ var port1Bary, port2Bary, side1, side2; side1 = port1_0.side; side2 = port2_1.side; if (side1 != side2) { return side1.ordinal - side2.ordinal; } else { port1Bary = this$static.portBarycenter[port1_0.id_0]; port2Bary = this$static.portBarycenter[port2_1.id_0]; return port1Bary == 0 && port2Bary == 0?0:port1Bary == 0?-1:port2Bary == 0?1:compare_4(port1Bary, port2Bary); } } function $positionOf(this$static, node){ return this$static.nodePositions[node.layer.id_0][node.id_0]; } function $updateNodePositions(this$static, nodeOrder, currentIndex){ var i, layer, node; layer = nodeOrder[currentIndex]; for (i = 0; i < layer.length; i++) { node = layer[i]; this$static.nodePositions[node.layer.id_0][node.id_0] = i; } } function AbstractBarycenterPortDistributor(numLayers){ this.inLayerPorts = new ArrayList; this.nodePositions = initUnidimensionalArray(I_classLit, $intern_16, 53, numLayers, 0, 2); } defineClass(413, 1, $intern_114); _.initAtEdgeLevel = function initAtEdgeLevel_0(l, n, p, e, edge, nodeOrder){ } ; _.distributePortsWhileSweeping = function distributePortsWhileSweeping(nodeOrder, currentIndex, isForwardSweep){ return $distributePortsWhileSweeping(this, nodeOrder, currentIndex, isForwardSweep); } ; _.initAfterTraversal = function initAfterTraversal_0(){ this.portRanks = initUnidimensionalArray(F_classLit, $intern_115, 28, this.nPorts, 15, 1); this.portBarycenter = initUnidimensionalArray(F_classLit, $intern_115, 28, this.nPorts, 15, 1); } ; _.initAtLayerLevel = function initAtLayerLevel_0(l, nodeOrder){ this.nodePositions[l] = initUnidimensionalArray(I_classLit, $intern_49, 28, nodeOrder[l].length, 15, 1); } ; _.initAtNodeLevel = function initAtNodeLevel_0(l, n, nodeOrder){ var node; node = nodeOrder[l][n]; node.id_0 = n; this.nodePositions[l][n] = n; } ; _.initAtPortLevel = function initAtPortLevel_0(l, n, p, nodeOrder){ castTo($get_11(nodeOrder[l][n].ports, p), 12).id_0 = this.nPorts++; } ; _.maxBarycenter = 0; _.minBarycenter = 0; _.nPorts = 0; var Lorg_eclipse_elk_alg_layered_p3order_AbstractBarycenterPortDistributor_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'AbstractBarycenterPortDistributor', 413); function AbstractBarycenterPortDistributor$lambda$0$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1698, 1, $intern_88, AbstractBarycenterPortDistributor$lambda$0$Type); _.compare_1 = function compare_69(arg0, arg1){ return $lambda$0_6(this.$$outer_0, castTo(arg0, 12), castTo(arg1, 12)); } ; _.equals_0 = function equals_150(other){ return this === other; } ; _.reversed = function reversed_61(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_p3order_AbstractBarycenterPortDistributor$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'AbstractBarycenterPortDistributor/lambda$0$Type', 1698); function $calculateBarycenter(this$static, node, forward_0){ var associate, associate$iterator, barycenterAssociates, fixedNode, fixedPort, fixedPort$iterator, freePort, freePort$iterator, portIterable; if (this$static.barycenterState[node.layer.id_0][node.id_0].visited) { return; } else { this$static.barycenterState[node.layer.id_0][node.id_0].visited = true; } this$static.barycenterState[node.layer.id_0][node.id_0].degree = 0; this$static.barycenterState[node.layer.id_0][node.id_0].summedWeight = 0; this$static.barycenterState[node.layer.id_0][node.id_0].barycenter = null; for (freePort$iterator = new ArrayList$1(node.ports); freePort$iterator.i < freePort$iterator.this$01.array.length;) { freePort = castTo($next_6(freePort$iterator), 12); portIterable = forward_0?new LPort$1(freePort):new LPort$2(freePort); for (fixedPort$iterator = portIterable.iterator_0(); fixedPort$iterator.hasNext_0();) { fixedPort = castTo(fixedPort$iterator.next_1(), 12); fixedNode = fixedPort.owner; if (fixedNode.layer == node.layer) { if (fixedNode != node) { $calculateBarycenter(this$static, fixedNode, forward_0); this$static.barycenterState[node.layer.id_0][node.id_0].degree += this$static.barycenterState[fixedNode.layer.id_0][fixedNode.id_0].degree; this$static.barycenterState[node.layer.id_0][node.id_0].summedWeight += this$static.barycenterState[fixedNode.layer.id_0][fixedNode.id_0].summedWeight; } } else { this$static.barycenterState[node.layer.id_0][node.id_0].summedWeight += this$static.portRanks[fixedPort.id_0]; ++this$static.barycenterState[node.layer.id_0][node.id_0].degree; } } } barycenterAssociates = castTo($getProperty(node, ($clinit_InternalProperties_1() , BARYCENTER_ASSOCIATES)), 15); if (barycenterAssociates) { for (associate$iterator = barycenterAssociates.iterator_0(); associate$iterator.hasNext_0();) { associate = castTo(associate$iterator.next_1(), 10); if (node.layer == associate.layer) { $calculateBarycenter(this$static, associate, forward_0); this$static.barycenterState[node.layer.id_0][node.id_0].degree += this$static.barycenterState[associate.layer.id_0][associate.id_0].degree; this$static.barycenterState[node.layer.id_0][node.id_0].summedWeight += this$static.barycenterState[associate.layer.id_0][associate.id_0].summedWeight; } } } if (this$static.barycenterState[node.layer.id_0][node.id_0].degree > 0) { this$static.barycenterState[node.layer.id_0][node.id_0].summedWeight += $nextInternal(this$static.random_0, 24) * $intern_81 * 0.07000000029802322 - 0.03500000014901161; this$static.barycenterState[node.layer.id_0][node.id_0].barycenter = this$static.barycenterState[node.layer.id_0][node.id_0].summedWeight / this$static.barycenterState[node.layer.id_0][node.id_0].degree; } } function $calculateBarycenters(this$static, nodes, forward_0){ var node, node$iterator, node$iterator0; for (node$iterator0 = new ArrayList$1(nodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); this$static.barycenterState[node.layer.id_0][node.id_0].visited = false; } for (node$iterator = new ArrayList$1(nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); $calculateBarycenter(this$static, node, forward_0); } } function $fillInUnknownBarycenters(this$static, nodes, preOrdered){ var lastValue, maxBary, nextNodeIterator, nextValue, node, node$iterator, node$iterator0, nodesIterator, value_0, x_0; if (preOrdered) { lastValue = -1; nodesIterator = new AbstractList$ListIteratorImpl(nodes, 0); while (nodesIterator.i < nodesIterator.this$01_0.size_1()) { node = (checkCriticalElement(nodesIterator.i < nodesIterator.this$01_0.size_1()) , castTo(nodesIterator.this$01_0.get_0(nodesIterator.last = nodesIterator.i++), 10)); value_0 = this$static.barycenterState[node.layer.id_0][node.id_0].barycenter; if (value_0 == null) { nextValue = lastValue + 1; nextNodeIterator = new AbstractList$ListIteratorImpl(nodes, nodesIterator.i); while (nextNodeIterator.i < nextNodeIterator.this$01_0.size_1()) { x_0 = $stateOf(this$static, (checkCriticalElement(nextNodeIterator.i < nextNodeIterator.this$01_0.size_1()) , castTo(nextNodeIterator.this$01_0.get_0(nextNodeIterator.last = nextNodeIterator.i++), 10))).barycenter; if (x_0 != null) { nextValue = (checkCriticalNotNull(x_0) , x_0); break; } } value_0 = (lastValue + nextValue) / 2; this$static.barycenterState[node.layer.id_0][node.id_0].barycenter = value_0; this$static.barycenterState[node.layer.id_0][node.id_0].summedWeight = (checkCriticalNotNull(value_0) , value_0); this$static.barycenterState[node.layer.id_0][node.id_0].degree = 1; } lastValue = (checkCriticalNotNull(value_0) , value_0); } } else { maxBary = 0; for (node$iterator0 = new ArrayList$1(nodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); this$static.barycenterState[node.layer.id_0][node.id_0].barycenter != null && (maxBary = $wnd.Math.max(maxBary, $doubleValue(this$static.barycenterState[node.layer.id_0][node.id_0].barycenter))); } maxBary += 2; for (node$iterator = new ArrayList$1(nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (this$static.barycenterState[node.layer.id_0][node.id_0].barycenter == null) { value_0 = $nextInternal(this$static.random_0, 24) * $intern_81 * maxBary - 1; this$static.barycenterState[node.layer.id_0][node.id_0].barycenter = value_0; this$static.barycenterState[node.layer.id_0][node.id_0].summedWeight = value_0; this$static.barycenterState[node.layer.id_0][node.id_0].degree = 1; } } } } function $lambda$0_7(this$static, n1_0, n2_1){ var s1, s2; s1 = this$static.barycenterState[n1_0.layer.id_0][n1_0.id_0]; s2 = this$static.barycenterState[n2_1.layer.id_0][n2_1.id_0]; if (s1.barycenter != null && s2.barycenter != null) { return $compareTo_4(s1.barycenter, s2.barycenter); } else if (s1.barycenter != null) { return -1; } else if (s2.barycenter != null) { return 1; } return 0; } function $randomizeBarycenters(this$static, nodes){ var node, node$iterator; for (node$iterator = new ArrayList$1(nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); this$static.barycenterState[node.layer.id_0][node.id_0].barycenter = $nextDouble(this$static.random_0); this$static.barycenterState[node.layer.id_0][node.id_0].summedWeight = $doubleValue(this$static.barycenterState[node.layer.id_0][node.id_0].barycenter); this$static.barycenterState[node.layer.id_0][node.id_0].degree = 1; } } function $startIndex_0(dir_0, length_0){ return dir_0?0:$wnd.Math.max(0, length_0 - 1); } function $stateOf(this$static, node){ return this$static.barycenterState[node.layer.id_0][node.id_0]; } function BarycenterHeuristic(constraintResolver, random, portDistributor){ this.barycenterStateComparator = new BarycenterHeuristic$lambda$0$Type(this); this.constraintResolver = constraintResolver; this.random_0 = random; this.portDistributor = portDistributor; } defineClass(832, 1, $intern_111, BarycenterHeuristic); _.initAtEdgeLevel = function initAtEdgeLevel_1(l, n, p, e, edge, nodeOrder){ } ; _.initAtNodeLevel = function initAtNodeLevel_1(l, n, nodeOrder){ } ; _.initAtPortLevel = function initAtPortLevel_1(l, n, p, nodeOrder){ } ; _.alwaysImproves = function alwaysImproves_0(){ return false; } ; _.initAfterTraversal = function initAfterTraversal_1(){ this.barycenterState = this.constraintResolver.barycenterStates; this.portRanks = this.portDistributor.portRanks; } ; _.initAtLayerLevel = function initAtLayerLevel_1(l, nodeOrder){ nodeOrder[l][0].layer.id_0 = l; } ; _.isDeterministic = function isDeterministic_0(){ return false; } ; _.minimizeCrossings_0 = function minimizeCrossings_0(layer, preOrdered, randomize, forward_0){ if (randomize) { $randomizeBarycenters(this, layer); } else { $calculateBarycenters(this, layer, forward_0); $fillInUnknownBarycenters(this, layer, preOrdered); } if (layer.array.length > 1) { $booleanValue(castToBoolean($getProperty($getGraph((checkCriticalElementIndex(0, layer.array.length) , castTo(layer.array[0], 10))), ($clinit_LayeredOptions() , CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER_0))))?insertionSort_0(layer, this.barycenterStateComparator, castTo(this, 669)):($clinit_Collections() , $sort(layer, this.barycenterStateComparator)); $processConstraints(this.constraintResolver, layer); } } ; _.minimizeCrossings = function minimizeCrossings_1(order, freeLayerIndex, forwardSweep, isFirstSweep){ var firstNodeInLayer, fixedLayer, index_0, nodeGroup, nodeGroup$iterator, nodes, preOrdered; if (freeLayerIndex != $startIndex_0(forwardSweep, order.length)) { fixedLayer = order[freeLayerIndex - (forwardSweep?1:-1)]; $calculatePortRanks(this.portDistributor, fixedLayer, forwardSweep?($clinit_PortType() , OUTPUT):($clinit_PortType() , INPUT)); } firstNodeInLayer = order[freeLayerIndex][0]; preOrdered = !isFirstSweep || firstNodeInLayer.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT); nodes = newArrayList_1(order[freeLayerIndex]); this.minimizeCrossings_0(nodes, preOrdered, false, forwardSweep); index_0 = 0; for (nodeGroup$iterator = new ArrayList$1(nodes); nodeGroup$iterator.i < nodeGroup$iterator.this$01.array.length;) { nodeGroup = castTo($next_6(nodeGroup$iterator), 10); order[freeLayerIndex][index_0++] = nodeGroup; } return false; } ; _.setFirstLayerOrder = function setFirstLayerOrder_0(order, isForwardSweep){ var index_0, nodeGroup, nodeGroup$iterator, nodes, startIndex; startIndex = $startIndex_0(isForwardSweep, order.length); nodes = newArrayList_1(order[startIndex]); this.minimizeCrossings_0(nodes, false, true, isForwardSweep); index_0 = 0; for (nodeGroup$iterator = new ArrayList$1(nodes); nodeGroup$iterator.i < nodeGroup$iterator.this$01.array.length;) { nodeGroup = castTo($next_6(nodeGroup$iterator), 10); order[startIndex][index_0++] = nodeGroup; } return false; } ; var Lorg_eclipse_elk_alg_layered_p3order_BarycenterHeuristic_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'BarycenterHeuristic', 832); function BarycenterHeuristic$BarycenterState(node){ this.node = node; } defineClass(667, 1, {667:1}, BarycenterHeuristic$BarycenterState); _.toString_0 = function toString_98(){ return 'BarycenterState [node=' + this.node + ', summedWeight=' + this.summedWeight + ', degree=' + this.degree + ', barycenter=' + this.barycenter + ', visited=' + this.visited + ']'; } ; _.degree = 0; _.summedWeight = 0; _.visited = false; var Lorg_eclipse_elk_alg_layered_p3order_BarycenterHeuristic$BarycenterState_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'BarycenterHeuristic/BarycenterState', 667); function BarycenterHeuristic$lambda$0$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1865, 1, $intern_88, BarycenterHeuristic$lambda$0$Type); _.compare_1 = function compare_70(arg0, arg1){ return $lambda$0_7(this.$$outer_0, castTo(arg0, 10), castTo(arg1, 10)); } ; _.equals_0 = function equals_151(other){ return this === other; } ; _.reversed = function reversed_62(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_p3order_BarycenterHeuristic$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'BarycenterHeuristic/lambda$0$Type', 1865); function $buildConstraintsGraph(this$static, groups, onlyBetweenNormalNodes){ var currentUnitNode, currentUnitNode$iterator, group, group$iterator, group$iterator0, lastNonDummyNode, lastUnitNode, lastUnitNode$iterator, node, successor, successor$iterator; for (group$iterator0 = new ArrayList$1(groups); group$iterator0.i < group$iterator0.this$01.array.length;) { group = castTo($next_6(group$iterator0), 239); group.outgoingConstraints = null; group.incomingConstraintsCount = 0; } lastNonDummyNode = null; for (group$iterator = new ArrayList$1(groups); group$iterator.i < group$iterator.this$01.array.length;) { group = castTo($next_6(group$iterator), 239); node = group.nodes[0]; if (onlyBetweenNormalNodes && node.type_0 != ($clinit_LNode$NodeType() , NORMAL)) { continue; } for (successor$iterator = castTo($getProperty(node, ($clinit_InternalProperties_1() , IN_LAYER_SUCCESSOR_CONSTRAINTS)), 15).iterator_0(); successor$iterator.hasNext_0();) { successor = castTo(successor$iterator.next_1(), 10); if (!onlyBetweenNormalNodes || successor.type_0 == ($clinit_LNode$NodeType() , NORMAL)) { (!group.outgoingConstraints && (group.outgoingConstraints = new ArrayList) , group.outgoingConstraints).add_2(this$static.constraintGroups[successor.layer.id_0][successor.id_0]); ++this$static.constraintGroups[successor.layer.id_0][successor.id_0].incomingConstraintsCount; } } if (!onlyBetweenNormalNodes && node.type_0 == ($clinit_LNode$NodeType() , NORMAL)) { if (lastNonDummyNode) { for (lastUnitNode$iterator = castTo($get(this$static.layoutUnits, lastNonDummyNode), 21).iterator_0(); lastUnitNode$iterator.hasNext_0();) { lastUnitNode = castTo(lastUnitNode$iterator.next_1(), 10); for (currentUnitNode$iterator = castTo($get(this$static.layoutUnits, node), 21).iterator_0(); currentUnitNode$iterator.hasNext_0();) { currentUnitNode = castTo(currentUnitNode$iterator.next_1(), 10); $getOutgoingConstraints(this$static.constraintGroups[lastUnitNode.layer.id_0][lastUnitNode.id_0]).add_2(this$static.constraintGroups[currentUnitNode.layer.id_0][currentUnitNode.id_0]); ++this$static.constraintGroups[currentUnitNode.layer.id_0][currentUnitNode.id_0].incomingConstraintsCount; } } } lastNonDummyNode = node; } } } function $findViolatedConstraint(groups){ var activeGroups, group, group$iterator, predecessor, predecessor$iterator, successor, successor$iterator, successorIncomingList; activeGroups = null; for (group$iterator = new ArrayList$1(groups); group$iterator.i < group$iterator.this$01.array.length;) { group = castTo($next_6(group$iterator), 239); $doubleValue($stateOf_0(group.this$01, group.nodes[0]).barycenter); group.incomingConstraints = null; if (!!group.outgoingConstraints && group.outgoingConstraints.size_1() > 0 && group.incomingConstraintsCount == 0) { !activeGroups && (activeGroups = new ArrayList); push_1(activeGroups.array, group); } } if (activeGroups) { while (activeGroups.array.length != 0) { group = castTo($remove_11(activeGroups, 0), 239); if (!!group.incomingConstraints && group.incomingConstraints.array.length > 0) { for (predecessor$iterator = (!group.incomingConstraints && (group.incomingConstraints = new ArrayList) , new ArrayList$1(group.incomingConstraints)); predecessor$iterator.i < predecessor$iterator.this$01.array.length;) { predecessor = castTo($next_6(predecessor$iterator), 239); if ($floatValue($stateOf_0(predecessor.this$01, predecessor.nodes[0]).barycenter) == $floatValue($stateOf_0(group.this$01, group.nodes[0]).barycenter)) { if ($indexOf_3(groups, predecessor, 0) > $indexOf_3(groups, group, 0)) { return new Pair(predecessor, group); } } else if ($doubleValue($stateOf_0(predecessor.this$01, predecessor.nodes[0]).barycenter) > $doubleValue($stateOf_0(group.this$01, group.nodes[0]).barycenter)) { return new Pair(predecessor, group); } } } for (successor$iterator = (!group.outgoingConstraints && (group.outgoingConstraints = new ArrayList) , group.outgoingConstraints).iterator_0(); successor$iterator.hasNext_0();) { successor = castTo(successor$iterator.next_1(), 239); successorIncomingList = (!successor.incomingConstraints && (successor.incomingConstraints = new ArrayList) , successor.incomingConstraints); checkCriticalPositionIndex(0, successorIncomingList.array.length); insertTo(successorIncomingList.array, 0, group); successor.incomingConstraintsCount == successorIncomingList.array.length && (push_1(activeGroups.array, successor) , true); } } } return null; } function $handleViolatedConstraint(this$static, firstNodeGroup, secondNodeGroup, nodeGroups){ var alreadyInserted, firstNodeGroupConstraint, newNodeGroup, nodeGroup, nodeGroupIterator, secondNodeGroupConstraint; newNodeGroup = new ForsterConstraintResolver$ConstraintGroup_0(this$static, firstNodeGroup, secondNodeGroup); nodeGroupIterator = new AbstractList$ListIteratorImpl(nodeGroups, 0); alreadyInserted = false; while (nodeGroupIterator.i < nodeGroupIterator.this$01_0.size_1()) { nodeGroup = (checkCriticalElement(nodeGroupIterator.i < nodeGroupIterator.this$01_0.size_1()) , castTo(nodeGroupIterator.this$01_0.get_0(nodeGroupIterator.last = nodeGroupIterator.i++), 239)); if (nodeGroup == firstNodeGroup || nodeGroup == secondNodeGroup) { $remove_8(nodeGroupIterator); } else if (!alreadyInserted && $doubleValue($stateOf_0(nodeGroup.this$01, nodeGroup.nodes[0]).barycenter) > $doubleValue($stateOf_0(newNodeGroup.this$01, newNodeGroup.nodes[0]).barycenter)) { checkCriticalElement(nodeGroupIterator.i > 0); nodeGroupIterator.this$01.get_0(nodeGroupIterator.last = --nodeGroupIterator.i); $add_1(nodeGroupIterator, newNodeGroup); alreadyInserted = true; } else if (!!nodeGroup.outgoingConstraints && nodeGroup.outgoingConstraints.size_1() > 0) { firstNodeGroupConstraint = (!nodeGroup.outgoingConstraints && (nodeGroup.outgoingConstraints = new ArrayList) , nodeGroup.outgoingConstraints).remove_1(firstNodeGroup); secondNodeGroupConstraint = (!nodeGroup.outgoingConstraints && (nodeGroup.outgoingConstraints = new ArrayList) , nodeGroup.outgoingConstraints).remove_1(secondNodeGroup); if (firstNodeGroupConstraint || secondNodeGroupConstraint) { (!nodeGroup.outgoingConstraints && (nodeGroup.outgoingConstraints = new ArrayList) , nodeGroup.outgoingConstraints).add_2(newNodeGroup); ++newNodeGroup.incomingConstraintsCount; } } } alreadyInserted || (push_1(nodeGroups.array, newNodeGroup) , true); } function $initAtNodeLevel(this$static, node, fullInit){ var layerIndex, layoutUnit, nodeIndex; layerIndex = node.layer.id_0; nodeIndex = node.id_0; this$static.constraintGroups[layerIndex][nodeIndex] = new ForsterConstraintResolver$ConstraintGroup(this$static, node); if (fullInit) { this$static.barycenterStates[layerIndex][nodeIndex] = new BarycenterHeuristic$BarycenterState(node); layoutUnit = castTo($getProperty(node, ($clinit_InternalProperties_1() , IN_LAYER_LAYOUT_UNIT)), 10); !!layoutUnit && $put(this$static.layoutUnits, layoutUnit, node); } } function $processConstraints(this$static, nodes){ if (this$static.constraintsBetweenNonDummies) { $processConstraints_0(this$static, nodes, true); $forEach_3(new StreamImpl(null, new Spliterators$IteratorSpliterator(nodes, 16)), new ForsterConstraintResolver$lambda$0$Type(this$static)); } $processConstraints_0(this$static, nodes, false); } function $processConstraints_0(this$static, nodes, onlyBetweenNormalNodes){ var group, group$iterator, groups, node, node$array, node$index, node$iterator, node$max, violatedConstraint; groups = new ArrayList_0(nodes.array.length); for (node$iterator = new ArrayList$1(nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); $add_3(groups, this$static.constraintGroups[node.layer.id_0][node.id_0]); } $buildConstraintsGraph(this$static, groups, onlyBetweenNormalNodes); violatedConstraint = null; while (violatedConstraint = $findViolatedConstraint(groups)) { $handleViolatedConstraint(this$static, castTo(violatedConstraint.first, 239), castTo(violatedConstraint.second, 239), groups); } nodes.array.length = 0; for (group$iterator = new ArrayList$1(groups); group$iterator.i < group$iterator.this$01.array.length;) { group = castTo($next_6(group$iterator), 239); for (node$array = group.nodes , node$index = 0 , node$max = node$array.length; node$index < node$max; ++node$index) { node = node$array[node$index]; push_1(nodes.array, node); this$static.barycenterStates[node.layer.id_0][node.id_0].barycenter = $stateOf_0(group.this$01, group.nodes[0]).barycenter; } } } function $stateOf_0(this$static, node){ return this$static.barycenterStates[node.layer.id_0][node.id_0]; } function ForsterConstraintResolver(currentNodeOrder){ currentNodeOrder.length > 0 && currentNodeOrder[0].length > 0 && (this.constraintsBetweenNonDummies = $booleanValue(castToBoolean($getProperty($getGraph(currentNodeOrder[0][0]), ($clinit_InternalProperties_1() , IN_LAYER_SUCCESSOR_CONSTRAINTS_BETWEEN_NON_DUMMIES))))); this.barycenterStates = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_p3order_BarycenterHeuristic$BarycenterState_2_classLit, $intern_16, 2117, currentNodeOrder.length, 0, 2); this.constraintGroups = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_p3order_ForsterConstraintResolver$ConstraintGroup_2_classLit, $intern_16, 2118, currentNodeOrder.length, 0, 2); this.layoutUnits = new LinkedHashMultimap; } defineClass(831, 1, $intern_111, ForsterConstraintResolver); _.initAfterTraversal = function initAfterTraversal_2(){ } ; _.initAtEdgeLevel = function initAtEdgeLevel_2(l, n, p, e, edge, nodeOrder){ } ; _.initAtPortLevel = function initAtPortLevel_2(l, n, p, nodeOrder){ } ; _.initAtLayerLevel = function initAtLayerLevel_2(l, nodeOrder){ this.barycenterStates[l] = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_p3order_BarycenterHeuristic$BarycenterState_2_classLit, {3:1, 4:1, 5:1, 2117:1}, 667, nodeOrder[l].length, 0, 1); this.constraintGroups[l] = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_p3order_ForsterConstraintResolver$ConstraintGroup_2_classLit, {3:1, 4:1, 5:1, 2118:1}, 239, nodeOrder[l].length, 0, 1); } ; _.initAtNodeLevel = function initAtNodeLevel_2(l, n, nodeOrder){ $initAtNodeLevel(this, nodeOrder[l][n], true); } ; _.constraintsBetweenNonDummies = false; var Lorg_eclipse_elk_alg_layered_p3order_ForsterConstraintResolver_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'ForsterConstraintResolver', 831); function $getOutgoingConstraints(this$static){ !this$static.outgoingConstraints && (this$static.outgoingConstraints = new ArrayList); return this$static.outgoingConstraints; } function $setBarycenter(this$static, barycenter){ var node, node$array, node$index, node$max; for (node$array = this$static.nodes , node$index = 0 , node$max = node$array.length; node$index < node$max; ++node$index) { node = node$array[node$index]; $stateOf_0(this$static.this$01, node).barycenter = barycenter; } } function ForsterConstraintResolver$ConstraintGroup(this$0, node){ this.this$01 = this$0; this.nodes = stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_graph_LNode_2_classLit, 1), $intern_107, 10, 0, [node]); } function ForsterConstraintResolver$ConstraintGroup_0(this$0, nodeGroup1, nodeGroup2){ var candidate, candidate$iterator, i, i0, length1, length2; this.this$01 = this$0; length1 = nodeGroup1.nodes.length; length2 = nodeGroup2.nodes.length; this.nodes = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LNode_2_classLit, $intern_107, 10, length1 + length2, 0, 1); for (i0 = 0; i0 < length1; i0++) { this.nodes[i0] = nodeGroup1.nodes[i0]; } for (i = 0; i < length2; i++) { this.nodes[length1 + i] = nodeGroup2.nodes[i]; } if (nodeGroup1.outgoingConstraints) { this.outgoingConstraints = newLinkedList(nodeGroup1.outgoingConstraints); this.outgoingConstraints.remove_1(nodeGroup2); if (nodeGroup2.outgoingConstraints) { for (candidate$iterator = nodeGroup2.outgoingConstraints.iterator_0(); candidate$iterator.hasNext_0();) { candidate = castTo(candidate$iterator.next_1(), 239); if (candidate == nodeGroup1) { continue; } else this.outgoingConstraints.contains(candidate)?--candidate.incomingConstraintsCount:this.outgoingConstraints.add_2(candidate); } } } else if (nodeGroup2.outgoingConstraints) { this.outgoingConstraints = newLinkedList(nodeGroup2.outgoingConstraints); this.outgoingConstraints.remove_1(nodeGroup1); } this.summedWeight = nodeGroup1.summedWeight + nodeGroup2.summedWeight; this.degree = nodeGroup1.degree + nodeGroup2.degree; this.degree > 0?$setBarycenter(this, this.summedWeight / this.degree):$stateOf_0(nodeGroup1.this$01, nodeGroup1.nodes[0]).barycenter != null && $stateOf_0(nodeGroup2.this$01, nodeGroup2.nodes[0]).barycenter != null?$setBarycenter(this, ($doubleValue($stateOf_0(nodeGroup1.this$01, nodeGroup1.nodes[0]).barycenter) + $doubleValue($stateOf_0(nodeGroup2.this$01, nodeGroup2.nodes[0]).barycenter)) / 2):$stateOf_0(nodeGroup1.this$01, nodeGroup1.nodes[0]).barycenter != null?$setBarycenter(this, $stateOf_0(nodeGroup1.this$01, nodeGroup1.nodes[0]).barycenter):$stateOf_0(nodeGroup2.this$01, nodeGroup2.nodes[0]).barycenter != null && $setBarycenter(this, $stateOf_0(nodeGroup2.this$01, nodeGroup2.nodes[0]).barycenter); } defineClass(239, 1, {239:1}, ForsterConstraintResolver$ConstraintGroup, ForsterConstraintResolver$ConstraintGroup_0); _.toString_0 = function toString_99(){ var i, sb; sb = new StringBuilder; sb.string += '['; for (i = 0; i < this.nodes.length; i++) { $append_11(sb, $toString_13(this.nodes[i])); $stateOf_0(this.this$01, this.nodes[0]).barycenter != null && $append_11($append_11((sb.string += '<' , sb), $toString_6($stateOf_0(this.this$01, this.nodes[0]).barycenter)), '>'); i < this.nodes.length - 1 && (sb.string += ', ' , sb); } return (sb.string += ']' , sb).string; } ; _.degree = 0; _.incomingConstraintsCount = 0; _.summedWeight = 0; var Lorg_eclipse_elk_alg_layered_p3order_ForsterConstraintResolver$ConstraintGroup_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'ForsterConstraintResolver/ConstraintGroup', 239); function ForsterConstraintResolver$lambda$0$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1860, 1, $intern_19, ForsterConstraintResolver$lambda$0$Type); _.accept = function accept_116(arg0){ $initAtNodeLevel(this.$$outer_0, castTo(arg0, 10), false); } ; var Lorg_eclipse_elk_alg_layered_p3order_ForsterConstraintResolver$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'ForsterConstraintResolver/lambda$0$Type', 1860); function $setBestNodeNPortOrder(this$static, bestNodeNPortOrder){ this$static.bestNodeAndPortOrder = bestNodeNPortOrder; } function $setCurrentlyBestNodeAndPortOrder(this$static, currentlyBestNodeAndPortOrder){ this$static.currentlyBestNodeAndPortOrder = currentlyBestNodeAndPortOrder; } function GraphInfoHolder(graph, crossMinType, graphs){ var constraintResolver, graphProperties, initializables, random; this.lGraph = graph; this.currentNodeOrder = $toNodeArray(graph); this.parent_0 = this.lGraph.parentNode; this.hasParent = !!this.parent_0; this.parentGraphData = this.hasParent?castTo($get_11(graphs, $getGraph(this.parent_0).id_0), 219):null; graphProperties = castTo($getProperty(graph, ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21); this.hasExternalPorts = graphProperties.contains(($clinit_GraphProperties() , EXTERNAL_PORTS)); this.childGraphs = new ArrayList; this.crossingsCounter = new AllCrossingsCounter(this.currentNodeOrder); random = castTo($getProperty(this.lGraph, RANDOM_0), 234); this.portDistributor = create_15(crossMinType, random, this.currentNodeOrder); this.layerSweepTypeDecider = new LayerSweepTypeDecider(this); initializables = newArrayList_1(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_p3order_counting_IInitializable_2_classLit, 1), $intern_2, 230, 0, [this, this.crossingsCounter, this.layerSweepTypeDecider, this.portDistributor])); if (crossMinType == ($clinit_LayerSweepCrossingMinimizer$CrossMinType() , BARYCENTER) && !$booleanValue(castToBoolean($getProperty(graph, ($clinit_LayeredOptions() , CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER_0))))) { constraintResolver = new ForsterConstraintResolver(this.currentNodeOrder); push_1(initializables.array, constraintResolver); this.crossMinimizer = new BarycenterHeuristic(constraintResolver, random, castTo(this.portDistributor, 413)); } else if (crossMinType == BARYCENTER && $booleanValue(castToBoolean($getProperty(graph, ($clinit_LayeredOptions() , CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER_0))))) { constraintResolver = new ForsterConstraintResolver(this.currentNodeOrder); push_1(initializables.array, constraintResolver); this.crossMinimizer = new ModelOrderBarycenterHeuristic(constraintResolver, random, castTo(this.portDistributor, 413)); } else { this.crossMinimizer = new GreedySwitchHeuristic(crossMinType, this); } $add_3(initializables, this.crossMinimizer); init_0(initializables, this.currentNodeOrder); this.useBottomUp = $useBottomUp(this.layerSweepTypeDecider); } defineClass(219, 1, {219:1, 230:1}, GraphInfoHolder); _.initAtEdgeLevel = function initAtEdgeLevel_3(l, n, p, e, edge, nodeOrder){ } ; _.initAtLayerLevel = function initAtLayerLevel_3(l, nodeOrder){ } ; _.initAfterTraversal = function initAfterTraversal_3(){ this.portPositions = initUnidimensionalArray(I_classLit, $intern_49, 28, this.nPorts, 15, 1); } ; _.initAtNodeLevel = function initAtNodeLevel_3(l, n, nodeOrder){ var nestedGraph, node; node = nodeOrder[l][n]; nestedGraph = node.nestedGraph; !!nestedGraph && $add_3(this.childGraphs, nestedGraph); } ; _.initAtPortLevel = function initAtPortLevel_3(l, n, p, nodeOrder){ ++this.nPorts; } ; _.toString_0 = function toString_100(){ return deepToString(this.currentNodeOrder, new HashSet); } ; _.hasExternalPorts = false; _.hasParent = false; _.nPorts = 0; _.useBottomUp = false; var Lorg_eclipse_elk_alg_layered_p3order_GraphInfoHolder_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'GraphInfoHolder', 219); function $distributePortsInLayer(this$static, nodeOrder, currentIndex, isForwardSweep){ var improved, innerGraph, nestedGraph, node, node$array, node$index, node$max, side, useHierarchicalCrossCounter; side = isForwardSweep?($clinit_PortSide() , WEST_2):($clinit_PortSide() , EAST_2); improved = false; for (node$array = nodeOrder[currentIndex] , node$index = 0 , node$max = node$array.length; node$index < node$max; ++node$index) { node = node$array[node$index]; if ($isOrderFixed(castTo($getProperty(node, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101))) { continue; } nestedGraph = node.nestedGraph; useHierarchicalCrossCounter = !$getPortSideView(node, side).isEmpty() && !!nestedGraph; if (useHierarchicalCrossCounter) { innerGraph = $toNodeArray(nestedGraph); this$static.hierarchicalCrossingsCounter = new BetweenLayerEdgeTwoNodeCrossingsCounter(innerGraph, isForwardSweep?0:innerGraph.length - 1); } improved = improved | $distributePortsOnNode(this$static, node, side, useHierarchicalCrossCounter); } return improved; } function $distributePortsOnNode(this$static, node, side, useHierarchicalCrosscounter){ var continueSwitching, i, improved, lowerPort, ports, upperPort, lower; ports = $getPortSideView(node, side); (side == ($clinit_PortSide() , SOUTH_2) || side == WEST_2) && (ports = reverse_0(ports)); improved = false; do { continueSwitching = false; for (i = 0; i < ports.size_1() - 1; i++) { upperPort = castTo(ports.get_0(i), 12); lowerPort = castTo(ports.get_0(i + 1), 12); if ($switchingDecreasesCrossings(this$static, upperPort, lowerPort, useHierarchicalCrosscounter)) { improved = true; $switchPorts(this$static.crossingsCounter, castTo(ports.get_0(i), 12), castTo(ports.get_0(i + 1), 12)); lower = castTo(ports.get_0(i + 1), 12); ports.set_2(i + 1, castTo(ports.get_0(i), 12)); ports.set_2(i, lower); continueSwitching = true; } } } while (continueSwitching); return improved; } function $switchingDecreasesCrossings(this$static, upperPort, lowerPort, useHierarchicalCrosscounter){ var lowerNode, lowerUpperCrossings, originalNSwitchedCrossings, upperLowerCrossings, upperNode; originalNSwitchedCrossings = $countCrossingsBetweenPortsInBothOrders(this$static.crossingsCounter, upperPort, lowerPort); upperLowerCrossings = castTo(originalNSwitchedCrossings.first, 17).value_0; lowerUpperCrossings = castTo(originalNSwitchedCrossings.second, 17).value_0; if (useHierarchicalCrosscounter) { upperNode = castTo($getProperty(upperPort, ($clinit_InternalProperties_1() , PORT_DUMMY)), 10); lowerNode = castTo($getProperty(lowerPort, PORT_DUMMY), 10); if (!!upperNode && !!lowerNode) { $countBothSideCrossings(this$static.hierarchicalCrossingsCounter, upperNode, lowerNode); upperLowerCrossings += this$static.hierarchicalCrossingsCounter.upperLowerCrossings; lowerUpperCrossings += this$static.hierarchicalCrossingsCounter.lowerUpperCrossings; } } return upperLowerCrossings > lowerUpperCrossings; } function GreedyPortDistributor(){ } defineClass(1905, 1, $intern_111, GreedyPortDistributor); _.initAtEdgeLevel = function initAtEdgeLevel_4(l, n, p, e, edge, nodeOrder){ } ; _.initAtLayerLevel = function initAtLayerLevel_4(l, nodeOrder){ } ; _.initAtPortLevel = function initAtPortLevel_4(l, n, p, nodeOrder){ } ; _.distributePortsWhileSweeping = function distributePortsWhileSweeping_0(nodeOrder, currentIndex, isForwardSweep){ isForwardSweep && currentIndex > 0?($initForCountingBetween(this.crossingsCounter, nodeOrder[currentIndex - 1], nodeOrder[currentIndex]) , undefined):!isForwardSweep && currentIndex < nodeOrder.length - 1?($initForCountingBetween(this.crossingsCounter, nodeOrder[currentIndex], nodeOrder[currentIndex + 1]) , undefined):$initPortPositionsForInLayerCrossings(this.crossingsCounter, nodeOrder[currentIndex], isForwardSweep?($clinit_PortSide() , WEST_2):($clinit_PortSide() , EAST_2)); return $distributePortsInLayer(this, nodeOrder, currentIndex, isForwardSweep); } ; _.initAfterTraversal = function initAfterTraversal_4(){ this.portPos = initUnidimensionalArray(I_classLit, $intern_49, 28, this.nPorts, 15, 1); this.crossingsCounter = new CrossingsCounter(this.portPos); } ; _.initAtNodeLevel = function initAtNodeLevel_4(l, n, nodeOrder){ var node; node = nodeOrder[l][n]; this.nPorts += node.ports.array.length; } ; _.nPorts = 0; var Lorg_eclipse_elk_alg_layered_p3order_GreedyPortDistributor_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'GreedyPortDistributor', 1905); function $clinit_InteractiveCrossingMinimizer(){ $clinit_InteractiveCrossingMinimizer = emptyMethod; INTERMEDIATE_PROCESSING_CONFIGURATION_3 = $addAfter($addBefore($addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P3_NODE_ORDERING), ($clinit_IntermediateProcessorStrategy() , LONG_EDGE_SPLITTER)), P4_NODE_PLACEMENT, IN_LAYER_CONSTRAINT_PROCESSOR), P5_EDGE_ROUTING, LONG_EDGE_JOINER); } function $getLayoutProcessorConfiguration(graph){ var configuration; configuration = createFrom_0(INTERMEDIATE_PROCESSING_CONFIGURATION_3); castTo($getProperty(graph, ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21).contains(($clinit_GraphProperties() , NON_FREE_PORTS)) && $addBefore(configuration, ($clinit_LayeredPhases() , P3_NODE_ORDERING), ($clinit_IntermediateProcessorStrategy() , PORT_LIST_SORTER)); return configuration; } function $getPos(node, horizPos){ var bendpoints, edge, originNode, originPort, point1, point2, pointIter, source, sourcePoint, target, targetPoint; switch (node.type_0.ordinal) { case 1: edge = castTo($getProperty(node, ($clinit_InternalProperties_1() , ORIGIN_0)), 18); bendpoints = castTo($getProperty(edge, ORIGINAL_BENDPOINTS), 75); !bendpoints?(bendpoints = new KVectorChain):$booleanValue(castToBoolean($getProperty(edge, REVERSED))) && (bendpoints = reverse_3(bendpoints)); source = castTo($getProperty(node, LONG_EDGE_SOURCE), 12); if (source) { sourcePoint = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [source.owner.pos, source.pos, source.anchor])); if (horizPos <= sourcePoint.x_0) { return sourcePoint.y_0; } $addNode_0(bendpoints, sourcePoint, bendpoints.header, bendpoints.header.next_0); } target = castTo($getProperty(node, LONG_EDGE_TARGET), 12); if (target) { targetPoint = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [target.owner.pos, target.pos, target.anchor])); if (targetPoint.x_0 <= horizPos) { return targetPoint.y_0; } $addNode_0(bendpoints, targetPoint, bendpoints.tail.prev, bendpoints.tail); } if (bendpoints.size_0 >= 2) { pointIter = $listIterator_2(bendpoints, 0); point1 = castTo($next_9(pointIter), 8); point2 = castTo($next_9(pointIter), 8); while (point2.x_0 < horizPos && pointIter.currentNode != pointIter.this$01.tail) { point1 = point2; point2 = castTo($next_9(pointIter), 8); } return point1.y_0 + (horizPos - point1.x_0) / (point2.x_0 - point1.x_0) * (point2.y_0 - point1.y_0); } break; case 3: originPort = castTo($getProperty(castTo($get_11(node.ports, 0), 12), ($clinit_InternalProperties_1() , ORIGIN_0)), 12); originNode = originPort.owner; switch (originPort.side.ordinal) { case 1: return originNode.pos.y_0; case 3: return originNode.pos.y_0 + originNode.size_0.y_0; } } return $getInteractiveReferencePoint(node).y_0; } function $process_70(layeredGraph, monitor){ var horizPos, layer, layer$iterator, layer$iterator0, layerIndex, nextIndex, node, node$iterator, node$iterator0, nodeCount, nodeOrder, port, port$iterator, portCount, portDistributor, pos; monitor.begin('Interactive crossing minimization', 1); layerIndex = 0; for (layer$iterator0 = new ArrayList$1(layeredGraph.layers); layer$iterator0.i < layer$iterator0.this$01.array.length;) { layer = castTo($next_6(layer$iterator0), 30); layer.id_0 = layerIndex++; } nodeOrder = $toNodeArray(layeredGraph); portDistributor = new NodeRelativePortDistributor(nodeOrder.length); init_0(new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_p3order_counting_IInitializable_2_classLit, 1), $intern_2, 230, 0, [portDistributor])), nodeOrder); portCount = 0; layerIndex = 0; for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); horizPos = 0; nodeCount = 0; for (node$iterator0 = new ArrayList$1(layer.nodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); if (node.pos.x_0 > 0) { horizPos += node.pos.x_0 + node.size_0.x_0 / 2; ++nodeCount; } for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); port.id_0 = portCount++; } } nodeCount > 0 && (horizPos /= nodeCount); pos = initUnidimensionalArray(D_classLit, $intern_66, 28, layer.nodes.array.length, 15, 1); nextIndex = 0; for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); node.id_0 = nextIndex++; pos[node.id_0] = $getPos(node, horizPos); node.type_0 == ($clinit_LNode$NodeType() , LONG_EDGE) && $setProperty_0(node, ($clinit_InternalProperties_1() , ORIGINAL_DUMMY_NODE_POSITION), pos[node.id_0]); } $clinit_Collections(); $sort(layer.nodes, new InteractiveCrossingMinimizer$1(pos)); $distributePortsWhileSweeping(portDistributor, nodeOrder, layerIndex, true); ++layerIndex; } monitor.done_1(); } function InteractiveCrossingMinimizer(){ $clinit_InteractiveCrossingMinimizer(); } defineClass(1421, 1, $intern_113, InteractiveCrossingMinimizer); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_12(graph){ return $getLayoutProcessorConfiguration(castTo(graph, 36)); } ; _.process = function process_67(layeredGraph, monitor){ $process_70(castTo(layeredGraph, 36), monitor); } ; var INTERMEDIATE_PROCESSING_CONFIGURATION_3; var Lorg_eclipse_elk_alg_layered_p3order_InteractiveCrossingMinimizer_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'InteractiveCrossingMinimizer', 1421); function $compare_23(this$static, node1, node2){ var compare, node1Successors, node2Successors; compare = compare_4(this$static.val$pos2[node1.id_0], this$static.val$pos2[node2.id_0]); if (compare == 0) { node1Successors = castTo($getProperty(node1, ($clinit_InternalProperties_1() , IN_LAYER_SUCCESSOR_CONSTRAINTS)), 15); node2Successors = castTo($getProperty(node2, IN_LAYER_SUCCESSOR_CONSTRAINTS), 15); if (node1Successors.contains(node2)) { return -1; } else if (node2Successors.contains(node1)) { return 1; } } return compare; } function InteractiveCrossingMinimizer$1(val$pos){ this.val$pos2 = val$pos; } defineClass(1422, 1, $intern_88, InteractiveCrossingMinimizer$1); _.compare_1 = function compare_71(node1, node2){ return $compare_23(this, castTo(node1, 10), castTo(node2, 10)); } ; _.equals_0 = function equals_152(other){ return this === other; } ; _.reversed = function reversed_63(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_p3order_InteractiveCrossingMinimizer$1_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'InteractiveCrossingMinimizer/1', 1422); function $clinit_LayerSweepCrossingMinimizer(){ $clinit_LayerSweepCrossingMinimizer = emptyMethod; INTERMEDIATE_PROCESSING_CONFIGURATION_4 = $add_17($after($addBefore($addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P3_NODE_ORDERING), ($clinit_IntermediateProcessorStrategy() , LONG_EDGE_SPLITTER)), P4_NODE_PLACEMENT, IN_LAYER_CONSTRAINT_PROCESSOR), P5_EDGE_ROUTING), LONG_EDGE_JOINER); } function $compareDifferentRandomizedLayouts(this$static, gData){ var bestCrossings, crossings, i, thouroughness; $setSeed_0(this$static.random_0, this$static.randomSeed); this$static.graphsWhoseNodeOrderChanged.map_0.clear_0(); if ($doubleValue(castToDouble($getProperty(gData.lGraph, ($clinit_LayeredOptions() , CONSIDER_MODEL_ORDER_CROSSING_COUNTER_NODE_INFLUENCE_0)))) != 0 || $doubleValue(castToDouble($getProperty(gData.lGraph, CONSIDER_MODEL_ORDER_CROSSING_COUNTER_NODE_INFLUENCE_0))) != 0) { bestCrossings = $intern_98; maskUndefined($getProperty(gData.lGraph, CONSIDER_MODEL_ORDER_STRATEGY_0)) !== maskUndefined(($clinit_OrderingStrategy() , NONE_10)) && $setProperty_0(gData.lGraph, ($clinit_InternalProperties_1() , FIRST_TRY_WITH_INITIAL_ORDER), ($clinit_Boolean() , true)); thouroughness = castTo($getProperty(gData.lGraph, THOROUGHNESS_0), 17).value_0; for (i = 0; i < thouroughness; i++) { crossings = $minimizeCrossingsNodePortOrderWithCounter(this$static, gData); if (crossings < bestCrossings) { bestCrossings = crossings; $saveAllNodeOrdersOfChangedGraphs(this$static); if (bestCrossings == 0) { break; } } } } else { bestCrossings = $intern_0; maskUndefined($getProperty(gData.lGraph, CONSIDER_MODEL_ORDER_STRATEGY_0)) !== maskUndefined(($clinit_OrderingStrategy() , NONE_10)) && $setProperty_0(gData.lGraph, ($clinit_InternalProperties_1() , FIRST_TRY_WITH_INITIAL_ORDER), ($clinit_Boolean() , true)); thouroughness = castTo($getProperty(gData.lGraph, THOROUGHNESS_0), 17).value_0; for (i = 0; i < thouroughness; i++) { crossings = $minimizeCrossingsWithCounter(this$static, gData); if (crossings < bestCrossings) { bestCrossings = crossings; $saveAllNodeOrdersOfChangedGraphs(this$static); if (bestCrossings == 0) { break; } } } } } function $countCurrentNumberOfCrossings(this$static, currentGraph){ var child, childLGraph, childLGraph$iterator, countCrossingsIn, gD, totalCrossings; totalCrossings = 0; countCrossingsIn = new ArrayDeque; $addFirst(countCrossingsIn, currentGraph); while (countCrossingsIn.head != countCrossingsIn.tail) { gD = castTo($removeFirst(countCrossingsIn), 219); totalCrossings += $countAllCrossings(gD.crossingsCounter, gD.currentNodeOrder); for (childLGraph$iterator = new ArrayList$1(gD.childGraphs); childLGraph$iterator.i < childLGraph$iterator.this$01.array.length;) { childLGraph = castTo($next_6(childLGraph$iterator), 36); child = castTo($get_11(this$static.graphInfoHolders, childLGraph.id_0), 219); child.useBottomUp || (totalCrossings += $countCurrentNumberOfCrossings(this$static, child)); } } return totalCrossings; } function $countCurrentNumberOfCrossingsNodePortOrder(this$static, currentGraph){ var child, childLGraph, childLGraph$iterator, countCrossingsIn, crossingCounterNodeInfluence, crossingCounterPortInfluence, gD, modelOrderInfluence, modelOrderStrategy, totalCrossings; totalCrossings = 0; countCrossingsIn = new ArrayDeque; $addFirst(countCrossingsIn, currentGraph); while (countCrossingsIn.head != countCrossingsIn.tail) { gD = castTo($removeFirst(countCrossingsIn), 219); modelOrderInfluence = 0; modelOrderStrategy = castTo($getProperty(currentGraph.lGraph, ($clinit_LayeredOptions() , CONSIDER_MODEL_ORDER_STRATEGY_0)), 284); crossingCounterNodeInfluence = $doubleValue(castToDouble($getProperty(currentGraph.lGraph, CONSIDER_MODEL_ORDER_CROSSING_COUNTER_NODE_INFLUENCE_0))); crossingCounterPortInfluence = $doubleValue(castToDouble($getProperty(currentGraph.lGraph, CONSIDER_MODEL_ORDER_CROSSING_COUNTER_PORT_INFLUENCE_0))); if (modelOrderStrategy != ($clinit_OrderingStrategy() , NONE_10)) { modelOrderInfluence += crossingCounterNodeInfluence * $countModelOrderNodeChanges(gD.currentNodeOrder, modelOrderStrategy); modelOrderInfluence += crossingCounterPortInfluence * $countModelOrderPortChanges(gD.currentNodeOrder); } totalCrossings += $countAllCrossings(gD.crossingsCounter, gD.currentNodeOrder) + modelOrderInfluence; for (childLGraph$iterator = new ArrayList$1(gD.childGraphs); childLGraph$iterator.i < childLGraph$iterator.this$01.array.length;) { childLGraph = castTo($next_6(childLGraph$iterator), 36); child = castTo($get_11(this$static.graphInfoHolders, childLGraph.id_0), 219); child.useBottomUp || (totalCrossings += $countCurrentNumberOfCrossings(this$static, child)); } } return totalCrossings; } function $countModelOrderNodeChanges(layers, strategy){ var comp, i, j, layer, layer$array, layer$index, layer$max, previousLayer, wrongModelOrder; previousLayer = -1; wrongModelOrder = 0; for (layer$array = layers , layer$index = 0 , layer$max = layer$array.length; layer$index < layer$max; ++layer$index) { layer = layer$array[layer$index]; comp = new ModelOrderNodeComparator_1(previousLayer == -1?layers[0]:layers[previousLayer], strategy, ($clinit_LongEdgeOrderingStrategy() , EQUAL)); for (i = 0; i < layer.length; i++) { for (j = i + 1; j < layer.length; j++) { $hasProperty(layer[i], ($clinit_InternalProperties_1() , MODEL_ORDER_1)) && $hasProperty(layer[j], MODEL_ORDER_1) && $compare_17(comp, layer[i], layer[j]) > 0 && ++wrongModelOrder; } } ++previousLayer; } return wrongModelOrder; } function $countModelOrderPortChanges(layers){ var comp, i, j, lNode, lNode$array, lNode$index, lNode$max, layer, layer$array, layer$index, layer$max, previousLayer, wrongModelOrder; previousLayer = -1; wrongModelOrder = 0; for (layer$array = layers , layer$index = 0 , layer$max = layer$array.length; layer$index < layer$max; ++layer$index) { layer = layer$array[layer$index]; for (lNode$array = layer , lNode$index = 0 , lNode$max = lNode$array.length; lNode$index < lNode$max; ++lNode$index) { lNode = lNode$array[lNode$index]; comp = new ModelOrderPortComparator_0(previousLayer == -1?layers[0]:layers[previousLayer], castTo($getProperty($getGraph(lNode), ($clinit_LayeredOptions() , CONSIDER_MODEL_ORDER_STRATEGY_0)), 284), longEdgeTargetNodePreprocessing(lNode), $booleanValue(castToBoolean($getProperty($getGraph(lNode), CONSIDER_MODEL_ORDER_PORT_MODEL_ORDER_0)))); for (i = 0; i < lNode.ports.array.length; i++) { for (j = i + 1; j < lNode.ports.array.length; j++) { $compare_18(comp, castTo($get_11(lNode.ports, i), 12), castTo($get_11(lNode.ports, j), 12)) > 0 && ++wrongModelOrder; } } } ++previousLayer; } return wrongModelOrder; } function $endIndex(isForwardSweep, length_0){ return isForwardSweep?length_0 - 1:0; } function $firstIndex(isForwardSweep, length_0){ return isForwardSweep?0:length_0 - 1; } function $initialize_5(this$static, rootGraph){ var gData, graph, graphs, graphsToSweepOn, i, iter; this$static.graphInfoHolders = new ArrayList; this$static.random_0 = castTo($getProperty(rootGraph, ($clinit_InternalProperties_1() , RANDOM_0)), 234); this$static.randomSeed = $nextLong(this$static.random_0); graphsToSweepOn = new LinkedList; graphs = newArrayList_1(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_graph_LGraph_2_classLit, 1), $intern_104, 36, 0, [rootGraph])); i = 0; while (i < graphs.array.length) { graph = (checkCriticalElementIndex(i, graphs.array.length) , castTo(graphs.array[i], 36)); graph.id_0 = i++; gData = new GraphInfoHolder(graph, this$static.crossMinType, this$static.graphInfoHolders); $addAll_2(graphs, gData.childGraphs); $add_3(this$static.graphInfoHolders, gData); gData.useBottomUp && (iter = $listIterator_2(graphsToSweepOn, 0) , $add_8(iter, gData)); } this$static.graphsWhoseNodeOrderChanged = new HashSet; return graphsToSweepOn; } function $minimizeCrossings(graphsToSweepOn, minimizingMethod){ var gData, gData$iterator; for (gData$iterator = $listIterator_2(graphsToSweepOn, 0); gData$iterator.currentNode != gData$iterator.this$01.tail;) { gData = castTo($next_9(gData$iterator), 219); if (gData.currentNodeOrder.length > 0) { minimizingMethod.accept(gData); gData.hasParent && $setPortOrderOnParentGraph(gData); } } } function $minimizeCrossingsNoCounter(this$static, gData){ var improved, isForwardSweep; isForwardSweep = $nextInternal(this$static.random_0, 1) != 0; improved = true; while (improved) { improved = false; improved = gData.crossMinimizer.setFirstLayerOrder(gData.currentNodeOrder, isForwardSweep); improved = improved | $sweepReducingCrossings(this$static, gData, isForwardSweep, false); isForwardSweep = !isForwardSweep; } $setCurrentlyBestNodeOrders(this$static); } function $minimizeCrossingsNodePortOrderWithCounter(this$static, gData){ var crossingsInGraph, initialCrossings, isForwardSweep, oldNumberOfCrossings; isForwardSweep = $nextInternal(this$static.random_0, 1) != 0; initialCrossings = $countCurrentNumberOfCrossingsNodePortOrder(this$static, gData); if (initialCrossings == 0 && $booleanValue(castToBoolean($getProperty(gData.lGraph, ($clinit_InternalProperties_1() , FIRST_TRY_WITH_INITIAL_ORDER))))) { return 0; } !$booleanValue(castToBoolean($getProperty(gData.lGraph, ($clinit_InternalProperties_1() , FIRST_TRY_WITH_INITIAL_ORDER)))) && !$booleanValue(castToBoolean($getProperty(gData.lGraph, SECOND_TRY_WITH_INITIAL_ORDER))) || maskUndefined($getProperty(gData.lGraph, ($clinit_LayeredOptions() , CONSIDER_MODEL_ORDER_STRATEGY_0))) === maskUndefined(($clinit_OrderingStrategy() , NONE_10))?gData.crossMinimizer.setFirstLayerOrder(gData.currentNodeOrder, isForwardSweep):(isForwardSweep = $booleanValue(castToBoolean($getProperty(gData.lGraph, FIRST_TRY_WITH_INITIAL_ORDER)))); $sweepReducingCrossings(this$static, gData, isForwardSweep, true); $booleanValue(castToBoolean($getProperty(gData.lGraph, SECOND_TRY_WITH_INITIAL_ORDER))) && $setProperty_0(gData.lGraph, SECOND_TRY_WITH_INITIAL_ORDER, ($clinit_Boolean() , false)); if ($booleanValue(castToBoolean($getProperty(gData.lGraph, FIRST_TRY_WITH_INITIAL_ORDER)))) { $setProperty_0(gData.lGraph, FIRST_TRY_WITH_INITIAL_ORDER, ($clinit_Boolean() , false)); $setProperty_0(gData.lGraph, SECOND_TRY_WITH_INITIAL_ORDER, true); } crossingsInGraph = $countCurrentNumberOfCrossingsNodePortOrder(this$static, gData); do { $setCurrentlyBestNodeOrders(this$static); if (crossingsInGraph == 0) { return 0; } isForwardSweep = !isForwardSweep; oldNumberOfCrossings = crossingsInGraph; $sweepReducingCrossings(this$static, gData, isForwardSweep, false); crossingsInGraph = $countCurrentNumberOfCrossingsNodePortOrder(this$static, gData); } while (oldNumberOfCrossings > crossingsInGraph); return oldNumberOfCrossings; } function $minimizeCrossingsWithCounter(this$static, gData){ var crossingsInGraph, initialCrossings, isForwardSweep, oldNumberOfCrossings; isForwardSweep = $nextInternal(this$static.random_0, 1) != 0; initialCrossings = $countCurrentNumberOfCrossings(this$static, gData); if (initialCrossings == 0 && $booleanValue(castToBoolean($getProperty(gData.lGraph, ($clinit_InternalProperties_1() , FIRST_TRY_WITH_INITIAL_ORDER))))) { return 0; } !$booleanValue(castToBoolean($getProperty(gData.lGraph, ($clinit_InternalProperties_1() , FIRST_TRY_WITH_INITIAL_ORDER)))) && !$booleanValue(castToBoolean($getProperty(gData.lGraph, SECOND_TRY_WITH_INITIAL_ORDER))) || maskUndefined($getProperty(gData.lGraph, ($clinit_LayeredOptions() , CONSIDER_MODEL_ORDER_STRATEGY_0))) === maskUndefined(($clinit_OrderingStrategy() , NONE_10))?gData.crossMinimizer.setFirstLayerOrder(gData.currentNodeOrder, isForwardSweep):(isForwardSweep = $booleanValue(castToBoolean($getProperty(gData.lGraph, FIRST_TRY_WITH_INITIAL_ORDER)))); $sweepReducingCrossings(this$static, gData, isForwardSweep, true); $booleanValue(castToBoolean($getProperty(gData.lGraph, SECOND_TRY_WITH_INITIAL_ORDER))) && $setProperty_0(gData.lGraph, SECOND_TRY_WITH_INITIAL_ORDER, ($clinit_Boolean() , false)); if ($booleanValue(castToBoolean($getProperty(gData.lGraph, FIRST_TRY_WITH_INITIAL_ORDER)))) { $setProperty_0(gData.lGraph, FIRST_TRY_WITH_INITIAL_ORDER, ($clinit_Boolean() , false)); $setProperty_0(gData.lGraph, SECOND_TRY_WITH_INITIAL_ORDER, true); } crossingsInGraph = $countCurrentNumberOfCrossings(this$static, gData); do { $setCurrentlyBestNodeOrders(this$static); if (crossingsInGraph == 0) { return 0; } isForwardSweep = !isForwardSweep; oldNumberOfCrossings = crossingsInGraph; $sweepReducingCrossings(this$static, gData, isForwardSweep, false); crossingsInGraph = $countCurrentNumberOfCrossings(this$static, gData); } while (oldNumberOfCrossings > crossingsInGraph); return oldNumberOfCrossings; } function $process_71(this$static, layeredGraph, progressMonitor){ var emptyGraph, graphsToSweepOn, hierarchicalLayout, minimizingMethod, parent_0, singleNode; progressMonitor.begin('Minimize Crossings ' + this$static.crossMinType, 1); emptyGraph = layeredGraph.layers.array.length == 0 || !$spliterator($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(layeredGraph.layers, 16)), new Predicate$lambda$2$Type(new LayerSweepCrossingMinimizer$lambda$0$Type))).tryAdvance(($clinit_StreamImpl() , NULL_CONSUMER)); singleNode = layeredGraph.layers.array.length == 1 && castTo($get_11(layeredGraph.layers, 0), 30).nodes.array.length == 1; hierarchicalLayout = maskUndefined($getProperty(layeredGraph, ($clinit_LayeredOptions() , HIERARCHY_HANDLING))) === maskUndefined(($clinit_HierarchyHandling() , INCLUDE_CHILDREN)); if (emptyGraph || singleNode && !hierarchicalLayout) { progressMonitor.done_1(); return; } graphsToSweepOn = $initialize_5(this$static, layeredGraph); minimizingMethod = (parent_0 = castTo($get_7(graphsToSweepOn, 0), 219) , parent_0.crossMinimizer.isDeterministic()?parent_0.crossMinimizer.alwaysImproves()?new LayerSweepCrossingMinimizer$1methodref$minimizeCrossingsNoCounter$Type(this$static):new LayerSweepCrossingMinimizer$2methodref$minimizeCrossingsWithCounter$Type(this$static):new LayerSweepCrossingMinimizer$0methodref$compareDifferentRandomizedLayouts$Type(this$static)); $minimizeCrossings(graphsToSweepOn, minimizingMethod); $transferNodeAndPortOrdersToGraph(this$static); progressMonitor.done_1(); } function $saveAllNodeOrdersOfChangedGraphs(this$static){ var graph, graph$iterator; for (graph$iterator = this$static.graphsWhoseNodeOrderChanged.map_0.keySet_0().iterator_0(); graph$iterator.hasNext_0();) { graph = castTo(graph$iterator.next_1(), 219); $setBestNodeNPortOrder(graph, new SweepCopy(graph.currentlyBestNodeAndPortOrder)); } } function $setCurrentlyBestNodeOrders(this$static){ var graph, graph$iterator; for (graph$iterator = this$static.graphsWhoseNodeOrderChanged.map_0.keySet_0().iterator_0(); graph$iterator.hasNext_0();) { graph = castTo(graph$iterator.next_1(), 219); $setCurrentlyBestNodeAndPortOrder(graph, new SweepCopy_0(graph.currentNodeOrder)); } } function $setPortOrderOnParentGraph(gData){ var bestSweep; if (gData.hasExternalPorts) { bestSweep = gData.crossMinimizer.isDeterministic()?gData.currentlyBestNodeAndPortOrder:gData.bestNodeAndPortOrder; $sortPortsByDummyPositionsInLastLayer(bestSweep.nodeOrder, gData.parent_0, true); $sortPortsByDummyPositionsInLastLayer(bestSweep.nodeOrder, gData.parent_0, false); $setProperty_0(gData.parent_0, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0), ($clinit_PortConstraints() , FIXED_ORDER)); } } function $sortPortDummiesByPortPositions(parentNode, layerCloseToNodeEdge, side){ var i, port, port$iterator, ports, sortedDummies; ports = inNorthSouthEastWestOrder(parentNode, side); sortedDummies = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LNode_2_classLit, $intern_107, 10, layerCloseToNodeEdge.length, 0, 1); i = 0; for (port$iterator = ports.iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); $booleanValue(castToBoolean($getProperty(port, ($clinit_InternalProperties_1() , INSIDE_CONNECTIONS)))) && (sortedDummies[i++] = castTo($getProperty(port, PORT_DUMMY), 10)); } if (i < layerCloseToNodeEdge.length) { throw toJs(new IllegalStateException_0('Expected ' + layerCloseToNodeEdge.length + ' hierarchical ports, but found only ' + i + '.')); } return sortedDummies; } function $sortPortsByDummyPositionsInLastLayer(nodeOrder, parent_0, onRightMostLayer){ var endIndex, i, j, lastLayer, port, ports; endIndex = $endIndex(onRightMostLayer, nodeOrder.length); lastLayer = nodeOrder[endIndex]; j = $firstIndex(onRightMostLayer, lastLayer.length); if (lastLayer[j].type_0 != ($clinit_LNode$NodeType() , EXTERNAL_PORT)) { return; } ports = parent_0.ports; for (i = 0; i < ports.array.length; i++) { port = (checkCriticalElementIndex(i, ports.array.length) , castTo(ports.array[i], 12)); if ((onRightMostLayer?port.side == ($clinit_PortSide() , EAST_2):port.side == ($clinit_PortSide() , WEST_2)) && $booleanValue(castToBoolean($getProperty(port, ($clinit_InternalProperties_1() , INSIDE_CONNECTIONS))))) { $set_1(ports, i, castTo($getProperty(lastLayer[j], ($clinit_InternalProperties_1() , ORIGIN_0)), 12)); j += onRightMostLayer?1:-1; } } } function $sweepInHierarchicalNodes(this$static, layer, isForwardSweep, isFirstSweep){ var improved, node, node$array, node$index, node$max, nestedLGraph, nestedGraph, nestedGraphNodeOrder, startIndex, firstNode, improved_0; improved = false; for (node$array = layer , node$index = 0 , node$max = node$array.length; node$index < node$max; ++node$index) { node = node$array[node$index]; $booleanValue(($clinit_Boolean() , node.nestedGraph?true:false)) && !castTo($get_11(this$static.graphInfoHolders, node.nestedGraph.id_0), 219).useBottomUp && (improved = improved | (nestedLGraph = node.nestedGraph , nestedGraph = castTo($get_11(this$static.graphInfoHolders, nestedLGraph.id_0), 219) , nestedGraphNodeOrder = nestedGraph.currentNodeOrder , startIndex = $firstIndex(isForwardSweep, nestedGraphNodeOrder.length) , firstNode = nestedGraphNodeOrder[startIndex][0] , firstNode.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT)?(nestedGraphNodeOrder[startIndex] = $sortPortDummiesByPortPositions(node, nestedGraphNodeOrder[startIndex], isForwardSweep?($clinit_PortSide() , WEST_2):($clinit_PortSide() , EAST_2))):nestedGraph.crossMinimizer.setFirstLayerOrder(nestedGraphNodeOrder, isForwardSweep) , improved_0 = $sweepReducingCrossings(this$static, nestedGraph, isForwardSweep, isFirstSweep) , $sortPortsByDummyPositionsInLastLayer(nestedGraph.currentNodeOrder, nestedGraph.parent_0, isForwardSweep) , improved_0)); } return improved; } function $sweepReducingCrossings(this$static, graph, forward_0, firstSweep){ var firstLayer, i, improved, length_0, nodes; nodes = graph.currentNodeOrder; length_0 = nodes.length; improved = graph.portDistributor.distributePortsWhileSweeping(nodes, forward_0?0:length_0 - 1, forward_0); firstLayer = nodes[forward_0?0:length_0 - 1]; improved = improved | $sweepInHierarchicalNodes(this$static, firstLayer, forward_0, firstSweep); for (i = forward_0?1:length_0 - 2; forward_0?i < length_0:i >= 0; i += forward_0?1:-1) { improved = improved | graph.crossMinimizer.minimizeCrossings(nodes, i, forward_0, firstSweep && !$booleanValue(castToBoolean($getProperty(graph.lGraph, ($clinit_InternalProperties_1() , FIRST_TRY_WITH_INITIAL_ORDER)))) && !$booleanValue(castToBoolean($getProperty(graph.lGraph, ($clinit_InternalProperties_1() , SECOND_TRY_WITH_INITIAL_ORDER))))); improved = improved | graph.portDistributor.distributePortsWhileSweeping(nodes, i, forward_0); improved = improved | $sweepInHierarchicalNodes(this$static, nodes[i], forward_0, firstSweep); } $add_6(this$static.graphsWhoseNodeOrderChanged, graph); return improved; } function $transferNodeAndPortOrdersToGraph(this$static){ var bestSweep, gD, gD$iterator; for (gD$iterator = new ArrayList$1(this$static.graphInfoHolders); gD$iterator.i < gD$iterator.this$01.array.length;) { gD = castTo($next_6(gD$iterator), 219); bestSweep = gD.crossMinimizer.isDeterministic()?gD.currentlyBestNodeAndPortOrder:gD.bestNodeAndPortOrder; !!bestSweep && $transferNodeAndPortOrdersToGraph_0(bestSweep, gD.lGraph); } } function LayerSweepCrossingMinimizer(cT){ $clinit_LayerSweepCrossingMinimizer(); this.crossMinType = cT; } defineClass(514, 1, {514:1, 106:1, 47:1}, LayerSweepCrossingMinimizer); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_13(graph){ var configuration; return castTo(graph, 36) , configuration = createFrom_0(INTERMEDIATE_PROCESSING_CONFIGURATION_4) , $addBefore(configuration, ($clinit_LayeredPhases() , P3_NODE_ORDERING), ($clinit_IntermediateProcessorStrategy() , PORT_LIST_SORTER)) , configuration; } ; _.process = function process_68(layeredGraph, progressMonitor){ $process_71(this, castTo(layeredGraph, 36), progressMonitor); } ; _.randomSeed = 0; var INTERMEDIATE_PROCESSING_CONFIGURATION_4; var Lorg_eclipse_elk_alg_layered_p3order_LayerSweepCrossingMinimizer_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'LayerSweepCrossingMinimizer', 514); function LayerSweepCrossingMinimizer$0methodref$compareDifferentRandomizedLayouts$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1418, 1, $intern_19, LayerSweepCrossingMinimizer$0methodref$compareDifferentRandomizedLayouts$Type); _.accept = function accept_117(arg0){ $compareDifferentRandomizedLayouts(this.$$outer_0, castTo(arg0, 219)); } ; var Lorg_eclipse_elk_alg_layered_p3order_LayerSweepCrossingMinimizer$0methodref$compareDifferentRandomizedLayouts$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'LayerSweepCrossingMinimizer/0methodref$compareDifferentRandomizedLayouts$Type', 1418); function LayerSweepCrossingMinimizer$1methodref$minimizeCrossingsNoCounter$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1419, 1, $intern_19, LayerSweepCrossingMinimizer$1methodref$minimizeCrossingsNoCounter$Type); _.accept = function accept_118(arg0){ $minimizeCrossingsNoCounter(this.$$outer_0, castTo(arg0, 219)); } ; var Lorg_eclipse_elk_alg_layered_p3order_LayerSweepCrossingMinimizer$1methodref$minimizeCrossingsNoCounter$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'LayerSweepCrossingMinimizer/1methodref$minimizeCrossingsNoCounter$Type', 1419); function LayerSweepCrossingMinimizer$2methodref$minimizeCrossingsWithCounter$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1420, 1, $intern_19, LayerSweepCrossingMinimizer$2methodref$minimizeCrossingsWithCounter$Type); _.accept = function accept_119(arg0){ $minimizeCrossingsWithCounter(this.$$outer_0, castTo(arg0, 219)); } ; var Lorg_eclipse_elk_alg_layered_p3order_LayerSweepCrossingMinimizer$2methodref$minimizeCrossingsWithCounter$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'LayerSweepCrossingMinimizer/2methodref$minimizeCrossingsWithCounter$Type', 1420); function $clinit_LayerSweepCrossingMinimizer$CrossMinType(){ $clinit_LayerSweepCrossingMinimizer$CrossMinType = emptyMethod; BARYCENTER = new LayerSweepCrossingMinimizer$CrossMinType('BARYCENTER', 0); ONE_SIDED_GREEDY_SWITCH_0 = new LayerSweepCrossingMinimizer$CrossMinType('ONE_SIDED_GREEDY_SWITCH', 1); TWO_SIDED_GREEDY_SWITCH_0 = new LayerSweepCrossingMinimizer$CrossMinType('TWO_SIDED_GREEDY_SWITCH', 2); } function LayerSweepCrossingMinimizer$CrossMinType(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_65(name_0){ $clinit_LayerSweepCrossingMinimizer$CrossMinType(); return valueOf(($clinit_LayerSweepCrossingMinimizer$CrossMinType$Map() , $MAP_55), name_0); } function values_73(){ $clinit_LayerSweepCrossingMinimizer$CrossMinType(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_p3order_LayerSweepCrossingMinimizer$CrossMinType_2_classLit, 1), $intern_37, 464, 0, [BARYCENTER, ONE_SIDED_GREEDY_SWITCH_0, TWO_SIDED_GREEDY_SWITCH_0]); } defineClass(464, 22, {3:1, 34:1, 22:1, 464:1}, LayerSweepCrossingMinimizer$CrossMinType); var BARYCENTER, ONE_SIDED_GREEDY_SWITCH_0, TWO_SIDED_GREEDY_SWITCH_0; var Lorg_eclipse_elk_alg_layered_p3order_LayerSweepCrossingMinimizer$CrossMinType_2_classLit = createForEnum('org.eclipse.elk.alg.layered.p3order', 'LayerSweepCrossingMinimizer/CrossMinType', 464, Ljava_lang_Enum_2_classLit, values_73, valueOf_65); function $clinit_LayerSweepCrossingMinimizer$CrossMinType$Map(){ $clinit_LayerSweepCrossingMinimizer$CrossMinType$Map = emptyMethod; $MAP_55 = createValueOfMap(($clinit_LayerSweepCrossingMinimizer$CrossMinType() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_p3order_LayerSweepCrossingMinimizer$CrossMinType_2_classLit, 1), $intern_37, 464, 0, [BARYCENTER, ONE_SIDED_GREEDY_SWITCH_0, TWO_SIDED_GREEDY_SWITCH_0]))); } var $MAP_55; function LayerSweepCrossingMinimizer$lambda$0$Type(){ } defineClass(1417, 1, $intern_40, LayerSweepCrossingMinimizer$lambda$0$Type); _.test_0 = function test_83(arg0){ return $clinit_LayerSweepCrossingMinimizer() , castTo(arg0, 30).nodes.array.length == 0; } ; var Lorg_eclipse_elk_alg_layered_p3order_LayerSweepCrossingMinimizer$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'LayerSweepCrossingMinimizer/lambda$0$Type', 1417); function $transferInfoTo(this$static, currentNode, target){ var targetNodeInfo; targetNodeInfo = this$static.nodeInfo[target.layer.id_0][target.id_0]; targetNodeInfo.hierarchicalInfluence += currentNode.hierarchicalInfluence; targetNodeInfo.randomInfluence += currentNode.randomInfluence; targetNodeInfo.connectedEdges += currentNode.connectedEdges; ++targetNodeInfo.connectedEdges; } function $useBottomUp(this$static){ var allPaths, boundary, currentNode, eastPorts, edge, edge$iterator, layer, layer$array, layer$index, layer$max, node, node$array, node$index, node$iterator, node$max, normalized, northSouthPorts, nsDummy, nsPortDummies, pathsToHierarchical, pathsToRandom, port, port$iterator, target, westPorts; boundary = $doubleValue(castToDouble($getProperty(this$static.graphData.lGraph, ($clinit_LayeredOptions() , CROSSING_MINIMIZATION_HIERARCHICAL_SWEEPINESS_0)))); if (boundary < -1 || !this$static.graphData.hasParent || $isOrderFixed(castTo($getProperty(this$static.graphData.parent_0, PORT_CONSTRAINTS_0), 101)) || $getPortSideView(this$static.graphData.parent_0, ($clinit_PortSide() , EAST_2)).size_1() < 2 && $getPortSideView(this$static.graphData.parent_0, WEST_2).size_1() < 2) { return true; } if (this$static.graphData.crossMinimizer.isDeterministic()) { return false; } pathsToRandom = 0; pathsToHierarchical = 0; nsPortDummies = new ArrayList; for (layer$array = this$static.graphData.currentNodeOrder , layer$index = 0 , layer$max = layer$array.length; layer$index < layer$max; ++layer$index) { layer = layer$array[layer$index]; for (node$array = layer , node$index = 0 , node$max = node$array.length; node$index < node$max; ++node$index) { node = node$array[node$index]; if (node.type_0 == ($clinit_LNode$NodeType() , NORTH_SOUTH_PORT)) { push_1(nsPortDummies.array, node); continue; } currentNode = this$static.nodeInfo[node.layer.id_0][node.id_0]; if (node.type_0 == EXTERNAL_PORT) { currentNode.hierarchicalInfluence = 1; castTo($getProperty(node, ($clinit_InternalProperties_1() , ORIGIN_0)), 12).side == ($clinit_PortSide() , EAST_2) && (pathsToHierarchical += currentNode.connectedEdges); } else { westPorts = $getPortSideView(node, ($clinit_PortSide() , WEST_2)); westPorts.isEmpty() || !any_0(westPorts, new LayerSweepTypeDecider$lambda$1$Type)?(currentNode.randomInfluence = 1):(eastPorts = $getPortSideView(node, EAST_2) , (eastPorts.isEmpty() || !any_0(eastPorts, new LayerSweepTypeDecider$lambda$0$Type)) && (pathsToRandom += currentNode.connectedEdges)); } for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); pathsToRandom += currentNode.randomInfluence; pathsToHierarchical += currentNode.hierarchicalInfluence; target = edge.target.owner; $transferInfoTo(this$static, currentNode, target); } northSouthPorts = concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [$getPortSideView(node, ($clinit_PortSide() , NORTH_3)), $getPortSideView(node, SOUTH_2)])); for (port$iterator = new Iterators$ConcatenatedIterator(new FluentIterable$3$1(northSouthPorts.val$inputs1.length, northSouthPorts.val$inputs1)); $hasNext_1(port$iterator);) { port = castTo($next_0(port$iterator), 12); nsDummy = castTo($getProperty(port, ($clinit_InternalProperties_1() , PORT_DUMMY)), 10); if (nsDummy) { pathsToRandom += currentNode.randomInfluence; pathsToHierarchical += currentNode.hierarchicalInfluence; $transferInfoTo(this$static, currentNode, nsDummy); } } } for (node$iterator = new ArrayList$1(nsPortDummies); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); currentNode = this$static.nodeInfo[node.layer.id_0][node.id_0]; for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); pathsToRandom += currentNode.randomInfluence; pathsToHierarchical += currentNode.hierarchicalInfluence; target = edge.target.owner; $transferInfoTo(this$static, currentNode, target); } } nsPortDummies.array.length = 0; } allPaths = pathsToRandom + pathsToHierarchical; normalized = allPaths == 0?$intern_60:(pathsToRandom - pathsToHierarchical) / allPaths; return normalized >= boundary; } function LayerSweepTypeDecider(graphData){ this.graphData = graphData; this.nodeInfo = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_p3order_LayerSweepTypeDecider$NodeInfo_2_classLit, $intern_16, 2043, graphData.currentNodeOrder.length, 0, 2); } defineClass(1862, 1, $intern_111, LayerSweepTypeDecider); _.initAfterTraversal = function initAfterTraversal_5(){ } ; _.initAtEdgeLevel = function initAtEdgeLevel_5(l, n, p, e, edge, nodeOrder){ } ; _.initAtPortLevel = function initAtPortLevel_5(l, n, p, nodeOrder){ } ; _.initAtLayerLevel = function initAtLayerLevel_5(l, nodeOrder){ nodeOrder[l][0].layer.id_0 = l; this.nodeInfo[l] = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_p3order_LayerSweepTypeDecider$NodeInfo_2_classLit, {3:1, 4:1, 5:1, 2043:1}, 668, nodeOrder[l].length, 0, 1); } ; _.initAtNodeLevel = function initAtNodeLevel_5(l, n, nodeOrder){ var node; node = nodeOrder[l][n]; node.id_0 = n; setCheck(this.nodeInfo[l], n, new LayerSweepTypeDecider$NodeInfo); } ; var Lorg_eclipse_elk_alg_layered_p3order_LayerSweepTypeDecider_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'LayerSweepTypeDecider', 1862); function LayerSweepTypeDecider$NodeInfo(){ } defineClass(668, 1, {668:1}, LayerSweepTypeDecider$NodeInfo); _.toString_0 = function toString_101(){ return 'NodeInfo [connectedEdges=' + this.connectedEdges + ', hierarchicalInfluence=' + this.hierarchicalInfluence + ', randomInfluence=' + this.randomInfluence + ']'; } ; _.connectedEdges = 0; _.hierarchicalInfluence = 0; _.randomInfluence = 0; var Lorg_eclipse_elk_alg_layered_p3order_LayerSweepTypeDecider$NodeInfo_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'LayerSweepTypeDecider/NodeInfo', 668); function LayerSweepTypeDecider$lambda$0$Type(){ } defineClass(1863, 1, $intern_89, LayerSweepTypeDecider$lambda$0$Type); _.apply_1 = function apply_133(arg0){ return $hasNext_6(new LPort$CombineIter$1(castTo(arg0, 12).connectedEdges)); } ; _.equals_0 = function equals_153(other){ return this === other; } ; _.test_0 = function test_84(input_0){ return $hasNext_6(new LPort$CombineIter$1(castTo(input_0, 12).connectedEdges)); } ; var Lorg_eclipse_elk_alg_layered_p3order_LayerSweepTypeDecider$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'LayerSweepTypeDecider/lambda$0$Type', 1863); function LayerSweepTypeDecider$lambda$1$Type(){ } defineClass(1864, 1, $intern_89, LayerSweepTypeDecider$lambda$1$Type); _.apply_1 = function apply_134(arg0){ return $hasNext_6(new LPort$CombineIter$1(castTo(arg0, 12).connectedEdges)); } ; _.equals_0 = function equals_154(other){ return this === other; } ; _.test_0 = function test_85(input_0){ return $hasNext_6(new LPort$CombineIter$1(castTo(input_0, 12).connectedEdges)); } ; var Lorg_eclipse_elk_alg_layered_p3order_LayerSweepTypeDecider$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'LayerSweepTypeDecider/lambda$1$Type', 1864); function LayerTotalPortDistributor(numLayers){ AbstractBarycenterPortDistributor.call(this, numLayers); } defineClass(1906, 413, $intern_114, LayerTotalPortDistributor); _.calculatePortRanks = function calculatePortRanks(node, rankSum, type_0){ var inputCount, northInputCount, northPos, port, port$iterator, port$iterator0, portRanks, pos, restPos; portRanks = this.portRanks; switch (type_0.ordinal) { case 1: { inputCount = 0; northInputCount = 0; for (port$iterator0 = new ArrayList$1(node.ports); port$iterator0.i < port$iterator0.this$01.array.length;) { port = castTo($next_6(port$iterator0), 12); if (port.incomingEdges.array.length != 0) { ++inputCount; port.side == ($clinit_PortSide() , NORTH_3) && ++northInputCount; } } northPos = rankSum + northInputCount; restPos = rankSum + inputCount; for (port$iterator = $getPorts(node, ($clinit_PortType() , INPUT)).iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); if (port.side == ($clinit_PortSide() , NORTH_3)) { portRanks[port.id_0] = northPos; --northPos; } else { portRanks[port.id_0] = restPos; --restPos; } } return inputCount; } case 2: { pos = 0; for (port$iterator = $getPorts(node, ($clinit_PortType() , OUTPUT)).iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); ++pos; portRanks[port.id_0] = rankSum + pos; } return pos; } default:throw toJs(new IllegalArgumentException); } } ; var Lorg_eclipse_elk_alg_layered_p3order_LayerTotalPortDistributor_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'LayerTotalPortDistributor', 1906); function $compareBasedOnBarycenter(this$static, n1, n2){ var s1, s2, value_0; s1 = this$static.barycenterState[n1.layer.id_0][n1.id_0]; s2 = this$static.barycenterState[n2.layer.id_0][n2.id_0]; if (s1.barycenter != null && s2.barycenter != null) { value_0 = $compareTo_4(s1.barycenter, s2.barycenter); value_0 < 0?$updateBiggerAndSmallerAssociations_1(this$static, n1, n2):value_0 > 0 && $updateBiggerAndSmallerAssociations_1(this$static, n2, n1); return value_0; } else if (s1.barycenter != null) { $updateBiggerAndSmallerAssociations_1(this$static, n1, n2); return -1; } else if (s2.barycenter != null) { $updateBiggerAndSmallerAssociations_1(this$static, n2, n1); return 1; } return 0; } function $compareBasedOnTansitiveDependencies(this$static, n1, n2){ if ($containsKey_3(this$static.biggerThan, n1)) { if ($contains_6(castTo($get_10(this$static.biggerThan, n1), 49), n2)) { return 1; } } else { $put_6(this$static.biggerThan, n1, new HashSet); } if ($containsKey_3(this$static.biggerThan, n2)) { if ($contains_6(castTo($get_10(this$static.biggerThan, n2), 49), n1)) { return -1; } } else { $put_6(this$static.biggerThan, n2, new HashSet); } if ($containsKey_3(this$static.smallerThan, n1)) { if ($contains_6(castTo($get_10(this$static.smallerThan, n1), 49), n2)) { return -1; } } else { $put_6(this$static.smallerThan, n1, new HashSet); } if ($containsKey_3(this$static.smallerThan, n2)) { if ($contains_6(castTo($get_10(this$static.smallerThan, n2), 49), n1)) { return 1; } } else { $put_6(this$static.smallerThan, n2, new HashSet); } return 0; } function $lambda$0_8(this$static, n1_0, n2_1){ var transitiveComparison, value_0; transitiveComparison = $compareBasedOnTansitiveDependencies(this$static, n1_0, n2_1); if (transitiveComparison != 0) { return transitiveComparison; } if ($hasProperty(n1_0, ($clinit_InternalProperties_1() , MODEL_ORDER_1)) && $hasProperty(n2_1, MODEL_ORDER_1)) { value_0 = compare_5(castTo($getProperty(n1_0, MODEL_ORDER_1), 17).value_0, castTo($getProperty(n2_1, MODEL_ORDER_1), 17).value_0); value_0 < 0?$updateBiggerAndSmallerAssociations_1(this$static, n1_0, n2_1):value_0 > 0 && $updateBiggerAndSmallerAssociations_1(this$static, n2_1, n1_0); return value_0; } return $compareBasedOnBarycenter(this$static, n1_0, n2_1); } function $updateBiggerAndSmallerAssociations_1(this$static, bigger, smaller){ var biggerNodeBiggerThan, biggerNodeSmallerThan, smallerNodeBiggerThan, smallerNodeSmallerThan, veryBig, veryBig$iterator, verySmall, verySmall$iterator; biggerNodeBiggerThan = castTo($get_10(this$static.biggerThan, bigger), 49); smallerNodeBiggerThan = castTo($get_10(this$static.biggerThan, smaller), 49); biggerNodeSmallerThan = castTo($get_10(this$static.smallerThan, bigger), 49); smallerNodeSmallerThan = castTo($get_10(this$static.smallerThan, smaller), 49); biggerNodeBiggerThan.map_0.put(smaller, biggerNodeBiggerThan); smallerNodeSmallerThan.map_0.put(bigger, smallerNodeSmallerThan); for (verySmall$iterator = smallerNodeBiggerThan.map_0.keySet_0().iterator_0(); verySmall$iterator.hasNext_0();) { verySmall = castTo(verySmall$iterator.next_1(), 10); biggerNodeBiggerThan.map_0.put(verySmall, biggerNodeBiggerThan); $add_6(castTo($get_10(this$static.smallerThan, verySmall), 49), bigger); $addAll(castTo($get_10(this$static.smallerThan, verySmall), 49), biggerNodeSmallerThan); } for (veryBig$iterator = biggerNodeSmallerThan.map_0.keySet_0().iterator_0(); veryBig$iterator.hasNext_0();) { veryBig = castTo(veryBig$iterator.next_1(), 10); smallerNodeSmallerThan.map_0.put(veryBig, smallerNodeSmallerThan); $add_6(castTo($get_10(this$static.biggerThan, veryBig), 49), smaller); $addAll(castTo($get_10(this$static.biggerThan, veryBig), 49), smallerNodeBiggerThan); } } function ModelOrderBarycenterHeuristic(constraintResolver, random, portDistributor){ BarycenterHeuristic.call(this, constraintResolver, random, portDistributor); this.biggerThan = new HashMap; this.smallerThan = new HashMap; this.barycenterStateComparator = new ModelOrderBarycenterHeuristic$lambda$0$Type(this); } function insertionSort_0(layer, comparator, barycenterHeuristic){ var i, j, temp; for (i = 1; i < layer.array.length; i++) { temp = (checkCriticalElementIndex(i, layer.array.length) , castTo(layer.array[i], 10)); j = i; while (j > 0 && comparator.compare_1((checkCriticalElementIndex(j - 1, layer.array.length) , castTo(layer.array[j - 1], 10)), temp) > 0) { $set_1(layer, j, (checkCriticalElementIndex(j - 1, layer.array.length) , castTo(layer.array[j - 1], 10))); --j; } checkCriticalElementIndex(j, layer.array.length); layer.array[j] = temp; } barycenterHeuristic.biggerThan = new HashMap; barycenterHeuristic.smallerThan = new HashMap; } defineClass(669, 832, {669:1, 230:1}, ModelOrderBarycenterHeuristic); _.minimizeCrossings_0 = function minimizeCrossings_2(layer, preOrdered, randomize, forward_0){ if (randomize) { $randomizeBarycenters(this, layer); } else { $calculateBarycenters(this, layer, forward_0); $fillInUnknownBarycenters(this, layer, preOrdered); } if (layer.array.length > 1) { $booleanValue(castToBoolean($getProperty($getGraph((checkCriticalElementIndex(0, layer.array.length) , castTo(layer.array[0], 10))), ($clinit_LayeredOptions() , CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER_0))))?insertionSort_0(layer, this.barycenterStateComparator, this):($clinit_Collections() , $sort(layer, this.barycenterStateComparator)); $booleanValue(castToBoolean($getProperty($getGraph((checkCriticalElementIndex(0, layer.array.length) , castTo(layer.array[0], 10))), CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER_0))) || $processConstraints(this.constraintResolver, layer); } } ; var Lorg_eclipse_elk_alg_layered_p3order_ModelOrderBarycenterHeuristic_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'ModelOrderBarycenterHeuristic', 669); function ModelOrderBarycenterHeuristic$lambda$0$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1866, 1, $intern_88, ModelOrderBarycenterHeuristic$lambda$0$Type); _.compare_1 = function compare_72(arg0, arg1){ return $lambda$0_8(this.$$outer_0, castTo(arg0, 10), castTo(arg1, 10)); } ; _.equals_0 = function equals_155(other){ return this === other; } ; _.reversed = function reversed_64(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_p3order_ModelOrderBarycenterHeuristic$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'ModelOrderBarycenterHeuristic/lambda$0$Type', 1866); function $clinit_NoCrossingMinimizer(){ $clinit_NoCrossingMinimizer = emptyMethod; INTERMEDIATE_PROCESSING_CONFIGURATION_5 = $add_17($after($addBefore($addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P3_NODE_ORDERING), ($clinit_IntermediateProcessorStrategy() , LONG_EDGE_SPLITTER)), P4_NODE_PLACEMENT, IN_LAYER_CONSTRAINT_PROCESSOR), P5_EDGE_ROUTING), LONG_EDGE_JOINER); } function $process_72(progressMonitor){ progressMonitor.begin('No crossing minimization', 1); progressMonitor.done_1(); } function NoCrossingMinimizer(){ $clinit_NoCrossingMinimizer(); } defineClass(1423, 1, $intern_113, NoCrossingMinimizer); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_14(graph){ var configuration; return castTo(graph, 36) , configuration = createFrom_0(INTERMEDIATE_PROCESSING_CONFIGURATION_5) , $addBefore(configuration, ($clinit_LayeredPhases() , P3_NODE_ORDERING), ($clinit_IntermediateProcessorStrategy() , PORT_LIST_SORTER)) , configuration; } ; _.process = function process_69(graph, progressMonitor){ $process_72((castTo(graph, 36) , progressMonitor)); } ; var INTERMEDIATE_PROCESSING_CONFIGURATION_5; var Lorg_eclipse_elk_alg_layered_p3order_NoCrossingMinimizer_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'NoCrossingMinimizer', 1423); function NodeRelativePortDistributor(numLayers){ AbstractBarycenterPortDistributor.call(this, numLayers); } defineClass(809, 413, $intern_114, NodeRelativePortDistributor); _.calculatePortRanks = function calculatePortRanks_0(node, rankSum, type_0){ var incr, inputCount, northInputCount, northPos, outputCount, port, port$iterator, port$iterator0, portRanks, pos, restPos; portRanks = this.portRanks; switch (type_0.ordinal) { case 1: { inputCount = 0; northInputCount = 0; for (port$iterator0 = new ArrayList$1(node.ports); port$iterator0.i < port$iterator0.this$01.array.length;) { port = castTo($next_6(port$iterator0), 12); if (port.incomingEdges.array.length != 0) { ++inputCount; port.side == ($clinit_PortSide() , NORTH_3) && ++northInputCount; } } incr = 1 / (inputCount + 1); northPos = rankSum + northInputCount * incr; restPos = rankSum + 1 - incr; for (port$iterator = $getPorts(node, ($clinit_PortType() , INPUT)).iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); if (port.side == ($clinit_PortSide() , NORTH_3)) { portRanks[port.id_0] = northPos; northPos -= incr; } else { portRanks[port.id_0] = restPos; restPos -= incr; } } break; } case 2: { outputCount = 0; for (port$iterator0 = new ArrayList$1(node.ports); port$iterator0.i < port$iterator0.this$01.array.length;) { port = castTo($next_6(port$iterator0), 12); port.outgoingEdges.array.length == 0 || ++outputCount; } incr = 1 / (outputCount + 1); pos = rankSum + incr; for (port$iterator = $getPorts(node, ($clinit_PortType() , OUTPUT)).iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); portRanks[port.id_0] = pos; pos += incr; } break; } default:throw toJs(new IllegalArgumentException_0('Port type is undefined')); } return 1; } ; var Lorg_eclipse_elk_alg_layered_p3order_NodeRelativePortDistributor_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'NodeRelativePortDistributor', 809); function $assertCorrectPortSides(dummy){ var anchorY, dummyPort, dummyPorts, origin_0, port, port$iterator, portHeight; origin_0 = castTo($getProperty(dummy, ($clinit_InternalProperties_1() , IN_LAYER_LAYOUT_UNIT)), 10); dummyPorts = dummy.ports; dummyPort = (checkCriticalElementIndex(0, dummyPorts.array.length) , castTo(dummyPorts.array[0], 12)); for (port$iterator = new ArrayList$1(origin_0.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); if (maskUndefined(port) === maskUndefined($getProperty(dummyPort, ORIGIN_0))) { if (port.side == ($clinit_PortSide() , NORTH_3) && dummy.id_0 > origin_0.id_0) { $setSide(port, SOUTH_2); if (port.explicitlySuppliedPortAnchor) { portHeight = port.size_0.y_0; anchorY = port.anchor.y_0; port.anchor.y_0 = portHeight - anchorY; } } else if (port.side == SOUTH_2 && origin_0.id_0 > dummy.id_0) { $setSide(port, NORTH_3); if (port.explicitlySuppliedPortAnchor) { portHeight = port.size_0.y_0; anchorY = port.anchor.y_0; port.anchor.y_0 = -(portHeight - anchorY); } } break; } } return origin_0; } function $deepCopy(currentlyBestNodeOrder){ var i, result; if (currentlyBestNodeOrder == null) { return null; } result = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LNode_2_classLit, $intern_16, 199, currentlyBestNodeOrder.length, 0, 2); for (i = 0; i < result.length; i++) { result[i] = castTo(copyOf_0(currentlyBestNodeOrder[i], currentlyBestNodeOrder[i].length), 199); } return result; } function $transferNodeAndPortOrdersToGraph_0(this$static, lGraph){ var dummy, dummy$iterator, i, j, layers, node, node$iterator, nodes, northSouthPortDummies, origin_0, updatePortOrder; northSouthPortDummies = new ArrayList; updatePortOrder = new HashSet; layers = lGraph.layers; for (i = 0; i < layers.array.length; i++) { nodes = (checkCriticalElementIndex(i, layers.array.length) , castTo(layers.array[i], 30)).nodes; northSouthPortDummies.array.length = 0; for (j = 0; j < nodes.array.length; j++) { node = this$static.nodeOrder[i][j]; node.id_0 = j; node.type_0 == ($clinit_LNode$NodeType() , NORTH_SOUTH_PORT) && (push_1(northSouthPortDummies.array, node) , true); $set_1(castTo($get_11(lGraph.layers, i), 30).nodes, j, node); node.ports.array.length = 0; $addAll_2(node.ports, castTo(castTo($get_11(this$static.portOrders, i), 15).get_0(j), 16)); $isOrderFixed(castTo($getProperty(node, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101)) || $setProperty_0(node, PORT_CONSTRAINTS_0, ($clinit_PortConstraints() , FIXED_ORDER)); } for (dummy$iterator = new ArrayList$1(northSouthPortDummies); dummy$iterator.i < dummy$iterator.this$01.array.length;) { dummy = castTo($next_6(dummy$iterator), 10); origin_0 = $assertCorrectPortSides(dummy); updatePortOrder.map_0.put(origin_0, updatePortOrder); updatePortOrder.map_0.put(dummy, updatePortOrder); } } for (node$iterator = updatePortOrder.map_0.keySet_0().iterator_0(); node$iterator.hasNext_0();) { node = castTo(node$iterator.next_1(), 10); $clinit_Collections(); $sort(node.ports, ($clinit_PortListSorter() , CMP_COMBINED)); node.portSidesCached = true; $findPortIndices(node); } } function SweepCopy(sc){ this.nodeOrder = $deepCopy(sc.nodeOrder); this.portOrders = new ArrayList_1(sc.portOrders); } function SweepCopy_0(nodeOrderIn){ var lNodes, lNodes$array, lNodes$index, lNodes$max, layer, node, node$array, node$index, node$max; this.nodeOrder = $deepCopy(nodeOrderIn); this.portOrders = new ArrayList; for (lNodes$array = nodeOrderIn , lNodes$index = 0 , lNodes$max = lNodes$array.length; lNodes$index < lNodes$max; ++lNodes$index) { lNodes = lNodes$array[lNodes$index]; layer = new ArrayList; $add_3(this.portOrders, layer); for (node$array = lNodes , node$index = 0 , node$max = node$array.length; node$index < node$max; ++node$index) { node = node$array[node$index]; $add_3(layer, new ArrayList_1(node.ports)); } } } defineClass(822, 1, {}, SweepCopy, SweepCopy_0); var Lorg_eclipse_elk_alg_layered_p3order_SweepCopy_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order', 'SweepCopy', 822); function $countAllCrossings(this$static, currentOrder){ var crossings, layerIndex; if (currentOrder.length == 0) { return 0; } crossings = $countInLayerCrossingsOnSide(this$static.crossingCounter, currentOrder[0], ($clinit_PortSide() , WEST_2)); crossings += $countInLayerCrossingsOnSide(this$static.crossingCounter, currentOrder[currentOrder.length - 1], EAST_2); for (layerIndex = 0; layerIndex < currentOrder.length; layerIndex++) { crossings += $countCrossingsAt(this$static, layerIndex, currentOrder); } return crossings; } function $countCrossingsAt(this$static, layerIndex, currentOrder){ var leftLayer, rightLayer, totalCrossings; totalCrossings = 0; leftLayer = currentOrder[layerIndex]; if (layerIndex < currentOrder.length - 1) { rightLayer = currentOrder[layerIndex + 1]; if (this$static.hasHyperEdgesEastOfIndex[layerIndex]) { totalCrossings = $countCrossings_1(this$static.hyperedgeCrossingsCounter, leftLayer, rightLayer); totalCrossings += $countInLayerCrossingsOnSide(this$static.crossingCounter, leftLayer, ($clinit_PortSide() , EAST_2)); totalCrossings += $countInLayerCrossingsOnSide(this$static.crossingCounter, rightLayer, WEST_2); } else { totalCrossings = $countCrossingsBetweenLayers(this$static.crossingCounter, leftLayer, rightLayer); } } this$static.hasNorthSouthPorts[layerIndex] && (totalCrossings += $countNorthSouthPortCrossingsInLayer(this$static.crossingCounter, leftLayer)); return totalCrossings; } function AllCrossingsCounter(graph){ this.inLayerEdgeCounts = initUnidimensionalArray(I_classLit, $intern_49, 28, graph.length, 15, 1); this.hasNorthSouthPorts = initUnidimensionalArray(Z_classLit, $intern_91, 28, graph.length, 16, 1); this.hasHyperEdgesEastOfIndex = initUnidimensionalArray(Z_classLit, $intern_91, 28, graph.length, 16, 1); this.nPorts = 0; } defineClass(1861, 1, $intern_111, AllCrossingsCounter); _.initAtLayerLevel = function initAtLayerLevel_6(l, nodeOrder){ } ; _.initAfterTraversal = function initAfterTraversal_6(){ var portPos; portPos = initUnidimensionalArray(I_classLit, $intern_49, 28, this.nPorts, 15, 1); this.hyperedgeCrossingsCounter = new HyperedgeCrossingsCounter(portPos); this.crossingCounter = new CrossingsCounter(portPos); } ; _.initAtEdgeLevel = function initAtEdgeLevel_6(l, n, p, e, edge, nodeOrder){ var port; port = castTo($get_11(nodeOrder[l][n].ports, p), 12); edge.source == port && edge.source.owner.layer == edge.target.owner.layer && ++this.inLayerEdgeCounts[l]; } ; _.initAtNodeLevel = function initAtNodeLevel_6(l, n, nodeOrder){ var node; node = nodeOrder[l][n]; this.hasNorthSouthPorts[l] = this.hasNorthSouthPorts[l] | node.type_0 == ($clinit_LNode$NodeType() , NORTH_SOUTH_PORT); } ; _.initAtPortLevel = function initAtPortLevel_6(l, n, p, nodeOrder){ var port; port = castTo($get_11(nodeOrder[l][n].ports, p), 12); port.id_0 = this.nPorts++; port.outgoingEdges.array.length + port.incomingEdges.array.length > 1 && (port.side == ($clinit_PortSide() , EAST_2)?(this.hasHyperEdgesEastOfIndex[l] = true):port.side == WEST_2 && l > 0 && (this.hasHyperEdgesEastOfIndex[l - 1] = true)); } ; _.nPorts = 0; var Lorg_eclipse_elk_alg_layered_p3order_counting_AllCrossingsCounter_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order.counting', 'AllCrossingsCounter', 1861); function $add_16(this$static, index_0){ var i; ++this$static.size_0; ++this$static.numsPerIndex[index_0]; i = index_0 + 1; while (i < this$static.binarySums.length) { ++this$static.binarySums[i]; i += i & -i; } } function $clear_9(this$static){ this$static.binarySums = initUnidimensionalArray(I_classLit, $intern_49, 28, this$static.maxNum + 1, 15, 1); this$static.numsPerIndex = initUnidimensionalArray(I_classLit, $intern_49, 28, this$static.maxNum, 15, 1); this$static.size_0 = 0; } function $rank(this$static, index_0){ var i, sum; i = index_0; sum = 0; while (i > 0) { sum += this$static.binarySums[i]; i -= i & -i; } return sum; } function $removeAll_3(this$static, index_0){ var i, numEntries; numEntries = this$static.numsPerIndex[index_0]; if (numEntries == 0) { return; } this$static.numsPerIndex[index_0] = 0; this$static.size_0 -= numEntries; i = index_0 + 1; while (i < this$static.binarySums.length) { this$static.binarySums[i] -= numEntries; i += i & -i; } } function BinaryIndexedTree(maxNum){ this.maxNum = maxNum; this.binarySums = initUnidimensionalArray(I_classLit, $intern_49, 28, maxNum + 1, 15, 1); this.numsPerIndex = initUnidimensionalArray(I_classLit, $intern_49, 28, maxNum, 15, 1); this.size_0 = 0; } defineClass(595, 1, {}, BinaryIndexedTree); _.maxNum = 0; _.size_0 = 0; var Lorg_eclipse_elk_alg_layered_p3order_counting_BinaryIndexedTree_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order.counting', 'BinaryIndexedTree', 595); function inNorthSouthEastWestOrder(node, side){ switch (side.ordinal) { case 2: case 1: return $getPortSideView(node, side); case 3: case 4: return reverse_0($getPortSideView(node, side)); } return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } function $clinit_CrossingsCounter(){ $clinit_CrossingsCounter = emptyMethod; INDEXING_SIDE = ($clinit_PortSide() , WEST_2); STACK_SIDE = EAST_2; } function $connectedInLayerPortsSortedByPosition(this$static, upperNode, lowerNode, side){ var edge, edge$iterator, node, node$array, node$index, node$max, port, port$iterator, ports; ports = new TreeSet_0(new CrossingsCounter$lambda$2$Type(this$static)); for (node$array = stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_graph_LNode_2_classLit, 1), $intern_107, 10, 0, [upperNode, lowerNode]) , node$index = 0 , node$max = node$array.length; node$index < node$max; ++node$index) { node = node$array[node$index]; for (port$iterator = inNorthSouthEastWestOrder(node, side).iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); for (edge$iterator = new LPort$CombineIter$1(port.connectedEdges); $hasNext_3(edge$iterator.firstIterator) || $hasNext_3(edge$iterator.secondIterator);) { edge = castTo($hasNext_3(edge$iterator.firstIterator)?$next_6(edge$iterator.firstIterator):$next_6(edge$iterator.secondIterator), 18); if (!$isSelfLoop(edge)) { ports.map_0.put(port, ($clinit_Boolean() , FALSE_0)) == null; $isInLayer(edge) && $add_10(ports, port == edge.source?edge.target:edge.source); } } } } return checkNotNull(ports) , new ArrayList_1(ports); } function $connectedPortsSortedByPosition(this$static, upperPort, lowerPort){ var edge, edge$iterator, port, port$array, port$index, port$max, ports; ports = new TreeSet_0(new CrossingsCounter$lambda$3$Type(this$static)); for (port$array = stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_graph_LPort_2_classLit, 1), $intern_108, 12, 0, [upperPort, lowerPort]) , port$index = 0 , port$max = port$array.length; port$index < port$max; ++port$index) { port = port$array[port$index]; ports.map_0.put(port, ($clinit_Boolean() , FALSE_0)) == null; for (edge$iterator = new LPort$CombineIter$1(port.connectedEdges); $hasNext_3(edge$iterator.firstIterator) || $hasNext_3(edge$iterator.secondIterator);) { edge = castTo($hasNext_3(edge$iterator.firstIterator)?$next_6(edge$iterator.firstIterator):$next_6(edge$iterator.secondIterator), 18); edge.source == edge.target || $add_10(ports, port == edge.source?edge.target:edge.source); } } return checkNotNull(ports) , new ArrayList_1(ports); } function $countCrossingsBetweenLayers(this$static, leftLayerNodes, rightLayerNodes){ var ports; ports = $initPortPositionsCounterClockwise(this$static, leftLayerNodes, rightLayerNodes); this$static.indexTree = new BinaryIndexedTree(ports.array.length); return $countCrossingsOnPorts(this$static, ports); } function $countCrossingsBetweenPortsInBothOrders(this$static, upperPort, lowerPort){ var lowerUpperCrossings, ports, upperLowerCrossings; ports = $connectedPortsSortedByPosition(this$static, upperPort, lowerPort); upperLowerCrossings = $countCrossingsOnPorts(this$static, ports); $clear_9(this$static.indexTree); $switchPorts(this$static, upperPort, lowerPort); $clinit_Collections(); $sort(ports, new CrossingsCounter$lambda$0$Type(this$static)); lowerUpperCrossings = $countCrossingsOnPorts(this$static, ports); $clear_9(this$static.indexTree); $switchPorts(this$static, lowerPort, upperPort); return new Pair(valueOf_3(upperLowerCrossings), valueOf_3(lowerUpperCrossings)); } function $countCrossingsOnPorts(this$static, ports){ var crossings, edge, edge$iterator, endPosition, port, port$iterator; crossings = 0; for (port$iterator = new ArrayList$1(ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); $removeAll_3(this$static.indexTree, this$static.portPositions[port.id_0]); for (edge$iterator = new LPort$CombineIter$1(port.connectedEdges); $hasNext_3(edge$iterator.firstIterator) || $hasNext_3(edge$iterator.secondIterator);) { edge = castTo($hasNext_3(edge$iterator.firstIterator)?$next_6(edge$iterator.firstIterator):$next_6(edge$iterator.secondIterator), 18); endPosition = $positionOf_0(this$static, port == edge.source?edge.target:edge.source); if (endPosition > this$static.portPositions[port.id_0]) { crossings += $rank(this$static.indexTree, endPosition); $addFirst(this$static.ends, valueOf_3(endPosition)); } } while (!$isEmpty(this$static.ends)) { $add_16(this$static.indexTree, castTo($removeFirst(this$static.ends), 17).value_0); } } return crossings; } function $countInLayerCrossingsBetweenNodesInBothOrders(this$static, upperNode, lowerNode, side){ var lowerUpperCrossings, ports, upperLowerCrossings; ports = $connectedInLayerPortsSortedByPosition(this$static, upperNode, lowerNode, side); upperLowerCrossings = $countInLayerCrossingsOnPorts(this$static, ports); $switchNodes(this$static, upperNode, lowerNode, side); $clear_9(this$static.indexTree); $clinit_Collections(); $sort(ports, new CrossingsCounter$lambda$1$Type(this$static)); lowerUpperCrossings = $countInLayerCrossingsOnPorts(this$static, ports); $switchNodes(this$static, lowerNode, upperNode, side); $clear_9(this$static.indexTree); return new Pair(valueOf_3(upperLowerCrossings), valueOf_3(lowerUpperCrossings)); } function $countInLayerCrossingsOnPorts(this$static, ports){ var crossings, edge, edge$iterator, endPosition, numBetweenLayerEdges, port, port$iterator; crossings = 0; for (port$iterator = new ArrayList$1(ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); $removeAll_3(this$static.indexTree, this$static.portPositions[port.id_0]); numBetweenLayerEdges = 0; for (edge$iterator = new LPort$CombineIter$1(port.connectedEdges); $hasNext_3(edge$iterator.firstIterator) || $hasNext_3(edge$iterator.secondIterator);) { edge = castTo($hasNext_3(edge$iterator.firstIterator)?$next_6(edge$iterator.firstIterator):$next_6(edge$iterator.secondIterator), 18); if ($isInLayer(edge)) { endPosition = $positionOf_0(this$static, port == edge.source?edge.target:edge.source); if (endPosition > this$static.portPositions[port.id_0]) { crossings += $rank(this$static.indexTree, endPosition); $addFirst(this$static.ends, valueOf_3(endPosition)); } } else { ++numBetweenLayerEdges; } } crossings += this$static.indexTree.size_0 * numBetweenLayerEdges; while (!$isEmpty(this$static.ends)) { $add_16(this$static.indexTree, castTo($removeFirst(this$static.ends), 17).value_0); } } return crossings; } function $countInLayerCrossingsOnSide(this$static, nodes, side){ var ports; ports = $initPortPositionsForInLayerCrossings(this$static, nodes, side); return $countInLayerCrossingsOnPorts(this$static, ports); } function $countNorthSouthCrossingsOnPorts(this$static, ports){ var crossings, dummy, dummyPort, endPosition, port, port$iterator, targetAndDegree, targetAndDegree$iterator, targetsAndDegrees; crossings = 0; targetsAndDegrees = new ArrayList; for (port$iterator = new ArrayList$1(ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); $removeAll_3(this$static.indexTree, this$static.portPositions[port.id_0]); targetsAndDegrees.array.length = 0; switch (port.owner.type_0.ordinal) { case 0: dummy = castTo($getProperty(port, ($clinit_InternalProperties_1() , PORT_DUMMY)), 10); $forEach_1(dummy.ports, new CrossingsCounter$lambda$4$Type(targetsAndDegrees)); break; case 1: $ifPresent($findFirst($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(port.owner.ports, 16)), new CrossingsCounter$lambda$5$Type(port))), new CrossingsCounter$lambda$6$Type(targetsAndDegrees)); break; case 3: dummyPort = castTo($getProperty(port, ($clinit_InternalProperties_1() , ORIGIN_0)), 12); $add_3(targetsAndDegrees, new Pair(dummyPort, valueOf_3(port.incomingEdges.array.length + port.outgoingEdges.array.length))); } for (targetAndDegree$iterator = new ArrayList$1(targetsAndDegrees); targetAndDegree$iterator.i < targetAndDegree$iterator.this$01.array.length;) { targetAndDegree = castTo($next_6(targetAndDegree$iterator), 42); endPosition = $positionOf_0(this$static, castTo(targetAndDegree.first, 12)); if (endPosition > this$static.portPositions[port.id_0]) { crossings += $rank(this$static.indexTree, endPosition) * castTo(targetAndDegree.second, 17).value_0; $addFirst(this$static.ends, valueOf_3(endPosition)); } } while (!$isEmpty(this$static.ends)) { $add_16(this$static.indexTree, castTo($removeFirst(this$static.ends), 17).value_0); } } return crossings; } function $countNorthSouthPortCrossingsInLayer(this$static, layer){ var ports; ports = $initPositionsForNorthSouthCounting(this$static, layer); this$static.indexTree = new BinaryIndexedTree(ports.array.length); return $countNorthSouthCrossingsOnPorts(this$static, ports); } function $emptyStack(this$static, stack_0, ports, side, startIndex){ var dummy, index_0, p; index_0 = startIndex; while (stack_0.head != stack_0.tail) { dummy = castTo($removeFirst(stack_0), 10); p = castTo($getPortSideView(dummy, side).get_0(0), 12); this$static.portPositions[p.id_0] = index_0++; push_1(ports.array, p); } return index_0; } function $initForCountingBetween(this$static, leftLayerNodes, rightLayerNodes){ var ports; ports = $initPortPositionsCounterClockwise(this$static, leftLayerNodes, rightLayerNodes); this$static.indexTree = new BinaryIndexedTree(ports.array.length); } function $initPortPositionsCounterClockwise(this$static, leftLayerNodes, rightLayerNodes){ var ports; ports = new ArrayList; $initPositions(this$static, leftLayerNodes, ports, ($clinit_PortSide() , EAST_2), true, false); $initPositions(this$static, rightLayerNodes, ports, WEST_2, false, false); return ports; } function $initPortPositionsForInLayerCrossings(this$static, nodes, side){ var ports; ports = new ArrayList; $initPositions(this$static, nodes, ports, side, true, true); this$static.indexTree = new BinaryIndexedTree(ports.array.length); return ports; } function $initPositions(this$static, nodes, ports, side, topDown, getCardinalities){ var i, node, nodePorts, numPorts, port, port$iterator; numPorts = ports.array.length; getCardinalities && (this$static.nodeCardinalities = initUnidimensionalArray(I_classLit, $intern_49, 28, nodes.length, 15, 1)); for (i = topDown?0:nodes.length - 1; topDown?i < nodes.length:i >= 0; i += topDown?1:-1) { node = nodes[i]; nodePorts = side == ($clinit_PortSide() , EAST_2)?topDown?$getPortSideView(node, side):reverse_0($getPortSideView(node, side)):topDown?reverse_0($getPortSideView(node, side)):$getPortSideView(node, side); getCardinalities && (this$static.nodeCardinalities[node.id_0] = nodePorts.size_1()); for (port$iterator = nodePorts.iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); this$static.portPositions[port.id_0] = numPorts++; } $addAll_2(ports, nodePorts); } } function $initPositionsForNorthSouthCounting(this$static, nodes){ var current, i, index_0, lastLayoutUnit, p, p$iterator, p$iterator0, p$iterator1, ports, stack_0; ports = new ArrayList; stack_0 = new ArrayDeque; lastLayoutUnit = null; index_0 = 0; for (i = 0; i < nodes.length; ++i) { current = nodes[i]; $isLayoutUnitChanged(lastLayoutUnit, current) && (index_0 = $emptyStack(this$static, stack_0, ports, STACK_SIDE, index_0)); $hasProperty(current, ($clinit_InternalProperties_1() , IN_LAYER_LAYOUT_UNIT)) && (lastLayoutUnit = castTo($getProperty(current, IN_LAYER_LAYOUT_UNIT), 10)); switch (current.type_0.ordinal) { case 0: for (p$iterator0 = $iterator_0(filter_0($getPortSideView(current, ($clinit_PortSide() , NORTH_3)), new CrossingsCounter$lambda$8$Type)); $hasNext(p$iterator0);) { p = castTo($next(p$iterator0), 12); this$static.portPositions[p.id_0] = index_0++; push_1(ports.array, p); } index_0 = $emptyStack(this$static, stack_0, ports, STACK_SIDE, index_0); for (p$iterator1 = $iterator_0(filter_0($getPortSideView(current, SOUTH_2), new CrossingsCounter$lambda$8$Type)); $hasNext(p$iterator1);) { p = castTo($next(p$iterator1), 12); this$static.portPositions[p.id_0] = index_0++; push_1(ports.array, p); } break; case 3: if (!$getPortSideView(current, INDEXING_SIDE).isEmpty()) { p = castTo($getPortSideView(current, INDEXING_SIDE).get_0(0), 12); this$static.portPositions[p.id_0] = index_0++; push_1(ports.array, p); } $getPortSideView(current, STACK_SIDE).isEmpty() || $addFirst(stack_0, current); break; case 1: for (p$iterator = $getPortSideView(current, ($clinit_PortSide() , WEST_2)).iterator_0(); p$iterator.hasNext_0();) { p = castTo(p$iterator.next_1(), 12); this$static.portPositions[p.id_0] = index_0++; push_1(ports.array, p); } $getPortSideView(current, EAST_2).forEach_0(new CrossingsCounter$lambda$7$Type(stack_0, current)); } } $emptyStack(this$static, stack_0, ports, STACK_SIDE, index_0); return ports; } function $isInLayer(edge){ var sourceLayer, targetLayer; sourceLayer = edge.source.owner.layer; targetLayer = edge.target.owner.layer; return sourceLayer == targetLayer; } function $isLayoutUnitChanged(lastUnit, node){ var unit; if (!lastUnit || lastUnit == node || !$hasProperty(node, ($clinit_InternalProperties_1() , IN_LAYER_LAYOUT_UNIT))) { return false; } unit = castTo($getProperty(node, ($clinit_InternalProperties_1() , IN_LAYER_LAYOUT_UNIT)), 10); return unit != lastUnit; } function $lambda$0_9(this$static, a_0, b_1){ return compare_5(this$static.portPositions[a_0.id_0], this$static.portPositions[b_1.id_0]); } function $lambda$1_4(this$static, a_0, b_1){ return compare_5(this$static.portPositions[a_0.id_0], this$static.portPositions[b_1.id_0]); } function $lambda$2_2(this$static, a_0, b_1){ return compare_5(this$static.portPositions[a_0.id_0], this$static.portPositions[b_1.id_0]); } function $lambda$3_1(this$static, a_0, b_1){ return compare_5(this$static.portPositions[a_0.id_0], this$static.portPositions[b_1.id_0]); } function $positionOf_0(this$static, port){ return this$static.portPositions[port.id_0]; } function $switchNodes(this$static, wasUpperNode, wasLowerNode, side){ var port, port$iterator, port$iterator0, ports; ports = inNorthSouthEastWestOrder(wasUpperNode, side); for (port$iterator0 = ports.iterator_0(); port$iterator0.hasNext_0();) { port = castTo(port$iterator0.next_1(), 12); this$static.portPositions[port.id_0] = this$static.portPositions[port.id_0] + this$static.nodeCardinalities[wasLowerNode.id_0]; } ports = inNorthSouthEastWestOrder(wasLowerNode, side); for (port$iterator = ports.iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); this$static.portPositions[port.id_0] = this$static.portPositions[port.id_0] - this$static.nodeCardinalities[wasUpperNode.id_0]; } } function $switchPorts(this$static, topPort, bottomPort){ var topPortPos; topPortPos = this$static.portPositions[topPort.id_0]; this$static.portPositions[topPort.id_0] = this$static.portPositions[bottomPort.id_0]; this$static.portPositions[bottomPort.id_0] = topPortPos; } function CrossingsCounter(portPositions){ $clinit_CrossingsCounter(); this.portPositions = portPositions; this.ends = new ArrayDeque; } function lambda$4_7(targetsAndDegrees_0, p_1){ $clinit_CrossingsCounter(); return $add_3(targetsAndDegrees_0, new Pair(p_1, valueOf_3(p_1.incomingEdges.array.length + p_1.outgoingEdges.array.length))); } function lambda$5_4(port_0, p_1){ $clinit_CrossingsCounter(); return p_1 != port_0; } function lambda$6_1(targetsAndDegrees_0, p_1){ $clinit_CrossingsCounter(); return $add_3(targetsAndDegrees_0, new Pair(p_1, valueOf_3(p_1.incomingEdges.array.length + p_1.outgoingEdges.array.length))); } defineClass(532, 1, {}, CrossingsCounter); var INDEXING_SIDE, STACK_SIDE; var Lorg_eclipse_elk_alg_layered_p3order_counting_CrossingsCounter_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order.counting', 'CrossingsCounter', 532); function CrossingsCounter$lambda$0$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1950, 1, $intern_88, CrossingsCounter$lambda$0$Type); _.compare_1 = function compare_73(arg0, arg1){ return $lambda$0_9(this.$$outer_0, castTo(arg0, 12), castTo(arg1, 12)); } ; _.equals_0 = function equals_156(other){ return this === other; } ; _.reversed = function reversed_65(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_p3order_counting_CrossingsCounter$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order.counting', 'CrossingsCounter/lambda$0$Type', 1950); function CrossingsCounter$lambda$1$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1951, 1, $intern_88, CrossingsCounter$lambda$1$Type); _.compare_1 = function compare_74(arg0, arg1){ return $lambda$1_4(this.$$outer_0, castTo(arg0, 12), castTo(arg1, 12)); } ; _.equals_0 = function equals_157(other){ return this === other; } ; _.reversed = function reversed_66(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_p3order_counting_CrossingsCounter$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order.counting', 'CrossingsCounter/lambda$1$Type', 1951); function CrossingsCounter$lambda$2$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1952, 1, $intern_88, CrossingsCounter$lambda$2$Type); _.compare_1 = function compare_75(arg0, arg1){ return $lambda$2_2(this.$$outer_0, castTo(arg0, 12), castTo(arg1, 12)); } ; _.equals_0 = function equals_158(other){ return this === other; } ; _.reversed = function reversed_67(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_p3order_counting_CrossingsCounter$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order.counting', 'CrossingsCounter/lambda$2$Type', 1952); function CrossingsCounter$lambda$3$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1953, 1, $intern_88, CrossingsCounter$lambda$3$Type); _.compare_1 = function compare_76(arg0, arg1){ return $lambda$3_1(this.$$outer_0, castTo(arg0, 12), castTo(arg1, 12)); } ; _.equals_0 = function equals_159(other){ return this === other; } ; _.reversed = function reversed_68(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_p3order_counting_CrossingsCounter$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order.counting', 'CrossingsCounter/lambda$3$Type', 1953); function CrossingsCounter$lambda$4$Type(targetsAndDegrees_0){ this.targetsAndDegrees_0 = targetsAndDegrees_0; } defineClass(1954, 1, $intern_19, CrossingsCounter$lambda$4$Type); _.accept = function accept_120(arg0){ lambda$4_7(this.targetsAndDegrees_0, castTo(arg0, 12)); } ; var Lorg_eclipse_elk_alg_layered_p3order_counting_CrossingsCounter$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order.counting', 'CrossingsCounter/lambda$4$Type', 1954); function CrossingsCounter$lambda$5$Type(port_0){ this.port_0 = port_0; } defineClass(1955, 1, $intern_40, CrossingsCounter$lambda$5$Type); _.test_0 = function test_86(arg0){ return lambda$5_4(this.port_0, castTo(arg0, 12)); } ; var Lorg_eclipse_elk_alg_layered_p3order_counting_CrossingsCounter$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order.counting', 'CrossingsCounter/lambda$5$Type', 1955); function $accept_4(this$static, arg0){ lambda$6_1(this$static.targetsAndDegrees_0, castTo(arg0, 12)); } function CrossingsCounter$lambda$6$Type(targetsAndDegrees_0){ this.targetsAndDegrees_0 = targetsAndDegrees_0; } defineClass(1956, 1, $intern_19, CrossingsCounter$lambda$6$Type); _.accept = function accept_121(arg0){ $accept_4(this, arg0); } ; var Lorg_eclipse_elk_alg_layered_p3order_counting_CrossingsCounter$lambda$6$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order.counting', 'CrossingsCounter/lambda$6$Type', 1956); function CrossingsCounter$lambda$7$Type(stack_0, current_1){ this.stack_0 = stack_0; this.current_1 = current_1; } defineClass(1957, 1, $intern_19, CrossingsCounter$lambda$7$Type); _.accept = function accept_122(arg0){ var lastArg; $clinit_CrossingsCounter(); $addFirst(this.stack_0, (lastArg = this.current_1 , castTo(arg0, 12) , lastArg)); } ; var Lorg_eclipse_elk_alg_layered_p3order_counting_CrossingsCounter$lambda$7$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order.counting', 'CrossingsCounter/lambda$7$Type', 1957); function CrossingsCounter$lambda$8$Type(){ } defineClass(839, 1, $intern_89, CrossingsCounter$lambda$8$Type); _.apply_1 = function apply_135(arg0){ return $clinit_CrossingsCounter() , $hasProperty(castTo(arg0, 12), ($clinit_InternalProperties_1() , PORT_DUMMY)); } ; _.equals_0 = function equals_160(other){ return this === other; } ; _.test_0 = function test_87(input_0){ return $clinit_CrossingsCounter() , $hasProperty(castTo(input_0, 12), ($clinit_InternalProperties_1() , PORT_DUMMY)); } ; var Lorg_eclipse_elk_alg_layered_p3order_counting_CrossingsCounter$lambda$8$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order.counting', 'CrossingsCounter/lambda$8$Type', 839); function $countCrossings_1(this$static, leftLayer, rightLayer){ var compressDeltas, crossings, delta, edge, edge$iterator, firstIndex, he, he$array, he$index, he$max, hyperedge, hyperedgeSet, hyperedges, i, i0, i1, i2, i3, i4, i5, index_0, k, leftCorners, leftLayerRef, node, node$array, node$array0, node$array1, node$index, node$index0, node$index1, node$max, node$max0, node$max1, northInputPorts, openHyperedges, otherInputPorts, p, p$iterator, port, port$iterator, port2HyperedgeMap, portEdges, portIter, pos, q, rightCorners, rightLayerRef, sourceCount, sourceHE, sourcePort, sourcePort$iterator, southSequence, targetCount, targetHE, targetPort, tree, treeSize; sourceCount = 0; for (node$array0 = leftLayer , node$index0 = 0 , node$max0 = node$array0.length; node$index0 < node$max0; ++node$index0) { node = node$array0[node$index0]; for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); portEdges = 0; for (edge$iterator = new ArrayList$1(port.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); node.layer != edge.target.owner.layer && ++portEdges; } portEdges > 0 && (this$static.portPos[port.id_0] = sourceCount++); } } targetCount = 0; for (node$array1 = rightLayer , node$index1 = 0 , node$max1 = node$array1.length; node$index1 < node$max1; ++node$index1) { node = node$array1[node$index1]; northInputPorts = 0; for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); if (port.side == ($clinit_PortSide() , NORTH_3)) { for (edge$iterator = new ArrayList$1(port.incomingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); if (node.layer != edge.source.owner.layer) { ++northInputPorts; break; } } } else { break; } } otherInputPorts = 0; portIter = new AbstractList$ListIteratorImpl(node.ports, node.ports.array.length); while (portIter.i > 0) { port = (checkCriticalElement(portIter.i > 0) , castTo(portIter.this$01.get_0(portIter.last = --portIter.i), 12)); portEdges = 0; for (edge$iterator = new ArrayList$1(port.incomingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); node.layer != edge.source.owner.layer && ++portEdges; } if (portEdges > 0) { if (port.side == ($clinit_PortSide() , NORTH_3)) { this$static.portPos[port.id_0] = targetCount; ++targetCount; } else { this$static.portPos[port.id_0] = targetCount + northInputPorts + otherInputPorts; ++otherInputPorts; } } } targetCount += otherInputPorts; } port2HyperedgeMap = new HashMap; hyperedgeSet = new LinkedHashSet; for (node$array = leftLayer , node$index = 0 , node$max = node$array.length; node$index < node$max; ++node$index) { node = node$array[node$index]; for (sourcePort$iterator = new ArrayList$1(node.ports); sourcePort$iterator.i < sourcePort$iterator.this$01.array.length;) { sourcePort = castTo($next_6(sourcePort$iterator), 12); for (edge$iterator = new ArrayList$1(sourcePort.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); targetPort = edge.target; if (node.layer != targetPort.owner.layer) { sourceHE = castTo(getEntryValueOrNull($getEntry_0(port2HyperedgeMap.hashCodeMap, sourcePort)), 478); targetHE = castTo(getEntryValueOrNull($getEntry_0(port2HyperedgeMap.hashCodeMap, targetPort)), 478); if (!sourceHE && !targetHE) { hyperedge = new HyperedgeCrossingsCounter$Hyperedge; hyperedgeSet.map_0.put(hyperedge, hyperedgeSet); $add_3(hyperedge.edges, edge); $add_3(hyperedge.ports, sourcePort); $put_9(port2HyperedgeMap.hashCodeMap, sourcePort, hyperedge); $add_3(hyperedge.ports, targetPort); $put_9(port2HyperedgeMap.hashCodeMap, targetPort, hyperedge); } else if (!sourceHE) { $add_3(targetHE.edges, edge); $add_3(targetHE.ports, sourcePort); $put_9(port2HyperedgeMap.hashCodeMap, sourcePort, targetHE); } else if (!targetHE) { $add_3(sourceHE.edges, edge); $add_3(sourceHE.ports, targetPort); $put_9(port2HyperedgeMap.hashCodeMap, targetPort, sourceHE); } else if (sourceHE == targetHE) { $add_3(sourceHE.edges, edge); } else { $add_3(sourceHE.edges, edge); for (p$iterator = new ArrayList$1(targetHE.ports); p$iterator.i < p$iterator.this$01.array.length;) { p = castTo($next_6(p$iterator), 12); $put_9(port2HyperedgeMap.hashCodeMap, p, sourceHE); } $addAll_2(sourceHE.edges, targetHE.edges); $addAll_2(sourceHE.ports, targetHE.ports); hyperedgeSet.map_0.remove_0(targetHE) != null; } } } } } hyperedges = castTo($toArray_0(hyperedgeSet, initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_p3order_counting_HyperedgeCrossingsCounter$Hyperedge_2_classLit, {3:1, 4:1, 5:1, 2045:1}, 478, hyperedgeSet.map_0.size_1(), 0, 1)), 2045); leftLayerRef = leftLayer[0].layer; rightLayerRef = rightLayer[0].layer; for (he$array = hyperedges , he$index = 0 , he$max = he$array.length; he$index < he$max; ++he$index) { he = he$array[he$index]; he.upperLeft = sourceCount; he.upperRight = targetCount; for (port$iterator = new ArrayList$1(he.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); pos = this$static.portPos[port.id_0]; if (port.owner.layer == leftLayerRef) { pos < he.upperLeft && (he.upperLeft = pos); pos > he.lowerLeft && (he.lowerLeft = pos); } else if (port.owner.layer == rightLayerRef) { pos < he.upperRight && (he.upperRight = pos); pos > he.lowerRight && (he.lowerRight = pos); } } } mergeSort(hyperedges, 0, hyperedges.length, null); southSequence = initUnidimensionalArray(I_classLit, $intern_49, 28, hyperedges.length, 15, 1); compressDeltas = initUnidimensionalArray(I_classLit, $intern_49, 28, targetCount + 1, 15, 1); for (i0 = 0; i0 < hyperedges.length; i0++) { southSequence[i0] = hyperedges[i0].upperRight; compressDeltas[southSequence[i0]] = 1; } delta = 0; for (i1 = 0; i1 < compressDeltas.length; i1++) { compressDeltas[i1] == 1?(compressDeltas[i1] = delta):--delta; } q = 0; for (i2 = 0; i2 < southSequence.length; i2++) { southSequence[i2] += compressDeltas[southSequence[i2]]; q = $wnd.Math.max(q, southSequence[i2] + 1); } firstIndex = 1; while (firstIndex < q) { firstIndex *= 2; } treeSize = 2 * firstIndex - 1; firstIndex -= 1; tree = initUnidimensionalArray(I_classLit, $intern_49, 28, treeSize, 15, 1); crossings = 0; for (k = 0; k < southSequence.length; k++) { index_0 = southSequence[k] + firstIndex; ++tree[index_0]; while (index_0 > 0) { index_0 % 2 > 0 && (crossings += tree[index_0 + 1]); index_0 = (index_0 - 1) / 2 | 0; ++tree[index_0]; } } leftCorners = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_p3order_counting_HyperedgeCrossingsCounter$HyperedgeCorner_2_classLit, $intern_2, 374, hyperedges.length * 2, 0, 1); for (i3 = 0; i3 < hyperedges.length; i3++) { leftCorners[2 * i3] = new HyperedgeCrossingsCounter$HyperedgeCorner(hyperedges[i3], hyperedges[i3].upperLeft, hyperedges[i3].lowerLeft, ($clinit_HyperedgeCrossingsCounter$HyperedgeCorner$Type() , UPPER)); leftCorners[2 * i3 + 1] = new HyperedgeCrossingsCounter$HyperedgeCorner(hyperedges[i3], hyperedges[i3].lowerLeft, hyperedges[i3].upperLeft, LOWER); } mergeSort(leftCorners, 0, leftCorners.length, null); openHyperedges = 0; for (i4 = 0; i4 < leftCorners.length; i4++) { switch (leftCorners[i4].type_0.ordinal) { case 0: ++openHyperedges; break; case 1: --openHyperedges; crossings += openHyperedges; } } rightCorners = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_p3order_counting_HyperedgeCrossingsCounter$HyperedgeCorner_2_classLit, $intern_2, 374, hyperedges.length * 2, 0, 1); for (i5 = 0; i5 < hyperedges.length; i5++) { rightCorners[2 * i5] = new HyperedgeCrossingsCounter$HyperedgeCorner(hyperedges[i5], hyperedges[i5].upperRight, hyperedges[i5].lowerRight, ($clinit_HyperedgeCrossingsCounter$HyperedgeCorner$Type() , UPPER)); rightCorners[2 * i5 + 1] = new HyperedgeCrossingsCounter$HyperedgeCorner(hyperedges[i5], hyperedges[i5].lowerRight, hyperedges[i5].upperRight, LOWER); } mergeSort(rightCorners, 0, rightCorners.length, null); openHyperedges = 0; for (i = 0; i < rightCorners.length; i++) { switch (rightCorners[i].type_0.ordinal) { case 0: ++openHyperedges; break; case 1: --openHyperedges; crossings += openHyperedges; } } return crossings; } function HyperedgeCrossingsCounter(portPos){ this.portPos = portPos; } defineClass(1949, 1, {}, HyperedgeCrossingsCounter); var Lorg_eclipse_elk_alg_layered_p3order_counting_HyperedgeCrossingsCounter_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order.counting', 'HyperedgeCrossingsCounter', 1949); function $compareTo_14(this$static, other){ if (this$static.upperLeft < other.upperLeft) { return -1; } else if (this$static.upperLeft > other.upperLeft) { return 1; } else if (this$static.upperRight < other.upperRight) { return -1; } else if (this$static.upperRight > other.upperRight) { return 1; } return hashCode__I__devirtual$(this$static) - hashCode__I__devirtual$(other); } function HyperedgeCrossingsCounter$Hyperedge(){ this.edges = new ArrayList; this.ports = new ArrayList; } defineClass(478, 1, {34:1, 478:1}, HyperedgeCrossingsCounter$Hyperedge); _.compareTo_0 = function compareTo_15(other){ return $compareTo_14(this, castTo(other, 478)); } ; _.lowerLeft = 0; _.lowerRight = 0; _.upperLeft = 0; _.upperRight = 0; var Lorg_eclipse_elk_alg_layered_p3order_counting_HyperedgeCrossingsCounter$Hyperedge_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order.counting', 'HyperedgeCrossingsCounter/Hyperedge', 478); function $compareTo_15(this$static, other){ if (this$static.position < other.position) { return -1; } else if (this$static.position > other.position) { return 1; } else if (this$static.oppositePosition < other.oppositePosition) { return -1; } else if (this$static.oppositePosition > other.oppositePosition) { return 1; } else if (this$static.hyperedge != other.hyperedge) { return hashCode__I__devirtual$(this$static.hyperedge) - hashCode__I__devirtual$(other.hyperedge); } else if (this$static.type_0 == ($clinit_HyperedgeCrossingsCounter$HyperedgeCorner$Type() , UPPER) && other.type_0 == LOWER) { return -1; } else if (this$static.type_0 == LOWER && other.type_0 == UPPER) { return 1; } return 0; } function HyperedgeCrossingsCounter$HyperedgeCorner(hyperedge, position, oppositePosition, type_0){ this.hyperedge = hyperedge; this.position = position; this.oppositePosition = oppositePosition; this.type_0 = type_0; } defineClass(374, 1, {34:1, 374:1}, HyperedgeCrossingsCounter$HyperedgeCorner); _.compareTo_0 = function compareTo_16(other){ return $compareTo_15(this, castTo(other, 374)); } ; _.oppositePosition = 0; _.position = 0; var Lorg_eclipse_elk_alg_layered_p3order_counting_HyperedgeCrossingsCounter$HyperedgeCorner_2_classLit = createForClass('org.eclipse.elk.alg.layered.p3order.counting', 'HyperedgeCrossingsCounter/HyperedgeCorner', 374); function $clinit_HyperedgeCrossingsCounter$HyperedgeCorner$Type(){ $clinit_HyperedgeCrossingsCounter$HyperedgeCorner$Type = emptyMethod; UPPER = new HyperedgeCrossingsCounter$HyperedgeCorner$Type('UPPER', 0); LOWER = new HyperedgeCrossingsCounter$HyperedgeCorner$Type('LOWER', 1); } function HyperedgeCrossingsCounter$HyperedgeCorner$Type(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_66(name_0){ $clinit_HyperedgeCrossingsCounter$HyperedgeCorner$Type(); return valueOf(($clinit_HyperedgeCrossingsCounter$HyperedgeCorner$Type$Map() , $MAP_56), name_0); } function values_74(){ $clinit_HyperedgeCrossingsCounter$HyperedgeCorner$Type(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_p3order_counting_HyperedgeCrossingsCounter$HyperedgeCorner$Type_2_classLit, 1), $intern_37, 531, 0, [UPPER, LOWER]); } defineClass(531, 22, {3:1, 34:1, 22:1, 531:1}, HyperedgeCrossingsCounter$HyperedgeCorner$Type); var LOWER, UPPER; var Lorg_eclipse_elk_alg_layered_p3order_counting_HyperedgeCrossingsCounter$HyperedgeCorner$Type_2_classLit = createForEnum('org.eclipse.elk.alg.layered.p3order.counting', 'HyperedgeCrossingsCounter/HyperedgeCorner/Type', 531, Ljava_lang_Enum_2_classLit, values_74, valueOf_66); function $clinit_HyperedgeCrossingsCounter$HyperedgeCorner$Type$Map(){ $clinit_HyperedgeCrossingsCounter$HyperedgeCorner$Type$Map = emptyMethod; $MAP_56 = createValueOfMap(($clinit_HyperedgeCrossingsCounter$HyperedgeCorner$Type() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_p3order_counting_HyperedgeCrossingsCounter$HyperedgeCorner$Type_2_classLit, 1), $intern_37, 531, 0, [UPPER, LOWER]))); } var $MAP_56; function $clinit_InteractiveNodePlacer(){ $clinit_InteractiveNodePlacer = emptyMethod; HIERARCHY_PROCESSING_ADDITIONS = $addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P5_EDGE_ROUTING), ($clinit_IntermediateProcessorStrategy() , HIERARCHICAL_PORT_POSITION_PROCESSOR)); } function $placeNodes(this$static, layer){ var minValidY, node, node$iterator, nodeType, originalYCoordinate, prevNodeType, spacing; minValidY = $intern_61; prevNodeType = ($clinit_LNode$NodeType() , NORMAL); for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); nodeType = node.type_0; if (nodeType != NORMAL) { originalYCoordinate = castToDouble($getProperty(node, ($clinit_InternalProperties_1() , ORIGINAL_DUMMY_NODE_POSITION))); if (originalYCoordinate == null) { minValidY = $wnd.Math.max(minValidY, 0); node.pos.y_0 = minValidY + $getVerticalSpacing(this$static.spacings, nodeType, prevNodeType); } else { node.pos.y_0 = (checkCriticalNotNull(originalYCoordinate) , originalYCoordinate); } } spacing = $getVerticalSpacing(this$static.spacings, nodeType, prevNodeType); node.pos.y_0 < minValidY + spacing + node.margin.top_0 && (node.pos.y_0 = minValidY + spacing + node.margin.top_0); minValidY = node.pos.y_0 + node.size_0.y_0 + node.margin.bottom; prevNodeType = nodeType; } } function $process_73(this$static, layeredGraph, monitor){ var layer, layer$iterator; monitor.begin('Interactive node placement', 1); this$static.spacings = castTo($getProperty(layeredGraph, ($clinit_InternalProperties_1() , SPACINGS)), 312); for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); $placeNodes(this$static, layer); } monitor.done_1(); } function InteractiveNodePlacer(){ $clinit_InteractiveNodePlacer(); } defineClass(1425, 1, $intern_113, InteractiveNodePlacer); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_15(graph){ return castTo($getProperty(castTo(graph, 36), ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21).contains(($clinit_GraphProperties() , EXTERNAL_PORTS))?HIERARCHY_PROCESSING_ADDITIONS:null; } ; _.process = function process_70(layeredGraph, monitor){ $process_73(this, castTo(layeredGraph, 36), monitor); } ; var HIERARCHY_PROCESSING_ADDITIONS; var Lorg_eclipse_elk_alg_layered_p4nodes_InteractiveNodePlacer_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'InteractiveNodePlacer', 1425); function $clinit_LinearSegmentsNodePlacer(){ $clinit_LinearSegmentsNodePlacer = emptyMethod; HIERARCHY_PROCESSING_ADDITIONS_0 = $addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P5_EDGE_ROUTING), ($clinit_IntermediateProcessorStrategy() , HIERARCHICAL_PORT_POSITION_PROCESSOR)); INPUT_PRIO = new Property_0('linearSegments.inputPrio', valueOf_3(0)); OUTPUT_PRIO = new Property_0('linearSegments.outputPrio', valueOf_3(0)); } function $balancePlacement(this$static, layeredGraph){ var deflection, deflectionDampening, finalIters, incoming, lastTotalDeflection, merged, mode, node, node$iterator, outgoing, pendulumIters, ready, segment, segment$array, segment$array0, segment$index, segment$index0, segment$max, segment$max0, thoroughness, threshold, totalDeflection; deflectionDampening = $doubleValue(castToDouble($getProperty(layeredGraph, ($clinit_LayeredOptions() , NODE_PLACEMENT_LINEAR_SEGMENTS_DEFLECTION_DAMPENING_0)))); thoroughness = castTo($getProperty(layeredGraph, THOROUGHNESS_0), 17).value_0; pendulumIters = 4; finalIters = 3; threshold = 20 / thoroughness; ready = false; mode = 0; lastTotalDeflection = $intern_0; do { incoming = mode != 1; outgoing = mode != 0; totalDeflection = 0; for (segment$array0 = this$static.linearSegments , segment$index0 = 0 , segment$max0 = segment$array0.length; segment$index0 < segment$max0; ++segment$index0) { segment = segment$array0[segment$index0]; segment.refSegment = null; $calcDeflection(this$static, segment, incoming, outgoing, deflectionDampening); totalDeflection += $wnd.Math.abs(segment.deflection); } do { merged = $mergeRegions(this$static, layeredGraph); } while (merged); for (segment$array = this$static.linearSegments , segment$index = 0 , segment$max = segment$array.length; segment$index < segment$max; ++segment$index) { segment = segment$array[segment$index]; deflection = $region(segment).deflection; if (deflection != 0) { for (node$iterator = new ArrayList$1(segment.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); node.pos.y_0 += deflection; } } } if (mode == 0 || mode == 1) { --pendulumIters; if (pendulumIters <= 0 && (totalDeflection < lastTotalDeflection || -pendulumIters > thoroughness)) { mode = 2; lastTotalDeflection = $intern_0; } else if (mode == 0) { mode = 1; lastTotalDeflection = totalDeflection; } else { mode = 0; lastTotalDeflection = totalDeflection; } } else { ready = totalDeflection >= lastTotalDeflection || lastTotalDeflection - totalDeflection < threshold; lastTotalDeflection = totalDeflection; ready && --finalIters; } } while (!(ready && finalIters <= 0)); } function $calcDeflection(this$static, segment, incoming, outgoing, deflectionDampening){ var edge, edge$iterator, edgeWeightSum, inputPrio, minPrio, node, node$iterator, nodeDeflection, nodeWeightSum, otherNode, otherPort, otherPrio, outputPrio, port, port$iterator, portpos, prio, segmentDeflection; segmentDeflection = 0; nodeWeightSum = 0; for (node$iterator = new ArrayList$1(segment.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); nodeDeflection = 0; edgeWeightSum = 0; inputPrio = incoming?castTo($getProperty(node, INPUT_PRIO), 17).value_0:$intern_43; outputPrio = outgoing?castTo($getProperty(node, OUTPUT_PRIO), 17).value_0:$intern_43; minPrio = $wnd.Math.max(inputPrio, outputPrio); for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); portpos = node.pos.y_0 + port.pos.y_0 + port.anchor.y_0; if (outgoing) { for (edge$iterator = new ArrayList$1(port.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); otherPort = edge.target; otherNode = otherPort.owner; if (segment != this$static.linearSegments[otherNode.id_0]) { otherPrio = $wnd.Math.max(castTo($getProperty(otherNode, INPUT_PRIO), 17).value_0, castTo($getProperty(otherNode, OUTPUT_PRIO), 17).value_0); prio = castTo($getProperty(edge, ($clinit_LayeredOptions() , PRIORITY_STRAIGHTNESS_0)), 17).value_0; if (prio >= minPrio && prio >= otherPrio) { nodeDeflection += otherNode.pos.y_0 + otherPort.pos.y_0 + otherPort.anchor.y_0 - portpos; ++edgeWeightSum; } } } } if (incoming) { for (edge$iterator = new ArrayList$1(port.incomingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); otherPort = edge.source; otherNode = otherPort.owner; if (segment != this$static.linearSegments[otherNode.id_0]) { otherPrio = $wnd.Math.max(castTo($getProperty(otherNode, INPUT_PRIO), 17).value_0, castTo($getProperty(otherNode, OUTPUT_PRIO), 17).value_0); prio = castTo($getProperty(edge, ($clinit_LayeredOptions() , PRIORITY_STRAIGHTNESS_0)), 17).value_0; if (prio >= minPrio && prio >= otherPrio) { nodeDeflection += otherNode.pos.y_0 + otherPort.pos.y_0 + otherPort.anchor.y_0 - portpos; ++edgeWeightSum; } } } } } if (edgeWeightSum > 0) { segmentDeflection += nodeDeflection / edgeWeightSum; ++nodeWeightSum; } } if (nodeWeightSum > 0) { segment.deflection = deflectionDampening * segmentDeflection / nodeWeightSum; segment.weight = nodeWeightSum; } else { segment.deflection = 0; segment.weight = 0; } } function $createDependencyGraphEdges(layeredGraph, segmentList, outgoingList, incomingCountList){ var currentNode, currentSegment, cycleNode, cycleNodesIter, cycleSegment, indexInLayer, layer, layer$iterator, layerIndex, nextLinearSegmentID, nextNode, nextSegment, nodeIter, nodes, previousNode; nextLinearSegmentID = segmentList.array.length; layerIndex = 0; for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); nodes = layer.nodes; if (nodes.array.length == 0) { continue; } nodeIter = new ArrayList$1(nodes); indexInLayer = 0; previousNode = null; currentNode = castTo($next_6(nodeIter), 10); currentSegment = null; while (currentNode) { currentSegment = castTo($get_11(segmentList, currentNode.id_0), 261); if (currentSegment.indexInLastLayer >= 0) { cycleSegment = null; cycleNodesIter = new AbstractList$ListIteratorImpl(layer.nodes, indexInLayer + 1); while (cycleNodesIter.i < cycleNodesIter.this$01_0.size_1()) { cycleNode = (checkCriticalElement(cycleNodesIter.i < cycleNodesIter.this$01_0.size_1()) , castTo(cycleNodesIter.this$01_0.get_0(cycleNodesIter.last = cycleNodesIter.i++), 10)); cycleSegment = castTo($get_11(segmentList, cycleNode.id_0), 261); if (cycleSegment.lastLayer == currentSegment.lastLayer && cycleSegment.indexInLastLayer < currentSegment.indexInLastLayer) { break; } else { cycleSegment = null; } } if (cycleSegment) { if (previousNode) { $set_1(incomingCountList, currentNode.id_0, valueOf_3(castTo($get_11(incomingCountList, currentNode.id_0), 17).value_0 - 1)); castTo($get_11(outgoingList, previousNode.id_0), 15).remove_1(currentSegment); } currentSegment = $split_3(currentSegment, currentNode, nextLinearSegmentID++); push_1(segmentList.array, currentSegment); $add_3(outgoingList, new ArrayList); if (previousNode) { castTo($get_11(outgoingList, previousNode.id_0), 15).add_2(currentSegment); $add_3(incomingCountList, valueOf_3(1)); } else { $add_3(incomingCountList, valueOf_3(0)); } } } nextNode = null; if (nodeIter.i < nodeIter.this$01.array.length) { nextNode = castTo($next_6(nodeIter), 10); nextSegment = castTo($get_11(segmentList, nextNode.id_0), 261); castTo($get_11(outgoingList, currentNode.id_0), 15).add_2(nextSegment); $set_1(incomingCountList, nextNode.id_0, valueOf_3(castTo($get_11(incomingCountList, nextNode.id_0), 17).value_0 + 1)); } currentSegment.lastLayer = layerIndex; currentSegment.indexInLastLayer = indexInLayer++; previousNode = currentNode; currentNode = nextNode; } ++layerIndex; } } function $createUnbalancedPlacement(this$static, layeredGraph){ var layer, layerIndex, node, node$iterator, node$iterator0, nodeCount, recentNode, recentNodeType, segment, segment$array, segment$index, segment$max, spacing, uppermostPlace; nodeCount = initUnidimensionalArray(I_classLit, $intern_49, 28, layeredGraph.layers.array.length, 15, 1); recentNodeType = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LNode$NodeType_2_classLit, $intern_37, 273, layeredGraph.layers.array.length, 0, 1); recentNode = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LNode_2_classLit, $intern_107, 10, layeredGraph.layers.array.length, 0, 1); for (segment$array = this$static.linearSegments , segment$index = 0 , segment$max = segment$array.length; segment$index < segment$max; ++segment$index) { segment = segment$array[segment$index]; uppermostPlace = 0; for (node$iterator0 = new ArrayList$1(segment.nodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); layerIndex = $getIndex_0(node.layer); ++nodeCount[layerIndex]; spacing = $doubleValue(castToDouble($getProperty(layeredGraph, ($clinit_LayeredOptions() , SPACING_EDGE_EDGE)))); nodeCount[layerIndex] > 0 && !!recentNode[layerIndex] && (spacing = $getVerticalSpacing_0(this$static.spacings, recentNode[layerIndex], node)); uppermostPlace = $wnd.Math.max(uppermostPlace, node.layer.size_0.y_0 + spacing); } for (node$iterator = new ArrayList$1(segment.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); node.pos.y_0 = uppermostPlace + node.margin.top_0; layer = node.layer; layer.size_0.y_0 = uppermostPlace + node.margin.top_0 + node.size_0.y_0 + node.margin.bottom; recentNodeType[$indexOf_3(layer.owner.layers, layer, 0)] = node.type_0; recentNode[$indexOf_3(layer.owner.layers, layer, 0)] = node; } } } function $fillSegment(this$static, node, segment){ var edgesIter, nodeType, sourcePort, sourcePort$iterator, targetNode, targetNodeType, targetPort, targetPort$iterator; nodeType = node.type_0; if (node.id_0 >= 0) { return false; } else { node.id_0 = segment.id_0; $add_3(segment.nodes, node); } if (nodeType == ($clinit_LNode$NodeType() , LONG_EDGE) || nodeType == NORTH_SOUTH_PORT) { for (sourcePort$iterator = new ArrayList$1(node.ports); sourcePort$iterator.i < sourcePort$iterator.this$01.array.length;) { sourcePort = castTo($next_6(sourcePort$iterator), 12); for (targetPort$iterator = (edgesIter = new ArrayList$1((new LPort$2(sourcePort)).this$01.outgoingEdges) , new LPort$2$1(edgesIter)); $hasNext_3(targetPort$iterator.val$edgesIter2);) { targetPort = castTo($next_6(targetPort$iterator.val$edgesIter2), 18).target; targetNode = targetPort.owner; targetNodeType = targetNode.type_0; if (node.layer != targetNode.layer) { if (targetNodeType == LONG_EDGE || targetNodeType == NORTH_SOUTH_PORT) { if ($fillSegment(this$static, targetNode, segment)) { return true; } } } } } } return true; } function $mergeRegions(this$static, layeredGraph){ var changed, layer, layer$iterator, node1, node1Extent, node2, node2Extent, nodeIter, nodeSpacing, region1, region2, spacing, threshold, weightSum; changed = false; nodeSpacing = $doubleValue(castToDouble($getProperty(layeredGraph, ($clinit_LayeredOptions() , SPACING_NODE_NODE_0)))); threshold = $intern_42 * nodeSpacing; for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); nodeIter = new ArrayList$1(layer.nodes); node1 = castTo($next_6(nodeIter), 10); region1 = $region(this$static.linearSegments[node1.id_0]); while (nodeIter.i < nodeIter.this$01.array.length) { node2 = castTo($next_6(nodeIter), 10); region2 = $region(this$static.linearSegments[node2.id_0]); if (region1 != region2) { spacing = $getVerticalSpacing_0(this$static.spacings, node1, node2); node1Extent = node1.pos.y_0 + node1.size_0.y_0 + node1.margin.bottom + region1.deflection + spacing; node2Extent = node2.pos.y_0 - node2.margin.top_0 + region2.deflection; if (node1Extent > node2Extent + threshold) { weightSum = region1.weight + region2.weight; region2.deflection = (region2.weight * region2.deflection + region1.weight * region1.deflection) / weightSum; region2.weight = weightSum; region1.refSegment = region2; changed = true; } } node1 = node2; region1 = region2; } } return changed; } function $postProcess(this$static){ var d, edge, edge$iterator, firstNode, foundPlace, index_0, lastNode, minDisplacement, minRoomAbove, minRoomBelow, neighbor, node, node$iterator, node$iterator0, pos, roomAbove, roomBelow, segment, segment$array, segment$index, segment$max, source, source$iterator, spacing, target, target$iterator; for (segment$array = this$static.linearSegments , segment$index = 0 , segment$max = segment$array.length; segment$index < segment$max; ++segment$index) { segment = segment$array[segment$index]; minRoomAbove = $intern_0; minRoomBelow = $intern_0; for (node$iterator0 = new ArrayList$1(segment.nodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); index_0 = !node.layer?-1:$indexOf_3(node.layer.nodes, node, 0); if (index_0 > 0) { neighbor = castTo($get_11(node.layer.nodes, index_0 - 1), 10); spacing = $getVerticalSpacing_0(this$static.spacings, node, neighbor); roomAbove = node.pos.y_0 - node.margin.top_0 - (neighbor.pos.y_0 + neighbor.size_0.y_0 + neighbor.margin.bottom + spacing); } else { roomAbove = node.pos.y_0 - node.margin.top_0; } minRoomAbove = $wnd.Math.min(roomAbove, minRoomAbove); if (index_0 < node.layer.nodes.array.length - 1) { neighbor = castTo($get_11(node.layer.nodes, index_0 + 1), 10); spacing = $getVerticalSpacing_0(this$static.spacings, node, neighbor); roomBelow = neighbor.pos.y_0 - neighbor.margin.top_0 - (node.pos.y_0 + node.size_0.y_0 + node.margin.bottom + spacing); } else { roomBelow = 2 * node.pos.y_0; } minRoomBelow = $wnd.Math.min(roomBelow, minRoomBelow); } minDisplacement = $intern_0; foundPlace = false; firstNode = castTo($get_11(segment.nodes, 0), 10); for (target$iterator = new ArrayList$1(firstNode.ports); target$iterator.i < target$iterator.this$01.array.length;) { target = castTo($next_6(target$iterator), 12); pos = firstNode.pos.y_0 + target.pos.y_0 + target.anchor.y_0; for (edge$iterator = new ArrayList$1(target.incomingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); source = edge.source; d = source.owner.pos.y_0 + source.pos.y_0 + source.anchor.y_0 - pos; if ($wnd.Math.abs(d) < $wnd.Math.abs(minDisplacement) && $wnd.Math.abs(d) < (d < 0?minRoomAbove:minRoomBelow)) { minDisplacement = d; foundPlace = true; } } } lastNode = castTo($get_11(segment.nodes, segment.nodes.array.length - 1), 10); for (source$iterator = new ArrayList$1(lastNode.ports); source$iterator.i < source$iterator.this$01.array.length;) { source = castTo($next_6(source$iterator), 12); pos = lastNode.pos.y_0 + source.pos.y_0 + source.anchor.y_0; for (edge$iterator = new ArrayList$1(source.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); target = edge.target; d = target.owner.pos.y_0 + target.pos.y_0 + target.anchor.y_0 - pos; if ($wnd.Math.abs(d) < $wnd.Math.abs(minDisplacement) && $wnd.Math.abs(d) < (d < 0?minRoomAbove:minRoomBelow)) { minDisplacement = d; foundPlace = true; } } } if (foundPlace && minDisplacement != 0) { for (node$iterator = new ArrayList$1(segment.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); node.pos.y_0 += minDisplacement; } } } } function $process_74(this$static, layeredGraph, monitor){ monitor.begin('Linear segments node placement', 1); this$static.spacings = castTo($getProperty(layeredGraph, ($clinit_InternalProperties_1() , SPACINGS)), 312); $sortLinearSegments(this$static, layeredGraph); $createUnbalancedPlacement(this$static, layeredGraph); $balancePlacement(this$static, layeredGraph); $postProcess(this$static); this$static.linearSegments = null; this$static.spacings = null; monitor.done_1(); } function $sortLinearSegments(this$static, layeredGraph){ var edge, edge$iterator, edge$iterator0, i, i0, i1, i2, incomingCount, incomingCountList, inprio, layer, layer$iterator, layer$iterator0, ls, newRanks, nextLinearSegmentID, nextRank, noIncoming, node, node$iterator, outgoing, outgoingList, outprio, port, port$iterator, prio, rank, segment, segmentList, segments, target; segmentList = new ArrayList; for (layer$iterator0 = new ArrayList$1(layeredGraph.layers); layer$iterator0.i < layer$iterator0.this$01.array.length;) { layer = castTo($next_6(layer$iterator0), 30); for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); node.id_0 = -1; inprio = $intern_43; outprio = $intern_43; for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); for (edge$iterator0 = new ArrayList$1(port.incomingEdges); edge$iterator0.i < edge$iterator0.this$01.array.length;) { edge = castTo($next_6(edge$iterator0), 18); prio = castTo($getProperty(edge, ($clinit_LayeredOptions() , PRIORITY_STRAIGHTNESS_0)), 17).value_0; inprio = $wnd.Math.max(inprio, prio); } for (edge$iterator = new ArrayList$1(port.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); prio = castTo($getProperty(edge, ($clinit_LayeredOptions() , PRIORITY_STRAIGHTNESS_0)), 17).value_0; outprio = $wnd.Math.max(outprio, prio); } } $setProperty_0(node, INPUT_PRIO, valueOf_3(inprio)); $setProperty_0(node, OUTPUT_PRIO, valueOf_3(outprio)); } } nextLinearSegmentID = 0; for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); if (node.id_0 < 0) { segment = new LinearSegmentsNodePlacer$LinearSegment; segment.id_0 = nextLinearSegmentID++; $fillSegment(this$static, node, segment); push_1(segmentList.array, segment); } } } outgoingList = newArrayListWithCapacity(segmentList.array.length); incomingCountList = newArrayListWithCapacity(segmentList.array.length); for (i0 = 0; i0 < segmentList.array.length; i0++) { $add_3(outgoingList, new ArrayList); $add_3(incomingCountList, valueOf_3(0)); } $createDependencyGraphEdges(layeredGraph, segmentList, outgoingList, incomingCountList); segments = castTo($toArray_1(segmentList, initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_p4nodes_LinearSegmentsNodePlacer$LinearSegment_2_classLit, $intern_116, 261, segmentList.array.length, 0, 1)), 854); outgoing = castTo($toArray_1(outgoingList, initUnidimensionalArray(Ljava_util_List_2_classLit, $intern_99, 15, outgoingList.array.length, 0, 1)), 198); incomingCount = initUnidimensionalArray(I_classLit, $intern_49, 28, incomingCountList.array.length, 15, 1); for (i1 = 0; i1 < incomingCount.length; i1++) { incomingCount[i1] = (checkCriticalElementIndex(i1, incomingCountList.array.length) , castTo(incomingCountList.array[i1], 17)).value_0; } nextRank = 0; noIncoming = new ArrayList; for (i2 = 0; i2 < segments.length; i2++) { incomingCount[i2] == 0 && (push_1(noIncoming.array, segments[i2]) , true); } newRanks = initUnidimensionalArray(I_classLit, $intern_49, 28, segments.length, 15, 1); while (noIncoming.array.length != 0) { segment = castTo($remove_11(noIncoming, 0), 261); newRanks[segment.id_0] = nextRank++; while (!outgoing[segment.id_0].isEmpty()) { target = castTo(outgoing[segment.id_0].remove_2(0), 261); --incomingCount[target.id_0]; incomingCount[target.id_0] == 0 && (push_1(noIncoming.array, target) , true); } } this$static.linearSegments = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_p4nodes_LinearSegmentsNodePlacer$LinearSegment_2_classLit, $intern_116, 261, segments.length, 0, 1); for (i = 0; i < segments.length; i++) { ls = segments[i]; rank = newRanks[i]; this$static.linearSegments[rank] = ls; ls.id_0 = rank; for (node$iterator = new ArrayList$1(ls.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); node.id_0 = rank; } } return this$static.linearSegments; } function LinearSegmentsNodePlacer(){ $clinit_LinearSegmentsNodePlacer(); } defineClass(1426, 1, $intern_113, LinearSegmentsNodePlacer); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_16(graph){ return castTo($getProperty(castTo(graph, 36), ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21).contains(($clinit_GraphProperties() , EXTERNAL_PORTS))?HIERARCHY_PROCESSING_ADDITIONS_0:null; } ; _.process = function process_71(layeredGraph, monitor){ $process_74(this, castTo(layeredGraph, 36), monitor); } ; var HIERARCHY_PROCESSING_ADDITIONS_0, INPUT_PRIO, OUTPUT_PRIO; var Lorg_eclipse_elk_alg_layered_p4nodes_LinearSegmentsNodePlacer_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'LinearSegmentsNodePlacer', 1426); function $compareTo_16(this$static, other){ return this$static.id_0 - other.id_0; } function $region(this$static){ var seg; seg = this$static; while (seg.refSegment) { seg = seg.refSegment; } return seg; } function $split_3(this$static, node, newId){ var iterator, movedNode, newSegment, nodeIndex; nodeIndex = $indexOf_3(this$static.nodes, node, 0); newSegment = new LinearSegmentsNodePlacer$LinearSegment; newSegment.id_0 = newId; iterator = new AbstractList$ListIteratorImpl(this$static.nodes, nodeIndex); while (iterator.i < iterator.this$01_0.size_1()) { movedNode = (checkCriticalElement(iterator.i < iterator.this$01_0.size_1()) , castTo(iterator.this$01_0.get_0(iterator.last = iterator.i++), 10)); movedNode.id_0 = newId; $add_3(newSegment.nodes, movedNode); $remove_8(iterator); } return newSegment; } function LinearSegmentsNodePlacer$LinearSegment(){ this.nodes = new ArrayList; } defineClass(261, 1, {34:1, 261:1}, LinearSegmentsNodePlacer$LinearSegment); _.compareTo_0 = function compareTo_17(other){ return $compareTo_16(this, castTo(other, 261)); } ; _.equals_0 = function equals_161(object){ var other; if (instanceOf(object, 261)) { other = castTo(object, 261); return this.id_0 == other.id_0; } return false; } ; _.hashCode_1 = function hashCode_63(){ return this.id_0; } ; _.toString_0 = function toString_102(){ return 'ls' + $toString_2(this.nodes); } ; _.deflection = 0; _.id_0 = 0; _.indexInLastLayer = -1; _.lastLayer = -1; _.weight = 0; var Lorg_eclipse_elk_alg_layered_p4nodes_LinearSegmentsNodePlacer$LinearSegment_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'LinearSegmentsNodePlacer/LinearSegment', 261); function $clinit_NetworkSimplexPlacer(){ $clinit_NetworkSimplexPlacer = emptyMethod; HIERARCHY_PROCESSING_ADDITIONS_1 = $addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P5_EDGE_ROUTING), ($clinit_IntermediateProcessorStrategy() , HIERARCHICAL_PORT_POSITION_PROCESSOR)); } function $applyPositions(this$static){ var flexibleNode, l, l$iterator, lNode, lNode$iterator, label_0, label$iterator, maxY, minY, nNode, nf, nf0, nodeRep, p, p$iterator, placement, sizeDelta; for (l$iterator = new ArrayList$1(this$static.lGraph.layers); l$iterator.i < l$iterator.this$01.array.length;) { l = castTo($next_6(l$iterator), 30); for (lNode$iterator = new ArrayList$1(l.nodes); lNode$iterator.i < lNode$iterator.this$01.array.length;) { lNode = castTo($next_6(lNode$iterator), 10); nodeRep = this$static.nodeReps[lNode.id_0]; minY = nodeRep.head.layer; maxY = nodeRep.tail.layer; lNode.pos.y_0 = minY; sizeDelta = maxY - minY - lNode.size_0.y_0; flexibleNode = isFlexibleNode(lNode); nf0 = ($clinit_NodeFlexibility() , (!lNode.propertyMap?($clinit_Collections() , $clinit_Collections() , EMPTY_MAP):lNode.propertyMap).containsKey(($clinit_LayeredOptions() , NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_0))?(nf = castTo($getProperty(lNode, NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_0), 203)):(nf = castTo($getProperty($getGraph(lNode), NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEFAULT_0), 203)) , nf); flexibleNode && (nf0 == NODE_SIZE_WHERE_SPACE_PERMITS || nf0 == NODE_SIZE) && (lNode.size_0.y_0 += sizeDelta); if (flexibleNode && (nf0 == PORT_POSITION || nf0 == NODE_SIZE_WHERE_SPACE_PERMITS || nf0 == NODE_SIZE)) { for (p$iterator = new ArrayList$1(lNode.ports); p$iterator.i < p$iterator.this$01.array.length;) { p = castTo($next_6(p$iterator), 12); if (($clinit_PortSide() , SIDES_EAST_WEST).contains(p.side)) { nNode = castTo($get_10(this$static.portMap, p), 125); p.pos.y_0 = nNode.layer - minY; } } for (label$iterator = new ArrayList$1(lNode.labels); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 72); placement = castTo($getProperty(lNode, NODE_LABELS_PLACEMENT_1), 21); placement.contains(($clinit_NodeLabelPlacement() , V_BOTTOM_0))?(label_0.pos.y_0 += sizeDelta):placement.contains(V_CENTER_0) && (label_0.pos.y_0 += sizeDelta / 2); } (nf0 == NODE_SIZE_WHERE_SPACE_PERMITS || nf0 == NODE_SIZE) && $getPortSideView(lNode, ($clinit_PortSide() , SOUTH_2)).forEach_0(new NetworkSimplexPlacer$lambda$20$Type(sizeDelta)); } } } } function $buildInitialAuxiliaryGraph(this$static){ var l, l$iterator; for (l$iterator = new ArrayList$1(this$static.lGraph.layers); l$iterator.i < l$iterator.this$01.array.length;) { l = castTo($next_6(l$iterator), 30); $transformLayer(this$static, l); } $forEach_3($filter($flatMap($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static.lGraph.layers, 16)), new NetworkSimplexPlacer$lambda$2$Type), new NetworkSimplexPlacer$lambda$3$Type), new NetworkSimplexPlacer$lambda$4$Type), new NetworkSimplexPlacer$lambda$5$Type(this$static)); } function $follow(this$static, edge, current, path){ var incident, incident$iterator, other; other = $getOther_1(edge, current); push_1(path.array, edge); if (this$static.nodeState[other.id_0] == -1 || this$static.nodeState[other.id_0] == 2 || this$static.crossing[edge.id_0]) { return path; } this$static.nodeState[other.id_0] = -1; for (incident$iterator = new Iterators$ConcatenatedIterator(transform_2($getConnectedEdges_0(other).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(incident$iterator);) { incident = castTo($next_0(incident$iterator), 18); if (!(!$isSelfLoop(incident) && !(!$isSelfLoop(incident) && incident.source.owner.layer == incident.target.owner.layer)) || incident == edge) { continue; } return $follow(this$static, incident, other, path); } return path; } function $getEdgeWeight(nodeType1, nodeType2){ return nodeType1 == ($clinit_LNode$NodeType() , NORMAL) && nodeType2 == NORMAL?4:nodeType1 == NORMAL || nodeType2 == NORMAL?8:32; } function $improveTwoPath(this$static, path, probe){ var a, above, aboveDist, aboveRep, b, below, belowDist, belowRep, c, caseA, caseB, caseC, caseD, centerNode, centerOrigin, d, leftEdge, move, nNode, nodeIndex, rightEdge, spacing; leftEdge = this$static.edgeReps[(checkCriticalElementIndex(0, path.array.length) , castTo(path.array[0], 18)).id_0]; rightEdge = this$static.edgeReps[(checkCriticalElementIndex(1, path.array.length) , castTo(path.array[1], 18)).id_0]; if (leftEdge.left.target.layer - leftEdge.left.delta - (leftEdge.right.target.layer - leftEdge.right.delta) == 0 && rightEdge.left.target.layer - rightEdge.left.delta - (rightEdge.right.target.layer - rightEdge.right.delta) == 0) { return false; } centerOrigin = leftEdge.right.target.origin_0; if (!instanceOf(centerOrigin, 10)) { return false; } centerNode = castTo(centerOrigin, 10); nNode = this$static.nodeReps[centerNode.id_0]; nodeIndex = !centerNode.layer?-1:$indexOf_3(centerNode.layer.nodes, centerNode, 0); aboveDist = $intern_60; if (nodeIndex > 0) { above = castTo($get_11(centerNode.layer.nodes, nodeIndex - 1), 10); aboveRep = this$static.nodeReps[above.id_0]; spacing = $wnd.Math.ceil($getVerticalSpacing_0(this$static.spacings, above, centerNode)); aboveDist = nNode.head.layer - centerNode.margin.top_0 - (aboveRep.head.layer + above.size_0.y_0 + above.margin.bottom) - spacing; } belowDist = $intern_60; if (nodeIndex < centerNode.layer.nodes.array.length - 1) { below = castTo($get_11(centerNode.layer.nodes, nodeIndex + 1), 10); belowRep = this$static.nodeReps[below.id_0]; spacing = $wnd.Math.ceil($getVerticalSpacing_0(this$static.spacings, below, centerNode)); belowDist = belowRep.head.layer - below.margin.top_0 - (nNode.head.layer + centerNode.size_0.y_0 + centerNode.margin.bottom) - spacing; } if (probe && ($clinit_DoubleMath() , checkNonNegative($intern_117) , $wnd.Math.abs(aboveDist - belowDist) <= $intern_117 || aboveDist == belowDist || isNaN(aboveDist) && isNaN(belowDist))) { return true; } a = length_1(leftEdge.left); b = -length_1(leftEdge.right); c = -length_1(rightEdge.left); d = length_1(rightEdge.right); caseD = leftEdge.left.target.layer - leftEdge.left.delta - (leftEdge.right.target.layer - leftEdge.right.delta) > 0 && rightEdge.left.target.layer - rightEdge.left.delta - (rightEdge.right.target.layer - rightEdge.right.delta) < 0; caseC = leftEdge.left.target.layer - leftEdge.left.delta - (leftEdge.right.target.layer - leftEdge.right.delta) < 0 && rightEdge.left.target.layer - rightEdge.left.delta - (rightEdge.right.target.layer - rightEdge.right.delta) > 0; caseB = leftEdge.left.target.layer + leftEdge.right.delta < rightEdge.right.target.layer + rightEdge.left.delta; caseA = leftEdge.left.target.layer + leftEdge.right.delta > rightEdge.right.target.layer + rightEdge.left.delta; move = 0; !caseD && !caseC && (caseA?aboveDist + c > 0?(move = c):belowDist - a > 0 && (move = a):caseB && (aboveDist + b > 0?(move = b):belowDist - d > 0 && (move = d))); nNode.head.layer += move; nNode.isFlexible && (nNode.tail.layer += move); return false; } function $lambda$1_5(this$static, singleNode_1, p_1){ return $put_6(this$static.portMap, p_1, singleNode_1); } function $lambda$10(this$static, inLayerEdge_0){ var dummyNode, dummyRep, portRep, src_0, srcIsDummy, tgt, thePort; srcIsDummy = inLayerEdge_0.source.owner.type_0 != ($clinit_LNode$NodeType() , NORMAL); thePort = srcIsDummy?inLayerEdge_0.target:inLayerEdge_0.source; dummyNode = $getOther_2(inLayerEdge_0, thePort).owner; portRep = castTo($get_10(this$static.portMap, thePort), 125); dummyRep = this$static.nodeReps[dummyNode.id_0].head; if ($getIndex(thePort.owner) < (!dummyNode.layer?-1:$indexOf_3(dummyNode.layer.nodes, dummyNode, 0))) { src_0 = portRep; tgt = dummyRep; } else { src_0 = dummyRep; tgt = portRep; } $create_1($target($source($weight($delta(new NEdge$NEdgeBuilder, 0), 4), src_0), tgt)); } function $lambda$12(this$static, n_0){ var other, sp, sp$iterator, sp$iterator0; for (sp$iterator0 = $getPortSideView(n_0, ($clinit_PortSide() , SOUTH_2)).iterator_0(); sp$iterator0.hasNext_0();) { sp = castTo(sp$iterator0.next_1(), 12); other = castTo($getProperty(sp, ($clinit_InternalProperties_1() , PORT_DUMMY)), 10); !!other && $create_1($target($source($weight($delta(new NEdge$NEdgeBuilder, 0), 0.1), this$static.nodeReps[n_0.id_0].tail), this$static.nodeReps[other.id_0].head)); } for (sp$iterator = $getPortSideView(n_0, NORTH_3).iterator_0(); sp$iterator.hasNext_0();) { sp = castTo(sp$iterator.next_1(), 12); other = castTo($getProperty(sp, ($clinit_InternalProperties_1() , PORT_DUMMY)), 10); !!other && $create_1($target($source($weight($delta(new NEdge$NEdgeBuilder, 0), 0.1), this$static.nodeReps[other.id_0].tail), this$static.nodeReps[n_0.id_0].head)); } } function $lambda$22(this$static, n_0){ return this$static.nodeState[n_0.id_0] = getNodeState(n_0); } function $lambda$25(this$static, n_0){ return this$static.nodeState[n_0.id_0] == 2; } function $lambda$26(this$static, paths_1, junction_1){ var e, e$iterator, path; for (e$iterator = new Iterators$ConcatenatedIterator(transform_2($getConnectedEdges_0(junction_1).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 18); if (!(!$isSelfLoop(e) && !(!$isSelfLoop(e) && e.source.owner.layer == e.target.owner.layer))) { continue; } path = $follow(this$static, e, junction_1, new NetworkSimplexPlacer$Path); path.array.length > 1 && (push_1(paths_1.array, path) , true); } } function $lambda$29(this$static, left_0, right_1){ $markCrossingEdges(this$static, left_0, right_1); return right_1; } function $markCrossingEdges(this$static, left, right){ var edge, edge$iterator, last, node, node$iterator, node$iterator0, openEdges, openEdgesIt, port, port$iterator; openEdges = new ArrayList; for (node$iterator0 = new ArrayList$1(left.nodes); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 10); for (port$iterator = $getPortSideView(node, ($clinit_PortSide() , EAST_2)).iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); for (edge$iterator = new ArrayList$1(port.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); if (!$isSelfLoop(edge) && edge.source.owner.layer == edge.target.owner.layer || $isSelfLoop(edge) || edge.target.owner.layer != right) { continue; } push_1(openEdges.array, edge); } } } for (node$iterator = reverse_0(right.nodes).iterator_0(); node$iterator.hasNext_0();) { node = castTo(node$iterator.next_1(), 10); for (port$iterator = $getPortSideView(node, ($clinit_PortSide() , WEST_2)).iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); for (edge$iterator = new ArrayList$1(port.incomingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); if (!$isSelfLoop(edge) && edge.source.owner.layer == edge.target.owner.layer || $isSelfLoop(edge) || edge.source.owner.layer != left) { continue; } if (openEdges.array.length != 0) { openEdgesIt = new AbstractList$ListIteratorImpl(openEdges, openEdges.array.length); last = (checkCriticalElement(openEdgesIt.i > 0) , castTo(openEdgesIt.this$01.get_0(openEdgesIt.last = --openEdgesIt.i), 18)); while (last != edge && openEdgesIt.i > 0) { this$static.crossing[last.id_0] = true; this$static.crossing[edge.id_0] = true; last = (checkCriticalElement(openEdgesIt.i > 0) , castTo(openEdgesIt.this$01.get_0(openEdgesIt.last = --openEdgesIt.i), 18)); } openEdgesIt.i > 0 && $remove_8(openEdgesIt); } } } } } function $postProcessTwoPaths(this$static){ var path, q, s, tryAgain; q = new LinkedList; $addAll(q, this$static.twoPaths); s = new Stack; while (q.size_0 != 0) { path = castTo(q.size_0 == 0?null:(checkCriticalElement(q.size_0 != 0) , $removeNode_0(q, q.header.next_0)), 515); tryAgain = $improveTwoPath(this$static, path, true); tryAgain && $add_3(s.arrayList, path); } while (s.arrayList.array.length != 0) { path = castTo($pop(s), 515); $improveTwoPath(this$static, path, false); } } function $preferStraightEdges(this$static){ var cur, curRep, identifiedPaths, last, oldLeftWeight, oldRightWeight, path, path$iterator, pathIt, weight, paths; this$static.nodeState = initUnidimensionalArray(I_classLit, $intern_49, 28, this$static.nodeCount, 15, 1); this$static.twoPaths = new ArrayList; $forEach_3($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static.lGraph.layers, 16)), new NetworkSimplexPlacer$lambda$21$Type), new NetworkSimplexPlacer$lambda$22$Type(this$static)); this$static.crossing = initUnidimensionalArray(Z_classLit, $intern_91, 28, this$static.edgeCount, 16, 1); $reduce_0(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static.lGraph.layers, 16)), new NetworkSimplexPlacer$lambda$29$Type(this$static)); identifiedPaths = (paths = new ArrayList , $forEach_3($filter($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static.lGraph.layers, 16)), new NetworkSimplexPlacer$lambda$24$Type), new NetworkSimplexPlacer$lambda$25$Type(this$static)), new NetworkSimplexPlacer$lambda$26$Type(this$static, paths)) , paths); for (path$iterator = new ArrayList$1(identifiedPaths); path$iterator.i < path$iterator.this$01.array.length;) { path = castTo($next_6(path$iterator), 515); if (path.array.length <= 1) { continue; } if (path.array.length == 2) { $orderTwoPath(path); isFlexibleNode((checkCriticalElementIndex(0, path.array.length) , castTo(path.array[0], 18)).target.owner) || $add_3(this$static.twoPaths, path); continue; } if ($containsLongEdgeDummy(path) || $containsFlexibleNode(path, new NetworkSimplexPlacer$lambda$23$Type)) { continue; } pathIt = new ArrayList$1(path); last = null; while (pathIt.i < pathIt.this$01.array.length) { cur = castTo($next_6(pathIt), 18); curRep = this$static.edgeReps[cur.id_0]; !last || pathIt.i >= pathIt.this$01.array.length?(weight = $getEdgeWeight(($clinit_LNode$NodeType() , NORMAL), LONG_EDGE)):(weight = $getEdgeWeight(($clinit_LNode$NodeType() , LONG_EDGE), LONG_EDGE)); weight *= 2; oldLeftWeight = curRep.left.weight; curRep.left.weight = $wnd.Math.max(oldLeftWeight, oldLeftWeight + (weight - oldLeftWeight)); oldRightWeight = curRep.right.weight; curRep.right.weight = $wnd.Math.max(oldRightWeight, oldRightWeight + (weight - oldRightWeight)); last = cur; } } } function $prepare(this$static){ var anchorMustBeInteger, e, e$iterator, edgeIdx, l, l$iterator, lNode, lNode$iterator, nodeIdx, offset, p, p$iterator, y_0, y0; this$static.nGraph = new NGraph; nodeIdx = 0; edgeIdx = 0; for (l$iterator = new ArrayList$1(this$static.lGraph.layers); l$iterator.i < l$iterator.this$01.array.length;) { l = castTo($next_6(l$iterator), 30); for (lNode$iterator = new ArrayList$1(l.nodes); lNode$iterator.i < lNode$iterator.this$01.array.length;) { lNode = castTo($next_6(lNode$iterator), 10); lNode.id_0 = nodeIdx++; for (e$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(lNode).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 18); e.id_0 = edgeIdx++; } anchorMustBeInteger = isFlexibleNode(lNode); for (p$iterator = new ArrayList$1(lNode.ports); p$iterator.i < p$iterator.this$01.array.length;) { p = castTo($next_6(p$iterator), 12); if (anchorMustBeInteger) { y0 = p.anchor.y_0; if (y0 != $wnd.Math.floor(y0)) { offset = y0 - toDouble_0(fromDouble_0($wnd.Math.round(y0))); p.anchor.y_0 -= offset; } } y_0 = p.pos.y_0 + p.anchor.y_0; if (y_0 != $wnd.Math.floor(y_0)) { offset = y_0 - toDouble_0(fromDouble_0($wnd.Math.round(y_0))); p.pos.y_0 -= offset; } } } } this$static.nodeCount = nodeIdx; this$static.edgeCount = edgeIdx; this$static.nodeReps = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$NodeRep_2_classLit, $intern_2, 412, nodeIdx, 0, 1); this$static.edgeReps = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$EdgeRep_2_classLit, $intern_2, 655, edgeIdx, 0, 1); this$static.flexibleWhereSpacePermitsEdges.map_0.clear_0(); } function $process_75(this$static, layeredGraph, progressMonitor){ var edge, edge$iterator, iterLimit, pm, minLayer, maxLayer, usedLayers, globalSource, globalSink; progressMonitor.begin('Network simplex node placement', 1); this$static.lGraph = layeredGraph; this$static.spacings = castTo($getProperty(layeredGraph, ($clinit_InternalProperties_1() , SPACINGS)), 312); $prepare(this$static); $buildInitialAuxiliaryGraph(this$static); $forEach_3($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static.lGraph.layers, 16)), new NetworkSimplexPlacer$lambda$11$Type), new NetworkSimplexPlacer$lambda$12$Type(this$static)); $forEach_3($filter($flatMap($filter($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static.lGraph.layers, 16)), new NetworkSimplexPlacer$lambda$6$Type), new NetworkSimplexPlacer$lambda$7$Type), new NetworkSimplexPlacer$lambda$8$Type), new NetworkSimplexPlacer$lambda$9$Type), new NetworkSimplexPlacer$lambda$10$Type(this$static)); if ($booleanValue(castToBoolean($getProperty(this$static.lGraph, ($clinit_LayeredOptions() , NODE_PLACEMENT_FAVOR_STRAIGHT_EDGES_0))))) { pm = progressMonitor.subTask(1); pm.begin('Straight Edges Pre-Processing', 1); $preferStraightEdges(this$static); pm.done_1(); } $makeConnected(this$static.nGraph); iterLimit = castTo($getProperty(layeredGraph, THOROUGHNESS_0), 17).value_0 * this$static.nGraph.nodes.array.length; $execute_0($withBalancing($withIterationLimit(forGraph(this$static.nGraph), iterLimit), false), progressMonitor.subTask(1)); if (this$static.flexibleWhereSpacePermitsEdges.map_0.size_1() != 0) { pm = progressMonitor.subTask(1); pm.begin('Flexible Where Space Processing', 1); minLayer = castTo($get_17($min_0($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static.nGraph.nodes, 16)), new NetworkSimplexPlacer$lambda$13$Type), new NetworkSimplexPlacer$0methodref$compare$Type)), 17).value_0; maxLayer = castTo($get_17($max_1($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static.nGraph.nodes, 16)), new NetworkSimplexPlacer$lambda$15$Type), new NetworkSimplexPlacer$1methodref$compare$Type)), 17).value_0; usedLayers = maxLayer - minLayer; globalSource = $create_2(new NNode$NNodeBuilder, this$static.nGraph); globalSink = $create_2(new NNode$NNodeBuilder, this$static.nGraph); $create_1($target($source($delta($weight(new NEdge$NEdgeBuilder, 20000), usedLayers), globalSource), globalSink)); $forEach_3($filter($filter(stream_4(this$static.nodeReps), new NetworkSimplexPlacer$lambda$17$Type), new NetworkSimplexPlacer$lambda$18$Type), new NetworkSimplexPlacer$lambda$19$Type(minLayer, globalSource, usedLayers, globalSink)); for (edge$iterator = this$static.flexibleWhereSpacePermitsEdges.map_0.keySet_0().iterator_0(); edge$iterator.hasNext_0();) { edge = castTo(edge$iterator.next_1(), 218); edge.weight = 1; } $execute_0($withBalancing($withIterationLimit(forGraph(this$static.nGraph), iterLimit), false), pm.subTask(1)); pm.done_1(); } if ($booleanValue(castToBoolean($getProperty(layeredGraph, NODE_PLACEMENT_FAVOR_STRAIGHT_EDGES_0)))) { pm = progressMonitor.subTask(1); pm.begin('Straight Edges Post-Processing', 1); $postProcessTwoPaths(this$static); pm.done_1(); } $applyPositions(this$static); this$static.lGraph = null; this$static.nGraph = null; this$static.nodeReps = null; this$static.edgeReps = null; $reset(this$static.portMap); this$static.nodeState = null; this$static.crossing = null; this$static.twoPaths = null; this$static.flexibleWhereSpacePermitsEdges.map_0.clear_0(); progressMonitor.done_1(); } function $transformEdge_0(this$static, lEdge){ var dummy, edgeRep, left, right, srcDelta, srcOffset, srcPort, srcRep, tgtDelta, tgtOffset, tgtPort, tgtRep, weight, priority, edgeTypeWeight; dummy = $create_2(new NNode$NNodeBuilder, this$static.nGraph); srcRep = this$static.nodeReps[lEdge.source.owner.id_0]; tgtRep = this$static.nodeReps[lEdge.target.owner.id_0]; srcPort = lEdge.source; tgtPort = lEdge.target; srcOffset = srcPort.anchor.y_0; tgtOffset = tgtPort.anchor.y_0; srcRep.isFlexible || (srcOffset += srcPort.pos.y_0); tgtRep.isFlexible || (tgtOffset += tgtPort.pos.y_0); tgtDelta = round_int($wnd.Math.max(0, srcOffset - tgtOffset)); srcDelta = round_int($wnd.Math.max(0, tgtOffset - srcOffset)); weight = (priority = $wnd.Math.max(1, castTo($getProperty(lEdge, ($clinit_LayeredOptions() , PRIORITY_STRAIGHTNESS_0)), 17).value_0) , edgeTypeWeight = $getEdgeWeight(lEdge.source.owner.type_0, lEdge.target.owner.type_0) , priority * edgeTypeWeight); left = $create_1($target($source($delta($weight(new NEdge$NEdgeBuilder, weight), srcDelta), dummy), castTo($get_10(this$static.portMap, lEdge.source), 125))); right = $create_1($target($source($delta($weight(new NEdge$NEdgeBuilder, weight), tgtDelta), dummy), castTo($get_10(this$static.portMap, lEdge.target), 125))); edgeRep = new NetworkSimplexPlacer$EdgeRep(left, right); this$static.edgeReps[lEdge.id_0] = edgeRep; } function $transformLayer(this$static, layer){ var lNode, lNode$iterator, lastRep, nodeRep, spacing, topLeft, bottomLeft, corners, minHeight, nf0, nf, sizeWeight, nodeSizeEdge, singleNode; lastRep = null; for (lNode$iterator = new ArrayList$1(layer.nodes); lNode$iterator.i < lNode$iterator.this$01.array.length;) { lNode = castTo($next_6(lNode$iterator), 10); isFlexibleNode(lNode)?(nodeRep = (topLeft = $create_2($origin_0(new NNode$NNodeBuilder, lNode), this$static.nGraph) , bottomLeft = $create_2($origin_0(new NNode$NNodeBuilder, lNode), this$static.nGraph) , corners = new NetworkSimplexPlacer$NodeRep(lNode, true, topLeft, bottomLeft) , minHeight = lNode.size_0.y_0 , nf0 = ($clinit_NodeFlexibility() , (!lNode.propertyMap?($clinit_Collections() , $clinit_Collections() , EMPTY_MAP):lNode.propertyMap).containsKey(($clinit_LayeredOptions() , NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_0))?(nf = castTo($getProperty(lNode, NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_0), 203)):(nf = castTo($getProperty($getGraph(lNode), NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEFAULT_0), 203)) , nf) , sizeWeight = 10000 , nf0 == NODE_SIZE && (sizeWeight = 1) , nodeSizeEdge = $create_1($target($source($delta($weight(new NEdge$NEdgeBuilder, sizeWeight), round_int($wnd.Math.ceil(minHeight))), topLeft), bottomLeft)) , nf0 == NODE_SIZE_WHERE_SPACE_PERMITS && $add_6(this$static.flexibleWhereSpacePermitsEdges, nodeSizeEdge) , $transformPorts(this$static, reverse_0($getPortSideView(lNode, ($clinit_PortSide() , WEST_2))), corners) , $transformPorts(this$static, $getPortSideView(lNode, EAST_2), corners) , corners)):(nodeRep = (singleNode = $create_2($origin_0(new NNode$NNodeBuilder, lNode), this$static.nGraph) , $forEach_3($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(lNode.ports, 16)), new NetworkSimplexPlacer$lambda$0$Type), new NetworkSimplexPlacer$lambda$1$Type(this$static, singleNode)) , new NetworkSimplexPlacer$NodeRep(lNode, false, singleNode, singleNode))); this$static.nodeReps[lNode.id_0] = nodeRep; if (lastRep) { spacing = lastRep.origin_0.margin.bottom + $getVerticalSpacing_0(this$static.spacings, lastRep.origin_0, lNode) + lNode.margin.top_0; lastRep.isFlexible || (spacing += lastRep.origin_0.size_0.y_0); $create_1($target($source($weight($delta(new NEdge$NEdgeBuilder, round_int($wnd.Math.ceil(spacing))), 0), lastRep.tail), nodeRep.head)); } lastRep = nodeRep; } } function $transformPorts(this$static, ports, corners){ var lastNNode, lastPort, nNode, port, port$iterator, portSpacing, portSurrounding, spacing; if (isEmpty_13(ports)) { return; } portSpacing = $doubleValue(castToDouble(getIndividualOrDefault(corners.origin_0, ($clinit_LayeredOptions() , SPACING_PORT_PORT)))); portSurrounding = castTo(getIndividualOrDefault(corners.origin_0, SPACING_PORTS_SURROUNDING), 140); !portSurrounding && (portSurrounding = new ElkMargin); lastNNode = corners.head; lastPort = null; for (port$iterator = ports.iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); spacing = 0; if (!lastPort) { spacing = portSurrounding.top_0; } else { spacing = portSpacing; spacing += lastPort.size_0.y_0; } nNode = $create_2($origin_0(new NNode$NNodeBuilder, port), this$static.nGraph); $put_6(this$static.portMap, port, nNode); $create_1($target($source($delta($weight(new NEdge$NEdgeBuilder, 0), round_int($wnd.Math.ceil(spacing))), lastNNode), nNode)); lastPort = port; lastNNode = nNode; } $create_1($target($source($delta($weight(new NEdge$NEdgeBuilder, 0), round_int($wnd.Math.ceil(portSurrounding.bottom + lastPort.size_0.y_0))), lastNNode), corners.tail)); } function NetworkSimplexPlacer(){ $clinit_NetworkSimplexPlacer(); this.portMap = new HashMap; this.flexibleWhereSpacePermitsEdges = new HashSet; } function getNodeState(node){ var inco, ouco, p, p$iterator; inco = 0; ouco = 0; for (p$iterator = new ArrayList$1(node.ports); p$iterator.i < p$iterator.this$01.array.length;) { p = castTo($next_6(p$iterator), 12); inco = toInt_0(add_20(inco, $count_0($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(p.incomingEdges, 16)), new NetworkSimplexPlacer$lambda$27$Type)))); ouco = toInt_0(add_20(ouco, $count_0($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(p.outgoingEdges, 16)), new NetworkSimplexPlacer$lambda$28$Type)))); if (inco > 1 || ouco > 1) { return 2; } } if (inco + ouco == 1) { return 2; } return 0; } function isFlexibleNode(lNode){ var additionalPortSpacing, eastPorts, nf, nf0, pc, portSpacing, requiredEastHeight, requiredWestHeight, westPorts; if (lNode.type_0 != ($clinit_LNode$NodeType() , NORMAL)) { return false; } if (lNode.ports.array.length <= 1) { return false; } pc = castTo($getProperty(lNode, ($clinit_LayeredOptions() , PORT_CONSTRAINTS_0)), 101); if (pc == ($clinit_PortConstraints() , FIXED_POS)) { return false; } nf0 = ($clinit_NodeFlexibility() , (!lNode.propertyMap?($clinit_Collections() , $clinit_Collections() , EMPTY_MAP):lNode.propertyMap).containsKey(NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_0)?(nf = castTo($getProperty(lNode, NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_0), 203)):(nf = castTo($getProperty($getGraph(lNode), NODE_PLACEMENT_NETWORK_SIMPLEX_NODE_FLEXIBILITY_DEFAULT_0), 203)) , nf); if (nf0 == NONE_8) { return false; } if (!(nf0 == NODE_SIZE_WHERE_SPACE_PERMITS || nf0 == NODE_SIZE)) { portSpacing = $doubleValue(castToDouble(getIndividualOrDefault(lNode, SPACING_PORT_PORT))); additionalPortSpacing = castTo($getProperty(lNode, SPACING_PORTS_SURROUNDING), 140); !additionalPortSpacing && (additionalPortSpacing = new ElkMargin_1(portSpacing, portSpacing, portSpacing, portSpacing)); westPorts = $getPortSideView(lNode, ($clinit_PortSide() , WEST_2)); requiredWestHeight = additionalPortSpacing.top_0 + additionalPortSpacing.bottom + (westPorts.size_1() - 1) * portSpacing; if (requiredWestHeight > lNode.size_0.y_0) { return false; } eastPorts = $getPortSideView(lNode, EAST_2); requiredEastHeight = additionalPortSpacing.top_0 + additionalPortSpacing.bottom + (eastPorts.size_1() - 1) * portSpacing; if (requiredEastHeight > lNode.size_0.y_0) { return false; } } return true; } function isHandledEdge(edge){ $clinit_NetworkSimplexPlacer(); return !$isSelfLoop(edge) && !(!$isSelfLoop(edge) && edge.source.owner.layer == edge.target.owner.layer); } function lambda$0_32(p_0){ $clinit_NetworkSimplexPlacer(); return ($clinit_PortSide() , SIDES_EAST_WEST).contains(p_0.side); } function lambda$19(minLayer_0, globalSource_1, usedLayers_2, globalSink_3, nr_4){ $clinit_NetworkSimplexPlacer(); $create_1($target($source($delta($weight(new NEdge$NEdgeBuilder, 0), nr_4.tail.layer - minLayer_0), globalSource_1), nr_4.tail)); $create_1($target($source($delta($weight(new NEdge$NEdgeBuilder, 0), usedLayers_2 - nr_4.head.layer), nr_4.head), globalSink_3)); } function lambda$20(sizeDelta_0, p_1){ $clinit_NetworkSimplexPlacer(); return p_1.pos.y_0 += sizeDelta_0; } function length_1(edge){ return $wnd.Math.abs(edge.source.layer - edge.target.layer) - edge.delta; } defineClass(1428, 1, $intern_113, NetworkSimplexPlacer); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_17(graph){ return castTo($getProperty(castTo(graph, 36), ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21).contains(($clinit_GraphProperties() , EXTERNAL_PORTS))?HIERARCHY_PROCESSING_ADDITIONS_1:null; } ; _.process = function process_72(layeredGraph, progressMonitor){ $process_75(this, castTo(layeredGraph, 36), progressMonitor); } ; _.edgeCount = 0; _.nodeCount = 0; var HIERARCHY_PROCESSING_ADDITIONS_1; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer', 1428); function NetworkSimplexPlacer$0methodref$compare$Type(){ } defineClass(1447, 1, $intern_88, NetworkSimplexPlacer$0methodref$compare$Type); _.compare_1 = function compare_77(arg0, arg1){ return compare_5(castTo(arg0, 17).value_0, castTo(arg1, 17).value_0); } ; _.equals_0 = function equals_162(other){ return this === other; } ; _.reversed = function reversed_69(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$0methodref$compare$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/0methodref$compare$Type', 1447); function NetworkSimplexPlacer$1methodref$compare$Type(){ } defineClass(1449, 1, $intern_88, NetworkSimplexPlacer$1methodref$compare$Type); _.compare_1 = function compare_78(arg0, arg1){ return compare_5(castTo(arg0, 17).value_0, castTo(arg1, 17).value_0); } ; _.equals_0 = function equals_163(other){ return this === other; } ; _.reversed = function reversed_70(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$1methodref$compare$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/1methodref$compare$Type', 1449); function NetworkSimplexPlacer$EdgeRep(left, right){ this.left = left; this.right = right; } defineClass(655, 1, {655:1}, NetworkSimplexPlacer$EdgeRep); var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$EdgeRep_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/EdgeRep', 655); function NetworkSimplexPlacer$NodeRep(origin_0, isFlexible, top_0, bottom){ this.origin_0 = origin_0; this.isFlexible = isFlexible; this.head = top_0; this.tail = bottom; } defineClass(412, 1, {412:1}, NetworkSimplexPlacer$NodeRep); _.isFlexible = false; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$NodeRep_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/NodeRep', 412); function $containsFlexibleNode(this$static, p){ var nf; if (this$static.array.length == 0) { return false; } nf = getNodeFlexibility((checkCriticalElementIndex(0, this$static.array.length) , castTo(this$static.array[0], 18)).source.owner); $clinit_NetworkSimplexPlacer(); if (nf == ($clinit_NodeFlexibility() , NODE_SIZE_WHERE_SPACE_PERMITS) || nf == NODE_SIZE) { return true; } return $anyMatch($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static, 16)), new NetworkSimplexPlacer$Path$lambda$2$Type), new NetworkSimplexPlacer$Path$lambda$3$Type(p)); } function $containsLongEdgeDummy(this$static){ if (this$static.array.length == 0) { return false; } if ((checkCriticalElementIndex(0, this$static.array.length) , castTo(this$static.array[0], 18)).source.owner.type_0 == ($clinit_LNode$NodeType() , LONG_EDGE)) { return true; } return $anyMatch($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static, 16)), new NetworkSimplexPlacer$Path$lambda$0$Type), new NetworkSimplexPlacer$Path$lambda$1$Type); } function $orderTwoPath(this$static){ var first, second; if (this$static.array.length != 2) { throw toJs(new IllegalStateException_0('Order only allowed for two paths.')); } first = (checkCriticalElementIndex(0, this$static.array.length) , castTo(this$static.array[0], 18)); second = (checkCriticalElementIndex(1, this$static.array.length) , castTo(this$static.array[1], 18)); if (first.target.owner != second.source.owner) { this$static.array.length = 0; push_1(this$static.array, second); push_1(this$static.array, first); } } function NetworkSimplexPlacer$Path(){ ArrayList.call(this); } defineClass(515, 13, {3:1, 4:1, 20:1, 31:1, 56:1, 13:1, 16:1, 15:1, 59:1, 515:1}, NetworkSimplexPlacer$Path); var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$Path_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/Path', 515); function NetworkSimplexPlacer$Path$lambda$0$Type(){ } defineClass(1429, 1, {}, NetworkSimplexPlacer$Path$lambda$0$Type); _.apply_0 = function apply_136(arg0){ return castTo(arg0, 18).target.owner.type_0; } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$Path$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/Path/lambda$0$Type', 1429); function NetworkSimplexPlacer$Path$lambda$1$Type(){ } defineClass(1430, 1, $intern_40, NetworkSimplexPlacer$Path$lambda$1$Type); _.test_0 = function test_88(arg0){ return castTo(arg0, 273) == ($clinit_LNode$NodeType() , LONG_EDGE); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$Path$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/Path/lambda$1$Type', 1430); function NetworkSimplexPlacer$Path$lambda$2$Type(){ } defineClass(1431, 1, {}, NetworkSimplexPlacer$Path$lambda$2$Type); _.apply_0 = function apply_137(arg0){ return castTo(arg0, 18).target.owner; } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$Path$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/Path/lambda$2$Type', 1431); function NetworkSimplexPlacer$Path$lambda$3$Type(p_0){ this.p_0 = p_0; } defineClass(1432, 1, $intern_40, NetworkSimplexPlacer$Path$lambda$3$Type); _.test_0 = function test_89(arg0){ return $test_0(getNodeFlexibility(castTo(arg0, 10))); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$Path$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/Path/lambda$3$Type', 1432); function NetworkSimplexPlacer$lambda$0$Type(){ } defineClass(1433, 1, $intern_40, NetworkSimplexPlacer$lambda$0$Type); _.test_0 = function test_90(arg0){ return lambda$0_32(castTo(arg0, 12)); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$0$Type', 1433); function NetworkSimplexPlacer$lambda$1$Type($$outer_0, singleNode_1){ this.$$outer_0 = $$outer_0; this.singleNode_1 = singleNode_1; } defineClass(1434, 1, $intern_19, NetworkSimplexPlacer$lambda$1$Type); _.accept = function accept_123(arg0){ $lambda$1_5(this.$$outer_0, this.singleNode_1, castTo(arg0, 12)); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$1$Type', 1434); function NetworkSimplexPlacer$lambda$10$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1443, 1, $intern_19, NetworkSimplexPlacer$lambda$10$Type); _.accept = function accept_124(arg0){ $lambda$10(this.$$outer_0, castTo(arg0, 18)); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$10$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$10$Type', 1443); function NetworkSimplexPlacer$lambda$11$Type(){ } defineClass(1444, 1, {}, NetworkSimplexPlacer$lambda$11$Type); _.apply_0 = function apply_138(arg0){ return $clinit_NetworkSimplexPlacer() , new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 30).nodes, 16)); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$11$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$11$Type', 1444); function NetworkSimplexPlacer$lambda$12$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1445, 1, $intern_19, NetworkSimplexPlacer$lambda$12$Type); _.accept = function accept_125(arg0){ $lambda$12(this.$$outer_0, castTo(arg0, 10)); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$12$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$12$Type', 1445); function NetworkSimplexPlacer$lambda$13$Type(){ } defineClass(1446, 1, {}, NetworkSimplexPlacer$lambda$13$Type); _.apply_0 = function apply_139(arg0){ return $clinit_NetworkSimplexPlacer() , valueOf_3(castTo(arg0, 125).layer); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$13$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$13$Type', 1446); function NetworkSimplexPlacer$lambda$15$Type(){ } defineClass(1448, 1, {}, NetworkSimplexPlacer$lambda$15$Type); _.apply_0 = function apply_140(arg0){ return $clinit_NetworkSimplexPlacer() , valueOf_3(castTo(arg0, 125).layer); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$15$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$15$Type', 1448); function NetworkSimplexPlacer$lambda$17$Type(){ } defineClass(1450, 1, $intern_40, NetworkSimplexPlacer$lambda$17$Type); _.test_0 = function test_91(arg0){ return $clinit_NetworkSimplexPlacer() , castTo(arg0, 412).origin_0.type_0 == ($clinit_LNode$NodeType() , NORMAL); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$17$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$17$Type', 1450); function NetworkSimplexPlacer$lambda$18$Type(){ } defineClass(1451, 1, $intern_40, NetworkSimplexPlacer$lambda$18$Type); _.test_0 = function test_92(arg0){ return $clinit_NetworkSimplexPlacer() , castTo(arg0, 412).origin_0.ports.array.length > 1; } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$18$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$18$Type', 1451); function NetworkSimplexPlacer$lambda$19$Type(minLayer_0, globalSource_1, usedLayers_2, globalSink_3){ this.minLayer_0 = minLayer_0; this.globalSource_1 = globalSource_1; this.usedLayers_2 = usedLayers_2; this.globalSink_3 = globalSink_3; } defineClass(1452, 1, $intern_19, NetworkSimplexPlacer$lambda$19$Type); _.accept = function accept_126(arg0){ lambda$19(this.minLayer_0, this.globalSource_1, this.usedLayers_2, this.globalSink_3, castTo(arg0, 412)); } ; _.minLayer_0 = 0; _.usedLayers_2 = 0; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$19$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$19$Type', 1452); function NetworkSimplexPlacer$lambda$2$Type(){ } defineClass(1435, 1, {}, NetworkSimplexPlacer$lambda$2$Type); _.apply_0 = function apply_141(arg0){ return $clinit_NetworkSimplexPlacer() , new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 30).nodes, 16)); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$2$Type', 1435); function NetworkSimplexPlacer$lambda$20$Type(sizeDelta_0){ this.sizeDelta_0 = sizeDelta_0; } defineClass(1453, 1, $intern_19, NetworkSimplexPlacer$lambda$20$Type); _.accept = function accept_127(arg0){ lambda$20(this.sizeDelta_0, castTo(arg0, 12)); } ; _.sizeDelta_0 = 0; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$20$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$20$Type', 1453); function NetworkSimplexPlacer$lambda$21$Type(){ } defineClass(1454, 1, {}, NetworkSimplexPlacer$lambda$21$Type); _.apply_0 = function apply_142(arg0){ return $clinit_NetworkSimplexPlacer() , new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 30).nodes, 16)); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$21$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$21$Type', 1454); function NetworkSimplexPlacer$lambda$22$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1455, 1, $intern_19, NetworkSimplexPlacer$lambda$22$Type); _.accept = function accept_128(arg0){ $lambda$22(this.$$outer_0, castTo(arg0, 10)); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$22$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$22$Type', 1455); function $test_0(arg0){ return $clinit_NetworkSimplexPlacer() , $isFlexibleSizeWhereSpacePermits(castTo(arg0, 203)); } function NetworkSimplexPlacer$lambda$23$Type(){ } defineClass(1456, 1, $intern_40, NetworkSimplexPlacer$lambda$23$Type); _.test_0 = function test_93(arg0){ return $test_0(arg0); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$23$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$23$Type', 1456); function NetworkSimplexPlacer$lambda$24$Type(){ } defineClass(1457, 1, {}, NetworkSimplexPlacer$lambda$24$Type); _.apply_0 = function apply_143(arg0){ return $clinit_NetworkSimplexPlacer() , new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 30).nodes, 16)); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$24$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$24$Type', 1457); function NetworkSimplexPlacer$lambda$25$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1458, 1, $intern_40, NetworkSimplexPlacer$lambda$25$Type); _.test_0 = function test_94(arg0){ return $lambda$25(this.$$outer_0, castTo(arg0, 10)); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$25$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$25$Type', 1458); function NetworkSimplexPlacer$lambda$26$Type($$outer_0, paths_1){ this.$$outer_0 = $$outer_0; this.paths_1 = paths_1; } defineClass(1459, 1, $intern_19, NetworkSimplexPlacer$lambda$26$Type); _.accept = function accept_129(arg0){ $lambda$26(this.$$outer_0, this.paths_1, castTo(arg0, 10)); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$26$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$26$Type', 1459); function NetworkSimplexPlacer$lambda$27$Type(){ } defineClass(1460, 1, $intern_40, NetworkSimplexPlacer$lambda$27$Type); _.test_0 = function test_95(arg0){ return $clinit_NetworkSimplexPlacer() , !$isSelfLoop(castTo(arg0, 18)); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$27$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$27$Type', 1460); function NetworkSimplexPlacer$lambda$28$Type(){ } defineClass(1461, 1, $intern_40, NetworkSimplexPlacer$lambda$28$Type); _.test_0 = function test_96(arg0){ return $clinit_NetworkSimplexPlacer() , !$isSelfLoop(castTo(arg0, 18)); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$28$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$28$Type', 1461); function NetworkSimplexPlacer$lambda$29$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1462, 1, {}, NetworkSimplexPlacer$lambda$29$Type); _.apply_3 = function apply_144(arg0, arg1){ return $lambda$29(this.$$outer_0, castTo(arg0, 30), castTo(arg1, 30)); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$29$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$29$Type', 1462); function NetworkSimplexPlacer$lambda$3$Type(){ } defineClass(1436, 1, {}, NetworkSimplexPlacer$lambda$3$Type); _.apply_0 = function apply_145(arg0){ return $clinit_NetworkSimplexPlacer() , new StreamImpl(null, new Spliterators$IteratorSpliterator_0(new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(castTo(arg0, 10)).val$inputs1.iterator_0(), new Iterables$10)))); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$3$Type', 1436); function NetworkSimplexPlacer$lambda$4$Type(){ } defineClass(1437, 1, $intern_40, NetworkSimplexPlacer$lambda$4$Type); _.test_0 = function test_97(arg0){ return $clinit_NetworkSimplexPlacer() , isHandledEdge(castTo(arg0, 18)); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$4$Type', 1437); function NetworkSimplexPlacer$lambda$5$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1438, 1, $intern_19, NetworkSimplexPlacer$lambda$5$Type); _.accept = function accept_130(arg0){ $transformEdge_0(this.$$outer_0, castTo(arg0, 18)); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$5$Type', 1438); function NetworkSimplexPlacer$lambda$6$Type(){ } defineClass(1439, 1, {}, NetworkSimplexPlacer$lambda$6$Type); _.apply_0 = function apply_146(arg0){ return $clinit_NetworkSimplexPlacer() , new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 30).nodes, 16)); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$6$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$6$Type', 1439); function NetworkSimplexPlacer$lambda$7$Type(){ } defineClass(1440, 1, $intern_40, NetworkSimplexPlacer$lambda$7$Type); _.test_0 = function test_98(arg0){ return $clinit_NetworkSimplexPlacer() , castTo(arg0, 10).type_0 == ($clinit_LNode$NodeType() , NORMAL); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$7$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$7$Type', 1440); function NetworkSimplexPlacer$lambda$8$Type(){ } defineClass(1441, 1, {}, NetworkSimplexPlacer$lambda$8$Type); _.apply_0 = function apply_147(arg0){ return $clinit_NetworkSimplexPlacer() , new StreamImpl(null, new Spliterators$IteratorSpliterator_0(new Iterators$ConcatenatedIterator(transform_2($getConnectedEdges_0(castTo(arg0, 10)).val$inputs1.iterator_0(), new Iterables$10)))); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$8$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$8$Type', 1441); function NetworkSimplexPlacer$lambda$9$Type(){ } defineClass(1442, 1, $intern_40, NetworkSimplexPlacer$lambda$9$Type); _.test_0 = function test_99(arg0){ return $clinit_NetworkSimplexPlacer() , $isInLayerEdge(castTo(arg0, 18)); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_NetworkSimplexPlacer$lambda$9$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'NetworkSimplexPlacer/lambda$9$Type', 1442); function $clinit_SimpleNodePlacer(){ $clinit_SimpleNodePlacer = emptyMethod; HIERARCHY_PROCESSING_ADDITIONS_2 = $addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P5_EDGE_ROUTING), ($clinit_IntermediateProcessorStrategy() , HIERARCHICAL_PORT_POSITION_PROCESSOR)); } function $process_76(layeredGraph, monitor){ var lastNode, layer, layer$iterator, layer$iterator0, layerSize, maxHeight, node, node$iterator, pos, spacings; monitor.begin('Simple node placement', 1); spacings = castTo($getProperty(layeredGraph, ($clinit_InternalProperties_1() , SPACINGS)), 312); maxHeight = 0; for (layer$iterator0 = new ArrayList$1(layeredGraph.layers); layer$iterator0.i < layer$iterator0.this$01.array.length;) { layer = castTo($next_6(layer$iterator0), 30); layerSize = layer.size_0; layerSize.y_0 = 0; lastNode = null; for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); !!lastNode && (layerSize.y_0 += $getLocalSpacing_0(node, lastNode, spacings.nodeTypeSpacingOptionsVertical)); layerSize.y_0 += node.margin.top_0 + node.size_0.y_0 + node.margin.bottom; lastNode = node; } maxHeight = $wnd.Math.max(maxHeight, layerSize.y_0); } for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); layerSize = layer.size_0; pos = (maxHeight - layerSize.y_0) / 2; lastNode = null; for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); !!lastNode && (pos += $getLocalSpacing_0(node, lastNode, spacings.nodeTypeSpacingOptionsVertical)); pos += node.margin.top_0; node.pos.y_0 = pos; pos += node.size_0.y_0 + node.margin.bottom; lastNode = node; } } monitor.done_1(); } function SimpleNodePlacer(){ $clinit_SimpleNodePlacer(); } defineClass(1424, 1, $intern_113, SimpleNodePlacer); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_18(graph){ return castTo($getProperty(castTo(graph, 36), ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21).contains(($clinit_GraphProperties() , EXTERNAL_PORTS))?HIERARCHY_PROCESSING_ADDITIONS_2:null; } ; _.process = function process_73(layeredGraph, monitor){ $process_76(castTo(layeredGraph, 36), monitor); } ; var HIERARCHY_PROCESSING_ADDITIONS_2; var Lorg_eclipse_elk_alg_layered_p4nodes_SimpleNodePlacer_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes', 'SimpleNodePlacer', 1424); function $calculateDelta(this$static, src_0, tgt){ var srcPos, tgtPos; srcPos = $doubleValue(this$static.y_0[src_0.owner.id_0]) + $doubleValue(this$static.innerShift[src_0.owner.id_0]) + src_0.pos.y_0 + src_0.anchor.y_0; tgtPos = $doubleValue(this$static.y_0[tgt.owner.id_0]) + $doubleValue(this$static.innerShift[tgt.owner.id_0]) + tgt.pos.y_0 + tgt.anchor.y_0; return tgtPos - srcPos; } function $checkSpaceAbove(this$static, blockRoot, delta, ni){ var availableSpace, current, maxYNeighbor, minYCurrent, neighbor, rootNode, rootNode0, rootNode1; availableSpace = delta; rootNode0 = blockRoot; current = rootNode0; do { current = this$static.align_0[current.id_0]; minYCurrent = (rootNode1 = this$static.root[current.id_0] , $doubleValue(this$static.y_0[rootNode1.id_0]) + $doubleValue(this$static.innerShift[current.id_0]) - current.margin.top_0); neighbor = $getUpperNeighbor(current, ni); if (neighbor) { maxYNeighbor = (rootNode = this$static.root[neighbor.id_0] , $doubleValue(this$static.y_0[rootNode.id_0]) + $doubleValue(this$static.innerShift[neighbor.id_0]) + neighbor.size_0.y_0 + neighbor.margin.bottom); availableSpace = $wnd.Math.min(availableSpace, minYCurrent - (maxYNeighbor + $getVerticalSpacing_0(this$static.spacings, current, neighbor))); } } while (rootNode0 != current); return availableSpace; } function $checkSpaceBelow(this$static, blockRoot, delta, ni){ var availableSpace, current, maxYCurrent, minYNeighbor, neighbor, rootNode, rootNode0, rootNode1; availableSpace = delta; rootNode0 = blockRoot; current = rootNode0; do { current = this$static.align_0[current.id_0]; maxYCurrent = (rootNode1 = this$static.root[current.id_0] , $doubleValue(this$static.y_0[rootNode1.id_0]) + $doubleValue(this$static.innerShift[current.id_0]) + current.size_0.y_0 + current.margin.bottom); neighbor = $getLowerNeighbor(current, ni); if (neighbor) { minYNeighbor = (rootNode = this$static.root[neighbor.id_0] , $doubleValue(this$static.y_0[rootNode.id_0]) + $doubleValue(this$static.innerShift[neighbor.id_0]) - neighbor.margin.top_0); availableSpace = $wnd.Math.min(availableSpace, minYNeighbor - (maxYCurrent + $getVerticalSpacing_0(this$static.spacings, current, neighbor))); } } while (rootNode0 != current); return availableSpace; } function $getLowerNeighbor(n, ni){ var l, layerIndex; l = n.layer; layerIndex = ni.nodeIndex[n.id_0]; if (layerIndex < l.nodes.array.length - 1) { return castTo($get_11(l.nodes, layerIndex + 1), 10); } return null; } function $getUpperNeighbor(n, ni){ var l, layerIndex; l = n.layer; layerIndex = ni.nodeIndex[n.id_0]; if (layerIndex > 0) { return castTo($get_11(l.nodes, layerIndex - 1), 10); } return null; } function $layoutSize(this$static){ var layer, layer$iterator, max_0, min_0, n, n$iterator, yMax, yMin; min_0 = $intern_60; max_0 = $intern_61; for (layer$iterator = new ArrayList$1(this$static.layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); for (n$iterator = new ArrayList$1(layer.nodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); yMin = $doubleValue(this$static.y_0[n.id_0]); yMax = yMin + $doubleValue(this$static.blockSize[this$static.root[n.id_0].id_0]); min_0 = $wnd.Math.min(min_0, yMin); max_0 = $wnd.Math.max(max_0, yMax); } } return max_0 - min_0; } function $shiftBlock(this$static, rootNode, delta){ var current, newPos; current = rootNode; do { newPos = $doubleValue(this$static.y_0[current.id_0]) + delta; this$static.y_0[current.id_0] = newPos; current = this$static.align_0[current.id_0]; } while (current != rootNode); } function BKAlignedLayout(layeredGraph, nodeCount, vdir, hdir){ this.layeredGraph = layeredGraph; this.spacings = castTo($getProperty(layeredGraph, ($clinit_InternalProperties_1() , SPACINGS)), 312); this.root = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LNode_2_classLit, $intern_107, 10, nodeCount, 0, 1); this.blockSize = initUnidimensionalArray(Ljava_lang_Double_2_classLit, $intern_16, 345, nodeCount, 7, 1); this.align_0 = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LNode_2_classLit, $intern_107, 10, nodeCount, 0, 1); this.innerShift = initUnidimensionalArray(Ljava_lang_Double_2_classLit, $intern_16, 345, nodeCount, 7, 1); this.sink = initUnidimensionalArray(Lorg_eclipse_elk_alg_layered_graph_LNode_2_classLit, $intern_107, 10, nodeCount, 0, 1); this.shift_0 = initUnidimensionalArray(Ljava_lang_Double_2_classLit, $intern_16, 345, nodeCount, 7, 1); this.y_0 = initUnidimensionalArray(Ljava_lang_Double_2_classLit, $intern_16, 345, nodeCount, 7, 1); this.su = initUnidimensionalArray(Ljava_lang_Boolean_2_classLit, $intern_16, 485, nodeCount, 8, 1); fill_2(this.su, ($clinit_Boolean() , false)); this.od = initUnidimensionalArray(Ljava_lang_Boolean_2_classLit, $intern_16, 485, nodeCount, 8, 1); fill_2(this.od, true); this.vdir = vdir; this.hdir = hdir; } defineClass(185, 1, {185:1}, BKAlignedLayout); _.toString_0 = function toString_103(){ var result; result = ''; this.hdir == ($clinit_BKAlignedLayout$HDirection() , RIGHT_3)?(result += 'RIGHT'):this.hdir == LEFT_3 && (result += 'LEFT'); this.vdir == ($clinit_BKAlignedLayout$VDirection() , DOWN_0)?(result += 'DOWN'):this.vdir == UP_0?(result += 'UP'):(result += 'BALANCED'); return result; } ; var Lorg_eclipse_elk_alg_layered_p4nodes_bk_BKAlignedLayout_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes.bk', 'BKAlignedLayout', 185); function $clinit_BKAlignedLayout$HDirection(){ $clinit_BKAlignedLayout$HDirection = emptyMethod; RIGHT_3 = new BKAlignedLayout$HDirection('RIGHT', 0); LEFT_3 = new BKAlignedLayout$HDirection('LEFT', 1); } function BKAlignedLayout$HDirection(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_67(name_0){ $clinit_BKAlignedLayout$HDirection(); return valueOf(($clinit_BKAlignedLayout$HDirection$Map() , $MAP_57), name_0); } function values_75(){ $clinit_BKAlignedLayout$HDirection(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_p4nodes_bk_BKAlignedLayout$HDirection_2_classLit, 1), $intern_37, 523, 0, [RIGHT_3, LEFT_3]); } defineClass(523, 22, {3:1, 34:1, 22:1, 523:1}, BKAlignedLayout$HDirection); var LEFT_3, RIGHT_3; var Lorg_eclipse_elk_alg_layered_p4nodes_bk_BKAlignedLayout$HDirection_2_classLit = createForEnum('org.eclipse.elk.alg.layered.p4nodes.bk', 'BKAlignedLayout/HDirection', 523, Ljava_lang_Enum_2_classLit, values_75, valueOf_67); function $clinit_BKAlignedLayout$HDirection$Map(){ $clinit_BKAlignedLayout$HDirection$Map = emptyMethod; $MAP_57 = createValueOfMap(($clinit_BKAlignedLayout$HDirection() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_p4nodes_bk_BKAlignedLayout$HDirection_2_classLit, 1), $intern_37, 523, 0, [RIGHT_3, LEFT_3]))); } var $MAP_57; function $clinit_BKAlignedLayout$VDirection(){ $clinit_BKAlignedLayout$VDirection = emptyMethod; DOWN_0 = new BKAlignedLayout$VDirection('DOWN', 0); UP_0 = new BKAlignedLayout$VDirection('UP', 1); } function BKAlignedLayout$VDirection(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_68(name_0){ $clinit_BKAlignedLayout$VDirection(); return valueOf(($clinit_BKAlignedLayout$VDirection$Map() , $MAP_58), name_0); } function values_76(){ $clinit_BKAlignedLayout$VDirection(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_p4nodes_bk_BKAlignedLayout$VDirection_2_classLit, 1), $intern_37, 522, 0, [DOWN_0, UP_0]); } defineClass(522, 22, {3:1, 34:1, 22:1, 522:1}, BKAlignedLayout$VDirection); var DOWN_0, UP_0; var Lorg_eclipse_elk_alg_layered_p4nodes_bk_BKAlignedLayout$VDirection_2_classLit = createForEnum('org.eclipse.elk.alg.layered.p4nodes.bk', 'BKAlignedLayout/VDirection', 522, Ljava_lang_Enum_2_classLit, values_76, valueOf_68); function $clinit_BKAlignedLayout$VDirection$Map(){ $clinit_BKAlignedLayout$VDirection$Map = emptyMethod; $MAP_58 = createValueOfMap(($clinit_BKAlignedLayout$VDirection() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_p4nodes_bk_BKAlignedLayout$VDirection_2_classLit, 1), $intern_37, 522, 0, [DOWN_0, UP_0]))); } var $MAP_58; function $insideBlockShift(bal){ var blocks, current, edge, entry, next, nextInnerShift, outerIter, portPosDiff, root, root$iterator, spaceAbove, spaceBelow; blocks = getBlocks(bal); for (root$iterator = (outerIter = (new AbstractMap$1(blocks)).this$01.entrySet_0().iterator_0() , new AbstractMap$1$1(outerIter)); root$iterator.val$outerIter2.hasNext_0();) { root = (entry = castTo(root$iterator.val$outerIter2.next_1(), 44) , castTo(entry.getKey(), 10)); spaceAbove = 0; spaceBelow = 0; spaceAbove = root.margin.top_0; spaceBelow = root.size_0.y_0 + root.margin.bottom; bal.innerShift[root.id_0] = 0; current = root; while ((next = bal.align_0[current.id_0]) != root) { edge = getEdge(current, next); portPosDiff = 0; bal.hdir == ($clinit_BKAlignedLayout$HDirection() , LEFT_3)?(portPosDiff = edge.target.pos.y_0 + edge.target.anchor.y_0 - edge.source.pos.y_0 - edge.source.anchor.y_0):(portPosDiff = edge.source.pos.y_0 + edge.source.anchor.y_0 - edge.target.pos.y_0 - edge.target.anchor.y_0); nextInnerShift = $doubleValue(bal.innerShift[current.id_0]) + portPosDiff; bal.innerShift[next.id_0] = nextInnerShift; spaceAbove = $wnd.Math.max(spaceAbove, next.margin.top_0 - nextInnerShift); spaceBelow = $wnd.Math.max(spaceBelow, nextInnerShift + next.size_0.y_0 + next.margin.bottom); current = next; } current = root; do { bal.innerShift[current.id_0] = $doubleValue(bal.innerShift[current.id_0]) + spaceAbove; current = bal.align_0[current.id_0]; } while (current != root); bal.blockSize[root.id_0] = spaceAbove + spaceBelow; } } function $verticalAlignment(this$static, bal, markedEdges){ var d, high, layer, layer$iterator, layer$iterator0, layers, low, m, neighbors, nodes, r, u_m, u_m_pair, um, um_pair, v, v$iterator, v_i_k, v_i_k$iterator; for (layer$iterator0 = new ArrayList$1(this$static.layeredGraph.layers); layer$iterator0.i < layer$iterator0.this$01.array.length;) { layer = castTo($next_6(layer$iterator0), 30); for (v$iterator = new ArrayList$1(layer.nodes); v$iterator.i < v$iterator.this$01.array.length;) { v = castTo($next_6(v$iterator), 10); bal.root[v.id_0] = v; bal.align_0[v.id_0] = v; bal.innerShift[v.id_0] = 0; } } layers = this$static.layeredGraph.layers; bal.hdir == ($clinit_BKAlignedLayout$HDirection() , LEFT_3) && (layers = reverse_0(layers)); for (layer$iterator = layers.iterator_0(); layer$iterator.hasNext_0();) { layer = castTo(layer$iterator.next_1(), 30); r = -1; nodes = layer.nodes; if (bal.vdir == ($clinit_BKAlignedLayout$VDirection() , UP_0)) { r = $intern_0; nodes = reverse_0(nodes); } for (v_i_k$iterator = nodes.iterator_0(); v_i_k$iterator.hasNext_0();) { v_i_k = castTo(v_i_k$iterator.next_1(), 10); neighbors = null; bal.hdir == LEFT_3?(neighbors = castTo($get_11(this$static.ni.rightNeighbors, v_i_k.id_0), 15)):(neighbors = castTo($get_11(this$static.ni.leftNeighbors, v_i_k.id_0), 15)); if (neighbors.size_1() > 0) { d = neighbors.size_1(); low = round_int($wnd.Math.floor((d + 1) / 2)) - 1; high = round_int($wnd.Math.ceil((d + 1) / 2)) - 1; if (bal.vdir == UP_0) { for (m = high; m >= low; m--) { if (bal.align_0[v_i_k.id_0] == v_i_k) { u_m_pair = castTo(neighbors.get_0(m), 42); u_m = castTo(u_m_pair.first, 10); if (!$contains_6(markedEdges, u_m_pair.second) && r > this$static.ni.nodeIndex[u_m.id_0]) { bal.align_0[u_m.id_0] = v_i_k; bal.root[v_i_k.id_0] = bal.root[u_m.id_0]; bal.align_0[v_i_k.id_0] = bal.root[v_i_k.id_0]; bal.od[bal.root[v_i_k.id_0].id_0] = ($clinit_Boolean() , $booleanValue(bal.od[bal.root[v_i_k.id_0].id_0]) & v_i_k.type_0 == ($clinit_LNode$NodeType() , LONG_EDGE)?true:false); r = this$static.ni.nodeIndex[u_m.id_0]; } } } } else { for (m = low; m <= high; m++) { if (bal.align_0[v_i_k.id_0] == v_i_k) { um_pair = castTo(neighbors.get_0(m), 42); um = castTo(um_pair.first, 10); if (!$contains_6(markedEdges, um_pair.second) && r < this$static.ni.nodeIndex[um.id_0]) { bal.align_0[um.id_0] = v_i_k; bal.root[v_i_k.id_0] = bal.root[um.id_0]; bal.align_0[v_i_k.id_0] = bal.root[v_i_k.id_0]; bal.od[bal.root[v_i_k.id_0].id_0] = ($clinit_Boolean() , $booleanValue(bal.od[bal.root[v_i_k.id_0].id_0]) & v_i_k.type_0 == ($clinit_LNode$NodeType() , LONG_EDGE)?true:false); r = this$static.ni.nodeIndex[um.id_0]; } } } } } } } } function BKAligner(layeredGraph, ni){ this.layeredGraph = layeredGraph; this.ni = ni; } defineClass(1699, 1, {}, BKAligner); var Lorg_eclipse_elk_alg_layered_p4nodes_bk_BKAligner_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes.bk', 'BKAligner', 1699); function $getOrCreateClassNode(this$static, sinkNode){ var node; node = castTo($get_10(this$static.sinkNodes, sinkNode), 467); if (!node) { node = new BKCompactor$ClassNode; node.node = sinkNode; $put_6(this$static.sinkNodes, node.node, node); } return node; } function $horizontalCompaction(this$static, bal){ var layer, layer$iterator, layer$iterator0, layer$iterator1, layers, node, node$iterator, nodes, sinkShift, v, v$iterator; for (layer$iterator0 = new ArrayList$1(this$static.layeredGraph.layers); layer$iterator0.i < layer$iterator0.this$01.array.length;) { layer = castTo($next_6(layer$iterator0), 30); for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); bal.sink[node.id_0] = node; bal.shift_0[node.id_0] = bal.vdir == ($clinit_BKAlignedLayout$VDirection() , UP_0)?$intern_61:$intern_60; } } $reset(this$static.sinkNodes); layers = this$static.layeredGraph.layers; bal.hdir == ($clinit_BKAlignedLayout$HDirection() , LEFT_3) && (layers = reverse_0(layers)); $init_0(this$static.threshStrategy, bal, this$static.ni); fill_2(bal.y_0, null); for (layer$iterator1 = layers.iterator_0(); layer$iterator1.hasNext_0();) { layer = castTo(layer$iterator1.next_1(), 30); nodes = layer.nodes; bal.vdir == ($clinit_BKAlignedLayout$VDirection() , UP_0) && (nodes = reverse_0(nodes)); for (v$iterator = nodes.iterator_0(); v$iterator.hasNext_0();) { v = castTo(v$iterator.next_1(), 10); bal.root[v.id_0] == v && $placeBlock(this$static, v, bal); } } $placeClasses(this$static, bal); for (layer$iterator = layers.iterator_0(); layer$iterator.hasNext_0();) { layer = castTo(layer$iterator.next_1(), 30); for (v$iterator = new ArrayList$1(layer.nodes); v$iterator.i < v$iterator.this$01.array.length;) { v = castTo($next_6(v$iterator), 10); bal.y_0[v.id_0] = bal.y_0[bal.root[v.id_0].id_0]; if (v == bal.root[v.id_0]) { sinkShift = $doubleValue(bal.shift_0[bal.sink[v.id_0].id_0]); (bal.vdir == ($clinit_BKAlignedLayout$VDirection() , UP_0) && sinkShift > $intern_61 || bal.vdir == DOWN_0 && sinkShift < $intern_60) && (bal.y_0[v.id_0] = $doubleValue(bal.y_0[v.id_0]) + sinkShift); } } } this$static.threshStrategy.postProcess(); } function $placeBlock(this$static, root, bal){ var currentBlockPosition, currentIndexInLayer, currentLayerSize, currentNode, isInitialAssignment, neighbor, neighborRoot, neighborSink, newPosition, requiredSpace, sinkNode, spacing, thresh; if (bal.y_0[root.id_0] != null) { return; } isInitialAssignment = true; bal.y_0[root.id_0] = 0; currentNode = root; thresh = bal.vdir == ($clinit_BKAlignedLayout$VDirection() , DOWN_0)?$intern_61:$intern_60; do { currentIndexInLayer = this$static.ni.nodeIndex[currentNode.id_0]; currentLayerSize = currentNode.layer.nodes.array.length; if (bal.vdir == DOWN_0 && currentIndexInLayer > 0 || bal.vdir == UP_0 && currentIndexInLayer < currentLayerSize - 1) { neighbor = null; neighborRoot = null; bal.vdir == UP_0?(neighbor = castTo($get_11(currentNode.layer.nodes, currentIndexInLayer + 1), 10)):(neighbor = castTo($get_11(currentNode.layer.nodes, currentIndexInLayer - 1), 10)); neighborRoot = bal.root[neighbor.id_0]; $placeBlock(this$static, neighborRoot, bal); thresh = this$static.threshStrategy.calculateThreshold(thresh, root, currentNode); bal.sink[root.id_0] == root && (bal.sink[root.id_0] = bal.sink[neighborRoot.id_0]); if (bal.sink[root.id_0] == bal.sink[neighborRoot.id_0]) { spacing = $getVerticalSpacing_0(this$static.spacings, currentNode, neighbor); if (bal.vdir == UP_0) { currentBlockPosition = $doubleValue(bal.y_0[root.id_0]); newPosition = $doubleValue(bal.y_0[neighborRoot.id_0]) + $doubleValue(bal.innerShift[neighbor.id_0]) - neighbor.margin.top_0 - spacing - currentNode.margin.bottom - currentNode.size_0.y_0 - $doubleValue(bal.innerShift[currentNode.id_0]); if (isInitialAssignment) { isInitialAssignment = false; bal.y_0[root.id_0] = $wnd.Math.min(newPosition, thresh); } else { bal.y_0[root.id_0] = $wnd.Math.min(currentBlockPosition, $wnd.Math.min(newPosition, thresh)); } } else { currentBlockPosition = $doubleValue(bal.y_0[root.id_0]); newPosition = $doubleValue(bal.y_0[neighborRoot.id_0]) + $doubleValue(bal.innerShift[neighbor.id_0]) + neighbor.size_0.y_0 + neighbor.margin.bottom + spacing + currentNode.margin.top_0 - $doubleValue(bal.innerShift[currentNode.id_0]); if (isInitialAssignment) { isInitialAssignment = false; bal.y_0[root.id_0] = $wnd.Math.max(newPosition, thresh); } else { bal.y_0[root.id_0] = $wnd.Math.max(currentBlockPosition, $wnd.Math.max(newPosition, thresh)); } } } else { spacing = $doubleValue(castToDouble($getProperty(this$static.layeredGraph, ($clinit_LayeredOptions() , SPACING_NODE_NODE_0)))); sinkNode = $getOrCreateClassNode(this$static, bal.sink[root.id_0]); neighborSink = $getOrCreateClassNode(this$static, bal.sink[neighborRoot.id_0]); if (bal.vdir == UP_0) { requiredSpace = $doubleValue(bal.y_0[root.id_0]) + $doubleValue(bal.innerShift[currentNode.id_0]) + currentNode.size_0.y_0 + currentNode.margin.bottom + spacing - ($doubleValue(bal.y_0[neighborRoot.id_0]) + $doubleValue(bal.innerShift[neighbor.id_0]) - neighbor.margin.top_0); $addEdge(sinkNode, neighborSink, requiredSpace); } else { requiredSpace = $doubleValue(bal.y_0[root.id_0]) + $doubleValue(bal.innerShift[currentNode.id_0]) - currentNode.margin.top_0 - $doubleValue(bal.y_0[neighborRoot.id_0]) - $doubleValue(bal.innerShift[neighbor.id_0]) - neighbor.size_0.y_0 - neighbor.margin.bottom - spacing; $addEdge(sinkNode, neighborSink, requiredSpace); } } } else { thresh = this$static.threshStrategy.calculateThreshold(thresh, root, currentNode); } currentNode = bal.align_0[currentNode.id_0]; } while (currentNode != root); $finishBlock(this$static.threshStrategy, root); } function $placeClasses(this$static, bal){ var e, e$iterator, entry, n, n$iterator, n$iterator0, outerIter, outerIter0, sinks; sinks = new LinkedList; for (n$iterator0 = (outerIter0 = (new AbstractMap$2(this$static.sinkNodes)).this$01.entrySet_0().iterator_0() , new AbstractMap$2$1(outerIter0)); n$iterator0.val$outerIter2.hasNext_0();) { n = (entry = castTo(n$iterator0.val$outerIter2.next_1(), 44) , castTo(entry.getValue(), 467)); n.indegree == 0 && ($addNode_0(sinks, n, sinks.tail.prev, sinks.tail) , true); } while (sinks.size_0 != 0) { n = castTo(sinks.size_0 == 0?null:(checkCriticalElement(sinks.size_0 != 0) , $removeNode_0(sinks, sinks.header.next_0)), 467); n.classShift == null && (n.classShift = 0); for (e$iterator = new ArrayList$1(n.outgoing); e$iterator.i < e$iterator.this$01.array.length;) { e = castTo($next_6(e$iterator), 663); e.target.classShift == null?(e.target.classShift = $doubleValue(n.classShift) + e.separation):bal.vdir == ($clinit_BKAlignedLayout$VDirection() , DOWN_0)?(e.target.classShift = $wnd.Math.min($doubleValue(e.target.classShift), $doubleValue(n.classShift) + e.separation)):(e.target.classShift = $wnd.Math.max($doubleValue(e.target.classShift), $doubleValue(n.classShift) + e.separation)); --e.target.indegree; e.target.indegree == 0 && $add_7(sinks, e.target); } } for (n$iterator = (outerIter = (new AbstractMap$2(this$static.sinkNodes)).this$01.entrySet_0().iterator_0() , new AbstractMap$2$1(outerIter)); n$iterator.val$outerIter2.hasNext_0();) { n = (entry = castTo(n$iterator.val$outerIter2.next_1(), 44) , castTo(entry.getValue(), 467)); bal.shift_0[n.node.id_0] = n.classShift; } } function BKCompactor(layeredGraph, ni){ this.sinkNodes = new HashMap; this.layeredGraph = layeredGraph; this.ni = ni; this.spacings = castTo($getProperty(layeredGraph, ($clinit_InternalProperties_1() , SPACINGS)), 312); maskUndefined($getProperty(layeredGraph, ($clinit_LayeredOptions() , NODE_PLACEMENT_BK_EDGE_STRAIGHTENING_0))) === maskUndefined(($clinit_EdgeStraighteningStrategy() , IMPROVE_STRAIGHTNESS))?(this.threshStrategy = new ThresholdStrategy$SimpleThresholdStrategy):(this.threshStrategy = new ThresholdStrategy$NullThresholdStrategy); } defineClass(1702, 1, {}, BKCompactor); var Lorg_eclipse_elk_alg_layered_p4nodes_bk_BKCompactor_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes.bk', 'BKCompactor', 1702); function BKCompactor$ClassEdge(){ } defineClass(663, 1, {663:1}, BKCompactor$ClassEdge); _.separation = 0; var Lorg_eclipse_elk_alg_layered_p4nodes_bk_BKCompactor$ClassEdge_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes.bk', 'BKCompactor/ClassEdge', 663); function $addEdge(this$static, target, separation){ var se; se = new BKCompactor$ClassEdge; se.target = target; se.separation = separation; ++target.indegree; $add_3(this$static.outgoing, se); } function BKCompactor$ClassNode(){ this.outgoing = new ArrayList; } defineClass(467, 1, {467:1}, BKCompactor$ClassNode); _.classShift = null; _.indegree = 0; var Lorg_eclipse_elk_alg_layered_p4nodes_bk_BKCompactor$ClassNode_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes.bk', 'BKCompactor/ClassNode', 467); function $clinit_BKNodePlacer(){ $clinit_BKNodePlacer = emptyMethod; HIERARCHY_PROCESSING_ADDITIONS_3 = $addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P5_EDGE_ROUTING), ($clinit_IntermediateProcessorStrategy() , HIERARCHICAL_PORT_POSITION_PROCESSOR)); } function $checkOrderConstraint(layeredGraph, bal, monitor){ var bottom, feasible, layer, layer$iterator, node, node$iterator, pos, previous, top_0; feasible = true; for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); pos = $intern_61; previous = null; for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); top_0 = $doubleValue(bal.y_0[node.id_0]) + $doubleValue(bal.innerShift[node.id_0]) - node.margin.top_0; bottom = $doubleValue(bal.y_0[node.id_0]) + $doubleValue(bal.innerShift[node.id_0]) + node.size_0.y_0 + node.margin.bottom; if (top_0 > pos && bottom > pos) { previous = node; pos = $doubleValue(bal.y_0[node.id_0]) + $doubleValue(bal.innerShift[node.id_0]) + node.size_0.y_0 + node.margin.bottom; } else { feasible = false; monitor.isLoggingEnabled() && monitor.log_0('bk node placement breaks on ' + node + ' which should have been after ' + previous); break; } } if (!feasible) { break; } } monitor.isLoggingEnabled() && monitor.log_0(bal + ' is feasible: ' + feasible); return feasible; } function $createBalancedLayout(this$static, layouts, nodeCount){ var bal, balanced, calculatedYs, i, i0, i1, i2, l, l$iterator, layer, layer$iterator, max_0, min_0, minWidthLayout, n, n$iterator, noOfLayouts, node, node$iterator, nodePosY, shift_0, width_0; noOfLayouts = layouts.array.length; balanced = new BKAlignedLayout(this$static.lGraph, nodeCount, null, null); width_0 = initUnidimensionalArray(D_classLit, $intern_66, 28, noOfLayouts, 15, 1); min_0 = initUnidimensionalArray(D_classLit, $intern_66, 28, noOfLayouts, 15, 1); max_0 = initUnidimensionalArray(D_classLit, $intern_66, 28, noOfLayouts, 15, 1); minWidthLayout = 0; for (i0 = 0; i0 < noOfLayouts; i0++) { min_0[i0] = $intern_0; max_0[i0] = $intern_43; } for (i1 = 0; i1 < noOfLayouts; i1++) { bal = (checkCriticalElementIndex(i1, layouts.array.length) , castTo(layouts.array[i1], 185)); width_0[i1] = $layoutSize(bal); width_0[minWidthLayout] > width_0[i1] && (minWidthLayout = i1); for (l$iterator = new ArrayList$1(this$static.lGraph.layers); l$iterator.i < l$iterator.this$01.array.length;) { l = castTo($next_6(l$iterator), 30); for (n$iterator = new ArrayList$1(l.nodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); nodePosY = $doubleValue(bal.y_0[n.id_0]) + $doubleValue(bal.innerShift[n.id_0]); min_0[i1] = $wnd.Math.min(min_0[i1], nodePosY); max_0[i1] = $wnd.Math.max(max_0[i1], nodePosY + n.size_0.y_0); } } } shift_0 = initUnidimensionalArray(D_classLit, $intern_66, 28, noOfLayouts, 15, 1); for (i2 = 0; i2 < noOfLayouts; i2++) { (checkCriticalElementIndex(i2, layouts.array.length) , castTo(layouts.array[i2], 185)).vdir == ($clinit_BKAlignedLayout$VDirection() , DOWN_0)?(shift_0[i2] = min_0[minWidthLayout] - min_0[i2]):(shift_0[i2] = max_0[minWidthLayout] - max_0[i2]); } calculatedYs = initUnidimensionalArray(D_classLit, $intern_66, 28, noOfLayouts, 15, 1); for (layer$iterator = new ArrayList$1(this$static.lGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); for (i = 0; i < noOfLayouts; i++) { calculatedYs[i] = $doubleValue((checkCriticalElementIndex(i, layouts.array.length) , castTo(layouts.array[i], 185)).y_0[node.id_0]) + $doubleValue((checkCriticalElementIndex(i, layouts.array.length) , castTo(layouts.array[i], 185)).innerShift[node.id_0]) + shift_0[i]; } sort_9(calculatedYs, makeLambdaFunction(Arrays$0methodref$compare$Type.prototype.compare_0, Arrays$0methodref$compare$Type, [])); balanced.y_0[node.id_0] = (calculatedYs[1] + calculatedYs[2]) / 2; balanced.innerShift[node.id_0] = 0; } } return balanced; } function $incidentToInnerSegment(this$static, node, layer1, layer2){ var edge, edge$iterator, sourceNodeType; if (node.type_0 == ($clinit_LNode$NodeType() , LONG_EDGE)) { for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); sourceNodeType = edge.source.owner.type_0; if (sourceNodeType == LONG_EDGE && this$static.ni.layerIndex[edge.source.owner.layer.id_0] == layer2 && this$static.ni.layerIndex[node.layer.id_0] == layer1) { return true; } } } return false; } function $markConflicts(this$static, layeredGraph){ var currentLayer, i, k, k_0, k_1, l, l_1, layer, layer$iterator, layerIndex, layerIterator, layerSize, nodeIterator, numberOfLayers, upperNeighbor, upperNeighbor$iterator, v_l, v_l_i; numberOfLayers = layeredGraph.layers.array.length; if (numberOfLayers < 3) { return; } layerSize = initUnidimensionalArray(I_classLit, $intern_49, 28, numberOfLayers, 15, 1); layerIndex = 0; for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); layerSize[layerIndex++] = layer.nodes.array.length; } layerIterator = new AbstractList$ListIteratorImpl(layeredGraph.layers, 2); for (i = 1; i < numberOfLayers - 1; i++) { currentLayer = (checkCriticalElement(layerIterator.i < layerIterator.this$01_0.size_1()) , castTo(layerIterator.this$01_0.get_0(layerIterator.last = layerIterator.i++), 30)); nodeIterator = new ArrayList$1(currentLayer.nodes); k_0 = 0; l = 0; for (l_1 = 0; l_1 < layerSize[i + 1]; l_1++) { v_l_i = castTo($next_6(nodeIterator), 10); if (l_1 == layerSize[i + 1] - 1 || $incidentToInnerSegment(this$static, v_l_i, i + 1, i)) { k_1 = layerSize[i] - 1; $incidentToInnerSegment(this$static, v_l_i, i + 1, i) && (k_1 = this$static.ni.nodeIndex[castTo(castTo(castTo($get_11(this$static.ni.leftNeighbors, v_l_i.id_0), 15).get_0(0), 42).first, 10).id_0]); while (l <= l_1) { v_l = castTo($get_11(currentLayer.nodes, l), 10); if (!$incidentToInnerSegment(this$static, v_l, i + 1, i)) { for (upperNeighbor$iterator = castTo($get_11(this$static.ni.leftNeighbors, v_l.id_0), 15).iterator_0(); upperNeighbor$iterator.hasNext_0();) { upperNeighbor = castTo(upperNeighbor$iterator.next_1(), 42); k = this$static.ni.nodeIndex[castTo(upperNeighbor.first, 10).id_0]; (k < k_0 || k > k_1) && $add_6(this$static.markedEdges, castTo(upperNeighbor.second, 18)); } } ++l; } k_0 = k_1; } } } } function $process_77(this$static, layeredGraph, monitor){ var align_0, aligner, bal, bal$iterator, bal$iterator0, bal$iterator1, bal$iterator2, balanced, chosenLayout, compacter, favorStraightEdges, layer, layer$iterator, layouts, leftdown, leftup, node, node$iterator, rightdown, rightup; monitor.begin('Brandes & Koepf node placement', 1); this$static.lGraph = layeredGraph; this$static.ni = buildFor(layeredGraph); align_0 = castTo($getProperty(layeredGraph, ($clinit_LayeredOptions() , NODE_PLACEMENT_BK_FIXED_ALIGNMENT_0)), 281); favorStraightEdges = $booleanValue(castToBoolean($getProperty(layeredGraph, NODE_PLACEMENT_FAVOR_STRAIGHT_EDGES_0))); this$static.produceBalancedLayout = align_0 == ($clinit_FixedAlignment() , NONE_4) && !favorStraightEdges || align_0 == BALANCED; $markConflicts(this$static, layeredGraph); rightdown = null; rightup = null; leftdown = null; leftup = null; layouts = (checkNonnegative(4, 'initialArraySize') , new ArrayList_0(4)); switch (castTo($getProperty(layeredGraph, NODE_PLACEMENT_BK_FIXED_ALIGNMENT_0), 281).ordinal) { case 3: leftdown = new BKAlignedLayout(layeredGraph, this$static.ni.nodeCount, ($clinit_BKAlignedLayout$VDirection() , DOWN_0), ($clinit_BKAlignedLayout$HDirection() , LEFT_3)); push_1(layouts.array, leftdown); break; case 1: leftup = new BKAlignedLayout(layeredGraph, this$static.ni.nodeCount, ($clinit_BKAlignedLayout$VDirection() , UP_0), ($clinit_BKAlignedLayout$HDirection() , LEFT_3)); push_1(layouts.array, leftup); break; case 4: rightdown = new BKAlignedLayout(layeredGraph, this$static.ni.nodeCount, ($clinit_BKAlignedLayout$VDirection() , DOWN_0), ($clinit_BKAlignedLayout$HDirection() , RIGHT_3)); push_1(layouts.array, rightdown); break; case 2: rightup = new BKAlignedLayout(layeredGraph, this$static.ni.nodeCount, ($clinit_BKAlignedLayout$VDirection() , UP_0), ($clinit_BKAlignedLayout$HDirection() , RIGHT_3)); push_1(layouts.array, rightup); break; default:leftdown = new BKAlignedLayout(layeredGraph, this$static.ni.nodeCount, ($clinit_BKAlignedLayout$VDirection() , DOWN_0), ($clinit_BKAlignedLayout$HDirection() , LEFT_3)); leftup = new BKAlignedLayout(layeredGraph, this$static.ni.nodeCount, UP_0, LEFT_3); rightdown = new BKAlignedLayout(layeredGraph, this$static.ni.nodeCount, DOWN_0, RIGHT_3); rightup = new BKAlignedLayout(layeredGraph, this$static.ni.nodeCount, UP_0, RIGHT_3); push_1(layouts.array, rightdown); push_1(layouts.array, rightup); push_1(layouts.array, leftdown); push_1(layouts.array, leftup); } aligner = new BKAligner(layeredGraph, this$static.ni); for (bal$iterator0 = new ArrayList$1(layouts); bal$iterator0.i < bal$iterator0.this$01.array.length;) { bal = castTo($next_6(bal$iterator0), 185); $verticalAlignment(aligner, bal, this$static.markedEdges); $insideBlockShift(bal); } compacter = new BKCompactor(layeredGraph, this$static.ni); for (bal$iterator1 = new ArrayList$1(layouts); bal$iterator1.i < bal$iterator1.this$01.array.length;) { bal = castTo($next_6(bal$iterator1), 185); $horizontalCompaction(compacter, bal); } if (monitor.isLoggingEnabled()) { for (bal$iterator2 = new ArrayList$1(layouts); bal$iterator2.i < bal$iterator2.this$01.array.length;) { bal = castTo($next_6(bal$iterator2), 185); monitor.log_0(bal + ' size is ' + $layoutSize(bal)); } } chosenLayout = null; if (this$static.produceBalancedLayout) { balanced = $createBalancedLayout(this$static, layouts, this$static.ni.nodeCount); $checkOrderConstraint(layeredGraph, balanced, monitor) && (chosenLayout = balanced); } if (!chosenLayout) { for (bal$iterator2 = new ArrayList$1(layouts); bal$iterator2.i < bal$iterator2.this$01.array.length;) { bal = castTo($next_6(bal$iterator2), 185); $checkOrderConstraint(layeredGraph, bal, monitor) && (!chosenLayout || $layoutSize(chosenLayout) > $layoutSize(bal)) && (chosenLayout = bal); } } !chosenLayout && (chosenLayout = (checkCriticalElementIndex(0, layouts.array.length) , castTo(layouts.array[0], 185))); for (layer$iterator = new ArrayList$1(layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); node.pos.y_0 = $doubleValue(chosenLayout.y_0[node.id_0]) + $doubleValue(chosenLayout.innerShift[node.id_0]); } } if (monitor.isLoggingEnabled()) { monitor.log_0('Chosen node placement: ' + chosenLayout); monitor.log_0('Blocks: ' + getBlocks(chosenLayout)); monitor.log_0('Classes: ' + getClasses(chosenLayout, monitor)); monitor.log_0('Marked edges: ' + this$static.markedEdges); } for (bal$iterator = new ArrayList$1(layouts); bal$iterator.i < bal$iterator.this$01.array.length;) { bal = castTo($next_6(bal$iterator), 185); bal.root = null; bal.blockSize = null; bal.align_0 = null; bal.innerShift = null; bal.sink = null; bal.shift_0 = null; bal.y_0 = null; } $cleanup(this$static.ni); this$static.markedEdges.map_0.clear_0(); monitor.done_1(); } function BKNodePlacer(){ $clinit_BKNodePlacer(); this.markedEdges = new HashSet; } function getBlocks(bal){ $clinit_BKNodePlacer(); var blockContents, blocks, layer, layer$iterator, node, node$iterator, root; blocks = new LinkedHashMap; for (layer$iterator = new ArrayList$1(bal.layeredGraph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); root = bal.root[node.id_0]; blockContents = castTo($get_16(blocks, root), 15); if (!blockContents) { blockContents = new ArrayList; $put_11(blocks, root, blockContents); } blockContents.add_2(node); } } return blocks; } function getClasses(bal, monitor){ var classContents, classes, root, root$iterator, roots, sink; classes = new LinkedHashMap; roots = newLinkedHashSet(new Arrays$ArrayList(bal.root)); for (root$iterator = roots.map_0.keySet_0().iterator_0(); root$iterator.hasNext_0();) { root = castTo(root$iterator.next_1(), 10); if (!root) { monitor.log_0('There are no classes in a balanced layout.'); break; } sink = bal.sink[root.id_0]; classContents = castTo($get_16(classes, sink), 15); if (!classContents) { classContents = new ArrayList; $put_11(classes, sink, classContents); } classContents.add_2(root); } return classes; } function getEdge(source, target){ $clinit_BKNodePlacer(); var edge, edge$iterator; for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getConnectedEdges_0(source).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); if (edge.target.owner == target || edge.source.owner == target) { return edge; } } return null; } defineClass(1427, 1, $intern_113, BKNodePlacer); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_19(graph){ return castTo($getProperty(castTo(graph, 36), ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21).contains(($clinit_GraphProperties() , EXTERNAL_PORTS))?HIERARCHY_PROCESSING_ADDITIONS_3:null; } ; _.process = function process_74(layeredGraph, monitor){ $process_77(this, castTo(layeredGraph, 36), monitor); } ; _.produceBalancedLayout = false; var HIERARCHY_PROCESSING_ADDITIONS_3; var Lorg_eclipse_elk_alg_layered_p4nodes_bk_BKNodePlacer_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes.bk', 'BKNodePlacer', 1427); function $cleanup(this$static){ this$static.layerIndex = null; this$static.nodeIndex = null; setLength(this$static.leftNeighbors.array, 0); setLength(this$static.rightNeighbors.array, 0); this$static.neighborComparator = null; } function NeighborhoodInformation(){ } function buildFor(graph){ var l, l$iterator, lId, lIndex, layer, layer$iterator, n, n$iterator, nId, nIndex, ni; ni = new NeighborhoodInformation; ni.nodeCount = 0; for (layer$iterator = new ArrayList$1(graph.layers); layer$iterator.i < layer$iterator.this$01.array.length;) { layer = castTo($next_6(layer$iterator), 30); ni.nodeCount += layer.nodes.array.length; } lId = 0; lIndex = 0; ni.layerIndex = initUnidimensionalArray(I_classLit, $intern_49, 28, graph.layers.array.length, 15, 1); nId = 0; nIndex = 0; ni.nodeIndex = initUnidimensionalArray(I_classLit, $intern_49, 28, ni.nodeCount, 15, 1); for (l$iterator = new ArrayList$1(graph.layers); l$iterator.i < l$iterator.this$01.array.length;) { l = castTo($next_6(l$iterator), 30); l.id_0 = lId++; ni.layerIndex[l.id_0] = lIndex++; nIndex = 0; for (n$iterator = new ArrayList$1(l.nodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); n.id_0 = nId++; ni.nodeIndex[n.id_0] = nIndex++; } } ni.neighborComparator = new NeighborhoodInformation$NeighborComparator(ni); ni.leftNeighbors = newArrayListWithCapacity(ni.nodeCount); determineAllLeftNeighbors(ni, graph); ni.rightNeighbors = newArrayListWithCapacity(ni.nodeCount); determineAllRightNeighbors(ni, graph); return ni; } function determineAllLeftNeighbors(ni, graph){ var edge, edge$iterator, edgePrio, l, l$iterator, maxPriority, n, n$iterator, result; for (l$iterator = new ArrayList$1(graph.layers); l$iterator.i < l$iterator.this$01.array.length;) { l = castTo($next_6(l$iterator), 30); for (n$iterator = new ArrayList$1(l.nodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); result = new ArrayList; maxPriority = 0; for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(n).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); if ($isSelfLoop(edge) || !$isSelfLoop(edge) && edge.source.owner.layer == edge.target.owner.layer) { continue; } edgePrio = castTo($getProperty(edge, ($clinit_LayeredOptions() , PRIORITY_STRAIGHTNESS_0)), 17).value_0; if (edgePrio > maxPriority) { maxPriority = edgePrio; result.array.length = 0; } edgePrio == maxPriority && $add_3(result, new Pair(edge.source.owner, edge)); } $clinit_Collections(); $sort(result, ni.neighborComparator); $add_2(ni.leftNeighbors, n.id_0, result); } } } function determineAllRightNeighbors(ni, graph){ var edge, edge$iterator, edgePrio, l, l$iterator, maxPriority, n, n$iterator, result; for (l$iterator = new ArrayList$1(graph.layers); l$iterator.i < l$iterator.this$01.array.length;) { l = castTo($next_6(l$iterator), 30); for (n$iterator = new ArrayList$1(l.nodes); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 10); result = new ArrayList; maxPriority = 0; for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(n).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 18); if ($isSelfLoop(edge) || !$isSelfLoop(edge) && edge.source.owner.layer == edge.target.owner.layer) { continue; } edgePrio = castTo($getProperty(edge, ($clinit_LayeredOptions() , PRIORITY_STRAIGHTNESS_0)), 17).value_0; if (edgePrio > maxPriority) { maxPriority = edgePrio; result.array.length = 0; } edgePrio == maxPriority && $add_3(result, new Pair(edge.target.owner, edge)); } $clinit_Collections(); $sort(result, ni.neighborComparator); $add_2(ni.rightNeighbors, n.id_0, result); } } } defineClass(1700, 1, {}, NeighborhoodInformation); _.nodeCount = 0; var Lorg_eclipse_elk_alg_layered_p4nodes_bk_NeighborhoodInformation_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes.bk', 'NeighborhoodInformation', 1700); function $compare_24(this$static, o1, o2){ var cmp; cmp = this$static.this$01.nodeIndex[castTo(o1.first, 10).id_0] - this$static.this$01.nodeIndex[castTo(o2.first, 10).id_0]; return round_int(signum(cmp)); } function NeighborhoodInformation$NeighborComparator(this$0){ this.this$01 = this$0; } defineClass(1701, 1, $intern_88, NeighborhoodInformation$NeighborComparator); _.compare_1 = function compare_79(o1, o2){ return $compare_24(this, castTo(o1, 42), castTo(o2, 42)); } ; _.equals_0 = function equals_164(other){ return this === other; } ; _.reversed = function reversed_71(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_p4nodes_bk_NeighborhoodInformation$NeighborComparator_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes.bk', 'NeighborhoodInformation/NeighborComparator', 1701); function $finishBlock(this$static, n){ $add_6(this$static.blockFinished, n); } function $getOther_3(edge, n){ if (edge.source.owner == n) { return edge.target.owner; } else if (edge.target.owner == n) { return edge.source.owner; } else { throw toJs(new IllegalArgumentException_0('Node ' + n + ' is neither source nor target of edge ' + edge)); } } function $init_0(this$static, theBal, theNi){ this$static.bal = theBal; this$static.ni = theNi; this$static.blockFinished.map_0.clear_0(); $reset_0(this$static.postProcessablesQueue); setLength(this$static.postProcessablesStack.arrayList.array, 0); } function ThresholdStrategy(){ this.blockFinished = new HashSet; this.postProcessablesQueue = new LinkedList; this.postProcessablesStack = new Stack; } defineClass(823, 1, {}); var Lorg_eclipse_elk_alg_layered_p4nodes_bk_ThresholdStrategy_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes.bk', 'ThresholdStrategy', 823); function ThresholdStrategy$NullThresholdStrategy(){ ThresholdStrategy.call(this); } defineClass(1825, 823, {}, ThresholdStrategy$NullThresholdStrategy); _.calculateThreshold = function calculateThreshold(oldThresh, blockRoot, currentNode){ return this.bal.vdir == ($clinit_BKAlignedLayout$VDirection() , UP_0)?$intern_60:$intern_61; } ; _.postProcess = function postProcess(){ } ; var Lorg_eclipse_elk_alg_layered_p4nodes_bk_ThresholdStrategy$NullThresholdStrategy_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes.bk', 'ThresholdStrategy/NullThresholdStrategy', 1825); function ThresholdStrategy$Postprocessable(free, isRoot){ this.free = free; this.isRoot = isRoot; } defineClass(587, 1, {587:1}, ThresholdStrategy$Postprocessable); _.hasEdges = false; _.isRoot = false; var Lorg_eclipse_elk_alg_layered_p4nodes_bk_ThresholdStrategy$Postprocessable_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes.bk', 'ThresholdStrategy/Postprocessable', 587); function $getBound(this$static, blockNode, isRoot){ var invalid, left, otherPort, otherRoot, pick, right, rootPort, threshold; invalid = this$static.bal.vdir == ($clinit_BKAlignedLayout$VDirection() , UP_0)?$intern_60:$intern_61; pick = $pickEdge(this$static, new ThresholdStrategy$Postprocessable(blockNode, isRoot)); if (!pick.edge && pick.hasEdges) { $add_7(this$static.postProcessablesQueue, pick); return invalid; } else if (pick.edge) { left = pick.edge.source; right = pick.edge.target; if (isRoot) { rootPort = this$static.bal.hdir == ($clinit_BKAlignedLayout$HDirection() , RIGHT_3)?right:left; otherPort = this$static.bal.hdir == RIGHT_3?left:right; otherRoot = this$static.bal.root[otherPort.owner.id_0]; threshold = $doubleValue(this$static.bal.y_0[otherRoot.id_0]) + $doubleValue(this$static.bal.innerShift[otherPort.owner.id_0]) + otherPort.pos.y_0 + otherPort.anchor.y_0 - $doubleValue(this$static.bal.innerShift[rootPort.owner.id_0]) - rootPort.pos.y_0 - rootPort.anchor.y_0; } else { rootPort = this$static.bal.hdir == ($clinit_BKAlignedLayout$HDirection() , LEFT_3)?right:left; otherPort = this$static.bal.hdir == LEFT_3?left:right; threshold = $doubleValue(this$static.bal.y_0[this$static.bal.root[otherPort.owner.id_0].id_0]) + $doubleValue(this$static.bal.innerShift[otherPort.owner.id_0]) + otherPort.pos.y_0 + otherPort.anchor.y_0 - $doubleValue(this$static.bal.innerShift[rootPort.owner.id_0]) - rootPort.pos.y_0 - rootPort.anchor.y_0; } this$static.bal.su[this$static.bal.root[left.owner.id_0].id_0] = ($clinit_Boolean() , true); this$static.bal.su[this$static.bal.root[right.owner.id_0].id_0] = true; return threshold; } return invalid; } function $pickEdge(this$static, pp){ var e, e$iterator, edges, hasEdges, onlyDummies; pp.isRoot?(edges = this$static.bal.hdir == ($clinit_BKAlignedLayout$HDirection() , RIGHT_3)?$getIncomingEdges(pp.free):$getOutgoingEdges(pp.free)):(edges = this$static.bal.hdir == ($clinit_BKAlignedLayout$HDirection() , LEFT_3)?$getIncomingEdges(pp.free):$getOutgoingEdges(pp.free)); hasEdges = false; for (e$iterator = new Iterators$ConcatenatedIterator(transform_2(edges.val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 18); onlyDummies = $booleanValue(this$static.bal.od[this$static.bal.root[pp.free.id_0].id_0]); if (!onlyDummies && !$isSelfLoop(e) && e.source.owner.layer == e.target.owner.layer) { continue; } if ($booleanValue(this$static.bal.su[this$static.bal.root[pp.free.id_0].id_0]) || $booleanValue(this$static.bal.su[this$static.bal.root[pp.free.id_0].id_0])) { continue; } hasEdges = true; if ($contains_6(this$static.blockFinished, this$static.bal.root[$getOther_3(e, pp.free).id_0])) { pp.hasEdges = true; pp.edge = e; return pp; } } pp.hasEdges = hasEdges; pp.edge = null; return pp; } function $process_78(this$static, pp){ var availableSpace, block, delta, edge, fix; edge = pp.edge; edge.source.owner == pp.free?(fix = edge.target):(fix = edge.source); edge.source.owner == pp.free?(block = edge.source):(block = edge.target); delta = $calculateDelta(this$static.bal, fix, block); if (delta > 0 && delta < $intern_98) { availableSpace = $checkSpaceAbove(this$static.bal, block.owner, delta, this$static.ni); $shiftBlock(this$static.bal, block.owner, -availableSpace); return availableSpace > 0; } else if (delta < 0 && -delta < $intern_98) { availableSpace = $checkSpaceBelow(this$static.bal, block.owner, -delta, this$static.ni); $shiftBlock(this$static.bal, block.owner, availableSpace); return availableSpace > 0; } return false; } function ThresholdStrategy$SimpleThresholdStrategy(){ ThresholdStrategy.call(this); } defineClass(1826, 823, {}, ThresholdStrategy$SimpleThresholdStrategy); _.calculateThreshold = function calculateThreshold_0(oldThresh, blockRoot, currentNode){ var isLast, isRoot, t; isRoot = blockRoot == currentNode; isLast = this.bal.align_0[currentNode.id_0] == blockRoot; if (!(isRoot || isLast)) { return oldThresh; } t = oldThresh; if (this.bal.hdir == ($clinit_BKAlignedLayout$HDirection() , RIGHT_3)) { isRoot && (t = $getBound(this, blockRoot, true)); !isNaN(t) && !isFinite(t) && isLast && (t = $getBound(this, currentNode, false)); } else { isRoot && (t = $getBound(this, blockRoot, true)); !isNaN(t) && !isFinite(t) && isLast && (t = $getBound(this, currentNode, false)); } return t; } ; _.postProcess = function postProcess_0(){ var edge, moved, onlyDummies, pick, pp; while (this.postProcessablesQueue.size_0 != 0) { pp = castTo($poll(this.postProcessablesQueue), 587); pick = $pickEdge(this, pp); if (!pick.edge) { continue; } edge = pick.edge; onlyDummies = $booleanValue(this.bal.od[this.bal.root[pp.free.id_0].id_0]); if (!onlyDummies && !$isSelfLoop(edge) && edge.source.owner.layer == edge.target.owner.layer) { continue; } moved = $process_78(this, pp); moved || $push(this.postProcessablesStack, pp); } while (this.postProcessablesStack.arrayList.array.length != 0) { $process_78(this, castTo($pop(this.postProcessablesStack), 587)); } } ; var Lorg_eclipse_elk_alg_layered_p4nodes_bk_ThresholdStrategy$SimpleThresholdStrategy_2_classLit = createForClass('org.eclipse.elk.alg.layered.p4nodes.bk', 'ThresholdStrategy/SimpleThresholdStrategy', 1826); function $clinit_EdgeRouterFactory(){ $clinit_EdgeRouterFactory = emptyMethod; factoryCache = new EnumMap(Lorg_eclipse_elk_core_options_EdgeRouting_2_classLit); } function $create_7(this$static){ switch (this$static.edgeRoutingStrategy.ordinal) { case 1: return new PolylineEdgeRouter; case 3: return new SplineEdgeRouter; default:return new OrthogonalEdgeRouter; } } function EdgeRouterFactory(){ } function factoryFor(edgeRoutingStrategy){ $clinit_EdgeRouterFactory(); var factory; if (!$containsKey_5(factoryCache, edgeRoutingStrategy)) { factory = new EdgeRouterFactory; factory.edgeRoutingStrategy = edgeRoutingStrategy; $put_8(factoryCache, edgeRoutingStrategy, factory); } return castTo($get_14(factoryCache, edgeRoutingStrategy), 645); } defineClass(645, 1, {645:1, 188:1, 196:1}, EdgeRouterFactory); _.create_1 = function create_17(){ return $create_7(this); } ; _.create_2 = function create_16(){ return $create_7(this); } ; var factoryCache; var Lorg_eclipse_elk_alg_layered_p5edges_EdgeRouterFactory_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges', 'EdgeRouterFactory', 645); function $clinit_OrthogonalEdgeRouter(){ $clinit_OrthogonalEdgeRouter = emptyMethod; HYPEREDGE_PROCESSING_ADDITIONS = $addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P4_NODE_PLACEMENT), ($clinit_IntermediateProcessorStrategy() , HYPEREDGE_DUMMY_MERGER)); INVERTED_PORT_PROCESSING_ADDITIONS = $addBefore(new LayoutProcessorConfiguration, P3_NODE_ORDERING, INVERTED_PORT_PROCESSOR); NORTH_SOUTH_PORT_PROCESSING_ADDITIONS = $addAfter($addBefore(new LayoutProcessorConfiguration, P3_NODE_ORDERING, NORTH_SOUTH_PORT_PREPROCESSOR), P5_EDGE_ROUTING, NORTH_SOUTH_PORT_POSTPROCESSOR); HIERARCHICAL_PORT_PROCESSING_ADDITIONS = $addAfter($addBefore($addBefore(new LayoutProcessorConfiguration, P3_NODE_ORDERING, HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR), P4_NODE_PLACEMENT, HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR), P5_EDGE_ROUTING, HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER); SELF_LOOP_PROCESSING_ADDITIONS = $add_17($add_17($before($addAfter($addBefore(new LayoutProcessorConfiguration, P1_CYCLE_BREAKING, SELF_LOOP_PREPROCESSOR), P5_EDGE_ROUTING, SELF_LOOP_POSTPROCESSOR), P4_NODE_PLACEMENT), SELF_LOOP_PORT_RESTORER), SELF_LOOP_ROUTER); HYPERNODE_PROCESSING_ADDITIONS = $addAfter(new LayoutProcessorConfiguration, P5_EDGE_ROUTING, HYPERNODE_PROCESSOR); CENTER_EDGE_LABEL_PROCESSING_ADDITIONS = $addAfter($addBefore($addBefore($addBefore(new LayoutProcessorConfiguration, P2_LAYERING, LABEL_DUMMY_INSERTER), P4_NODE_PLACEMENT, LABEL_DUMMY_SWITCHER), P4_NODE_PLACEMENT, LABEL_SIDE_SELECTOR), P5_EDGE_ROUTING, LABEL_DUMMY_REMOVER); END_EDGE_LABEL_PROCESSING_ADDITIONS = $addAfter($addBefore($addBefore(new LayoutProcessorConfiguration, P4_NODE_PLACEMENT, LABEL_SIDE_SELECTOR), P4_NODE_PLACEMENT, END_LABEL_PREPROCESSOR), P5_EDGE_ROUTING, END_LABEL_POSTPROCESSOR); } function $getLayoutProcessorConfiguration_0(graph){ var configuration, graphProperties; graphProperties = castTo($getProperty(graph, ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21); configuration = new LayoutProcessorConfiguration; if (graphProperties.contains(($clinit_GraphProperties() , HYPEREDGES))) { $addAll_6(configuration, HYPEREDGE_PROCESSING_ADDITIONS); $addAll_6(configuration, INVERTED_PORT_PROCESSING_ADDITIONS); } if (graphProperties.contains(NON_FREE_PORTS) || $booleanValue(castToBoolean($getProperty(graph, ($clinit_LayeredOptions() , FEEDBACK_EDGES_0))))) { $addAll_6(configuration, INVERTED_PORT_PROCESSING_ADDITIONS); graphProperties.contains(NORTH_SOUTH_PORTS) && $addAll_6(configuration, NORTH_SOUTH_PORT_PROCESSING_ADDITIONS); } graphProperties.contains(EXTERNAL_PORTS) && $addAll_6(configuration, HIERARCHICAL_PORT_PROCESSING_ADDITIONS); graphProperties.contains(SELF_LOOPS) && $addAll_6(configuration, SELF_LOOP_PROCESSING_ADDITIONS); graphProperties.contains(HYPERNODES) && $addAll_6(configuration, HYPERNODE_PROCESSING_ADDITIONS); graphProperties.contains(CENTER_LABELS) && $addAll_6(configuration, CENTER_EDGE_LABEL_PROCESSING_ADDITIONS); graphProperties.contains(END_LABELS) && $addAll_6(configuration, END_EDGE_LABEL_PROCESSING_ADDITIONS); return configuration; } function $process_79(layeredGraph, monitor){ var edgeEdgeSpacing, edgeNodeSpacing, isLeftLayerExternal, isRightLayerExternal, layerIter, leftLayer, leftLayerNodes, nodeNodeSpacing, rightLayer, rightLayerNodes, routingGenerator, routingWidth, slotsCount, startPos, xpos; monitor.begin('Orthogonal edge routing', 1); nodeNodeSpacing = $doubleValue(castToDouble($getProperty(layeredGraph, ($clinit_LayeredOptions() , SPACING_NODE_NODE_BETWEEN_LAYERS_0)))); edgeEdgeSpacing = $doubleValue(castToDouble($getProperty(layeredGraph, SPACING_EDGE_EDGE_BETWEEN_LAYERS_0))); edgeNodeSpacing = $doubleValue(castToDouble($getProperty(layeredGraph, SPACING_EDGE_NODE_BETWEEN_LAYERS_0))); routingGenerator = new OrthogonalRoutingGenerator(0, edgeEdgeSpacing); xpos = 0; layerIter = new AbstractList$ListIteratorImpl(layeredGraph.layers, 0); leftLayer = null; rightLayer = null; leftLayerNodes = null; rightLayerNodes = null; do { rightLayer = layerIter.i < layerIter.this$01_0.size_1()?(checkCriticalElement(layerIter.i < layerIter.this$01_0.size_1()) , castTo(layerIter.this$01_0.get_0(layerIter.last = layerIter.i++), 30)):null; rightLayerNodes = !rightLayer?null:rightLayer.nodes; if (leftLayer) { placeNodesHorizontally(leftLayer, xpos); xpos += leftLayer.size_0.x_0; } startPos = !leftLayer?xpos:xpos + edgeNodeSpacing; slotsCount = $routeEdges_0(routingGenerator, layeredGraph, leftLayerNodes, rightLayerNodes, startPos); isLeftLayerExternal = !leftLayer || all_0(leftLayerNodes, ($clinit_PolylineEdgeRouter() , PRED_EXTERNAL_WEST_OR_EAST_PORT)); isRightLayerExternal = !rightLayer || all_0(rightLayerNodes, ($clinit_PolylineEdgeRouter() , PRED_EXTERNAL_WEST_OR_EAST_PORT)); if (slotsCount > 0) { routingWidth = (slotsCount - 1) * edgeEdgeSpacing; !!leftLayer && (routingWidth += edgeNodeSpacing); !!rightLayer && (routingWidth += edgeNodeSpacing); routingWidth < nodeNodeSpacing && !isLeftLayerExternal && !isRightLayerExternal && (routingWidth = nodeNodeSpacing); xpos += routingWidth; } else !isLeftLayerExternal && !isRightLayerExternal && (xpos += nodeNodeSpacing); leftLayer = rightLayer; leftLayerNodes = rightLayerNodes; } while (rightLayer); layeredGraph.size_0.x_0 = xpos; monitor.done_1(); } function OrthogonalEdgeRouter(){ $clinit_OrthogonalEdgeRouter(); } defineClass(1485, 1, $intern_113, OrthogonalEdgeRouter); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_20(graph){ return $getLayoutProcessorConfiguration_0(castTo(graph, 36)); } ; _.process = function process_75(layeredGraph, monitor){ $process_79(castTo(layeredGraph, 36), monitor); } ; var CENTER_EDGE_LABEL_PROCESSING_ADDITIONS, END_EDGE_LABEL_PROCESSING_ADDITIONS, HIERARCHICAL_PORT_PROCESSING_ADDITIONS, HYPEREDGE_PROCESSING_ADDITIONS, HYPERNODE_PROCESSING_ADDITIONS, INVERTED_PORT_PROCESSING_ADDITIONS, NORTH_SOUTH_PORT_PROCESSING_ADDITIONS, SELF_LOOP_PROCESSING_ADDITIONS; var Lorg_eclipse_elk_alg_layered_p5edges_OrthogonalEdgeRouter_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges', 'OrthogonalEdgeRouter', 1485); function $clinit_PolylineEdgeRouter(){ $clinit_PolylineEdgeRouter = emptyMethod; PRED_EXTERNAL_WEST_OR_EAST_PORT = new PolylineEdgeRouter$1; BASELINE_PROCESSOR_CONFIGURATION = $addBefore(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P3_NODE_ORDERING), ($clinit_IntermediateProcessorStrategy() , INVERTED_PORT_PROCESSOR)); NORTH_SOUTH_PORT_PROCESSING_ADDITIONS_0 = $addAfter($addBefore(new LayoutProcessorConfiguration, P3_NODE_ORDERING, NORTH_SOUTH_PORT_PREPROCESSOR), P5_EDGE_ROUTING, NORTH_SOUTH_PORT_POSTPROCESSOR); SELF_LOOP_PROCESSING_ADDITIONS_0 = $add_17($add_17($before($addAfter($addBefore(new LayoutProcessorConfiguration, P1_CYCLE_BREAKING, SELF_LOOP_PREPROCESSOR), P5_EDGE_ROUTING, SELF_LOOP_POSTPROCESSOR), P4_NODE_PLACEMENT), SELF_LOOP_PORT_RESTORER), SELF_LOOP_ROUTER); CENTER_EDGE_LABEL_PROCESSING_ADDITIONS_0 = $addAfter($addBefore($addBefore($addBefore(new LayoutProcessorConfiguration, P2_LAYERING, LABEL_DUMMY_INSERTER), P4_NODE_PLACEMENT, LABEL_DUMMY_SWITCHER), P4_NODE_PLACEMENT, LABEL_SIDE_SELECTOR), P5_EDGE_ROUTING, LABEL_DUMMY_REMOVER); END_EDGE_LABEL_PROCESSING_ADDITIONS_0 = $addAfter($addBefore($addBefore(new LayoutProcessorConfiguration, P4_NODE_PLACEMENT, LABEL_SIDE_SELECTOR), P4_NODE_PLACEMENT, END_LABEL_PREPROCESSOR), P5_EDGE_ROUTING, END_LABEL_POSTPROCESSOR); } function $addBendPoint(this$static, edge, bendPoint, addJunctionPoint, currPort){ var jpoint, junctionPoints; if ((!$isSelfLoop(edge) && edge.source.owner.layer == edge.target.owner.layer || !$equals_9(sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [currPort.owner.pos, currPort.pos, currPort.anchor])), bendPoint)) && !$isSelfLoop(edge)) { edge.source == currPort?$add_0(edge.bendPoints, 0, new KVector_2(bendPoint)):$add_7(edge.bendPoints, new KVector_2(bendPoint)); if (addJunctionPoint && !$contains_6(this$static.createdJunctionPoints, bendPoint)) { junctionPoints = castTo($getProperty(edge, ($clinit_LayeredOptions() , JUNCTION_POINTS)), 75); if (!junctionPoints) { junctionPoints = new KVectorChain; $setProperty_0(edge, JUNCTION_POINTS, junctionPoints); } jpoint = new KVector_2(bendPoint); $addNode_0(junctionPoints, jpoint, junctionPoints.tail.prev, junctionPoints.tail); $add_6(this$static.createdJunctionPoints, jpoint); } } } function $calculateWestInLayerEdgeYDiff(layer){ var maxYDiff, node, node$iterator, outgoingEdge, outgoingEdge$iterator, sourcePos, targetPos; maxYDiff = 0; for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); for (outgoingEdge$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(outgoingEdge$iterator);) { outgoingEdge = castTo($next_0(outgoingEdge$iterator), 18); if (layer == outgoingEdge.target.owner.layer && outgoingEdge.source.side == ($clinit_PortSide() , WEST_2)) { sourcePos = $getAbsoluteAnchor(outgoingEdge.source).y_0; targetPos = $getAbsoluteAnchor(outgoingEdge.target).y_0; maxYDiff = $wnd.Math.max(maxYDiff, $wnd.Math.abs(targetPos - sourcePos)); } } } return maxYDiff; } function $getLayoutProcessorConfiguration_1(graph){ var configuration, graphProperties; graphProperties = castTo($getProperty(graph, ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21); configuration = createFrom_0(BASELINE_PROCESSOR_CONFIGURATION); graphProperties.contains(($clinit_GraphProperties() , NORTH_SOUTH_PORTS)) && $addAll_6(configuration, NORTH_SOUTH_PORT_PROCESSING_ADDITIONS_0); graphProperties.contains(SELF_LOOPS) && $addAll_6(configuration, SELF_LOOP_PROCESSING_ADDITIONS_0); graphProperties.contains(CENTER_LABELS) && $addAll_6(configuration, CENTER_EDGE_LABEL_PROCESSING_ADDITIONS_0); graphProperties.contains(END_LABELS) && $addAll_6(configuration, END_EDGE_LABEL_PROCESSING_ADDITIONS_0); return configuration; } function $isInLayerDummy_0(node){ var e, e$iterator; if (node.type_0 == ($clinit_LNode$NodeType() , LONG_EDGE)) { for (e$iterator = new Iterators$ConcatenatedIterator(transform_2($getConnectedEdges_0(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 18); if (!$isSelfLoop(e) && e.source.owner.layer == e.target.owner.layer) { return true; } } } return false; } function $process_80(this$static, layeredGraph, monitor){ var edgeSpaceFac, edgeSpacing, externalLayer, layer, layerIter, layerSpacing, maxCurrOutputYDiff, maxVertDiff, node, node$iterator, nodeSpacing, outgoingEdge, outgoingEdge$iterator, slopedEdgeZoneWidth, sourcePos, targetPos, xpos, yDiff; monitor.begin('Polyline edge routing', 1); slopedEdgeZoneWidth = $doubleValue(castToDouble($getProperty(layeredGraph, ($clinit_LayeredOptions() , EDGE_ROUTING_POLYLINE_SLOPED_EDGE_ZONE_WIDTH_0)))); nodeSpacing = $doubleValue(castToDouble($getProperty(layeredGraph, SPACING_NODE_NODE_BETWEEN_LAYERS_0))); edgeSpacing = $doubleValue(castToDouble($getProperty(layeredGraph, SPACING_EDGE_EDGE_BETWEEN_LAYERS_0))); edgeSpaceFac = $wnd.Math.min(1, edgeSpacing / nodeSpacing); xpos = 0; layerSpacing = 0; if (layeredGraph.layers.array.length != 0) { yDiff = $calculateWestInLayerEdgeYDiff(castTo($get_11(layeredGraph.layers, 0), 30)); xpos = 0.4 * edgeSpaceFac * yDiff; } layerIter = new AbstractList$ListIteratorImpl(layeredGraph.layers, 0); while (layerIter.i < layerIter.this$01_0.size_1()) { layer = (checkCriticalElement(layerIter.i < layerIter.this$01_0.size_1()) , castTo(layerIter.this$01_0.get_0(layerIter.last = layerIter.i++), 30)); externalLayer = all_0(layer, PRED_EXTERNAL_WEST_OR_EAST_PORT); externalLayer && xpos > 0 && (xpos -= nodeSpacing); placeNodesHorizontally(layer, xpos); maxVertDiff = 0; for (node$iterator = new ArrayList$1(layer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); maxCurrOutputYDiff = 0; for (outgoingEdge$iterator = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(outgoingEdge$iterator);) { outgoingEdge = castTo($next_0(outgoingEdge$iterator), 18); sourcePos = $getAbsoluteAnchor(outgoingEdge.source).y_0; targetPos = $getAbsoluteAnchor(outgoingEdge.target).y_0; if (layer == outgoingEdge.target.owner.layer && !$isSelfLoop(outgoingEdge)) { $processInLayerEdge(outgoingEdge, xpos, 0.4 * edgeSpaceFac * $wnd.Math.abs(sourcePos - targetPos)); if (outgoingEdge.source.side == ($clinit_PortSide() , WEST_2)) { sourcePos = 0; targetPos = 0; } } maxCurrOutputYDiff = $wnd.Math.max(maxCurrOutputYDiff, $wnd.Math.abs(targetPos - sourcePos)); } switch (node.type_0.ordinal) { case 0: case 4: case 1: case 3: case 5: $processNode_6(this$static, node, xpos, slopedEdgeZoneWidth); } maxVertDiff = $wnd.Math.max(maxVertDiff, maxCurrOutputYDiff); } if (layerIter.i < layerIter.this$01_0.size_1()) { yDiff = $calculateWestInLayerEdgeYDiff((checkCriticalElement(layerIter.i < layerIter.this$01_0.size_1()) , castTo(layerIter.this$01_0.get_0(layerIter.last = layerIter.i++), 30))); maxVertDiff = $wnd.Math.max(maxVertDiff, yDiff); checkCriticalElement(layerIter.i > 0); layerIter.this$01.get_0(layerIter.last = --layerIter.i); } layerSpacing = 0.4 * edgeSpaceFac * maxVertDiff; !externalLayer && layerIter.i < layerIter.this$01_0.size_1() && (layerSpacing += nodeSpacing); xpos += layer.size_0.x_0 + layerSpacing; } this$static.createdJunctionPoints.map_0.clear_0(); layeredGraph.size_0.x_0 = xpos; monitor.done_1(); } function $processInLayerEdge(edge, layerXPos, edgeSpacing){ var bendPoint, midY, sourceAnchorY, sourcePort, targetPort; sourcePort = edge.source; targetPort = edge.target; sourceAnchorY = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [sourcePort.owner.pos, sourcePort.pos, sourcePort.anchor])).y_0; midY = (sourceAnchorY + sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [targetPort.owner.pos, targetPort.pos, targetPort.anchor])).y_0) / 2; bendPoint = null; sourcePort.side == ($clinit_PortSide() , EAST_2)?(bendPoint = new KVector_1(layerXPos + sourcePort.owner.layer.size_0.x_0 + edgeSpacing, midY)):(bendPoint = new KVector_1(layerXPos - edgeSpacing, midY)); $add_0(edge.bendPoints, 0, bendPoint); } function $processNode_6(this$static, node, layerLeftXPos, maxAcceptableXDiff){ var absolutePortAnchor, addJunctionPoint, bendPoint, correspondingPort, e, e$iterator, layerRightXPos, otherPort, port, port$iterator, xDistance; layerRightXPos = layerLeftXPos + node.layer.size_0.x_0; for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); absolutePortAnchor = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [port.owner.pos, port.pos, port.anchor])); if (node.type_0 == ($clinit_LNode$NodeType() , NORTH_SOUTH_PORT)) { correspondingPort = castTo($getProperty(port, ($clinit_InternalProperties_1() , ORIGIN_0)), 12); absolutePortAnchor.x_0 = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [correspondingPort.owner.pos, correspondingPort.pos, correspondingPort.anchor])).x_0; node.pos.x_0 = absolutePortAnchor.x_0; } bendPoint = new KVector_1(0, absolutePortAnchor.y_0); if (port.side == ($clinit_PortSide() , EAST_2)) { bendPoint.x_0 = layerRightXPos; } else if (port.side == WEST_2) { bendPoint.x_0 = layerLeftXPos; } else { continue; } xDistance = $wnd.Math.abs(absolutePortAnchor.x_0 - bendPoint.x_0); if (xDistance <= maxAcceptableXDiff && !$isInLayerDummy_0(node)) { continue; } addJunctionPoint = port.outgoingEdges.array.length + port.incomingEdges.array.length > 1; for (e$iterator = new LPort$CombineIter$1(port.connectedEdges); $hasNext_3(e$iterator.firstIterator) || $hasNext_3(e$iterator.secondIterator);) { e = castTo($hasNext_3(e$iterator.firstIterator)?$next_6(e$iterator.firstIterator):$next_6(e$iterator.secondIterator), 18); otherPort = e.source == port?e.target:e.source; $wnd.Math.abs(sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [otherPort.owner.pos, otherPort.pos, otherPort.anchor])).y_0 - bendPoint.y_0) > 1 && $addBendPoint(this$static, e, bendPoint, addJunctionPoint, port); } } } function PolylineEdgeRouter(){ $clinit_PolylineEdgeRouter(); this.createdJunctionPoints = new HashSet; } defineClass(1478, 1, $intern_113, PolylineEdgeRouter); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_21(graph){ return $getLayoutProcessorConfiguration_1(castTo(graph, 36)); } ; _.process = function process_76(layeredGraph, monitor){ $process_80(this, castTo(layeredGraph, 36), monitor); } ; var BASELINE_PROCESSOR_CONFIGURATION, CENTER_EDGE_LABEL_PROCESSING_ADDITIONS_0, END_EDGE_LABEL_PROCESSING_ADDITIONS_0, NORTH_SOUTH_PORT_PROCESSING_ADDITIONS_0, PRED_EXTERNAL_WEST_OR_EAST_PORT, SELF_LOOP_PROCESSING_ADDITIONS_0; var Lorg_eclipse_elk_alg_layered_p5edges_PolylineEdgeRouter_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges', 'PolylineEdgeRouter', 1478); function $apply_17(node){ var extPortSide; extPortSide = castTo($getProperty(node, ($clinit_InternalProperties_1() , EXT_PORT_SIDE)), 64); return node.type_0 == ($clinit_LNode$NodeType() , EXTERNAL_PORT) && (extPortSide == ($clinit_PortSide() , WEST_2) || extPortSide == EAST_2); } function PolylineEdgeRouter$1(){ } defineClass(1479, 1, $intern_89, PolylineEdgeRouter$1); _.apply_1 = function apply_148(node){ return $apply_17(castTo(node, 10)); } ; _.equals_0 = function equals_165(other){ return this === other; } ; _.test_0 = function test_100(input_0){ return $apply_17(castTo(input_0, 10)); } ; var Lorg_eclipse_elk_alg_layered_p5edges_PolylineEdgeRouter$1_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges', 'PolylineEdgeRouter/1', 1479); function computeLinearOrderingMarks(segments, sources, sinks, criticalOnly, random){ var markBase, maxNode, maxOutflow, maxSegments, nextSinkMark, nextSourceMark, node, node$iterator, outflow, segment, segment$iterator, shiftBase, sink, source, unprocessed; unprocessed = newTreeSet(segments); maxSegments = new ArrayList; markBase = segments.array.length; nextSinkMark = markBase - 1; nextSourceMark = markBase + 1; while (unprocessed.map_0.size_1() != 0) { while (sinks.size_0 != 0) { sink = (checkCriticalElement(sinks.size_0 != 0) , castTo($removeNode_0(sinks, sinks.header.next_0), 118)); unprocessed.map_0.remove_0(sink) != null; sink.mark = nextSinkMark--; updateNeighbors(sink, sources, sinks, criticalOnly); } while (sources.size_0 != 0) { source = (checkCriticalElement(sources.size_0 != 0) , castTo($removeNode_0(sources, sources.header.next_0), 118)); unprocessed.map_0.remove_0(source) != null; source.mark = nextSourceMark++; updateNeighbors(source, sources, sinks, criticalOnly); } maxOutflow = $intern_43; for (segment$iterator = unprocessed.map_0.keySet_0().iterator_0(); segment$iterator.hasNext_0();) { segment = castTo(segment$iterator.next_1(), 118); if (!criticalOnly && segment.criticalOutDepWeight > 0 && segment.criticalInDepWeight <= 0) { maxSegments.array.length = 0; push_1(maxSegments.array, segment); break; } outflow = segment.outDepWeight - segment.inDepWeight; if (outflow >= maxOutflow) { if (outflow > maxOutflow) { maxSegments.array.length = 0; maxOutflow = outflow; } push_1(maxSegments.array, segment); } } if (maxSegments.array.length != 0) { maxNode = castTo($get_11(maxSegments, $nextInt(random, maxSegments.array.length)), 118); unprocessed.map_0.remove_0(maxNode) != null; maxNode.mark = nextSourceMark++; updateNeighbors(maxNode, sources, sinks, criticalOnly); maxSegments.array.length = 0; } } shiftBase = segments.array.length + 1; for (node$iterator = new ArrayList$1(segments); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 118); node.mark < markBase && (node.mark = node.mark + shiftBase); } } function detectCycles(segments, criticalOnly, random){ var outDependency, outDependency$iterator, result, sinks, source, source$iterator, sources; result = new ArrayList; sources = new LinkedList; sinks = new LinkedList; initialize_2(segments, sources, sinks, criticalOnly); computeLinearOrderingMarks(segments, sources, sinks, criticalOnly, random); for (source$iterator = new ArrayList$1(segments); source$iterator.i < source$iterator.this$01.array.length;) { source = castTo($next_6(source$iterator), 118); for (outDependency$iterator = new ArrayList$1(source.outgoingSegmentDependencies); outDependency$iterator.i < outDependency$iterator.this$01.array.length;) { outDependency = castTo($next_6(outDependency$iterator), 132); (!criticalOnly || outDependency.type_0 == ($clinit_HyperEdgeSegmentDependency$DependencyType() , CRITICAL)) && source.mark > outDependency.target.mark && (push_1(result.array, outDependency) , true); } } return result; } function initialize_2(segments, sources, sinks, criticalOnly){ var criticalInWeight, criticalOutWeight, inWeight, nextMark, outWeight, segment, segment$iterator; nextMark = -1; for (segment$iterator = new ArrayList$1(segments); segment$iterator.i < segment$iterator.this$01.array.length;) { segment = castTo($next_6(segment$iterator), 118); segment.mark = nextMark--; criticalInWeight = toInt_0($collect_0($mapToInt($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(segment.incomingSegmentDependencies, 16)), new HyperEdgeCycleDetector$lambda$0$Type), new HyperEdgeCycleDetector$lambda$1$Type)).sum); criticalOutWeight = toInt_0($collect_0($mapToInt($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(segment.outgoingSegmentDependencies, 16)), new HyperEdgeCycleDetector$lambda$2$Type), new HyperEdgeCycleDetector$lambda$3$Type)).sum); inWeight = criticalInWeight; outWeight = criticalOutWeight; if (!criticalOnly) { inWeight = toInt_0($collect_0($mapToInt(new StreamImpl(null, new Spliterators$IteratorSpliterator(segment.incomingSegmentDependencies, 16)), new HyperEdgeCycleDetector$lambda$4$Type)).sum); outWeight = toInt_0($collect_0($mapToInt(new StreamImpl(null, new Spliterators$IteratorSpliterator(segment.outgoingSegmentDependencies, 16)), new HyperEdgeCycleDetector$lambda$5$Type)).sum); } segment.inDepWeight = inWeight; segment.criticalInDepWeight = criticalInWeight; segment.outDepWeight = outWeight; segment.criticalOutDepWeight = criticalOutWeight; outWeight == 0?($addNode_0(sinks, segment, sinks.tail.prev, sinks.tail) , true):inWeight == 0 && ($addNode_0(sources, segment, sources.tail.prev, sources.tail) , true); } } function updateNeighbors(node, sources, sinks, criticalOnly){ var dep, dep$iterator, dep$iterator0, source, target; for (dep$iterator0 = new ArrayList$1(node.outgoingSegmentDependencies); dep$iterator0.i < dep$iterator0.this$01.array.length;) { dep = castTo($next_6(dep$iterator0), 132); if (!criticalOnly || dep.type_0 == ($clinit_HyperEdgeSegmentDependency$DependencyType() , CRITICAL)) { target = dep.target; if (target.mark < 0 && dep.weight > 0) { $setInWeight(target, target.inDepWeight - dep.weight); dep.type_0 == ($clinit_HyperEdgeSegmentDependency$DependencyType() , CRITICAL) && $setCriticalInWeight(target, target.criticalInDepWeight - dep.weight); target.inDepWeight <= 0 && target.outDepWeight > 0 && ($addNode_0(sources, target, sources.tail.prev, sources.tail) , true); } } } for (dep$iterator = new ArrayList$1(node.incomingSegmentDependencies); dep$iterator.i < dep$iterator.this$01.array.length;) { dep = castTo($next_6(dep$iterator), 132); if (!criticalOnly || dep.type_0 == ($clinit_HyperEdgeSegmentDependency$DependencyType() , CRITICAL)) { source = dep.source; if (source.mark < 0 && dep.weight > 0) { $setOutWeight(source, source.outDepWeight - dep.weight); dep.type_0 == ($clinit_HyperEdgeSegmentDependency$DependencyType() , CRITICAL) && $setCriticalOutWeight(source, source.criticalOutDepWeight - dep.weight); source.outDepWeight <= 0 && source.inDepWeight > 0 && ($addNode_0(sinks, source, sinks.tail.prev, sinks.tail) , true); } } } } function HyperEdgeCycleDetector$lambda$0$Type(){ } defineClass(1872, 1, $intern_40, HyperEdgeCycleDetector$lambda$0$Type); _.test_0 = function test_101(arg0){ return castTo(arg0, 132).type_0 == ($clinit_HyperEdgeSegmentDependency$DependencyType() , CRITICAL); } ; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_HyperEdgeCycleDetector$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal', 'HyperEdgeCycleDetector/lambda$0$Type', 1872); function HyperEdgeCycleDetector$lambda$1$Type(){ } defineClass(1873, 1, {}, HyperEdgeCycleDetector$lambda$1$Type); _.applyAsInt = function applyAsInt(arg0){ return castTo(arg0, 132).weight; } ; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_HyperEdgeCycleDetector$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal', 'HyperEdgeCycleDetector/lambda$1$Type', 1873); function HyperEdgeCycleDetector$lambda$2$Type(){ } defineClass(1874, 1, $intern_40, HyperEdgeCycleDetector$lambda$2$Type); _.test_0 = function test_102(arg0){ return castTo(arg0, 132).type_0 == ($clinit_HyperEdgeSegmentDependency$DependencyType() , CRITICAL); } ; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_HyperEdgeCycleDetector$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal', 'HyperEdgeCycleDetector/lambda$2$Type', 1874); function HyperEdgeCycleDetector$lambda$3$Type(){ } defineClass(1875, 1, {}, HyperEdgeCycleDetector$lambda$3$Type); _.applyAsInt = function applyAsInt_0(arg0){ return castTo(arg0, 132).weight; } ; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_HyperEdgeCycleDetector$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal', 'HyperEdgeCycleDetector/lambda$3$Type', 1875); function HyperEdgeCycleDetector$lambda$4$Type(){ } defineClass(1876, 1, {}, HyperEdgeCycleDetector$lambda$4$Type); _.applyAsInt = function applyAsInt_1(arg0){ return castTo(arg0, 132).weight; } ; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_HyperEdgeCycleDetector$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal', 'HyperEdgeCycleDetector/lambda$4$Type', 1876); function HyperEdgeCycleDetector$lambda$5$Type(){ } defineClass(1877, 1, {}, HyperEdgeCycleDetector$lambda$5$Type); _.applyAsInt = function applyAsInt_2(arg0){ return castTo(arg0, 132).weight; } ; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_HyperEdgeCycleDetector$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal', 'HyperEdgeCycleDetector/lambda$5$Type', 1877); function $addPortPositions(this$static, port, hyperEdgeSegmentMap){ var otherPort, otherPort$iterator, portPos; hyperEdgeSegmentMap.put(port, this$static); $add_3(this$static.ports, port); portPos = this$static.routingStrategy.getPortPositionOnHyperNode(port); port.side == this$static.routingStrategy.getSourcePortSide()?insertSorted(this$static.incomingConnectionCoordinates, portPos):insertSorted(this$static.outgoingConnectionCoordinates, portPos); $recomputeExtent(this$static); for (otherPort$iterator = $iterator(concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [new LPort$1(port), new LPort$2(port)]))); $hasNext_1(otherPort$iterator);) { otherPort = castTo($next_0(otherPort$iterator), 12); hyperEdgeSegmentMap.containsKey(otherPort) || $addPortPositions(this$static, otherPort, hyperEdgeSegmentMap); } } function $compareTo_17(this$static, other){ return this$static.mark - other.mark; } function $recomputeExtent(this$static){ this$static.startPosition = NaN; this$static.endPosition = NaN; $recomputeExtent_0(this$static, this$static.incomingConnectionCoordinates); $recomputeExtent_0(this$static, this$static.outgoingConnectionCoordinates); } function $recomputeExtent_0(this$static, positions){ if (positions.size_0 != 0) { isNaN(this$static.startPosition)?(this$static.startPosition = $doubleValue((checkCriticalElement(positions.size_0 != 0) , castToDouble(positions.header.next_0.value_0)))):(this$static.startPosition = $wnd.Math.min(this$static.startPosition, $doubleValue((checkCriticalElement(positions.size_0 != 0) , castToDouble(positions.header.next_0.value_0))))); isNaN(this$static.endPosition)?(this$static.endPosition = $doubleValue((checkCriticalElement(positions.size_0 != 0) , castToDouble(positions.tail.prev.value_0)))):(this$static.endPosition = $wnd.Math.max(this$static.endPosition, $doubleValue((checkCriticalElement(positions.size_0 != 0) , castToDouble(positions.tail.prev.value_0))))); } } function $setCriticalInWeight(this$static, inWeight){ this$static.criticalInDepWeight = inWeight; } function $setCriticalOutWeight(this$static, outWeight){ this$static.criticalOutDepWeight = outWeight; } function $setInWeight(this$static, inWeight){ this$static.inDepWeight = inWeight; } function $setOutWeight(this$static, outWeight){ this$static.outDepWeight = outWeight; } function $setRoutingSlot_0(this$static, slot){ this$static.routingSlot = slot; } function $setSplitPartner(this$static, splitPartner){ this$static.splitPartner = splitPartner; } function $splitAt(this$static, splitPosition){ this$static.splitPartner = new HyperEdgeSegment(this$static.routingStrategy); $setSplitPartner(this$static.splitPartner, this$static); $addAll(this$static.splitPartner.outgoingConnectionCoordinates, this$static.outgoingConnectionCoordinates); $reset_0(this$static.outgoingConnectionCoordinates); $add_7(this$static.outgoingConnectionCoordinates, splitPosition); $add_7(this$static.splitPartner.incomingConnectionCoordinates, splitPosition); $recomputeExtent(this$static); $recomputeExtent(this$static.splitPartner); while (this$static.incomingSegmentDependencies.array.length != 0) { $remove_31(castTo($get_11(this$static.incomingSegmentDependencies, 0), 132)); } while (this$static.outgoingSegmentDependencies.array.length != 0) { $remove_31(castTo($get_11(this$static.outgoingSegmentDependencies, 0), 132)); } return this$static.splitPartner; } function HyperEdgeSegment(routingStrategy){ this.ports = new ArrayList; this.incomingConnectionCoordinates = new LinkedList; this.outgoingConnectionCoordinates = new LinkedList; this.outgoingSegmentDependencies = new ArrayList; this.incomingSegmentDependencies = new ArrayList; this.routingStrategy = routingStrategy; } function insertSorted(list, value_0){ var listIter, next; listIter = $listIterator_2(list, 0); while (listIter.currentNode != listIter.this$01.tail) { next = $floatValue(castToDouble($next_9(listIter))); if (next == value_0) { return; } else if (next > value_0) { $previous_0(listIter); break; } } $add_8(listIter, value_0); } defineClass(118, 1, {34:1, 118:1}, HyperEdgeSegment); _.compareTo_0 = function compareTo_18(other){ return $compareTo_17(this, castTo(other, 118)); } ; _.equals_0 = function equals_166(object){ var other; if (instanceOf(object, 118)) { other = castTo(object, 118); return this.mark == other.mark; } return false; } ; _.hashCode_1 = function hashCode_64(){ return this.mark; } ; _.toString_0 = function toString_104(){ var builder, name_0, port, portIter; builder = new StringBuilder_1('{'); portIter = new ArrayList$1(this.ports); while (portIter.i < portIter.this$01.array.length) { port = castTo($next_6(portIter), 12); name_0 = $getDesignation_2(port.owner); name_0 == null && (name_0 = 'n' + $getIndex(port.owner)); builder.string += '' + name_0; portIter.i < portIter.this$01.array.length && (builder.string += ',' , builder); } builder.string += '}'; return builder.string; } ; _.criticalInDepWeight = 0; _.criticalOutDepWeight = 0; _.endPosition = NaN; _.inDepWeight = 0; _.mark = 0; _.outDepWeight = 0; _.routingSlot = 0; _.startPosition = NaN; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_HyperEdgeSegment_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal', 'HyperEdgeSegment', 118); function $remove_31(this$static){ $setSource_1(this$static, null); $setTarget_1(this$static, null); } function $setSource_1(this$static, newSource){ !!this$static.source && $remove_12(this$static.source.outgoingSegmentDependencies, this$static); this$static.source = newSource; !!this$static.source && $add_3(this$static.source.outgoingSegmentDependencies, this$static); } function $setTarget_1(this$static, newTarget){ !!this$static.target && $remove_12(this$static.target.incomingSegmentDependencies, this$static); this$static.target = newTarget; !!this$static.target && $add_3(this$static.target.incomingSegmentDependencies, this$static); } function HyperEdgeSegmentDependency(type_0, source, target, weight){ this.type_0 = type_0; this.weight = weight; $setSource_1(this, source); $setTarget_1(this, target); } defineClass(132, 1, {132:1}, HyperEdgeSegmentDependency); _.toString_0 = function toString_105(){ return this.source + '->' + this.target + ' (' + $name(this.type_0) + ')'; } ; _.weight = 0; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_HyperEdgeSegmentDependency_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal', 'HyperEdgeSegmentDependency', 132); function $clinit_HyperEdgeSegmentDependency$DependencyType(){ $clinit_HyperEdgeSegmentDependency$DependencyType = emptyMethod; REGULAR = new HyperEdgeSegmentDependency$DependencyType('REGULAR', 0); CRITICAL = new HyperEdgeSegmentDependency$DependencyType('CRITICAL', 1); } function HyperEdgeSegmentDependency$DependencyType(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_69(name_0){ $clinit_HyperEdgeSegmentDependency$DependencyType(); return valueOf(($clinit_HyperEdgeSegmentDependency$DependencyType$Map() , $MAP_59), name_0); } function values_77(){ $clinit_HyperEdgeSegmentDependency$DependencyType(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_HyperEdgeSegmentDependency$DependencyType_2_classLit, 1), $intern_37, 528, 0, [REGULAR, CRITICAL]); } defineClass(528, 22, {3:1, 34:1, 22:1, 528:1}, HyperEdgeSegmentDependency$DependencyType); var CRITICAL, REGULAR; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_HyperEdgeSegmentDependency$DependencyType_2_classLit = createForEnum('org.eclipse.elk.alg.layered.p5edges.orthogonal', 'HyperEdgeSegmentDependency/DependencyType', 528, Ljava_lang_Enum_2_classLit, values_77, valueOf_69); function $clinit_HyperEdgeSegmentDependency$DependencyType$Map(){ $clinit_HyperEdgeSegmentDependency$DependencyType$Map = emptyMethod; $MAP_59 = createValueOfMap(($clinit_HyperEdgeSegmentDependency$DependencyType() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_HyperEdgeSegmentDependency$DependencyType_2_classLit, 1), $intern_37, 528, 0, [REGULAR, CRITICAL]))); } var $MAP_59; function $chooseBestAreaIndex(segment, freeAreas, fromIndex, toIndex){ var bestArea, bestAreaIndex, bestRating, currArea, currRating, i, splitPartner, splitSegment, splitSegments, newSplit, newSplitPartner; bestAreaIndex = fromIndex; if (fromIndex < toIndex) { splitSegments = (newSplit = new HyperEdgeSegment(segment.routingStrategy) , newSplitPartner = new HyperEdgeSegment(segment.routingStrategy) , $addAll(newSplit.incomingConnectionCoordinates, segment.incomingConnectionCoordinates) , newSplit.splitBy = segment.splitBy , newSplit.splitPartner = newSplitPartner , $recomputeExtent(newSplit) , $addAll(newSplitPartner.outgoingConnectionCoordinates, segment.outgoingConnectionCoordinates) , newSplitPartner.splitPartner = newSplit , $recomputeExtent(newSplitPartner) , new Pair(newSplit, newSplitPartner)); splitSegment = castTo(splitSegments.first, 118); splitPartner = castTo(splitSegments.second, 118); bestArea = (checkCriticalElementIndex(bestAreaIndex, freeAreas.array.length) , castTo(freeAreas.array[bestAreaIndex], 339)); bestRating = $rateArea(segment, splitSegment, splitPartner, bestArea); for (i = fromIndex + 1; i <= toIndex; i++) { currArea = (checkCriticalElementIndex(i, freeAreas.array.length) , castTo(freeAreas.array[i], 339)); currRating = $rateArea(segment, splitSegment, splitPartner, currArea); if ($isBetter(currArea, currRating, bestArea, bestRating)) { bestArea = currArea; bestRating = currRating; bestAreaIndex = i; } } } return bestAreaIndex; } function $computePositionToSplitAndUpdateFreeAreas(segment, freeAreas, criticalConflictThreshold){ var bestAreaIndex, currArea, firstPossibleAreaIndex, i, lastPossibleAreaIndex, splitPosition; firstPossibleAreaIndex = -1; lastPossibleAreaIndex = -1; for (i = 0; i < freeAreas.array.length; i++) { currArea = (checkCriticalElementIndex(i, freeAreas.array.length) , castTo(freeAreas.array[i], 339)); if (currArea.startPosition > segment.endPosition) { break; } else if (currArea.endPosition >= segment.startPosition) { firstPossibleAreaIndex < 0 && (firstPossibleAreaIndex = i); lastPossibleAreaIndex = i; } } splitPosition = (segment.startPosition + segment.endPosition) / 2; if (firstPossibleAreaIndex >= 0) { bestAreaIndex = $chooseBestAreaIndex(segment, freeAreas, firstPossibleAreaIndex, lastPossibleAreaIndex); splitPosition = center_0((checkCriticalElementIndex(bestAreaIndex, freeAreas.array.length) , castTo(freeAreas.array[bestAreaIndex], 339))); $useArea(freeAreas, bestAreaIndex, criticalConflictThreshold); } return splitPosition; } function $countCrossingsForSingleOrdering(left, right){ return countCrossings(left.outgoingConnectionCoordinates, right.startPosition, right.endPosition) + countCrossings(right.incomingConnectionCoordinates, left.startPosition, left.endPosition); } function $decideWhichSegmentsToSplit(dependencies){ var dependency, dependency$iterator, segmentCausingSplit, segmentToSplit, segmentsToSplit, sourceSegment, targetSegment; segmentsToSplit = new LinkedHashSet; for (dependency$iterator = new ArrayList$1(dependencies); dependency$iterator.i < dependency$iterator.this$01.array.length;) { dependency = castTo($next_6(dependency$iterator), 132); sourceSegment = dependency.source; targetSegment = dependency.target; if (segmentsToSplit.map_0.containsKey(sourceSegment) || segmentsToSplit.map_0.containsKey(targetSegment)) { continue; } segmentToSplit = sourceSegment; segmentCausingSplit = targetSegment; if (sourceSegment.incomingConnectionCoordinates.size_0 + sourceSegment.outgoingConnectionCoordinates.size_0 > 2 && targetSegment.incomingConnectionCoordinates.size_0 + targetSegment.outgoingConnectionCoordinates.size_0 <= 2) { segmentToSplit = targetSegment; segmentCausingSplit = sourceSegment; } segmentsToSplit.map_0.put(segmentToSplit, segmentsToSplit); segmentToSplit.splitBy = segmentCausingSplit; } return segmentsToSplit; } function $findFreeAreas(segments, criticalConflictThreshold){ var freeAreas, i, inCoordinates, outCoordinates, sortedCoordinates; freeAreas = new ArrayList; inCoordinates = $flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(segments, 16)), new HyperEdgeSegmentSplitter$lambda$2$Type); outCoordinates = $flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(segments, 16)), new HyperEdgeSegmentSplitter$lambda$3$Type); sortedCoordinates = $toArray_5($sorted($mapToDouble(concat_1(stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Stream_2_classLit, 1), $intern_2, 848, 0, [inCoordinates, outCoordinates])), new HyperEdgeSegmentSplitter$lambda$4$Type))); for (i = 1; i < sortedCoordinates.length; i++) { sortedCoordinates[i] - sortedCoordinates[i - 1] >= 2 * criticalConflictThreshold && $add_3(freeAreas, new HyperEdgeSegmentSplitter$FreeArea(sortedCoordinates[i - 1] + criticalConflictThreshold, sortedCoordinates[i] - criticalConflictThreshold)); } return freeAreas; } function $isBetter(currArea, currRating, bestArea, bestRating){ if (currRating.crossings < bestRating.crossings) { return true; } else if (currRating.crossings == bestRating.crossings) { if (currRating.dependencies < bestRating.dependencies) { return true; } else if (currRating.dependencies == bestRating.dependencies) { if (currArea.size_0 > bestArea.size_0) { return true; } } } return false; } function $lambda$1_6(this$static, segments_1, freeAreas_2, criticalConflictThreshold_3, segment_3){ var splitPosition; splitPosition = $computePositionToSplitAndUpdateFreeAreas(segment_3, freeAreas_2, criticalConflictThreshold_3); $add_3(segments_1, $splitAt(segment_3, splitPosition)); $updateDependencies(this$static, segment_3, segments_1); } function $rateArea(segment, splitSegment, splitPartner, area){ var areaCentre, dependency, dependency$iterator, dependency$iterator0, otherSegment, rating; areaCentre = (area.startPosition + area.endPosition) / 2; $reset_0(splitSegment.outgoingConnectionCoordinates); $add_7(splitSegment.outgoingConnectionCoordinates, areaCentre); $reset_0(splitPartner.incomingConnectionCoordinates); $add_7(splitPartner.incomingConnectionCoordinates, areaCentre); rating = new HyperEdgeSegmentSplitter$AreaRating; for (dependency$iterator0 = new ArrayList$1(segment.incomingSegmentDependencies); dependency$iterator0.i < dependency$iterator0.this$01.array.length;) { dependency = castTo($next_6(dependency$iterator0), 132); otherSegment = dependency.source; $updateConsideringBothOrderings(rating, splitSegment, otherSegment); $updateConsideringBothOrderings(rating, splitPartner, otherSegment); } for (dependency$iterator = new ArrayList$1(segment.outgoingSegmentDependencies); dependency$iterator.i < dependency$iterator.this$01.array.length;) { dependency = castTo($next_6(dependency$iterator), 132); otherSegment = dependency.target; $updateConsideringBothOrderings(rating, splitSegment, otherSegment); $updateConsideringBothOrderings(rating, splitPartner, otherSegment); } rating.dependencies += 2; rating.crossings += $countCrossingsForSingleOrdering(splitSegment, segment.splitBy); rating.crossings += $countCrossingsForSingleOrdering(segment.splitBy, splitPartner); return rating; } function $splitSegments(this$static, dependenciesToResolve, segments, criticalConflictThreshold){ var freeAreas, segmentsToSplit; if (dependenciesToResolve.array.length == 0) { return; } freeAreas = $findFreeAreas(segments, criticalConflictThreshold); segmentsToSplit = $decideWhichSegmentsToSplit(dependenciesToResolve); $forEach_3($sorted_1(new StreamImpl(null, new Spliterators$IteratorSpliterator(segmentsToSplit, 1)), new HyperEdgeSegmentSplitter$lambda$0$Type), new HyperEdgeSegmentSplitter$lambda$1$Type(this$static, segments, freeAreas, criticalConflictThreshold)); } function $updateConsideringBothOrderings(rating, s1, s2){ var crossingsS1LeftOfS2, crossingsS2LeftOfS1; crossingsS1LeftOfS2 = countCrossings(s1.outgoingConnectionCoordinates, s2.startPosition, s2.endPosition) + countCrossings(s2.incomingConnectionCoordinates, s1.startPosition, s1.endPosition); crossingsS2LeftOfS1 = countCrossings(s2.outgoingConnectionCoordinates, s1.startPosition, s1.endPosition) + countCrossings(s1.incomingConnectionCoordinates, s2.startPosition, s2.endPosition); if (crossingsS1LeftOfS2 == crossingsS2LeftOfS1) { if (crossingsS1LeftOfS2 > 0) { rating.dependencies += 2; rating.crossings += crossingsS1LeftOfS2; } } else { rating.dependencies += 1; rating.crossings += $wnd.Math.min(crossingsS1LeftOfS2, crossingsS2LeftOfS1); } } function $updateDependencies(this$static, segment, segments){ var otherSegment, otherSegment$iterator, splitCausingSegment, splitPartner; splitCausingSegment = segment.splitBy; splitPartner = segment.splitPartner; new HyperEdgeSegmentDependency(($clinit_HyperEdgeSegmentDependency$DependencyType() , CRITICAL), segment, splitCausingSegment, 1); new HyperEdgeSegmentDependency(CRITICAL, splitCausingSegment, splitPartner, 1); for (otherSegment$iterator = new ArrayList$1(segments); otherSegment$iterator.i < otherSegment$iterator.this$01.array.length;) { otherSegment = castTo($next_6(otherSegment$iterator), 118); if (otherSegment != splitCausingSegment && otherSegment != segment && otherSegment != splitPartner) { $createDependencyIfNecessary(this$static.routingGenerator, otherSegment, segment); $createDependencyIfNecessary(this$static.routingGenerator, otherSegment, splitPartner); } } } function $useArea(freeAreas, usedAreaIndex, criticalConflictThreshold){ var insertIndex, newArea1, newArea2, newEnd1, newStart2, oldArea, oldAreaCentre; oldArea = (checkCriticalElementIndex(usedAreaIndex, freeAreas.array.length) , castTo(freeAreas.array[usedAreaIndex], 339)); $remove_11(freeAreas, usedAreaIndex); if (oldArea.size_0 / 2 >= criticalConflictThreshold) { insertIndex = usedAreaIndex; oldAreaCentre = (oldArea.startPosition + oldArea.endPosition) / 2; newEnd1 = oldAreaCentre - criticalConflictThreshold; if (oldArea.startPosition <= oldAreaCentre - criticalConflictThreshold) { newArea1 = new HyperEdgeSegmentSplitter$FreeArea(oldArea.startPosition, newEnd1); $add_2(freeAreas, insertIndex++, newArea1); } newStart2 = oldAreaCentre + criticalConflictThreshold; if (newStart2 <= oldArea.endPosition) { newArea2 = new HyperEdgeSegmentSplitter$FreeArea(newStart2, oldArea.endPosition); checkCriticalPositionIndex(insertIndex, freeAreas.array.length); insertTo(freeAreas.array, insertIndex, newArea2); } } } function HyperEdgeSegmentSplitter(routingGenerator){ this.routingGenerator = routingGenerator; } function center_0(a){ return (a.startPosition + a.endPosition) / 2; } function lambda$0_33(hes1_0, hes2_1){ return compare_4(hes1_0.endPosition - hes1_0.startPosition, hes2_1.endPosition - hes2_1.startPosition); } defineClass(1878, 1, {}, HyperEdgeSegmentSplitter); var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_HyperEdgeSegmentSplitter_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal', 'HyperEdgeSegmentSplitter', 1878); function HyperEdgeSegmentSplitter$AreaRating(){ this.dependencies = 0; this.crossings = 0; } defineClass(1879, 1, {}, HyperEdgeSegmentSplitter$AreaRating); _.crossings = 0; _.dependencies = 0; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_HyperEdgeSegmentSplitter$AreaRating_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal', 'HyperEdgeSegmentSplitter/AreaRating', 1879); function HyperEdgeSegmentSplitter$FreeArea(startPosition, endPosition){ this.startPosition = startPosition; this.endPosition = endPosition; this.size_0 = endPosition - startPosition; } defineClass(339, 1, {339:1}, HyperEdgeSegmentSplitter$FreeArea); _.endPosition = 0; _.size_0 = 0; _.startPosition = 0; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_HyperEdgeSegmentSplitter$FreeArea_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal', 'HyperEdgeSegmentSplitter/FreeArea', 339); function HyperEdgeSegmentSplitter$lambda$0$Type(){ } defineClass(1880, 1, $intern_88, HyperEdgeSegmentSplitter$lambda$0$Type); _.compare_1 = function compare_80(arg0, arg1){ return lambda$0_33(castTo(arg0, 118), castTo(arg1, 118)); } ; _.equals_0 = function equals_167(other){ return this === other; } ; _.reversed = function reversed_72(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_HyperEdgeSegmentSplitter$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal', 'HyperEdgeSegmentSplitter/lambda$0$Type', 1880); function HyperEdgeSegmentSplitter$lambda$1$Type($$outer_0, segments_1, freeAreas_2, criticalConflictThreshold_3){ this.$$outer_0 = $$outer_0; this.segments_1 = segments_1; this.freeAreas_2 = freeAreas_2; this.criticalConflictThreshold_3 = criticalConflictThreshold_3; } defineClass(1881, 1, $intern_19, HyperEdgeSegmentSplitter$lambda$1$Type); _.accept = function accept_131(arg0){ $lambda$1_6(this.$$outer_0, this.segments_1, this.freeAreas_2, this.criticalConflictThreshold_3, castTo(arg0, 118)); } ; _.criticalConflictThreshold_3 = 0; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_HyperEdgeSegmentSplitter$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal', 'HyperEdgeSegmentSplitter/lambda$1$Type', 1881); function HyperEdgeSegmentSplitter$lambda$2$Type(){ } defineClass(1882, 1, {}, HyperEdgeSegmentSplitter$lambda$2$Type); _.apply_0 = function apply_149(arg0){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 118).incomingConnectionCoordinates, 16)); } ; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_HyperEdgeSegmentSplitter$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal', 'HyperEdgeSegmentSplitter/lambda$2$Type', 1882); function HyperEdgeSegmentSplitter$lambda$3$Type(){ } defineClass(1883, 1, {}, HyperEdgeSegmentSplitter$lambda$3$Type); _.apply_0 = function apply_150(arg0){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 118).outgoingConnectionCoordinates, 16)); } ; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_HyperEdgeSegmentSplitter$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal', 'HyperEdgeSegmentSplitter/lambda$3$Type', 1883); function HyperEdgeSegmentSplitter$lambda$4$Type(){ } defineClass(1884, 1, {}, HyperEdgeSegmentSplitter$lambda$4$Type); _.applyAsDouble = function applyAsDouble_3(arg0){ return $doubleValue(castToDouble(arg0)); } ; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_HyperEdgeSegmentSplitter$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal', 'HyperEdgeSegmentSplitter/lambda$4$Type', 1884); function $countConflicts(this$static, posis1, posis2){ var conflicts, hasMore, iter1, iter2, pos1, pos2; conflicts = 0; if (posis1.size_0 != 0 && posis2.size_0 != 0) { iter1 = $listIterator_2(posis1, 0); iter2 = $listIterator_2(posis2, 0); pos1 = $doubleValue(castToDouble($next_9(iter1))); pos2 = $doubleValue(castToDouble($next_9(iter2))); hasMore = true; do { if (pos1 > pos2 - this$static.criticalConflictThreshold && pos1 < pos2 + this$static.criticalConflictThreshold) { return -1; } else pos1 > pos2 - this$static.conflictThreshold && pos1 < pos2 + this$static.conflictThreshold && ++conflicts; pos1 <= pos2 && iter1.currentNode != iter1.this$01.tail?(pos1 = $doubleValue(castToDouble($next_9(iter1)))):pos2 <= pos1 && iter2.currentNode != iter2.this$01.tail?(pos2 = $doubleValue(castToDouble($next_9(iter2)))):(hasMore = false); } while (hasMore); } return conflicts; } function $createDependencyIfNecessary(this$static, he1, he2){ var conflicts1, conflicts2, criticalConflictsDetected, criticalDependencyCount, crossings1, crossings2, depValue1, depValue2; if ($wnd.Math.abs(he1.startPosition - he1.endPosition) < $intern_101 || $wnd.Math.abs(he2.startPosition - he2.endPosition) < $intern_101) { return 0; } conflicts1 = $countConflicts(this$static, he1.outgoingConnectionCoordinates, he2.incomingConnectionCoordinates); conflicts2 = $countConflicts(this$static, he2.outgoingConnectionCoordinates, he1.incomingConnectionCoordinates); criticalConflictsDetected = conflicts1 == -1 || conflicts2 == -1; criticalDependencyCount = 0; if (criticalConflictsDetected) { if (conflicts1 == -1) { new HyperEdgeSegmentDependency(($clinit_HyperEdgeSegmentDependency$DependencyType() , CRITICAL), he2, he1, 1); ++criticalDependencyCount; } if (conflicts2 == -1) { new HyperEdgeSegmentDependency(($clinit_HyperEdgeSegmentDependency$DependencyType() , CRITICAL), he1, he2, 1); ++criticalDependencyCount; } } else { crossings1 = countCrossings(he1.outgoingConnectionCoordinates, he2.startPosition, he2.endPosition); crossings1 += countCrossings(he2.incomingConnectionCoordinates, he1.startPosition, he1.endPosition); crossings2 = countCrossings(he2.outgoingConnectionCoordinates, he1.startPosition, he1.endPosition); crossings2 += countCrossings(he1.incomingConnectionCoordinates, he2.startPosition, he2.endPosition); depValue1 = conflicts1 + 16 * crossings1; depValue2 = conflicts2 + 16 * crossings2; if (depValue1 < depValue2) { new HyperEdgeSegmentDependency(($clinit_HyperEdgeSegmentDependency$DependencyType() , REGULAR), he1, he2, depValue2 - depValue1); } else if (depValue1 > depValue2) { new HyperEdgeSegmentDependency(($clinit_HyperEdgeSegmentDependency$DependencyType() , REGULAR), he2, he1, depValue1 - depValue2); } else if (depValue1 > 0 && depValue2 > 0) { new HyperEdgeSegmentDependency(($clinit_HyperEdgeSegmentDependency$DependencyType() , REGULAR), he1, he2, 0); new HyperEdgeSegmentDependency(REGULAR, he2, he1, 0); } } return criticalDependencyCount; } function $createHyperEdgeSegments(this$static, nodes, portSide, hyperEdges, portToHyperEdgeSegmentMap){ var hyperEdge, node, node$iterator, port, port$iterator; if (nodes) { for (node$iterator = nodes.iterator_0(); node$iterator.hasNext_0();) { node = castTo(node$iterator.next_1(), 10); for (port$iterator = $getPorts_0(node, ($clinit_PortType() , OUTPUT), portSide).iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); hyperEdge = castTo(getEntryValueOrNull($getEntry_0(portToHyperEdgeSegmentMap.hashCodeMap, port)), 118); if (!hyperEdge) { hyperEdge = new HyperEdgeSegment(this$static.routingStrategy); push_1(hyperEdges.array, hyperEdge); $addPortPositions(hyperEdge, port, portToHyperEdgeSegmentMap); } } } } } function $minimumDifference(numberStream){ var currentNumber, iter, minDifference, numbers, previousNumber; numbers = castTo($collect_1($distinct($sorted_0(numberStream)), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , IDENTITY_FINISH)]))), 15); minDifference = $intern_98; if (numbers.size_1() >= 2) { iter = numbers.iterator_0(); currentNumber = castToDouble(iter.next_1()); while (iter.hasNext_0()) { previousNumber = currentNumber; currentNumber = castToDouble(iter.next_1()); minDifference = $wnd.Math.min(minDifference, (checkCriticalNotNull(currentNumber) , currentNumber) - (checkCriticalNotNull(previousNumber) , previousNumber)); } } return minDifference; } function $routeEdges_0(this$static, layeredGraph, sourceLayerNodes, targetLayerNodes, startPos){ var criticalDependencyCount, edgeSegments, firstIdx, firstSegment, node, node$iterator, portToEdgeSegmentMap, random, rankCount, secondIdx, minIncomingDistance, minOutgoingDistance, cycleDependencies; portToEdgeSegmentMap = new HashMap; edgeSegments = new ArrayList; $createHyperEdgeSegments(this$static, sourceLayerNodes, this$static.routingStrategy.getSourcePortSide(), edgeSegments, portToEdgeSegmentMap); $createHyperEdgeSegments(this$static, targetLayerNodes, this$static.routingStrategy.getTargetPortSide(), edgeSegments, portToEdgeSegmentMap); this$static.criticalConflictThreshold = 0.2 * (minIncomingDistance = $minimumDifference($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(edgeSegments, 16)), new OrthogonalRoutingGenerator$lambda$0$Type)) , minOutgoingDistance = $minimumDifference($flatMap(new StreamImpl(null, new Spliterators$IteratorSpliterator(edgeSegments, 16)), new OrthogonalRoutingGenerator$lambda$1$Type)) , $wnd.Math.min(minIncomingDistance, minOutgoingDistance)); criticalDependencyCount = 0; for (firstIdx = 0; firstIdx < edgeSegments.array.length - 1; firstIdx++) { firstSegment = (checkCriticalElementIndex(firstIdx, edgeSegments.array.length) , castTo(edgeSegments.array[firstIdx], 118)); for (secondIdx = firstIdx + 1; secondIdx < edgeSegments.array.length; secondIdx++) { criticalDependencyCount += $createDependencyIfNecessary(this$static, firstSegment, (checkCriticalElementIndex(secondIdx, edgeSegments.array.length) , castTo(edgeSegments.array[secondIdx], 118))); } } random = castTo($getProperty(layeredGraph, ($clinit_InternalProperties_1() , RANDOM_0)), 234); criticalDependencyCount >= 2 && (cycleDependencies = detectCycles(edgeSegments, true, random) , !this$static.segmentSplitter && (this$static.segmentSplitter = new HyperEdgeSegmentSplitter(this$static)) , $splitSegments(this$static.segmentSplitter, cycleDependencies, edgeSegments, this$static.criticalConflictThreshold) , undefined); breakNonCriticalCycles(edgeSegments, random); topologicalNumbering(edgeSegments); rankCount = -1; for (node$iterator = new ArrayList$1(edgeSegments); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 118); if ($wnd.Math.abs(node.startPosition - node.endPosition) < $intern_101) { continue; } rankCount = $wnd.Math.max(rankCount, node.routingSlot); this$static.routingStrategy.calculateBendPoints(node, startPos, this$static.edgeSpacing); } this$static.routingStrategy.createdJunctionPoints.map_0.clear_0(); return rankCount + 1; } function OrthogonalRoutingGenerator(direction, edgeSpacing){ this.routingStrategy = forRoutingDirection(direction); this.edgeSpacing = edgeSpacing; this.conflictThreshold = 0.5 * edgeSpacing; } function breakNonCriticalCycles(edgeSegments, random){ var cycleDependencies, cycleDependency, cycleDependency$iterator, oldSource, oldTarget; cycleDependencies = detectCycles(edgeSegments, false, random); for (cycleDependency$iterator = new ArrayList$1(cycleDependencies); cycleDependency$iterator.i < cycleDependency$iterator.this$01.array.length;) { cycleDependency = castTo($next_6(cycleDependency$iterator), 132); cycleDependency.weight == 0?($setSource_1(cycleDependency, null) , $setTarget_1(cycleDependency, null)):(oldSource = cycleDependency.source , oldTarget = cycleDependency.target , $setSource_1(cycleDependency, oldTarget) , $setTarget_1(cycleDependency, oldSource) , undefined); } } function countCrossings(posis, start_0, end){ var crossings, pos, pos$iterator; crossings = 0; for (pos$iterator = $listIterator_2(posis, 0); pos$iterator.currentNode != pos$iterator.this$01.tail;) { pos = $doubleValue(castToDouble($next_9(pos$iterator))); if (pos > end) { break; } else pos >= start_0 && ++crossings; } return crossings; } function topologicalNumbering(segments){ var dep, dep$iterator, maxRank, node, node$iterator, node$iterator0, rightwardTargets, source, sources, target; sources = new ArrayList; rightwardTargets = new ArrayList; for (node$iterator0 = new ArrayList$1(segments); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 118); $setInWeight(node, node.incomingSegmentDependencies.array.length); $setOutWeight(node, node.outgoingSegmentDependencies.array.length); node.inDepWeight == 0 && (push_1(sources.array, node) , true); node.outDepWeight == 0 && node.incomingConnectionCoordinates.size_0 == 0 && (push_1(rightwardTargets.array, node) , true); } maxRank = -1; while (sources.array.length != 0) { node = castTo($remove_11(sources, 0), 118); for (dep$iterator = new ArrayList$1(node.outgoingSegmentDependencies); dep$iterator.i < dep$iterator.this$01.array.length;) { dep = castTo($next_6(dep$iterator), 132); target = dep.target; $setRoutingSlot_0(target, $wnd.Math.max(target.routingSlot, node.routingSlot + 1)); maxRank = $wnd.Math.max(maxRank, target.routingSlot); $setInWeight(target, target.inDepWeight - 1); target.inDepWeight == 0 && (push_1(sources.array, target) , true); } } if (maxRank > -1) { for (node$iterator = new ArrayList$1(rightwardTargets); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 118); node.routingSlot = maxRank; } while (rightwardTargets.array.length != 0) { node = castTo($remove_11(rightwardTargets, 0), 118); for (dep$iterator = new ArrayList$1(node.incomingSegmentDependencies); dep$iterator.i < dep$iterator.this$01.array.length;) { dep = castTo($next_6(dep$iterator), 132); source = dep.source; if (source.incomingConnectionCoordinates.size_0 > 0) { continue; } $setRoutingSlot_0(source, $wnd.Math.min(source.routingSlot, node.routingSlot - 1)); $setOutWeight(source, source.outDepWeight - 1); source.outDepWeight == 0 && (push_1(rightwardTargets.array, source) , true); } } } } defineClass(664, 1, {}, OrthogonalRoutingGenerator); _.conflictThreshold = 0; _.criticalConflictThreshold = 0; _.edgeSpacing = 0; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_OrthogonalRoutingGenerator_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal', 'OrthogonalRoutingGenerator', 664); function OrthogonalRoutingGenerator$lambda$0$Type(){ } defineClass(1703, 1, {}, OrthogonalRoutingGenerator$lambda$0$Type); _.apply_0 = function apply_151(arg0){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 118).incomingConnectionCoordinates, 16)); } ; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_OrthogonalRoutingGenerator$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal', 'OrthogonalRoutingGenerator/lambda$0$Type', 1703); function OrthogonalRoutingGenerator$lambda$1$Type(){ } defineClass(1704, 1, {}, OrthogonalRoutingGenerator$lambda$1$Type); _.apply_0 = function apply_152(arg0){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(castTo(arg0, 118).outgoingConnectionCoordinates, 16)); } ; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_OrthogonalRoutingGenerator$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal', 'OrthogonalRoutingGenerator/lambda$1$Type', 1704); function $addJunctionPointIfNecessary(this$static, edge, segment, pos, vertical){ var jpoint, junctionPoints, p, pointAtSegmentBoundary, pointInsideEdgeSegment; p = vertical?pos.y_0:pos.x_0; if ($contains_6(this$static.createdJunctionPoints, pos)) { return; } pointInsideEdgeSegment = p > segment.startPosition && p < segment.endPosition; pointAtSegmentBoundary = false; if (segment.incomingConnectionCoordinates.size_0 != 0 && segment.outgoingConnectionCoordinates.size_0 != 0) { pointAtSegmentBoundary = pointAtSegmentBoundary | ($wnd.Math.abs(p - $doubleValue(castToDouble($getFirst(segment.incomingConnectionCoordinates)))) < $intern_101 && $wnd.Math.abs(p - $doubleValue(castToDouble($getFirst(segment.outgoingConnectionCoordinates)))) < $intern_101); pointAtSegmentBoundary = pointAtSegmentBoundary | ($wnd.Math.abs(p - $doubleValue(castToDouble($getLast(segment.incomingConnectionCoordinates)))) < $intern_101 && $wnd.Math.abs(p - $doubleValue(castToDouble($getLast(segment.outgoingConnectionCoordinates)))) < $intern_101); } if (pointInsideEdgeSegment || pointAtSegmentBoundary) { junctionPoints = castTo($getProperty(edge, ($clinit_LayeredOptions() , JUNCTION_POINTS)), 75); if (!junctionPoints) { junctionPoints = new KVectorChain; $setProperty_0(edge, JUNCTION_POINTS, junctionPoints); } jpoint = new KVector_2(pos); $addNode_0(junctionPoints, jpoint, junctionPoints.tail.prev, junctionPoints.tail); $add_6(this$static.createdJunctionPoints, jpoint); } } function BaseRoutingDirectionStrategy(){ this.createdJunctionPoints = new HashSet; } function forRoutingDirection(direction){ switch (direction) { case 0: return new WestToEastRoutingStrategy; case 1: return new NorthToSouthRoutingStrategy; case 2: return new SouthToNorthRoutingStrategy; default:throw toJs(new IllegalArgumentException); } } defineClass(670, 1, {}); var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_direction_BaseRoutingDirectionStrategy_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal.direction', 'BaseRoutingDirectionStrategy', 670); function NorthToSouthRoutingStrategy(){ BaseRoutingDirectionStrategy.call(this); } defineClass(1870, 670, {}, NorthToSouthRoutingStrategy); _.calculateBendPoints = function calculateBendPoints(segment, startPos, edgeSpacing){ var bend, currentSegment, currentY, edge, edge$iterator, port, port$iterator, segmentY, sourceX, splitPartner, splitX, target, targetX; if (!!segment.splitPartner && !segment.splitBy) { return; } segmentY = startPos + segment.routingSlot * edgeSpacing; for (port$iterator = new ArrayList$1(segment.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); sourceX = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [port.owner.pos, port.pos, port.anchor])).x_0; for (edge$iterator = new ArrayList$1(port.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); if (!$isSelfLoop(edge)) { target = edge.target; targetX = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [target.owner.pos, target.pos, target.anchor])).x_0; if ($wnd.Math.abs(sourceX - targetX) > $intern_101) { currentY = segmentY; currentSegment = segment; bend = new KVector_1(sourceX, currentY); $add_7(edge.bendPoints, bend); $addJunctionPointIfNecessary(this, edge, currentSegment, bend, false); splitPartner = segment.splitPartner; if (splitPartner) { splitX = $doubleValue(castToDouble($get_7(splitPartner.incomingConnectionCoordinates, 0))); bend = new KVector_1(splitX, currentY); $add_7(edge.bendPoints, bend); $addJunctionPointIfNecessary(this, edge, currentSegment, bend, false); currentY = startPos + splitPartner.routingSlot * edgeSpacing; currentSegment = splitPartner; bend = new KVector_1(splitX, currentY); $add_7(edge.bendPoints, bend); $addJunctionPointIfNecessary(this, edge, currentSegment, bend, false); } bend = new KVector_1(targetX, currentY); $add_7(edge.bendPoints, bend); $addJunctionPointIfNecessary(this, edge, currentSegment, bend, false); } } } } } ; _.getPortPositionOnHyperNode = function getPortPositionOnHyperNode(port){ return port.owner.pos.x_0 + port.pos.x_0 + port.anchor.x_0; } ; _.getSourcePortSide = function getSourcePortSide(){ return $clinit_PortSide() , SOUTH_2; } ; _.getTargetPortSide = function getTargetPortSide(){ return $clinit_PortSide() , NORTH_3; } ; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_direction_NorthToSouthRoutingStrategy_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal.direction', 'NorthToSouthRoutingStrategy', 1870); function SouthToNorthRoutingStrategy(){ BaseRoutingDirectionStrategy.call(this); } defineClass(1871, 670, {}, SouthToNorthRoutingStrategy); _.calculateBendPoints = function calculateBendPoints_0(segment, startPos, edgeSpacing){ var bend, currentSegment, currentY, edge, edge$iterator, port, port$iterator, segmentY, sourceX, splitPartner, splitX, target, targetX; if (!!segment.splitPartner && !segment.splitBy) { return; } segmentY = startPos - segment.routingSlot * edgeSpacing; for (port$iterator = new ArrayList$1(segment.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); sourceX = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [port.owner.pos, port.pos, port.anchor])).x_0; for (edge$iterator = new ArrayList$1(port.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); if (!$isSelfLoop(edge)) { target = edge.target; targetX = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [target.owner.pos, target.pos, target.anchor])).x_0; if ($wnd.Math.abs(sourceX - targetX) > $intern_101) { currentY = segmentY; currentSegment = segment; bend = new KVector_1(sourceX, currentY); $add_7(edge.bendPoints, bend); $addJunctionPointIfNecessary(this, edge, currentSegment, bend, false); splitPartner = segment.splitPartner; if (splitPartner) { splitX = $doubleValue(castToDouble($get_7(splitPartner.incomingConnectionCoordinates, 0))); bend = new KVector_1(splitX, currentY); $add_7(edge.bendPoints, bend); $addJunctionPointIfNecessary(this, edge, currentSegment, bend, false); currentY = startPos - splitPartner.routingSlot * edgeSpacing; currentSegment = splitPartner; bend = new KVector_1(splitX, currentY); $add_7(edge.bendPoints, bend); $addJunctionPointIfNecessary(this, edge, currentSegment, bend, false); } bend = new KVector_1(targetX, currentY); $add_7(edge.bendPoints, bend); $addJunctionPointIfNecessary(this, edge, currentSegment, bend, false); } } } } } ; _.getPortPositionOnHyperNode = function getPortPositionOnHyperNode_0(port){ return port.owner.pos.x_0 + port.pos.x_0 + port.anchor.x_0; } ; _.getSourcePortSide = function getSourcePortSide_0(){ return $clinit_PortSide() , NORTH_3; } ; _.getTargetPortSide = function getTargetPortSide_0(){ return $clinit_PortSide() , SOUTH_2; } ; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_direction_SouthToNorthRoutingStrategy_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal.direction', 'SouthToNorthRoutingStrategy', 1871); function WestToEastRoutingStrategy(){ BaseRoutingDirectionStrategy.call(this); } defineClass(1869, 670, {}, WestToEastRoutingStrategy); _.calculateBendPoints = function calculateBendPoints_1(segment, startPos, edgeSpacing){ var bend, currentSegment, currentX, edge, edge$iterator, port, port$iterator, segmentX, sourceY, splitPartner, splitY, target, targetY; if (!!segment.splitPartner && !segment.splitBy) { return; } segmentX = startPos + segment.routingSlot * edgeSpacing; for (port$iterator = new ArrayList$1(segment.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); sourceY = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [port.owner.pos, port.pos, port.anchor])).y_0; for (edge$iterator = new ArrayList$1(port.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); if (!$isSelfLoop(edge)) { target = edge.target; targetY = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [target.owner.pos, target.pos, target.anchor])).y_0; if ($wnd.Math.abs(sourceY - targetY) > $intern_101) { currentX = segmentX; currentSegment = segment; bend = new KVector_1(currentX, sourceY); $add_7(edge.bendPoints, bend); $addJunctionPointIfNecessary(this, edge, currentSegment, bend, true); splitPartner = segment.splitPartner; if (splitPartner) { splitY = $doubleValue(castToDouble($get_7(splitPartner.incomingConnectionCoordinates, 0))); bend = new KVector_1(currentX, splitY); $add_7(edge.bendPoints, bend); $addJunctionPointIfNecessary(this, edge, currentSegment, bend, true); currentX = startPos + splitPartner.routingSlot * edgeSpacing; currentSegment = splitPartner; bend = new KVector_1(currentX, splitY); $add_7(edge.bendPoints, bend); $addJunctionPointIfNecessary(this, edge, currentSegment, bend, true); } bend = new KVector_1(currentX, targetY); $add_7(edge.bendPoints, bend); $addJunctionPointIfNecessary(this, edge, currentSegment, bend, true); } } } } } ; _.getPortPositionOnHyperNode = function getPortPositionOnHyperNode_1(port){ return port.owner.pos.y_0 + port.pos.y_0 + port.anchor.y_0; } ; _.getSourcePortSide = function getSourcePortSide_1(){ return $clinit_PortSide() , EAST_2; } ; _.getTargetPortSide = function getTargetPortSide_1(){ return $clinit_PortSide() , WEST_2; } ; var Lorg_eclipse_elk_alg_layered_p5edges_orthogonal_direction_WestToEastRoutingStrategy_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.orthogonal.direction', 'WestToEastRoutingStrategy', 1869); function $createUniformKnotVector(this$static, size_0){ var fraction, i, i0, i1, mySize; if (size_0 < 2 * this$static.dimNUBS) { throw toJs(new IllegalArgumentException_0('The knot vector must have at least two time the dimension elements.')); } this$static.maxKnot = 1; for (i0 = 0; i0 < this$static.dimNUBS; i0++) { $add_3(this$static.knotVector, 0); } mySize = size_0 + 1 - 2 * this$static.dimNUBS; fraction = mySize; for (i1 = 1; i1 < mySize; i1++) { $add_3(this$static.knotVector, i1 / fraction); } if (this$static.isClamped) { for (i = 0; i < this$static.dimNUBS; i++) { $add_3(this$static.knotVector, 1); } } } function $getBezierCP(this$static){ var iter, retVal; this$static.isBezier || $toBezier(this$static); retVal = new KVectorChain; iter = new ArrayList$1(this$static.controlPoints); $next_6(iter); while (iter.i < iter.this$01.array.length) { $add_7(retVal, castTo($next_6(iter), 418).cp); } checkCriticalElement(retVal.size_0 != 0); $removeNode_0(retVal, retVal.tail.prev); return retVal; } function $getMultiplicity(this$static, knotToCheck){ var count, currentKnot, diff, iter; iter = new AbstractList$ListIteratorImpl(this$static.knotVector, 0); count = 0; while (iter.i < iter.this$01_0.size_1()) { currentKnot = $doubleValue((checkCriticalElement(iter.i < iter.this$01_0.size_1()) , castToDouble(iter.this$01_0.get_0(iter.last = iter.i++)))); diff = currentKnot - knotToCheck; if (diff > $intern_118) { return count; } else diff > -1.0E-6 && ++count; } return count; } function $insertKnotAtCurrentPosition(this$static, insertions, knotToInsert, iterCP, iterKnot){ var cp, cp$iterator, firstCP, i, j, j0, j1, multiplicity, newCPs, secondCP; multiplicity = $getMultiplicity(this$static, knotToInsert); for (i = 0; i < insertions; i++) { $add_1(iterKnot, knotToInsert); newCPs = new ArrayList; secondCP = (checkCriticalElement(iterCP.i < iterCP.this$01_0.size_1()) , castTo(iterCP.this$01_0.get_0(iterCP.last = iterCP.i++), 418)); for (j0 = multiplicity + i; j0 < this$static.dimNUBS; j0++) { firstCP = secondCP; secondCP = (checkCriticalElement(iterCP.i < iterCP.this$01_0.size_1()) , castTo(iterCP.this$01_0.get_0(iterCP.last = iterCP.i++), 418)); $add_3(newCPs, new NubSpline$PolarCP(firstCP, secondCP, knotToInsert)); } for (j1 = multiplicity + i; j1 < this$static.dimNUBS; j1++) { checkCriticalElement(iterCP.i > 0); iterCP.this$01.get_0(iterCP.last = --iterCP.i); j1 > multiplicity + i && $remove_8(iterCP); } for (cp$iterator = new ArrayList$1(newCPs); cp$iterator.i < cp$iterator.this$01.array.length;) { cp = castTo($next_6(cp$iterator), 418); $add_1(iterCP, cp); } if (i < insertions - 1) { for (j = multiplicity + i; j < this$static.dimNUBS; j++) { checkCriticalElement(iterCP.i > 0); iterCP.this$01.get_0(iterCP.last = --iterCP.i); } } } } function $toBezier(this$static){ var currentKnot, i, iterCP, iterKnot, knotToCount, occurrence; iterKnot = new AbstractList$ListIteratorImpl(this$static.knotVector, 0); iterCP = new AbstractList$ListIteratorImpl(this$static.controlPoints, 0); if (this$static.isClamped) { for (i = 0; i < this$static.dimNUBS; i++) { checkCriticalElement(iterKnot.i < iterKnot.this$01_0.size_1()); iterKnot.this$01_0.get_0(iterKnot.last = iterKnot.i++); } } else { for (i = 0; i < this$static.dimNUBS - 1; i++) { checkCriticalElement(iterKnot.i < iterKnot.this$01_0.size_1()); iterKnot.this$01_0.get_0(iterKnot.last = iterKnot.i++); $remove_8(iterKnot); } } currentKnot = $doubleValue((checkCriticalElement(iterKnot.i < iterKnot.this$01_0.size_1()) , castToDouble(iterKnot.this$01_0.get_0(iterKnot.last = iterKnot.i++)))); while (this$static.maxKnot - currentKnot > $intern_118) { knotToCount = currentKnot; occurrence = 0; while ($wnd.Math.abs(currentKnot - knotToCount) < $intern_118) { ++occurrence; currentKnot = $doubleValue((checkCriticalElement(iterKnot.i < iterKnot.this$01_0.size_1()) , castToDouble(iterKnot.this$01_0.get_0(iterKnot.last = iterKnot.i++)))); checkCriticalElement(iterCP.i < iterCP.this$01_0.size_1()); iterCP.this$01_0.get_0(iterCP.last = iterCP.i++); } if (occurrence < this$static.dimNUBS) { checkCriticalElement(iterKnot.i > 0); iterKnot.this$01.get_0(iterKnot.last = --iterKnot.i); $insertKnotAtCurrentPosition(this$static, this$static.dimNUBS - occurrence, knotToCount, iterCP, iterKnot); checkCriticalElement(iterKnot.i < iterKnot.this$01_0.size_1()); iterKnot.this$01_0.get_0(iterKnot.last = iterKnot.i++); } checkCriticalElement(iterCP.i > 0); iterCP.this$01.get_0(iterCP.last = --iterCP.i); } if (!this$static.isClamped) { for (i = 0; i < this$static.dimNUBS - 1; i++) { checkCriticalElement(iterKnot.i < iterKnot.this$01_0.size_1()); iterKnot.this$01_0.get_0(iterKnot.last = iterKnot.i++); $remove_8(iterKnot); } } this$static.isClamped = true; this$static.isBezier = true; } function NubSpline(kVectors){ var i, i0, kVector, kVector$iterator, knotIter, polarCoordinate; this.knotVector = new ArrayList; this.controlPoints = new ArrayList; for (i0 = kVectors.size_0 - 1; i0 < 3; i0++) { $add_0(kVectors, 0, castTo($get_7(kVectors, 0), 8)); } if (kVectors.size_0 < 4) { throw toJs(new IllegalArgumentException_0('At (least dimension + 1) control points are necessary!')); } else { this.dimNUBS = 3; this.isClamped = true; this.isBezier = false; $createUniformKnotVector(this, kVectors.size_0 + this.dimNUBS - 1); polarCoordinate = new ArrayList; knotIter = new ArrayList$1(this.knotVector); for (i = 0; i < this.dimNUBS - 1; i++) { $add_3(polarCoordinate, castToDouble($next_6(knotIter))); } for (kVector$iterator = $listIterator_2(kVectors, 0); kVector$iterator.currentNode != kVector$iterator.this$01.tail;) { kVector = castTo($next_9(kVector$iterator), 8); $add_3(polarCoordinate, castToDouble($next_6(knotIter))); $add_3(this.controlPoints, new NubSpline$PolarCP_0(kVector, polarCoordinate)); checkCriticalElementIndex(0, polarCoordinate.array.length); polarCoordinate.array.splice(0, 1); } } } defineClass(828, 1, {}, NubSpline); _.toString_0 = function toString_106(){ return $toString_2(this.controlPoints); } ; _.dimNUBS = 0; _.isBezier = false; _.isClamped = false; _.maxKnot = 0; var Lorg_eclipse_elk_alg_layered_p5edges_splines_NubSpline_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.splines', 'NubSpline', 828); function $setCp(this$static, cp){ this$static.cp = cp; } function $setPolarCoordinate(this$static, polarCoordinate){ this$static.polarCoordinate = polarCoordinate; } function NubSpline$PolarCP(firstCP, secondCP, newKnot){ var aScaled, bScaled, firstFactor, iter, needsToBeAdded, nextKnot, secondFactor, total; firstFactor = $doubleValue(castToDouble(firstCP.polarCoordinate.iterator_0().next_1())); secondFactor = $doubleValue(castToDouble(getLast(secondCP.polarCoordinate))); aScaled = $scale($clone_1(firstCP.cp), secondFactor - newKnot); bScaled = $scale($clone_1(secondCP.cp), newKnot - firstFactor); total = $add_19(aScaled, bScaled); $scale(total, 1 / (secondFactor - firstFactor)); this.cp = total; this.polarCoordinate = new ArrayList; needsToBeAdded = true; iter = firstCP.polarCoordinate.iterator_0(); iter.next_1(); while (iter.hasNext_0()) { nextKnot = $doubleValue(castToDouble(iter.next_1())); if (needsToBeAdded && nextKnot - newKnot > $intern_118) { this.polarCoordinate.add_2(newKnot); needsToBeAdded = false; } this.polarCoordinate.add_2(nextKnot); } needsToBeAdded && this.polarCoordinate.add_2(newKnot); } function NubSpline$PolarCP_0(controlPoint, polarCoordinate){ $setCp(this, new KVector_1(controlPoint.x_0, controlPoint.y_0)); $setPolarCoordinate(this, newLinkedList(polarCoordinate)); } defineClass(418, 1, {418:1}, NubSpline$PolarCP, NubSpline$PolarCP_0); var Lorg_eclipse_elk_alg_layered_p5edges_splines_NubSpline$PolarCP_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.splines', 'NubSpline/PolarCP', 418); function $clinit_SplineEdgeRouter(){ $clinit_SplineEdgeRouter = emptyMethod; BASELINE_PROCESSING_ADDITIONS = $addBefore($addAfter(new LayoutProcessorConfiguration, ($clinit_LayeredPhases() , P5_EDGE_ROUTING), ($clinit_IntermediateProcessorStrategy() , FINAL_SPLINE_BENDPOINTS_CALCULATOR)), P3_NODE_ORDERING, INVERTED_PORT_PROCESSOR); SELF_LOOP_PROCESSING_ADDITIONS_1 = $add_17($add_17($before($addAfter($addBefore(new LayoutProcessorConfiguration, P1_CYCLE_BREAKING, SELF_LOOP_PREPROCESSOR), P5_EDGE_ROUTING, SELF_LOOP_POSTPROCESSOR), P4_NODE_PLACEMENT), SELF_LOOP_PORT_RESTORER), SELF_LOOP_ROUTER); CENTER_EDGE_LABEL_PROCESSING_ADDITIONS_1 = $addAfter($addBefore($addBefore($addBefore(new LayoutProcessorConfiguration, P2_LAYERING, LABEL_DUMMY_INSERTER), P4_NODE_PLACEMENT, LABEL_DUMMY_SWITCHER), P4_NODE_PLACEMENT, LABEL_SIDE_SELECTOR), P5_EDGE_ROUTING, LABEL_DUMMY_REMOVER); NORTH_SOUTH_PORT_PROCESSING_ADDITIONS_1 = $addBefore($addBefore(new LayoutProcessorConfiguration, P3_NODE_ORDERING, NORTH_SOUTH_PORT_PREPROCESSOR), P5_EDGE_ROUTING, NORTH_SOUTH_PORT_POSTPROCESSOR); END_EDGE_LABEL_PROCESSING_ADDITIONS_1 = $addAfter($addBefore($addBefore(new LayoutProcessorConfiguration, P4_NODE_PLACEMENT, LABEL_SIDE_SELECTOR), P4_NODE_PLACEMENT, END_LABEL_PREPROCESSOR), P5_EDGE_ROUTING, END_LABEL_POSTPROCESSOR); } function $clearThenFillMappings(this$static, leftLayer, rightLayer){ var edge, edge$iterator, node, node$iterator, nt, port, port$iterator, sourcePort, sourcePort$iterator, targetLayer, targetPort; this$static.leftPortsLayer.map_0.clear_0(); this$static.rightPortsLayer.map_0.clear_0(); this$static.edgesRemainingLayer.array.length = 0; this$static.splineSegmentsLayer.array.length = 0; this$static.selfLoopsLayer.map_0.clear_0(); if (leftLayer) { for (node$iterator = new ArrayList$1(leftLayer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); for (sourcePort$iterator = $getPorts_1(node, ($clinit_PortSide() , EAST_2)).iterator_0(); sourcePort$iterator.hasNext_0();) { sourcePort = castTo(sourcePort$iterator.next_1(), 12); $add_6(this$static.leftPortsLayer, sourcePort); for (edge$iterator = new ArrayList$1(sourcePort.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); if ($isSelfLoop(edge)) { continue; } $add_3(this$static.edgesRemainingLayer, edge); $findAndAddSuccessor(this$static, edge); nt = edge.source.owner.type_0; (nt == ($clinit_LNode$NodeType() , NORMAL) || nt == NORTH_SOUTH_PORT || nt == EXTERNAL_PORT || nt == BREAKING_POINT) && $add_3(this$static.startEdges, edge); targetPort = edge.target; targetLayer = targetPort.owner.layer; targetLayer == rightLayer?$add_6(this$static.rightPortsLayer, targetPort):targetLayer == leftLayer?$add_6(this$static.leftPortsLayer, targetPort):$remove_12(this$static.edgesRemainingLayer, edge); } } } } if (rightLayer) { for (node$iterator = new ArrayList$1(rightLayer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); for (port$iterator = new ArrayList$1(node.ports); port$iterator.i < port$iterator.this$01.array.length;) { port = castTo($next_6(port$iterator), 12); for (edge$iterator = new ArrayList$1(port.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); $isSelfLoop(edge) && $add_6(this$static.selfLoopsLayer, edge); } } for (sourcePort$iterator = $getPorts_1(node, ($clinit_PortSide() , WEST_2)).iterator_0(); sourcePort$iterator.hasNext_0();) { sourcePort = castTo(sourcePort$iterator.next_1(), 12); $add_6(this$static.rightPortsLayer, sourcePort); for (edge$iterator = new ArrayList$1(sourcePort.outgoingEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); if ($isSelfLoop(edge)) { continue; } $add_3(this$static.edgesRemainingLayer, edge); $findAndAddSuccessor(this$static, edge); nt = edge.source.owner.type_0; (nt == ($clinit_LNode$NodeType() , NORMAL) || nt == NORTH_SOUTH_PORT || nt == EXTERNAL_PORT || nt == BREAKING_POINT) && $add_3(this$static.startEdges, edge); targetPort = edge.target; targetLayer = targetPort.owner.layer; targetLayer == rightLayer?$add_6(this$static.rightPortsLayer, targetPort):targetLayer == leftLayer?$add_6(this$static.leftPortsLayer, targetPort):$remove_12(this$static.edgesRemainingLayer, edge); } } } } } function $computeSloppySpacing(rightLayer, edgeEdgeSpacing, nodeNodeSpacing, sloppyLayerSpacingFactor){ var incomingEdge, incomingEdge$iterator, layerSpacing, maxCurrInputYDiff, maxVertDiff, node, node$iterator, sourcePos, targetPos; maxVertDiff = 0; for (node$iterator = new ArrayList$1(rightLayer.nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 10); maxCurrInputYDiff = 0; for (incomingEdge$iterator = new Iterators$ConcatenatedIterator(transform_2($getIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(incomingEdge$iterator);) { incomingEdge = castTo($next_0(incomingEdge$iterator), 18); sourcePos = $getAbsoluteAnchor(incomingEdge.source).y_0; targetPos = $getAbsoluteAnchor(incomingEdge.target).y_0; maxCurrInputYDiff = $wnd.Math.max(maxCurrInputYDiff, $wnd.Math.abs(targetPos - sourcePos)); } maxVertDiff = $wnd.Math.max(maxVertDiff, maxCurrInputYDiff); } layerSpacing = sloppyLayerSpacingFactor * $wnd.Math.min(1, edgeEdgeSpacing / nodeNodeSpacing) * maxVertDiff; return layerSpacing; } function $createDependency(edge0, edge1){ var edge0Counter, edge1Counter, port, port$iterator, port$iterator0, port$iterator1, port$iterator2; if (edge0.hyperEdgeTopYPos > edge1.hyperEdgeBottomYPos || edge1.hyperEdgeTopYPos > edge0.hyperEdgeBottomYPos) { return; } edge0Counter = 0; edge1Counter = 0; for (port$iterator0 = edge0.rightPorts.map_0.keySet_0().iterator_0(); port$iterator0.hasNext_0();) { port = castTo(port$iterator0.next_1(), 12); isBetween(sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [port.owner.pos, port.pos, port.anchor])).y_0, edge1.hyperEdgeTopYPos, edge1.hyperEdgeBottomYPos) && ++edge0Counter; } for (port$iterator1 = edge0.leftPorts.map_0.keySet_0().iterator_0(); port$iterator1.hasNext_0();) { port = castTo(port$iterator1.next_1(), 12); isBetween(sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [port.owner.pos, port.pos, port.anchor])).y_0, edge1.hyperEdgeTopYPos, edge1.hyperEdgeBottomYPos) && --edge0Counter; } for (port$iterator2 = edge1.rightPorts.map_0.keySet_0().iterator_0(); port$iterator2.hasNext_0();) { port = castTo(port$iterator2.next_1(), 12); isBetween(sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [port.owner.pos, port.pos, port.anchor])).y_0, edge0.hyperEdgeTopYPos, edge0.hyperEdgeBottomYPos) && ++edge1Counter; } for (port$iterator = edge1.leftPorts.map_0.keySet_0().iterator_0(); port$iterator.hasNext_0();) { port = castTo(port$iterator.next_1(), 12); isBetween(sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [port.owner.pos, port.pos, port.anchor])).y_0, edge0.hyperEdgeTopYPos, edge0.hyperEdgeBottomYPos) && --edge1Counter; } if (edge0Counter < edge1Counter) { new SplineEdgeRouter$Dependency(edge0, edge1, edge1Counter - edge0Counter); } else if (edge1Counter < edge0Counter) { new SplineEdgeRouter$Dependency(edge1, edge0, edge0Counter - edge1Counter); } else { new SplineEdgeRouter$Dependency(edge1, edge0, 0); new SplineEdgeRouter$Dependency(edge0, edge1, 0); } } function $createSegmentsAndComputeRanking(this$static){ var hyperEdge1, hyperEdge2, sourceIter, targetIter; $createSplineSegmentsForHyperEdges(this$static, this$static.leftPortsLayer, this$static.rightPortsLayer, ($clinit_SplineEdgeRouter$SideToProcess() , LEFT_4), true, this$static.edgesRemainingLayer, this$static.splineSegmentsLayer); $createSplineSegmentsForHyperEdges(this$static, this$static.leftPortsLayer, this$static.rightPortsLayer, LEFT_4, false, this$static.edgesRemainingLayer, this$static.splineSegmentsLayer); $createSplineSegmentsForHyperEdges(this$static, this$static.leftPortsLayer, this$static.rightPortsLayer, RIGHT_4, true, this$static.edgesRemainingLayer, this$static.splineSegmentsLayer); $createSplineSegmentsForHyperEdges(this$static, this$static.leftPortsLayer, this$static.rightPortsLayer, RIGHT_4, false, this$static.edgesRemainingLayer, this$static.splineSegmentsLayer); $createSplineSegments(this$static, this$static.edgesRemainingLayer, this$static.leftPortsLayer, this$static.rightPortsLayer, this$static.splineSegmentsLayer); sourceIter = new AbstractList$ListIteratorImpl(this$static.splineSegmentsLayer, 0); while (sourceIter.i < sourceIter.this$01_0.size_1()) { hyperEdge1 = (checkCriticalElement(sourceIter.i < sourceIter.this$01_0.size_1()) , castTo(sourceIter.this$01_0.get_0(sourceIter.last = sourceIter.i++), 131)); targetIter = new AbstractList$ListIteratorImpl(this$static.splineSegmentsLayer, sourceIter.i); while (targetIter.i < targetIter.this$01_0.size_1()) { hyperEdge2 = (checkCriticalElement(targetIter.i < targetIter.this$01_0.size_1()) , castTo(targetIter.this$01_0.get_0(targetIter.last = targetIter.i++), 131)); $createDependency(hyperEdge1, hyperEdge2); } } breakCycles(this$static.splineSegmentsLayer, castTo($getProperty(this$static.lGraph, ($clinit_InternalProperties_1() , RANDOM_0)), 234)); topologicalNumbering_0(this$static.splineSegmentsLayer); } function $createSplineSegments(this$static, edges, leftPorts, rightPorts, hyperEdges){ var edge, edge$iterator, seg, sourcePort, sourceSide, targetPort, targetSide; for (edge$iterator = new ArrayList$1(edges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); sourcePort = edge.source; if (leftPorts.map_0.containsKey(sourcePort)) { sourceSide = ($clinit_SplineEdgeRouter$SideToProcess() , LEFT_4); } else if (rightPorts.map_0.containsKey(sourcePort)) { sourceSide = ($clinit_SplineEdgeRouter$SideToProcess() , RIGHT_4); } else { throw toJs(new IllegalArgumentException_0('Source port must be in one of the port sets.')); } targetPort = edge.target; if (leftPorts.map_0.containsKey(targetPort)) { targetSide = ($clinit_SplineEdgeRouter$SideToProcess() , LEFT_4); } else if (rightPorts.map_0.containsKey(targetPort)) { targetSide = ($clinit_SplineEdgeRouter$SideToProcess() , RIGHT_4); } else { throw toJs(new IllegalArgumentException_0('Target port must be in one of the port sets.')); } seg = new SplineSegment(edge, sourceSide, targetSide); $put_6(this$static.edgeToSegmentMap, edge, seg); push_1(hyperEdges.array, seg); } } function $createSplineSegmentsForHyperEdges(this$static, leftPorts, rightPorts, sideToProcess, reversed, edgesRemaining, hyperEdges){ var downEdges, edge, edge$iterator, pair, pair$iterator, portsToProcess, seg, singlePort, singlePort$iterator, singlePortPosition, targetPort, targetPortPosition, upEdges; portsToProcess = null; sideToProcess == ($clinit_SplineEdgeRouter$SideToProcess() , LEFT_4)?(portsToProcess = leftPorts):sideToProcess == RIGHT_4 && (portsToProcess = rightPorts); for (singlePort$iterator = portsToProcess.map_0.keySet_0().iterator_0(); singlePort$iterator.hasNext_0();) { singlePort = castTo(singlePort$iterator.next_1(), 12); singlePortPosition = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [singlePort.owner.pos, singlePort.pos, singlePort.anchor])).y_0; upEdges = new HashSet; downEdges = new HashSet; for (edge$iterator = new LPort$CombineIter$1(singlePort.connectedEdges); $hasNext_3(edge$iterator.firstIterator) || $hasNext_3(edge$iterator.secondIterator);) { edge = castTo($hasNext_3(edge$iterator.firstIterator)?$next_6(edge$iterator.firstIterator):$next_6(edge$iterator.secondIterator), 18); if ($booleanValue(castToBoolean($getProperty(edge, ($clinit_InternalProperties_1() , REVERSED)))) != reversed) { continue; } if ($indexOf_3(edgesRemaining, edge, 0) != -1) { edge.target == singlePort?(targetPort = edge.source):(targetPort = edge.target); targetPortPosition = sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [targetPort.owner.pos, targetPort.pos, targetPort.anchor])).y_0; if ($wnd.Math.abs(targetPortPosition - singlePortPosition) < 0.2) { continue; } targetPortPosition < singlePortPosition?leftPorts.map_0.containsKey(targetPort)?$add_6(upEdges, new Pair(LEFT_4, edge)):$add_6(upEdges, new Pair(RIGHT_4, edge)):leftPorts.map_0.containsKey(targetPort)?$add_6(downEdges, new Pair(LEFT_4, edge)):$add_6(downEdges, new Pair(RIGHT_4, edge)); } } if (upEdges.map_0.size_1() > 1) { seg = new SplineSegment_0(singlePort, upEdges, sideToProcess); $forEach_0(upEdges, new SplineEdgeRouter$lambda$2$Type(this$static, seg)); push_1(hyperEdges.array, seg); for (pair$iterator = upEdges.map_0.keySet_0().iterator_0(); pair$iterator.hasNext_0();) { pair = castTo(pair$iterator.next_1(), 42); $remove_12(edgesRemaining, pair.second); } } if (downEdges.map_0.size_1() > 1) { seg = new SplineSegment_0(singlePort, downEdges, sideToProcess); $forEach_0(downEdges, new SplineEdgeRouter$lambda$3$Type(this$static, seg)); push_1(hyperEdges.array, seg); for (pair$iterator = downEdges.map_0.keySet_0().iterator_0(); pair$iterator.hasNext_0();) { pair = castTo(pair$iterator.next_1(), 42); $remove_12(edgesRemaining, pair.second); } } } } function $findAndAddSuccessor(this$static, edge){ var iter, nt, targetNode; targetNode = edge.target.owner; nt = targetNode.type_0; if (nt == ($clinit_LNode$NodeType() , NORMAL) || nt == BREAKING_POINT) { return; } iter = new Iterators$ConcatenatedIterator(transform_2($getOutgoingEdges(targetNode).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(iter) && $put_6(this$static.successingEdge, edge, castTo($next_0(iter), 18)); } function $getEdgeChain(this$static, start_0){ var current, edgeChain; edgeChain = new ArrayList; current = start_0; do { push_1(edgeChain.array, current); current = castTo($get_10(this$static.successingEdge, current), 18); } while (current); return edgeChain; } function $getLayoutProcessorConfiguration_2(graph){ var configuration, graphProperties; configuration = new LayoutProcessorConfiguration; $addAll_6(configuration, BASELINE_PROCESSING_ADDITIONS); graphProperties = castTo($getProperty(graph, ($clinit_InternalProperties_1() , GRAPH_PROPERTIES)), 21); graphProperties.contains(($clinit_GraphProperties() , SELF_LOOPS)) && $addAll_6(configuration, SELF_LOOP_PROCESSING_ADDITIONS_1); graphProperties.contains(CENTER_LABELS) && $addAll_6(configuration, CENTER_EDGE_LABEL_PROCESSING_ADDITIONS_1); graphProperties.contains(NORTH_SOUTH_PORTS) && $addAll_6(configuration, NORTH_SOUTH_PORT_PROCESSING_ADDITIONS_1); graphProperties.contains(END_LABELS) && $addAll_6(configuration, END_EDGE_LABEL_PROCESSING_ADDITIONS_1); return configuration; } function $getSplinePath(this$static, start_0){ var current, initialSegment, lastSegment, segment, segmentChain; segmentChain = new ArrayList; current = start_0; do { segment = castTo($get_10(this$static.edgeToSegmentMap, current), 131); segment.sourcePort = current.source; segment.targetPort = current.target; push_1(segmentChain.array, segment); current = castTo($get_10(this$static.successingEdge, current), 18); } while (current); initialSegment = (checkCriticalElementIndex(0, segmentChain.array.length) , castTo(segmentChain.array[0], 131)); initialSegment.initialSegment = true; initialSegment.sourceNode = castTo(initialSegment.edges.map_0.keySet_0().iterator_0().next_1(), 18).source.owner; lastSegment = castTo($get_11(segmentChain, segmentChain.array.length - 1), 131); lastSegment.lastSegment = true; lastSegment.targetNode = castTo(lastSegment.edges.map_0.keySet_0().iterator_0().next_1(), 18).target.owner; return segmentChain; } function $lambda$2_3(this$static, seg_1, e_1){ return $put_6(this$static.edgeToSegmentMap, castTo(e_1.second, 18), seg_1); } function $lambda$3_2(this$static, seg_1, e_1){ return $put_6(this$static.edgeToSegmentMap, castTo(e_1.second, 18), seg_1); } function $process_81(this$static, layeredGraph, monitor){ var edge, edge$iterator, edgeChain, edgeEdgeSpacing, edgeNodeSpacing, firstLayer, increment, isLeftLayerExternal, isRightLayerExternal, isSpecialLeftLayer, isSpecialRightLayer, lastLayer, layerIterator, leftLayer, mode, nodeNodeSpacing, rightLayer, rightLayerPosition, segment, segment$iterator, sloppyLayerSpacingFactor, sloppyRouting, slotCount, spline, xSegmentDelta, xpos; monitor.begin('Spline edge routing', 1); if (layeredGraph.layers.array.length == 0) { layeredGraph.size_0.x_0 = 0; monitor.done_1(); return; } nodeNodeSpacing = $doubleValue(castToDouble($getProperty(layeredGraph, ($clinit_LayeredOptions() , SPACING_NODE_NODE_BETWEEN_LAYERS_0)))); edgeNodeSpacing = $doubleValue(castToDouble($getProperty(layeredGraph, SPACING_EDGE_NODE_BETWEEN_LAYERS_0))); edgeEdgeSpacing = $doubleValue(castToDouble($getProperty(layeredGraph, SPACING_EDGE_EDGE_BETWEEN_LAYERS_0))); mode = castTo($getProperty(layeredGraph, EDGE_ROUTING_SPLINES_MODE_0), 350); sloppyRouting = mode == ($clinit_SplineRoutingMode() , SLOPPY); sloppyLayerSpacingFactor = $doubleValue(castToDouble($getProperty(layeredGraph, EDGE_ROUTING_SPLINES_SLOPPY_LAYER_SPACING_FACTOR_0))); this$static.lGraph = layeredGraph; this$static.startEdges.array.length = 0; this$static.allSplineSegments.array.length = 0; $reset(this$static.successingEdge); firstLayer = castTo($get_11(layeredGraph.layers, 0), 30); isLeftLayerExternal = all_0(firstLayer.nodes, ($clinit_PolylineEdgeRouter() , PRED_EXTERNAL_WEST_OR_EAST_PORT)); lastLayer = castTo($get_11(layeredGraph.layers, layeredGraph.layers.array.length - 1), 30); isRightLayerExternal = all_0(lastLayer.nodes, PRED_EXTERNAL_WEST_OR_EAST_PORT); layerIterator = new ArrayList$1(layeredGraph.layers); leftLayer = null; xpos = 0; do { rightLayer = layerIterator.i < layerIterator.this$01.array.length?castTo($next_6(layerIterator), 30):null; $clearThenFillMappings(this$static, leftLayer, rightLayer); $createSegmentsAndComputeRanking(this$static); slotCount = $orElse_1($max_0($mapToInt($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static.splineSegmentsLayer, 16)), new SplineEdgeRouter$lambda$0$Type), new SplineEdgeRouter$lambda$1$Type))); xSegmentDelta = 0; rightLayerPosition = xpos; isSpecialLeftLayer = !leftLayer || isLeftLayerExternal && leftLayer == firstLayer; isSpecialRightLayer = !rightLayer || isRightLayerExternal && rightLayer == lastLayer; if (slotCount > 0) { increment = 0; !!leftLayer && (increment += edgeNodeSpacing); increment += (slotCount - 1) * edgeEdgeSpacing; !!rightLayer && (increment += edgeNodeSpacing); sloppyRouting && !!rightLayer && (increment = $wnd.Math.max(increment, $computeSloppySpacing(rightLayer, edgeEdgeSpacing, nodeNodeSpacing, sloppyLayerSpacingFactor))); if (increment < nodeNodeSpacing && !isSpecialLeftLayer && !isSpecialRightLayer) { xSegmentDelta = (nodeNodeSpacing - increment) / 2; increment = nodeNodeSpacing; } rightLayerPosition += increment; } else !isSpecialLeftLayer && !isSpecialRightLayer && (rightLayerPosition += nodeNodeSpacing); !!rightLayer && placeNodesHorizontally(rightLayer, rightLayerPosition); for (segment$iterator = new ArrayList$1(this$static.splineSegmentsLayer); segment$iterator.i < segment$iterator.this$01.array.length;) { segment = castTo($next_6(segment$iterator), 131); segment.boundingBox.x_0 = xpos; segment.boundingBox.width_0 = rightLayerPosition - xpos; segment.xDelta = xSegmentDelta; segment.isWestOfInitialLayer = !leftLayer; } $addAll_2(this$static.allSplineSegments, this$static.splineSegmentsLayer); xpos = rightLayerPosition; !!rightLayer && (xpos += rightLayer.size_0.x_0); leftLayer = rightLayer; isSpecialLeftLayer = isSpecialRightLayer; } while (rightLayer); for (edge$iterator = new ArrayList$1(this$static.startEdges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 18); edgeChain = $getEdgeChain(this$static, edge); $setProperty_0(edge, ($clinit_InternalProperties_1() , SPLINE_EDGE_CHAIN), edgeChain); spline = $getSplinePath(this$static, edge); $setProperty_0(edge, SPLINE_ROUTE_START, spline); } layeredGraph.size_0.x_0 = xpos; this$static.lGraph = null; monitor.done_1(); } function SplineEdgeRouter(){ $clinit_SplineEdgeRouter(); this.edgesRemainingLayer = new ArrayList; this.splineSegmentsLayer = new ArrayList; this.leftPortsLayer = new LinkedHashSet; this.rightPortsLayer = new LinkedHashSet; this.selfLoopsLayer = new LinkedHashSet; this.startEdges = new ArrayList; this.allSplineSegments = new ArrayList; this.edgeToSegmentMap = new HashMap; this.successingEdge = new HashMap; } function breakCycles(edges, random){ var depIter, dependency, dependency$iterator, dependency$iterator0, edge, edge$iterator, edge$iterator0, edge$iterator1, inweight, markBase, maxEdge, maxEdges, maxOutflow, nextLeft, nextMark, nextRight, outflow, outweight, shiftBase, sink, sinks, source, source$iterator, sources, target, unprocessed; sources = new LinkedList; sinks = new LinkedList; nextMark = -1; for (edge$iterator0 = new ArrayList$1(edges); edge$iterator0.i < edge$iterator0.this$01.array.length;) { edge = castTo($next_6(edge$iterator0), 131); edge.mark = nextMark--; inweight = 0; outweight = 0; for (dependency$iterator0 = new ArrayList$1(edge.outgoing); dependency$iterator0.i < dependency$iterator0.this$01.array.length;) { dependency = castTo($next_6(dependency$iterator0), 274); outweight += dependency.weight; } for (dependency$iterator = new ArrayList$1(edge.incoming); dependency$iterator.i < dependency$iterator.this$01.array.length;) { dependency = castTo($next_6(dependency$iterator), 274); inweight += dependency.weight; } edge.inweight = inweight; edge.outweight = outweight; outweight == 0?($addNode_0(sinks, edge, sinks.tail.prev, sinks.tail) , true):inweight == 0 && ($addNode_0(sources, edge, sources.tail.prev, sources.tail) , true); } unprocessed = newLinkedHashSet(edges); markBase = edges.array.length; nextLeft = markBase + 1; nextRight = markBase - 1; maxEdges = new ArrayList; while (unprocessed.map_0.size_1() != 0) { while (sinks.size_0 != 0) { sink = (checkCriticalElement(sinks.size_0 != 0) , castTo($removeNode_0(sinks, sinks.header.next_0), 131)); unprocessed.map_0.remove_0(sink) != null; sink.mark = nextRight--; updateNeighbors_0(sink, sources, sinks); } while (sources.size_0 != 0) { source = (checkCriticalElement(sources.size_0 != 0) , castTo($removeNode_0(sources, sources.header.next_0), 131)); unprocessed.map_0.remove_0(source) != null; source.mark = nextLeft++; updateNeighbors_0(source, sources, sinks); } maxOutflow = $intern_43; for (edge$iterator1 = unprocessed.map_0.keySet_0().iterator_0(); edge$iterator1.hasNext_0();) { edge = castTo(edge$iterator1.next_1(), 131); outflow = edge.outweight - edge.inweight; if (outflow >= maxOutflow) { if (outflow > maxOutflow) { maxEdges.array.length = 0; maxOutflow = outflow; } push_1(maxEdges.array, edge); } } if (maxEdges.array.length != 0) { maxEdge = castTo($get_11(maxEdges, $nextInt(random, maxEdges.array.length)), 131); unprocessed.map_0.remove_0(maxEdge) != null; maxEdge.mark = nextLeft++; updateNeighbors_0(maxEdge, sources, sinks); maxEdges.array.length = 0; } } shiftBase = edges.array.length + 1; for (edge$iterator = new ArrayList$1(edges); edge$iterator.i < edge$iterator.this$01.array.length;) { edge = castTo($next_6(edge$iterator), 131); edge.mark < markBase && (edge.mark += shiftBase); } for (source$iterator = new ArrayList$1(edges); source$iterator.i < source$iterator.this$01.array.length;) { source = castTo($next_6(source$iterator), 131); depIter = new AbstractList$ListIteratorImpl(source.outgoing, 0); while (depIter.i < depIter.this$01_0.size_1()) { dependency = (checkCriticalElement(depIter.i < depIter.this$01_0.size_1()) , castTo(depIter.this$01_0.get_0(depIter.last = depIter.i++), 274)); target = dependency.target; if (source.mark > target.mark) { $remove_8(depIter); $remove_12(target.incoming, dependency); if (dependency.weight > 0) { dependency.source = target; $add_3(target.outgoing, dependency); dependency.target = source; $add_3(source.incoming, dependency); } } } } } function topologicalNumbering_0(edges){ var dep, dep$iterator, edge, edge$iterator, edge$iterator0, maxRank, rightwardTargets, source, sources, target; sources = new LinkedList; rightwardTargets = new LinkedList; for (edge$iterator0 = new ArrayList$1(edges); edge$iterator0.i < edge$iterator0.this$01.array.length;) { edge = castTo($next_6(edge$iterator0), 131); edge.rank = 0; edge.inweight = edge.incoming.array.length; edge.outweight = edge.outgoing.array.length; edge.inweight == 0 && ($addNode_0(sources, edge, sources.tail.prev, sources.tail) , true); edge.outweight == 0 && edge.leftPorts.map_0.size_1() == 0 && ($addNode_0(rightwardTargets, edge, rightwardTargets.tail.prev, rightwardTargets.tail) , true); } maxRank = -1; while (sources.size_0 != 0) { edge = castTo($remove_4(sources, 0), 131); for (dep$iterator = new ArrayList$1(edge.outgoing); dep$iterator.i < dep$iterator.this$01.array.length;) { dep = castTo($next_6(dep$iterator), 274); target = dep.target; target.rank = $wnd.Math.max(target.rank, edge.rank + 1); maxRank = $wnd.Math.max(maxRank, target.rank); --target.inweight; target.inweight == 0 && ($addNode_0(sources, target, sources.tail.prev, sources.tail) , true); } } if (maxRank > -1) { for (edge$iterator = $listIterator_2(rightwardTargets, 0); edge$iterator.currentNode != edge$iterator.this$01.tail;) { edge = castTo($next_9(edge$iterator), 131); edge.rank = maxRank; } while (rightwardTargets.size_0 != 0) { edge = castTo($remove_4(rightwardTargets, 0), 131); for (dep$iterator = new ArrayList$1(edge.incoming); dep$iterator.i < dep$iterator.this$01.array.length;) { dep = castTo($next_6(dep$iterator), 274); source = dep.source; if (source.leftPorts.map_0.size_1() != 0) { continue; } source.rank = $wnd.Math.min(source.rank, edge.rank - 1); --source.outweight; source.outweight == 0 && ($addNode_0(rightwardTargets, source, rightwardTargets.tail.prev, rightwardTargets.tail) , true); } } } } function updateNeighbors_0(edge, sources, sinks){ var dep, dep$iterator, dep$iterator0; for (dep$iterator0 = new ArrayList$1(edge.outgoing); dep$iterator0.i < dep$iterator0.this$01.array.length;) { dep = castTo($next_6(dep$iterator0), 274); if (dep.target.mark < 0 && dep.weight > 0) { dep.target.inweight -= dep.weight; dep.target.inweight <= 0 && dep.target.outweight > 0 && $add_7(sources, dep.target); } } for (dep$iterator = new ArrayList$1(edge.incoming); dep$iterator.i < dep$iterator.this$01.array.length;) { dep = castTo($next_6(dep$iterator), 274); if (dep.source.mark < 0 && dep.weight > 0) { dep.source.outweight -= dep.weight; dep.source.outweight <= 0 && dep.source.inweight > 0 && $add_7(sinks, dep.source); } } } defineClass(1480, 1, $intern_113, SplineEdgeRouter); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_22(graph){ return $getLayoutProcessorConfiguration_2(castTo(graph, 36)); } ; _.process = function process_77(layeredGraph, monitor){ $process_81(this, castTo(layeredGraph, 36), monitor); } ; var BASELINE_PROCESSING_ADDITIONS, CENTER_EDGE_LABEL_PROCESSING_ADDITIONS_1, END_EDGE_LABEL_PROCESSING_ADDITIONS_1, NORTH_SOUTH_PORT_PROCESSING_ADDITIONS_1, SELF_LOOP_PROCESSING_ADDITIONS_1; var Lorg_eclipse_elk_alg_layered_p5edges_splines_SplineEdgeRouter_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.splines', 'SplineEdgeRouter', 1480); function SplineEdgeRouter$Dependency(source, target, weight){ this.source = source; this.target = target; this.weight = weight; $add_3(source.outgoing, this); $add_3(target.incoming, this); } defineClass(274, 1, {274:1}, SplineEdgeRouter$Dependency); _.toString_0 = function toString_107(){ return this.source + ' ->(' + this.weight + ') ' + this.target; } ; _.weight = 0; var Lorg_eclipse_elk_alg_layered_p5edges_splines_SplineEdgeRouter$Dependency_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.splines', 'SplineEdgeRouter/Dependency', 274); function $clinit_SplineEdgeRouter$SideToProcess(){ $clinit_SplineEdgeRouter$SideToProcess = emptyMethod; LEFT_4 = new SplineEdgeRouter$SideToProcess('LEFT', 0); RIGHT_4 = new SplineEdgeRouter$SideToProcess('RIGHT', 1); } function SplineEdgeRouter$SideToProcess(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_70(name_0){ $clinit_SplineEdgeRouter$SideToProcess(); return valueOf(($clinit_SplineEdgeRouter$SideToProcess$Map() , $MAP_60), name_0); } function values_78(){ $clinit_SplineEdgeRouter$SideToProcess(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_p5edges_splines_SplineEdgeRouter$SideToProcess_2_classLit, 1), $intern_37, 465, 0, [LEFT_4, RIGHT_4]); } defineClass(465, 22, {3:1, 34:1, 22:1, 465:1}, SplineEdgeRouter$SideToProcess); var LEFT_4, RIGHT_4; var Lorg_eclipse_elk_alg_layered_p5edges_splines_SplineEdgeRouter$SideToProcess_2_classLit = createForEnum('org.eclipse.elk.alg.layered.p5edges.splines', 'SplineEdgeRouter/SideToProcess', 465, Ljava_lang_Enum_2_classLit, values_78, valueOf_70); function $clinit_SplineEdgeRouter$SideToProcess$Map(){ $clinit_SplineEdgeRouter$SideToProcess$Map = emptyMethod; $MAP_60 = createValueOfMap(($clinit_SplineEdgeRouter$SideToProcess() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_layered_p5edges_splines_SplineEdgeRouter$SideToProcess_2_classLit, 1), $intern_37, 465, 0, [LEFT_4, RIGHT_4]))); } var $MAP_60; function SplineEdgeRouter$lambda$0$Type(){ } defineClass(1481, 1, $intern_40, SplineEdgeRouter$lambda$0$Type); _.test_0 = function test_103(arg0){ return $clinit_SplineEdgeRouter() , !castTo(arg0, 131).isStraight; } ; var Lorg_eclipse_elk_alg_layered_p5edges_splines_SplineEdgeRouter$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.splines', 'SplineEdgeRouter/lambda$0$Type', 1481); function SplineEdgeRouter$lambda$1$Type(){ } defineClass(1482, 1, {}, SplineEdgeRouter$lambda$1$Type); _.applyAsInt = function applyAsInt_3(arg0){ return $clinit_SplineEdgeRouter() , castTo(arg0, 131).rank + 1; } ; var Lorg_eclipse_elk_alg_layered_p5edges_splines_SplineEdgeRouter$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.splines', 'SplineEdgeRouter/lambda$1$Type', 1482); function SplineEdgeRouter$lambda$2$Type($$outer_0, seg_1){ this.$$outer_0 = $$outer_0; this.seg_1 = seg_1; } defineClass(1483, 1, $intern_19, SplineEdgeRouter$lambda$2$Type); _.accept = function accept_132(arg0){ $lambda$2_3(this.$$outer_0, this.seg_1, castTo(arg0, 42)); } ; var Lorg_eclipse_elk_alg_layered_p5edges_splines_SplineEdgeRouter$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.splines', 'SplineEdgeRouter/lambda$2$Type', 1483); function SplineEdgeRouter$lambda$3$Type($$outer_0, seg_1){ this.$$outer_0 = $$outer_0; this.seg_1 = seg_1; } defineClass(1484, 1, $intern_19, SplineEdgeRouter$lambda$3$Type); _.accept = function accept_133(arg0){ $lambda$3_2(this.$$outer_0, this.seg_1, castTo(arg0, 42)); } ; var Lorg_eclipse_elk_alg_layered_p5edges_splines_SplineEdgeRouter$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.splines', 'SplineEdgeRouter/lambda$3$Type', 1484); function $$init_8(this$static){ this$static.leftPorts = new HashSet; this$static.rightPorts = new HashSet; this$static.outgoing = new ArrayList; this$static.incoming = new ArrayList; this$static.edges = new HashSet; this$static.boundingBox = new ElkRectangle; this$static.edgeInformation = new HashMap; } function $addEdge_0(this$static, edge){ var ei, nt, nt0; $add_6(this$static.edges, edge); ei = new SplineSegment$EdgeInformation; $put_6(this$static.edgeInformation, edge, ei); ei.startY = $anchorY(edge.source); ei.endY = $anchorY(edge.target); ei.normalSourceNode = ($clinit_SplineEdgeRouter() , nt0 = edge.source.owner.type_0 , nt0 == ($clinit_LNode$NodeType() , NORMAL) || nt0 == BREAKING_POINT); ei.normalTargetNode = (nt = edge.target.owner.type_0 , nt == NORMAL || nt == BREAKING_POINT); ei.invertedLeft = edge.source.side == ($clinit_PortSide() , WEST_2); ei.invertedRight = edge.target.side == EAST_2; } function $anchorY(p){ return ($clinit_PortSide() , SIDES_NORTH_SOUTH).contains(p.side)?$doubleValue(castToDouble($getProperty(p, ($clinit_InternalProperties_1() , SPLINE_NS_PORT_Y_COORD)))):sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [p.owner.pos, p.pos, p.anchor])).y_0; } function $compareTo_18(this$static, other){ return this$static.mark - other.mark; } function $setRelevantPositions(this$static, sourceY, targetYMin, targetYMax){ this$static.boundingBox.y_0 = $wnd.Math.min(sourceY, targetYMin); this$static.boundingBox.height = $wnd.Math.max(sourceY, targetYMax) - this$static.boundingBox.y_0; if (sourceY < targetYMin) { this$static.centerControlPointY = 0.5 * (sourceY + targetYMin); this$static.hyperEdgeTopYPos = $intern_119 * this$static.centerControlPointY + 0.9 * sourceY; this$static.hyperEdgeBottomYPos = $intern_119 * this$static.centerControlPointY + 0.9 * targetYMin; } else { this$static.centerControlPointY = 0.5 * (sourceY + targetYMax); this$static.hyperEdgeTopYPos = $intern_119 * this$static.centerControlPointY + 0.9 * targetYMax; this$static.hyperEdgeBottomYPos = $intern_119 * this$static.centerControlPointY + 0.9 * sourceY; } } function SplineSegment(edge, sourceSide, targetSide){ var sourceY, targetY; $$init_8(this); sourceSide == ($clinit_SplineEdgeRouter$SideToProcess() , LEFT_4)?$add_6(this.leftPorts, edge.source):$add_6(this.rightPorts, edge.source); targetSide == LEFT_4?$add_6(this.leftPorts, edge.target):$add_6(this.rightPorts, edge.target); $addEdge_0(this, edge); sourceY = $anchorY(edge.source); targetY = $anchorY(edge.target); $setRelevantPositions(this, sourceY, targetY, targetY); this.isStraight = ($clinit_SplineEdgeRouter() , $wnd.Math.abs(sourceY - targetY) < 0.2); } function SplineSegment_0(singlePort, edges, sourceSide){ var edge, pair, pair$iterator, pair$iterator0, side, tgtPort, yMaxPosOfTarget, yMinPosOfTarget, yPosOfSingleSide, yPosOfTarget; $$init_8(this); sourceSide == ($clinit_SplineEdgeRouter$SideToProcess() , LEFT_4)?$add_6(this.leftPorts, singlePort):$add_6(this.rightPorts, singlePort); yMinPosOfTarget = $intern_60; yMaxPosOfTarget = $intern_61; for (pair$iterator0 = edges.map_0.keySet_0().iterator_0(); pair$iterator0.hasNext_0();) { pair = castTo(pair$iterator0.next_1(), 42); side = castTo(pair.first, 465); edge = castTo(pair.second, 18); tgtPort = edge.source; tgtPort == singlePort && (tgtPort = edge.target); side == LEFT_4?$add_6(this.leftPorts, tgtPort):$add_6(this.rightPorts, tgtPort); yPosOfTarget = ($clinit_PortSide() , SIDES_NORTH_SOUTH).contains(tgtPort.side)?$doubleValue(castToDouble($getProperty(tgtPort, ($clinit_InternalProperties_1() , SPLINE_NS_PORT_Y_COORD)))):sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [tgtPort.owner.pos, tgtPort.pos, tgtPort.anchor])).y_0; yMinPosOfTarget = $wnd.Math.min(yMinPosOfTarget, yPosOfTarget); yMaxPosOfTarget = $wnd.Math.max(yMaxPosOfTarget, yPosOfTarget); } yPosOfSingleSide = ($clinit_PortSide() , SIDES_NORTH_SOUTH).contains(singlePort.side)?$doubleValue(castToDouble($getProperty(singlePort, ($clinit_InternalProperties_1() , SPLINE_NS_PORT_Y_COORD)))):sum_0(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, 1), $intern_16, 8, 0, [singlePort.owner.pos, singlePort.pos, singlePort.anchor])).y_0; $setRelevantPositions(this, yPosOfSingleSide, yMinPosOfTarget, yMaxPosOfTarget); for (pair$iterator = edges.map_0.keySet_0().iterator_0(); pair$iterator.hasNext_0();) { pair = castTo(pair$iterator.next_1(), 42); $addEdge_0(this, castTo(pair.second, 18)); } this.isStraight = false; } defineClass(131, 1, {34:1, 131:1}, SplineSegment, SplineSegment_0); _.compareTo_0 = function compareTo_19(other){ return $compareTo_18(this, castTo(other, 131)); } ; _.centerControlPointY = 0; _.handled = false; _.hyperEdgeBottomYPos = 0; _.hyperEdgeTopYPos = 0; _.initialSegment = false; _.inverseOrder = false; _.inweight = 0; _.isStraight = false; _.isWestOfInitialLayer = false; _.lastSegment = false; _.mark = 0; _.outweight = 0; _.rank = 0; _.xDelta = 0; var Lorg_eclipse_elk_alg_layered_p5edges_splines_SplineSegment_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.splines', 'SplineSegment', 131); function SplineSegment$EdgeInformation(){ } defineClass(468, 1, {468:1}, SplineSegment$EdgeInformation); _.endY = 0; _.invertedLeft = false; _.invertedRight = false; _.normalSourceNode = false; _.normalTargetNode = false; _.startY = 0; var Lorg_eclipse_elk_alg_layered_p5edges_splines_SplineSegment$EdgeInformation_2_classLit = createForClass('org.eclipse.elk.alg.layered.p5edges.splines', 'SplineSegment/EdgeInformation', 468); function isBetween(value_0, boundary0, boundary1){ if ($wnd.Math.abs(boundary0 - value_0) < $intern_120 || $wnd.Math.abs(boundary1 - value_0) < $intern_120) { return true; } return boundary0 - value_0 > $intern_120?value_0 - boundary1 > $intern_120:boundary1 - value_0 > $intern_120; } function portSideToDirection(side){ switch (side.ordinal) { case 1: return $intern_121; default:case 2: return 0; case 3: return $intern_97; case 4: return $intern_122; } } function $applyPaddingAndNormalizePositions(g){ var padding; padding = castTo($getProperty(castTo($get_7(g.nodes, 0), 40), ($clinit_MrTreeOptions() , PADDING_2)), 107); $setProperty_0(g, ($clinit_InternalProperties_2() , BB_UPLEFT_0), new KVector_1(0, 0)); $moveGraph_1(new TGraph, g, padding.left + padding.right - $doubleValue(castToDouble($getProperty(g, GRAPH_XMIN))), padding.top_0 + padding.bottom - $doubleValue(castToDouble($getProperty(g, GRAPH_YMIN)))); } function $dfs_5(this$static, node, graph){ var component, edge, edge$iterator; if (!this$static.visited[node.id_0]) { this$static.visited[node.id_0] = true; component = graph; !component && (component = new TGraph); $add_7(component.nodes, node); for (edge$iterator = this$static.incidence[node.id_0].iterator_0(); edge$iterator.hasNext_0();) { edge = castTo(edge$iterator.next_1(), 65); edge.source != node && $dfs_5(this$static, edge.source, component); edge.target != node && $dfs_5(this$static, edge.target, component); $add_7(component.edges, edge); } return component; } return null; } function $initialize_6(this$static, graph){ var edge, edge$iterator, n, node, node$iterator; n = graph.nodes.size_0; this$static.incidence = initUnidimensionalArray(Ljava_util_List_2_classLit, $intern_99, 15, n, 0, 1); this$static.visited = initUnidimensionalArray(Z_classLit, $intern_91, 28, n, 16, 1); for (node$iterator = $listIterator_2(graph.nodes, 0); node$iterator.currentNode != node$iterator.this$01.tail;) { node = castTo($next_9(node$iterator), 40); this$static.incidence[node.id_0] = new LinkedList; } for (edge$iterator = $listIterator_2(graph.edges, 0); edge$iterator.currentNode != edge$iterator.this$01.tail;) { edge = castTo($next_9(edge$iterator), 65); this$static.incidence[edge.source.id_0].add_2(edge); this$static.incidence[edge.target.id_0].add_2(edge); } } function $moveGraph_1(destGraph, sourceGraph, offsetx, offsety){ var bendpoint, bendpoint$iterator, edge, edge$iterator, graphOffset, node, node$iterator; graphOffset = new KVector_1(offsetx, offsety); $sub_0(graphOffset, castTo($getProperty(sourceGraph, ($clinit_InternalProperties_2() , BB_UPLEFT_0)), 8)); for (node$iterator = $listIterator_2(sourceGraph.nodes, 0); node$iterator.currentNode != node$iterator.this$01.tail;) { node = castTo($next_9(node$iterator), 40); $add_19(node.pos, graphOffset); $add_7(destGraph.nodes, node); } for (edge$iterator = castTo($collect_1($distinct(new StreamImpl(null, new Spliterators$IteratorSpliterator(sourceGraph.edges, 16))), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , IDENTITY_FINISH)]))), 15).iterator_0(); edge$iterator.hasNext_0();) { edge = castTo(edge$iterator.next_1(), 65); for (bendpoint$iterator = $listIterator_2(edge.bendPoints, 0); bendpoint$iterator.currentNode != bendpoint$iterator.this$01.tail;) { bendpoint = castTo($next_9(bendpoint$iterator), 8); bendpoint.x_0 += graphOffset.x_0; bendpoint.y_0 += graphOffset.y_0; } $add_7(destGraph.edges, edge); } } function $pack(components){ var broadestRow, debug, debugMode, entry, entry$iterator, graph, graph$iterator, graph$iterator0, graph$iterator1, highestBox, maxRowWidth, maxx, maxy, minx, miny, node, node$iterator, priority, propComp, propMerge, result, size_0, spacing, tGraph, tGraph$iterator, totalArea, xpos, ypos; if (components.array.length == 1) { $applyPaddingAndNormalizePositions((checkCriticalElementIndex(0, components.array.length) , castTo(components.array[0], 121))); return checkCriticalElementIndex(0, components.array.length) , castTo(components.array[0], 121); } else if (components.array.length <= 0) { return new TGraph; } for (graph$iterator0 = new ArrayList$1(components); graph$iterator0.i < graph$iterator0.this$01.array.length;) { graph = castTo($next_6(graph$iterator0), 121); priority = 0; minx = $intern_0; miny = $intern_0; maxx = $intern_43; maxy = $intern_43; for (node$iterator = $listIterator_2(graph.nodes, 0); node$iterator.currentNode != node$iterator.this$01.tail;) { node = castTo($next_9(node$iterator), 40); priority += castTo($getProperty(node, ($clinit_MrTreeOptions() , PRIORITY_1)), 17).value_0; minx = $wnd.Math.min(minx, node.pos.x_0); miny = $wnd.Math.min(miny, node.pos.y_0); maxx = $wnd.Math.max(maxx, node.pos.x_0 + node.size_0.x_0); maxy = $wnd.Math.max(maxy, node.pos.y_0 + node.size_0.y_0); } $setProperty_0(graph, ($clinit_MrTreeOptions() , PRIORITY_1), valueOf_3(priority)); $setProperty_0(graph, ($clinit_InternalProperties_2() , BB_UPLEFT_0), new KVector_1(minx, miny)); $setProperty_0(graph, BB_LOWRIGHT_0, new KVector_1(maxx, maxy)); } $clinit_Collections(); $sort(components, new ComponentsProcessor$1_0); result = new TGraph; $copyProperties(result, (checkCriticalElementIndex(0, components.array.length) , castTo(components.array[0], 96))); maxRowWidth = 0; totalArea = 0; for (graph$iterator1 = new ArrayList$1(components); graph$iterator1.i < graph$iterator1.this$01.array.length;) { graph = castTo($next_6(graph$iterator1), 121); size_0 = $sub_0($clone_1(castTo($getProperty(graph, ($clinit_InternalProperties_2() , BB_LOWRIGHT_0)), 8)), castTo($getProperty(graph, BB_UPLEFT_0), 8)); maxRowWidth = $wnd.Math.max(maxRowWidth, size_0.x_0); totalArea += size_0.x_0 * size_0.y_0; } maxRowWidth = $wnd.Math.max(maxRowWidth, $wnd.Math.sqrt(totalArea) * $doubleValue(castToDouble($getProperty(result, ($clinit_MrTreeOptions() , ASPECT_RATIO_2))))); spacing = $doubleValue(castToDouble($getProperty(result, SPACING_NODE_NODE_1))); xpos = 0; ypos = 0; highestBox = 0; broadestRow = spacing; for (graph$iterator = new ArrayList$1(components); graph$iterator.i < graph$iterator.this$01.array.length;) { graph = castTo($next_6(graph$iterator), 121); size_0 = $sub_0($clone_1(castTo($getProperty(graph, ($clinit_InternalProperties_2() , BB_LOWRIGHT_0)), 8)), castTo($getProperty(graph, BB_UPLEFT_0), 8)); if (xpos + size_0.x_0 > maxRowWidth) { xpos = 0; ypos += highestBox + spacing; highestBox = 0; } $moveGraph_1(result, graph, xpos, ypos); broadestRow = $wnd.Math.max(broadestRow, xpos + size_0.x_0); highestBox = $wnd.Math.max(highestBox, size_0.y_0); xpos += size_0.x_0 + spacing; } propMerge = new HashMap; debug = new HashMap; for (tGraph$iterator = new ArrayList$1(components); tGraph$iterator.i < tGraph$iterator.this$01.array.length;) { tGraph = castTo($next_6(tGraph$iterator), 121); debugMode = $booleanValue(castToBoolean($getProperty(tGraph, ($clinit_CoreOptions() , DEBUG_MODE_3)))); propComp = !tGraph.propertyMap?(null , EMPTY_MAP):tGraph.propertyMap; for (entry$iterator = propComp.entrySet_0().iterator_0(); entry$iterator.hasNext_0();) { entry = castTo(entry$iterator.next_1(), 44); if ($containsKey_3(propMerge, entry.getKey())) { if (maskUndefined(castTo(entry.getKey(), 149).getDefault()) !== maskUndefined(entry.getValue())) { if (debugMode && $containsKey_3(debug, entry.getKey())) { $clinit_System(); 'Found different values for property ' + castTo(entry.getKey(), 149).getId() + ' in components.'; String.fromCharCode(10); } else { $put_6(propMerge, castTo(entry.getKey(), 149), entry.getValue()); $setProperty_0(result, castTo(entry.getKey(), 149), entry.getValue()); debugMode && $put_6(debug, castTo(entry.getKey(), 149), entry.getValue()); } } } else { $put_6(propMerge, castTo(entry.getKey(), 149), entry.getValue()); $setProperty_0(result, castTo(entry.getKey(), 149), entry.getValue()); } } } $applyPaddingAndNormalizePositions(result); return result; } function $split_4(this$static, graph){ var comp, comp$iterator, components, id_0, node, node$iterator, node$iterator0, separate; separate = castToBoolean($getProperty(graph, ($clinit_MrTreeOptions() , SEPARATE_CONNECTED_COMPONENTS_1))); if (separate == null || (checkCriticalNotNull(separate) , separate)) { $initialize_6(this$static, graph); components = new ArrayList; for (node$iterator0 = $listIterator_2(graph.nodes, 0); node$iterator0.currentNode != node$iterator0.this$01.tail;) { node = castTo($next_9(node$iterator0), 40); comp = $dfs_5(this$static, node, null); if (comp) { $copyProperties(comp, graph); push_1(components.array, comp); } } this$static.incidence = null; this$static.visited = null; if (components.array.length > 1) { for (comp$iterator = new ArrayList$1(components); comp$iterator.i < comp$iterator.this$01.array.length;) { comp = castTo($next_6(comp$iterator), 121); id_0 = 0; for (node$iterator = $listIterator_2(comp.nodes, 0); node$iterator.currentNode != node$iterator.this$01.tail;) { node = castTo($next_9(node$iterator), 40); node.id_0 = id_0++; } } } return components; } return newArrayList_1(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_mrtree_graph_TGraph_2_classLit, 1), $intern_100, 121, 0, [graph])); } function ComponentsProcessor_1(){ } defineClass(1198, 1, {}, ComponentsProcessor_1); var Lorg_eclipse_elk_alg_mrtree_ComponentsProcessor_2_classLit = createForClass('org.eclipse.elk.alg.mrtree', 'ComponentsProcessor', 1198); function $compare_25(graph1, graph2){ var prio, size1, size2; prio = castTo($getProperty(graph2, ($clinit_MrTreeOptions() , PRIORITY_1)), 17).value_0 - castTo($getProperty(graph1, PRIORITY_1), 17).value_0; if (prio == 0) { size1 = $sub_0($clone_1(castTo($getProperty(graph1, ($clinit_InternalProperties_2() , BB_LOWRIGHT_0)), 8)), castTo($getProperty(graph1, BB_UPLEFT_0), 8)); size2 = $sub_0($clone_1(castTo($getProperty(graph2, BB_LOWRIGHT_0), 8)), castTo($getProperty(graph2, BB_UPLEFT_0), 8)); return compare_4(size1.x_0 * size1.y_0, size2.x_0 * size2.y_0); } return prio; } function ComponentsProcessor$1_0(){ } defineClass(1199, 1, $intern_88, ComponentsProcessor$1_0); _.compare_1 = function compare_81(graph1, graph2){ return $compare_25(castTo(graph1, 121), castTo(graph2, 121)); } ; _.equals_0 = function equals_168(other){ return this === other; } ; _.reversed = function reversed_73(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_ComponentsProcessor$1_2_classLit = createForClass('org.eclipse.elk.alg.mrtree', 'ComponentsProcessor/1', 1199); function $applyLayout_4(tGraph){ var bendPoints, edgeSection, elkedge, elkgraph, elknode, height, maxXPos, maxYPos, minXPos, minYPos, object, padding, pos, size_0, tEdge, tEdge$iterator, tNode, tNode$iterator, tNode$iterator0, width_0; elkgraph = castTo($getProperty(tGraph, ($clinit_InternalProperties_2() , ORIGIN_1)), 27); minXPos = $intern_0; minYPos = $intern_0; maxXPos = $intern_43; maxYPos = $intern_43; for (tNode$iterator0 = $listIterator_2(tGraph.nodes, 0); tNode$iterator0.currentNode != tNode$iterator0.this$01.tail;) { tNode = castTo($next_9(tNode$iterator0), 40); pos = tNode.pos; size_0 = tNode.size_0; minXPos = $wnd.Math.min(minXPos, pos.x_0 - size_0.x_0 / 2); minYPos = $wnd.Math.min(minYPos, pos.y_0 - size_0.y_0 / 2); maxXPos = $wnd.Math.max(maxXPos, pos.x_0 + size_0.x_0 / 2); maxYPos = $wnd.Math.max(maxYPos, pos.y_0 + size_0.y_0 / 2); } padding = castTo($getProperty_0(elkgraph, ($clinit_MrTreeOptions() , PADDING_2)), 107); for (tNode$iterator = $listIterator_2(tGraph.nodes, 0); tNode$iterator.currentNode != tNode$iterator.this$01.tail;) { tNode = castTo($next_9(tNode$iterator), 40); object = $getProperty(tNode, ORIGIN_1); if (instanceOf(object, 207)) { elknode = castTo(object, 27); $setLocation_1(elknode, tNode.pos.x_0, tNode.pos.y_0); $copyProperties_0(elknode, tNode); } } for (tEdge$iterator = $listIterator_2(tGraph.edges, 0); tEdge$iterator.currentNode != tEdge$iterator.this$01.tail;) { tEdge = castTo($next_9(tEdge$iterator), 65); elkedge = castTo($getProperty(tEdge, ORIGIN_1), 74); if (elkedge) { bendPoints = tEdge.bendPoints; edgeSection = firstEdgeSection(elkedge, true, true); applyVectorChain(bendPoints, edgeSection); } } width_0 = maxXPos - minXPos + (padding.left + padding.right); height = maxYPos - minYPos + (padding.top_0 + padding.bottom); $booleanValue(castToBoolean($getProperty_0(elkgraph, ($clinit_CoreOptions() , NODE_SIZE_FIXED_GRAPH_SIZE_3)))) || resizeNode_1(elkgraph, width_0, height, false, false); $setProperty_1(elkgraph, CHILD_AREA_WIDTH, width_0 - (padding.left + padding.right)); $setProperty_1(elkgraph, CHILD_AREA_HEIGHT, height - (padding.top_0 + padding.bottom)); } function $transformEdges_1(parentNode, tGraph, elemMap){ var elkedge, elkedge$iterator, elknode, elknode$iterator, newEdge, source, target; for (elknode$iterator = new AbstractEList$EIterator((!parentNode.children && (parentNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, parentNode, 10, 11)) , parentNode.children)); elknode$iterator.cursor != elknode$iterator.this$01_2.size_1();) { elknode = castTo($doNext(elknode$iterator), 27); for (elkedge$iterator = new Iterators$ConcatenatedIterator(transform_2(allOutgoingEdges(elknode).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(elkedge$iterator);) { elkedge = castTo($next_0(elkedge$iterator), 74); if (!$isHierarchical(elkedge) && !$isHierarchical(elkedge) && !$isSelfloop(elkedge)) { source = castTo(getEntryValueOrNull($getEntry_0(elemMap.hashCodeMap, elknode)), 40); target = castTo($get_10(elemMap, connectableShapeToNode(castTo($get_20((!elkedge.targets && (elkedge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, elkedge, 5, 8)) , elkedge.targets), 0), 84))), 40); if (!!source && !!target) { newEdge = new TEdge_0(source, target); $setProperty_0(newEdge, ($clinit_InternalProperties_2() , ORIGIN_1), elkedge); $copyProperties(newEdge, elkedge); $add_7(source.outgoingEdges, newEdge); $add_7(target.incomingEdges, newEdge); $add_7(tGraph.edges, newEdge); } } } } } function $transformNodes_1(parentNode, tGraph, elemMap){ var elknode, elknode$iterator, index_0, label_0, newNode; index_0 = 0; for (elknode$iterator = new AbstractEList$EIterator((!parentNode.children && (parentNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, parentNode, 10, 11)) , parentNode.children)); elknode$iterator.cursor != elknode$iterator.this$01_2.size_1();) { elknode = castTo($doNext(elknode$iterator), 27); label_0 = ''; (!elknode.labels && (elknode.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, elknode, 1, 7)) , elknode.labels).size_0 == 0 || (label_0 = castTo($get_20((!elknode.labels && (elknode.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, elknode, 1, 7)) , elknode.labels), 0), 135).text_0); newNode = new TNode(index_0++, tGraph, label_0); $copyProperties(newNode, elknode); $setProperty_0(newNode, ($clinit_InternalProperties_2() , ORIGIN_1), elknode); newNode.pos.y_0 = elknode.y_0 + elknode.height / 2; newNode.size_0.x_0 = $wnd.Math.max(elknode.width_0, 1); newNode.pos.x_0 = elknode.x_0 + elknode.width_0 / 2; newNode.size_0.y_0 = $wnd.Math.max(elknode.height, 1); $add_7(tGraph.nodes, newNode); $put_9(elemMap.hashCodeMap, elknode, newNode); } } function $doLayout_0(this$static, tgraph, progressMonitor){ progressMonitor.begin('Tree layout', 1); $reset_4(this$static.algorithmAssembler); $setPhase(this$static.algorithmAssembler, ($clinit_TreeLayoutPhases() , P1_TREEIFICATION), P1_TREEIFICATION); $setPhase(this$static.algorithmAssembler, P2_NODE_ORDERING, P2_NODE_ORDERING); $setPhase(this$static.algorithmAssembler, P3_NODE_PLACEMENT, P3_NODE_PLACEMENT); $setPhase(this$static.algorithmAssembler, P4_EDGE_ROUTING, P4_EDGE_ROUTING); this$static.algorithm = $build_0(this$static.algorithmAssembler, tgraph); $layout_2(this$static, tgraph, progressMonitor.subTask(1)); progressMonitor.done_1(); return tgraph; } function $layout_2(this$static, graph, themonitor){ var monitor, processor, processor$iterator; monitor = themonitor; !monitor && (monitor = new BasicProgressMonitor); monitor.begin('Layout', this$static.algorithm.array.length); for (processor$iterator = new ArrayList$1(this$static.algorithm); processor$iterator.i < processor$iterator.this$01.array.length;) { processor = castTo($next_6(processor$iterator), 47); if (monitor.isCanceled()) { return; } processor.process(graph, monitor.subTask(1)); } monitor.done_1(); } function MrTree(){ this.algorithmAssembler = new AlgorithmAssembler(Lorg_eclipse_elk_alg_mrtree_TreeLayoutPhases_2_classLit); } defineClass(1197, 1, {}, MrTree); var Lorg_eclipse_elk_alg_mrtree_MrTree_2_classLit = createForClass('org.eclipse.elk.alg.mrtree', 'MrTree', 1197); function $clinit_TreeLayoutPhases(){ $clinit_TreeLayoutPhases = emptyMethod; P1_TREEIFICATION = new TreeLayoutPhases('P1_TREEIFICATION', 0); P2_NODE_ORDERING = new TreeLayoutPhases('P2_NODE_ORDERING', 1); P3_NODE_PLACEMENT = new TreeLayoutPhases('P3_NODE_PLACEMENT', 2); P4_EDGE_ROUTING = new TreeLayoutPhases('P4_EDGE_ROUTING', 3); } function $create_8(this$static){ switch (this$static.ordinal) { case 0: return new DFSTreeifyer; case 1: return new NodeOrderer; case 2: return new NodePlacer; case 3: return new EdgeRouter; default:throw toJs(new IllegalArgumentException_0('No implementation is available for the layout phase ' + (this$static.name_0 != null?this$static.name_0:'' + this$static.ordinal))); } } function TreeLayoutPhases(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_71(name_0){ $clinit_TreeLayoutPhases(); return valueOf(($clinit_TreeLayoutPhases$Map() , $MAP_61), name_0); } function values_79(){ $clinit_TreeLayoutPhases(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_mrtree_TreeLayoutPhases_2_classLit, 1), $intern_37, 405, 0, [P1_TREEIFICATION, P2_NODE_ORDERING, P3_NODE_PLACEMENT, P4_EDGE_ROUTING]); } defineClass(405, 22, {3:1, 34:1, 22:1, 405:1, 188:1, 196:1}, TreeLayoutPhases); _.create_1 = function create_19(){ return $create_8(this); } ; _.create_2 = function create_18(){ return $create_8(this); } ; var P1_TREEIFICATION, P2_NODE_ORDERING, P3_NODE_PLACEMENT, P4_EDGE_ROUTING; var Lorg_eclipse_elk_alg_mrtree_TreeLayoutPhases_2_classLit = createForEnum('org.eclipse.elk.alg.mrtree', 'TreeLayoutPhases', 405, Ljava_lang_Enum_2_classLit, values_79, valueOf_71); function $clinit_TreeLayoutPhases$Map(){ $clinit_TreeLayoutPhases$Map = emptyMethod; $MAP_61 = createValueOfMap(($clinit_TreeLayoutPhases() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_mrtree_TreeLayoutPhases_2_classLit, 1), $intern_37, 405, 0, [P1_TREEIFICATION, P2_NODE_ORDERING, P3_NODE_PLACEMENT, P4_EDGE_ROUTING]))); } var $MAP_61; function TreeLayoutProvider(){ this.klayTree = new MrTree; this.componentsProcessor = new ComponentsProcessor_1; } defineClass(1112, 205, $intern_96, TreeLayoutProvider); _.layout = function layout_3(layoutGraph, progressMonitor){ var builder, comp, comp$iterator, components, pm, tGraph, tGraph_0, elemMap; $booleanValue(castToBoolean($getProperty_0(layoutGraph, ($clinit_MrTreeOptions() , OMIT_NODE_MICRO_LAYOUT_1)))) || $execute((builder = new NodeMicroLayout(($clinit_ElkGraphAdapters() , new ElkGraphAdapters$ElkGraphAdapter(layoutGraph))) , builder)); pm = progressMonitor.subTask($intern_123); pm.begin('build tGraph', 1); tGraph = (tGraph_0 = new TGraph , $copyProperties(tGraph_0, layoutGraph) , $setProperty_0(tGraph_0, ($clinit_InternalProperties_2() , ORIGIN_1), layoutGraph) , elemMap = new HashMap , $transformNodes_1(layoutGraph, tGraph_0, elemMap) , $transformEdges_1(layoutGraph, tGraph_0, elemMap) , tGraph_0); pm.done_1(); pm = progressMonitor.subTask($intern_123); pm.begin('Split graph', 1); components = $split_4(this.componentsProcessor, tGraph); pm.done_1(); for (comp$iterator = new ArrayList$1(components); comp$iterator.i < comp$iterator.this$01.array.length;) { comp = castTo($next_6(comp$iterator), 121); $doLayout_0(this.klayTree, comp, progressMonitor.subTask(0.5999999940395355 / components.array.length)); } pm = progressMonitor.subTask($intern_123); pm.begin('Pack components', 1); tGraph = $pack(components); pm.done_1(); pm = progressMonitor.subTask($intern_123); pm.begin('Apply layout results', 1); $applyLayout_4(tGraph); pm.done_1(); } ; var Lorg_eclipse_elk_alg_mrtree_TreeLayoutProvider_2_classLit = createForClass('org.eclipse.elk.alg.mrtree', 'TreeLayoutProvider', 1112); function getAllIncomingEdges(n, graph){ var e, e$iterator, re; re = new ArrayList; for (e$iterator = $listIterator_2(graph.edges, 0); e$iterator.currentNode != e$iterator.this$01.tail;) { e = castTo($next_9(e$iterator), 65); e.target.id_0 == n.id_0 && maskUndefined($getProperty(e.source, ($clinit_MrTreeOptions() , TREE_LEVEL_0))) !== maskUndefined($getProperty(e.target, TREE_LEVEL_0)) && !$anyMatch(new StreamImpl(null, new Spliterators$IteratorSpliterator(re, 16)), new TreeUtil$lambda$3$Type(e)) && (push_1(re.array, e) , true); } $sort(re, new TreeUtil$lambda$4$Type); return re; } function getAllOutgoingEdges(n, graph){ var e, e$iterator, re; re = new ArrayList; for (e$iterator = $listIterator_2(graph.edges, 0); e$iterator.currentNode != e$iterator.this$01.tail;) { e = castTo($next_9(e$iterator), 65); e.source.id_0 == n.id_0 && !$equals_5(e.source.label_0, 'SUPER_ROOT') && maskUndefined($getProperty(e.source, ($clinit_MrTreeOptions() , TREE_LEVEL_0))) !== maskUndefined($getProperty(e.target, TREE_LEVEL_0)) && !$anyMatch(new StreamImpl(null, new Spliterators$IteratorSpliterator(re, 16)), new TreeUtil$lambda$7$Type(e)) && (push_1(re.array, e) , true); } $sort(re, new TreeUtil$lambda$8$Type); return re; } function getDirectionVector(d){ switch (d.ordinal) { case 4: return new KVector_1(0, -1); case 1: return new KVector_1(1, 0); case 2: return new KVector_1(-1, 0); default:return new KVector_1(0, 1); } } function getLeftMost(currentlevel, depth){ var cN, cN$iterator, d, nextLevel; if (0 < (instanceOf(currentlevel, 16)?castTo(currentlevel, 16).size_1():size_24(currentlevel.iterator_0()))) { d = depth; if (1 < d) { --d; nextLevel = new TreeUtil$1; for (cN$iterator = currentlevel.iterator_0(); cN$iterator.hasNext_0();) { cN = castTo(cN$iterator.next_1(), 40); nextLevel = concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [nextLevel, new TNode$2(cN)])); } return getLeftMost(nextLevel, d); } if (d < 0) { nextLevel = new TreeUtil$2; for (cN$iterator = currentlevel.iterator_0(); cN$iterator.hasNext_0();) { cN = castTo(cN$iterator.next_1(), 40); nextLevel = concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [nextLevel, new TNode$2(cN)])); } if (0 < (instanceOf(nextLevel, 16)?castTo(nextLevel, 16).size_1():size_24(nextLevel.iterator_0()))) { return getLeftMost(nextLevel, d); } } } return castTo(getNext(currentlevel.iterator_0()), 40); } function getLowestParent(n, g){ var dirVec, lowestParent, lowestParentPos, parents, sources; dirVec = getDirectionVector(castTo($getProperty(g, ($clinit_MrTreeOptions() , DIRECTION_0)), 88)); if (n.incomingEdges.size_0 == 0) { return null; } sources = castTo($collect_1($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(n.incomingEdges, 16)), new TreeUtil$lambda$9$Type), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , IDENTITY_FINISH)]))), 15); parents = castTo($collect_1($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(g.nodes, 16)), new TreeUtil$lambda$10$Type(sources)), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [IDENTITY_FINISH]))), 15); lowestParentPos = castToDouble($get_17($max_1($map(parents.stream(), new TreeUtil$lambda$11$Type(dirVec)), ($clinit_Comparators() , $clinit_Comparators() , NATURAL_ORDER)))); lowestParent = castTo($get_17($findFirst($filter(parents.stream(), new TreeUtil$lambda$12$Type(dirVec, lowestParentPos)))), 40); return lowestParent; } function isCycleInducing(e, g){ return $dotProduct(getDirectionVector(castTo($getProperty(g, ($clinit_MrTreeOptions() , DIRECTION_0)), 88)), new KVector_1(e.target.pos.x_0 - e.source.pos.x_0, e.target.pos.y_0 - e.source.pos.y_0)) <= 0; } function lambda$11_0(dirVec_0, x_1){ return $dotProduct(new KVector_1(x_1.pos.x_0 + x_1.size_0.x_0 / 2, x_1.pos.y_0 + x_1.size_0.y_0 / 2), dirVec_0); } function lambda$12_0(dirVec_0, lowestParentPos_1, x_2){ return $dotProduct(new KVector_1(x_2.pos.x_0 + x_2.size_0.x_0 / 2, x_2.pos.y_0 + x_2.size_0.y_0 / 2), dirVec_0) == (checkCriticalNotNull(lowestParentPos_1) , lowestParentPos_1); } function lambda$3_4(e_0, x_1){ return $equals_5(!!x_1.source && !!x_1.target?$toString_15(x_1.source) + '->' + $toString_15(x_1.target):'e_' + hashCode__I__devirtual$(x_1), !!e_0.source && !!e_0.target?$toString_15(e_0.source) + '->' + $toString_15(e_0.target):'e_' + hashCode__I__devirtual$(e_0)); } function lambda$4_8(x_0, y_1){ return compare_4(x_0.source.pos.x_0, y_1.source.pos.x_0); } function lambda$7_3(e_0, x_1){ return $equals_5(!!x_1.source && !!x_1.target?$toString_15(x_1.source) + '->' + $toString_15(x_1.target):'e_' + hashCode__I__devirtual$(x_1), !!e_0.source && !!e_0.target?$toString_15(e_0.source) + '->' + $toString_15(e_0.target):'e_' + hashCode__I__devirtual$(e_0)); } function lambda$8_1(x_0, y_1){ return compare_4(x_0.target.pos.x_0, y_1.target.pos.x_0); } function toNodeBorder(center, next, size_0){ var absx, absy, hh, scale, wh, xscale, yscale; wh = size_0.x_0 / 2; hh = size_0.y_0 / 2; absx = $wnd.Math.abs(next.x_0 - center.x_0); absy = $wnd.Math.abs(next.y_0 - center.y_0); xscale = 1; yscale = 1; absx > wh && (xscale = wh / absx); absy > hh && (yscale = hh / absy); scale = $wnd.Math.min(xscale, yscale); center.x_0 += scale * (next.x_0 - center.x_0); center.y_0 += scale * (next.y_0 - center.y_0); } function TreeUtil$1(){ } defineClass(1894, 1, $intern_23, TreeUtil$1); _.forEach_0 = function forEach_31(action){ $forEach_0(this, action); } ; _.iterator_0 = function iterator_73(){ return $clinit_Collections() , $clinit_Collections$EmptyListIterator() , INSTANCE_4; } ; var Lorg_eclipse_elk_alg_mrtree_TreeUtil$1_2_classLit = createForClass('org.eclipse.elk.alg.mrtree', 'TreeUtil/1', 1894); function TreeUtil$2(){ } defineClass(1895, 1, $intern_23, TreeUtil$2); _.forEach_0 = function forEach_32(action){ $forEach_0(this, action); } ; _.iterator_0 = function iterator_74(){ return $clinit_Collections() , $clinit_Collections$EmptyListIterator() , INSTANCE_4; } ; var Lorg_eclipse_elk_alg_mrtree_TreeUtil$2_2_classLit = createForClass('org.eclipse.elk.alg.mrtree', 'TreeUtil/2', 1895); function TreeUtil$lambda$0$Type(){ } defineClass(1885, 1, $intern_40, TreeUtil$lambda$0$Type); _.test_0 = function test_104(arg0){ return $booleanValue(castToBoolean($getProperty(castTo(arg0, 40), ($clinit_InternalProperties_2() , ROOT_0)))); } ; var Lorg_eclipse_elk_alg_mrtree_TreeUtil$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree', 'TreeUtil/lambda$0$Type', 1885); function TreeUtil$lambda$10$Type(sources_0){ this.sources_0 = sources_0; } defineClass(1891, 1, $intern_40, TreeUtil$lambda$10$Type); _.test_0 = function test_105(arg0){ return this.sources_0.contains(castTo(arg0, 40)); } ; var Lorg_eclipse_elk_alg_mrtree_TreeUtil$lambda$10$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree', 'TreeUtil/lambda$10$Type', 1891); function TreeUtil$lambda$11$Type(dirVec_0){ this.dirVec_0 = dirVec_0; } defineClass(1892, 1, {}, TreeUtil$lambda$11$Type); _.apply_0 = function apply_153(arg0){ return lambda$11_0(this.dirVec_0, castTo(arg0, 40)); } ; var Lorg_eclipse_elk_alg_mrtree_TreeUtil$lambda$11$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree', 'TreeUtil/lambda$11$Type', 1892); function TreeUtil$lambda$12$Type(dirVec_0, lowestParentPos_1){ this.dirVec_0 = dirVec_0; this.lowestParentPos_1 = lowestParentPos_1; } defineClass(1893, 1, $intern_40, TreeUtil$lambda$12$Type); _.test_0 = function test_106(arg0){ return lambda$12_0(this.dirVec_0, this.lowestParentPos_1, castTo(arg0, 40)); } ; var Lorg_eclipse_elk_alg_mrtree_TreeUtil$lambda$12$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree', 'TreeUtil/lambda$12$Type', 1893); function TreeUtil$lambda$3$Type(e_0){ this.e_0 = e_0; } defineClass(1886, 1, $intern_40, TreeUtil$lambda$3$Type); _.test_0 = function test_107(arg0){ return lambda$3_4(this.e_0, castTo(arg0, 65)); } ; var Lorg_eclipse_elk_alg_mrtree_TreeUtil$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree', 'TreeUtil/lambda$3$Type', 1886); function TreeUtil$lambda$4$Type(){ } defineClass(1887, 1, $intern_88, TreeUtil$lambda$4$Type); _.compare_1 = function compare_82(arg0, arg1){ return lambda$4_8(castTo(arg0, 65), castTo(arg1, 65)); } ; _.equals_0 = function equals_169(other){ return this === other; } ; _.reversed = function reversed_74(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_TreeUtil$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree', 'TreeUtil/lambda$4$Type', 1887); function TreeUtil$lambda$7$Type(e_0){ this.e_0 = e_0; } defineClass(1888, 1, $intern_40, TreeUtil$lambda$7$Type); _.test_0 = function test_108(arg0){ return lambda$7_3(this.e_0, castTo(arg0, 65)); } ; var Lorg_eclipse_elk_alg_mrtree_TreeUtil$lambda$7$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree', 'TreeUtil/lambda$7$Type', 1888); function TreeUtil$lambda$8$Type(){ } defineClass(1889, 1, $intern_88, TreeUtil$lambda$8$Type); _.compare_1 = function compare_83(arg0, arg1){ return lambda$8_1(castTo(arg0, 65), castTo(arg1, 65)); } ; _.equals_0 = function equals_170(other){ return this === other; } ; _.reversed = function reversed_75(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_TreeUtil$lambda$8$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree', 'TreeUtil/lambda$8$Type', 1889); function TreeUtil$lambda$9$Type(){ } defineClass(1890, 1, {}, TreeUtil$lambda$9$Type); _.apply_0 = function apply_154(arg0){ return castTo(arg0, 65).source; } ; var Lorg_eclipse_elk_alg_mrtree_TreeUtil$lambda$9$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree', 'TreeUtil/lambda$9$Type', 1890); defineClass(508, 137, {3:1, 508:1, 96:1, 137:1}); _.id_0 = 0; var Lorg_eclipse_elk_alg_mrtree_graph_TGraphElement_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.graph', 'TGraphElement', 508); function TEdge_0(source, target){ new LinkedList; this.bendPoints = new KVectorChain; this.source = source; this.target = target; } defineClass(65, 508, {3:1, 65:1, 508:1, 96:1, 137:1}, TEdge_0); _.toString_0 = function toString_108(){ return !!this.source && !!this.target?$toString_15(this.source) + '->' + $toString_15(this.target):'e_' + hashCode__I__devirtual$(this); } ; var Lorg_eclipse_elk_alg_mrtree_graph_TEdge_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.graph', 'TEdge', 65); function TGraph(){ this.nodes = new LinkedList; this.edges = new LinkedList; this.nodes = new LinkedList; this.edges = new LinkedList; } defineClass(121, 137, {3:1, 121:1, 96:1, 137:1}, TGraph); _.toString_0 = function toString_109(){ var tEdge, tEdge$iterator, tNode, tNode$iterator, tmp; tmp = null; for (tNode$iterator = $listIterator_2(this.nodes, 0); tNode$iterator.currentNode != tNode$iterator.this$01.tail;) { tNode = castTo($next_9(tNode$iterator), 40); tmp += (tNode.label_0 == null || tNode.label_0.length == 0?'n_' + tNode.id_0:'n_' + tNode.label_0) + '\n'; } for (tEdge$iterator = $listIterator_2(this.edges, 0); tEdge$iterator.currentNode != tEdge$iterator.this$01.tail;) { tEdge = castTo($next_9(tEdge$iterator), 65); tmp += (!!tEdge.source && !!tEdge.target?$toString_15(tEdge.source) + '->' + $toString_15(tEdge.target):'e_' + hashCode__I__devirtual$(tEdge)) + '\n'; } return tmp; } ; var Lorg_eclipse_elk_alg_mrtree_graph_TGraph_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.graph', 'TGraph', 121); defineClass(643, 508, {3:1, 508:1, 643:1, 96:1, 137:1}); var Lorg_eclipse_elk_alg_mrtree_graph_TShape_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.graph', 'TShape', 643); function $getChildrenCopy(this$static){ var children, iEdge, iEdge$iterator; children = new LinkedList; for (iEdge$iterator = $listIterator_2(this$static.outgoingEdges, 0); iEdge$iterator.currentNode != iEdge$iterator.this$01.tail;) { iEdge = castTo($next_9(iEdge$iterator), 65); $add_7(children, iEdge.target); } return children; } function $getParent(this$static){ var edges; edges = this$static.incomingEdges; if (edges.size_0 == 0) { return null; } return castTo($get_7(edges, 0), 65).source; } function $toString_15(this$static){ return this$static.label_0 == null || this$static.label_0.length == 0?'n_' + this$static.id_0:'n_' + this$static.label_0; } function TNode(id_0, graph, label_0){ this.id_0 = id_0; this.pos = new KVector; this.size_0 = new KVector; this.outgoingEdges = new LinkedList; this.incomingEdges = new LinkedList; this.graph_0 = graph; this.label_0 = label_0; } defineClass(40, 643, {3:1, 508:1, 40:1, 643:1, 96:1, 137:1}, TNode); _.toString_0 = function toString_110(){ return $toString_15(this); } ; var Lorg_eclipse_elk_alg_mrtree_graph_TNode_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.graph', 'TNode', 40); function TNode$2(this$0){ this.this$01 = this$0; } defineClass(236, 1, $intern_23, TNode$2); _.forEach_0 = function forEach_33(action){ $forEach_0(this, action); } ; _.iterator_0 = function iterator_75(){ var edgesIter; return edgesIter = $listIterator_2(this.this$01.outgoingEdges, 0) , new TNode$2$1(edgesIter); } ; var Lorg_eclipse_elk_alg_mrtree_graph_TNode$2_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.graph', 'TNode/2', 236); function TNode$2$1(val$edgesIter){ this.val$edgesIter2 = val$edgesIter; } defineClass(329, 1, $intern_6, TNode$2$1); _.forEachRemaining = function forEachRemaining_50(consumer){ $forEachRemaining(this, consumer); } ; _.next_1 = function next_40(){ return castTo($next_9(this.val$edgesIter2), 65).target; } ; _.hasNext_0 = function hasNext_39(){ return $hasNext_5(this.val$edgesIter2); } ; _.remove = function remove_96(){ $remove_24(this.val$edgesIter2); } ; var Lorg_eclipse_elk_alg_mrtree_graph_TNode$2$1_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.graph', 'TNode/2/1', 329); function $computeNodeConstraints(tGraph, nodeNodeSpacing){ var actualNodes, cand, d, leftNode, p, p$iterator, points, r, right, rightNode, s; d = castTo($getProperty(tGraph, ($clinit_MrTreeOptions() , DIRECTION_0)), 88); right = d == ($clinit_Direction_0() , LEFT_6) || d == RIGHT_6?DOWN_1:RIGHT_6; actualNodes = castTo($collect_1($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(tGraph.nodes, 16)), new CompactionProcessor$lambda$4$Type), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , IDENTITY_FINISH)]))), 15); points = castTo($collect_1($map(actualNodes.stream(), new CompactionProcessor$lambda$5$Type(nodeNodeSpacing)), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [IDENTITY_FINISH]))), 15); points.addAll(castTo($collect_1($map(actualNodes.stream(), new CompactionProcessor$lambda$6$Type(nodeNodeSpacing)), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [IDENTITY_FINISH]))), 16)); points.sort_0(new CompactionProcessor$lambda$7$Type(right)); s = new TreeSet_0(new CompactionProcessor$lambda$8$Type(d)); cand = new HashMap; for (p$iterator = points.iterator_0(); p$iterator.hasNext_0();) { p = castTo(p$iterator.next_1(), 240); r = castTo(p.first, 40); if ($booleanValue(castToBoolean(p.third))) { s.map_0.put(r, ($clinit_Boolean() , FALSE_0)) == null; (new TreeSet_1(s.map_0.headMap(r, false))).map_0.size_1() > 0 && $put_6(cand, r, castTo((new TreeSet_1(s.map_0.headMap(r, false))).map_0.lastKey(), 40)); (new TreeSet_1(s.map_0.tailMap(r, true))).map_0.size_1() > 1 && $put_6(cand, $getRightElement(s, r), r); } else { if ((new TreeSet_1(s.map_0.headMap(r, false))).map_0.size_1() > 0) { leftNode = castTo((new TreeSet_1(s.map_0.headMap(r, false))).map_0.lastKey(), 40); maskUndefined(leftNode) === maskUndefined(getEntryValueOrNull($getEntry_0(cand.hashCodeMap, r))) && castTo($getProperty(r, ($clinit_InternalProperties_2() , COMPACT_CONSTRAINTS)), 15).add_2(leftNode); } if ((new TreeSet_1(s.map_0.tailMap(r, true))).map_0.size_1() > 1) { rightNode = $getRightElement(s, r); maskUndefined(getEntryValueOrNull($getEntry_0(cand.hashCodeMap, rightNode))) === maskUndefined(r) && castTo($getProperty(rightNode, ($clinit_InternalProperties_2() , COMPACT_CONSTRAINTS)), 15).add_2(r); } s.map_0.remove_0(r) != null; } } } function $getLowestDependentNode(n, d){ var cons, lowestCons; cons = castTo($getProperty(n, ($clinit_InternalProperties_2() , COMPACT_CONSTRAINTS)), 15); if (!cons || cons.size_1() < 1) { return null; } else if (cons.size_1() == 1) { return castTo(cons.get_0(0), 40); } lowestCons = null; switch (d.ordinal) { case 2: lowestCons = castTo($get_17($min_0(cons.stream(), new CompactionProcessor$lambda$9$Type)), 40); break; case 1: lowestCons = castTo($get_17($max_1(cons.stream(), new CompactionProcessor$lambda$10$Type)), 40); break; case 4: lowestCons = castTo($get_17($min_0(cons.stream(), new CompactionProcessor$lambda$11$Type)), 40); break; case 3: lowestCons = castTo($get_17($max_1(cons.stream(), new CompactionProcessor$lambda$12$Type)), 40); } return lowestCons; } function $getRightElement(s, n){ var i, tailSet; tailSet = new TreeSet_1(s.map_0.tailMap(n, true)); if (tailSet.map_0.size_1() <= 1) { throw toJs(new NullPointerException); } i = tailSet.map_0.keySet_0().iterator_0(); i.next_1(); return castTo(i.next_1(), 40); } function $process_82(this$static, tGraph, progressMonitor){ var d, dir_0, finalNewPos, finalNewPosSize, level, n, n$iterator, newIndex, newPos, newPosSize, nodeNodeSpacing, nodes, p, pos; progressMonitor.begin('Process compaction', 1); if (!$booleanValue(castToBoolean($getProperty(tGraph, ($clinit_MrTreeOptions() , COMPACTION_0))))) { return; } dir_0 = castTo($getProperty(tGraph, DIRECTION_0), 88); nodeNodeSpacing = $doubleValue(castToDouble($getProperty(tGraph, SPACING_NODE_NODE_1))); $setUpLevels(this$static, tGraph, dir_0); $computeNodeConstraints(tGraph, nodeNodeSpacing / 2 / 2); nodes = tGraph.nodes; $sort_0(nodes, new CompactionProcessor$lambda$0$Type(dir_0)); for (n$iterator = $listIterator_2(nodes, 0); n$iterator.currentNode != n$iterator.this$01.tail;) { n = castTo($next_9(n$iterator), 40); if (!$booleanValue(castToBoolean($getProperty(n, ($clinit_InternalProperties_2() , ROOT_0))))) { d = $getLowestDependentNode(n, dir_0); p = getLowestParent(n, tGraph); newPos = 0; newPosSize = 0; if (d) { pos = d.pos; switch (dir_0.ordinal) { case 2: newPos = pos.x_0 - nodeNodeSpacing - n.size_0.x_0; p.pos.x_0 - nodeNodeSpacing - n.size_0.x_0 < newPos && (newPos = p.pos.x_0 - nodeNodeSpacing - n.size_0.x_0); newPosSize = newPos + n.size_0.x_0; break; case 1: newPos = pos.x_0 + d.size_0.x_0 + nodeNodeSpacing; p.pos.x_0 + nodeNodeSpacing > newPos && (newPos = p.pos.x_0 + p.size_0.x_0 + nodeNodeSpacing); newPosSize = newPos + n.size_0.x_0; break; case 4: newPos = pos.y_0 - nodeNodeSpacing - n.size_0.y_0; p.pos.y_0 - nodeNodeSpacing - n.size_0.y_0 < newPos && (newPos = p.pos.y_0 - nodeNodeSpacing - n.size_0.y_0); newPosSize = newPos + n.size_0.y_0; break; case 3: newPos = pos.y_0 + d.size_0.y_0 + nodeNodeSpacing; p.pos.y_0 + nodeNodeSpacing > newPos && (newPos = p.pos.y_0 + p.size_0.y_0 + nodeNodeSpacing); newPosSize = newPos + n.size_0.y_0; } } else if (p) { switch (dir_0.ordinal) { case 2: newPos = p.pos.x_0 - nodeNodeSpacing - n.size_0.x_0; newPosSize = newPos + n.size_0.x_0; break; case 1: newPos = p.pos.x_0 + p.size_0.x_0 + nodeNodeSpacing; newPosSize = newPos + n.size_0.x_0; break; case 4: newPos = p.pos.y_0 - nodeNodeSpacing - n.size_0.y_0; newPosSize = newPos + n.size_0.y_0; break; case 3: newPos = p.pos.y_0 + p.size_0.y_0 + nodeNodeSpacing; newPosSize = newPos + n.size_0.y_0; } } if (maskUndefined($getProperty(tGraph, EDGE_ROUTING_MODE_0)) === maskUndefined(($clinit_EdgeRoutingMode() , AVOID_OVERLAP))) { finalNewPos = newPos; finalNewPosSize = newPosSize; level = $findFirst($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static.levels, 16)), new CompactionProcessor$lambda$1$Type(finalNewPos, finalNewPosSize))); if (level.ref != null) { dir_0 == ($clinit_Direction_0() , LEFT_6) || dir_0 == RIGHT_6?(n.pos.x_0 = newPos):(n.pos.y_0 = newPos); } else { dir_0 == ($clinit_Direction_0() , LEFT_6) || dir_0 == UP_1?(level = $findFirst($filter($skip(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static.levels, 16))), new CompactionProcessor$lambda$2$Type(finalNewPos)))):(level = $findFirst($filter($skip(new StreamImpl(null, new Spliterators$IteratorSpliterator(this$static.levels, 16))), new CompactionProcessor$lambda$3$Type(finalNewPos)))); level.ref != null && (dir_0 == LEFT_6 || dir_0 == RIGHT_6?(n.pos.x_0 = $doubleValue(castToDouble((checkCriticalElement(level.ref != null) , castTo(level.ref, 42)).first))):(n.pos.y_0 = $doubleValue(castToDouble((checkCriticalElement(level.ref != null) , castTo(level.ref, 42)).first)))); } if (level.ref != null) { newIndex = $indexOf_3(this$static.levels, (checkCriticalElement(level.ref != null) , level.ref), 0); if (newIndex > 0 && newIndex != castTo($getProperty(n, TREE_LEVEL_0), 17).value_0) { $setProperty_0(n, COMPACT_LEVEL_ASCENSION, ($clinit_Boolean() , true)); $setProperty_0(n, TREE_LEVEL_0, valueOf_3(newIndex)); } } } else { dir_0 == ($clinit_Direction_0() , LEFT_6) || dir_0 == RIGHT_6?(n.pos.x_0 = newPos):(n.pos.y_0 = newPos); } } } progressMonitor.done_1(); } function $setUpLevels(this$static, tGraph, dir_0){ var curLevel, n, n$iterator; this$static.levels = new ArrayList; for (n$iterator = $listIterator_2(tGraph.nodes, 0); n$iterator.currentNode != n$iterator.this$01.tail;) { n = castTo($next_9(n$iterator), 40); while (castTo($getProperty(n, ($clinit_MrTreeOptions() , TREE_LEVEL_0)), 17).value_0 > this$static.levels.array.length - 1) { $add_3(this$static.levels, new Pair($intern_98, $intern_124)); } curLevel = castTo($getProperty(n, TREE_LEVEL_0), 17).value_0; if (dir_0 == ($clinit_Direction_0() , LEFT_6) || dir_0 == RIGHT_6) { n.pos.x_0 < $doubleValue(castToDouble(castTo($get_11(this$static.levels, curLevel), 42).first)) && $setFirst(castTo($get_11(this$static.levels, curLevel), 42), n.pos.x_0); n.pos.x_0 + n.size_0.x_0 > $doubleValue(castToDouble(castTo($get_11(this$static.levels, curLevel), 42).second)) && $setSecond(castTo($get_11(this$static.levels, curLevel), 42), n.pos.x_0 + n.size_0.x_0); } else { n.pos.y_0 < $doubleValue(castToDouble(castTo($get_11(this$static.levels, curLevel), 42).first)) && $setFirst(castTo($get_11(this$static.levels, curLevel), 42), n.pos.y_0); n.pos.y_0 + n.size_0.y_0 > $doubleValue(castToDouble(castTo($get_11(this$static.levels, curLevel), 42).second)) && $setSecond(castTo($get_11(this$static.levels, curLevel), 42), n.pos.y_0 + n.size_0.y_0); } } } function CompactionProcessor(){ } function lambda$0_34(dir_0, x_1, y_2){ return compare_4($dotProduct(getDirectionVector(dir_0), new KVector_1(x_1.pos.x_0, x_1.pos.y_0)), $dotProduct(getDirectionVector(dir_0), new KVector_1(y_2.pos.x_0, y_2.pos.y_0))); } function lambda$1_17(finalNewPos_0, finalNewPosSize_2, x_2){ return $doubleValue(castToDouble(x_2.first)) <= finalNewPos_0 && $doubleValue(castToDouble(x_2.second)) >= finalNewPosSize_2; } function lambda$10(x_0, y_1){ return compare_4(x_0.pos.x_0 + x_0.size_0.x_0, y_1.pos.x_0 + y_1.size_0.x_0); } function lambda$11_1(x_0, y_1){ return compare_4(x_0.pos.y_0, y_1.pos.y_0); } function lambda$12_1(x_0, y_1){ return compare_4(x_0.pos.y_0 + x_0.size_0.y_0, y_1.pos.y_0 + y_1.size_0.y_0); } function lambda$2_8(finalNewPos_0, x_1){ return $doubleValue(castToDouble(x_1.first)) <= finalNewPos_0; } function lambda$3_5(finalNewPos_0, x_1){ return $doubleValue(castToDouble(x_1.first)) >= finalNewPos_0; } function lambda$5_5(nodeNodeSpacing_0, x_1){ return new Triple(x_1, $sub($clone_1(x_1.pos), nodeNodeSpacing_0, nodeNodeSpacing_0), ($clinit_Boolean() , true)); } function lambda$6_2(nodeNodeSpacing_0, x_1){ return new Triple(x_1, $add_18($clone_1(x_1.pos), x_1.size_0.x_0 + nodeNodeSpacing_0, x_1.size_0.y_0 + nodeNodeSpacing_0), ($clinit_Boolean() , false)); } function lambda$7_4(right_0, x_1, y_2){ return compare_4($dotProduct(getDirectionVector(right_0), $clone_1(x_1.second)), $dotProduct(getDirectionVector(right_0), $clone_1(y_2.second))); } function lambda$8_2(d_0, x_1, y_2){ return compare_4($dotProduct(getDirectionVector(d_0), $clone_1(x_1.pos)), $dotProduct(getDirectionVector(d_0), $clone_1(y_2.pos))); } function lambda$9_0(x_0, y_1){ return compare_4(x_0.pos.x_0, y_1.pos.x_0); } defineClass(1923, 1, $intern_105, CompactionProcessor); _.process = function process_78(tGraph, progressMonitor){ $process_82(this, castTo(tGraph, 121), progressMonitor); } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_CompactionProcessor_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'CompactionProcessor', 1923); function CompactionProcessor$lambda$0$Type(dir_0){ this.dir_0 = dir_0; } defineClass(1924, 1, $intern_88, CompactionProcessor$lambda$0$Type); _.compare_1 = function compare_84(arg0, arg1){ return lambda$0_34(this.dir_0, castTo(arg0, 40), castTo(arg1, 40)); } ; _.equals_0 = function equals_171(other){ return this === other; } ; _.reversed = function reversed_76(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_CompactionProcessor$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'CompactionProcessor/lambda$0$Type', 1924); function CompactionProcessor$lambda$1$Type(finalNewPos_0, finalNewPosSize_2){ this.finalNewPos_0 = finalNewPos_0; this.finalNewPosSize_2 = finalNewPosSize_2; } defineClass(1925, 1, $intern_40, CompactionProcessor$lambda$1$Type); _.test_0 = function test_109(arg0){ return lambda$1_17(this.finalNewPos_0, this.finalNewPosSize_2, castTo(arg0, 42)); } ; _.finalNewPosSize_2 = 0; _.finalNewPos_0 = 0; var Lorg_eclipse_elk_alg_mrtree_intermediate_CompactionProcessor$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'CompactionProcessor/lambda$1$Type', 1925); function CompactionProcessor$lambda$10$Type(){ } defineClass(1934, 1, $intern_88, CompactionProcessor$lambda$10$Type); _.compare_1 = function compare_85(arg0, arg1){ return lambda$10(castTo(arg0, 40), castTo(arg1, 40)); } ; _.equals_0 = function equals_172(other){ return this === other; } ; _.reversed = function reversed_77(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_CompactionProcessor$lambda$10$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'CompactionProcessor/lambda$10$Type', 1934); function CompactionProcessor$lambda$11$Type(){ } defineClass(1935, 1, $intern_88, CompactionProcessor$lambda$11$Type); _.compare_1 = function compare_86(arg0, arg1){ return lambda$11_1(castTo(arg0, 40), castTo(arg1, 40)); } ; _.equals_0 = function equals_173(other){ return this === other; } ; _.reversed = function reversed_78(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_CompactionProcessor$lambda$11$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'CompactionProcessor/lambda$11$Type', 1935); function CompactionProcessor$lambda$12$Type(){ } defineClass(1936, 1, $intern_88, CompactionProcessor$lambda$12$Type); _.compare_1 = function compare_87(arg0, arg1){ return lambda$12_1(castTo(arg0, 40), castTo(arg1, 40)); } ; _.equals_0 = function equals_174(other){ return this === other; } ; _.reversed = function reversed_79(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_CompactionProcessor$lambda$12$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'CompactionProcessor/lambda$12$Type', 1936); function CompactionProcessor$lambda$2$Type(finalNewPos_0){ this.finalNewPos_0 = finalNewPos_0; } defineClass(1926, 1, $intern_40, CompactionProcessor$lambda$2$Type); _.test_0 = function test_110(arg0){ return lambda$2_8(this.finalNewPos_0, castTo(arg0, 42)); } ; _.finalNewPos_0 = 0; var Lorg_eclipse_elk_alg_mrtree_intermediate_CompactionProcessor$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'CompactionProcessor/lambda$2$Type', 1926); function CompactionProcessor$lambda$3$Type(finalNewPos_0){ this.finalNewPos_0 = finalNewPos_0; } defineClass(1927, 1, $intern_40, CompactionProcessor$lambda$3$Type); _.test_0 = function test_111(arg0){ return lambda$3_5(this.finalNewPos_0, castTo(arg0, 42)); } ; _.finalNewPos_0 = 0; var Lorg_eclipse_elk_alg_mrtree_intermediate_CompactionProcessor$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'CompactionProcessor/lambda$3$Type', 1927); function CompactionProcessor$lambda$4$Type(){ } defineClass(1928, 1, $intern_40, CompactionProcessor$lambda$4$Type); _.test_0 = function test_112(arg0){ return castTo(arg0, 40).label_0.indexOf('SUPER_ROOT') == -1; } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_CompactionProcessor$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'CompactionProcessor/lambda$4$Type', 1928); function CompactionProcessor$lambda$5$Type(nodeNodeSpacing_0){ this.nodeNodeSpacing_0 = nodeNodeSpacing_0; } defineClass(1929, 1, {}, CompactionProcessor$lambda$5$Type); _.apply_0 = function apply_155(arg0){ return lambda$5_5(this.nodeNodeSpacing_0, castTo(arg0, 40)); } ; _.nodeNodeSpacing_0 = 0; var Lorg_eclipse_elk_alg_mrtree_intermediate_CompactionProcessor$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'CompactionProcessor/lambda$5$Type', 1929); function CompactionProcessor$lambda$6$Type(nodeNodeSpacing_0){ this.nodeNodeSpacing_0 = nodeNodeSpacing_0; } defineClass(1930, 1, {}, CompactionProcessor$lambda$6$Type); _.apply_0 = function apply_156(arg0){ return lambda$6_2(this.nodeNodeSpacing_0, castTo(arg0, 40)); } ; _.nodeNodeSpacing_0 = 0; var Lorg_eclipse_elk_alg_mrtree_intermediate_CompactionProcessor$lambda$6$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'CompactionProcessor/lambda$6$Type', 1930); function CompactionProcessor$lambda$7$Type(right_0){ this.right_0 = right_0; } defineClass(1931, 1, $intern_88, CompactionProcessor$lambda$7$Type); _.compare_1 = function compare_88(arg0, arg1){ return lambda$7_4(this.right_0, castTo(arg0, 240), castTo(arg1, 240)); } ; _.equals_0 = function equals_175(other){ return this === other; } ; _.reversed = function reversed_80(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_CompactionProcessor$lambda$7$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'CompactionProcessor/lambda$7$Type', 1931); function CompactionProcessor$lambda$8$Type(d_0){ this.d_0 = d_0; } defineClass(1932, 1, $intern_88, CompactionProcessor$lambda$8$Type); _.compare_1 = function compare_89(arg0, arg1){ return lambda$8_2(this.d_0, castTo(arg0, 40), castTo(arg1, 40)); } ; _.equals_0 = function equals_176(other){ return this === other; } ; _.reversed = function reversed_81(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_CompactionProcessor$lambda$8$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'CompactionProcessor/lambda$8$Type', 1932); function CompactionProcessor$lambda$9$Type(){ } defineClass(1933, 1, $intern_88, CompactionProcessor$lambda$9$Type); _.compare_1 = function compare_90(arg0, arg1){ return lambda$9_0(castTo(arg0, 40), castTo(arg1, 40)); } ; _.equals_0 = function equals_177(other){ return this === other; } ; _.reversed = function reversed_82(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_CompactionProcessor$lambda$9$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'CompactionProcessor/lambda$9$Type', 1933); function $process_83(tGraph, progressMonitor){ var d, n, n$iterator, tmp, tmp2, x_0, y_0; progressMonitor.begin('Process directions', 1); d = castTo($getProperty(tGraph, ($clinit_MrTreeOptions() , DIRECTION_0)), 88); if (d != ($clinit_Direction_0() , DOWN_1)) { for (n$iterator = $listIterator_2(tGraph.nodes, 0); n$iterator.currentNode != n$iterator.this$01.tail;) { n = castTo($next_9(n$iterator), 40); x_0 = castTo($getProperty(n, ($clinit_InternalProperties_2() , XCOOR)), 17).value_0; y_0 = castTo($getProperty(n, YCOOR), 17).value_0; switch (d.ordinal) { case 4: y_0 *= -1; break; case 1: tmp = x_0; x_0 = y_0; y_0 = tmp; break; case 2: tmp2 = x_0; x_0 = -y_0; y_0 = tmp2; } $setProperty_0(n, XCOOR, valueOf_3(x_0)); $setProperty_0(n, YCOOR, valueOf_3(y_0)); } } progressMonitor.done_1(); } function DirectionProcessor(){ } defineClass(1921, 1, $intern_105, DirectionProcessor); _.process = function process_79(tGraph, progressMonitor){ $process_83(castTo(tGraph, 121), progressMonitor); } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_DirectionProcessor_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'DirectionProcessor', 1921); function $calculateFan(this$static, currentLevel){ var blockSize, digits, edgesIter, gloValue, i, id_0, index_0, key, locEntry, locEntry$iterator, locFanMap, nextLevel, pId, tChild, tChild$iterator, tNode, tNode$iterator, tNode$iterator0; if (currentLevel.size_0 != 0) { nextLevel = new LinkedList; id_0 = null; pId = null; digits = round_int($wnd.Math.floor($wnd.Math.log(currentLevel.size_0) * $wnd.Math.LOG10E) + 1); index_0 = 0; for (tNode$iterator0 = $listIterator_2(currentLevel, 0); tNode$iterator0.currentNode != tNode$iterator0.this$01.tail;) { tNode = castTo($next_9(tNode$iterator0), 40); if (maskUndefined(pId) !== maskUndefined($getProperty(tNode, ($clinit_InternalProperties_2() , ID)))) { pId = castToString($getProperty(tNode, ID)); index_0 = 0; } pId != null?(id_0 = pId + formatRight(index_0++, digits)):(id_0 = formatRight(index_0++, digits)); $setProperty_0(tNode, ID, id_0); for (tChild$iterator = (edgesIter = $listIterator_2((new TNode$2(tNode)).this$01.outgoingEdges, 0) , new TNode$2$1(edgesIter)); $hasNext_5(tChild$iterator.val$edgesIter2);) { tChild = castTo($next_9(tChild$iterator.val$edgesIter2), 65).target; $addNode_0(nextLevel, tChild, nextLevel.tail.prev, nextLevel.tail); $setProperty_0(tChild, ID, id_0); } } locFanMap = new HashMap; for (i = 0; i < id_0.length - digits; i++) { for (tNode$iterator = $listIterator_2(currentLevel, 0); tNode$iterator.currentNode != tNode$iterator.this$01.tail;) { tNode = castTo($next_9(tNode$iterator), 40); key = $substring_1(castToString($getProperty(tNode, ($clinit_InternalProperties_2() , ID))), 0, i + 1); blockSize = (key == null?getEntryValueOrNull($getEntry_0(locFanMap.hashCodeMap, null)):$get_15(locFanMap.stringMap, key)) != null?castTo(key == null?getEntryValueOrNull($getEntry_0(locFanMap.hashCodeMap, null)):$get_15(locFanMap.stringMap, key), 17).value_0 + 1:1; $putStringValue(locFanMap, key, valueOf_3(blockSize)); } } for (locEntry$iterator = new AbstractHashMap$EntrySetIterator((new AbstractHashMap$EntrySet(locFanMap)).this$01); locEntry$iterator.hasNext;) { locEntry = $next_3(locEntry$iterator); gloValue = valueOf_3($get_10(this$static.gloDescMap, locEntry.getKey()) != null?castTo($get_10(this$static.gloDescMap, locEntry.getKey()), 17).value_0:0); $putStringValue(this$static.gloDescMap, castToString(locEntry.getKey()), valueOf_3(castTo(locEntry.getValue(), 17).value_0 + gloValue.value_0)); gloValue = castTo($get_10(this$static.gloFanMap, locEntry.getKey()), 17); (!gloValue || gloValue.value_0 < castTo(locEntry.getValue(), 17).value_0) && $putStringValue(this$static.gloFanMap, castToString(locEntry.getKey()), castTo(locEntry.getValue(), 17)); } $calculateFan(this$static, nextLevel); } } function $process_84(this$static, tGraph, progressMonitor){ var desc, fan, it, key, root, rootLevel, tNode, tNode$iterator; progressMonitor.begin('Processor compute fanout', 1); $reset(this$static.gloFanMap); $reset(this$static.gloDescMap); root = null; it = $listIterator_2(tGraph.nodes, 0); while (!root && it.currentNode != it.this$01.tail) { tNode = castTo($next_9(it), 40); $booleanValue(castToBoolean($getProperty(tNode, ($clinit_InternalProperties_2() , ROOT_0)))) && (root = tNode); } rootLevel = new LinkedList; $addNode_0(rootLevel, root, rootLevel.tail.prev, rootLevel.tail); $calculateFan(this$static, rootLevel); for (tNode$iterator = $listIterator_2(tGraph.nodes, 0); tNode$iterator.currentNode != tNode$iterator.this$01.tail;) { tNode = castTo($next_9(tNode$iterator), 40); key = castToString($getProperty(tNode, ($clinit_InternalProperties_2() , ID))); fan = $getStringValue(this$static.gloFanMap, key) != null?castTo($getStringValue(this$static.gloFanMap, key), 17).value_0:0; $setProperty_0(tNode, FAN, valueOf_3(fan)); desc = 1 + ($getStringValue(this$static.gloDescMap, key) != null?castTo($getStringValue(this$static.gloDescMap, key), 17).value_0:0); $setProperty_0(tNode, DESCENDANTS, valueOf_3(desc)); } progressMonitor.done_1(); } function FanProcessor(){ this.gloFanMap = new HashMap; this.gloDescMap = new HashMap; } function formatRight(value_0, len){ var s; s = value_0 + ''; while (s.length < len) { s = '0' + s; } return s; } defineClass(1913, 1, $intern_105, FanProcessor); _.process = function process_80(tGraph, progressMonitor){ $process_84(this, castTo(tGraph, 121), progressMonitor); } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_FanProcessor_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'FanProcessor', 1913); function $process_85(tGraph, progressMonitor){ progressMonitor.begin('Process graph bounds', 1); $setProperty_0(tGraph, ($clinit_InternalProperties_2() , GRAPH_XMIN), $getAsDouble($min($mapToDouble(new StreamImpl(null, new Spliterators$IteratorSpliterator(tGraph.nodes, 16)), new GraphBoundsProcessor$lambda$0$Type)))); $setProperty_0(tGraph, GRAPH_YMIN, $getAsDouble($min($mapToDouble(new StreamImpl(null, new Spliterators$IteratorSpliterator(tGraph.nodes, 16)), new GraphBoundsProcessor$lambda$1$Type)))); $setProperty_0(tGraph, GRAPH_XMAX, $getAsDouble($max($mapToDouble(new StreamImpl(null, new Spliterators$IteratorSpliterator(tGraph.nodes, 16)), new GraphBoundsProcessor$lambda$2$Type)))); $setProperty_0(tGraph, GRAPH_YMAX, $getAsDouble($max($mapToDouble(new StreamImpl(null, new Spliterators$IteratorSpliterator(tGraph.nodes, 16)), new GraphBoundsProcessor$lambda$3$Type)))); progressMonitor.done_1(); } function GraphBoundsProcessor(){ } function lambda$2_9(x_0){ return x_0.pos.x_0 + x_0.size_0.x_0; } function lambda$3_6(x_0){ return x_0.pos.y_0 + x_0.size_0.y_0; } defineClass(1937, 1, $intern_105, GraphBoundsProcessor); _.process = function process_81(tGraph, progressMonitor){ $process_85(castTo(tGraph, 121), progressMonitor); } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_GraphBoundsProcessor_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'GraphBoundsProcessor', 1937); function GraphBoundsProcessor$lambda$0$Type(){ } defineClass(1938, 1, {}, GraphBoundsProcessor$lambda$0$Type); _.applyAsDouble = function applyAsDouble_4(arg0){ return castTo(arg0, 40).pos.x_0; } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_GraphBoundsProcessor$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'GraphBoundsProcessor/lambda$0$Type', 1938); function GraphBoundsProcessor$lambda$1$Type(){ } defineClass(1939, 1, {}, GraphBoundsProcessor$lambda$1$Type); _.applyAsDouble = function applyAsDouble_5(arg0){ return castTo(arg0, 40).pos.y_0; } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_GraphBoundsProcessor$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'GraphBoundsProcessor/lambda$1$Type', 1939); function GraphBoundsProcessor$lambda$2$Type(){ } defineClass(1940, 1, {}, GraphBoundsProcessor$lambda$2$Type); _.applyAsDouble = function applyAsDouble_6(arg0){ return lambda$2_9(castTo(arg0, 40)); } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_GraphBoundsProcessor$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'GraphBoundsProcessor/lambda$2$Type', 1940); function GraphBoundsProcessor$lambda$3$Type(){ } defineClass(1941, 1, {}, GraphBoundsProcessor$lambda$3$Type); _.applyAsDouble = function applyAsDouble_7(arg0){ return lambda$3_6(castTo(arg0, 40)); } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_GraphBoundsProcessor$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'GraphBoundsProcessor/lambda$3$Type', 1941); function $clinit_IntermediateProcessorStrategy_0(){ $clinit_IntermediateProcessorStrategy_0 = emptyMethod; ROOT_PROC = new IntermediateProcessorStrategy_0('ROOT_PROC', 0); FAN_PROC = new IntermediateProcessorStrategy_0('FAN_PROC', 1); LEVEL_PROC = new IntermediateProcessorStrategy_0('LEVEL_PROC', 2); NEIGHBORS_PROC = new IntermediateProcessorStrategy_0('NEIGHBORS_PROC', 3); LEVEL_HEIGHT = new IntermediateProcessorStrategy_0('LEVEL_HEIGHT', 4); DIRECTION_PROC = new IntermediateProcessorStrategy_0('DIRECTION_PROC', 5); NODE_POSITION_PROC = new IntermediateProcessorStrategy_0('NODE_POSITION_PROC', 6); COMPACTION_PROC = new IntermediateProcessorStrategy_0('COMPACTION_PROC', 7); LEVEL_COORDS = new IntermediateProcessorStrategy_0('LEVEL_COORDS', 8); GRAPH_BOUNDS_PROC = new IntermediateProcessorStrategy_0('GRAPH_BOUNDS_PROC', 9); DETREEIFYING_PROC = new IntermediateProcessorStrategy_0('DETREEIFYING_PROC', 10); } function IntermediateProcessorStrategy_0(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_72(name_0){ $clinit_IntermediateProcessorStrategy_0(); return valueOf(($clinit_IntermediateProcessorStrategy$Map_0() , $MAP_62), name_0); } function values_80(){ $clinit_IntermediateProcessorStrategy_0(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_mrtree_intermediate_IntermediateProcessorStrategy_2_classLit, 1), $intern_37, 262, 0, [ROOT_PROC, FAN_PROC, LEVEL_PROC, NEIGHBORS_PROC, LEVEL_HEIGHT, DIRECTION_PROC, NODE_POSITION_PROC, COMPACTION_PROC, LEVEL_COORDS, GRAPH_BOUNDS_PROC, DETREEIFYING_PROC]); } defineClass(262, 22, {3:1, 34:1, 22:1, 262:1, 196:1}, IntermediateProcessorStrategy_0); _.create_1 = function create_20(){ switch (this.ordinal) { case 0: return new RootProcessor; case 1: return new FanProcessor; case 2: return new LevelProcessor; case 3: return new NeighborsProcessor; case 4: return new LevelHeightProcessor; case 8: return new LevelCoordinatesProcessor; case 5: return new DirectionProcessor; case 6: return new NodePositionProcessor; case 7: return new CompactionProcessor; case 9: return new GraphBoundsProcessor; case 10: return new Untreeifyer; default:throw toJs(new IllegalArgumentException_0('No implementation is available for the layout processor ' + (this.name_0 != null?this.name_0:'' + this.ordinal))); } } ; var COMPACTION_PROC, DETREEIFYING_PROC, DIRECTION_PROC, FAN_PROC, GRAPH_BOUNDS_PROC, LEVEL_COORDS, LEVEL_HEIGHT, LEVEL_PROC, NEIGHBORS_PROC, NODE_POSITION_PROC, ROOT_PROC; var Lorg_eclipse_elk_alg_mrtree_intermediate_IntermediateProcessorStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.mrtree.intermediate', 'IntermediateProcessorStrategy', 262, Ljava_lang_Enum_2_classLit, values_80, valueOf_72); function $clinit_IntermediateProcessorStrategy$Map_0(){ $clinit_IntermediateProcessorStrategy$Map_0 = emptyMethod; $MAP_62 = createValueOfMap(values_80()); } var $MAP_62; function $process_86(tGraph, progressMonitor){ var curLevel, levels, n, n$iterator, n$iterator0; progressMonitor.begin('Processor determine the coords for each level', 1); levels = new ArrayList; for (n$iterator0 = $listIterator_2(tGraph.nodes, 0); n$iterator0.currentNode != n$iterator0.this$01.tail;) { n = castTo($next_9(n$iterator0), 40); while (castTo($getProperty(n, ($clinit_MrTreeOptions() , TREE_LEVEL_0)), 17).value_0 > levels.array.length - 1) { $add_3(levels, new Pair($intern_98, $intern_124)); } curLevel = castTo($getProperty(n, TREE_LEVEL_0), 17).value_0; if ($isHorizontal(castTo($getProperty(tGraph, DIRECTION_0), 88))) { n.pos.x_0 < $doubleValue(castToDouble((checkCriticalElementIndex(curLevel, levels.array.length) , castTo(levels.array[curLevel], 42)).first)) && $setFirst((checkCriticalElementIndex(curLevel, levels.array.length) , castTo(levels.array[curLevel], 42)), n.pos.x_0); n.pos.x_0 + n.size_0.x_0 > $doubleValue(castToDouble((checkCriticalElementIndex(curLevel, levels.array.length) , castTo(levels.array[curLevel], 42)).second)) && $setSecond((checkCriticalElementIndex(curLevel, levels.array.length) , castTo(levels.array[curLevel], 42)), n.pos.x_0 + n.size_0.x_0); } else { n.pos.y_0 < $doubleValue(castToDouble((checkCriticalElementIndex(curLevel, levels.array.length) , castTo(levels.array[curLevel], 42)).first)) && $setFirst((checkCriticalElementIndex(curLevel, levels.array.length) , castTo(levels.array[curLevel], 42)), n.pos.y_0); n.pos.y_0 + n.size_0.y_0 > $doubleValue(castToDouble((checkCriticalElementIndex(curLevel, levels.array.length) , castTo(levels.array[curLevel], 42)).second)) && $setSecond((checkCriticalElementIndex(curLevel, levels.array.length) , castTo(levels.array[curLevel], 42)), n.pos.y_0 + n.size_0.y_0); } } for (n$iterator = $listIterator_2(tGraph.nodes, 0); n$iterator.currentNode != n$iterator.this$01.tail;) { n = castTo($next_9(n$iterator), 40); curLevel = castTo($getProperty(n, ($clinit_MrTreeOptions() , TREE_LEVEL_0)), 17).value_0; $setProperty_0(n, ($clinit_InternalProperties_2() , LEVELMIN), castToDouble((checkCriticalElementIndex(curLevel, levels.array.length) , castTo(levels.array[curLevel], 42)).first)); $setProperty_0(n, LEVELMAX, castToDouble((checkCriticalElementIndex(curLevel, levels.array.length) , castTo(levels.array[curLevel], 42)).second)); } progressMonitor.done_1(); } function LevelCoordinatesProcessor(){ } defineClass(1920, 1, $intern_105, LevelCoordinatesProcessor); _.process = function process_82(tGraph, progressMonitor){ $process_86(castTo(tGraph, 121), progressMonitor); } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_LevelCoordinatesProcessor_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'LevelCoordinatesProcessor', 1920); function $process_87(this$static, tGraph, progressMonitor){ var it, root, tNode; progressMonitor.begin('Processor determine the height for each level', 1); this$static.numberOfNodes = tGraph.nodes.size_0 == 0?1:tGraph.nodes.size_0; root = null; it = $listIterator_2(tGraph.nodes, 0); while (!root && it.currentNode != it.this$01.tail) { tNode = castTo($next_9(it), 40); $booleanValue(castToBoolean($getProperty(tNode, ($clinit_InternalProperties_2() , ROOT_0)))) && (root = tNode); } !!root && $setNeighbors(this$static, newArrayList_1(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_mrtree_graph_TNode_2_classLit, 1), $intern_125, 40, 0, [root])), progressMonitor, castTo($getProperty(tGraph, ($clinit_MrTreeOptions() , DIRECTION_0)), 88)); progressMonitor.done_1(); } function $setNeighbors(this$static, currentLevel, progressMonitor, layoutDirection){ var cN, cN$iterator, cN$iterator0, height, nextLevel, sT; if (!isEmpty_13(currentLevel)) { sT = progressMonitor.subTask((instanceOf(currentLevel, 16)?castTo(currentLevel, 16).size_1():size_24(currentLevel.iterator_0())) / this$static.numberOfNodes | 0); sT.begin('Set neighbors in level', 1); nextLevel = new LevelHeightProcessor$1; height = 0; if (layoutDirection == ($clinit_Direction_0() , LEFT_6) || layoutDirection == RIGHT_6) { for (cN$iterator0 = currentLevel.iterator_0(); cN$iterator0.hasNext_0();) { cN = castTo(cN$iterator0.next_1(), 40); nextLevel = concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [nextLevel, new TNode$2(cN)])); height < cN.size_0.x_0 && (height = cN.size_0.x_0); } } else { for (cN$iterator0 = currentLevel.iterator_0(); cN$iterator0.hasNext_0();) { cN = castTo(cN$iterator0.next_1(), 40); nextLevel = concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [nextLevel, new TNode$2(cN)])); height < cN.size_0.y_0 && (height = cN.size_0.y_0); } } for (cN$iterator = currentLevel.iterator_0(); cN$iterator.hasNext_0();) { cN = castTo(cN$iterator.next_1(), 40); $setProperty_0(cN, ($clinit_InternalProperties_2() , LEVELHEIGHT), height); } sT.done_1(); $setNeighbors(this$static, nextLevel, progressMonitor, layoutDirection); } } function LevelHeightProcessor(){ } defineClass(1918, 1, $intern_105, LevelHeightProcessor); _.process = function process_83(tGraph, progressMonitor){ $process_87(this, castTo(tGraph, 121), progressMonitor); } ; _.numberOfNodes = 0; var Lorg_eclipse_elk_alg_mrtree_intermediate_LevelHeightProcessor_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'LevelHeightProcessor', 1918); function LevelHeightProcessor$1(){ } defineClass(1919, 1, $intern_23, LevelHeightProcessor$1); _.forEach_0 = function forEach_34(action){ $forEach_0(this, action); } ; _.iterator_0 = function iterator_76(){ return $clinit_Collections() , $clinit_Collections$EmptyListIterator() , INSTANCE_4; } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_LevelHeightProcessor$1_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'LevelHeightProcessor/1', 1919); function $process_88(this$static, tGraph, progressMonitor){ var level, roots, tNode, tNode$iterator; progressMonitor.begin('Processor compute fanout', 1); roots = castTo($collect_1($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(tGraph.nodes, 16)), new LevelProcessor$lambda$0$Type), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , IDENTITY_FINISH)]))), 15); $setLevel_0(this$static, roots, 0); for (tNode$iterator = $listIterator_2(tGraph.nodes, 0); tNode$iterator.currentNode != tNode$iterator.this$01.tail;) { tNode = castTo($next_9(tNode$iterator), 40); level = $get_10(this$static.gloLevelMap, valueOf_3(tNode.id_0)) != null?castTo($get_10(this$static.gloLevelMap, valueOf_3(tNode.id_0)), 17).value_0:0; $setProperty_0(tNode, ($clinit_MrTreeOptions() , TREE_LEVEL_0), valueOf_3(level)); } progressMonitor.done_1(); } function $setLevel_0(this$static, currentLevel, level){ var edgesIter, nextLevel, tChild, tChild$iterator, tNode, tNode$iterator; if (!currentLevel.isEmpty()) { nextLevel = new LinkedList; for (tNode$iterator = currentLevel.iterator_0(); tNode$iterator.hasNext_0();) { tNode = castTo(tNode$iterator.next_1(), 40); $put_6(this$static.gloLevelMap, valueOf_3(tNode.id_0), valueOf_3(level)); for (tChild$iterator = (edgesIter = $listIterator_2((new TNode$2(tNode)).this$01.outgoingEdges, 0) , new TNode$2$1(edgesIter)); $hasNext_5(tChild$iterator.val$edgesIter2);) { tChild = castTo($next_9(tChild$iterator.val$edgesIter2), 65).target; $addNode_0(nextLevel, tChild, nextLevel.tail.prev, nextLevel.tail); } } $setLevel_0(this$static, nextLevel, level + 1); } } function LevelProcessor(){ this.gloLevelMap = new HashMap; } defineClass(1914, 1, $intern_105, LevelProcessor); _.process = function process_84(tGraph, progressMonitor){ $process_88(this, castTo(tGraph, 121), progressMonitor); } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_LevelProcessor_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'LevelProcessor', 1914); function LevelProcessor$lambda$0$Type(){ } defineClass(1915, 1, $intern_40, LevelProcessor$lambda$0$Type); _.test_0 = function test_113(arg0){ return $booleanValue(castToBoolean($getProperty(castTo(arg0, 40), ($clinit_InternalProperties_2() , ROOT_0)))); } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_LevelProcessor$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'LevelProcessor/lambda$0$Type', 1915); function $process_89(this$static, tGraph, progressMonitor){ var it, root, tNode; progressMonitor.begin('Processor set neighbors', 1); this$static.numberOfNodes = tGraph.nodes.size_0 == 0?1:tGraph.nodes.size_0; root = null; it = $listIterator_2(tGraph.nodes, 0); while (!root && it.currentNode != it.this$01.tail) { tNode = castTo($next_9(it), 40); $booleanValue(castToBoolean($getProperty(tNode, ($clinit_InternalProperties_2() , ROOT_0)))) && (root = tNode); } !!root && $setNeighbors_0(this$static, new TNode$2(root), progressMonitor); progressMonitor.done_1(); } function $setNeighbors_0(this$static, currentLevel, progressMonitor){ var cN, cN$iterator, lN, nextLevel, sT; if (!isEmpty_13(currentLevel)) { sT = progressMonitor.subTask((instanceOf(currentLevel, 16)?castTo(currentLevel, 16).size_1():size_24(currentLevel.iterator_0())) / this$static.numberOfNodes | 0); sT.begin('Set neighbors in level', 1); nextLevel = new NeighborsProcessor$1; lN = null; for (cN$iterator = currentLevel.iterator_0(); cN$iterator.hasNext_0();) { cN = castTo(cN$iterator.next_1(), 40); nextLevel = concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [nextLevel, new TNode$2(cN)])); if (lN) { $setProperty_0(lN, ($clinit_InternalProperties_2() , RIGHTNEIGHBOR), cN); $setProperty_0(cN, LEFTNEIGHBOR, lN); if ($getParent(cN) == $getParent(lN)) { $setProperty_0(lN, RIGHTSIBLING, cN); $setProperty_0(cN, LEFTSIBLING, lN); } } lN = cN; } sT.done_1(); $setNeighbors_0(this$static, nextLevel, progressMonitor); } } function NeighborsProcessor(){ } defineClass(1916, 1, $intern_105, NeighborsProcessor); _.process = function process_85(tGraph, progressMonitor){ $process_89(this, castTo(tGraph, 121), progressMonitor); } ; _.numberOfNodes = 0; var Lorg_eclipse_elk_alg_mrtree_intermediate_NeighborsProcessor_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'NeighborsProcessor', 1916); function NeighborsProcessor$1(){ } defineClass(1917, 1, $intern_23, NeighborsProcessor$1); _.forEach_0 = function forEach_35(action){ $forEach_0(this, action); } ; _.iterator_0 = function iterator_77(){ return $clinit_Collections() , $clinit_Collections$EmptyListIterator() , INSTANCE_4; } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_NeighborsProcessor$1_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'NeighborsProcessor/1', 1917); function $process_90(this$static, tGraph, progressMonitor){ var it, lastArg, n, n$iterator, nextLevel, pos, root, subTasks, tNode; progressMonitor.begin('Processor set coordinates', 1); this$static.numberOfNodes = tGraph.nodes.size_0 == 0?1:tGraph.nodes.size_0; root = null; it = $listIterator_2(tGraph.nodes, 0); while (!root && it.currentNode != it.this$01.tail) { tNode = castTo($next_9(it), 40); if ($booleanValue(castToBoolean($getProperty(tNode, ($clinit_InternalProperties_2() , ROOT_0))))) { root = tNode; pos = tNode.pos; pos.x_0 = castTo($getProperty(tNode, XCOOR), 17).value_0; pos.y_0 = castTo($getProperty(tNode, YCOOR), 17).value_0; } } nextLevel = $getChildrenCopy(root); subTasks = 1; do { nextLevel = $setCoordinates((lastArg = nextLevel , progressMonitor.subTask(subTasks) , lastArg)); subTasks = nextLevel.size_0 / this$static.numberOfNodes | 0; } while (nextLevel.size_0 != 0); for (n$iterator = $listIterator_2(tGraph.nodes, 0); n$iterator.currentNode != n$iterator.this$01.tail;) { n = castTo($next_9(n$iterator), 40); $sub_0(n.pos, new KVector_1(n.size_0.x_0 / 2, n.size_0.y_0 / 2)); } progressMonitor.done_1(); } function $setCoordinates(currentLevel){ var nextLevel, pos, tNode, tNode$iterator; if (currentLevel.size_0 != 0) { nextLevel = new LinkedList; for (tNode$iterator = $listIterator_2(currentLevel, 0); tNode$iterator.currentNode != tNode$iterator.this$01.tail;) { tNode = castTo($next_9(tNode$iterator), 40); $addAll(nextLevel, $getChildrenCopy(tNode)); pos = tNode.pos; pos.x_0 = castTo($getProperty(tNode, ($clinit_InternalProperties_2() , XCOOR)), 17).value_0; pos.y_0 = castTo($getProperty(tNode, YCOOR), 17).value_0; } return nextLevel; } return new LinkedList; } function NodePositionProcessor(){ } defineClass(1922, 1, $intern_105, NodePositionProcessor); _.process = function process_86(tGraph, progressMonitor){ $process_90(this, castTo(tGraph, 121), progressMonitor); } ; _.numberOfNodes = 0; var Lorg_eclipse_elk_alg_mrtree_intermediate_NodePositionProcessor_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'NodePositionProcessor', 1922); function $process_91(this$static, tGraph, progressMonitor){ var node, node$iterator, root, superRoot, tRoot, tRoot$iterator, newEdge; progressMonitor.begin('Find roots', 1); this$static.roots.array.length = 0; for (node$iterator = $listIterator_2(tGraph.nodes, 0); node$iterator.currentNode != node$iterator.this$01.tail;) { node = castTo($next_9(node$iterator), 40); if (node.incomingEdges.size_0 == 0) { $setProperty_0(node, ($clinit_InternalProperties_2() , ROOT_0), ($clinit_Boolean() , true)); $add_3(this$static.roots, node); } } switch (this$static.roots.array.length) { case 0: root = new TNode(0, tGraph, 'DUMMY_ROOT'); $setProperty_0(root, ($clinit_InternalProperties_2() , ROOT_0), ($clinit_Boolean() , true)); $setProperty_0(root, DUMMY, true); $add_7(tGraph.nodes, root); break; case 1: break; default:superRoot = new TNode(0, tGraph, 'SUPER_ROOT'); for (tRoot$iterator = new ArrayList$1(this$static.roots); tRoot$iterator.i < tRoot$iterator.this$01.array.length;) { tRoot = castTo($next_6(tRoot$iterator), 40); newEdge = new TEdge_0(superRoot, tRoot); $setProperty_0(newEdge, ($clinit_InternalProperties_2() , DUMMY), ($clinit_Boolean() , true)); $add_7(superRoot.graph_0.edges, newEdge); $add_7(superRoot.outgoingEdges, newEdge); $add_7(tRoot.incomingEdges, newEdge); $setProperty_0(tRoot, ROOT_0, false); } $setProperty_0(superRoot, ($clinit_InternalProperties_2() , ROOT_0), ($clinit_Boolean() , true)); $setProperty_0(superRoot, DUMMY, true); $add_7(tGraph.nodes, superRoot); } progressMonitor.done_1(); } function RootProcessor(){ this.roots = new ArrayList; } defineClass(1912, 1, $intern_105, RootProcessor); _.process = function process_87(tGraph, progressMonitor){ $process_91(this, castTo(tGraph, 121), progressMonitor); } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_RootProcessor_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'RootProcessor', 1912); function $process_92(tGraph, progressMonitor){ var edges, tEdge, tEdge$iterator; progressMonitor.begin('Untreeify', 1); edges = castTo($getProperty(tGraph, ($clinit_InternalProperties_2() , REMOVABLE_EDGES)), 15); for (tEdge$iterator = edges.iterator_0(); tEdge$iterator.hasNext_0();) { tEdge = castTo(tEdge$iterator.next_1(), 65); $add_7(tEdge.source.outgoingEdges, tEdge); $add_7(tEdge.target.incomingEdges, tEdge); } progressMonitor.done_1(); } function Untreeifyer(){ } defineClass(1942, 1, $intern_105, Untreeifyer); _.process = function process_88(tGraph, progressMonitor){ $process_92(castTo(tGraph, 121), progressMonitor); } ; var Lorg_eclipse_elk_alg_mrtree_intermediate_Untreeifyer_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.intermediate', 'Untreeifyer', 1942); function $clinit_EdgeRoutingMode(){ $clinit_EdgeRoutingMode = emptyMethod; NONE_11 = new EdgeRoutingMode('NONE', 0); MIDDLE_TO_MIDDLE = new EdgeRoutingMode('MIDDLE_TO_MIDDLE', 1); AVOID_OVERLAP = new EdgeRoutingMode('AVOID_OVERLAP', 2); } function EdgeRoutingMode(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_73(name_0){ $clinit_EdgeRoutingMode(); return valueOf(($clinit_EdgeRoutingMode$Map() , $MAP_63), name_0); } function values_81(){ $clinit_EdgeRoutingMode(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_mrtree_options_EdgeRoutingMode_2_classLit, 1), $intern_37, 392, 0, [NONE_11, MIDDLE_TO_MIDDLE, AVOID_OVERLAP]); } defineClass(392, 22, {3:1, 34:1, 22:1, 392:1}, EdgeRoutingMode); var AVOID_OVERLAP, MIDDLE_TO_MIDDLE, NONE_11; var Lorg_eclipse_elk_alg_mrtree_options_EdgeRoutingMode_2_classLit = createForEnum('org.eclipse.elk.alg.mrtree.options', 'EdgeRoutingMode', 392, Ljava_lang_Enum_2_classLit, values_81, valueOf_73); function $clinit_EdgeRoutingMode$Map(){ $clinit_EdgeRoutingMode$Map = emptyMethod; $MAP_63 = createValueOfMap(($clinit_EdgeRoutingMode() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_mrtree_options_EdgeRoutingMode_2_classLit, 1), $intern_37, 392, 0, [NONE_11, MIDDLE_TO_MIDDLE, AVOID_OVERLAP]))); } var $MAP_63; function $clinit_InternalProperties_2(){ $clinit_InternalProperties_2 = emptyMethod; ORIGIN_1 = new Property('origin'); new Property('random'); new Property_0('DEPTH', valueOf_3(0)); FAN = new Property_0('FAN', valueOf_3(0)); DESCENDANTS = new Property_0('DESCENDANTS', valueOf_3(0)); ROOT_0 = new Property_0('ROOT', ($clinit_Boolean() , false)); LEFTNEIGHBOR = new Property_0('LEFTNEIGHBOR', null); RIGHTNEIGHBOR = new Property_0('RIGHTNEIGHBOR', null); LEFTSIBLING = new Property_0('LEFTSIBLING', null); RIGHTSIBLING = new Property_0('RIGHTSIBLING', null); DUMMY = new Property_0('DUMMY', false); new Property_0('LEVEL', valueOf_3(0)); REMOVABLE_EDGES = new Property_0('REMOVABLE_EDGES', new LinkedList); XCOOR = new Property_0('XCOOR', valueOf_3(0)); YCOOR = new Property_0('YCOOR', valueOf_3(0)); LEVELHEIGHT = new Property_0('LEVELHEIGHT', 0); LEVELMIN = new Property_0('LEVELMIN', 0); LEVELMAX = new Property_0('LEVELMAX', 0); GRAPH_XMIN = new Property_0('GRAPH_XMIN', 0); GRAPH_YMIN = new Property_0('GRAPH_YMIN', 0); GRAPH_XMAX = new Property_0('GRAPH_XMAX', 0); GRAPH_YMAX = new Property_0('GRAPH_YMAX', 0); COMPACT_LEVEL_ASCENSION = new Property_0('COMPACT_LEVEL_ASCENSION', false); COMPACT_CONSTRAINTS = new Property_0('COMPACT_CONSTRAINTS', new ArrayList); ID = new Property_0('ID', ''); POSITION_0 = new Property_0('POSITION', valueOf_3(0)); PRELIM = new Property_0('PRELIM', 0); MODIFIER = new Property_0('MODIFIER', 0); BB_UPLEFT_0 = new Property('boundingBox.upLeft'); BB_LOWRIGHT_0 = new Property('boundingBox.lowRight'); } var BB_LOWRIGHT_0, BB_UPLEFT_0, COMPACT_CONSTRAINTS, COMPACT_LEVEL_ASCENSION, DESCENDANTS, DUMMY, FAN, GRAPH_XMAX, GRAPH_XMIN, GRAPH_YMAX, GRAPH_YMIN, ID, LEFTNEIGHBOR, LEFTSIBLING, LEVELHEIGHT, LEVELMAX, LEVELMIN, MODIFIER, ORIGIN_1, POSITION_0, PRELIM, REMOVABLE_EDGES, RIGHTNEIGHBOR, RIGHTSIBLING, ROOT_0, XCOOR, YCOOR; function $clinit_MrTreeMetaDataProvider(){ $clinit_MrTreeMetaDataProvider = emptyMethod; COMPACTION = new Property_1('org.eclipse.elk.mrtree.compaction', ($clinit_Boolean() , false)); EDGE_END_TEXTURE_LENGTH = new Property_1('org.eclipse.elk.mrtree.edgeEndTextureLength', 7); valueOf_3(0); TREE_LEVEL = new Property_1('org.eclipse.elk.mrtree.treeLevel', valueOf_3(0)); POSITION_CONSTRAINT = new Property_1('org.eclipse.elk.mrtree.positionConstraint', valueOf_3(-1)); WEIGHTING_DEFAULT = ($clinit_OrderWeighting() , MODEL_ORDER_2); WEIGHTING = new Property_1('org.eclipse.elk.mrtree.weighting', WEIGHTING_DEFAULT); EDGE_ROUTING_MODE_DEFAULT = ($clinit_EdgeRoutingMode() , AVOID_OVERLAP); EDGE_ROUTING_MODE = new Property_1('org.eclipse.elk.mrtree.edgeRoutingMode', EDGE_ROUTING_MODE_DEFAULT); SEARCH_ORDER_DEFAULT = ($clinit_TreeifyingOrder() , DFS); SEARCH_ORDER = new Property_1('org.eclipse.elk.mrtree.searchOrder', SEARCH_ORDER_DEFAULT); } function MrTreeMetaDataProvider(){ $clinit_MrTreeMetaDataProvider(); } defineClass(862, 1, $intern_90, MrTreeMetaDataProvider); _.apply_4 = function apply_157(registry){ $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.mrtree.compaction'), ''), 'Position Constraint'), 'Turns on Tree compaction which decreases the size of the whole tree by placing nodes of multiple levels in one large level'), ($clinit_Boolean() , false)), ($clinit_LayoutOptionData$Type() , BOOLEAN)), Ljava_lang_Boolean_2_classLit), of_1(($clinit_LayoutOptionData$Target() , PARENTS))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.mrtree.edgeEndTextureLength'), ''), 'Edge End Texture Length'), 'Should be set to the length of the texture at the end of an edge. This value can be used to improve the Edge Routing.'), 7), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.mrtree.treeLevel'), ''), 'Tree Level'), 'The index for the tree level the node is in'), valueOf_3(0)), INT), Ljava_lang_Integer_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.mrtree.positionConstraint'), ''), 'Position Constraint'), 'When set to a positive number this option will force the algorithm to place the node to the specified position within the trees layer if weighting is set to constraint'), valueOf_3(-1)), INT), Ljava_lang_Integer_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.mrtree.weighting'), ''), 'Weighting of Nodes'), 'Which weighting to use when computing a node order.'), WEIGHTING_DEFAULT), ENUM), Lorg_eclipse_elk_alg_mrtree_options_OrderWeighting_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.mrtree.edgeRoutingMode'), ''), 'Edge Routing Mode'), 'Chooses an Edge Routing algorithm.'), EDGE_ROUTING_MODE_DEFAULT), ENUM), Lorg_eclipse_elk_alg_mrtree_options_EdgeRoutingMode_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.mrtree.searchOrder'), ''), 'Search Order'), 'Which search order to use when computing a spanning tree.'), SEARCH_ORDER_DEFAULT), ENUM), Lorg_eclipse_elk_alg_mrtree_options_TreeifyingOrder_2_classLit), of_1(PARENTS)))); $apply_18((new MrTreeOptions , registry)); } ; var COMPACTION, EDGE_END_TEXTURE_LENGTH, EDGE_ROUTING_MODE, EDGE_ROUTING_MODE_DEFAULT, POSITION_CONSTRAINT, SEARCH_ORDER, SEARCH_ORDER_DEFAULT, TREE_LEVEL, WEIGHTING, WEIGHTING_DEFAULT; var Lorg_eclipse_elk_alg_mrtree_options_MrTreeMetaDataProvider_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.options', 'MrTreeMetaDataProvider', 862); function $clinit_MrTreeOptions(){ $clinit_MrTreeOptions = emptyMethod; PADDING_DEFAULT_1 = new ElkPadding_0(20); PADDING_2 = new Property_2(($clinit_CoreOptions() , PADDING_6), PADDING_DEFAULT_1); SPACING_NODE_NODE_1 = new Property_2(SPACING_NODE_NODE_6, 20); SPACING_EDGE_NODE_0 = new Property_2(SPACING_EDGE_NODE_1, 3); ASPECT_RATIO_2 = new Property_2(ASPECT_RATIO_5, $intern_102); PRIORITY_1 = new Property_2(PRIORITY_3, valueOf_3(1)); SEPARATE_CONNECTED_COMPONENTS_1 = new Property_2(SEPARATE_CONNECTED_COMPONENTS_2, ($clinit_Boolean() , true)); DEBUG_MODE_0 = DEBUG_MODE_3; DIRECTION_DEFAULT_0 = ($clinit_Direction_0() , UNDEFINED_2); DIRECTION_0 = new Property_2(DIRECTION_1, DIRECTION_DEFAULT_0); INTERACTIVE_5 = INTERACTIVE_8; INTERACTIVE_LAYOUT_0 = INTERACTIVE_LAYOUT_2; NODE_SIZE_CONSTRAINTS_2 = NODE_SIZE_CONSTRAINTS_6; NODE_SIZE_FIXED_GRAPH_SIZE_1 = NODE_SIZE_FIXED_GRAPH_SIZE_3; NODE_SIZE_MINIMUM_1 = NODE_SIZE_MINIMUM_5; NODE_SIZE_OPTIONS_2 = NODE_SIZE_OPTIONS_6; NODE_LABELS_PLACEMENT_2 = NODE_LABELS_PLACEMENT_5; OMIT_NODE_MICRO_LAYOUT_1 = OMIT_NODE_MICRO_LAYOUT_4; PORT_LABELS_PLACEMENT_2 = PORT_LABELS_PLACEMENT_5; WEIGHTING_0 = ($clinit_MrTreeMetaDataProvider() , WEIGHTING); SEARCH_ORDER_0 = SEARCH_ORDER; TOPDOWN_LAYOUT_1 = TOPDOWN_LAYOUT_2; TOPDOWN_SCALE_FACTOR_1 = TOPDOWN_SCALE_FACTOR_2; TOPDOWN_HIERARCHICAL_NODE_WIDTH_1 = TOPDOWN_HIERARCHICAL_NODE_WIDTH_2; TOPDOWN_HIERARCHICAL_NODE_ASPECT_RATIO_1 = TOPDOWN_HIERARCHICAL_NODE_ASPECT_RATIO_2; TOPDOWN_NODE_TYPE_DEFAULT_1 = ($clinit_TopdownNodeTypes() , HIERARCHICAL_NODE); new Property_2(TOPDOWN_NODE_TYPE, TOPDOWN_NODE_TYPE_DEFAULT_1); POSITION_CONSTRAINT_0 = POSITION_CONSTRAINT; EDGE_ROUTING_MODE_0 = EDGE_ROUTING_MODE; TREE_LEVEL_0 = TREE_LEVEL; COMPACTION_0 = COMPACTION; EDGE_END_TEXTURE_LENGTH_0 = EDGE_END_TEXTURE_LENGTH; } function $apply_18(registry){ $register(registry, new LayoutAlgorithmData($supportedFeatures($category($providerFactory($description($name_0($id(new LayoutAlgorithmData$Builder, 'org.eclipse.elk.mrtree'), 'ELK Mr. Tree'), "Tree-based algorithm provided by the Eclipse Layout Kernel. Computes a spanning tree of the input graph and arranges all nodes according to the resulting parent-children hierarchy. I pity the fool who doesn't use Mr. Tree Layout."), new MrTreeOptions$MrtreeFactory), 'org.eclipse.elk.tree'), of_1(($clinit_GraphFeature() , DISCONNECTED))))); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.padding', PADDING_DEFAULT_1); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.spacing.nodeNode', 20); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.spacing.edgeNode', 3); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.aspectRatio', $intern_102); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.priority', valueOf_3(1)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.separateConnectedComponents', ($clinit_Boolean() , true)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.debugMode', $getDefault(DEBUG_MODE_0)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.direction', DIRECTION_DEFAULT_0); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.interactive', $getDefault(INTERACTIVE_5)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.interactiveLayout', $getDefault(INTERACTIVE_LAYOUT_0)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.nodeSize.constraints', $getDefault(NODE_SIZE_CONSTRAINTS_2)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.nodeSize.fixedGraphSize', $getDefault(NODE_SIZE_FIXED_GRAPH_SIZE_1)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.nodeSize.minimum', $getDefault(NODE_SIZE_MINIMUM_1)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.nodeSize.options', $getDefault(NODE_SIZE_OPTIONS_2)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.nodeLabels.placement', $getDefault(NODE_LABELS_PLACEMENT_2)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.omitNodeMicroLayout', $getDefault(OMIT_NODE_MICRO_LAYOUT_1)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.portLabels.placement', $getDefault(PORT_LABELS_PLACEMENT_2)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.mrtree.weighting', $getDefault(WEIGHTING_0)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.mrtree.searchOrder', $getDefault(SEARCH_ORDER_0)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.topdownLayout', $getDefault(TOPDOWN_LAYOUT_1)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.topdown.scaleFactor', $getDefault(TOPDOWN_SCALE_FACTOR_1)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.topdown.hierarchicalNodeWidth', $getDefault(TOPDOWN_HIERARCHICAL_NODE_WIDTH_1)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.topdown.hierarchicalNodeAspectRatio', $getDefault(TOPDOWN_HIERARCHICAL_NODE_ASPECT_RATIO_1)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.topdown.nodeType', TOPDOWN_NODE_TYPE_DEFAULT_1); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.mrtree.positionConstraint', $getDefault(POSITION_CONSTRAINT_0)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.mrtree.edgeRoutingMode', $getDefault(EDGE_ROUTING_MODE_0)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.mrtree.treeLevel', $getDefault(TREE_LEVEL_0)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.mrtree.compaction', $getDefault(COMPACTION_0)); $addOptionSupport(registry, 'org.eclipse.elk.mrtree', 'org.eclipse.elk.mrtree.edgeEndTextureLength', $getDefault(EDGE_END_TEXTURE_LENGTH_0)); } function MrTreeOptions(){ $clinit_MrTreeOptions(); } defineClass(1006, 1, $intern_90, MrTreeOptions); _.apply_4 = function apply_158(registry){ $apply_18(registry); } ; var ASPECT_RATIO_2, COMPACTION_0, DEBUG_MODE_0, DIRECTION_0, DIRECTION_DEFAULT_0, EDGE_END_TEXTURE_LENGTH_0, EDGE_ROUTING_MODE_0, INTERACTIVE_5, INTERACTIVE_LAYOUT_0, NODE_LABELS_PLACEMENT_2, NODE_SIZE_CONSTRAINTS_2, NODE_SIZE_FIXED_GRAPH_SIZE_1, NODE_SIZE_MINIMUM_1, NODE_SIZE_OPTIONS_2, OMIT_NODE_MICRO_LAYOUT_1, PADDING_2, PADDING_DEFAULT_1, PORT_LABELS_PLACEMENT_2, POSITION_CONSTRAINT_0, PRIORITY_1, SEARCH_ORDER_0, SEPARATE_CONNECTED_COMPONENTS_1, SPACING_EDGE_NODE_0, SPACING_NODE_NODE_1, TOPDOWN_HIERARCHICAL_NODE_ASPECT_RATIO_1, TOPDOWN_HIERARCHICAL_NODE_WIDTH_1, TOPDOWN_LAYOUT_1, TOPDOWN_NODE_TYPE_DEFAULT_1, TOPDOWN_SCALE_FACTOR_1, TREE_LEVEL_0, WEIGHTING_0; var Lorg_eclipse_elk_alg_mrtree_options_MrTreeOptions_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.options', 'MrTreeOptions', 1006); function MrTreeOptions$MrtreeFactory(){ } defineClass(1007, 1, {}, MrTreeOptions$MrtreeFactory); _.create_0 = function create_21(){ var provider; return provider = new TreeLayoutProvider , provider; } ; _.destroy = function destroy_3(obj){ } ; var Lorg_eclipse_elk_alg_mrtree_options_MrTreeOptions$MrtreeFactory_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.options', 'MrTreeOptions/MrtreeFactory', 1007); function $clinit_OrderWeighting(){ $clinit_OrderWeighting = emptyMethod; MODEL_ORDER_2 = new OrderWeighting('MODEL_ORDER', 0); DESCENDANTS_0 = new OrderWeighting('DESCENDANTS', 1); FAN_0 = new OrderWeighting('FAN', 2); CONSTRAINT = new OrderWeighting('CONSTRAINT', 3); } function OrderWeighting(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_74(name_0){ $clinit_OrderWeighting(); return valueOf(($clinit_OrderWeighting$Map() , $MAP_64), name_0); } function values_82(){ $clinit_OrderWeighting(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_mrtree_options_OrderWeighting_2_classLit, 1), $intern_37, 353, 0, [MODEL_ORDER_2, DESCENDANTS_0, FAN_0, CONSTRAINT]); } defineClass(353, 22, {3:1, 34:1, 22:1, 353:1}, OrderWeighting); var CONSTRAINT, DESCENDANTS_0, FAN_0, MODEL_ORDER_2; var Lorg_eclipse_elk_alg_mrtree_options_OrderWeighting_2_classLit = createForEnum('org.eclipse.elk.alg.mrtree.options', 'OrderWeighting', 353, Ljava_lang_Enum_2_classLit, values_82, valueOf_74); function $clinit_OrderWeighting$Map(){ $clinit_OrderWeighting$Map = emptyMethod; $MAP_64 = createValueOfMap(($clinit_OrderWeighting() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_mrtree_options_OrderWeighting_2_classLit, 1), $intern_37, 353, 0, [MODEL_ORDER_2, DESCENDANTS_0, FAN_0, CONSTRAINT]))); } var $MAP_64; function $clinit_TreeifyingOrder(){ $clinit_TreeifyingOrder = emptyMethod; DFS = new TreeifyingOrder('DFS', 0); BFS = new TreeifyingOrder('BFS', 1); } function TreeifyingOrder(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_75(name_0){ $clinit_TreeifyingOrder(); return valueOf(($clinit_TreeifyingOrder$Map() , $MAP_65), name_0); } function values_83(){ $clinit_TreeifyingOrder(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_mrtree_options_TreeifyingOrder_2_classLit, 1), $intern_37, 433, 0, [DFS, BFS]); } defineClass(433, 22, {3:1, 34:1, 22:1, 433:1}, TreeifyingOrder); var BFS, DFS; var Lorg_eclipse_elk_alg_mrtree_options_TreeifyingOrder_2_classLit = createForEnum('org.eclipse.elk.alg.mrtree.options', 'TreeifyingOrder', 433, Ljava_lang_Enum_2_classLit, values_83, valueOf_75); function $clinit_TreeifyingOrder$Map(){ $clinit_TreeifyingOrder$Map = emptyMethod; $MAP_65 = createValueOfMap(($clinit_TreeifyingOrder() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_mrtree_options_TreeifyingOrder_2_classLit, 1), $intern_37, 433, 0, [DFS, BFS]))); } var $MAP_65; function $clinit_DFSTreeifyer(){ $clinit_DFSTreeifyer = emptyMethod; INTERMEDIATE_PROCESSING_CONFIG = $addAfter(new LayoutProcessorConfiguration, ($clinit_TreeLayoutPhases() , P3_NODE_PLACEMENT), ($clinit_IntermediateProcessorStrategy_0() , DETREEIFYING_PROC)); } function $bfs(this$static, startNode){ var node, nodeQueue, tEdge, tEdge$iterator, target; nodeQueue = new LinkedList; $addNode_0(nodeQueue, startNode, nodeQueue.tail.prev, nodeQueue.tail); do { node = (checkCriticalElement(nodeQueue.size_0 != 0) , castTo($removeNode_0(nodeQueue, nodeQueue.header.next_0), 40)); this$static.visited[node.id_0] = 1; for (tEdge$iterator = $listIterator_2(node.outgoingEdges, 0); tEdge$iterator.currentNode != tEdge$iterator.this$01.tail;) { tEdge = castTo($next_9(tEdge$iterator), 65); target = tEdge.target; this$static.visited[target.id_0] == 1?$add_7(this$static.eliminated, tEdge):this$static.visited[target.id_0] == 2?(this$static.visited[target.id_0] = 1):$addNode_0(nodeQueue, target, nodeQueue.tail.prev, nodeQueue.tail); } } while (nodeQueue.size_0 != 0); } function $collectEdges(this$static, tGraph){ var tEdge, tEdge$iterator, tNode, tNode$iterator, treeifyingOrder; treeifyingOrder = castTo($getProperty(tGraph, ($clinit_MrTreeOptions() , SEARCH_ORDER_0)), 433); for (tNode$iterator = $listIterator_2(tGraph.nodes, 0); tNode$iterator.currentNode != tNode$iterator.this$01.tail;) { tNode = castTo($next_9(tNode$iterator), 40); if (this$static.visited[tNode.id_0] == 0) { switch (treeifyingOrder.ordinal) { case 0: $dfs_6(this$static, tNode); break; case 1: $bfs(this$static, tNode); } this$static.visited[tNode.id_0] = 2; } } for (tEdge$iterator = $listIterator_2(this$static.eliminated, 0); tEdge$iterator.currentNode != tEdge$iterator.this$01.tail;) { tEdge = castTo($next_9(tEdge$iterator), 65); $advanceToFind(tEdge.source.outgoingEdges, tEdge, true); $advanceToFind(tEdge.target.incomingEdges, tEdge, true); } $setProperty_0(tGraph, ($clinit_InternalProperties_2() , REMOVABLE_EDGES), this$static.eliminated); } function $dfs_6(this$static, tNode){ var tEdge, tEdge$iterator, target; this$static.visited[tNode.id_0] = 1; for (tEdge$iterator = $listIterator_2(tNode.outgoingEdges, 0); tEdge$iterator.currentNode != tEdge$iterator.this$01.tail;) { tEdge = castTo($next_9(tEdge$iterator), 65); target = tEdge.target; this$static.visited[target.id_0] == 1?$add_7(this$static.eliminated, tEdge):this$static.visited[target.id_0] == 2?(this$static.visited[target.id_0] = 1):$dfs_6(this$static, target); } } function $init_1(this$static, tGraph){ var id_0, node, node$iterator, size_0; size_0 = tGraph.nodes.size_0; this$static.eliminated = new LinkedList; this$static.visited = initUnidimensionalArray(I_classLit, $intern_49, 28, size_0, 15, 1); id_0 = 0; for (node$iterator = $listIterator_2(tGraph.nodes, 0); node$iterator.currentNode != node$iterator.this$01.tail;) { node = castTo($next_9(node$iterator), 40); node.id_0 = id_0++; } } function $process_93(this$static, tGraph, progressMonitor){ progressMonitor.begin('DFS Treeifying phase', 1); $init_1(this$static, tGraph); $collectEdges(this$static, tGraph); this$static.eliminated = null; this$static.visited = null; progressMonitor.done_1(); } function DFSTreeifyer(){ $clinit_DFSTreeifyer(); } defineClass(1486, 1, $intern_113, DFSTreeifyer); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_23(graph){ return castTo(graph, 121) , INTERMEDIATE_PROCESSING_CONFIG; } ; _.process = function process_89(tGraph, progressMonitor){ $process_93(this, castTo(tGraph, 121), progressMonitor); } ; var INTERMEDIATE_PROCESSING_CONFIG; var Lorg_eclipse_elk_alg_mrtree_p1treeify_DFSTreeifyer_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p1treeify', 'DFSTreeifyer', 1486); function $clinit_NodeOrderer(){ $clinit_NodeOrderer = emptyMethod; INTERMEDIATE_PROCESSING_CONFIG_0 = $add_17($add_17($add_17($before(new LayoutProcessorConfiguration, ($clinit_TreeLayoutPhases() , P2_NODE_ORDERING)), ($clinit_IntermediateProcessorStrategy_0() , ROOT_PROC)), FAN_PROC), LEVEL_PROC); } function $orderLevelConstraint(this$static, currentLevel, progressMonitor){ var children, curNode, i, i0, i1, i2, i3, inBoundNodes, inners, j, newTargetPos, outOfBoundNodes, sortedNodes, sortedOutEdges, tEdge, tEdge$iterator, tNode, tNode$iterator, tPNode, tPNode$array, tPNode$index, tPNode$max, targetPos, undefinedNodes; progressMonitor.begin('Processor arrange level', 1); undefinedNodes = castTo($collect_1($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(currentLevel, 16)), new NodeOrderer$lambda$1$Type), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , IDENTITY_FINISH)]))), 15); inBoundNodes = castTo($collect_1($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(currentLevel, 16)), new NodeOrderer$lambda$2$Type(currentLevel)), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [IDENTITY_FINISH]))), 15); outOfBoundNodes = castTo($collect_1($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(currentLevel, 16)), new NodeOrderer$lambda$3$Type(currentLevel)), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [IDENTITY_FINISH]))), 15); sortedNodes = initUnidimensionalArray(Lorg_eclipse_elk_alg_mrtree_graph_TNode_2_classLit, $intern_125, 40, currentLevel.size_1(), 0, 1); for (i0 = 0; i0 < inBoundNodes.size_1(); i0++) { curNode = castTo(inBoundNodes.get_0(i0), 40); targetPos = castTo($getProperty(curNode, ($clinit_MrTreeOptions() , POSITION_CONSTRAINT_0)), 17).value_0; if (targetPos >= 0 && targetPos < inBoundNodes.size_1() && !sortedNodes[targetPos]) { sortedNodes[targetPos] = curNode; inBoundNodes.remove_2(i0); --i0; } } for (i1 = 0; i1 < inBoundNodes.size_1(); i1++) { curNode = castTo(inBoundNodes.get_0(i1), 40); targetPos = castTo($getProperty(curNode, ($clinit_MrTreeOptions() , POSITION_CONSTRAINT_0)), 17).value_0; for (j = 0;; j++) { newTargetPos = targetPos + j; if (newTargetPos < sortedNodes.length && newTargetPos >= 0 && !sortedNodes[newTargetPos]) { sortedNodes[newTargetPos] = curNode; inBoundNodes.remove_2(i1); --i1; break; } newTargetPos = targetPos - j; if (newTargetPos < sortedNodes.length && newTargetPos >= 0 && !sortedNodes[newTargetPos]) { sortedNodes[newTargetPos] = curNode; inBoundNodes.remove_2(i1); --i1; break; } } } outOfBoundNodes.sort_0(new NodeOrderer$lambda$4$Type); for (i2 = sortedNodes.length - 1; i2 >= 0; i2--) { if (!sortedNodes[i2] && !outOfBoundNodes.isEmpty()) { sortedNodes[i2] = castTo(outOfBoundNodes.get_0(0), 40); outOfBoundNodes.remove_2(0); } } for (i3 = 0; i3 < sortedNodes.length; i3++) { if (!sortedNodes[i3] && !undefinedNodes.isEmpty()) { sortedNodes[i3] = castTo(undefinedNodes.get_0(0), 40); undefinedNodes.remove_2(0); } } for (i = 0; i < sortedNodes.length; i++) { $setProperty_0(sortedNodes[i], ($clinit_InternalProperties_2() , POSITION_0), valueOf_3(i)); } inners = castTo($toArray_6($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(currentLevel, 16)), new NodeOrderer$lambda$5$Type), new NodeOrderer$0methodref$lambda$6$Type), 534); for (tPNode$array = inners , tPNode$index = 0 , tPNode$max = tPNode$array.length; tPNode$index < tPNode$max; ++tPNode$index) { tPNode = tPNode$array[tPNode$index]; children = $getChildrenCopy(tPNode); $orderLevelConstraint(this$static, children, progressMonitor.subTask(1 / inners.length | 0)); $clinit_Collections(); $sort_0(children, new PropertyHolderComparator(($clinit_InternalProperties_2() , POSITION_0))); sortedOutEdges = new LinkedList; for (tNode$iterator = $listIterator_2(children, 0); tNode$iterator.currentNode != tNode$iterator.this$01.tail;) { tNode = castTo($next_9(tNode$iterator), 40); for (tEdge$iterator = $listIterator_2(tPNode.outgoingEdges, 0); tEdge$iterator.currentNode != tEdge$iterator.this$01.tail;) { tEdge = castTo($next_9(tEdge$iterator), 65); tEdge.target == tNode && ($addNode_0(sortedOutEdges, tEdge, sortedOutEdges.tail.prev, sortedOutEdges.tail) , true); } } $reset_0(tPNode.outgoingEdges); $addAll(tPNode.outgoingEdges, sortedOutEdges); } progressMonitor.done_1(); } function $orderLevelFanDescendants(this$static, currentLevel, progressMonitor){ var children, fillGap, firstOcc, inners, it, leaves, notNull, pos, size_0, sortProperty, sortedOutEdges, tENode, tENode$iterator, tEdge, tEdge$iterator, tNode, tNode$iterator, tPNode, tPNode$iterator, tmp; progressMonitor.begin('Processor arrange level', 1); sortProperty = ($clinit_InternalProperties_2() , FAN); this$static.weighting == ($clinit_OrderWeighting() , DESCENDANTS_0) && (sortProperty = DESCENDANTS); pos = 0; $clinit_Collections(); currentLevel.sort_0(new PropertyHolderComparator(sortProperty)); firstOcc = currentLevel.size_1(); it = currentLevel.listIterator_1(currentLevel.size_1()); notNull = true; while (notNull && it.hasPrevious()) { tNode = castTo(it.previous_0(), 40); castTo($getProperty(tNode, sortProperty), 17).value_0 == 0?--firstOcc:(notNull = false); } tmp = currentLevel.subList(0, firstOcc); inners = new LinkedList_0(tmp); tmp = currentLevel.subList(firstOcc, currentLevel.size_1()); leaves = new LinkedList_0(tmp); if (inners.size_0 == 0) { for (tENode$iterator = $listIterator_2(leaves, 0); tENode$iterator.currentNode != tENode$iterator.this$01.tail;) { tENode = castTo($next_9(tENode$iterator), 40); $setProperty_0(tENode, POSITION_0, valueOf_3(pos++)); } } else { size_0 = inners.size_0; for (tPNode$iterator = $listIterator_2(inners, 0); tPNode$iterator.currentNode != tPNode$iterator.this$01.tail;) { tPNode = castTo($next_9(tPNode$iterator), 40); $setProperty_0(tPNode, POSITION_0, valueOf_3(pos++)); children = $getChildrenCopy(tPNode); $orderLevelFanDescendants(this$static, children, progressMonitor.subTask(1 / size_0 | 0)); $sort_0(children, reverseOrder(new PropertyHolderComparator(POSITION_0))); sortedOutEdges = new LinkedList; for (tNode$iterator = $listIterator_2(children, 0); tNode$iterator.currentNode != tNode$iterator.this$01.tail;) { tNode = castTo($next_9(tNode$iterator), 40); for (tEdge$iterator = $listIterator_2(tPNode.outgoingEdges, 0); tEdge$iterator.currentNode != tEdge$iterator.this$01.tail;) { tEdge = castTo($next_9(tEdge$iterator), 65); tEdge.target == tNode && ($addNode_0(sortedOutEdges, tEdge, sortedOutEdges.tail.prev, sortedOutEdges.tail) , true); } } $reset_0(tPNode.outgoingEdges); $addAll(tPNode.outgoingEdges, sortedOutEdges); it = $listIterator_2(leaves, leaves.size_0); fillGap = tPNode.outgoingEdges.size_0; notNull = true; while (0 < fillGap && notNull && it.hasPrevious()) { tNode = castTo(it.previous_0(), 40); if (castTo($getProperty(tNode, sortProperty), 17).value_0 == 0) { $setProperty_0(tNode, POSITION_0, valueOf_3(pos++)); --fillGap; it.remove(); } else { notNull = false; } } } } progressMonitor.done_1(); } function $process_94(this$static, tGraph, progressMonitor){ var root; progressMonitor.begin('Processor arrange node', 1); $booleanValue(castToBoolean($getProperty(tGraph, ($clinit_MrTreeOptions() , DEBUG_MODE_0)))); root = castTo($get_17($findFirst($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(tGraph.nodes, 16)), new NodeOrderer$lambda$0$Type))), 40); this$static.weighting = castTo($getProperty(tGraph, WEIGHTING_0), 353); this$static.weighting == ($clinit_OrderWeighting() , FAN_0) || this$static.weighting == DESCENDANTS_0?$orderLevelFanDescendants(this$static, new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_mrtree_graph_TNode_2_classLit, 1), $intern_125, 40, 0, [root])), progressMonitor.subTask(1)):this$static.weighting == CONSTRAINT && $orderLevelConstraint(this$static, new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_mrtree_graph_TNode_2_classLit, 1), $intern_125, 40, 0, [root])), progressMonitor.subTask(1)); progressMonitor.done_1(); } function NodeOrderer(){ $clinit_NodeOrderer(); } function lambda$2_10(currentLevel_0, x_1){ $clinit_NodeOrderer(); return castTo($getProperty(x_1, ($clinit_MrTreeOptions() , POSITION_CONSTRAINT_0)), 17).value_0 < currentLevel_0.size_1() && castTo($getProperty(x_1, POSITION_CONSTRAINT_0), 17).value_0 >= 0; } function lambda$3_7(currentLevel_0, x_1){ $clinit_NodeOrderer(); return castTo($getProperty(x_1, ($clinit_MrTreeOptions() , POSITION_CONSTRAINT_0)), 17).value_0 >= currentLevel_0.size_1(); } function lambda$4_9(x_0, y_1){ $clinit_NodeOrderer(); return -compare_5(castTo($getProperty(x_0, ($clinit_MrTreeOptions() , POSITION_CONSTRAINT_0)), 17).value_0, castTo($getProperty(y_1, POSITION_CONSTRAINT_0), 17).value_0); } defineClass(1487, 1, $intern_113, NodeOrderer); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_24(graph){ return castTo(graph, 121) , INTERMEDIATE_PROCESSING_CONFIG_0; } ; _.process = function process_90(tGraph, progressMonitor){ $process_94(this, castTo(tGraph, 121), progressMonitor); } ; var INTERMEDIATE_PROCESSING_CONFIG_0; var Lorg_eclipse_elk_alg_mrtree_p2order_NodeOrderer_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p2order', 'NodeOrderer', 1487); function $apply_19(arg0){ return $clinit_NodeOrderer() , initUnidimensionalArray(Lorg_eclipse_elk_alg_mrtree_graph_TNode_2_classLit, $intern_125, 40, arg0, 0, 1); } function NodeOrderer$0methodref$lambda$6$Type(){ } defineClass(1494, 1, {}, NodeOrderer$0methodref$lambda$6$Type); _.apply_2 = function apply_159(arg0){ return $apply_19(arg0); } ; var Lorg_eclipse_elk_alg_mrtree_p2order_NodeOrderer$0methodref$lambda$6$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p2order', 'NodeOrderer/0methodref$lambda$6$Type', 1494); function NodeOrderer$lambda$0$Type(){ } defineClass(1488, 1, $intern_40, NodeOrderer$lambda$0$Type); _.test_0 = function test_114(arg0){ return $clinit_NodeOrderer() , $booleanValue(castToBoolean($getProperty(castTo(arg0, 40), ($clinit_InternalProperties_2() , ROOT_0)))); } ; var Lorg_eclipse_elk_alg_mrtree_p2order_NodeOrderer$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p2order', 'NodeOrderer/lambda$0$Type', 1488); function NodeOrderer$lambda$1$Type(){ } defineClass(1489, 1, $intern_40, NodeOrderer$lambda$1$Type); _.test_0 = function test_115(arg0){ return $clinit_NodeOrderer() , castTo($getProperty(castTo(arg0, 40), ($clinit_MrTreeOptions() , POSITION_CONSTRAINT_0)), 17).value_0 < 0; } ; var Lorg_eclipse_elk_alg_mrtree_p2order_NodeOrderer$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p2order', 'NodeOrderer/lambda$1$Type', 1489); function NodeOrderer$lambda$2$Type(currentLevel_0){ this.currentLevel_0 = currentLevel_0; } defineClass(1490, 1, $intern_40, NodeOrderer$lambda$2$Type); _.test_0 = function test_116(arg0){ return lambda$2_10(this.currentLevel_0, castTo(arg0, 40)); } ; var Lorg_eclipse_elk_alg_mrtree_p2order_NodeOrderer$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p2order', 'NodeOrderer/lambda$2$Type', 1490); function NodeOrderer$lambda$3$Type(currentLevel_0){ this.currentLevel_0 = currentLevel_0; } defineClass(1491, 1, $intern_40, NodeOrderer$lambda$3$Type); _.test_0 = function test_117(arg0){ return lambda$3_7(this.currentLevel_0, castTo(arg0, 40)); } ; var Lorg_eclipse_elk_alg_mrtree_p2order_NodeOrderer$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p2order', 'NodeOrderer/lambda$3$Type', 1491); function NodeOrderer$lambda$4$Type(){ } defineClass(1492, 1, $intern_88, NodeOrderer$lambda$4$Type); _.compare_1 = function compare_91(arg0, arg1){ return lambda$4_9(castTo(arg0, 40), castTo(arg1, 40)); } ; _.equals_0 = function equals_178(other){ return this === other; } ; _.reversed = function reversed_83(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_p2order_NodeOrderer$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p2order', 'NodeOrderer/lambda$4$Type', 1492); function NodeOrderer$lambda$5$Type(){ } defineClass(1493, 1, $intern_40, NodeOrderer$lambda$5$Type); _.test_0 = function test_118(arg0){ return $clinit_NodeOrderer() , castTo($getProperty(castTo(arg0, 40), ($clinit_InternalProperties_2() , FAN)), 17).value_0 != 0; } ; var Lorg_eclipse_elk_alg_mrtree_p2order_NodeOrderer$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p2order', 'NodeOrderer/lambda$5$Type', 1493); function $clinit_NodePlacer(){ $clinit_NodePlacer = emptyMethod; INTERMEDIATE_PROCESSING_CONFIG_1 = $add_17($add_17($before($add_17($add_17($before($addBefore(new LayoutProcessorConfiguration, ($clinit_TreeLayoutPhases() , P2_NODE_ORDERING), ($clinit_IntermediateProcessorStrategy_0() , ROOT_PROC)), P3_NODE_PLACEMENT), LEVEL_HEIGHT), NEIGHBORS_PROC), P4_EDGE_ROUTING), DIRECTION_PROC), NODE_POSITION_PROC); } function $apportion(this$static, cN){ var ancestorLeftmost, ancestorNeighbor, compareDepth, edgesIter, edgesIter0, i, leftModSum, leftSibling, leftSiblings, leftmost, mean, moveDistance, neighbor, newMod, newPr, portion, prL, prN, rightModSum; leftmost = castTo(getNext((edgesIter0 = $listIterator_2((new TNode$2(cN)).this$01.outgoingEdges, 0) , new TNode$2$1(edgesIter0))), 40); neighbor = leftmost?castTo($getProperty(leftmost, ($clinit_InternalProperties_2() , LEFTNEIGHBOR)), 40):null; compareDepth = 1; while (!!leftmost && !!neighbor) { leftModSum = 0; rightModSum = 0; ancestorLeftmost = leftmost; ancestorNeighbor = neighbor; for (i = 0; i < compareDepth; i++) { ancestorLeftmost = $getParent(ancestorLeftmost); ancestorNeighbor = $getParent(ancestorNeighbor); rightModSum += $doubleValue(castToDouble($getProperty(ancestorLeftmost, ($clinit_InternalProperties_2() , MODIFIER)))); leftModSum += $doubleValue(castToDouble($getProperty(ancestorNeighbor, MODIFIER))); } prN = $doubleValue(castToDouble($getProperty(neighbor, ($clinit_InternalProperties_2() , PRELIM)))); prL = $doubleValue(castToDouble($getProperty(leftmost, PRELIM))); mean = $meanNodeWidth(this$static, leftmost, neighbor); moveDistance = prN + leftModSum + this$static.spacing + mean - prL - rightModSum; if (0 < moveDistance) { leftSibling = cN; leftSiblings = 0; while (!!leftSibling && leftSibling != ancestorNeighbor) { ++leftSiblings; leftSibling = castTo($getProperty(leftSibling, LEFTSIBLING), 40); } if (leftSibling) { portion = moveDistance / leftSiblings; leftSibling = cN; while (leftSibling != ancestorNeighbor) { newPr = $doubleValue(castToDouble($getProperty(leftSibling, PRELIM))) + moveDistance; $setProperty_0(leftSibling, PRELIM, newPr); newMod = $doubleValue(castToDouble($getProperty(leftSibling, MODIFIER))) + moveDistance; $setProperty_0(leftSibling, MODIFIER, newMod); moveDistance -= portion; leftSibling = castTo($getProperty(leftSibling, LEFTSIBLING), 40); } } else { return; } } ++compareDepth; leftmost.outgoingEdges.size_0 == 0?(leftmost = getLeftMost(new TNode$2(cN), compareDepth)):(leftmost = castTo(getNext((edgesIter = $listIterator_2((new TNode$2(leftmost)).this$01.outgoingEdges, 0) , new TNode$2$1(edgesIter))), 40)); neighbor = leftmost?castTo($getProperty(leftmost, LEFTNEIGHBOR), 40):null; } } function $firstWalk(this$static, cN){ var child, child$iterator, edgesIter, edgesIter0, edgesIter1, lM, lS, midPoint, p, rM; $setProperty_0(cN, ($clinit_InternalProperties_2() , MODIFIER), 0); lS = castTo($getProperty(cN, LEFTSIBLING), 40); if (cN.outgoingEdges.size_0 == 0) { if (lS) { p = $doubleValue(castToDouble($getProperty(lS, PRELIM))) + this$static.spacing + $meanNodeWidth(this$static, lS, cN); $setProperty_0(cN, PRELIM, p); } else { $setProperty_0(cN, PRELIM, 0); } } else { for (child$iterator = (edgesIter0 = $listIterator_2((new TNode$2(cN)).this$01.outgoingEdges, 0) , new TNode$2$1(edgesIter0)); $hasNext_5(child$iterator.val$edgesIter2);) { child = castTo($next_9(child$iterator.val$edgesIter2), 65).target; $firstWalk(this$static, child); } lM = castTo(getNext((edgesIter1 = $listIterator_2((new TNode$2(cN)).this$01.outgoingEdges, 0) , new TNode$2$1(edgesIter1))), 40); rM = castTo(getLast_1((edgesIter = $listIterator_2((new TNode$2(cN)).this$01.outgoingEdges, 0) , new TNode$2$1(edgesIter))), 40); midPoint = ($doubleValue(castToDouble($getProperty(rM, PRELIM))) + $doubleValue(castToDouble($getProperty(lM, PRELIM)))) / 2; if (lS) { p = $doubleValue(castToDouble($getProperty(lS, PRELIM))) + this$static.spacing + $meanNodeWidth(this$static, lS, cN); $setProperty_0(cN, PRELIM, p); $setProperty_0(cN, MODIFIER, $doubleValue(castToDouble($getProperty(cN, PRELIM))) - midPoint); $apportion(this$static, cN); } else { $setProperty_0(cN, PRELIM, midPoint); } } } function $meanNodeWidth(this$static, leftNode, rightNode){ var nodeWidth; nodeWidth = 0; !!leftNode && ($isVertical(this$static.direction)?(nodeWidth += leftNode.size_0.x_0 / 2):(nodeWidth += leftNode.size_0.y_0 / 2)); !!rightNode && ($isVertical(this$static.direction)?(nodeWidth += rightNode.size_0.x_0 / 2):(nodeWidth += rightNode.size_0.y_0 / 2)); return nodeWidth; } function $process_95(this$static, tGraph, progressMonitor){ var root, roots, tNode, tNode$iterator; progressMonitor.begin('Processor order nodes', 2); this$static.spacing = $doubleValue(castToDouble($getProperty(tGraph, ($clinit_MrTreeOptions() , SPACING_NODE_NODE_1)))); this$static.direction = castTo($getProperty(tGraph, DIRECTION_0), 88); if (this$static.direction == ($clinit_Direction_0() , UNDEFINED_2)) { this$static.direction = DOWN_1; $setProperty_0(tGraph, DIRECTION_0, this$static.direction); } roots = new LinkedList; for (tNode$iterator = $listIterator_2(tGraph.nodes, 0); tNode$iterator.currentNode != tNode$iterator.this$01.tail;) { tNode = castTo($next_9(tNode$iterator), 40); $booleanValue(castToBoolean($getProperty(tNode, ($clinit_InternalProperties_2() , ROOT_0)))) && ($addNode_0(roots, tNode, roots.tail.prev, roots.tail) , true); } root = (checkCriticalElement(roots.size_0 != 0) , castTo(roots.header.next_0.value_0, 40)); $firstWalk(this$static, root); progressMonitor.worked(1); $secondWalk(this$static, root, 0 - $doubleValue(castToDouble($getProperty(root, ($clinit_InternalProperties_2() , LEVELHEIGHT)))) / 2, 0); progressMonitor.worked(1); progressMonitor.done_1(); } function $secondWalk(this$static, tNode, yCoor, modsum){ var edgesIter, xTemp, yTemp; if (tNode) { xTemp = $doubleValue(castToDouble($getProperty(tNode, ($clinit_InternalProperties_2() , PRELIM)))) + modsum; yTemp = yCoor + $doubleValue(castToDouble($getProperty(tNode, LEVELHEIGHT))) / 2; $setProperty_0(tNode, XCOOR, valueOf_3(toInt_0(fromDouble_0($wnd.Math.round(xTemp))))); $setProperty_0(tNode, YCOOR, valueOf_3(toInt_0(fromDouble_0($wnd.Math.round(yTemp))))); tNode.outgoingEdges.size_0 == 0 || $secondWalk(this$static, castTo(getNext((edgesIter = $listIterator_2((new TNode$2(tNode)).this$01.outgoingEdges, 0) , new TNode$2$1(edgesIter))), 40), yCoor + $doubleValue(castToDouble($getProperty(tNode, LEVELHEIGHT))) + this$static.spacing, modsum + $doubleValue(castToDouble($getProperty(tNode, MODIFIER)))); $getProperty(tNode, RIGHTSIBLING) != null && $secondWalk(this$static, castTo($getProperty(tNode, RIGHTSIBLING), 40), yCoor, modsum); } } function NodePlacer(){ $clinit_NodePlacer(); } defineClass(1495, 1, $intern_113, NodePlacer); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_25(graph){ return castTo(graph, 121) , INTERMEDIATE_PROCESSING_CONFIG_1; } ; _.process = function process_91(tGraph, progressMonitor){ $process_95(this, castTo(tGraph, 121), progressMonitor); } ; _.spacing = 0; var INTERMEDIATE_PROCESSING_CONFIG_1; var Lorg_eclipse_elk_alg_mrtree_p3place_NodePlacer_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p3place', 'NodePlacer', 1495); function $clinit_EdgeRouter(){ $clinit_EdgeRouter = emptyMethod; INTERMEDIATE_PROCESSING_CONFIG_2 = $add_17($add_17($add_17($before(new LayoutProcessorConfiguration, ($clinit_TreeLayoutPhases() , P4_EDGE_ROUTING)), ($clinit_IntermediateProcessorStrategy_0() , LEVEL_COORDS)), COMPACTION_PROC), GRAPH_BOUNDS_PROC); } function $avoidOverlapHandleCycleInducingEdges(e, d, tGraph, sideEdges, nodeBendpointPadding, edgeEndTexturePadding, inOuts){ var bendTmp, finalSideOneEdges, finalSideTwoEdges, middleTree, s, sideOneEdges, sideTwoEdges, t; sideOneEdges = castTo(sideEdges.first, 17).value_0; sideTwoEdges = castTo(sideEdges.second, 17).value_0; s = e.source; t = e.target; bendTmp = 0; middleTree = 0; if (d == ($clinit_Direction_0() , LEFT_6) || d == RIGHT_6) { middleTree = $getAsDouble($average($mapToDouble($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(tGraph.nodes, 16)), new EdgeRouter$lambda$5$Type), new EdgeRouter$1methodref$doubleValue$Type))); if (s.pos.y_0 + s.size_0.y_0 / 2 > middleTree) { finalSideTwoEdges = ++sideTwoEdges; bendTmp = $doubleValue(castToDouble($get_17($max_1($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(tGraph.nodes, 16)), new EdgeRouter$lambda$7$Type(nodeBendpointPadding, finalSideTwoEdges)), new EdgeRouter$2methodref$compare$Type)))); } else { finalSideOneEdges = ++sideOneEdges; bendTmp = $doubleValue(castToDouble($get_17($min_0($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(tGraph.nodes, 16)), new EdgeRouter$lambda$9$Type(nodeBendpointPadding, finalSideOneEdges)), new EdgeRouter$3methodref$compare$Type)))); } } else { middleTree = $getAsDouble($average($mapToDouble($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(tGraph.nodes, 16)), new EdgeRouter$lambda$11$Type), new EdgeRouter$4methodref$doubleValue$Type))); if (s.pos.x_0 + s.size_0.x_0 / 2 > middleTree) { finalSideTwoEdges = ++sideTwoEdges; bendTmp = $doubleValue(castToDouble($get_17($max_1($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(tGraph.nodes, 16)), new EdgeRouter$lambda$13$Type(nodeBendpointPadding, finalSideTwoEdges)), new EdgeRouter$5methodref$compare$Type)))); } else { finalSideOneEdges = ++sideOneEdges; bendTmp = $doubleValue(castToDouble($get_17($min_0($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(tGraph.nodes, 16)), new EdgeRouter$lambda$15$Type(nodeBendpointPadding, finalSideOneEdges)), new EdgeRouter$6methodref$compare$Type)))); } } if (d == LEFT_6) { $addLast_0(e.bendPoints, new KVector_1($doubleValue(castToDouble($getProperty(s, ($clinit_InternalProperties_2() , LEVELMIN)))) - nodeBendpointPadding, bendTmp)); $addLast_0(e.bendPoints, new KVector_1(t.pos.x_0 + t.size_0.x_0 + nodeBendpointPadding + edgeEndTexturePadding, bendTmp)); $addLast_0(e.bendPoints, new KVector_1(t.pos.x_0 + t.size_0.x_0 + nodeBendpointPadding + edgeEndTexturePadding, t.pos.y_0 + t.size_0.y_0 / 2)); $addLast_0(e.bendPoints, new KVector_1(t.pos.x_0 + t.size_0.x_0, t.pos.y_0 + t.size_0.y_0 / 2)); } else if (d == RIGHT_6) { $addLast_0(e.bendPoints, new KVector_1($doubleValue(castToDouble($getProperty(s, ($clinit_InternalProperties_2() , LEVELMAX)))) + nodeBendpointPadding, s.pos.y_0 + s.size_0.y_0 / 2)); $addLast_0(e.bendPoints, new KVector_1(s.pos.x_0 + s.size_0.x_0 + nodeBendpointPadding, bendTmp)); $addLast_0(e.bendPoints, new KVector_1(t.pos.x_0 - nodeBendpointPadding - edgeEndTexturePadding, bendTmp)); $addLast_0(e.bendPoints, new KVector_1(t.pos.x_0 - nodeBendpointPadding - edgeEndTexturePadding, t.pos.y_0 + t.size_0.y_0 / 2)); $addLast_0(e.bendPoints, new KVector_1(t.pos.x_0, t.pos.y_0 + t.size_0.y_0 / 2)); } else if (d == UP_1) { $addLast_0(e.bendPoints, new KVector_1(bendTmp, $doubleValue(castToDouble($getProperty(s, ($clinit_InternalProperties_2() , LEVELMIN)))) - nodeBendpointPadding)); $addLast_0(e.bendPoints, new KVector_1(bendTmp, t.pos.y_0 + t.size_0.y_0 + nodeBendpointPadding + edgeEndTexturePadding)); $addLast_0(e.bendPoints, new KVector_1(t.pos.x_0 + t.size_0.x_0 / 2, t.pos.y_0 + t.size_0.y_0 + nodeBendpointPadding + edgeEndTexturePadding)); $addLast_0(e.bendPoints, new KVector_1(t.pos.x_0 + t.size_0.x_0 / 2, t.pos.y_0 + t.size_0.y_0 + nodeBendpointPadding)); } else { e.bendPoints.size_0 == 0 || (castTo($getLast(e.bendPoints), 8).y_0 = $doubleValue(castToDouble($getProperty(s, ($clinit_InternalProperties_2() , LEVELMAX)))) + nodeBendpointPadding * castTo(inOuts.second, 17).value_0); $addLast_0(e.bendPoints, new KVector_1(bendTmp, $doubleValue(castToDouble($getProperty(s, ($clinit_InternalProperties_2() , LEVELMAX)))) + nodeBendpointPadding * castTo(inOuts.second, 17).value_0)); $addLast_0(e.bendPoints, new KVector_1(bendTmp, t.pos.y_0 - nodeBendpointPadding * castTo(inOuts.first, 17).value_0 - edgeEndTexturePadding)); } return new Pair(valueOf_3(sideOneEdges), valueOf_3(sideTwoEdges)); } function $avoidOverlapSetEndPoints(tGraph, d, nodeBendpointPadding, edgeEndTexturePadding){ var i, ins, interpolation, lastX, lastY, levelStartCoord, n, n$iterator, nextX, nextY, num; for (n$iterator = $listIterator_2(tGraph.nodes, 0); n$iterator.currentNode != n$iterator.this$01.tail;) { n = castTo($next_9(n$iterator), 40); if ($equals_5(n.label_0, 'SUPER_ROOT')) { continue; } ins = castTo($collect_1(new StreamImpl(null, new Spliterators$IteratorSpliterator(getAllIncomingEdges(n, tGraph), 16)), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , IDENTITY_FINISH)]))), 15); d == ($clinit_Direction_0() , LEFT_6) || d == RIGHT_6?ins.sort_0(new EdgeRouter$lambda$19$Type):ins.sort_0(new EdgeRouter$lambda$20$Type); num = ins.size_1(); for (i = 0; i < num; i++) { interpolation = num == 1?0.5:(1 + i) / (num + 1); if (d == LEFT_6) { levelStartCoord = $doubleValue(castToDouble($getProperty(n, ($clinit_InternalProperties_2() , LEVELMAX)))); if (n.pos.x_0 + n.size_0.x_0 + edgeEndTexturePadding < levelStartCoord) { $addLast_0(castTo(ins.get_0(i), 65).bendPoints, new KVector_1(levelStartCoord + nodeBendpointPadding, n.pos.y_0 + n.size_0.y_0 * interpolation)); } else if (castTo(ins.get_0(i), 65).bendPoints.size_0 > 0) { lastX = castTo($getLast(castTo(ins.get_0(i), 65).bendPoints), 8).x_0; nextX = n.pos.x_0 + n.size_0.x_0 / 2; lastY = castTo($getLast(castTo(ins.get_0(i), 65).bendPoints), 8).y_0; nextY = n.pos.y_0 + n.size_0.y_0 / 2; edgeEndTexturePadding > 0 && $wnd.Math.abs(lastY - nextY) / ($wnd.Math.abs(lastX - nextX) / 40) > 50 && (nextY > lastY?$addLast_0(castTo(ins.get_0(i), 65).bendPoints, new KVector_1(n.pos.x_0 + n.size_0.x_0 + edgeEndTexturePadding / 5.3, n.pos.y_0 + n.size_0.y_0 * interpolation - edgeEndTexturePadding / 2)):$addLast_0(castTo(ins.get_0(i), 65).bendPoints, new KVector_1(n.pos.x_0 + n.size_0.x_0 + edgeEndTexturePadding / 5.3, n.pos.y_0 + n.size_0.y_0 * interpolation + edgeEndTexturePadding / 2))); } $addLast_0(castTo(ins.get_0(i), 65).bendPoints, new KVector_1(n.pos.x_0 + n.size_0.x_0, n.pos.y_0 + n.size_0.y_0 * interpolation)); } else if (d == RIGHT_6) { levelStartCoord = $doubleValue(castToDouble($getProperty(n, ($clinit_InternalProperties_2() , LEVELMIN)))); if (n.pos.x_0 - edgeEndTexturePadding > levelStartCoord) { $addLast_0(castTo(ins.get_0(i), 65).bendPoints, new KVector_1(levelStartCoord - nodeBendpointPadding, n.pos.y_0 + n.size_0.y_0 * interpolation)); } else if (castTo(ins.get_0(i), 65).bendPoints.size_0 > 0) { lastX = castTo($getLast(castTo(ins.get_0(i), 65).bendPoints), 8).x_0; nextX = n.pos.x_0 + n.size_0.x_0 / 2; lastY = castTo($getLast(castTo(ins.get_0(i), 65).bendPoints), 8).y_0; nextY = n.pos.y_0 + n.size_0.y_0 / 2; edgeEndTexturePadding > 0 && $wnd.Math.abs(lastY - nextY) / ($wnd.Math.abs(lastX - nextX) / 40) > 50 && (nextY > lastY?$addLast_0(castTo(ins.get_0(i), 65).bendPoints, new KVector_1(n.pos.x_0 - edgeEndTexturePadding / 5.3, n.pos.y_0 + n.size_0.y_0 * interpolation - edgeEndTexturePadding / 2)):$addLast_0(castTo(ins.get_0(i), 65).bendPoints, new KVector_1(n.pos.x_0 - edgeEndTexturePadding / 5.3, n.pos.y_0 + n.size_0.y_0 * interpolation + edgeEndTexturePadding / 2))); } $addLast_0(castTo(ins.get_0(i), 65).bendPoints, new KVector_1(n.pos.x_0, n.pos.y_0 + n.size_0.y_0 * interpolation)); } else if (d == UP_1) { levelStartCoord = $doubleValue(castToDouble($getProperty(n, ($clinit_InternalProperties_2() , LEVELMAX)))); if (n.pos.y_0 + n.size_0.y_0 + edgeEndTexturePadding < levelStartCoord) { $addLast_0(castTo(ins.get_0(i), 65).bendPoints, new KVector_1(n.pos.x_0 + n.size_0.x_0 * interpolation, levelStartCoord + nodeBendpointPadding)); } else if (castTo(ins.get_0(i), 65).bendPoints.size_0 > 0) { lastX = castTo($getLast(castTo(ins.get_0(i), 65).bendPoints), 8).x_0; nextX = n.pos.x_0 + n.size_0.x_0 / 2; lastY = castTo($getLast(castTo(ins.get_0(i), 65).bendPoints), 8).y_0; nextY = n.pos.y_0 + n.size_0.y_0 / 2; edgeEndTexturePadding > 0 && $wnd.Math.abs(lastX - nextX) / ($wnd.Math.abs(lastY - nextY) / 40) > 50 && (nextX > lastX?$addLast_0(castTo(ins.get_0(i), 65).bendPoints, new KVector_1(n.pos.x_0 + n.size_0.x_0 * interpolation - edgeEndTexturePadding / 2, n.pos.y_0 + edgeEndTexturePadding / 5.3 + n.size_0.y_0)):$addLast_0(castTo(ins.get_0(i), 65).bendPoints, new KVector_1(n.pos.x_0 + n.size_0.x_0 * interpolation + edgeEndTexturePadding / 2, n.pos.y_0 + edgeEndTexturePadding / 5.3 + n.size_0.y_0))); } $addLast_0(castTo(ins.get_0(i), 65).bendPoints, new KVector_1(n.pos.x_0 + n.size_0.x_0 * interpolation, n.pos.y_0 + n.size_0.y_0)); } else { levelStartCoord = $doubleValue(castToDouble($getProperty(n, ($clinit_InternalProperties_2() , LEVELMIN)))); if (isCycleInducing(castTo(ins.get_0(i), 65), tGraph)) { $addLast_0(castTo(ins.get_0(i), 65).bendPoints, new KVector_1(n.pos.x_0 + n.size_0.x_0 * interpolation, castTo($getLast(castTo(ins.get_0(i), 65).bendPoints), 8).y_0)); } else if (n.pos.y_0 - edgeEndTexturePadding > levelStartCoord) { $addLast_0(castTo(ins.get_0(i), 65).bendPoints, new KVector_1(n.pos.x_0 + n.size_0.x_0 * interpolation, levelStartCoord - nodeBendpointPadding)); } else if (castTo(ins.get_0(i), 65).bendPoints.size_0 > 0) { lastX = castTo($getLast(castTo(ins.get_0(i), 65).bendPoints), 8).x_0; nextX = n.pos.x_0 + n.size_0.x_0 / 2; lastY = castTo($getLast(castTo(ins.get_0(i), 65).bendPoints), 8).y_0; nextY = n.pos.y_0 + n.size_0.y_0 / 2; edgeEndTexturePadding > 0 && $wnd.Math.abs(lastX - nextX) / ($wnd.Math.abs(lastY - nextY) / 40) > 50 && (nextX > lastX?$addLast_0(castTo(ins.get_0(i), 65).bendPoints, new KVector_1(n.pos.x_0 + n.size_0.x_0 * interpolation - edgeEndTexturePadding / 2, n.pos.y_0 - edgeEndTexturePadding / 5.3)):$addLast_0(castTo(ins.get_0(i), 65).bendPoints, new KVector_1(n.pos.x_0 + n.size_0.x_0 * interpolation + edgeEndTexturePadding / 2, n.pos.y_0 - edgeEndTexturePadding / 5.3))); } $addLast_0(castTo(ins.get_0(i), 65).bendPoints, new KVector_1(n.pos.x_0 + n.size_0.x_0 * interpolation, n.pos.y_0)); } } } } function $avoidOverlapSetStartPoints(tGraph, d, nodeBendpointPadding){ var i, interpolation, levelEndCoord, n, n$iterator, num, outs, tar, x_0, y_0; for (n$iterator = $listIterator_2(tGraph.nodes, 0); n$iterator.currentNode != n$iterator.this$01.tail;) { n = castTo($next_9(n$iterator), 40); if ($equals_5(n.label_0, 'SUPER_ROOT')) { continue; } outs = getAllOutgoingEdges(n, tGraph); d == ($clinit_Direction_0() , LEFT_6) || d == RIGHT_6?$sort(outs, new EdgeRouter$lambda$17$Type):$sort(outs, new EdgeRouter$lambda$18$Type); num = outs.array.length; for (i = 0; i < num; i++) { tar = (checkCriticalElementIndex(i, outs.array.length) , castTo(outs.array[i], 65)).target; $equals_5(tar.label_0, 'n11') && Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter_2_classLit; if ($booleanValue(castToBoolean($getProperty(n, ($clinit_InternalProperties_2() , COMPACT_LEVEL_ASCENSION)))) && !isCycleInducing((checkCriticalElementIndex(i, outs.array.length) , castTo(outs.array[i], 65)), tGraph)) { continue; } interpolation = num == 1?0.5:(i + 1) / (num + 1); if (d == LEFT_6) { levelEndCoord = $doubleValue(castToDouble($getProperty(n, LEVELMIN))); y_0 = n.pos.y_0 + n.size_0.y_0 * interpolation; $addFirst_0((checkCriticalElementIndex(i, outs.array.length) , castTo(outs.array[i], 65)).bendPoints, new KVector_1($wnd.Math.min(levelEndCoord, n.pos.x_0 - nodeBendpointPadding), y_0)); $addFirst_0((checkCriticalElementIndex(i, outs.array.length) , castTo(outs.array[i], 65)).bendPoints, new KVector_1(n.pos.x_0, y_0)); } else if (d == RIGHT_6) { levelEndCoord = $doubleValue(castToDouble($getProperty(n, LEVELMAX))) + nodeBendpointPadding; y_0 = n.pos.y_0 + n.size_0.y_0 * interpolation; $addFirst_0((checkCriticalElementIndex(i, outs.array.length) , castTo(outs.array[i], 65)).bendPoints, new KVector_1(levelEndCoord, y_0)); $addFirst_0((checkCriticalElementIndex(i, outs.array.length) , castTo(outs.array[i], 65)).bendPoints, new KVector_1(n.pos.x_0 + n.size_0.x_0, y_0)); } else if (d == UP_1) { levelEndCoord = $doubleValue(castToDouble($getProperty(n, LEVELMIN))); x_0 = n.pos.x_0 + n.size_0.x_0 * interpolation; $addFirst_0((checkCriticalElementIndex(i, outs.array.length) , castTo(outs.array[i], 65)).bendPoints, new KVector_1(x_0, $wnd.Math.min(n.pos.y_0 - nodeBendpointPadding, levelEndCoord))); $addFirst_0((checkCriticalElementIndex(i, outs.array.length) , castTo(outs.array[i], 65)).bendPoints, new KVector_1(x_0, n.pos.y_0)); } else { levelEndCoord = $doubleValue(castToDouble($getProperty(n, LEVELMAX))) + nodeBendpointPadding; x_0 = n.pos.x_0 + n.size_0.x_0 * interpolation; $addFirst_0((checkCriticalElementIndex(i, outs.array.length) , castTo(outs.array[i], 65)).bendPoints, new KVector_1(x_0, levelEndCoord)); $addFirst_0((checkCriticalElementIndex(i, outs.array.length) , castTo(outs.array[i], 65)).bendPoints, new KVector_1(x_0, n.pos.y_0 + n.size_0.y_0)); } } } } function $avoidOverlapSpecialEdges(tGraph, d, nodeBendpointPadding, edgeEndTexturePadding){ var bend1, bend2, bendTriple, curLevel, distictEdges, e, e$iterator, finalCurlevel, first, gap, i, i0, insPerLevel, interpolation, key, last, levelDiff, maxLevel, nextLevelNodes, nodeGaps, outsPerLevel, sideOneEdges, sideTwoEdges, sides, sourceLevel, start_0, targetLevel; sideOneEdges = 0; sideTwoEdges = 0; nodeGaps = new HashMap; maxLevel = castTo($get_17($max_1($map(new StreamImpl(null, new Spliterators$IteratorSpliterator(tGraph.nodes, 16)), new EdgeRouter$lambda$0$Type), new EdgeRouter$0methodref$compare$Type)), 17).value_0 + 1; outsPerLevel = initUnidimensionalArray(I_classLit, $intern_49, 28, maxLevel, 15, 1); insPerLevel = initUnidimensionalArray(I_classLit, $intern_49, 28, maxLevel, 15, 1); for (i0 = 0; i0 < maxLevel; i0++) { outsPerLevel[i0] = 0; insPerLevel[i0] = 0; } distictEdges = castTo($collect_1($distinct(new StreamImpl(null, new Spliterators$IteratorSpliterator(tGraph.edges, 16))), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [($clinit_Collector$Characteristics() , IDENTITY_FINISH)]))), 15); for (e$iterator = distictEdges.iterator_0(); e$iterator.hasNext_0();) { e = castTo(e$iterator.next_1(), 65); sourceLevel = castTo($getProperty(e.source, ($clinit_MrTreeOptions() , TREE_LEVEL_0)), 17).value_0; targetLevel = castTo($getProperty(e.target, TREE_LEVEL_0), 17).value_0; levelDiff = targetLevel - sourceLevel; if (levelDiff > 1) { for (curLevel = sourceLevel + 1; curLevel < targetLevel; curLevel++) { finalCurlevel = curLevel; nextLevelNodes = castTo($collect_1($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(tGraph.nodes, 16)), new EdgeRouter$lambda$2$Type(finalCurlevel)), of_4(new Collectors$21methodref$ctor$Type, new Collectors$20methodref$add$Type, new Collectors$lambda$42$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [IDENTITY_FINISH]))), 15); i = 0; if (d == ($clinit_Direction_0() , LEFT_6) || d == RIGHT_6) { nextLevelNodes.sort_0(new EdgeRouter$lambda$3$Type); for (i = 0; i < nextLevelNodes.size_1(); i++) { interpolation = (curLevel - sourceLevel) / (targetLevel - sourceLevel); if (castTo(nextLevelNodes.get_0(i), 40).pos.y_0 > e.source.pos.y_0 * (1 - interpolation) + e.target.pos.y_0 * interpolation) { break; } } if (nextLevelNodes.size_1() > 0) { start_0 = e.bendPoints.size_0 == 0?$clone_1(e.source.pos):castTo($getLast(e.bendPoints), 8); last = $add_19($clone_1(castTo(nextLevelNodes.get_0(nextLevelNodes.size_1() - 1), 40).pos), castTo(nextLevelNodes.get_0(nextLevelNodes.size_1() - 1), 40).size_0); first = $add_19($clone_1(castTo(nextLevelNodes.get_0(0), 40).pos), castTo(nextLevelNodes.get_0(0), 40).size_0); if (i >= nextLevelNodes.size_1() - 1 && start_0.y_0 > last.y_0 && e.target.pos.y_0 > last.y_0) { continue; } if (i <= 0 && start_0.y_0 < first.x_0 && e.target.pos.y_0 < first.y_0) { continue; } } } else { nextLevelNodes.sort_0(new EdgeRouter$lambda$4$Type); for (i = 0; i < nextLevelNodes.size_1(); i++) { interpolation = (curLevel - sourceLevel) / (targetLevel - sourceLevel); if (castTo(nextLevelNodes.get_0(i), 40).pos.x_0 > e.source.pos.x_0 * (1 - interpolation) + e.target.pos.x_0 * interpolation) { break; } } if (nextLevelNodes.size_1() > 0) { start_0 = e.bendPoints.size_0 == 0?$clone_1(e.source.pos):castTo($getLast(e.bendPoints), 8); last = $add_19($clone_1(castTo(nextLevelNodes.get_0(nextLevelNodes.size_1() - 1), 40).pos), castTo(nextLevelNodes.get_0(nextLevelNodes.size_1() - 1), 40).size_0); first = $add_19($clone_1(castTo(nextLevelNodes.get_0(0), 40).pos), castTo(nextLevelNodes.get_0(0), 40).size_0); if (i >= nextLevelNodes.size_1() - 1 && start_0.x_0 > last.x_0 && e.target.pos.x_0 > last.x_0) { continue; } if (i <= 0 && start_0.x_0 < first.x_0 && e.target.pos.x_0 < first.x_0) { continue; } } } bend1 = new KVector; bend2 = new KVector; $add_7(e.bendPoints, bend1); $add_7(e.bendPoints, bend2); bendTriple = new Triple(bend1, bend2, e); key = or_0(shl_0(curLevel, 32), and_0(i, $intern_69)); if ($containsKey_3(nodeGaps, valueOf_4(key))) { gap = castTo($get_10(nodeGaps, valueOf_4(key)), 675); $add_7(gap.bendPoints, bendTriple); $isHorizontal(gap.d)?$sort_0(gap.bendPoints, new MultiLevelEdgeNodeNodeGap$lambda$0$Type):$sort_0(gap.bendPoints, new MultiLevelEdgeNodeNodeGap$lambda$1$Type); $updateBendPoints(gap); } else { gap = new MultiLevelEdgeNodeNodeGap(i == 0?null:castTo(nextLevelNodes.get_0(i - 1), 40), i == nextLevelNodes.size_1()?null:castTo(nextLevelNodes.get_0(i), 40), bendTriple, tGraph); $put_6(nodeGaps, valueOf_4(key), gap); } if (d == LEFT_6 || d == RIGHT_6) { gap.onFirstNodeSide && gap.neighborTwo.pos.y_0 <= $doubleValue(castToDouble($getProperty(tGraph, ($clinit_InternalProperties_2() , GRAPH_YMIN)))) && ++sideOneEdges; gap.onLastNodeSide && gap.neighborOne.pos.y_0 + gap.neighborOne.size_0.y_0 >= $doubleValue(castToDouble($getProperty(tGraph, ($clinit_InternalProperties_2() , GRAPH_YMAX)))) && ++sideTwoEdges; } else { gap.onFirstNodeSide && gap.neighborTwo.pos.x_0 <= $doubleValue(castToDouble($getProperty(tGraph, ($clinit_InternalProperties_2() , GRAPH_XMIN)))) && ++sideOneEdges; gap.onLastNodeSide && gap.neighborOne.pos.x_0 + gap.neighborOne.size_0.x_0 >= $doubleValue(castToDouble($getProperty(tGraph, ($clinit_InternalProperties_2() , GRAPH_XMAX)))) && ++sideTwoEdges; } } } else if (levelDiff == 0) { $middleToMiddleEdgeRoute(e); } else if (levelDiff < 0) { ++outsPerLevel[sourceLevel]; ++insPerLevel[targetLevel]; sides = $avoidOverlapHandleCycleInducingEdges(e, d, tGraph, new Pair(valueOf_3(sideOneEdges), valueOf_3(sideTwoEdges)), nodeBendpointPadding, edgeEndTexturePadding, new Pair(valueOf_3(insPerLevel[targetLevel]), valueOf_3(outsPerLevel[sourceLevel]))); sideOneEdges = castTo(sides.first, 17).value_0; sideTwoEdges = castTo(sides.second, 17).value_0; } } } function $middleToMiddle(tGraph){ var tEdge, tEdge$iterator; for (tEdge$iterator = $listIterator_2(tGraph.edges, 0); tEdge$iterator.currentNode != tEdge$iterator.this$01.tail;) { tEdge = castTo($next_9(tEdge$iterator), 65); $middleToMiddleEdgeRoute(tEdge); } } function $middleToMiddleEdgeRoute(tEdge){ var bendPoints, source, sourcePoint, target, targetPoint; bendPoints = tEdge.bendPoints; source = tEdge.source; target = tEdge.target; sourcePoint = new KVector_1(source.pos.x_0 + source.size_0.x_0 / 2, source.pos.y_0 + source.size_0.y_0 / 2); targetPoint = new KVector_1(target.pos.x_0 + target.size_0.x_0 / 2, target.pos.y_0 + target.size_0.y_0 / 2); $addNode_0(bendPoints, sourcePoint, bendPoints.header, bendPoints.header.next_0); $addNode_0(bendPoints, targetPoint, bendPoints.tail.prev, bendPoints.tail); toNodeBorder(sourcePoint, castTo($get_7(bendPoints, 1), 8), tEdge.source.size_0); toNodeBorder(targetPoint, castTo($get_7(bendPoints, bendPoints.size_0 - 2), 8), tEdge.target.size_0); } function $process_96(tGraph, progressMonitor){ var e, e$iterator, mode, nodeBendpointPadding, edgeEndTexturePadding, d; progressMonitor.begin('Edge routing', 1); mode = castTo($getProperty(tGraph, ($clinit_MrTreeOptions() , EDGE_ROUTING_MODE_0)), 392); if (mode == ($clinit_EdgeRoutingMode() , MIDDLE_TO_MIDDLE)) { $middleToMiddle(tGraph); } else if (mode == AVOID_OVERLAP) { castTo($get_17($findFirst($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(tGraph.nodes, 16)), new TreeUtil$lambda$0$Type))), 40); nodeBendpointPadding = $doubleValue(castToDouble($getProperty(tGraph, SPACING_EDGE_NODE_0))); edgeEndTexturePadding = $doubleValue(castToDouble($getProperty(tGraph, EDGE_END_TEXTURE_LENGTH_0))); d = castTo($getProperty(tGraph, DIRECTION_0), 88); $avoidOverlapSetStartPoints(tGraph, d, nodeBendpointPadding); $avoidOverlapSpecialEdges(tGraph, d, nodeBendpointPadding, edgeEndTexturePadding); $avoidOverlapSetEndPoints(tGraph, d, nodeBendpointPadding, edgeEndTexturePadding); for (e$iterator = $listIterator_2(tGraph.edges, 0); e$iterator.currentNode != e$iterator.this$01.tail;) { e = castTo($next_9(e$iterator), 65); e.bendPoints.size_0 < 2 && $middleToMiddleEdgeRoute(e); } } progressMonitor.done_1(); } function EdgeRouter(){ $clinit_EdgeRouter(); } function lambda$11_2(x_0){ $clinit_EdgeRouter(); return x_0.pos.x_0 + x_0.size_0.x_0 / 2; } function lambda$13_0(nodeBendpointPadding_0, finalSideTwoEdges_2, x_2){ $clinit_EdgeRouter(); return x_2.pos.x_0 + x_2.size_0.x_0 + nodeBendpointPadding_0 * finalSideTwoEdges_2; } function lambda$15_0(nodeBendpointPadding_0, finalSideOneEdges_2, x_2){ $clinit_EdgeRouter(); return x_2.pos.x_0 - nodeBendpointPadding_0 * finalSideOneEdges_2; } function lambda$17(x_0, y_1){ $clinit_EdgeRouter(); return compare_4((x_0.bendPoints.size_0 == 0?new KVector_1(x_0.target.pos.x_0, x_0.target.pos.y_0):castTo($getFirst(x_0.bendPoints), 8)).y_0, (y_1.bendPoints.size_0 == 0?new KVector_1(y_1.target.pos.x_0, y_1.target.pos.y_0):castTo($getFirst(y_1.bendPoints), 8)).y_0); } function lambda$18(x_0, y_1){ $clinit_EdgeRouter(); return compare_4((x_0.bendPoints.size_0 == 0?new KVector_1(x_0.target.pos.x_0, x_0.target.pos.y_0):castTo($getFirst(x_0.bendPoints), 8)).x_0, (y_1.bendPoints.size_0 == 0?new KVector_1(y_1.target.pos.x_0, y_1.target.pos.y_0):castTo($getFirst(y_1.bendPoints), 8)).x_0); } function lambda$19_0(x_0, y_1){ $clinit_EdgeRouter(); return compare_4((x_0.bendPoints.size_0 == 0?new KVector_1(x_0.source.pos.x_0, x_0.source.pos.y_0):castTo($getLast(x_0.bendPoints), 8)).y_0, (y_1.bendPoints.size_0 == 0?new KVector_1(y_1.source.pos.x_0, y_1.source.pos.y_0):castTo($getLast(y_1.bendPoints), 8)).y_0); } function lambda$2_11(finalCurlevel_0, x_1){ $clinit_EdgeRouter(); return castTo($getProperty(x_1, ($clinit_MrTreeOptions() , TREE_LEVEL_0)), 17).value_0 == finalCurlevel_0; } function lambda$20_0(x_0, y_1){ $clinit_EdgeRouter(); return compare_4((x_0.bendPoints.size_0 == 0?new KVector_1(x_0.source.pos.x_0, x_0.source.pos.y_0):castTo($getLast(x_0.bendPoints), 8)).x_0, (y_1.bendPoints.size_0 == 0?new KVector_1(y_1.source.pos.x_0, y_1.source.pos.y_0):castTo($getLast(y_1.bendPoints), 8)).x_0); } function lambda$3_8(x_0, y_1){ $clinit_EdgeRouter(); return compare_4(x_0.pos.y_0, y_1.pos.y_0); } function lambda$4_10(x_0, y_1){ $clinit_EdgeRouter(); return compare_4(x_0.pos.x_0, y_1.pos.x_0); } function lambda$5_6(x_0){ $clinit_EdgeRouter(); return x_0.pos.y_0 + x_0.size_0.y_0 / 2; } function lambda$7_5(nodeBendpointPadding_0, finalSideTwoEdges_2, x_2){ $clinit_EdgeRouter(); return x_2.pos.y_0 + x_2.size_0.y_0 + nodeBendpointPadding_0 * finalSideTwoEdges_2; } function lambda$9_1(nodeBendpointPadding_0, finalSideOneEdges_2, x_2){ $clinit_EdgeRouter(); return x_2.pos.y_0 - nodeBendpointPadding_0 * finalSideOneEdges_2; } defineClass(1496, 1, $intern_113, EdgeRouter); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_26(graph){ return castTo(graph, 121) , INTERMEDIATE_PROCESSING_CONFIG_2; } ; _.process = function process_92(tGraph, progressMonitor){ $process_96(castTo(tGraph, 121), progressMonitor); } ; var INTERMEDIATE_PROCESSING_CONFIG_2; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter', 1496); function EdgeRouter$0methodref$compare$Type(){ } defineClass(1498, 1, $intern_88, EdgeRouter$0methodref$compare$Type); _.compare_1 = function compare_92(arg0, arg1){ return compare_5(castTo(arg0, 17).value_0, castTo(arg1, 17).value_0); } ; _.equals_0 = function equals_179(other){ return this === other; } ; _.reversed = function reversed_84(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$0methodref$compare$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/0methodref$compare$Type', 1498); function EdgeRouter$1methodref$doubleValue$Type(){ } defineClass(1503, 1, {}, EdgeRouter$1methodref$doubleValue$Type); _.applyAsDouble = function applyAsDouble_8(arg0){ return $doubleValue(castToDouble(arg0)); } ; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$1methodref$doubleValue$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/1methodref$doubleValue$Type', 1503); function EdgeRouter$2methodref$compare$Type(){ } defineClass(1505, 1, $intern_88, EdgeRouter$2methodref$compare$Type); _.compare_1 = function compare_93(arg0, arg1){ return compare_4($doubleValue(castToDouble(arg0)), $doubleValue(castToDouble(arg1))); } ; _.equals_0 = function equals_180(other){ return this === other; } ; _.reversed = function reversed_85(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$2methodref$compare$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/2methodref$compare$Type', 1505); function EdgeRouter$3methodref$compare$Type(){ } defineClass(1507, 1, $intern_88, EdgeRouter$3methodref$compare$Type); _.compare_1 = function compare_94(arg0, arg1){ return compare_4($doubleValue(castToDouble(arg0)), $doubleValue(castToDouble(arg1))); } ; _.equals_0 = function equals_181(other){ return this === other; } ; _.reversed = function reversed_86(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$3methodref$compare$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/3methodref$compare$Type', 1507); function EdgeRouter$4methodref$doubleValue$Type(){ } defineClass(1509, 1, {}, EdgeRouter$4methodref$doubleValue$Type); _.applyAsDouble = function applyAsDouble_9(arg0){ return $doubleValue(castToDouble(arg0)); } ; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$4methodref$doubleValue$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/4methodref$doubleValue$Type', 1509); function EdgeRouter$5methodref$compare$Type(){ } defineClass(1511, 1, $intern_88, EdgeRouter$5methodref$compare$Type); _.compare_1 = function compare_95(arg0, arg1){ return compare_4($doubleValue(castToDouble(arg0)), $doubleValue(castToDouble(arg1))); } ; _.equals_0 = function equals_182(other){ return this === other; } ; _.reversed = function reversed_87(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$5methodref$compare$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/5methodref$compare$Type', 1511); function EdgeRouter$6methodref$compare$Type(){ } defineClass(1513, 1, $intern_88, EdgeRouter$6methodref$compare$Type); _.compare_1 = function compare_96(arg0, arg1){ return compare_4($doubleValue(castToDouble(arg0)), $doubleValue(castToDouble(arg1))); } ; _.equals_0 = function equals_183(other){ return this === other; } ; _.reversed = function reversed_88(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$6methodref$compare$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/6methodref$compare$Type', 1513); function EdgeRouter$lambda$0$Type(){ } defineClass(1497, 1, {}, EdgeRouter$lambda$0$Type); _.apply_0 = function apply_160(arg0){ return $clinit_EdgeRouter() , castTo($getProperty(castTo(arg0, 40), ($clinit_MrTreeOptions() , TREE_LEVEL_0)), 17); } ; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/lambda$0$Type', 1497); function EdgeRouter$lambda$11$Type(){ } defineClass(1508, 1, {}, EdgeRouter$lambda$11$Type); _.apply_0 = function apply_161(arg0){ return lambda$11_2(castTo(arg0, 40)); } ; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$lambda$11$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/lambda$11$Type', 1508); function EdgeRouter$lambda$13$Type(nodeBendpointPadding_0, finalSideTwoEdges_2){ this.nodeBendpointPadding_0 = nodeBendpointPadding_0; this.finalSideTwoEdges_2 = finalSideTwoEdges_2; } defineClass(1510, 1, {}, EdgeRouter$lambda$13$Type); _.apply_0 = function apply_162(arg0){ return lambda$13_0(this.nodeBendpointPadding_0, this.finalSideTwoEdges_2, castTo(arg0, 40)); } ; _.finalSideTwoEdges_2 = 0; _.nodeBendpointPadding_0 = 0; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$lambda$13$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/lambda$13$Type', 1510); function EdgeRouter$lambda$15$Type(nodeBendpointPadding_0, finalSideOneEdges_2){ this.nodeBendpointPadding_0 = nodeBendpointPadding_0; this.finalSideOneEdges_2 = finalSideOneEdges_2; } defineClass(1512, 1, {}, EdgeRouter$lambda$15$Type); _.apply_0 = function apply_163(arg0){ return lambda$15_0(this.nodeBendpointPadding_0, this.finalSideOneEdges_2, castTo(arg0, 40)); } ; _.finalSideOneEdges_2 = 0; _.nodeBendpointPadding_0 = 0; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$lambda$15$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/lambda$15$Type', 1512); function EdgeRouter$lambda$17$Type(){ } defineClass(1514, 1, $intern_88, EdgeRouter$lambda$17$Type); _.compare_1 = function compare_97(arg0, arg1){ return lambda$17(castTo(arg0, 65), castTo(arg1, 65)); } ; _.equals_0 = function equals_184(other){ return this === other; } ; _.reversed = function reversed_89(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$lambda$17$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/lambda$17$Type', 1514); function EdgeRouter$lambda$18$Type(){ } defineClass(1515, 1, $intern_88, EdgeRouter$lambda$18$Type); _.compare_1 = function compare_98(arg0, arg1){ return lambda$18(castTo(arg0, 65), castTo(arg1, 65)); } ; _.equals_0 = function equals_185(other){ return this === other; } ; _.reversed = function reversed_90(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$lambda$18$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/lambda$18$Type', 1515); function EdgeRouter$lambda$19$Type(){ } defineClass(1516, 1, $intern_88, EdgeRouter$lambda$19$Type); _.compare_1 = function compare_99(arg0, arg1){ return lambda$19_0(castTo(arg0, 65), castTo(arg1, 65)); } ; _.equals_0 = function equals_186(other){ return this === other; } ; _.reversed = function reversed_91(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$lambda$19$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/lambda$19$Type', 1516); function EdgeRouter$lambda$2$Type(finalCurlevel_0){ this.finalCurlevel_0 = finalCurlevel_0; } defineClass(1499, 1, $intern_40, EdgeRouter$lambda$2$Type); _.test_0 = function test_119(arg0){ return lambda$2_11(this.finalCurlevel_0, castTo(arg0, 40)); } ; _.finalCurlevel_0 = 0; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/lambda$2$Type', 1499); function EdgeRouter$lambda$20$Type(){ } defineClass(1517, 1, $intern_88, EdgeRouter$lambda$20$Type); _.compare_1 = function compare_100(arg0, arg1){ return lambda$20_0(castTo(arg0, 65), castTo(arg1, 65)); } ; _.equals_0 = function equals_187(other){ return this === other; } ; _.reversed = function reversed_92(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$lambda$20$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/lambda$20$Type', 1517); function EdgeRouter$lambda$3$Type(){ } defineClass(1500, 1, $intern_88, EdgeRouter$lambda$3$Type); _.compare_1 = function compare_101(arg0, arg1){ return lambda$3_8(castTo(arg0, 40), castTo(arg1, 40)); } ; _.equals_0 = function equals_188(other){ return this === other; } ; _.reversed = function reversed_93(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/lambda$3$Type', 1500); function EdgeRouter$lambda$4$Type(){ } defineClass(1501, 1, $intern_88, EdgeRouter$lambda$4$Type); _.compare_1 = function compare_102(arg0, arg1){ return lambda$4_10(castTo(arg0, 40), castTo(arg1, 40)); } ; _.equals_0 = function equals_189(other){ return this === other; } ; _.reversed = function reversed_94(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/lambda$4$Type', 1501); function EdgeRouter$lambda$5$Type(){ } defineClass(1502, 1, {}, EdgeRouter$lambda$5$Type); _.apply_0 = function apply_164(arg0){ return lambda$5_6(castTo(arg0, 40)); } ; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/lambda$5$Type', 1502); function EdgeRouter$lambda$7$Type(nodeBendpointPadding_0, finalSideTwoEdges_2){ this.nodeBendpointPadding_0 = nodeBendpointPadding_0; this.finalSideTwoEdges_2 = finalSideTwoEdges_2; } defineClass(1504, 1, {}, EdgeRouter$lambda$7$Type); _.apply_0 = function apply_165(arg0){ return lambda$7_5(this.nodeBendpointPadding_0, this.finalSideTwoEdges_2, castTo(arg0, 40)); } ; _.finalSideTwoEdges_2 = 0; _.nodeBendpointPadding_0 = 0; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$lambda$7$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/lambda$7$Type', 1504); function EdgeRouter$lambda$9$Type(nodeBendpointPadding_0, finalSideOneEdges_2){ this.nodeBendpointPadding_0 = nodeBendpointPadding_0; this.finalSideOneEdges_2 = finalSideOneEdges_2; } defineClass(1506, 1, {}, EdgeRouter$lambda$9$Type); _.apply_0 = function apply_166(arg0){ return lambda$9_1(this.nodeBendpointPadding_0, this.finalSideOneEdges_2, castTo(arg0, 40)); } ; _.finalSideOneEdges_2 = 0; _.nodeBendpointPadding_0 = 0; var Lorg_eclipse_elk_alg_mrtree_p4route_EdgeRouter$lambda$9$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'EdgeRouter/lambda$9$Type', 1506); function $updateBendPoints(this$static){ var bend1, bend2, bendTmp, count, i, interpolation, p, p$iterator; i = 0; count = this$static.bendPoints.size_0; for (p$iterator = $listIterator_2(this$static.bendPoints, 0); p$iterator.currentNode != p$iterator.this$01.tail;) { p = castTo($next_9(p$iterator), 240); interpolation = (i + 1) / (count + 1); if (!this$static.neighborOne && !this$static.neighborTwo) { return; } else if (!!this$static.neighborOne && !this$static.neighborTwo) { this$static.onLastNodeSide = true; if (this$static.d == ($clinit_Direction_0() , LEFT_6)) { bendTmp = this$static.neighborOne.pos.y_0 + this$static.neighborOne.size_0.y_0 + this$static.nodeBendpointPadding * (i + 1); bend1 = new KVector_1($doubleValue(castToDouble($getProperty(this$static.neighborOne, ($clinit_InternalProperties_2() , LEVELMAX)))) + this$static.nodeBendpointPadding, bendTmp); bend2 = new KVector_1($doubleValue(castToDouble($getProperty(this$static.neighborOne, LEVELMIN))) - this$static.nodeBendpointPadding, bendTmp); } else if (this$static.d == RIGHT_6) { bendTmp = this$static.neighborOne.pos.y_0 + this$static.neighborOne.size_0.y_0 + this$static.nodeBendpointPadding * (i + 1); bend1 = new KVector_1($doubleValue(castToDouble($getProperty(this$static.neighborOne, ($clinit_InternalProperties_2() , LEVELMIN)))) - this$static.nodeBendpointPadding, bendTmp); bend2 = new KVector_1($doubleValue(castToDouble($getProperty(this$static.neighborOne, LEVELMAX))) + this$static.nodeBendpointPadding, bendTmp); } else if (this$static.d == UP_1) { bendTmp = this$static.neighborOne.pos.x_0 + this$static.neighborOne.size_0.x_0 + this$static.nodeBendpointPadding * (i + 1); bend1 = new KVector_1(bendTmp, $doubleValue(castToDouble($getProperty(this$static.neighborOne, ($clinit_InternalProperties_2() , LEVELMAX)))) + this$static.nodeBendpointPadding); bend2 = new KVector_1(bendTmp, $doubleValue(castToDouble($getProperty(this$static.neighborOne, LEVELMIN))) - this$static.nodeBendpointPadding); } else { bendTmp = this$static.neighborOne.pos.x_0 + this$static.neighborOne.size_0.x_0 + this$static.nodeBendpointPadding * (i + 1); bend1 = new KVector_1(bendTmp, $doubleValue(castToDouble($getProperty(this$static.neighborOne, ($clinit_InternalProperties_2() , LEVELMIN)))) - this$static.nodeBendpointPadding); bend2 = new KVector_1(bendTmp, $doubleValue(castToDouble($getProperty(this$static.neighborOne, LEVELMAX))) + this$static.nodeBendpointPadding); } } else if (!!this$static.neighborOne && !!this$static.neighborTwo) { if (this$static.d == ($clinit_Direction_0() , LEFT_6)) { bendTmp = this$static.neighborTwo.pos.y_0 * interpolation + (this$static.neighborOne.pos.y_0 + this$static.neighborOne.size_0.y_0) * (1 - interpolation); bend1 = new KVector_1($doubleValue(castToDouble($getProperty(this$static.neighborOne, ($clinit_InternalProperties_2() , LEVELMAX)))) + this$static.nodeBendpointPadding, bendTmp); bend2 = new KVector_1($doubleValue(castToDouble($getProperty(this$static.neighborOne, LEVELMIN))) - this$static.nodeBendpointPadding, bendTmp); } else if (this$static.d == RIGHT_6) { bendTmp = this$static.neighborTwo.pos.y_0 * interpolation + (this$static.neighborOne.pos.y_0 + this$static.neighborOne.size_0.y_0) * (1 - interpolation); bend1 = new KVector_1($doubleValue(castToDouble($getProperty(this$static.neighborOne, ($clinit_InternalProperties_2() , LEVELMIN)))) - this$static.nodeBendpointPadding, bendTmp); bend2 = new KVector_1($doubleValue(castToDouble($getProperty(this$static.neighborOne, LEVELMAX))) + this$static.nodeBendpointPadding, bendTmp); } else if (this$static.d == UP_1) { bendTmp = this$static.neighborTwo.pos.x_0 * interpolation + (this$static.neighborOne.pos.x_0 + this$static.neighborOne.size_0.x_0) * (1 - interpolation); bend1 = new KVector_1(bendTmp, $doubleValue(castToDouble($getProperty(this$static.neighborOne, ($clinit_InternalProperties_2() , LEVELMAX)))) + this$static.nodeBendpointPadding); bend2 = new KVector_1(bendTmp, $doubleValue(castToDouble($getProperty(this$static.neighborOne, LEVELMIN))) - this$static.nodeBendpointPadding); } else { bendTmp = this$static.neighborTwo.pos.x_0 * interpolation + (this$static.neighborOne.pos.x_0 + this$static.neighborOne.size_0.x_0) * (1 - interpolation); bend1 = new KVector_1(bendTmp, $doubleValue(castToDouble($getProperty(this$static.neighborOne, ($clinit_InternalProperties_2() , LEVELMIN)))) - this$static.nodeBendpointPadding); bend2 = new KVector_1(bendTmp, $doubleValue(castToDouble($getProperty(this$static.neighborOne, LEVELMAX))) + this$static.nodeBendpointPadding); } } else { this$static.onFirstNodeSide = true; if (this$static.d == ($clinit_Direction_0() , LEFT_6)) { bendTmp = this$static.neighborTwo.pos.y_0 - this$static.nodeBendpointPadding * (i + 1); bend1 = new KVector_1($doubleValue(castToDouble($getProperty(this$static.neighborTwo, ($clinit_InternalProperties_2() , LEVELMAX)))) + this$static.nodeBendpointPadding, bendTmp); bend2 = new KVector_1($doubleValue(castToDouble($getProperty(this$static.neighborTwo, LEVELMIN))) - this$static.nodeBendpointPadding, bendTmp); } else if (this$static.d == RIGHT_6) { bendTmp = this$static.neighborTwo.pos.y_0 - this$static.nodeBendpointPadding * (i + 1); bend1 = new KVector_1($doubleValue(castToDouble($getProperty(this$static.neighborTwo, ($clinit_InternalProperties_2() , LEVELMIN)))) - this$static.nodeBendpointPadding, bendTmp); bend2 = new KVector_1($doubleValue(castToDouble($getProperty(this$static.neighborTwo, LEVELMAX))) + this$static.nodeBendpointPadding, bendTmp); } else if (this$static.d == UP_1) { bendTmp = this$static.neighborTwo.pos.x_0 - this$static.nodeBendpointPadding * (i + 1); bend1 = new KVector_1(bendTmp, $doubleValue(castToDouble($getProperty(this$static.neighborTwo, ($clinit_InternalProperties_2() , LEVELMAX)))) + this$static.nodeBendpointPadding); bend2 = new KVector_1(bendTmp, $doubleValue(castToDouble($getProperty(this$static.neighborTwo, LEVELMIN))) - this$static.nodeBendpointPadding); } else { bendTmp = this$static.neighborTwo.pos.x_0 - this$static.nodeBendpointPadding * (i + 1); bend1 = new KVector_1(bendTmp, $doubleValue(castToDouble($getProperty(this$static.neighborTwo, ($clinit_InternalProperties_2() , LEVELMIN)))) - this$static.nodeBendpointPadding); bend2 = new KVector_1(bendTmp, $doubleValue(castToDouble($getProperty(this$static.neighborTwo, LEVELMAX))) + this$static.nodeBendpointPadding); } } castTo(p.first, 8).x_0 = bend1.x_0; castTo(p.first, 8).y_0 = bend1.y_0; p.second.x_0 = bend2.x_0; p.second.y_0 = bend2.y_0; ++i; } } function MultiLevelEdgeNodeNodeGap(neighborOne, neighborTwo, bendTriple, graph){ var bends; this.neighborOne = neighborOne; this.neighborTwo = neighborTwo; bends = new LinkedList; $addNode_0(bends, bendTriple, bends.tail.prev, bends.tail); this.bendPoints = bends; this.d = castTo($getProperty(graph, ($clinit_MrTreeOptions() , DIRECTION_0)), 88); this.nodeBendpointPadding = $doubleValue(castToDouble($getProperty(graph, SPACING_EDGE_NODE_0))); $updateBendPoints(this); } function lambda$0_35(x_0, y_1){ return compare_4(castTo(x_0.third, 65).target.pos.y_0, castTo(y_1.third, 65).target.pos.y_0); } function lambda$1_18(x_0, y_1){ return compare_4(castTo(x_0.third, 65).target.pos.x_0, castTo(y_1.third, 65).target.pos.x_0); } defineClass(675, 1, {675:1}, MultiLevelEdgeNodeNodeGap); _.nodeBendpointPadding = 0; _.onFirstNodeSide = false; _.onLastNodeSide = false; var Lorg_eclipse_elk_alg_mrtree_p4route_MultiLevelEdgeNodeNodeGap_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'MultiLevelEdgeNodeNodeGap', 675); function MultiLevelEdgeNodeNodeGap$lambda$0$Type(){ } defineClass(1943, 1, $intern_88, MultiLevelEdgeNodeNodeGap$lambda$0$Type); _.compare_1 = function compare_103(arg0, arg1){ return lambda$0_35(castTo(arg0, 240), castTo(arg1, 240)); } ; _.equals_0 = function equals_190(other){ return this === other; } ; _.reversed = function reversed_95(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_p4route_MultiLevelEdgeNodeNodeGap$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'MultiLevelEdgeNodeNodeGap/lambda$0$Type', 1943); function MultiLevelEdgeNodeNodeGap$lambda$1$Type(){ } defineClass(1944, 1, $intern_88, MultiLevelEdgeNodeNodeGap$lambda$1$Type); _.compare_1 = function compare_104(arg0, arg1){ return lambda$1_18(castTo(arg0, 240), castTo(arg1, 240)); } ; _.equals_0 = function equals_191(other){ return this === other; } ; _.reversed = function reversed_96(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_mrtree_p4route_MultiLevelEdgeNodeNodeGap$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.mrtree.p4route', 'MultiLevelEdgeNodeNodeGap/lambda$1$Type', 1944); function $clinit_InternalProperties_3(){ $clinit_InternalProperties_3 = emptyMethod; ROOT_NODE = new Property('root'); } var ROOT_NODE; function $clinit_RadialLayoutPhases(){ $clinit_RadialLayoutPhases = emptyMethod; P1_NODE_PLACEMENT = new RadialLayoutPhases('P1_NODE_PLACEMENT', 0); P2_EDGE_ROUTING = new RadialLayoutPhases('P2_EDGE_ROUTING', 1); } function $create_9(this$static){ switch (this$static.ordinal) { case 0: return new EadesRadial; case 1: return new StraightLineEdgeRouter; default:throw toJs(new IllegalArgumentException_0('No implementation is available for the layout processor ' + (this$static.name_0 != null?this$static.name_0:'' + this$static.ordinal))); } } function RadialLayoutPhases(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_76(name_0){ $clinit_RadialLayoutPhases(); return valueOf(($clinit_RadialLayoutPhases$Map() , $MAP_66), name_0); } function values_84(){ $clinit_RadialLayoutPhases(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_radial_RadialLayoutPhases_2_classLit, 1), $intern_37, 501, 0, [P1_NODE_PLACEMENT, P2_EDGE_ROUTING]); } defineClass(501, 22, {3:1, 34:1, 22:1, 501:1, 188:1, 196:1}, RadialLayoutPhases); _.create_1 = function create_23(){ return $create_9(this); } ; _.create_2 = function create_22(){ return $create_9(this); } ; var P1_NODE_PLACEMENT, P2_EDGE_ROUTING; var Lorg_eclipse_elk_alg_radial_RadialLayoutPhases_2_classLit = createForEnum('org.eclipse.elk.alg.radial', 'RadialLayoutPhases', 501, Ljava_lang_Enum_2_classLit, values_84, valueOf_76); function $clinit_RadialLayoutPhases$Map(){ $clinit_RadialLayoutPhases$Map = emptyMethod; $MAP_66 = createValueOfMap(($clinit_RadialLayoutPhases() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_radial_RadialLayoutPhases_2_classLit, 1), $intern_37, 501, 0, [P1_NODE_PLACEMENT, P2_EDGE_ROUTING]))); } var $MAP_66; function $assembleAlgorithm(this$static, layoutGraph){ var algorithm, configuration; $reset_4(this$static.algorithmAssembler); $setPhase(this$static.algorithmAssembler, ($clinit_RadialLayoutPhases() , P1_NODE_PLACEMENT), P1_NODE_PLACEMENT); $setPhase(this$static.algorithmAssembler, P2_EDGE_ROUTING, P2_EDGE_ROUTING); configuration = new LayoutProcessorConfiguration; $addBefore(configuration, P2_EDGE_ROUTING, ($clinit_IntermediateProcessorStrategy_1() , OVERLAP_REMOVAL)); maskUndefined($getProperty_0(layoutGraph, ($clinit_RadialOptions() , COMPACTOR_0))) !== maskUndefined(($clinit_CompactionStrategy_0() , NONE_12)) && $addBefore(configuration, P2_EDGE_ROUTING, COMPACTION_1); $booleanValue(castToBoolean($getProperty_0(layoutGraph, ROTATE_0))) && $addBefore(configuration, P2_EDGE_ROUTING, ROTATION_0); $addBefore(configuration, P2_EDGE_ROUTING, GRAPH_SIZE_CALCULATION); $booleanValue(castToBoolean($getProperty_0(layoutGraph, ROTATION_OUTGOING_EDGE_ANGLES_0))) && $addAfter(configuration, P2_EDGE_ROUTING, OUTGOING_EDGE_ANGLES); $addProcessorConfiguration(this$static.algorithmAssembler, configuration); algorithm = $build_0(this$static.algorithmAssembler, layoutGraph); return algorithm; } function RadialLayoutProvider(){ this.algorithmAssembler = new AlgorithmAssembler(Lorg_eclipse_elk_alg_radial_RadialLayoutPhases_2_classLit); } defineClass(1113, 205, $intern_96, RadialLayoutProvider); _.layout = function layout_4(layoutGraph, progressMonitor){ var algorithm, builder, layoutRadius, processor, processor$iterator, root; algorithm = $assembleAlgorithm(this, layoutGraph); progressMonitor.begin('Radial layout', algorithm.array.length); $booleanValue(castToBoolean($getProperty_0(layoutGraph, ($clinit_RadialOptions() , OMIT_NODE_MICRO_LAYOUT_2)))) || $execute((builder = new NodeMicroLayout(($clinit_ElkGraphAdapters() , new ElkGraphAdapters$ElkGraphAdapter(layoutGraph))) , builder)); root = findRoot(layoutGraph); $setProperty_1(layoutGraph, ($clinit_InternalProperties_3() , ROOT_NODE), root); if (!root) { throw toJs(new IllegalArgumentException_0('The given graph is not a tree!')); } layoutRadius = $doubleValue(castToDouble($getProperty_0(layoutGraph, RADIUS_0))); layoutRadius == 0 && (layoutRadius = findLargestNodeInGraph(layoutGraph)); $setProperty_1(layoutGraph, RADIUS_0, layoutRadius); for (processor$iterator = new ArrayList$1($assembleAlgorithm(this, layoutGraph)); processor$iterator.i < processor$iterator.this$01.array.length;) { processor = castTo($next_6(processor$iterator), 47); processor.process(layoutGraph, progressMonitor.subTask(1)); } progressMonitor.done_1(); } ; var Lorg_eclipse_elk_alg_radial_RadialLayoutProvider_2_classLit = createForClass('org.eclipse.elk.alg.radial', 'RadialLayoutProvider', 1113); function findLargestNodeInGraph(graph){ var child, child$iterator, diameter, height, largestChild, largestChildSize, width_0; largestChildSize = 0; for (child$iterator = new AbstractEList$EIterator((!graph.children && (graph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, graph, 10, 11)) , graph.children)); child$iterator.cursor != child$iterator.this$01_2.size_1();) { child = castTo($doNext(child$iterator), 27); width_0 = child.width_0; height = child.height; diameter = $wnd.Math.sqrt(width_0 * width_0 + height * height); largestChildSize = $wnd.Math.max(diameter, largestChildSize); largestChild = findLargestNodeInGraph(child); largestChildSize = $wnd.Math.max(largestChild, largestChildSize); } return largestChildSize; } function findRoot(graph){ var child, child$iterator, incomingEdges; for (child$iterator = new AbstractEList$EIterator((!graph.children && (graph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, graph, 10, 11)) , graph.children)); child$iterator.cursor != child$iterator.this$01_2.size_1();) { child = castTo($doNext(child$iterator), 27); incomingEdges = allIncomingEdges(child); if (!$hasNext_1(new Iterators$ConcatenatedIterator(transform_2(incomingEdges.val$inputs1.iterator_0(), new Iterables$10)))) { return child; } } return null; } function findRootOfNode(elkNode){ var parent_0; parent_0 = getTreeParent(elkNode); return !parent_0?elkNode:findRootOfNode(parent_0); } function getNextLevelNodeSet(nodes){ var nextLevelSet, node, node$iterator, successors; successors = new HashSet; for (node$iterator = new ArrayList$1(nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 27); nextLevelSet = getSuccessorSet(node); $addAll(successors, nextLevelSet); } return successors; } function getNextLevelNodes(nodes){ var nextLevelNodes, node, node$iterator, successors; successors = new ArrayList; for (node$iterator = nodes.iterator_0(); node$iterator.hasNext_0();) { node = castTo(node$iterator.next_1(), 27); nextLevelNodes = getSuccessors(node); $addAll_2(successors, nextLevelNodes); } return successors; } function getNumberOfLeaves(node){ var child, child$iterator, leafs, successors; leafs = 0; successors = getSuccessors(node); if (successors.array.length == 0) { return 1; } else { for (child$iterator = new ArrayList$1(successors); child$iterator.i < child$iterator.this$01.array.length;) { child = castTo($next_6(child$iterator), 27); leafs += getNumberOfLeaves(child); } } return leafs; } function getSuccessorSet(node){ var children, old, outgoingEdge, outgoingEdge$iterator, successors, target; successors = new HashSet; children = new HashSet_1((!node.children && (node.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, node, 10, 11)) , node.children)); for (outgoingEdge$iterator = new Iterators$ConcatenatedIterator(transform_2(allOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(outgoingEdge$iterator);) { outgoingEdge = castTo($next_0(outgoingEdge$iterator), 74); if (!instanceOf($get_20((!outgoingEdge.sources && (outgoingEdge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, outgoingEdge, 4, 7)) , outgoingEdge.sources), 0), 193)) { target = connectableShapeToNode(castTo($get_20((!outgoingEdge.targets && (outgoingEdge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, outgoingEdge, 5, 8)) , outgoingEdge.targets), 0), 84)); children.map_0.containsKey(target) || (old = successors.map_0.put(target, successors) , old == null); } } return successors; } function getSuccessors(node){ var children, outgoingEdge, outgoingEdge$iterator, successors, target; successors = new ArrayList; children = new HashSet_1((!node.children && (node.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, node, 10, 11)) , node.children)); for (outgoingEdge$iterator = new Iterators$ConcatenatedIterator(transform_2(allOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(outgoingEdge$iterator);) { outgoingEdge = castTo($next_0(outgoingEdge$iterator), 74); if (!instanceOf($get_20((!outgoingEdge.sources && (outgoingEdge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, outgoingEdge, 4, 7)) , outgoingEdge.sources), 0), 193)) { target = connectableShapeToNode(castTo($get_20((!outgoingEdge.targets && (outgoingEdge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, outgoingEdge, 5, 8)) , outgoingEdge.targets), 0), 84)); children.map_0.containsKey(target) || (push_1(successors.array, target) , true); } } return successors; } function getTreeParent(node){ var edgeFromParent, iterator; iterator = allIncomingEdges(node); if (isEmpty_13(iterator)) { return null; } else { edgeFromParent = (checkNotNull(iterator) , castTo(get_23(new Iterators$ConcatenatedIterator(transform_2(iterator.val$inputs1.iterator_0(), new Iterables$10))), 74)); return connectableShapeToNode(castTo($get_20((!edgeFromParent.sources && (edgeFromParent.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edgeFromParent, 4, 7)) , edgeFromParent.sources), 0), 84)); } } function lambda$0_36(nodeOffsetY_0, radialOffset_2, node1_2, node2_3){ var arc1, arc2, position1, position2, xPos1, xPos2, yPos1, yPos2; position1 = castTo($getProperty_0(node1_2, ($clinit_CoreOptions() , POSITION_2)), 8); xPos1 = position1.x_0; yPos1 = position1.y_0 + nodeOffsetY_0; arc1 = $wnd.Math.atan2(yPos1, xPos1); arc1 < 0 && (arc1 += $intern_126); arc1 += radialOffset_2; arc1 > $intern_126 && (arc1 -= $intern_126); position2 = castTo($getProperty_0(node2_3, POSITION_2), 8); xPos2 = position2.x_0; yPos2 = position2.y_0 + nodeOffsetY_0; arc2 = $wnd.Math.atan2(yPos2, xPos2); arc2 < 0 && (arc2 += $intern_126); arc2 += radialOffset_2; arc2 > $intern_126 && (arc2 -= $intern_126); return $clinit_DoubleMath() , checkNonNegative(1.0E-10) , $wnd.Math.abs(arc1 - arc2) <= 1.0E-10 || arc1 == arc2 || isNaN(arc1) && isNaN(arc2)?0:arc1 < arc2?-1:arc1 > arc2?1:compare_0(isNaN(arc1), isNaN(arc2)); } function RadialUtil$lambda$0$Type(radialOffset_2){ this.nodeOffsetY_0 = 0; this.radialOffset_2 = radialOffset_2; } defineClass(556, 1, $intern_88, RadialUtil$lambda$0$Type); _.compare_1 = function compare_105(arg0, arg1){ return lambda$0_36(this.nodeOffsetY_0, this.radialOffset_2, castTo(arg0, 27), castTo(arg1, 27)); } ; _.equals_0 = function equals_192(other){ return this === other; } ; _.reversed = function reversed_97(){ return new Comparators$ReversedComparator(this); } ; _.nodeOffsetY_0 = 0; _.radialOffset_2 = 0; var Lorg_eclipse_elk_alg_radial_RadialUtil$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.radial', 'RadialUtil/lambda$0$Type', 556); function $process_97(graph, progressMonitor){ var additionalX, additionalY, dx, dy, height, height0, margins, maxXPos, maxYPos, minXPos, minYPos, node, node$iterator, node$iterator0, offset, padding, posX, posY, root, rootMargins, rootX, rootY, width_0, width0; progressMonitor.begin('Calculate Graph Size', 1); progressMonitor.logGraph(graph, 'Before'); minXPos = $intern_98; minYPos = $intern_98; maxXPos = $intern_127; maxYPos = $intern_127; for (node$iterator0 = new AbstractEList$EIterator((!graph.children && (graph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, graph, 10, 11)) , graph.children)); node$iterator0.cursor != node$iterator0.this$01_2.size_1();) { node = castTo($doNext(node$iterator0), 27); posX = node.x_0; posY = node.y_0; width0 = node.width_0; height0 = node.height; margins = castTo($getProperty_0(node, ($clinit_CoreOptions() , MARGINS_0)), 140); minXPos = $wnd.Math.min(minXPos, posX - margins.left); minYPos = $wnd.Math.min(minYPos, posY - margins.top_0); maxXPos = $wnd.Math.max(maxXPos, posX + width0 + margins.right); maxYPos = $wnd.Math.max(maxYPos, posY + height0 + margins.bottom); } padding = castTo($getProperty_0(graph, ($clinit_CoreOptions() , PADDING_6)), 107); offset = new KVector_1(minXPos - padding.left, minYPos - padding.top_0); width_0 = maxXPos - minXPos + (padding.left + padding.right); height = maxYPos - minYPos + (padding.top_0 + padding.bottom); if ($booleanValue(castToBoolean($getProperty_0(graph, ($clinit_RadialOptions() , CENTER_ON_ROOT_0))))) { root = castTo($getProperty_0(graph, ($clinit_InternalProperties_3() , ROOT_NODE)), 27); rootMargins = castTo($getProperty_0(root, MARGINS_0), 140); rootX = root.x_0 + root.width_0 / 2 + (rootMargins.left + rootMargins.right) / 2 - offset.x_0; rootY = root.y_0 + root.height / 2 + (rootMargins.top_0 + rootMargins.bottom) / 2 - offset.y_0; dx = width_0 - rootX; dy = height - rootY; if (dx < width_0 / 2) { additionalX = dx - rootX; width_0 += additionalX; offset.x_0 -= additionalX; } else { additionalX = rootX - dx; width_0 += additionalX; } if (dy < height / 2) { additionalY = dy - rootY; height += additionalY; offset.y_0 -= additionalY; } else { additionalY = rootY - dy; height += additionalY; } } for (node$iterator = new AbstractEList$EIterator((!graph.children && (graph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, graph, 10, 11)) , graph.children)); node$iterator.cursor != node$iterator.this$01_2.size_1();) { node = castTo($doNext(node$iterator), 27); $setX_2(node, node.x_0 - offset.x_0); $setY_3(node, node.y_0 - offset.y_0); } if (!$booleanValue(castToBoolean($getProperty_0(graph, NODE_SIZE_FIXED_GRAPH_SIZE_3)))) { $setWidth_0(graph, width_0); $setHeight_0(graph, height); } $setProperty_1(graph, CHILD_AREA_WIDTH, width_0 - (padding.left + padding.right)); $setProperty_1(graph, CHILD_AREA_HEIGHT, height - (padding.top_0 + padding.bottom)); progressMonitor.logGraph(graph, 'After'); } function CalculateGraphSize(){ } defineClass(1395, 1, $intern_105, CalculateGraphSize); _.process = function process_93(graph, progressMonitor){ $process_97(castTo(graph, 27), progressMonitor); } ; var Lorg_eclipse_elk_alg_radial_intermediate_CalculateGraphSize_2_classLit = createForClass('org.eclipse.elk.alg.radial.intermediate', 'CalculateGraphSize', 1395); function $process_98(graph){ var angle, edge, edge$iterator, edgeVector, end, root, start_0; root = castTo($getProperty_0(graph, ($clinit_InternalProperties_3() , ROOT_NODE)), 27); for (edge$iterator = new AbstractEList$EIterator((!root.outgoingEdges && (root.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, root, 7, 4)) , root.outgoingEdges)); edge$iterator.cursor != edge$iterator.this$01_2.size_1();) { edge = castTo($doNext(edge$iterator), 74); start_0 = new KVector_1(castTo($get_20((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections), 0), 166).startX, castTo($get_20((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections), 0), 166).startY); end = new KVector_1(castTo($get_20((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections), 0), 166).endX, castTo($get_20((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections), 0), 166).endY); edgeVector = new KVector_1(end.x_0 - start_0.x_0, end.y_0 - start_0.y_0); angle = $wnd.Math.atan2(edgeVector.y_0, edgeVector.x_0); castTo($get_20((!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets), 0), 84).setProperty(($clinit_RadialOptions() , ROTATION_TARGET_ANGLE_0), angle); } } function EdgeAngleCalculator(){ } defineClass(1396, 1, $intern_105, EdgeAngleCalculator); _.process = function process_94(graph, progressMonitor){ $process_98(castTo(graph, 27)); } ; var Lorg_eclipse_elk_alg_radial_intermediate_EdgeAngleCalculator_2_classLit = createForClass('org.eclipse.elk.alg.radial.intermediate', 'EdgeAngleCalculator', 1396); function $clinit_IntermediateProcessorStrategy_1(){ $clinit_IntermediateProcessorStrategy_1 = emptyMethod; OVERLAP_REMOVAL = new IntermediateProcessorStrategy_1('OVERLAP_REMOVAL', 0); COMPACTION_1 = new IntermediateProcessorStrategy_1('COMPACTION', 1); ROTATION_0 = new IntermediateProcessorStrategy_1('ROTATION', 2); GRAPH_SIZE_CALCULATION = new IntermediateProcessorStrategy_1('GRAPH_SIZE_CALCULATION', 3); OUTGOING_EDGE_ANGLES = new IntermediateProcessorStrategy_1('OUTGOING_EDGE_ANGLES', 4); } function IntermediateProcessorStrategy_1(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_77(name_0){ $clinit_IntermediateProcessorStrategy_1(); return valueOf(($clinit_IntermediateProcessorStrategy$Map_1() , $MAP_67), name_0); } function values_85(){ $clinit_IntermediateProcessorStrategy_1(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_radial_intermediate_IntermediateProcessorStrategy_2_classLit, 1), $intern_37, 368, 0, [OVERLAP_REMOVAL, COMPACTION_1, ROTATION_0, GRAPH_SIZE_CALCULATION, OUTGOING_EDGE_ANGLES]); } defineClass(368, 22, {3:1, 34:1, 22:1, 368:1, 196:1}, IntermediateProcessorStrategy_1); _.create_1 = function create_24(){ switch (this.ordinal) { case 0: return new RadiusExtensionOverlapRemoval; case 1: return new GeneralCompactor; case 2: return new GeneralRotator; case 3: return new CalculateGraphSize; case 4: return new EdgeAngleCalculator; default:throw toJs(new IllegalArgumentException_0('No implementation is available for the layout processor ' + (this.name_0 != null?this.name_0:'' + this.ordinal))); } } ; var COMPACTION_1, GRAPH_SIZE_CALCULATION, OUTGOING_EDGE_ANGLES, OVERLAP_REMOVAL, ROTATION_0; var Lorg_eclipse_elk_alg_radial_intermediate_IntermediateProcessorStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.radial.intermediate', 'IntermediateProcessorStrategy', 368, Ljava_lang_Enum_2_classLit, values_85, valueOf_77); function $clinit_IntermediateProcessorStrategy$Map_1(){ $clinit_IntermediateProcessorStrategy$Map_1 = emptyMethod; $MAP_67 = createValueOfMap(($clinit_IntermediateProcessorStrategy_1() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_radial_intermediate_IntermediateProcessorStrategy_2_classLit, 1), $intern_37, 368, 0, [OVERLAP_REMOVAL, COMPACTION_1, ROTATION_0, GRAPH_SIZE_CALCULATION, OUTGOING_EDGE_ANGLES]))); } var $MAP_67; function $contractLayer(this$static, layerNodes, isContracting){ var length_0, node, node$iterator, parentX, parentY, treeParent, x_0, xPos, y_0, yPos; for (node$iterator = layerNodes.iterator_0(); node$iterator.hasNext_0();) { node = castTo(node$iterator.next_1(), 27); xPos = node.x_0 + node.width_0 / 2; yPos = node.y_0 + node.height / 2; treeParent = this$static.root_0; parentX = treeParent.x_0 + treeParent.width_0 / 2; parentY = treeParent.y_0 + treeParent.height / 2; x_0 = xPos - parentX; y_0 = yPos - parentY; length_0 = $wnd.Math.sqrt(x_0 * x_0 + y_0 * y_0); x_0 *= this$static.compactionStep / length_0; y_0 *= this$static.compactionStep / length_0; if (isContracting) { xPos -= x_0; yPos -= y_0; } else { xPos += x_0; yPos += y_0; } $setX_2(node, xPos - node.width_0 / 2); $setY_3(node, yPos - node.height / 2); } } function $overlap_1(this$static, node1, node2){ var height1, height2, width1, width2, x1, x2, y1, y2; x1 = node1.x_0 - this$static.spacing / 2; x2 = node2.x_0 - this$static.spacing / 2; y1 = node1.y_0 - this$static.spacing / 2; y2 = node2.y_0 - this$static.spacing / 2; width1 = node1.width_0 + this$static.spacing; width2 = node2.width_0 + this$static.spacing; height1 = node1.height + this$static.spacing; height2 = node2.height + this$static.spacing; if (x1 < x2 + width2 && x2 < x1 && y1 < y2 + height2 && y2 < y1) { return true; } else if (x2 < x1 + width1 && x1 < x2 && y2 < y1 + height1 && y1 < y2) { return true; } else if (x1 < x2 + width2 && x2 < x1 && y1 < y2 && y2 < y1 + height1) { return true; } else if (x2 < x1 + width1 && x1 < x2 && y1 < y2 + height2 && y2 < y1) { return true; } return false; } function $overlapLayer(this$static, nodes){ var i, overlapping; overlapping = false; if (nodes.size_1() < 2) { return false; } for (i = 0; i < nodes.size_1(); i++) { i < nodes.size_1() - 1?(overlapping = overlapping | $overlap_1(this$static, castTo(nodes.get_0(i), 27), castTo(nodes.get_0(i + 1), 27))):(overlapping = overlapping | $overlap_1(this$static, castTo(nodes.get_0(i), 27), castTo(nodes.get_0(0), 27))); } return overlapping; } function $setCompactionStep(this$static, compactionStep){ this$static.compactionStep = compactionStep; } function $setRoot(this$static, root){ this$static.root_0 = root; } function $setSpacing(this$static, spacing){ this$static.spacing = spacing; } defineClass(653, 1, {}); _.compactionStep = 1; _.spacing = 0; var Lorg_eclipse_elk_alg_radial_intermediate_compaction_AbstractRadiusExtensionCompaction_2_classLit = createForClass('org.eclipse.elk.alg.radial.intermediate.compaction', 'AbstractRadiusExtensionCompaction', 653); function $constructContour(this$static, nodes){ var node, node$iterator, successors; for (node$iterator = new ArrayList$1(nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 27); $put(this$static.leftContour, node, node); $put(this$static.rightContour, node, node); successors = getSuccessors(node); if (successors.array.length != 0) { !!this$static.sorter && this$static.sorter.sort_1(successors); $put(this$static.leftContour, node, (checkCriticalElementIndex(0, successors.array.length) , castTo(successors.array[0], 27))); $put(this$static.rightContour, node, castTo($get_11(successors, successors.array.length - 1), 27)); while (getNextLevelNodes(successors).array.length != 0) { successors = getNextLevelNodes(successors); !!this$static.sorter && this$static.sorter.sort_1(successors); $put(this$static.leftContour, node, (checkCriticalElementIndex(0, successors.array.length) , castTo(successors.array[0], 27))); $put(this$static.rightContour, node, castTo($get_11(successors, successors.array.length - 1), 27)); } } } } function $contourOverlap(this$static, neighbourWedgeParent, node, left){ var contour, contourNode, contourNode$iterator; contour = left?castTo($get(this$static.leftContour, neighbourWedgeParent), 21):castTo($get(this$static.rightContour, neighbourWedgeParent), 21); for (contourNode$iterator = contour.iterator_0(); contourNode$iterator.hasNext_0();) { contourNode = castTo(contourNode$iterator.next_1(), 27); if ($overlap_1(this$static, node, contourNode)) { return true; } } return false; } function $contractWedge(this$static, predecessors, radialPredecessor, radialSuccessor, currentRadiusNodes){ var isOverlapping, nextLevelNodes, wasContracted; isOverlapping = $overlapping(this$static, predecessors, radialPredecessor, radialSuccessor, currentRadiusNodes); wasContracted = false; while (!isOverlapping) { $contractLayer(this$static, currentRadiusNodes, true); wasContracted = true; isOverlapping = $overlapping(this$static, predecessors, radialPredecessor, radialSuccessor, currentRadiusNodes); } wasContracted && $contractLayer(this$static, currentRadiusNodes, false); nextLevelNodes = getNextLevelNodes(currentRadiusNodes); if (nextLevelNodes.array.length != 0) { !!this$static.sorter && this$static.sorter.sort_1(nextLevelNodes); $contractWedge(this$static, currentRadiusNodes, radialPredecessor, radialSuccessor, nextLevelNodes); } } function $overlapping(this$static, predecessors, leftParent, rightParent, layerNodes){ var firstNode, lastNode, predecessor, predecessor$iterator, sortedNode, sortedNode$iterator; !!this$static.sorter && this$static.sorter.sort_1(layerNodes); firstNode = castTo(layerNodes.get_0(0), 27); if ($contourOverlap(this$static, leftParent, firstNode, false)) { return true; } lastNode = castTo(layerNodes.get_0(layerNodes.size_1() - 1), 27); if ($contourOverlap(this$static, rightParent, lastNode, true)) { return true; } if ($overlapLayer(this$static, layerNodes)) { return true; } for (sortedNode$iterator = layerNodes.iterator_0(); sortedNode$iterator.hasNext_0();) { sortedNode = castTo(sortedNode$iterator.next_1(), 27); for (predecessor$iterator = predecessors.iterator_0(); predecessor$iterator.hasNext_0();) { predecessor = castTo(predecessor$iterator.next_1(), 27); if ($overlap_1(this$static, sortedNode, predecessor)) { return true; } } } return false; } function AnnulusWedgeCompaction(){ this.leftContour = new HashMultimap; this.rightContour = new HashMultimap; } defineClass(1834, 653, {}, AnnulusWedgeCompaction); _.compact_0 = function compact_2(graph){ var i, k, leftParent, nodeAsList, rightParent, rootList, spacing, stepSize, successors; this.root = castTo($getProperty_0(graph, ($clinit_InternalProperties_3() , ROOT_NODE)), 27); $setRoot(this, this.root); this.sorter = $create_13(castTo($getProperty_0(graph, ($clinit_RadialOptions() , SORTER_0)), 300)); stepSize = castTo($getProperty_0(graph, COMPACTION_STEP_SIZE_0), 17); !!stepSize && $setCompactionStep(this, stepSize.value_0); spacing = castToDouble($getProperty_0(graph, ($clinit_CoreOptions() , SPACING_NODE_NODE_6))); $setSpacing(this, (checkCriticalNotNull(spacing) , spacing)); successors = getSuccessors(this.root); !!this.sorter && this.sorter.sort_1(successors); $constructContour(this, successors); rootList = new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_graph_ElkNode_2_classLit, 1), $intern_128, 27, 0, [this.root])); for (k = 0; k < 2; k++) { for (i = 0; i < successors.array.length; i++) { nodeAsList = new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_graph_ElkNode_2_classLit, 1), $intern_128, 27, 0, [(checkCriticalElementIndex(i, successors.array.length) , castTo(successors.array[i], 27))])); rightParent = i < successors.array.length - 1?(checkCriticalElementIndex(i + 1, successors.array.length) , castTo(successors.array[i + 1], 27)):(checkCriticalElementIndex(0, successors.array.length) , castTo(successors.array[0], 27)); leftParent = i == 0?castTo($get_11(successors, successors.array.length - 1), 27):(checkCriticalElementIndex(i - 1, successors.array.length) , castTo(successors.array[i - 1], 27)); $contractWedge(this, (checkCriticalElementIndex(i, successors.array.length) , castTo(successors.array[i], 27) , rootList), leftParent, rightParent, nodeAsList); } } } ; var Lorg_eclipse_elk_alg_radial_intermediate_compaction_AnnulusWedgeCompaction_2_classLit = createForClass('org.eclipse.elk.alg.radial.intermediate.compaction', 'AnnulusWedgeCompaction', 1834); function $process_99(graph, progressMonitor){ var compactor; progressMonitor.begin('General Compactor', 1); compactor = $create_11(castTo($getProperty_0(graph, ($clinit_RadialOptions() , COMPACTOR_0)), 393)); compactor.compact_0(graph); } function GeneralCompactor(){ } defineClass(1393, 1, $intern_105, GeneralCompactor); _.process = function process_95(graph, progressMonitor){ $process_99(castTo(graph, 27), progressMonitor); } ; var Lorg_eclipse_elk_alg_radial_intermediate_compaction_GeneralCompactor_2_classLit = createForClass('org.eclipse.elk.alg.radial.intermediate.compaction', 'GeneralCompactor', 1393); function $calculateRadius(this$static, node){ var radius, root, rootX, rootY, vectorX, vectorY, xPos, yPos; xPos = node.x_0; yPos = node.y_0; root = this$static.root_0; rootX = root.x_0; rootY = root.y_0; vectorX = xPos - rootX; vectorY = yPos - rootY; radius = $wnd.Math.sqrt(vectorX * vectorX + vectorY * vectorY); return radius; } function $contract(this$static, nodes){ var isOverlapping, nextLevelNodes, wasContracted; if (nodes.array.length != 0) { isOverlapping = $overlapping_0(this$static, nodes); wasContracted = false; while (!isOverlapping) { $contractLayer(this$static, nodes, true); wasContracted = true; isOverlapping = $overlapping_0(this$static, nodes); } wasContracted && $contractLayer(this$static, nodes, false); nextLevelNodes = getNextLevelNodes(nodes); !!this$static.sorter && this$static.sorter.sort_1(nextLevelNodes); this$static.lastRadius = $calculateRadius(this$static, (checkCriticalElementIndex(0, nodes.array.length) , castTo(nodes.array[0], 27))); $contract(this$static, nextLevelNodes); } } function $overlapping_0(this$static, nodes){ var node, node$iterator, parent_0; if ($overlapLayer(this$static, nodes)) { return true; } for (node$iterator = new ArrayList$1(nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 27); parent_0 = getTreeParent(node); if ($overlap_1(this$static, node, parent_0)) { return true; } if ($calculateRadius(this$static, node) - this$static.spacing <= this$static.lastRadius) { return true; } } return false; } function RadialCompaction(){ } defineClass(1833, 653, {}, RadialCompaction); _.compact_0 = function compact_3(graph){ var firstLevelNodes, root, spacing, stepSize; root = castTo($getProperty_0(graph, ($clinit_InternalProperties_3() , ROOT_NODE)), 27); this.root_0 = root; this.sorter = $create_13(castTo($getProperty_0(graph, ($clinit_RadialOptions() , SORTER_0)), 300)); stepSize = castTo($getProperty_0(graph, COMPACTION_STEP_SIZE_0), 17); !!stepSize && $setCompactionStep(this, stepSize.value_0); spacing = castToDouble($getProperty_0(graph, ($clinit_CoreOptions() , SPACING_NODE_NODE_6))); $setSpacing(this, (checkCriticalNotNull(spacing) , spacing)); firstLevelNodes = getSuccessors(root); !!this.sorter && this.sorter.sort_1(firstLevelNodes); $contract(this, firstLevelNodes); } ; _.lastRadius = 0; var Lorg_eclipse_elk_alg_radial_intermediate_compaction_RadialCompaction_2_classLit = createForClass('org.eclipse.elk.alg.radial.intermediate.compaction', 'RadialCompaction', 1833); function $isCrossing(this$static, node1, node2){ var b1, b2, m1, m2, node1Vector, node2Vector, position1, position2, rootX, rootY, xCut, xPos1, xPos2, yPos1, yPos2; rootX = this$static.root.x_0 + this$static.root.width_0 / 2; rootY = this$static.root.x_0 + this$static.root.width_0 / 2; xPos1 = node1.x_0 + node1.width_0 / 2; yPos1 = node1.y_0 + node1.height / 2; node1Vector = new KVector_1(xPos1, yPos1); position1 = castTo($getProperty_0(node1, ($clinit_CoreOptions() , POSITION_2)), 8); position1.x_0 = position1.x_0 + rootX; position1.y_0 = position1.y_0 + rootY; m1 = (node1Vector.y_0 - position1.y_0) / (node1Vector.x_0 - position1.x_0); b1 = node1Vector.y_0 - m1 * node1Vector.x_0; xPos2 = node2.x_0 + node2.width_0 / 2; yPos2 = node2.y_0 + node2.height / 2; node2Vector = new KVector_1(xPos2, yPos2); position2 = castTo($getProperty_0(node2, POSITION_2), 8); position2.x_0 = position2.x_0 + rootX; position2.y_0 = position2.y_0 + rootY; m2 = (node2Vector.y_0 - position2.y_0) / (node2Vector.x_0 - position2.x_0); b2 = node2Vector.y_0 - m2 * node2Vector.x_0; xCut = (b1 - b2) / (m2 - m1); if (position1.x_0 < xCut && node1Vector.x_0 < xCut || xCut < position1.x_0 && xCut < node1Vector.x_0) { return false; } else if (position2.x_0 < xCut && node2Vector.x_0 < xCut || xCut < position2.x_0 && xCut < node2Vector.x_0) { return false; } return true; } function CrossingMinimizationPosition(){ } defineClass(1842, 1, {}, CrossingMinimizationPosition); _.evaluate = function evaluate(rootNode){ var crossings, i, k, node1, node1$iterator, nodes; this.root = rootNode; crossings = 0; nodes = getSuccessors(rootNode); k = 0; for (node1$iterator = new ArrayList$1(nodes); node1$iterator.i < node1$iterator.this$01.array.length;) { node1 = castTo($next_6(node1$iterator), 27); ++k; for (i = k; i < nodes.array.length; i++) { $isCrossing(this, node1, (checkCriticalElementIndex(i, nodes.array.length) , castTo(nodes.array[i], 27))) && (crossings += 1); } } return crossings; } ; var Lorg_eclipse_elk_alg_radial_intermediate_optimization_CrossingMinimizationPosition_2_classLit = createForClass('org.eclipse.elk.alg.radial.intermediate.optimization', 'CrossingMinimizationPosition', 1842); function EdgeLengthOptimization(){ } defineClass(1840, 1, {}, EdgeLengthOptimization); _.evaluate = function evaluate_0(root){ var edge, edge$iterator, edgeLength, rootX, rootY, sourceClip, target, targetClip, targetX, targetY, vector, vectorX, vectorY; edgeLength = 0; for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2(allOutgoingEdges(root).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 74); target = connectableShapeToNode(castTo($get_20((!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets), 0), 84)); targetX = target.x_0 + target.width_0 / 2; targetY = target.y_0 + target.height / 2; rootX = root.x_0 + root.width_0 / 2; rootY = root.y_0 + root.height / 2; vector = new KVector; vector.x_0 = targetX - rootX; vector.y_0 = targetY - rootY; sourceClip = new KVector_1(vector.x_0, vector.y_0); clipVector(sourceClip, root.width_0, root.height); vector.x_0 -= sourceClip.x_0; vector.y_0 -= sourceClip.y_0; rootX = targetX - vector.x_0; rootY = targetY - vector.y_0; targetClip = new KVector_1(vector.x_0, vector.y_0); clipVector(targetClip, target.width_0, target.height); vector.x_0 -= targetClip.x_0; vector.y_0 -= targetClip.y_0; targetX = rootX + vector.x_0; targetY = rootY + vector.y_0; vectorX = targetX - rootX; vectorY = targetY - rootY; edgeLength += $wnd.Math.sqrt(vectorX * vectorX + vectorY * vectorY); } return edgeLength; } ; var Lorg_eclipse_elk_alg_radial_intermediate_optimization_EdgeLengthOptimization_2_classLit = createForClass('org.eclipse.elk.alg.radial.intermediate.optimization', 'EdgeLengthOptimization', 1840); function EdgeLengthPositionOptimization(){ } defineClass(1841, 1, {}, EdgeLengthPositionOptimization); _.evaluate = function evaluate_1(root){ var edge, edge$iterator, edgeLength, position, rootX, rootY, target, targetX, targetY, vectorX, vectorY; edgeLength = 0; for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2(allOutgoingEdges(root).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 74); target = connectableShapeToNode(castTo($get_20((!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets), 0), 84)); targetX = target.x_0 + target.width_0 / 2; targetY = target.y_0 + target.height / 2; position = castTo($getProperty_0(target, ($clinit_CoreOptions() , POSITION_2)), 8); rootX = root.x_0 + position.x_0 + root.width_0 / 2; rootY = root.y_0 + position.y_0 + root.height; vectorX = targetX - rootX; vectorY = targetY - rootY; edgeLength += $wnd.Math.sqrt(vectorX * vectorX + vectorY * vectorY); } return edgeLength; } ; var Lorg_eclipse_elk_alg_radial_intermediate_optimization_EdgeLengthPositionOptimization_2_classLit = createForClass('org.eclipse.elk.alg.radial.intermediate.optimization', 'EdgeLengthPositionOptimization', 1841); function $extend(this$static, graph, nodes, progressMonitor){ var firstNode, index_0, movedDistance, movedX, movedY, nextLevelNode, nextLevelNode$iterator, nextLevelNodes, node, node$iterator, oldPositions, root, rootX, rootY, nodeX, nodeY, differenceX, differenceY, length_0, unitX, unitY; if (nodes.array.length != 0) { oldPositions = new ArrayList; for (node$iterator = new ArrayList$1(nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 27); $add_3(oldPositions, new KVector_1(node.x_0, node.y_0)); } progressMonitor.logGraph(graph, 'Before removing overlaps'); while ($overlapLayer(this$static, nodes)) { $contractLayer(this$static, nodes, false); } progressMonitor.logGraph(graph, 'After removing overlaps'); movedX = 0; movedY = 0; firstNode = null; if (nodes.array.length != 0) { firstNode = (checkCriticalElementIndex(0, nodes.array.length) , castTo(nodes.array[0], 27)); movedX = firstNode.x_0 - (checkCriticalElementIndex(0, oldPositions.array.length) , castTo(oldPositions.array[0], 8)).x_0; movedY = firstNode.y_0 - (checkCriticalElementIndex(0, oldPositions.array.length) , castTo(oldPositions.array[0], 8)).y_0; } movedDistance = $wnd.Math.sqrt(movedX * movedX + movedY * movedY); nextLevelNodes = getNextLevelNodeSet(nodes); index_0 = 1; if (nextLevelNodes.map_0.size_1() != 0) { for (nextLevelNode$iterator = nextLevelNodes.map_0.keySet_0().iterator_0(); nextLevelNode$iterator.hasNext_0();) { nextLevelNode = castTo(nextLevelNode$iterator.next_1(), 27); root = this$static.root_0; rootX = root.x_0 + root.width_0 / 2; rootY = root.y_0 + root.height / 2; nodeX = nextLevelNode.x_0 + nextLevelNode.width_0 / 2; nodeY = nextLevelNode.y_0 + nextLevelNode.height / 2; differenceX = nodeX - rootX; differenceY = nodeY - rootY; length_0 = $wnd.Math.sqrt(differenceX * differenceX + differenceY * differenceY); unitX = differenceX / length_0; unitY = differenceY / length_0; $setX_2(nextLevelNode, nextLevelNode.x_0 + unitX * movedDistance); $setY_3(nextLevelNode, nextLevelNode.y_0 + unitY * movedDistance); } progressMonitor.logGraph(graph, 'Child movement ' + index_0); ++index_0; } !!this$static.sorter && this$static.sorter.sort_1(new ArrayList_1(nextLevelNodes)); $extend(this$static, graph, new ArrayList_1(nextLevelNodes), progressMonitor); } } function $process_100(this$static, graph, progressMonitor){ var root, spacing, successors; progressMonitor.begin('Remove overlaps', 1); progressMonitor.logGraph(graph, 'Before'); root = castTo($getProperty_0(graph, ($clinit_InternalProperties_3() , ROOT_NODE)), 27); this$static.root_0 = root; this$static.sorter = $create_13(castTo($getProperty_0(graph, ($clinit_RadialOptions() , SORTER_0)), 300)); spacing = castToDouble($getProperty_0(graph, ($clinit_CoreOptions() , SPACING_NODE_NODE_6))); $setSpacing(this$static, (checkCriticalNotNull(spacing) , spacing)); successors = getSuccessors(root); $extend(this$static, graph, successors, progressMonitor); progressMonitor.logGraph(graph, 'After'); } function RadiusExtensionOverlapRemoval(){ } defineClass(1392, 653, $intern_105, RadiusExtensionOverlapRemoval); _.process = function process_96(graph, progressMonitor){ $process_100(this, castTo(graph, 27), progressMonitor); } ; var Lorg_eclipse_elk_alg_radial_intermediate_overlaps_RadiusExtensionOverlapRemoval_2_classLit = createForClass('org.eclipse.elk.alg.radial.intermediate.overlaps', 'RadiusExtensionOverlapRemoval', 1392); function $rotate(graph){ var alignmentAngle, alpha_0, firstNode, firstVector, lastNode, lastVector, node, node$iterator, pos, root, targetAngle, wedgeAngle, newX; targetAngle = $doubleValue(castToDouble($getProperty_0(graph, ($clinit_RadialOptions() , ROTATION_TARGET_ANGLE_0)))); if ($booleanValue(castToBoolean($getProperty_0(graph, ROTATION_COMPUTE_ADDITIONAL_WEDGE_SPACE_0)))) { root = castTo($getProperty_0(graph, ($clinit_InternalProperties_3() , ROOT_NODE)), 27); lastNode = castTo($get_20($getTargets(castTo($get_20((!root.outgoingEdges && (root.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, root, 7, 4)) , root.outgoingEdges), (!root.outgoingEdges && (root.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, root, 7, 4)) , root.outgoingEdges).size_0 - 1), 74)), 0), 27); firstNode = castTo($get_20($getTargets(castTo($get_20((!root.outgoingEdges && (root.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, root, 7, 4)) , root.outgoingEdges), 0), 74)), 0), 27); lastVector = new KVector_1(lastNode.x_0 + lastNode.width_0 / 2, lastNode.y_0 + lastNode.height / 2); firstVector = new KVector_1(firstNode.x_0 + firstNode.width_0 / 2, firstNode.y_0 + firstNode.height / 2); alpha_0 = targetAngle; alpha_0 <= 0 && (alpha_0 += $intern_126); wedgeAngle = $wnd.Math.acos((lastVector.x_0 * firstVector.x_0 + lastVector.y_0 * firstVector.y_0) / ($wnd.Math.sqrt(lastVector.x_0 * lastVector.x_0 + lastVector.y_0 * lastVector.y_0) * $wnd.Math.sqrt(firstVector.x_0 * firstVector.x_0 + firstVector.y_0 * firstVector.y_0))); wedgeAngle <= 0 && (wedgeAngle += $intern_126); alignmentAngle = $wnd.Math.atan2(lastVector.y_0, lastVector.x_0); alignmentAngle <= 0 && (alignmentAngle += $intern_126); targetAngle = $intern_122 - (alignmentAngle - alpha_0 + wedgeAngle / 2); } for (node$iterator = new AbstractEList$EIterator((!graph.children && (graph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, graph, 10, 11)) , graph.children)); node$iterator.cursor != node$iterator.this$01_2.size_1();) { node = castTo($doNext(node$iterator), 27); pos = new KVector_1(node.x_0 + node.width_0 / 2, node.y_0 + node.height / 2); newX = pos.x_0 * $wnd.Math.cos(targetAngle) - pos.y_0 * $wnd.Math.sin(targetAngle); pos.y_0 = pos.x_0 * $wnd.Math.sin(targetAngle) + pos.y_0 * $wnd.Math.cos(targetAngle); pos.x_0 = newX; $setLocation_1(node, pos.x_0 - node.width_0 / 2, pos.y_0 - node.height / 2); } } function $process_101(graph, progressMonitor){ progressMonitor.begin("General 'Rotator", 1); $rotate(graph); } function GeneralRotator(){ } defineClass(1394, 1, $intern_105, GeneralRotator); _.process = function process_97(graph, progressMonitor){ $process_101(castTo(graph, 27), progressMonitor); } ; var Lorg_eclipse_elk_alg_radial_intermediate_rotation_GeneralRotator_2_classLit = createForClass('org.eclipse.elk.alg.radial.intermediate.rotation', 'GeneralRotator', 1394); function $clinit_AnnulusWedgeCriteria(){ $clinit_AnnulusWedgeCriteria = emptyMethod; LEAF_NUMBER = new AnnulusWedgeCriteria('LEAF_NUMBER', 0); NODE_SIZE_0 = new AnnulusWedgeCriteria('NODE_SIZE', 1); } function $create_10(this$static){ switch (this$static.ordinal) { case 0: return new AnnulusWedgeByLeafs; case 1: return new AnnulusWedgeByNodeSpace; default:throw toJs(new IllegalArgumentException_0('No implementation is available for the layout option ' + (this$static.name_0 != null?this$static.name_0:'' + this$static.ordinal))); } } function AnnulusWedgeCriteria(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_78(name_0){ $clinit_AnnulusWedgeCriteria(); return valueOf(($clinit_AnnulusWedgeCriteria$Map() , $MAP_68), name_0); } function values_86(){ $clinit_AnnulusWedgeCriteria(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_radial_options_AnnulusWedgeCriteria_2_classLit, 1), $intern_37, 434, 0, [LEAF_NUMBER, NODE_SIZE_0]); } defineClass(434, 22, {3:1, 34:1, 22:1, 434:1}, AnnulusWedgeCriteria); var LEAF_NUMBER, NODE_SIZE_0; var Lorg_eclipse_elk_alg_radial_options_AnnulusWedgeCriteria_2_classLit = createForEnum('org.eclipse.elk.alg.radial.options', 'AnnulusWedgeCriteria', 434, Ljava_lang_Enum_2_classLit, values_86, valueOf_78); function $clinit_AnnulusWedgeCriteria$Map(){ $clinit_AnnulusWedgeCriteria$Map = emptyMethod; $MAP_68 = createValueOfMap(($clinit_AnnulusWedgeCriteria() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_radial_options_AnnulusWedgeCriteria_2_classLit, 1), $intern_37, 434, 0, [LEAF_NUMBER, NODE_SIZE_0]))); } var $MAP_68; function $clinit_CompactionStrategy_0(){ $clinit_CompactionStrategy_0 = emptyMethod; NONE_12 = new CompactionStrategy_0('NONE', 0); RADIAL_COMPACTION = new CompactionStrategy_0('RADIAL_COMPACTION', 1); WEDGE_COMPACTION = new CompactionStrategy_0('WEDGE_COMPACTION', 2); } function $create_11(this$static){ switch (this$static.ordinal) { case 1: return new RadialCompaction; case 2: return new AnnulusWedgeCompaction; default:throw toJs(new IllegalArgumentException_0('No implementation is available for the layout option ' + (this$static.name_0 != null?this$static.name_0:'' + this$static.ordinal))); } } function CompactionStrategy_0(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_79(name_0){ $clinit_CompactionStrategy_0(); return valueOf(($clinit_CompactionStrategy$Map_0() , $MAP_69), name_0); } function values_87(){ $clinit_CompactionStrategy_0(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_radial_options_CompactionStrategy_2_classLit, 1), $intern_37, 393, 0, [NONE_12, RADIAL_COMPACTION, WEDGE_COMPACTION]); } defineClass(393, 22, {3:1, 34:1, 22:1, 393:1}, CompactionStrategy_0); var NONE_12, RADIAL_COMPACTION, WEDGE_COMPACTION; var Lorg_eclipse_elk_alg_radial_options_CompactionStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.radial.options', 'CompactionStrategy', 393, Ljava_lang_Enum_2_classLit, values_87, valueOf_79); function $clinit_CompactionStrategy$Map_0(){ $clinit_CompactionStrategy$Map_0 = emptyMethod; $MAP_69 = createValueOfMap(($clinit_CompactionStrategy_0() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_radial_options_CompactionStrategy_2_classLit, 1), $intern_37, 393, 0, [NONE_12, RADIAL_COMPACTION, WEDGE_COMPACTION]))); } var $MAP_69; function $clinit_RadialMetaDataProvider(){ $clinit_RadialMetaDataProvider = emptyMethod; CENTER_ON_ROOT = new Property_1('org.eclipse.elk.radial.centerOnRoot', ($clinit_Boolean() , false)); ORDER_ID = new Property_1('org.eclipse.elk.radial.orderId', valueOf_3(0)); RADIUS = new Property_1('org.eclipse.elk.radial.radius', 0); ROTATE = new Property_1('org.eclipse.elk.radial.rotate', false); COMPACTOR_DEFAULT = ($clinit_CompactionStrategy_0() , NONE_12); COMPACTOR = new Property_1('org.eclipse.elk.radial.compactor', COMPACTOR_DEFAULT); valueOf_3(0); COMPACTION_STEP_SIZE = new Property_1('org.eclipse.elk.radial.compactionStepSize', valueOf_3(1)); SORTER_DEFAULT = ($clinit_SortingStrategy() , NONE_14); SORTER = new Property_1('org.eclipse.elk.radial.sorter', SORTER_DEFAULT); WEDGE_CRITERIA_DEFAULT = ($clinit_AnnulusWedgeCriteria() , NODE_SIZE_0); WEDGE_CRITERIA = new Property_1('org.eclipse.elk.radial.wedgeCriteria', WEDGE_CRITERIA_DEFAULT); OPTIMIZATION_CRITERIA_DEFAULT = ($clinit_RadialTranslationStrategy() , NONE_13); OPTIMIZATION_CRITERIA = new Property_1('org.eclipse.elk.radial.optimizationCriteria', OPTIMIZATION_CRITERIA_DEFAULT); ROTATION_TARGET_ANGLE = new Property_1('org.eclipse.elk.radial.rotation.targetAngle', 0); ROTATION_COMPUTE_ADDITIONAL_WEDGE_SPACE = new Property_1('org.eclipse.elk.radial.rotation.computeAdditionalWedgeSpace', false); ROTATION_OUTGOING_EDGE_ANGLES = new Property_1('org.eclipse.elk.radial.rotation.outgoingEdgeAngles', false); } function RadialMetaDataProvider(){ $clinit_RadialMetaDataProvider(); } defineClass(863, 1, $intern_90, RadialMetaDataProvider); _.apply_4 = function apply_167(registry){ $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.radial.centerOnRoot'), ''), 'Center On Root'), 'Centers the layout on the root of the tree i.e. so that the central node is also the center node of the final layout. This introduces additional whitespace.'), ($clinit_Boolean() , false)), ($clinit_LayoutOptionData$Type() , BOOLEAN)), Ljava_lang_Boolean_2_classLit), of_1(($clinit_LayoutOptionData$Target() , PARENTS))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.radial.orderId'), ''), 'Order ID'), 'The id can be used to define an order for nodes of one radius. This can be used to sort them in the layer accordingly.'), valueOf_3(0)), INT), Ljava_lang_Integer_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.radial.radius'), ''), 'Radius'), 'The radius option can be used to set the initial radius for the radial layouter.'), 0), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.radial.rotate'), ''), 'Rotate'), 'The rotate option determines whether a rotation of the layout should be performed.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.radial.compactor'), ''), 'Compaction'), 'With the compacter option it can be determined how compaction on the graph is done. It can be chosen between none, the radial compaction or the compaction of wedges separately.'), COMPACTOR_DEFAULT), ENUM), Lorg_eclipse_elk_alg_radial_options_CompactionStrategy_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.radial.compactionStepSize'), ''), 'Compaction Step Size'), 'Determine the size of steps with which the compaction is done. Step size 1 correlates to a compaction of 1 pixel per Iteration.'), valueOf_3(1)), INT), Ljava_lang_Integer_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.radial.compactionStepSize', 'org.eclipse.elk.radial.compactor', null); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.radial.sorter'), ''), 'Sorter'), 'Sort the nodes per radius according to the sorting algorithm. The strategies are none, by the given order id, or sorting them by polar coordinates.'), SORTER_DEFAULT), ENUM), Lorg_eclipse_elk_alg_radial_options_SortingStrategy_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.radial.wedgeCriteria'), ''), 'Annulus Wedge Criteria'), 'Determine how the wedge for the node placement is calculated. It can be chosen between wedge determination by the number of leaves or by the maximum sum of diagonals.'), WEDGE_CRITERIA_DEFAULT), ENUM), Lorg_eclipse_elk_alg_radial_options_AnnulusWedgeCriteria_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.radial.optimizationCriteria'), ''), 'Translation Optimization'), 'Find the optimal translation of the nodes of the first radii according to this criteria. For example edge crossings can be minimized.'), OPTIMIZATION_CRITERIA_DEFAULT), ENUM), Lorg_eclipse_elk_alg_radial_options_RadialTranslationStrategy_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.radial.rotation.targetAngle'), 'rotation'), 'Target Angle'), 'The angle in radians that the layout should be rotated to after layout.'), 0), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.radial.rotation.targetAngle', 'org.eclipse.elk.radial.rotate', null); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.radial.rotation.computeAdditionalWedgeSpace'), 'rotation'), 'Additional Wedge Space'), 'If set to true, modifies the target angle by rotating further such that space is left for an edge to pass in between the nodes. This option should only be used in conjunction with top-down layout.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.radial.rotation.computeAdditionalWedgeSpace', 'org.eclipse.elk.radial.rotate', null); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.radial.rotation.outgoingEdgeAngles'), 'rotation'), 'Outgoing Edge Angles'), 'Calculate the required angle of connected nodes to leave space for an incoming edge. This option should only be used in conjunction with top-down layout.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $apply_20((new RadialOptions , registry)); } ; var CENTER_ON_ROOT, COMPACTION_STEP_SIZE, COMPACTOR, COMPACTOR_DEFAULT, OPTIMIZATION_CRITERIA, OPTIMIZATION_CRITERIA_DEFAULT, ORDER_ID, RADIUS, ROTATE, ROTATION_COMPUTE_ADDITIONAL_WEDGE_SPACE, ROTATION_OUTGOING_EDGE_ANGLES, ROTATION_TARGET_ANGLE, SORTER, SORTER_DEFAULT, WEDGE_CRITERIA, WEDGE_CRITERIA_DEFAULT; var Lorg_eclipse_elk_alg_radial_options_RadialMetaDataProvider_2_classLit = createForClass('org.eclipse.elk.alg.radial.options', 'RadialMetaDataProvider', 863); function $clinit_RadialOptions(){ $clinit_RadialOptions = emptyMethod; POSITION_1 = ($clinit_CoreOptions() , POSITION_2); SPACING_NODE_NODE_2 = SPACING_NODE_NODE_6; NODE_SIZE_CONSTRAINTS_3 = NODE_SIZE_CONSTRAINTS_6; NODE_SIZE_MINIMUM_2 = NODE_SIZE_MINIMUM_5; NODE_SIZE_OPTIONS_3 = NODE_SIZE_OPTIONS_6; NODE_LABELS_PLACEMENT_3 = NODE_LABELS_PLACEMENT_5; OMIT_NODE_MICRO_LAYOUT_2 = OMIT_NODE_MICRO_LAYOUT_4; PORT_LABELS_PLACEMENT_3 = PORT_LABELS_PLACEMENT_5; COMPACTION_STEP_SIZE_0 = ($clinit_RadialMetaDataProvider() , COMPACTION_STEP_SIZE); COMPACTOR_0 = COMPACTOR; ROTATE_0 = ROTATE; ROTATION_TARGET_ANGLE_0 = ROTATION_TARGET_ANGLE; ROTATION_COMPUTE_ADDITIONAL_WEDGE_SPACE_0 = ROTATION_COMPUTE_ADDITIONAL_WEDGE_SPACE; ROTATION_OUTGOING_EDGE_ANGLES_0 = ROTATION_OUTGOING_EDGE_ANGLES; OPTIMIZATION_CRITERIA_0 = OPTIMIZATION_CRITERIA; ORDER_ID_0 = ORDER_ID; RADIUS_0 = RADIUS; SORTER_0 = SORTER; WEDGE_CRITERIA_0 = WEDGE_CRITERIA; CENTER_ON_ROOT_0 = CENTER_ON_ROOT; } function $apply_20(registry){ $register(registry, new LayoutAlgorithmData($category($providerFactory($description($name_0($id(new LayoutAlgorithmData$Builder, 'org.eclipse.elk.radial'), 'ELK Radial'), 'A radial layout provider which is based on the algorithm of Peter Eades published in "Drawing free trees.", published by International Institute for Advanced Study of Social Information Science, Fujitsu Limited in 1991. The radial layouter takes a tree and places the nodes in radial order around the root. The nodes of the same tree level are placed on the same radius.'), new RadialOptions$RadialFactory), 'org.eclipse.elk.radial'))); $addOptionSupport(registry, 'org.eclipse.elk.radial', 'org.eclipse.elk.position', $getDefault(POSITION_1)); $addOptionSupport(registry, 'org.eclipse.elk.radial', 'org.eclipse.elk.spacing.nodeNode', $getDefault(SPACING_NODE_NODE_2)); $addOptionSupport(registry, 'org.eclipse.elk.radial', 'org.eclipse.elk.nodeSize.constraints', $getDefault(NODE_SIZE_CONSTRAINTS_3)); $addOptionSupport(registry, 'org.eclipse.elk.radial', 'org.eclipse.elk.nodeSize.minimum', $getDefault(NODE_SIZE_MINIMUM_2)); $addOptionSupport(registry, 'org.eclipse.elk.radial', 'org.eclipse.elk.nodeSize.options', $getDefault(NODE_SIZE_OPTIONS_3)); $addOptionSupport(registry, 'org.eclipse.elk.radial', 'org.eclipse.elk.nodeLabels.placement', $getDefault(NODE_LABELS_PLACEMENT_3)); $addOptionSupport(registry, 'org.eclipse.elk.radial', 'org.eclipse.elk.omitNodeMicroLayout', $getDefault(OMIT_NODE_MICRO_LAYOUT_2)); $addOptionSupport(registry, 'org.eclipse.elk.radial', 'org.eclipse.elk.portLabels.placement', $getDefault(PORT_LABELS_PLACEMENT_3)); $addOptionSupport(registry, 'org.eclipse.elk.radial', 'org.eclipse.elk.radial.compactionStepSize', $getDefault(COMPACTION_STEP_SIZE_0)); $addOptionSupport(registry, 'org.eclipse.elk.radial', 'org.eclipse.elk.radial.compactor', $getDefault(COMPACTOR_0)); $addOptionSupport(registry, 'org.eclipse.elk.radial', 'org.eclipse.elk.radial.rotate', $getDefault(ROTATE_0)); $addOptionSupport(registry, 'org.eclipse.elk.radial', 'org.eclipse.elk.radial.rotation.targetAngle', $getDefault(ROTATION_TARGET_ANGLE_0)); $addOptionSupport(registry, 'org.eclipse.elk.radial', 'org.eclipse.elk.radial.rotation.computeAdditionalWedgeSpace', $getDefault(ROTATION_COMPUTE_ADDITIONAL_WEDGE_SPACE_0)); $addOptionSupport(registry, 'org.eclipse.elk.radial', 'org.eclipse.elk.radial.rotation.outgoingEdgeAngles', $getDefault(ROTATION_OUTGOING_EDGE_ANGLES_0)); $addOptionSupport(registry, 'org.eclipse.elk.radial', 'org.eclipse.elk.radial.optimizationCriteria', $getDefault(OPTIMIZATION_CRITERIA_0)); $addOptionSupport(registry, 'org.eclipse.elk.radial', 'org.eclipse.elk.radial.orderId', $getDefault(ORDER_ID_0)); $addOptionSupport(registry, 'org.eclipse.elk.radial', 'org.eclipse.elk.radial.radius', $getDefault(RADIUS_0)); $addOptionSupport(registry, 'org.eclipse.elk.radial', 'org.eclipse.elk.radial.sorter', $getDefault(SORTER_0)); $addOptionSupport(registry, 'org.eclipse.elk.radial', 'org.eclipse.elk.radial.wedgeCriteria', $getDefault(WEDGE_CRITERIA_0)); $addOptionSupport(registry, 'org.eclipse.elk.radial', 'org.eclipse.elk.radial.centerOnRoot', $getDefault(CENTER_ON_ROOT_0)); } function RadialOptions(){ $clinit_RadialOptions(); } defineClass(1008, 1, $intern_90, RadialOptions); _.apply_4 = function apply_168(registry){ $apply_20(registry); } ; var CENTER_ON_ROOT_0, COMPACTION_STEP_SIZE_0, COMPACTOR_0, NODE_LABELS_PLACEMENT_3, NODE_SIZE_CONSTRAINTS_3, NODE_SIZE_MINIMUM_2, NODE_SIZE_OPTIONS_3, OMIT_NODE_MICRO_LAYOUT_2, OPTIMIZATION_CRITERIA_0, ORDER_ID_0, PORT_LABELS_PLACEMENT_3, POSITION_1, RADIUS_0, ROTATE_0, ROTATION_COMPUTE_ADDITIONAL_WEDGE_SPACE_0, ROTATION_OUTGOING_EDGE_ANGLES_0, ROTATION_TARGET_ANGLE_0, SORTER_0, SPACING_NODE_NODE_2, WEDGE_CRITERIA_0; var Lorg_eclipse_elk_alg_radial_options_RadialOptions_2_classLit = createForClass('org.eclipse.elk.alg.radial.options', 'RadialOptions', 1008); function RadialOptions$RadialFactory(){ } defineClass(1009, 1, {}, RadialOptions$RadialFactory); _.create_0 = function create_25(){ var provider; return provider = new RadialLayoutProvider , provider; } ; _.destroy = function destroy_4(obj){ } ; var Lorg_eclipse_elk_alg_radial_options_RadialOptions$RadialFactory_2_classLit = createForClass('org.eclipse.elk.alg.radial.options', 'RadialOptions/RadialFactory', 1009); function $clinit_RadialTranslationStrategy(){ $clinit_RadialTranslationStrategy = emptyMethod; NONE_13 = new RadialTranslationStrategy('NONE', 0); EDGE_LENGTH_0 = new RadialTranslationStrategy('EDGE_LENGTH', 1); EDGE_LENGTH_BY_POSITION = new RadialTranslationStrategy('EDGE_LENGTH_BY_POSITION', 2); CROSSING_MINIMIZATION_BY_POSITION = new RadialTranslationStrategy('CROSSING_MINIMIZATION_BY_POSITION', 3); } function $create_12(this$static){ switch (this$static.ordinal) { case 1: return new EdgeLengthOptimization; case 2: return new EdgeLengthPositionOptimization; case 3: return new CrossingMinimizationPosition; case 0: return null; default:throw toJs(new IllegalArgumentException_0('No implementation is available for the layout option ' + (this$static.name_0 != null?this$static.name_0:'' + this$static.ordinal))); } } function RadialTranslationStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_80(name_0){ $clinit_RadialTranslationStrategy(); return valueOf(($clinit_RadialTranslationStrategy$Map() , $MAP_70), name_0); } function values_88(){ $clinit_RadialTranslationStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_radial_options_RadialTranslationStrategy_2_classLit, 1), $intern_37, 354, 0, [NONE_13, EDGE_LENGTH_0, EDGE_LENGTH_BY_POSITION, CROSSING_MINIMIZATION_BY_POSITION]); } defineClass(354, 22, {3:1, 34:1, 22:1, 354:1}, RadialTranslationStrategy); var CROSSING_MINIMIZATION_BY_POSITION, EDGE_LENGTH_0, EDGE_LENGTH_BY_POSITION, NONE_13; var Lorg_eclipse_elk_alg_radial_options_RadialTranslationStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.radial.options', 'RadialTranslationStrategy', 354, Ljava_lang_Enum_2_classLit, values_88, valueOf_80); function $clinit_RadialTranslationStrategy$Map(){ $clinit_RadialTranslationStrategy$Map = emptyMethod; $MAP_70 = createValueOfMap(($clinit_RadialTranslationStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_radial_options_RadialTranslationStrategy_2_classLit, 1), $intern_37, 354, 0, [NONE_13, EDGE_LENGTH_0, EDGE_LENGTH_BY_POSITION, CROSSING_MINIMIZATION_BY_POSITION]))); } var $MAP_70; function $clinit_SortingStrategy(){ $clinit_SortingStrategy = emptyMethod; NONE_14 = new SortingStrategy('NONE', 0); POLAR_COORDINATE = new SortingStrategy('POLAR_COORDINATE', 1); ID_0 = new SortingStrategy('ID', 2); } function $create_13(this$static){ switch (this$static.ordinal) { case 0: return null; case 1: return new PolarCoordinateSorter; case 2: return new IDSorter; default:throw toJs(new IllegalArgumentException_0('No implementation is available for the layout option ' + (this$static.name_0 != null?this$static.name_0:'' + this$static.ordinal))); } } function SortingStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_81(name_0){ $clinit_SortingStrategy(); return valueOf(($clinit_SortingStrategy$Map() , $MAP_71), name_0); } function values_89(){ $clinit_SortingStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_radial_options_SortingStrategy_2_classLit, 1), $intern_37, 300, 0, [NONE_14, POLAR_COORDINATE, ID_0]); } defineClass(300, 22, {3:1, 34:1, 22:1, 300:1}, SortingStrategy); var ID_0, NONE_14, POLAR_COORDINATE; var Lorg_eclipse_elk_alg_radial_options_SortingStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.radial.options', 'SortingStrategy', 300, Ljava_lang_Enum_2_classLit, values_89, valueOf_81); function $clinit_SortingStrategy$Map(){ $clinit_SortingStrategy$Map = emptyMethod; $MAP_71 = createValueOfMap(($clinit_SortingStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_radial_options_SortingStrategy_2_classLit, 1), $intern_37, 300, 0, [NONE_14, POLAR_COORDINATE, ID_0]))); } var $MAP_71; function $positionNodes(this$static, node, currentRadius, minAlpha, maxAlpha, optimalOffset){ var alpha_0, alphaPoint, child, child$iterator, numberOfChildLeafs, numberOfLeafs, radOffest, s, successors, tau, xPos, yPos, xPosition, yPosition; radOffest = optimalOffset; alphaPoint = (minAlpha + maxAlpha) / 2 + radOffest; xPos = currentRadius * $wnd.Math.cos(alphaPoint); yPos = currentRadius * $wnd.Math.sin(alphaPoint); xPosition = xPos - node.width_0 / 2; yPosition = yPos - node.height / 2; $setX_2(node, xPosition); $setY_3(node, yPosition); numberOfLeafs = this$static.annulusWedgeCriteria.calculateWedgeSpace(node); tau = 2 * $wnd.Math.acos(currentRadius / currentRadius + this$static.radius); if (tau < maxAlpha - minAlpha) { s = tau / numberOfLeafs; alpha_0 = (minAlpha + maxAlpha - tau) / 2; } else { s = (maxAlpha - minAlpha) / numberOfLeafs; alpha_0 = minAlpha; } successors = getSuccessors(node); if (this$static.sorter) { this$static.sorter.initialize_0(this$static.root); this$static.sorter.sort_1(successors); } for (child$iterator = new ArrayList$1(successors); child$iterator.i < child$iterator.this$01.array.length;) { child = castTo($next_6(child$iterator), 27); numberOfChildLeafs = this$static.annulusWedgeCriteria.calculateWedgeSpace(child); $positionNodes(this$static, child, currentRadius + this$static.radius, alpha_0, alpha_0 + s * numberOfChildLeafs, optimalOffset); alpha_0 += s * numberOfChildLeafs; } } function $process_102(this$static, graph, progressMonitor){ progressMonitor.begin('Eades radial', 1); progressMonitor.logGraph(graph, 'After'); this$static.root = castTo($getProperty_0(graph, ($clinit_InternalProperties_3() , ROOT_NODE)), 27); this$static.radius = $doubleValue(castToDouble($getProperty_0(graph, ($clinit_RadialOptions() , RADIUS_0)))); this$static.sorter = $create_13(castTo($getProperty_0(graph, SORTER_0), 300)); this$static.annulusWedgeCriteria = $create_10(castTo($getProperty_0(graph, WEDGE_CRITERIA_0), 434)); this$static.optimizer = $create_12(castTo($getProperty_0(graph, OPTIMIZATION_CRITERIA_0), 354)); $translate_0(this$static); progressMonitor.logGraph(graph, 'After'); } function $translate_0(this$static){ var i, offset, optimalOffset, optimalValue, translatedValue; optimalOffset = 0; optimalValue = $intern_98; if (this$static.optimizer) { for (i = 0; i < 360; i++) { offset = i * 0.017453292519943295; $positionNodes(this$static, this$static.root, 0, 0, $intern_126, offset); translatedValue = this$static.optimizer.evaluate(this$static.root); if (translatedValue < optimalValue) { optimalOffset = offset; optimalValue = translatedValue; } } } $positionNodes(this$static, this$static.root, 0, 0, $intern_126, optimalOffset); } function EadesRadial(){ } defineClass(1476, 1, $intern_113, EadesRadial); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_27(graph){ return castTo(graph, 27) , null; } ; _.process = function process_98(graph, progressMonitor){ $process_102(this, castTo(graph, 27), progressMonitor); } ; _.radius = 0; var Lorg_eclipse_elk_alg_radial_p1position_EadesRadial_2_classLit = createForClass('org.eclipse.elk.alg.radial.p1position', 'EadesRadial', 1476); function AnnulusWedgeByLeafs(){ } defineClass(1838, 1, {}, AnnulusWedgeByLeafs); _.calculateWedgeSpace = function calculateWedgeSpace(node){ return getNumberOfLeaves(node); } ; var Lorg_eclipse_elk_alg_radial_p1position_wedge_AnnulusWedgeByLeafs_2_classLit = createForClass('org.eclipse.elk.alg.radial.p1position.wedge', 'AnnulusWedgeByLeafs', 1838); function $calculateWedgeSpace(this$static, node){ var child, child$iterator, childSpace, height, nodeSize, successors, width_0; successors = getSuccessors(node); height = node.height; width_0 = node.width_0; nodeSize = $wnd.Math.sqrt(height * height + width_0 * width_0); childSpace = 0; for (child$iterator = new ArrayList$1(successors); child$iterator.i < child$iterator.this$01.array.length;) { child = castTo($next_6(child$iterator), 27); childSpace += $calculateWedgeSpace(this$static, child); } return $wnd.Math.max(childSpace, nodeSize); } function AnnulusWedgeByNodeSpace(){ } defineClass(1839, 1, {}, AnnulusWedgeByNodeSpace); _.calculateWedgeSpace = function calculateWedgeSpace_0(node){ return $calculateWedgeSpace(this, node); } ; var Lorg_eclipse_elk_alg_radial_p1position_wedge_AnnulusWedgeByNodeSpace_2_classLit = createForClass('org.eclipse.elk.alg.radial.p1position.wedge', 'AnnulusWedgeByNodeSpace', 1839); function $process_103(this$static, graph, progressMonitor){ var root; progressMonitor.begin('Straight Line Edge Routing', 1); progressMonitor.logGraph(graph, 'Before'); root = castTo($getProperty_0(graph, ($clinit_InternalProperties_3() , ROOT_NODE)), 27); $routeEdges_1(this$static, root); progressMonitor.logGraph(graph, 'After'); } function $routeEdges_1(this$static, node){ var edge, edge$iterator, section, sourceClip, sourceX, sourceY, target, targetClip, targetX, targetY, vector; for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2(allOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 74); if (!instanceOf($get_20((!edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)) , edge.sources), 0), 193)) { target = connectableShapeToNode(castTo($get_20((!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets), 0), 84)); if (!$isHierarchical(edge)) { sourceX = node.x_0 + node.width_0 / 2; sourceY = node.y_0 + node.height / 2; targetX = target.x_0 + target.width_0 / 2; targetY = target.y_0 + target.height / 2; vector = new KVector; vector.x_0 = targetX - sourceX; vector.y_0 = targetY - sourceY; sourceClip = new KVector_1(vector.x_0, vector.y_0); clipVector(sourceClip, node.width_0, node.height); vector.x_0 -= sourceClip.x_0; vector.y_0 -= sourceClip.y_0; sourceX = targetX - vector.x_0; sourceY = targetY - vector.y_0; targetClip = new KVector_1(vector.x_0, vector.y_0); clipVector(targetClip, target.width_0, target.height); vector.x_0 -= targetClip.x_0; vector.y_0 -= targetClip.y_0; targetX = sourceX + vector.x_0; targetY = sourceY + vector.y_0; section = firstEdgeSection(edge, true, true); $setStartX(section, sourceX); $setStartY(section, sourceY); $setEndX(section, targetX); $setEndY(section, targetY); $routeEdges_1(this$static, target); } } } } function StraightLineEdgeRouter(){ } defineClass(1477, 1, $intern_113, StraightLineEdgeRouter); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_28(graph){ return castTo(graph, 27) , null; } ; _.process = function process_99(graph, progressMonitor){ $process_103(this, castTo(graph, 27), progressMonitor); } ; var Lorg_eclipse_elk_alg_radial_p2routing_StraightLineEdgeRouter_2_classLit = createForClass('org.eclipse.elk.alg.radial.p2routing', 'StraightLineEdgeRouter', 1477); function $sort_2(this$static, nodes){ nodes.sort_0(this$static.idSorter); } function IDSorter(){ this.idSorter = new IDSorter$lambda$0$Type; } function lambda$0_37(node1_0, node2_1){ var orderID1, orderID2; orderID1 = castTo($getProperty_0(node1_0, ($clinit_RadialOptions() , ORDER_ID_0)), 17); orderID2 = castTo($getProperty_0(node2_1, ORDER_ID_0), 17); return compare_5(orderID1.value_0, orderID2.value_0); } defineClass(826, 1, {}, IDSorter); _.initialize_0 = function initialize_3(root){ } ; _.sort_1 = function sort_11(nodes){ $sort_2(this, nodes); } ; var Lorg_eclipse_elk_alg_radial_sorting_IDSorter_2_classLit = createForClass('org.eclipse.elk.alg.radial.sorting', 'IDSorter', 826); function IDSorter$lambda$0$Type(){ } defineClass(1837, 1, $intern_88, IDSorter$lambda$0$Type); _.compare_1 = function compare_106(arg0, arg1){ return lambda$0_37(castTo(arg0, 27), castTo(arg1, 27)); } ; _.equals_0 = function equals_193(other){ return this === other; } ; _.reversed = function reversed_98(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_radial_sorting_IDSorter$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.radial.sorting', 'IDSorter/lambda$0$Type', 1837); function $initialize_7(this$static, root){ var successors; this$static.idSorter = new IDSorter; successors = getSuccessors(root); $sort(successors, this$static.compRight); $setIDForNodes(this$static, successors, 0); } function $setIDForNodes(this$static, nodes, idOffset){ var arc, id_0, nextLayerId, node, node$iterator, nodeSuccessors; id_0 = idOffset; nextLayerId = 0; for (node$iterator = new ArrayList$1(nodes); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 27); $setProperty_1(node, ($clinit_RadialOptions() , ORDER_ID_0), valueOf_3(id_0++)); nodeSuccessors = getSuccessors(node); arc = $wnd.Math.atan2(node.y_0 + node.height / 2, node.x_0 + node.width_0 / 2); arc += arc < 0?$intern_126:0; arc < 0.7853981633974483 || arc > $intern_129?$sort(nodeSuccessors, this$static.compLeft):arc <= $intern_129 && arc > $intern_130?$sort(nodeSuccessors, this$static.compTop):arc <= $intern_130 && arc > $intern_131?$sort(nodeSuccessors, this$static.compRight):arc <= $intern_131 && $sort(nodeSuccessors, this$static.compBottom); nextLayerId = $setIDForNodes(this$static, nodeSuccessors, nextLayerId); } return id_0; } function PolarCoordinateSorter(){ this.compRight = new RadialUtil$lambda$0$Type(0); this.compLeft = new RadialUtil$lambda$0$Type($intern_122); this.compTop = new RadialUtil$lambda$0$Type($intern_121); this.compBottom = new RadialUtil$lambda$0$Type($intern_97); } defineClass(1836, 1, {}, PolarCoordinateSorter); _.initialize_0 = function initialize_4(root){ $initialize_7(this, root); } ; _.sort_1 = function sort_12(nodes){ var root; if (!nodes.isEmpty()) { if (!this.idSorter) { root = findRootOfNode(castTo(nodes.get_0(0), 27)); $initialize_7(this, root); } $sort_2(this.idSorter, nodes); } } ; var Lorg_eclipse_elk_alg_radial_sorting_PolarCoordinateSorter_2_classLit = createForClass('org.eclipse.elk.alg.radial.sorting', 'PolarCoordinateSorter', 1836); function $clinit_RectPackingLayoutPhases(){ $clinit_RectPackingLayoutPhases = emptyMethod; P1_WIDTH_APPROXIMATION = new RectPackingLayoutPhases('P1_WIDTH_APPROXIMATION', 0); P2_PACKING = new RectPackingLayoutPhases('P2_PACKING', 1); P3_WHITESPACE_ELIMINATION = new RectPackingLayoutPhases('P3_WHITESPACE_ELIMINATION', 2); } function RectPackingLayoutPhases(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_82(name_0){ $clinit_RectPackingLayoutPhases(); return valueOf(($clinit_RectPackingLayoutPhases$Map() , $MAP_72), name_0); } function values_90(){ $clinit_RectPackingLayoutPhases(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_rectpacking_RectPackingLayoutPhases_2_classLit, 1), $intern_37, 445, 0, [P1_WIDTH_APPROXIMATION, P2_PACKING, P3_WHITESPACE_ELIMINATION]); } defineClass(445, 22, {3:1, 34:1, 22:1, 445:1}, RectPackingLayoutPhases); var P1_WIDTH_APPROXIMATION, P2_PACKING, P3_WHITESPACE_ELIMINATION; var Lorg_eclipse_elk_alg_rectpacking_RectPackingLayoutPhases_2_classLit = createForEnum('org.eclipse.elk.alg.rectpacking', 'RectPackingLayoutPhases', 445, Ljava_lang_Enum_2_classLit, values_90, valueOf_82); function $clinit_RectPackingLayoutPhases$Map(){ $clinit_RectPackingLayoutPhases$Map = emptyMethod; $MAP_72 = createValueOfMap(($clinit_RectPackingLayoutPhases() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_rectpacking_RectPackingLayoutPhases_2_classLit, 1), $intern_37, 445, 0, [P1_WIDTH_APPROXIMATION, P2_PACKING, P3_WHITESPACE_ELIMINATION]))); } var $MAP_72; function RectPackingLayoutProvider(){ this.algorithmAssembler = new AlgorithmAssembler(Lorg_eclipse_elk_alg_rectpacking_RectPackingLayoutPhases_2_classLit); } function applyPadding(rectangles, padding){ var rect, rect$iterator; for (rect$iterator = new AbstractEList$EIterator(rectangles); rect$iterator.cursor != rect$iterator.this$01_2.size_1();) { rect = castTo($doNext(rect$iterator), 27); $setLocation_1(rect, rect.x_0 + padding.left, rect.y_0 + padding.top_0); } } defineClass(1118, 205, $intern_96, RectPackingLayoutProvider); _.layout = function layout_5(layoutGraph, progressMonitor){ var algorithm, builder, builder0, counter, elkNode, elkNode$iterator, fixedGraphSize, monitorProgress, nodeNodeSpacing, padding, priority, processor, processor$iterator, realHeight, realWidth, rect, rect$iterator, rectangles, region1, region2, region3, slotIndex, stackable, tryBox, configuration; progressMonitor.begin('Rectangle Packing', 1); padding = castTo($getProperty_0(layoutGraph, ($clinit_RectPackingOptions() , PADDING_3)), 107); fixedGraphSize = $booleanValue(castToBoolean($getProperty_0(layoutGraph, NODE_SIZE_FIXED_GRAPH_SIZE_2))); nodeNodeSpacing = $doubleValue(castToDouble($getProperty_0(layoutGraph, SPACING_NODE_NODE_3))); tryBox = $booleanValue(castToBoolean($getProperty_0(layoutGraph, TRYBOX_0))); rectangles = (!layoutGraph.children && (layoutGraph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, layoutGraph, 10, 11)) , layoutGraph.children); $booleanValue(castToBoolean($getProperty_0(layoutGraph, OMIT_NODE_MICRO_LAYOUT_3))) || $execute((builder0 = new NodeMicroLayout(($clinit_ElkGraphAdapters() , new ElkGraphAdapters$ElkGraphAdapter(layoutGraph))) , builder0)); stackable = false; if (tryBox && rectangles.size_0 >= 3) { region2 = castTo($get_20(rectangles, 0), 27); region3 = castTo($get_20(rectangles, 1), 27); counter = 0; while (counter + 2 < rectangles.size_0) { region1 = region2; region2 = region3; region3 = castTo($get_20(rectangles, counter + 2), 27); if (region1.height >= region2.height + region3.height + nodeNodeSpacing || region3.height >= region1.height + region2.height + nodeNodeSpacing) { stackable = true; break; } else { ++counter; } } } else { stackable = true; } if (!stackable) { priority = rectangles.size_0; for (elkNode$iterator = new AbstractEList$EIterator(rectangles); elkNode$iterator.cursor != elkNode$iterator.this$01_2.size_1();) { elkNode = castTo($doNext(elkNode$iterator), 27); $setProperty_1(elkNode, ($clinit_CoreOptions() , PRIORITY_3), valueOf_3(priority)); --priority; } $layout_4(layoutGraph, new BasicProgressMonitor); progressMonitor.done_1(); return; } algorithm = ($reset_4(this.algorithmAssembler) , $setPhase(this.algorithmAssembler, ($clinit_RectPackingLayoutPhases() , P1_WIDTH_APPROXIMATION), castTo($getProperty_0(layoutGraph, WIDTH_APPROXIMATION_STRATEGY_0), 188)) , $setPhase(this.algorithmAssembler, P2_PACKING, castTo($getProperty_0(layoutGraph, PACKING_STRATEGY_0), 188)) , $setPhase(this.algorithmAssembler, P3_WHITESPACE_ELIMINATION, castTo($getProperty_0(layoutGraph, WHITE_SPACE_ELIMINATION_STRATEGY_0), 188)) , $addProcessorConfiguration(this.algorithmAssembler, (configuration = new LayoutProcessorConfiguration , $addBefore(configuration, P1_WIDTH_APPROXIMATION, ($clinit_IntermediateProcessorStrategy_2() , MIN_SIZE_PRE_PROCESSOR)) , $addBefore(configuration, P2_PACKING, MIN_SIZE_POST_PROCESSOR) , $booleanValue(castToBoolean($getProperty_0(layoutGraph, INTERACTIVE_6))) && $addBefore(configuration, P1_WIDTH_APPROXIMATION, INTERACTIVE_NODE_REORDERER) , configuration)) , $build_0(this.algorithmAssembler, layoutGraph)); monitorProgress = 1 / algorithm.array.length; slotIndex = 0; for (processor$iterator = new ArrayList$1(algorithm); processor$iterator.i < processor$iterator.this$01.array.length;) { processor = castTo($next_6(processor$iterator), 47); if (progressMonitor.isCanceled()) { return; } processor.process(layoutGraph, progressMonitor.subTask(monitorProgress)); ++slotIndex; } realWidth = 0; realHeight = 0; for (rect$iterator = new AbstractEList$EIterator(rectangles); rect$iterator.cursor != rect$iterator.this$01_2.size_1();) { rect = castTo($doNext(rect$iterator), 27); realWidth = $wnd.Math.max(realWidth, rect.x_0 + rect.width_0); realHeight = $wnd.Math.max(realHeight, rect.y_0 + rect.height); } translate_1(layoutGraph, new KVector_1($doubleValue(castToDouble($getProperty_0(layoutGraph, ($clinit_InternalProperties_4() , DRAWING_WIDTH)))), $doubleValue(castToDouble($getProperty_0(layoutGraph, DRAWING_HEIGHT)))), new KVector_1(realWidth, realHeight)); applyPadding(rectangles, padding); fixedGraphSize || resizeNode_1(layoutGraph, $doubleValue(castToDouble($getProperty_0(layoutGraph, DRAWING_WIDTH))) + (padding.left + padding.right), $doubleValue(castToDouble($getProperty_0(layoutGraph, DRAWING_HEIGHT))) + (padding.top_0 + padding.bottom), false, true); $booleanValue(castToBoolean($getProperty_0(layoutGraph, OMIT_NODE_MICRO_LAYOUT_3))) || $execute((builder = new NodeMicroLayout(($clinit_ElkGraphAdapters() , new ElkGraphAdapters$ElkGraphAdapter(layoutGraph))) , builder)); progressMonitor.done_1(); } ; var Lorg_eclipse_elk_alg_rectpacking_RectPackingLayoutProvider_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking', 'RectPackingLayoutProvider', 1118); function $process_104(graph, progressMonitor){ var elkNode, elkNode$iterator, elkNode$iterator0, elkNode$iterator1, elkNode$iterator2, fixedNodes, index_0, position, rectangles; progressMonitor.begin('Interactive Node Reorderer', 1); rectangles = (!graph.children && (graph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, graph, 10, 11)) , graph.children); fixedNodes = new ArrayList; for (elkNode$iterator0 = new AbstractEList$EIterator(rectangles); elkNode$iterator0.cursor != elkNode$iterator0.this$01_2.size_1();) { elkNode = castTo($doNext(elkNode$iterator0), 27); $hasProperty_0(elkNode, ($clinit_RectPackingOptions() , DESIRED_POSITION_0)) && (push_1(fixedNodes.array, elkNode) , true); } for (elkNode$iterator1 = new ArrayList$1(fixedNodes); elkNode$iterator1.i < elkNode$iterator1.this$01.array.length;) { elkNode = castTo($next_6(elkNode$iterator1), 27); $remove_32(rectangles, elkNode); } $clinit_Collections(); $sort(fixedNodes, new InteractiveNodeReorderer$lambda$0$Type); for (elkNode$iterator2 = new ArrayList$1(fixedNodes); elkNode$iterator2.i < elkNode$iterator2.this$01.array.length;) { elkNode = castTo($next_6(elkNode$iterator2), 27); position = castTo($getProperty_0(elkNode, ($clinit_RectPackingOptions() , DESIRED_POSITION_0)), 17).value_0; position = $wnd.Math.min(position, rectangles.size_0); $add_20(rectangles, position, elkNode); } index_0 = 0; for (elkNode$iterator = new AbstractEList$EIterator(rectangles); elkNode$iterator.cursor != elkNode$iterator.this$01_2.size_1();) { elkNode = castTo($doNext(elkNode$iterator), 27); $setProperty_1(elkNode, ($clinit_RectPackingOptions() , CURRENT_POSITION_0), valueOf_3(index_0)); ++index_0; } progressMonitor.done_1(); } function InteractiveNodeReorderer(){ } function lambda$0_38(a_0, b_1){ var positionA, positionB; positionA = castTo($getProperty_0(a_0, ($clinit_RectPackingOptions() , DESIRED_POSITION_0)), 17).value_0; positionB = castTo($getProperty_0(b_1, DESIRED_POSITION_0), 17).value_0; return positionA == positionB?-1:positionA < positionB?-1:positionA > positionB?1:0; } defineClass(1518, 1, $intern_105, InteractiveNodeReorderer); _.process = function process_100(graph, progressMonitor){ $process_104(castTo(graph, 27), progressMonitor); } ; var Lorg_eclipse_elk_alg_rectpacking_intermediate_InteractiveNodeReorderer_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.intermediate', 'InteractiveNodeReorderer', 1518); function InteractiveNodeReorderer$lambda$0$Type(){ } defineClass(1519, 1, $intern_88, InteractiveNodeReorderer$lambda$0$Type); _.compare_1 = function compare_107(arg0, arg1){ return lambda$0_38(castTo(arg0, 27), castTo(arg1, 27)); } ; _.equals_0 = function equals_194(other){ return this === other; } ; _.reversed = function reversed_99(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_alg_rectpacking_intermediate_InteractiveNodeReorderer$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.intermediate', 'InteractiveNodeReorderer/lambda$0$Type', 1519); function $clinit_IntermediateProcessorStrategy_2(){ $clinit_IntermediateProcessorStrategy_2 = emptyMethod; INTERACTIVE_NODE_REORDERER = new IntermediateProcessorStrategy_2('INTERACTIVE_NODE_REORDERER', 0); MIN_SIZE_PRE_PROCESSOR = new IntermediateProcessorStrategy_2('MIN_SIZE_PRE_PROCESSOR', 1); MIN_SIZE_POST_PROCESSOR = new IntermediateProcessorStrategy_2('MIN_SIZE_POST_PROCESSOR', 2); } function IntermediateProcessorStrategy_2(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_83(name_0){ $clinit_IntermediateProcessorStrategy_2(); return valueOf(($clinit_IntermediateProcessorStrategy$Map_2() , $MAP_73), name_0); } function values_91(){ $clinit_IntermediateProcessorStrategy_2(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_rectpacking_intermediate_IntermediateProcessorStrategy_2_classLit, 1), $intern_37, 456, 0, [INTERACTIVE_NODE_REORDERER, MIN_SIZE_PRE_PROCESSOR, MIN_SIZE_POST_PROCESSOR]); } defineClass(456, 22, {3:1, 34:1, 22:1, 456:1, 196:1}, IntermediateProcessorStrategy_2); _.create_1 = function create_26(){ switch (this.ordinal) { case 0: return new InteractiveNodeReorderer; case 1: return new MinSizePreProcessor; case 2: return new MinSizePostProcessor; } return null; } ; var INTERACTIVE_NODE_REORDERER, MIN_SIZE_POST_PROCESSOR, MIN_SIZE_PRE_PROCESSOR; var Lorg_eclipse_elk_alg_rectpacking_intermediate_IntermediateProcessorStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.rectpacking.intermediate', 'IntermediateProcessorStrategy', 456, Ljava_lang_Enum_2_classLit, values_91, valueOf_83); function $clinit_IntermediateProcessorStrategy$Map_2(){ $clinit_IntermediateProcessorStrategy$Map_2 = emptyMethod; $MAP_73 = createValueOfMap(($clinit_IntermediateProcessorStrategy_2() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_rectpacking_intermediate_IntermediateProcessorStrategy_2_classLit, 1), $intern_37, 456, 0, [INTERACTIVE_NODE_REORDERER, MIN_SIZE_PRE_PROCESSOR, MIN_SIZE_POST_PROCESSOR]))); } var $MAP_73; function $process_105(graph, progressMonitor){ progressMonitor.begin('Min Size Postprocessing', 1); $setProperty_1(graph, ($clinit_InternalProperties_4() , TARGET_WIDTH), $wnd.Math.max($doubleValue(castToDouble($getProperty_0(graph, TARGET_WIDTH))), $doubleValue(castToDouble($getProperty_0(graph, MIN_WIDTH_0))))); progressMonitor.done_1(); } function MinSizePostProcessor(){ } defineClass(1521, 1, $intern_105, MinSizePostProcessor); _.process = function process_101(graph, progressMonitor){ $process_105(castTo(graph, 27), progressMonitor); } ; var Lorg_eclipse_elk_alg_rectpacking_intermediate_MinSizePostProcessor_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.intermediate', 'MinSizePostProcessor', 1521); function $process_106(graph, progressMonitor){ var minSize; progressMonitor.begin('Min Size Preprocessing', 1); minSize = effectiveMinSizeConstraintFor(graph); $setProperty_1(graph, ($clinit_InternalProperties_4() , MIN_WIDTH_0), minSize.x_0); $setProperty_1(graph, MIN_HEIGHT, minSize.y_0); progressMonitor.done_1(); } function MinSizePreProcessor(){ } defineClass(1520, 1, $intern_105, MinSizePreProcessor); _.process = function process_102(graph, progressMonitor){ $process_106(castTo(graph, 27), progressMonitor); } ; var Lorg_eclipse_elk_alg_rectpacking_intermediate_MinSizePreProcessor_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.intermediate', 'MinSizePreProcessor', 1520); function $clinit_InternalProperties_4(){ $clinit_InternalProperties_4 = emptyMethod; ADDITIONAL_HEIGHT = new Property('additionalHeight'); DRAWING_HEIGHT = new Property('drawingHeight'); DRAWING_WIDTH = new Property('drawingWidth'); MIN_HEIGHT = new Property('minHeight'); MIN_WIDTH_0 = new Property('minWidth'); ROWS_0 = new Property('rows'); TARGET_WIDTH = new Property('targetWidth'); MIN_ROW_INCREASE = new Property_0('minRowIncrease', 0); MAX_ROW_INCREASE = new Property_0('maxRowIncrease', 0); MIN_ROW_DECREASE = new Property_0('minRowDecrease', 0); MAX_ROW_DECREASE = new Property_0('maxRowDecrease', 0); } var ADDITIONAL_HEIGHT, DRAWING_HEIGHT, DRAWING_WIDTH, MAX_ROW_DECREASE, MAX_ROW_INCREASE, MIN_HEIGHT, MIN_ROW_DECREASE, MIN_ROW_INCREASE, MIN_WIDTH_0, ROWS_0, TARGET_WIDTH; function $clinit_OptimizationGoal(){ $clinit_OptimizationGoal = emptyMethod; ASPECT_RATIO_DRIVEN = new OptimizationGoal('ASPECT_RATIO_DRIVEN', 0); MAX_SCALE_DRIVEN = new OptimizationGoal('MAX_SCALE_DRIVEN', 1); AREA_DRIVEN = new OptimizationGoal('AREA_DRIVEN', 2); } function OptimizationGoal(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_84(name_0){ $clinit_OptimizationGoal(); return valueOf(($clinit_OptimizationGoal$Map() , $MAP_74), name_0); } function values_92(){ $clinit_OptimizationGoal(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_rectpacking_options_OptimizationGoal_2_classLit, 1), $intern_37, 394, 0, [ASPECT_RATIO_DRIVEN, MAX_SCALE_DRIVEN, AREA_DRIVEN]); } defineClass(394, 22, {3:1, 34:1, 22:1, 394:1}, OptimizationGoal); var AREA_DRIVEN, ASPECT_RATIO_DRIVEN, MAX_SCALE_DRIVEN; var Lorg_eclipse_elk_alg_rectpacking_options_OptimizationGoal_2_classLit = createForEnum('org.eclipse.elk.alg.rectpacking.options', 'OptimizationGoal', 394, Ljava_lang_Enum_2_classLit, values_92, valueOf_84); function $clinit_OptimizationGoal$Map(){ $clinit_OptimizationGoal$Map = emptyMethod; $MAP_74 = createValueOfMap(($clinit_OptimizationGoal() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_rectpacking_options_OptimizationGoal_2_classLit, 1), $intern_37, 394, 0, [ASPECT_RATIO_DRIVEN, MAX_SCALE_DRIVEN, AREA_DRIVEN]))); } var $MAP_74; function $clinit_RectPackingMetaDataProvider(){ $clinit_RectPackingMetaDataProvider = emptyMethod; TRYBOX = new Property_1('org.eclipse.elk.rectpacking.trybox', ($clinit_Boolean() , false)); valueOf_3(-1); CURRENT_POSITION = new Property_1('org.eclipse.elk.rectpacking.currentPosition', valueOf_3(-1)); valueOf_3(-1); DESIRED_POSITION = new Property_1('org.eclipse.elk.rectpacking.desiredPosition', valueOf_3(-1)); IN_NEW_ROW = new Property_1('org.eclipse.elk.rectpacking.inNewRow', false); WIDTH_APPROXIMATION_STRATEGY_DEFAULT = ($clinit_WidthApproximationStrategy() , GREEDY_1); WIDTH_APPROXIMATION_STRATEGY = new Property_1('org.eclipse.elk.rectpacking.widthApproximation.strategy', WIDTH_APPROXIMATION_STRATEGY_DEFAULT); WIDTH_APPROXIMATION_TARGET_WIDTH = new Property_1('org.eclipse.elk.rectpacking.widthApproximation.targetWidth', -1); WIDTH_APPROXIMATION_OPTIMIZATION_GOAL_DEFAULT = ($clinit_OptimizationGoal() , MAX_SCALE_DRIVEN); WIDTH_APPROXIMATION_OPTIMIZATION_GOAL = new Property_1('org.eclipse.elk.rectpacking.widthApproximation.optimizationGoal', WIDTH_APPROXIMATION_OPTIMIZATION_GOAL_DEFAULT); WIDTH_APPROXIMATION_LAST_PLACE_SHIFT = new Property_1('org.eclipse.elk.rectpacking.widthApproximation.lastPlaceShift', true); PACKING_STRATEGY_DEFAULT = ($clinit_PackingStrategy() , COMPACTION_2); PACKING_STRATEGY = new Property_1('org.eclipse.elk.rectpacking.packing.strategy', PACKING_STRATEGY_DEFAULT); PACKING_COMPACTION_ROW_HEIGHT_REEVALUATION = new Property_1('org.eclipse.elk.rectpacking.packing.compaction.rowHeightReevaluation', false); valueOf_3(1); PACKING_COMPACTION_ITERATIONS = new Property_1('org.eclipse.elk.rectpacking.packing.compaction.iterations', valueOf_3(1)); WHITE_SPACE_ELIMINATION_STRATEGY = new Property('org.eclipse.elk.rectpacking.whiteSpaceElimination.strategy'); } function RectPackingMetaDataProvider(){ $clinit_RectPackingMetaDataProvider(); } defineClass(867, 1, $intern_90, RectPackingMetaDataProvider); _.apply_4 = function apply_169(registry){ $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.rectpacking.trybox'), ''), 'Try box layout first'), 'Whether one should check whether the regions are stackable to see whether box layout would do the job. For example, nodes with the same height are not stackable inside a row. Therefore, box layout will perform better and faster.'), ($clinit_Boolean() , false)), ($clinit_LayoutOptionData$Type() , BOOLEAN)), Ljava_lang_Boolean_2_classLit), of_1(($clinit_LayoutOptionData$Target() , PARENTS))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.rectpacking.currentPosition'), ''), 'Current position of a node in the order of nodes'), 'The rectangles are ordered. Normally according to their definition the the model. This option specifies the current position of a node.'), valueOf_3(-1)), INT), Ljava_lang_Integer_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.rectpacking.desiredPosition'), ''), 'Desired index of node'), 'The rectangles are ordered. Normally according to their definition the the model. This option allows to specify a desired position that has preference over the original position.'), valueOf_3(-1)), INT), Ljava_lang_Integer_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.rectpacking.inNewRow'), ''), 'In new Row'), 'If set to true this node begins in a new row. Consequently this node cannot be moved in a previous layer during compaction. Width approximation does does not take this into account.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.rectpacking.widthApproximation.strategy'), 'widthApproximation'), 'Width Approximation Strategy'), 'Strategy for finding an initial width of the drawing.'), WIDTH_APPROXIMATION_STRATEGY_DEFAULT), ENUM), Lorg_eclipse_elk_alg_rectpacking_p1widthapproximation_WidthApproximationStrategy_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.rectpacking.widthApproximation.targetWidth'), 'widthApproximation'), 'Target Width'), 'Option to place the rectangles in the given target width instead of approximating the width using the desired aspect ratio. The padding is not included in this. Meaning a drawing will have width of targetwidth + horizontal padding.'), -1), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.rectpacking.widthApproximation.optimizationGoal'), 'widthApproximation'), 'Optimization Goal'), 'Optimization goal for approximation of the bounding box given by the first iteration. Determines whether layout is sorted by the maximum scaling, aspect ratio, or area. Depending on the strategy the aspect ratio might be nearly ignored.'), WIDTH_APPROXIMATION_OPTIMIZATION_GOAL_DEFAULT), ENUM), Lorg_eclipse_elk_alg_rectpacking_options_OptimizationGoal_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.rectpacking.widthApproximation.lastPlaceShift'), 'widthApproximation'), 'Shift Last Placed.'), 'When placing a rectangle behind or below the last placed rectangle in the first iteration, it is sometimes possible to shift the rectangle further to the left or right, resulting in less whitespace. True (default) enables the shift and false disables it. Disabling the shift produces a greater approximated area by the first iteration and a layout, when using ONLY the first iteration (default not the case), where it is sometimes impossible to implement a size transformation of rectangles that will fill the bounding box and eliminate empty spaces.'), true), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.rectpacking.packing.strategy'), 'packing'), 'Compaction Strategy'), 'Strategy for finding an initial placement on nodes.'), PACKING_STRATEGY_DEFAULT), ENUM), Lorg_eclipse_elk_alg_rectpacking_p2packing_PackingStrategy_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.rectpacking.packing.compaction.rowHeightReevaluation'), 'packing.compaction'), 'Row Height Reevaluation'), 'During the compaction step the height of a row is normally not changed. If this options is set, the blocks of other rows might be added if they exceed the row height. If this is the case the whole row has to be packed again to be optimal regarding the new row height. This option should, therefore, be used with care since it might be computation heavy.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.rectpacking.packing.compaction.iterations'), 'packing.compaction'), 'Compaction iterations'), 'Defines the number of compaction iterations. E.g. if set to 2 the width is initially approximated, then the drawing is compacted and based on the resulting drawing the target width is decreased or increased and a second compaction step is executed and the result compared to the first one. The best run is used based on the scale measure.'), valueOf_3(1)), INT), Ljava_lang_Integer_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.rectpacking.whiteSpaceElimination.strategy'), 'whiteSpaceElimination'), 'White Space Approximation Strategy'), 'Strategy for expanding nodes such that whitespace in the parent is eliminated.'), ENUM), Lorg_eclipse_elk_alg_rectpacking_p3whitespaceelimination_WhiteSpaceEliminationStrategy_2_classLit), of_1(PARENTS)))); $apply_21((new RectPackingOptions , registry)); } ; var CURRENT_POSITION, DESIRED_POSITION, IN_NEW_ROW, PACKING_COMPACTION_ITERATIONS, PACKING_COMPACTION_ROW_HEIGHT_REEVALUATION, PACKING_STRATEGY, PACKING_STRATEGY_DEFAULT, TRYBOX, WHITE_SPACE_ELIMINATION_STRATEGY, WIDTH_APPROXIMATION_LAST_PLACE_SHIFT, WIDTH_APPROXIMATION_OPTIMIZATION_GOAL, WIDTH_APPROXIMATION_OPTIMIZATION_GOAL_DEFAULT, WIDTH_APPROXIMATION_STRATEGY, WIDTH_APPROXIMATION_STRATEGY_DEFAULT, WIDTH_APPROXIMATION_TARGET_WIDTH; var Lorg_eclipse_elk_alg_rectpacking_options_RectPackingMetaDataProvider_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.options', 'RectPackingMetaDataProvider', 867); function $clinit_RectPackingOptions(){ $clinit_RectPackingOptions = emptyMethod; ASPECT_RATIO_3 = new Property_2(($clinit_CoreOptions() , ASPECT_RATIO_5), 1.3); NODE_SIZE_FIXED_GRAPH_SIZE_2 = new Property_2(NODE_SIZE_FIXED_GRAPH_SIZE_3, ($clinit_Boolean() , false)); PADDING_DEFAULT_2 = new ElkPadding_0(15); PADDING_3 = new Property_2(PADDING_6, PADDING_DEFAULT_2); SPACING_NODE_NODE_3 = new Property_2(SPACING_NODE_NODE_6, 15); CONTENT_ALIGNMENT_0 = CONTENT_ALIGNMENT_2; NODE_SIZE_CONSTRAINTS_4 = NODE_SIZE_CONSTRAINTS_6; NODE_SIZE_MINIMUM_3 = NODE_SIZE_MINIMUM_5; NODE_SIZE_OPTIONS_4 = NODE_SIZE_OPTIONS_6; NODE_LABELS_PLACEMENT_4 = NODE_LABELS_PLACEMENT_5; OMIT_NODE_MICRO_LAYOUT_3 = OMIT_NODE_MICRO_LAYOUT_4; PORT_LABELS_PLACEMENT_4 = PORT_LABELS_PLACEMENT_5; WIDTH_APPROXIMATION_OPTIMIZATION_GOAL_0 = ($clinit_RectPackingMetaDataProvider() , WIDTH_APPROXIMATION_OPTIMIZATION_GOAL); WIDTH_APPROXIMATION_LAST_PLACE_SHIFT_0 = WIDTH_APPROXIMATION_LAST_PLACE_SHIFT; WIDTH_APPROXIMATION_TARGET_WIDTH_0 = WIDTH_APPROXIMATION_TARGET_WIDTH; WIDTH_APPROXIMATION_STRATEGY_0 = WIDTH_APPROXIMATION_STRATEGY; PACKING_STRATEGY_0 = PACKING_STRATEGY; PACKING_COMPACTION_ROW_HEIGHT_REEVALUATION_0 = PACKING_COMPACTION_ROW_HEIGHT_REEVALUATION; PACKING_COMPACTION_ITERATIONS_0 = PACKING_COMPACTION_ITERATIONS; WHITE_SPACE_ELIMINATION_STRATEGY_0 = WHITE_SPACE_ELIMINATION_STRATEGY; INTERACTIVE_6 = INTERACTIVE_8; INTERACTIVE_LAYOUT_1 = INTERACTIVE_LAYOUT_2; DESIRED_POSITION_0 = DESIRED_POSITION; CURRENT_POSITION_0 = CURRENT_POSITION; IN_NEW_ROW_0 = IN_NEW_ROW; TRYBOX_0 = TRYBOX; } function $apply_21(registry){ $register(registry, new LayoutAlgorithmData($providerFactory($description($name_0($id(new LayoutAlgorithmData$Builder, 'org.eclipse.elk.rectpacking'), 'ELK Rectangle Packing'), 'Algorithm for packing of unconnected boxes, i.e. graphs without edges. The given order of the boxes is always preserved and the main reading direction of the boxes is left to right. The algorithm is divided into two phases. One phase approximates the width in which the rectangles can be placed. The next phase places the rectangles in rows using the previously calculated width as bounding width and bundles rectangles with a similar height in blocks. A compaction step reduces the size of the drawing. Finally, the rectangles are expanded to fill their bounding box and eliminate empty unused spaces.'), new RectPackingOptions$RectpackingFactory))); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.aspectRatio', 1.3); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.nodeSize.fixedGraphSize', ($clinit_Boolean() , false)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.padding', PADDING_DEFAULT_2); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.spacing.nodeNode', 15); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.contentAlignment', $getDefault(CONTENT_ALIGNMENT_0)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.nodeSize.constraints', $getDefault(NODE_SIZE_CONSTRAINTS_4)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.nodeSize.minimum', $getDefault(NODE_SIZE_MINIMUM_3)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.nodeSize.options', $getDefault(NODE_SIZE_OPTIONS_4)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.nodeLabels.placement', $getDefault(NODE_LABELS_PLACEMENT_4)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.omitNodeMicroLayout', $getDefault(OMIT_NODE_MICRO_LAYOUT_3)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.portLabels.placement', $getDefault(PORT_LABELS_PLACEMENT_4)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.rectpacking.widthApproximation.optimizationGoal', $getDefault(WIDTH_APPROXIMATION_OPTIMIZATION_GOAL_0)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.rectpacking.widthApproximation.lastPlaceShift', $getDefault(WIDTH_APPROXIMATION_LAST_PLACE_SHIFT_0)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.rectpacking.widthApproximation.targetWidth', $getDefault(WIDTH_APPROXIMATION_TARGET_WIDTH_0)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.rectpacking.widthApproximation.strategy', $getDefault(WIDTH_APPROXIMATION_STRATEGY_0)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.rectpacking.packing.strategy', $getDefault(PACKING_STRATEGY_0)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.rectpacking.packing.compaction.rowHeightReevaluation', $getDefault(PACKING_COMPACTION_ROW_HEIGHT_REEVALUATION_0)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.rectpacking.packing.compaction.iterations', $getDefault(PACKING_COMPACTION_ITERATIONS_0)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.rectpacking.whiteSpaceElimination.strategy', $getDefault(WHITE_SPACE_ELIMINATION_STRATEGY_0)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.interactive', $getDefault(INTERACTIVE_6)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.interactiveLayout', $getDefault(INTERACTIVE_LAYOUT_1)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.rectpacking.desiredPosition', $getDefault(DESIRED_POSITION_0)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.rectpacking.currentPosition', $getDefault(CURRENT_POSITION_0)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.rectpacking.inNewRow', $getDefault(IN_NEW_ROW_0)); $addOptionSupport(registry, 'org.eclipse.elk.rectpacking', 'org.eclipse.elk.rectpacking.trybox', $getDefault(TRYBOX_0)); } function RectPackingOptions(){ $clinit_RectPackingOptions(); } defineClass(1016, 1, $intern_90, RectPackingOptions); _.apply_4 = function apply_170(registry){ $apply_21(registry); } ; var ASPECT_RATIO_3, CONTENT_ALIGNMENT_0, CURRENT_POSITION_0, DESIRED_POSITION_0, INTERACTIVE_6, INTERACTIVE_LAYOUT_1, IN_NEW_ROW_0, NODE_LABELS_PLACEMENT_4, NODE_SIZE_CONSTRAINTS_4, NODE_SIZE_FIXED_GRAPH_SIZE_2, NODE_SIZE_MINIMUM_3, NODE_SIZE_OPTIONS_4, OMIT_NODE_MICRO_LAYOUT_3, PACKING_COMPACTION_ITERATIONS_0, PACKING_COMPACTION_ROW_HEIGHT_REEVALUATION_0, PACKING_STRATEGY_0, PADDING_3, PADDING_DEFAULT_2, PORT_LABELS_PLACEMENT_4, SPACING_NODE_NODE_3, TRYBOX_0, WHITE_SPACE_ELIMINATION_STRATEGY_0, WIDTH_APPROXIMATION_LAST_PLACE_SHIFT_0, WIDTH_APPROXIMATION_OPTIMIZATION_GOAL_0, WIDTH_APPROXIMATION_STRATEGY_0, WIDTH_APPROXIMATION_TARGET_WIDTH_0; var Lorg_eclipse_elk_alg_rectpacking_options_RectPackingOptions_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.options', 'RectPackingOptions', 1016); function RectPackingOptions$RectpackingFactory(){ } defineClass(1017, 1, {}, RectPackingOptions$RectpackingFactory); _.create_0 = function create_27(){ var provider; return provider = new RectPackingLayoutProvider , provider; } ; _.destroy = function destroy_5(obj){ } ; var Lorg_eclipse_elk_alg_rectpacking_options_RectPackingOptions$RectpackingFactory_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.options', 'RectPackingOptions/RectpackingFactory', 1017); function $approxBoundingBox(this$static, rectangles, nodeNodeSpacing, padding){ var bestOpt, currentValues, firstRect, lastPlaced, opt1, opt2, opt3, opt4, placedRects, rectangleIdx, toPlace; firstRect = castTo($get_20(rectangles, 0), 27); $setX_2(firstRect, 0); $setY_3(firstRect, 0); placedRects = new ArrayList; push_1(placedRects.array, firstRect); lastPlaced = firstRect; currentValues = new DrawingData(this$static.aspectRatio, firstRect.width_0, firstRect.height, ($clinit_DrawingDataDescriptor() , WHOLE_DRAWING)); for (rectangleIdx = 1; rectangleIdx < rectangles.size_0; rectangleIdx++) { toPlace = castTo($get_20(rectangles, rectangleIdx), 27); opt1 = $calcValuesForOpt(this$static, CANDIDATE_POSITION_LAST_PLACED_RIGHT, toPlace, lastPlaced, currentValues, placedRects, nodeNodeSpacing); opt2 = $calcValuesForOpt(this$static, CANDIDATE_POSITION_LAST_PLACED_BELOW, toPlace, lastPlaced, currentValues, placedRects, nodeNodeSpacing); opt3 = $calcValuesForOpt(this$static, CANDIDATE_POSITION_WHOLE_DRAWING_RIGHT, toPlace, lastPlaced, currentValues, placedRects, nodeNodeSpacing); opt4 = $calcValuesForOpt(this$static, CANDIDATE_POSITION_WHOLE_DRAWING_BELOW, toPlace, lastPlaced, currentValues, placedRects, nodeNodeSpacing); bestOpt = $findBestCandidate(this$static, opt1, opt2, opt3, opt4, toPlace, lastPlaced, padding); $setX_2(toPlace, bestOpt.nextXcoordinate); $setY_3(toPlace, bestOpt.nextYcoordinate); $setPlacementOption(bestOpt, WHOLE_DRAWING); currentValues = bestOpt; lastPlaced = toPlace; push_1(placedRects.array, toPlace); } return currentValues; } function $calcValuesForOpt(this$static, option, toPlace, lastPlaced, drawing, placedRects, nodeNodeSpacing){ var drawingHeight, drawingWidth, height, heightToPlace, newDrawing, width_0, widthToPlace, x_0, y_0; x_0 = 0; y_0 = 0; drawingWidth = drawing.drawingWidth; drawingHeight = drawing.drawingHeight; heightToPlace = toPlace.height; widthToPlace = toPlace.width_0; switch (option.ordinal) { case 0: x_0 = lastPlaced.x_0 + lastPlaced.width_0 + nodeNodeSpacing; this$static.lpShift?(y_0 = calculateYforLPR(x_0, placedRects, lastPlaced, nodeNodeSpacing)):(y_0 = lastPlaced.y_0); width_0 = $wnd.Math.max(drawingWidth, x_0 + widthToPlace); height = $wnd.Math.max(drawingHeight, y_0 + heightToPlace); break; case 1: y_0 = lastPlaced.y_0 + lastPlaced.height + nodeNodeSpacing; this$static.lpShift?(x_0 = calculateXforLPB(y_0, placedRects, lastPlaced, nodeNodeSpacing)):(x_0 = lastPlaced.x_0); width_0 = $wnd.Math.max(drawingWidth, x_0 + widthToPlace); height = $wnd.Math.max(drawingHeight, y_0 + heightToPlace); break; case 2: x_0 = drawingWidth + nodeNodeSpacing; y_0 = 0; width_0 = drawingWidth + nodeNodeSpacing + widthToPlace; height = $wnd.Math.max(drawingHeight, heightToPlace); break; case 3: x_0 = 0; y_0 = drawingHeight + nodeNodeSpacing; width_0 = $wnd.Math.max(drawingWidth, widthToPlace); height = drawingHeight + nodeNodeSpacing + heightToPlace; break; default:throw toJs(new IllegalArgumentException_0('IllegalPlacementOption.')); } newDrawing = new DrawingData_0(this$static.aspectRatio, width_0, height, option, x_0, y_0); return newDrawing; } function $checkSpecialCases(drawing1, drawing2, lastPlaced, toPlace){ var areaLPB, areaLPR, firstOpt, firstOptLPBorCDB, firstOptLPRorCDR, firstOptLPRorLPB, lpbOpt, lprOpt, secondOpt, secondOptLPBorCDB, secondOptLPRorCDR, secondOptLPRorLPB, lastPlacedBottomBorder, toPlaceBottomBorder, maxYLPR, heightLPR, widthLPR, lastPlacedRightBorder, toPlaceRightBorder, maxXLPB, widthLPB, heightLPB; firstOpt = drawing1.placementOption; secondOpt = drawing2.placementOption; firstOptLPBorCDB = firstOpt == ($clinit_DrawingDataDescriptor() , CANDIDATE_POSITION_LAST_PLACED_BELOW) || firstOpt == CANDIDATE_POSITION_WHOLE_DRAWING_BELOW; secondOptLPBorCDB = secondOpt == CANDIDATE_POSITION_LAST_PLACED_BELOW || secondOpt == CANDIDATE_POSITION_WHOLE_DRAWING_BELOW; firstOptLPRorCDR = firstOpt == CANDIDATE_POSITION_LAST_PLACED_RIGHT || firstOpt == CANDIDATE_POSITION_WHOLE_DRAWING_RIGHT; secondOptLPRorCDR = secondOpt == CANDIDATE_POSITION_LAST_PLACED_RIGHT || secondOpt == CANDIDATE_POSITION_WHOLE_DRAWING_RIGHT; firstOptLPRorLPB = firstOpt == CANDIDATE_POSITION_LAST_PLACED_RIGHT || firstOpt == CANDIDATE_POSITION_LAST_PLACED_BELOW; secondOptLPRorLPB = secondOpt == CANDIDATE_POSITION_LAST_PLACED_RIGHT || secondOpt == CANDIDATE_POSITION_LAST_PLACED_BELOW; if (firstOptLPBorCDB && secondOptLPBorCDB) { return drawing1.placementOption == CANDIDATE_POSITION_WHOLE_DRAWING_BELOW?drawing1:drawing2; } else if (firstOptLPRorCDR && secondOptLPRorCDR) { return drawing1.placementOption == CANDIDATE_POSITION_WHOLE_DRAWING_RIGHT?drawing1:drawing2; } else if (firstOptLPRorLPB && secondOptLPRorLPB) { if (firstOpt == CANDIDATE_POSITION_LAST_PLACED_RIGHT) { lprOpt = drawing1; lpbOpt = drawing2; } else { lprOpt = drawing2; lpbOpt = drawing1; } areaLPR = (lastPlacedBottomBorder = lastPlaced.y_0 + lastPlaced.height , toPlaceBottomBorder = lprOpt.nextYcoordinate + toPlace.height , maxYLPR = $wnd.Math.max(lastPlacedBottomBorder, toPlaceBottomBorder) , heightLPR = maxYLPR - $wnd.Math.min(lastPlaced.y_0, lprOpt.nextYcoordinate) , widthLPR = lprOpt.nextXcoordinate + toPlace.width_0 - lastPlaced.x_0 , widthLPR * heightLPR); areaLPB = (lastPlacedRightBorder = lastPlaced.x_0 + lastPlaced.width_0 , toPlaceRightBorder = lpbOpt.nextXcoordinate + toPlace.width_0 , maxXLPB = $wnd.Math.max(lastPlacedRightBorder, toPlaceRightBorder) , widthLPB = maxXLPB - $wnd.Math.min(lastPlaced.x_0, lpbOpt.nextXcoordinate) , heightLPB = lpbOpt.nextYcoordinate + toPlace.height - lastPlaced.y_0 , widthLPB * heightLPB); return areaLPR <= areaLPB?drawing1.placementOption == CANDIDATE_POSITION_LAST_PLACED_RIGHT?drawing1:drawing2:drawing1.placementOption == CANDIDATE_POSITION_LAST_PLACED_BELOW?drawing1:drawing2; } return drawing1; } function $findBestCandidate(this$static, opt1, opt2, opt3, opt4, toPlace, lastPlaced, padding){ var candidates, filter, filter$iterator, filters; candidates = newArrayList_1(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_rectpacking_util_DrawingData_2_classLit, 1), $intern_2, 238, 0, [opt1, opt2, opt3, opt4])); filters = null; switch (this$static.goal.ordinal) { case 1: filters = newArrayList_1(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_rectpacking_p1widthapproximation_BestCandidateFilter_2_classLit, 1), $intern_2, 535, 0, [new ScaleMeasureFilter, new AreaFilter, new AspectRatioFilter])); break; case 0: filters = newArrayList_1(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_rectpacking_p1widthapproximation_BestCandidateFilter_2_classLit, 1), $intern_2, 535, 0, [new AspectRatioFilter, new AreaFilter, new ScaleMeasureFilter])); break; case 2: filters = newArrayList_1(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_rectpacking_p1widthapproximation_BestCandidateFilter_2_classLit, 1), $intern_2, 535, 0, [new AreaFilter, new ScaleMeasureFilter, new AspectRatioFilter])); } for (filter$iterator = new ArrayList$1(filters); filter$iterator.i < filter$iterator.this$01.array.length;) { filter = castTo($next_6(filter$iterator), 535); candidates.array.length > 1 && (candidates = filter.filterList(candidates, this$static.aspectRatio, padding)); } if (candidates.array.length == 1) { return castTo($get_11(candidates, candidates.array.length - 1), 238); } if (candidates.array.length == 2) { return $checkSpecialCases((checkCriticalElementIndex(0, candidates.array.length) , castTo(candidates.array[0], 238)), (checkCriticalElementIndex(1, candidates.array.length) , castTo(candidates.array[1], 238)), lastPlaced, toPlace); } return null; } function AreaApproximation(aspectRatio, goal, lpShift){ this.aspectRatio = aspectRatio; this.goal = goal; this.lpShift = lpShift; } defineClass(1705, 1, {}, AreaApproximation); _.aspectRatio = 0; _.lpShift = false; var Lorg_eclipse_elk_alg_rectpacking_p1widthapproximation_AreaApproximation_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.p1widthapproximation', 'AreaApproximation', 1705); var Lorg_eclipse_elk_alg_rectpacking_p1widthapproximation_BestCandidateFilter_2_classLit = createForInterface('org.eclipse.elk.alg.rectpacking.p1widthapproximation', 'BestCandidateFilter'); function AreaFilter(){ } defineClass(673, 1, {535:1}, AreaFilter); _.filterList = function filterList(candidates, aspectRatio, padding){ var candidate, candidate$iterator, minArea, opt, opt$iterator, remainingCandidates; remainingCandidates = new ArrayList; minArea = $intern_60; for (opt$iterator = new ArrayList$1(candidates); opt$iterator.i < opt$iterator.this$01.array.length;) { opt = castTo($next_6(opt$iterator), 238); minArea = $wnd.Math.min(minArea, (opt.drawingWidth + (padding.left + padding.right)) * (opt.drawingHeight + (padding.top_0 + padding.bottom))); } for (candidate$iterator = new ArrayList$1(candidates); candidate$iterator.i < candidate$iterator.this$01.array.length;) { candidate = castTo($next_6(candidate$iterator), 238); (candidate.drawingWidth + (padding.left + padding.right)) * (candidate.drawingHeight + (padding.top_0 + padding.bottom)) == minArea && (push_1(remainingCandidates.array, candidate) , true); } return remainingCandidates; } ; var Lorg_eclipse_elk_alg_rectpacking_p1widthapproximation_AreaFilter_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.p1widthapproximation', 'AreaFilter', 673); function AspectRatioFilter(){ } defineClass(674, 1, {535:1}, AspectRatioFilter); _.filterList = function filterList_0(candidates, aspectRatio, padding){ var candidate, candidate$iterator, opt, opt$iterator, remainingCandidates, smallestDeviation; remainingCandidates = new ArrayList; smallestDeviation = $intern_60; for (opt$iterator = new ArrayList$1(candidates); opt$iterator.i < opt$iterator.this$01.array.length;) { opt = castTo($next_6(opt$iterator), 238); smallestDeviation = $wnd.Math.min(smallestDeviation, $wnd.Math.abs((opt.drawingWidth + (padding.left + padding.right)) / (opt.drawingHeight + (padding.top_0 + padding.bottom)) - aspectRatio)); } for (candidate$iterator = new ArrayList$1(candidates); candidate$iterator.i < candidate$iterator.this$01.array.length;) { candidate = castTo($next_6(candidate$iterator), 238); $wnd.Math.abs((candidate.drawingWidth + (padding.left + padding.right)) / (candidate.drawingHeight + (padding.top_0 + padding.bottom)) - aspectRatio) == smallestDeviation && (push_1(remainingCandidates.array, candidate) , true); } return remainingCandidates; } ; var Lorg_eclipse_elk_alg_rectpacking_p1widthapproximation_AspectRatioFilter_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.p1widthapproximation', 'AspectRatioFilter', 674); function calculateXforLPB(y_0, placedRects, lastPlaced, nodeNodeSpacing){ var closestLeftNeighbour, closestNeighborRightBorder, placedRect, placedRect$iterator, placedRectRightBorder; closestLeftNeighbour = null; closestNeighborRightBorder = 0; for (placedRect$iterator = new ArrayList$1(placedRects); placedRect$iterator.i < placedRect$iterator.this$01.array.length;) { placedRect = castTo($next_6(placedRect$iterator), 27); placedRectRightBorder = placedRect.x_0 + placedRect.width_0; if (y_0 < placedRect.y_0 + placedRect.height + nodeNodeSpacing) { !closestLeftNeighbour?(closestLeftNeighbour = placedRect):lastPlaced.x_0 - placedRectRightBorder < lastPlaced.x_0 - closestNeighborRightBorder && (closestLeftNeighbour = placedRect); closestNeighborRightBorder = closestLeftNeighbour.x_0 + closestLeftNeighbour.width_0; } } return !closestLeftNeighbour?0:closestNeighborRightBorder + nodeNodeSpacing; } function calculateYforLPR(x_0, placedRects, lastPlaced, nodeNodeSpacing){ var closestNeighborBottomBorder, closestUpperNeighbor, placedRect, placedRect$iterator, placedRectBottomBorder; closestUpperNeighbor = null; closestNeighborBottomBorder = 0; for (placedRect$iterator = new ArrayList$1(placedRects); placedRect$iterator.i < placedRect$iterator.this$01.array.length;) { placedRect = castTo($next_6(placedRect$iterator), 27); placedRectBottomBorder = placedRect.y_0 + placedRect.height; if (x_0 < placedRect.x_0 + placedRect.width_0 + nodeNodeSpacing) { !closestUpperNeighbor?(closestUpperNeighbor = placedRect):lastPlaced.y_0 - placedRectBottomBorder < lastPlaced.y_0 - closestNeighborBottomBorder && (closestUpperNeighbor = placedRect); closestNeighborBottomBorder = closestUpperNeighbor.y_0 + closestUpperNeighbor.height; } } return !closestUpperNeighbor?0:closestNeighborBottomBorder + nodeNodeSpacing; } function $process_107(graph, progressMonitor){ var aspectRatio, drawing, firstIt, goal, lastPlaceShift, nodeNodeSpacing, padding, rectangles; progressMonitor.begin('Greedy Width Approximator', 1); aspectRatio = $doubleValue(castToDouble($getProperty_0(graph, ($clinit_RectPackingOptions() , ASPECT_RATIO_3)))); padding = castTo($getProperty_0(graph, PADDING_3), 107); goal = castTo($getProperty_0(graph, WIDTH_APPROXIMATION_OPTIMIZATION_GOAL_0), 394); lastPlaceShift = $booleanValue(castToBoolean($getProperty_0(graph, WIDTH_APPROXIMATION_LAST_PLACE_SHIFT_0))); nodeNodeSpacing = $doubleValue(castToDouble($getProperty_0(graph, SPACING_NODE_NODE_3))); rectangles = (!graph.children && (graph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, graph, 10, 11)) , graph.children); resetCoordinates(rectangles); firstIt = new AreaApproximation(aspectRatio, goal, lastPlaceShift); drawing = $approxBoundingBox(firstIt, rectangles, nodeNodeSpacing, padding); $setProperty_1(graph, ($clinit_InternalProperties_4() , TARGET_WIDTH), drawing.drawingWidth); progressMonitor.done_1(); } function GreedyWidthApproximator(){ } defineClass(1469, 1, $intern_113, GreedyWidthApproximator); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_29(graph){ return castTo(graph, 27) , null; } ; _.process = function process_103(graph, progressMonitor){ $process_107(castTo(graph, 27), progressMonitor); } ; var Lorg_eclipse_elk_alg_rectpacking_p1widthapproximation_GreedyWidthApproximator_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.p1widthapproximation', 'GreedyWidthApproximator', 1469); function ScaleMeasureFilter(){ } defineClass(672, 1, {535:1}, ScaleMeasureFilter); _.filterList = function filterList_1(candidates, aspectRatio, padding){ var candidate, candidate$iterator, maxScale, opt, opt$iterator, remainingCandidates; remainingCandidates = new ArrayList; maxScale = $intern_61; for (opt$iterator = new ArrayList$1(candidates); opt$iterator.i < opt$iterator.this$01.array.length;) { opt = castTo($next_6(opt$iterator), 238); maxScale = $wnd.Math.max(maxScale, computeScaleMeasure(opt.drawingWidth + (padding.left + padding.right), opt.drawingHeight + (padding.top_0 + padding.bottom), opt.dar)); } for (candidate$iterator = new ArrayList$1(candidates); candidate$iterator.i < candidate$iterator.this$01.array.length;) { candidate = castTo($next_6(candidate$iterator), 238); computeScaleMeasure(candidate.drawingWidth + (padding.left + padding.right), candidate.drawingHeight + (padding.top_0 + padding.bottom), candidate.dar) == maxScale && (push_1(remainingCandidates.array, candidate) , true); } return remainingCandidates; } ; var Lorg_eclipse_elk_alg_rectpacking_p1widthapproximation_ScaleMeasureFilter_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.p1widthapproximation', 'ScaleMeasureFilter', 672); function $process_108(graph, progressMonitor){ progressMonitor.begin('Target Width Setter', 1); if ($hasProperty_0(graph, ($clinit_RectPackingOptions() , WIDTH_APPROXIMATION_TARGET_WIDTH_0))) { $setProperty_1(graph, ($clinit_InternalProperties_4() , TARGET_WIDTH), castToDouble($getProperty_0(graph, WIDTH_APPROXIMATION_TARGET_WIDTH_0))); } else { throw toJs(new UnsupportedConfigurationException_0('A target width has to be set if the TargetWidthWidthApproximator should be used.')); } progressMonitor.done_1(); } function TargetWidthWidthApproximator(){ } defineClass(1470, 1, $intern_113, TargetWidthWidthApproximator); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_30(graph){ return castTo(graph, 27) , null; } ; _.process = function process_104(graph, progressMonitor){ $process_108(castTo(graph, 27), progressMonitor); } ; var Lorg_eclipse_elk_alg_rectpacking_p1widthapproximation_TargetWidthWidthApproximator_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.p1widthapproximation', 'TargetWidthWidthApproximator', 1470); function $clinit_WidthApproximationStrategy(){ $clinit_WidthApproximationStrategy = emptyMethod; GREEDY_1 = new WidthApproximationStrategy('GREEDY', 0); TARGET_WIDTH_0 = new WidthApproximationStrategy('TARGET_WIDTH', 1); } function $create_14(this$static){ switch (this$static.ordinal) { case 0: return new GreedyWidthApproximator; case 1: return new TargetWidthWidthApproximator; default:throw toJs(new IllegalArgumentException_0('No implementation is available for the width approximator ' + (this$static.name_0 != null?this$static.name_0:'' + this$static.ordinal))); } } function WidthApproximationStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_85(name_0){ $clinit_WidthApproximationStrategy(); return valueOf(($clinit_WidthApproximationStrategy$Map() , $MAP_75), name_0); } function values_93(){ $clinit_WidthApproximationStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_rectpacking_p1widthapproximation_WidthApproximationStrategy_2_classLit, 1), $intern_37, 491, 0, [GREEDY_1, TARGET_WIDTH_0]); } defineClass(491, 22, {3:1, 34:1, 22:1, 491:1, 188:1, 196:1}, WidthApproximationStrategy); _.create_1 = function create_29(){ return $create_14(this); } ; _.create_2 = function create_28(){ return $create_14(this); } ; var GREEDY_1, TARGET_WIDTH_0; var Lorg_eclipse_elk_alg_rectpacking_p1widthapproximation_WidthApproximationStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.rectpacking.p1widthapproximation', 'WidthApproximationStrategy', 491, Ljava_lang_Enum_2_classLit, values_93, valueOf_85); function $clinit_WidthApproximationStrategy$Map(){ $clinit_WidthApproximationStrategy$Map = emptyMethod; $MAP_75 = createValueOfMap(($clinit_WidthApproximationStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_rectpacking_p1widthapproximation_WidthApproximationStrategy_2_classLit, 1), $intern_37, 491, 0, [GREEDY_1, TARGET_WIDTH_0]))); } var $MAP_75; function absorbBlocks(row, block, nextBlock, boundingWidth, nodeNodeSpacing){ var rect, somethingWasChanged; somethingWasChanged = false; rect = castTo($get_11(nextBlock.children, 0), 27); while (placeRectInBlock(row, block, rect, boundingWidth, nodeNodeSpacing)) { somethingWasChanged = true; $removeChild(nextBlock, rect); if (nextBlock.children.array.length == 0) { break; } rect = castTo($get_11(nextBlock.children, 0), 27); } nextBlock.children.array.length == 0 && $removeBlock(nextBlock.parentRow, nextBlock); somethingWasChanged && $updateDimension(block.stack_0); return somethingWasChanged; } function compact_4(rowIdx, rows_0, boundingWidth, nodeNodeSpacing, rowHeightReevaluation){ var block, blockId, blocks, compactRowAgain, currentStack, nextBlock, nextBlockMinHeight, nextRowIndex, oldRowHeight, row, somethingWasChanged, wasFromNextRow, nextBlock_0; somethingWasChanged = false; compactRowAgain = false; nextRowIndex = rowIdx + 1; row = (checkCriticalElementIndex(rowIdx, rows_0.array.length) , castTo(rows_0.array[rowIdx], 186)); blocks = row.children; currentStack = null; for (blockId = 0; blockId < row.children.array.length; blockId++) { block = (checkCriticalElementIndex(blockId, blocks.array.length) , castTo(blocks.array[blockId], 172)); if (block.fixed_0) { continue; } if (block.children.array.length == 0) { $clinit_System(); String.fromCharCode(10); $removeBlock(row, block); --blockId; somethingWasChanged = true; continue; } if (!block.positionFixed) { !!currentStack && $updateDimension(currentStack); currentStack = new BlockStack(!currentStack?0:currentStack.x_0 + currentStack.width_0 + nodeNodeSpacing, row.y_0, nodeNodeSpacing); $setLocation(block, currentStack.x_0 + currentStack.width_0, row.y_0); $add_3(row.stacks, currentStack); $addBlock(currentStack, block); block.positionFixed = true; } nextBlock = null; nextBlock = (nextBlock_0 = null , blockId < row.children.array.length - 1?(nextBlock_0 = castTo($get_11(row.children, blockId + 1), 172)):nextRowIndex < rows_0.array.length && (checkCriticalElementIndex(nextRowIndex, rows_0.array.length) , castTo(rows_0.array[nextRowIndex], 186)).children.array.length != 0 && (nextBlock_0 = castTo($get_11((checkCriticalElementIndex(nextRowIndex, rows_0.array.length) , castTo(rows_0.array[nextRowIndex], 186)).children, 0), 172)) , nextBlock_0); wasFromNextRow = false; !!nextBlock && (wasFromNextRow = !equals_Ljava_lang_Object__Z__devirtual$(nextBlock.parentRow, row)); if (nextBlock) { if (nextBlock.children.array.length != 0 && !$booleanValue(castToBoolean(castTo($get_11(nextBlock.children, 0), 27).getProperty(($clinit_RectPackingOptions() , IN_NEW_ROW_0))))) { $placeRectsIn(block, boundingWidth - block.x_0); $updateDimension(block.stack_0); somethingWasChanged = somethingWasChanged | absorbBlocks(row, block, nextBlock, boundingWidth, nodeNodeSpacing); } else { $removeBlock(row, nextBlock); break; } if (nextBlock.children.array.length == 0) { rows_0.array.length > nextRowIndex && $removeBlock((checkCriticalElementIndex(nextRowIndex, rows_0.array.length) , castTo(rows_0.array[nextRowIndex], 186)), nextBlock); nextBlock = null; while (rows_0.array.length > nextRowIndex && (checkCriticalElementIndex(nextRowIndex, rows_0.array.length) , castTo(rows_0.array[nextRowIndex], 186)).children.array.length == 0) { $remove_12(rows_0, (checkCriticalElementIndex(nextRowIndex, rows_0.array.length) , rows_0.array[nextRowIndex])); } } if (!nextBlock) { --blockId; continue; } if (!$booleanValue(castToBoolean(castTo($get_11(nextBlock.children, 0), 27).getProperty(($clinit_RectPackingOptions() , IN_NEW_ROW_0)))) && placeBelow(rows_0, row, block, nextBlock, wasFromNextRow, boundingWidth, nextRowIndex, nodeNodeSpacing)) { somethingWasChanged = true; continue; } if (wasFromNextRow) { oldRowHeight = row.height; nextBlockMinHeight = nextBlock.minHeight; if (!$booleanValue(castToBoolean(castTo($get_11(nextBlock.children, 0), 27).getProperty(IN_NEW_ROW_0))) && placeBeside(rows_0, row, block, nextBlock, boundingWidth, nextRowIndex, nodeNodeSpacing, rowHeightReevaluation)) { somethingWasChanged = true; if (oldRowHeight < nextBlockMinHeight) { compactRowAgain = true; nextBlock.parentRow = row; break; } continue; } else if (useRowHeight(row, block)) { block.fixed_0 = true; somethingWasChanged = true; continue; } } else if (useRowHeight(row, block)) { block.fixed_0 = true; somethingWasChanged = true; continue; } if (somethingWasChanged) { continue; } } if (useRowHeight(row, block)) { block.fixed_0 = true; somethingWasChanged = true; !!nextBlock && (nextBlock.positionFixed = false); continue; } else { $updateDimension(block.stack_0); } } return new Pair(($clinit_Boolean() , somethingWasChanged?true:false), compactRowAgain?true:false); } function placeBelow(rows_0, row, block, nextBlock, wasFromNextRow, boundingWidth, nextRowIndex, nodeNodeSpacing){ var bounds, bounds0, currentBlockMinHeight, nextBlockMinHeight, remainingWidth, somethingWasChanged; somethingWasChanged = false; remainingWidth = boundingWidth - block.x_0; currentBlockMinHeight = block.y_0 - row.y_0 + (bounds0 = $placeRectsIn_1(block, remainingWidth, false) , bounds0.height); if (nextBlock.minWidth + nodeNodeSpacing > remainingWidth) { return false; } nextBlockMinHeight = (bounds = $placeRectsIn_1(nextBlock, remainingWidth, false) , bounds.height); if (currentBlockMinHeight + nodeNodeSpacing + nextBlockMinHeight <= row.height) { $placeRectsIn(block, boundingWidth - block.x_0); block.fixed_0 = true; $placeRectsIn(nextBlock, boundingWidth - block.x_0); $setLocation(nextBlock, block.x_0, block.y_0 + block.height + nodeNodeSpacing); nextBlock.positionFixed = true; $addBlock(block.stack_0, nextBlock); somethingWasChanged = true; if (wasFromNextRow) { $addBlock_0(row, nextBlock); nextBlock.parentRow = row; if (rows_0.array.length > nextRowIndex) { $removeBlock((checkCriticalElementIndex(nextRowIndex, rows_0.array.length) , castTo(rows_0.array[nextRowIndex], 186)), nextBlock); (checkCriticalElementIndex(nextRowIndex, rows_0.array.length) , castTo(rows_0.array[nextRowIndex], 186)).children.array.length == 0 && $remove_11(rows_0, nextRowIndex); } } } return somethingWasChanged; } function placeBeside(rows_0, row, block, nextBlock, boundingWidth, nextRowIndex, nodeNodeSpacing, rowHeightReevaluation){ var bounds, currentBlockMinWidth, lastRowOptimization, nextBlockHeight, potentialWidth, shouldRowHeigthBeReevalauted, somethingWasChanged, stack_0, stack$iterator, targetWidthOfNextBlock; somethingWasChanged = false; currentBlockMinWidth = $getWidthForFixedHeight(block.stack_0, row.y_0 + row.height - block.stack_0.y_0); shouldRowHeigthBeReevalauted = nextBlock.minHeight > row.height && rowHeightReevaluation; targetWidthOfNextBlock = boundingWidth - (block.stack_0.x_0 + currentBlockMinWidth - nodeNodeSpacing); nextBlockHeight = (bounds = $placeRectsIn_1(nextBlock, targetWidthOfNextBlock, false) , bounds.height); if (shouldRowHeigthBeReevalauted && nextBlockHeight > nextBlock.minHeight) { return false; } if (shouldRowHeigthBeReevalauted) { potentialWidth = 0; for (stack$iterator = new ArrayList$1(row.stacks); stack$iterator.i < stack$iterator.this$01.array.length;) { stack_0 = castTo($next_6(stack$iterator), 315); potentialWidth += $getWidthForFixedHeight(stack_0, nextBlock.minHeight) + nodeNodeSpacing; } targetWidthOfNextBlock = boundingWidth - potentialWidth; } if (targetWidthOfNextBlock < nextBlock.minWidth) { return false; } lastRowOptimization = nextRowIndex == rows_0.array.length - 1 && targetWidthOfNextBlock >= (checkCriticalElementIndex(nextRowIndex, rows_0.array.length) , castTo(rows_0.array[nextRowIndex], 186)).width_0; if (!shouldRowHeigthBeReevalauted && nextBlockHeight > row.height && !lastRowOptimization) { return false; } if (lastRowOptimization || shouldRowHeigthBeReevalauted || nextBlockHeight <= row.height) { if (lastRowOptimization && nextBlockHeight > row.height) { block.height = nextBlockHeight; $placeRectsIn(block, $getWidthForTargetHeight(block, nextBlockHeight)); } else { $placeRectsIn_2(block.stack_0, currentBlockMinWidth); block.fixed_0 = true; } $placeRectsIn(nextBlock, boundingWidth - (block.x_0 + block.width_0)); $setLocation(nextBlock, block.stack_0.x_0 + block.stack_0.width_0, row.y_0); $addBlock_0(row, nextBlock); if (rows_0.array.length > nextRowIndex) { $removeBlock((checkCriticalElementIndex(nextRowIndex, rows_0.array.length) , castTo(rows_0.array[nextRowIndex], 186)), nextBlock); (checkCriticalElementIndex(nextRowIndex, rows_0.array.length) , castTo(rows_0.array[nextRowIndex], 186)).children.array.length == 0 && $remove_11(rows_0, nextRowIndex); } somethingWasChanged = true; } return somethingWasChanged; } function useRowHeight(row, block){ var previousWidth, somethingWasChanged, targetWidth; somethingWasChanged = false; previousWidth = block.stack_0.width_0; if (block.height < row.height) { targetWidth = $getWidthForFixedHeight(block.stack_0, row.height); if (block.stack_0.width_0 > targetWidth) { $placeRectsIn_2(block.stack_0, targetWidth); somethingWasChanged = previousWidth != block.stack_0.width_0; } } return somethingWasChanged; } function $clone_0(node){ var child, child$iterator, clone, elkNode, elkNode0, newChild; clone = ($clinit_ElkGraphFactory() , elkNode0 = new ElkNodeImpl , elkNode0); $copyProperties_0(clone, node); for (child$iterator = new AbstractEList$EIterator((!node.children && (node.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, node, 10, 11)) , node.children)); child$iterator.cursor != child$iterator.this$01_2.size_1();) { child = castTo($doNext(child$iterator), 27); newChild = (elkNode = new ElkNodeImpl , elkNode); $setParent_2(newChild, clone); $setDimensions_0(newChild, child.width_0, child.height); $setIdentifier(newChild, child.identifier); $setLocation_1(newChild, child.x_0, child.y_0); $add_21((!clone.children && (clone.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, clone, 10, 11)) , clone.children), newChild); $copyProperties_0(newChild, child); } return clone; } function $copyPosition(this$static, node, other){ var i; $setDimensions_0(other, node.width_0, node.height); $setLocation_1(other, node.x_0, node.y_0); for (i = 0; i < (!node.children && (node.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, node, 10, 11)) , node.children).size_0; i++) { $copyPosition(this$static, castTo($get_20((!node.children && (node.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, node, 10, 11)) , node.children), i), 27), castTo($get_20((!other.children && (other.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, other, 10, 11)) , other.children), i), 27)); } } function $copyRowWidthChangeValues(graph, compaction){ $setProperty_1(graph, ($clinit_InternalProperties_4() , MIN_ROW_INCREASE), compaction.potentialRowWidthIncreaseMin); $setProperty_1(graph, MAX_ROW_INCREASE, compaction.potentialRowWidthIncreaseMax); $setProperty_1(graph, MIN_ROW_DECREASE, compaction.potentialRowWidthDecreaseMin); $setProperty_1(graph, MAX_ROW_DECREASE, compaction.potentialRowWidthDecreaseMax); } function $process_109(this$static, graph, progressMonitor){ var aspectRatio, clone, drawing, i, iterations, newDrawing, newSM, nodeNodeSpacing, oldSM, padding, secondIt, padding_0, aspectRatio_0; progressMonitor.begin('Compaction', 1); !graph.children && (graph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, graph, 10, 11)); aspectRatio = $doubleValue(castToDouble($getProperty_0(graph, ($clinit_RectPackingOptions() , ASPECT_RATIO_3)))); nodeNodeSpacing = $doubleValue(castToDouble($getProperty_0(graph, SPACING_NODE_NODE_3))); padding = castTo($getProperty_0(graph, PADDING_3), 107); secondIt = new RowFillingAndCompaction(aspectRatio, nodeNodeSpacing); drawing = $start(secondIt, graph, padding); $copyRowWidthChangeValues(graph, secondIt); iterations = castTo($getProperty_0(graph, PACKING_COMPACTION_ITERATIONS_0), 17).value_0; while (iterations > 1) { clone = $clone_0(graph); oldSM = drawing.scaleMeasure; padding_0 = castTo($getProperty_0(graph, PADDING_3), 107); aspectRatio_0 = $doubleValue(castToDouble($getProperty_0(graph, ASPECT_RATIO_3))); (!graph.children && (graph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, graph, 10, 11)) , graph.children).size_0 > 1 && $doubleValue(castToDouble($getProperty_0(graph, ($clinit_InternalProperties_4() , MIN_ROW_INCREASE)))) != $intern_60 && (drawing.drawingWidth + (padding_0.left + padding_0.right)) / (drawing.drawingHeight + (padding_0.top_0 + padding_0.bottom)) < aspectRatio_0?$setProperty_1(clone, ($clinit_InternalProperties_4() , TARGET_WIDTH), $doubleValue(castToDouble($getProperty_0(graph, TARGET_WIDTH))) + $doubleValue(castToDouble($getProperty_0(graph, MIN_ROW_INCREASE)))):(!graph.children && (graph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, graph, 10, 11)) , graph.children).size_0 > 1 && $doubleValue(castToDouble($getProperty_0(graph, ($clinit_InternalProperties_4() , MIN_ROW_DECREASE)))) != $intern_60 && (drawing.drawingWidth + (padding_0.left + padding_0.right)) / (drawing.drawingHeight + (padding_0.top_0 + padding_0.bottom)) > aspectRatio_0 && $setProperty_1(clone, ($clinit_InternalProperties_4() , TARGET_WIDTH), $wnd.Math.max($doubleValue(castToDouble($getProperty_0(graph, MIN_WIDTH_0))), $doubleValue(castToDouble($getProperty_0(clone, TARGET_WIDTH))) - $doubleValue(castToDouble($getProperty_0(graph, MIN_ROW_DECREASE))))); secondIt = new RowFillingAndCompaction(aspectRatio, nodeNodeSpacing); newDrawing = $start(secondIt, clone, padding); newSM = newDrawing.scaleMeasure; if (newSM >= oldSM && newSM == newSM) { for (i = 0; i < (!clone.children && (clone.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, clone, 10, 11)) , clone.children).size_0; i++) { $copyPosition(this$static, castTo($get_20((!clone.children && (clone.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, clone, 10, 11)) , clone.children), i), 27), castTo($get_20((!graph.children && (graph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, graph, 10, 11)) , graph.children), i), 27)); } $copyRowWidthChangeValues(graph, secondIt); $setDrawingWidth(drawing, newDrawing.drawingWidth); $setDrawingHeight(drawing, newDrawing.drawingHeight); } --iterations; } $setProperty_1(graph, ($clinit_InternalProperties_4() , DRAWING_HEIGHT), drawing.drawingHeight); $setProperty_1(graph, DRAWING_WIDTH, drawing.drawingWidth); progressMonitor.done_1(); } function Compactor(){ } defineClass(1471, 1, $intern_113, Compactor); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_31(graph){ return castTo(graph, 27) , null; } ; _.process = function process_105(graph, progressMonitor){ $process_109(this, castTo(graph, 27), progressMonitor); } ; var Lorg_eclipse_elk_alg_rectpacking_p2packing_Compactor_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.p2packing', 'Compactor', 1471); function place(rectangles, boundingWidth, nodeNodeSpacing){ var block, currentWidth, drawingHeight, newBlock, potentialRowWidth, rect, rect$iterator, row, rows_0; rows_0 = new ArrayList; row = new RectRow(0, nodeNodeSpacing); drawingHeight = 0; $addBlock_0(row, new Block(0, 0, row, nodeNodeSpacing)); currentWidth = 0; for (rect$iterator = new AbstractEList$EIterator(rectangles); rect$iterator.cursor != rect$iterator.this$01_2.size_1();) { rect = castTo($doNext(rect$iterator), 27); block = castTo($get_11(row.children, row.children.array.length - 1), 172); potentialRowWidth = currentWidth + rect.width_0 + (castTo($get_11(row.children, 0), 172).children.array.length == 0?0:nodeNodeSpacing); if (potentialRowWidth > boundingWidth || $booleanValue(castToBoolean($getProperty_0(rect, ($clinit_RectPackingOptions() , IN_NEW_ROW_0))))) { currentWidth = 0; drawingHeight += row.height + nodeNodeSpacing; push_1(rows_0.array, row); row = new RectRow(drawingHeight, nodeNodeSpacing); block = new Block(0, row.y_0, row, nodeNodeSpacing); $addBlock_0(row, block); currentWidth = 0; } if (block.children.array.length == 0 || !$booleanValue(castToBoolean($getProperty_0($getParent_2(rect), ($clinit_RectPackingOptions() , PACKING_COMPACTION_ROW_HEIGHT_REEVALUATION_0)))) && (rect.height >= block.smallestRectHeight && rect.height <= block.minHeight || block.averageHeight * 0.5 <= rect.height && block.averageHeight * 1.5 >= rect.height)) { $addChild(block, rect); } else { newBlock = new Block(block.x_0 + block.width_0 + nodeNodeSpacing, row.y_0, row, nodeNodeSpacing); $addBlock_0(row, newBlock); $addChild(newBlock, rect); } currentWidth = rect.x_0 + rect.width_0; } push_1(rows_0.array, row); return rows_0; } function placeRectInBlock(row, block, rect, boundingWidth, nodeNodeSpacing){ var lastRow, lastRow0, lastRow_0; if (rect.height >= block.smallestRectHeight && rect.height <= block.minHeight || block.averageHeight * 0.5 <= rect.height && block.averageHeight * 1.5 >= rect.height) { lastRow0 = castTo($get_11(block.rows_0, block.rows_0.array.length - 1), 209); if (lastRow0.x_0 + lastRow0.width_0 + rect.width_0 + nodeNodeSpacing <= boundingWidth && (lastRow = castTo($get_11(block.rows_0, block.rows_0.array.length - 1), 209) , lastRow.y_0 - row.y_0 + rect.height <= row.height || row.children.array.length == 1)) { $addChild(block, rect); return true; } else if (block.x_0 + rect.width_0 <= boundingWidth && (block.y_0 + block.height + rect.height + nodeNodeSpacing <= row.height || row.children.array.length == 1)) { $add_3(block.children, rect); lastRow_0 = castTo($get_11(block.rows_0, block.rows_0.array.length - 1), 209); $add_3(block.rows_0, new BlockRow(block.x_0, lastRow_0.y_0 + lastRow_0.height + block.nodeNodeSpacing, block.nodeNodeSpacing)); $addRectangle(castTo($get_11(block.rows_0, block.rows_0.array.length - 1), 209), rect); $adjustSizeAdd(block, rect); return true; } } return false; } function $process_110(graph, progressMonitor){ var additionalHeight, height, padding, rectangles, size_0, width_0; progressMonitor.begin('No Compaction', 1); padding = castTo($getProperty_0(graph, ($clinit_RectPackingOptions() , PADDING_3)), 107); rectangles = (!graph.children && (graph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, graph, 10, 11)) , graph.children); size_0 = calculateDimensions(rectangles); width_0 = $wnd.Math.max(size_0.x_0, $doubleValue(castToDouble($getProperty_0(graph, ($clinit_InternalProperties_4() , MIN_WIDTH_0)))) - (padding.left + padding.right)); height = $wnd.Math.max(size_0.y_0, $doubleValue(castToDouble($getProperty_0(graph, MIN_HEIGHT))) - (padding.top_0 + padding.bottom)); additionalHeight = height - size_0.y_0; $setProperty_1(graph, ADDITIONAL_HEIGHT, additionalHeight); $setProperty_1(graph, DRAWING_WIDTH, width_0); $setProperty_1(graph, DRAWING_HEIGHT, height + additionalHeight); progressMonitor.done_1(); } function NoPlacement(){ } defineClass(1473, 1, $intern_113, NoPlacement); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_32(graph){ return castTo(graph, 27) , null; } ; _.process = function process_106(graph, progressMonitor){ $process_110(castTo(graph, 27), progressMonitor); } ; var Lorg_eclipse_elk_alg_rectpacking_p2packing_NoPlacement_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.p2packing', 'NoPlacement', 1473); function $clinit_PackingStrategy(){ $clinit_PackingStrategy = emptyMethod; COMPACTION_2 = new PackingStrategy('COMPACTION', 0); SIMPLE_0 = new PackingStrategy('SIMPLE', 1); NONE_15 = new PackingStrategy('NONE', 2); } function $create_15(this$static){ switch (this$static.ordinal) { case 0: return new Compactor; case 1: return new SimplePlacement; case 2: return new NoPlacement; default:return null; } } function PackingStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_86(name_0){ $clinit_PackingStrategy(); return valueOf(($clinit_PackingStrategy$Map() , $MAP_76), name_0); } function values_94(){ $clinit_PackingStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_rectpacking_p2packing_PackingStrategy_2_classLit, 1), $intern_37, 439, 0, [COMPACTION_2, SIMPLE_0, NONE_15]); } defineClass(439, 22, {3:1, 34:1, 22:1, 439:1, 188:1, 196:1}, PackingStrategy); _.create_1 = function create_31(){ return $create_15(this); } ; _.create_2 = function create_30(){ return $create_15(this); } ; var COMPACTION_2, NONE_15, SIMPLE_0; var Lorg_eclipse_elk_alg_rectpacking_p2packing_PackingStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.rectpacking.p2packing', 'PackingStrategy', 439, Ljava_lang_Enum_2_classLit, values_94, valueOf_86); function $clinit_PackingStrategy$Map(){ $clinit_PackingStrategy$Map = emptyMethod; $MAP_76 = createValueOfMap(($clinit_PackingStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_rectpacking_p2packing_PackingStrategy_2_classLit, 1), $intern_37, 439, 0, [COMPACTION_2, SIMPLE_0, NONE_15]))); } var $MAP_76; function $adjustWidthAndHeight(this$static, row){ var index_0, maxHeight, maxWidth, stack_0, stack$iterator; maxHeight = 0; maxWidth = 0; index_0 = 0; for (stack$iterator = new ArrayList$1(row.stacks); stack$iterator.i < stack$iterator.this$01.array.length;) { stack_0 = castTo($next_6(stack$iterator), 315); $updateDimension(stack_0); maxHeight = $wnd.Math.max(maxHeight, stack_0.height); maxWidth += stack_0.width_0 + (index_0 > 0?this$static.nodeNodeSpacing:0); ++index_0; } row.height = maxHeight; row.width_0 = maxWidth; } function $start(this$static, layoutGraph, padding){ var additionalHeight, block, block$iterator, blockRow, blockRow$iterator, currentRow, height, lastBlock, lastStack, minHeight, minWidth, previousRow, result, rowIdx, rows_0, size_0, targetWidth, totalWidth; targetWidth = $doubleValue(castToDouble($getProperty_0(layoutGraph, ($clinit_InternalProperties_4() , TARGET_WIDTH)))); minWidth = $doubleValue(castToDouble($getProperty_0(layoutGraph, MIN_WIDTH_0))); minHeight = $doubleValue(castToDouble($getProperty_0(layoutGraph, MIN_HEIGHT))); resetCoordinates((!layoutGraph.children && (layoutGraph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, layoutGraph, 10, 11)) , layoutGraph.children)); rows_0 = place((!layoutGraph.children && (layoutGraph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, layoutGraph, 10, 11)) , layoutGraph.children), targetWidth, this$static.nodeNodeSpacing); for (rowIdx = 0; rowIdx < rows_0.array.length; rowIdx++) { currentRow = (checkCriticalElementIndex(rowIdx, rows_0.array.length) , castTo(rows_0.array[rowIdx], 186)); if (rowIdx != 0) { previousRow = (checkCriticalElementIndex(rowIdx - 1, rows_0.array.length) , castTo(rows_0.array[rowIdx - 1], 186)); $setY_1(currentRow, previousRow.y_0 + previousRow.height + this$static.nodeNodeSpacing); } result = compact_4(rowIdx, rows_0, targetWidth, this$static.nodeNodeSpacing, $booleanValue(castToBoolean($getProperty_0(layoutGraph, ($clinit_RectPackingOptions() , PACKING_COMPACTION_ROW_HEIGHT_REEVALUATION_0))))); if ($booleanValue(castToBoolean(result.second))) { for (block$iterator = new ArrayList$1(currentRow.children); block$iterator.i < block$iterator.this$01.array.length;) { block = castTo($next_6(block$iterator), 172); block.fixed_0 = false; block.positionFixed = false; $adjustSizeAfterRemove(block); } currentRow.stacks = new ArrayList; currentRow.width_0 = targetWidth; --rowIdx; } else { $adjustWidthAndHeight(this$static, currentRow); if (rowIdx + 1 < rows_0.array.length) { this$static.potentialRowWidthIncreaseMax = $wnd.Math.max(currentRow.width_0 + this$static.nodeNodeSpacing + castTo($get_11((checkCriticalElementIndex(rowIdx + 1, rows_0.array.length) , castTo(rows_0.array[rowIdx + 1], 186)).children, 0), 172).width_0 - targetWidth, this$static.potentialRowWidthDecreaseMax); this$static.potentialRowWidthIncreaseMin = $wnd.Math.min(currentRow.width_0 + this$static.nodeNodeSpacing + castTo($get_11((checkCriticalElementIndex(rowIdx + 1, rows_0.array.length) , castTo(rows_0.array[rowIdx + 1], 186)).children, 0), 172).width_0 - targetWidth, this$static.potentialRowWidthDecreaseMin); if (currentRow.stacks.array.length != 0) { this$static.potentialRowWidthDecreaseMax = $wnd.Math.max(this$static.potentialRowWidthDecreaseMax, castTo($get_11(currentRow.stacks, currentRow.stacks.array.length - 1), 315).width_0 + (currentRow.stacks.array.length <= 1?0:this$static.nodeNodeSpacing)); this$static.potentialRowWidthDecreaseMin = $wnd.Math.min(this$static.potentialRowWidthDecreaseMax, castTo($get_11(currentRow.stacks, currentRow.stacks.array.length - 1), 315).width_0 + (currentRow.stacks.array.length <= 1?0:this$static.nodeNodeSpacing)); } } if (rows_0.array.length == 1) { lastStack = castTo($get_11(currentRow.stacks, currentRow.stacks.array.length - 1), 315); lastBlock = castTo($get_11(lastStack.blocks, lastStack.blocks.array.length - 1), 172); for (blockRow$iterator = new ArrayList$1(lastBlock.rows_0); blockRow$iterator.i < blockRow$iterator.this$01.array.length;) { blockRow = castTo($next_6(blockRow$iterator), 209); this$static.potentialRowWidthDecreaseMax = $wnd.Math.max(this$static.potentialRowWidthDecreaseMax, lastBlock.width_0 - blockRow.width_0); this$static.potentialRowWidthDecreaseMin = $wnd.Math.min(this$static.potentialRowWidthDecreaseMin, lastBlock.width_0 - blockRow.width_0); this$static.potentialRowWidthIncreaseMax = $wnd.Math.max(this$static.potentialRowWidthIncreaseMax, blockRow.width_0 + this$static.nodeNodeSpacing); this$static.potentialRowWidthIncreaseMin = $wnd.Math.min(this$static.potentialRowWidthIncreaseMin, blockRow.width_0 + this$static.nodeNodeSpacing); } } } } size_0 = calculateDimensions_0(rows_0, this$static.nodeNodeSpacing); totalWidth = $wnd.Math.max(size_0.x_0, minWidth - (padding.left + padding.right)); height = $wnd.Math.max(size_0.y_0, minHeight - (padding.top_0 + padding.bottom)); additionalHeight = height - size_0.y_0; $setProperty_1(layoutGraph, ADDITIONAL_HEIGHT, additionalHeight); $setProperty_1(layoutGraph, ROWS_0, rows_0); return new DrawingData(this$static.aspectRatio, totalWidth, size_0.y_0 + additionalHeight, ($clinit_DrawingDataDescriptor() , WHOLE_DRAWING)); } function RowFillingAndCompaction(aspectRatio, nodeNodeSpacing){ this.aspectRatio = aspectRatio; this.nodeNodeSpacing = nodeNodeSpacing; } defineClass(810, 1, {}, RowFillingAndCompaction); _.aspectRatio = 0; _.nodeNodeSpacing = 0; _.potentialRowWidthDecreaseMax = 0; _.potentialRowWidthDecreaseMin = $intern_60; _.potentialRowWidthIncreaseMax = 0; _.potentialRowWidthIncreaseMin = $intern_60; var Lorg_eclipse_elk_alg_rectpacking_p2packing_RowFillingAndCompaction_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.p2packing', 'RowFillingAndCompaction', 810); function $process_111(graph, progressMonitor){ var additionalHeight, block, block$iterator, height, nodeNodeSpacing, padding, row, row$iterator, rows_0, size_0, stack_0, targetWidth, width_0; progressMonitor.begin('No Compaction', 1); targetWidth = $doubleValue(castToDouble($getProperty_0(graph, ($clinit_InternalProperties_4() , TARGET_WIDTH)))); nodeNodeSpacing = $doubleValue(castToDouble($getProperty_0(graph, ($clinit_RectPackingOptions() , SPACING_NODE_NODE_3)))); padding = castTo($getProperty_0(graph, PADDING_3), 107); resetCoordinates((!graph.children && (graph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, graph, 10, 11)) , graph.children)); rows_0 = place((!graph.children && (graph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, graph, 10, 11)) , graph.children), targetWidth, nodeNodeSpacing); !graph.children && (graph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, graph, 10, 11)); for (row$iterator = new ArrayList$1(rows_0); row$iterator.i < row$iterator.this$01.array.length;) { row = castTo($next_6(row$iterator), 186); for (block$iterator = new ArrayList$1(row.children); block$iterator.i < block$iterator.this$01.array.length;) { block = castTo($next_6(block$iterator), 172); stack_0 = new BlockStack(block.x_0, block.y_0, $doubleValue(castToDouble($getProperty_0(graph, SPACING_NODE_NODE_3)))); $addBlock(stack_0, block); $add_3(row.stacks, stack_0); } } size_0 = calculateDimensions_0(rows_0, nodeNodeSpacing); width_0 = $wnd.Math.max(size_0.x_0, $doubleValue(castToDouble($getProperty_0(graph, MIN_WIDTH_0))) - (padding.left + padding.right)); height = $wnd.Math.max(size_0.y_0, $doubleValue(castToDouble($getProperty_0(graph, MIN_HEIGHT))) - (padding.top_0 + padding.bottom)); additionalHeight = height - size_0.y_0; $setProperty_1(graph, ADDITIONAL_HEIGHT, additionalHeight); $setProperty_1(graph, DRAWING_WIDTH, width_0); $setProperty_1(graph, DRAWING_HEIGHT, height + additionalHeight); $setProperty_1(graph, ROWS_0, rows_0); progressMonitor.done_1(); } function SimplePlacement(){ } defineClass(1472, 1, $intern_113, SimplePlacement); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_33(graph){ return castTo(graph, 27) , null; } ; _.process = function process_107(graph, progressMonitor){ $process_111(castTo(graph, 27), progressMonitor); } ; var Lorg_eclipse_elk_alg_rectpacking_p2packing_SimplePlacement_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.p2packing', 'SimplePlacement', 1472); function $process_112(graph, progressMonitor){ var lastArg; progressMonitor.begin('Equal Whitespace Eliminator', 1); if ($hasProperty_0(graph, ($clinit_InternalProperties_4() , ROWS_0))) { expand(castTo($getProperty_0(graph, ROWS_0), 15), $doubleValue(castToDouble($getProperty_0(graph, DRAWING_WIDTH))), (lastArg = $doubleValue(castToDouble($getProperty_0(graph, ADDITIONAL_HEIGHT))) , $doubleValue(castToDouble($getProperty_0(graph, ($clinit_RectPackingOptions() , SPACING_NODE_NODE_3)))) , lastArg)); } else { throw toJs(new UnsupportedConfigurationException_0('The graph does not contain rows.')); } progressMonitor.done_1(); } function EqualWhitespaceEliminator(){ } defineClass(1474, 1, $intern_113, EqualWhitespaceEliminator); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_34(graph){ return castTo(graph, 27) , null; } ; _.process = function process_108(graph, progressMonitor){ this.process_0(castTo(graph, 27), progressMonitor); } ; _.process_0 = function process_109(graph, progressMonitor){ $process_112(graph, progressMonitor); } ; var Lorg_eclipse_elk_alg_rectpacking_p3whitespaceelimination_EqualWhitespaceEliminator_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.p3whitespaceelimination', 'EqualWhitespaceEliminator', 1474); function expand(rows_0, drawingWidth, additionalHeight){ var heightPerRow, index_0, row, row$iterator; heightPerRow = additionalHeight / rows_0.size_1(); index_0 = 0; for (row$iterator = rows_0.iterator_0(); row$iterator.hasNext_0();) { row = castTo(row$iterator.next_1(), 186); $setY_1(row, row.y_0 + heightPerRow * index_0); $expand_2(row, drawingWidth, heightPerRow); ++index_0; } } function ToAspectratioNodeExpander(){ } defineClass(1475, 1474, $intern_113, ToAspectratioNodeExpander); _.process_0 = function process_110(graph, progressMonitor){ var additionalHeight, aspectRatio, desiredAspectRatio, height, width_0; progressMonitor.begin('To Aspect Ratio Whitesapce Eliminator', 1); width_0 = $doubleValue(castToDouble($getProperty_0(graph, ($clinit_InternalProperties_4() , DRAWING_WIDTH)))); height = $doubleValue(castToDouble($getProperty_0(graph, DRAWING_HEIGHT))); desiredAspectRatio = $doubleValue(castToDouble($getProperty_0(graph, ($clinit_RectPackingOptions() , ASPECT_RATIO_3)))); additionalHeight = $doubleValue(castToDouble($getProperty_0(graph, ADDITIONAL_HEIGHT))); aspectRatio = width_0 / height; if (aspectRatio < desiredAspectRatio) { width_0 = height * desiredAspectRatio; $setProperty_1(graph, DRAWING_WIDTH, width_0); } else { additionalHeight += width_0 / desiredAspectRatio - height; $setProperty_1(graph, ADDITIONAL_HEIGHT, additionalHeight); $setProperty_1(graph, DRAWING_HEIGHT, height + additionalHeight); } $process_112(graph, progressMonitor); progressMonitor.done_1(); } ; var Lorg_eclipse_elk_alg_rectpacking_p3whitespaceelimination_ToAspectratioNodeExpander_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.p3whitespaceelimination', 'ToAspectratioNodeExpander', 1475); function $clinit_WhiteSpaceEliminationStrategy(){ $clinit_WhiteSpaceEliminationStrategy = emptyMethod; EQUAL_BETWEEN_STRUCTURES = new WhiteSpaceEliminationStrategy('EQUAL_BETWEEN_STRUCTURES', 0); TO_ASPECT_RATIO = new WhiteSpaceEliminationStrategy('TO_ASPECT_RATIO', 1); } function $create_16(this$static){ switch (this$static.ordinal) { case 0: return new EqualWhitespaceEliminator; case 1: return new ToAspectratioNodeExpander; default:return null; } } function WhiteSpaceEliminationStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_87(name_0){ $clinit_WhiteSpaceEliminationStrategy(); return valueOf(($clinit_WhiteSpaceEliminationStrategy$Map() , $MAP_77), name_0); } function values_95(){ $clinit_WhiteSpaceEliminationStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_rectpacking_p3whitespaceelimination_WhiteSpaceEliminationStrategy_2_classLit, 1), $intern_37, 492, 0, [EQUAL_BETWEEN_STRUCTURES, TO_ASPECT_RATIO]); } defineClass(492, 22, {3:1, 34:1, 22:1, 492:1, 188:1, 196:1}, WhiteSpaceEliminationStrategy); _.create_1 = function create_33(){ return $create_16(this); } ; _.create_2 = function create_32(){ return $create_16(this); } ; var EQUAL_BETWEEN_STRUCTURES, TO_ASPECT_RATIO; var Lorg_eclipse_elk_alg_rectpacking_p3whitespaceelimination_WhiteSpaceEliminationStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.rectpacking.p3whitespaceelimination', 'WhiteSpaceEliminationStrategy', 492, Ljava_lang_Enum_2_classLit, values_95, valueOf_87); function $clinit_WhiteSpaceEliminationStrategy$Map(){ $clinit_WhiteSpaceEliminationStrategy$Map = emptyMethod; $MAP_77 = createValueOfMap(($clinit_WhiteSpaceEliminationStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_rectpacking_p3whitespaceelimination_WhiteSpaceEliminationStrategy_2_classLit, 1), $intern_37, 492, 0, [EQUAL_BETWEEN_STRUCTURES, TO_ASPECT_RATIO]))); } var $MAP_77; function $addChild(this$static, rect){ this$static.rows_0.array.length == 0 && $add_3(this$static.rows_0, new BlockRow(this$static.x_0, this$static.y_0, this$static.nodeNodeSpacing)); $add_3(this$static.children, rect); $addRectangle(castTo($get_11(this$static.rows_0, this$static.rows_0.array.length - 1), 209), rect); $adjustSizeAdd(this$static, rect); } function $adjustChildrensXandY(this$static, xChange, yChange){ var rect, rect$iterator; for (rect$iterator = new ArrayList$1(this$static.children); rect$iterator.i < rect$iterator.this$01.array.length;) { rect = castTo($next_6(rect$iterator), 27); $setLocation_1(rect, rect.x_0 + xChange, rect.y_0 + yChange); } } function $adjustSizeAdd(this$static, rect){ var row, row$iterator, totalHeight, widthOflastRow; widthOflastRow = castTo($get_11(this$static.rows_0, this$static.rows_0.array.length - 1), 209).width_0; this$static.smallestRectWidth = $wnd.Math.min(this$static.smallestRectWidth, rect.width_0); this$static.width_0 = $wnd.Math.max(this$static.width_0, widthOflastRow); this$static.minWidth = $wnd.Math.max(this$static.minWidth, rect.width_0 + (this$static.children.array.length == 1?0:this$static.nodeNodeSpacing)); this$static.smallestRectHeight = $wnd.Math.min(this$static.smallestRectHeight, rect.height); this$static.maxHeight += rect.height + (this$static.children.array.length == 1?0:this$static.nodeNodeSpacing); this$static.minHeight = $wnd.Math.max(this$static.minHeight, rect.height); totalHeight = this$static.rows_0.array.length > 0?(this$static.rows_0.array.length - 1) * this$static.nodeNodeSpacing:0; for (row$iterator = new ArrayList$1(this$static.rows_0); row$iterator.i < row$iterator.this$01.array.length;) { row = castTo($next_6(row$iterator), 209); totalHeight += row.height; } this$static.height = totalHeight; this$static.averageHeight = this$static.maxHeight / this$static.children.array.length - this$static.nodeNodeSpacing * ((this$static.children.array.length - 1) / this$static.children.array.length); $notifyAboutNodeChange(this$static.parentRow); } function $adjustSizeAfterRemove(this$static){ var index_0, newHeight, newWidth, rect, rect$iterator, row, row$iterator, rowsToDelete; newWidth = 0; newHeight = 0; rowsToDelete = new LinkedList; index_0 = 0; for (row$iterator = new ArrayList$1(this$static.rows_0); row$iterator.i < row$iterator.this$01.array.length;) { row = castTo($next_6(row$iterator), 209); if (row.rects.array.length == 0) { $addNode_0(rowsToDelete, row, rowsToDelete.tail.prev, rowsToDelete.tail); } else { newWidth = $wnd.Math.max(newWidth, row.width_0); newHeight += row.height + (index_0 > 0?this$static.nodeNodeSpacing:0); } ++index_0; } $removeAll_0(this$static.rows_0, rowsToDelete); this$static.height = newHeight; this$static.width_0 = newWidth; this$static.minWidth = 0; this$static.minHeight = 0; this$static.maxHeight = 0; this$static.smallestRectHeight = $intern_60; this$static.smallestRectWidth = $intern_60; for (rect$iterator = new ArrayList$1(this$static.children); rect$iterator.i < rect$iterator.this$01.array.length;) { rect = castTo($next_6(rect$iterator), 27); this$static.smallestRectWidth = $wnd.Math.min(this$static.smallestRectWidth, rect.width_0); this$static.minWidth = $wnd.Math.max(this$static.minWidth, rect.width_0); this$static.minHeight = $wnd.Math.max(this$static.minHeight, rect.height); this$static.smallestRectHeight = $wnd.Math.min(this$static.smallestRectHeight, rect.height); this$static.maxHeight += rect.height + this$static.nodeNodeSpacing; } this$static.averageHeight = this$static.maxHeight / this$static.children.array.length - this$static.nodeNodeSpacing * ((this$static.children.array.length - 1) / this$static.children.array.length); $notifyAboutNodeChange(this$static.parentRow); } function $expand(this$static, additionalWidthPerBlock, additionalHeightForBlock){ var additionalHeightForRow, index_0, row, row$iterator, widthForRow; widthForRow = this$static.width_0 + additionalWidthPerBlock; this$static.width_0 += additionalWidthPerBlock; this$static.height += additionalHeightForBlock; additionalHeightForRow = additionalHeightForBlock / this$static.rows_0.array.length; index_0 = 0; for (row$iterator = new ArrayList$1(this$static.rows_0); row$iterator.i < row$iterator.this$01.array.length;) { row = castTo($next_6(row$iterator), 209); $expand_0(row, widthForRow, additionalHeightForRow, index_0); ++index_0; } } function $getWidthForTargetHeight(this$static, height){ var bounds, lowerBound, newWidth, upperBound, viableWidth; if (this$static.maxHeight <= height) { return this$static.minWidth; } if ($placeRectsIn_0(this$static, this$static.minWidth, height)) { return this$static.minWidth; } upperBound = this$static.width_0; lowerBound = this$static.minWidth; viableWidth = this$static.width_0; newWidth = (upperBound - lowerBound) / 2 + lowerBound; while (lowerBound + 1 < upperBound) { bounds = $placeRectsIn_1(this$static, newWidth, false); if (bounds.width_0 <= newWidth && bounds.height <= height) { viableWidth = newWidth; upperBound = newWidth; } else { lowerBound = newWidth; } newWidth = (upperBound - lowerBound) / 2 + lowerBound; } return viableWidth; } function $placeRectsIn(this$static, width_0){ var bounds, oldHeight, oldWidth; oldWidth = this$static.width_0; oldHeight = this$static.height; bounds = $placeRectsIn_1(this$static, width_0, true); return bounds.width_0 != oldWidth || bounds.height != oldHeight; } function $placeRectsIn_0(this$static, width_0, height){ var bounds; bounds = $placeRectsIn_1(this$static, width_0, false); return bounds.width_0 <= width_0 && bounds.height <= height; } function $placeRectsIn_1(this$static, width_0, placeRects){ var currentHeight, currentWidth, currentX, currentY, index_0, maxHeightInRow, rect, rect$iterator, row, widthInRow; currentX = 0; currentY = this$static.y_0; currentWidth = 0; currentHeight = 0; maxHeightInRow = 0; widthInRow = 0; row = 0; if (placeRects) { this$static.rows_0.array.length = 0; $add_3(this$static.rows_0, new BlockRow(this$static.x_0, this$static.y_0, this$static.nodeNodeSpacing)); } index_0 = 0; for (rect$iterator = new ArrayList$1(this$static.children); rect$iterator.i < rect$iterator.this$01.array.length;) { rect = castTo($next_6(rect$iterator), 27); if (currentX + rect.width_0 + (index_0 > 0?this$static.nodeNodeSpacing:0) > width_0 && maxHeightInRow > 0) { currentX = 0; currentY += maxHeightInRow + this$static.nodeNodeSpacing; currentWidth = $wnd.Math.max(currentWidth, widthInRow); currentHeight += maxHeightInRow + this$static.nodeNodeSpacing; maxHeightInRow = 0; widthInRow = 0; if (placeRects) { ++row; $add_3(this$static.rows_0, new BlockRow(this$static.x_0, currentY, this$static.nodeNodeSpacing)); } index_0 = 0; } widthInRow += rect.width_0 + (index_0 > 0?this$static.nodeNodeSpacing:0); maxHeightInRow = $wnd.Math.max(maxHeightInRow, rect.height); placeRects && $addRectangle(castTo($get_11(this$static.rows_0, row), 209), rect); currentX += rect.width_0 + (index_0 > 0?this$static.nodeNodeSpacing:0); ++index_0; } currentWidth = $wnd.Math.max(currentWidth, widthInRow); currentHeight += maxHeightInRow; if (placeRects) { this$static.width_0 = currentWidth; this$static.height = currentHeight; $notifyAboutNodeChange(this$static.parentRow); } return new ElkRectangle_0(this$static.x_0, this$static.y_0, currentWidth, currentHeight); } function $removeChild(this$static, rect){ var row, row$iterator; $remove_12(this$static.children, rect); for (row$iterator = new ArrayList$1(this$static.rows_0); row$iterator.i < row$iterator.this$01.array.length;) { row = castTo($next_6(row$iterator), 209); if ($indexOf_3(row.rects, rect, 0) != -1) { $remove_12(row.rects, rect); $updateRow(row); row.rects.array.length == 0 && $remove_12(this$static.rows_0, row); break; } } $adjustSizeAfterRemove(this$static); } function $setLocation(this$static, xCoord, yCoord){ var row, row$iterator; $adjustChildrensXandY(this$static, xCoord - this$static.x_0, yCoord - this$static.y_0); for (row$iterator = new ArrayList$1(this$static.rows_0); row$iterator.i < row$iterator.this$01.array.length;) { row = castTo($next_6(row$iterator), 209); $setX_0(row, row.x_0 + xCoord - this$static.x_0); $setY_0(row, row.y_0 + yCoord - this$static.y_0); } this$static.x_0 = xCoord; this$static.y_0 = yCoord; } function Block(xCoord, yCoord, parentRow, nodeNodeSpacing){ this.children = new ArrayList; this.rows_0 = new ArrayList; this.nodeNodeSpacing = nodeNodeSpacing; this.parentRow = parentRow; this.x_0 = xCoord; this.y_0 = yCoord; this.width_0 = 0; this.height = 0; } defineClass(172, 1, {172:1}, Block); _.averageHeight = 0; _.fixed_0 = false; _.height = 0; _.maxHeight = 0; _.minHeight = 0; _.minWidth = 0; _.nodeNodeSpacing = 0; _.positionFixed = false; _.smallestRectHeight = $intern_60; _.smallestRectWidth = $intern_60; _.width_0 = 0; _.x_0 = 0; _.y_0 = 0; var Lorg_eclipse_elk_alg_rectpacking_util_Block_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.util', 'Block', 172); function $addRectangle(this$static, rect){ $setX_2(rect, this$static.x_0 + this$static.width_0 + (this$static.rects.array.length == 0?0:this$static.nodeNodeSpacing)); $setY_3(rect, this$static.y_0); this$static.height = $wnd.Math.max(this$static.height, rect.height); this$static.width_0 += rect.width_0 + (this$static.rects.array.length == 0?0:this$static.nodeNodeSpacing); $add_3(this$static.rects, rect); return true; } function $expand_0(this$static, widthForRow, additionalHeightForRow, index_0){ var additionalWidthForRect, i, newHeight, newWidth, oldHeight, oldWidth, rect, rect$iterator; additionalWidthForRect = (widthForRow - this$static.width_0) / this$static.rects.array.length; i = 0; this$static.height += additionalHeightForRow; this$static.width_0 = widthForRow; for (rect$iterator = new ArrayList$1(this$static.rects); rect$iterator.i < rect$iterator.this$01.array.length;) { rect = castTo($next_6(rect$iterator), 27); oldWidth = rect.width_0; oldHeight = rect.height; $setX_2(rect, rect.x_0 + i * additionalWidthForRect); $setY_3(rect, rect.y_0 + index_0 * additionalHeightForRow); $setWidth_0(rect, rect.width_0 + additionalWidthForRect); $setHeight_0(rect, this$static.height); ++i; newWidth = rect.width_0; newHeight = rect.height; translate_1(rect, new KVector_1(newWidth, newHeight), new KVector_1(oldWidth, oldHeight)); } } function $setX_0(this$static, x_0){ this$static.x_0 = x_0; } function $setY_0(this$static, y_0){ this$static.y_0 = y_0; } function $updateRow(this$static){ var height, rect, rect$iterator, width_0; width_0 = 0; height = 0; for (rect$iterator = new ArrayList$1(this$static.rects); rect$iterator.i < rect$iterator.this$01.array.length;) { rect = castTo($next_6(rect$iterator), 27); $setX_2(rect, this$static.x_0 + width_0); $setY_3(rect, this$static.y_0); width_0 += rect.width_0 + this$static.nodeNodeSpacing; height = $wnd.Math.max(height, rect.height + this$static.nodeNodeSpacing); } this$static.width_0 = width_0 - this$static.nodeNodeSpacing; this$static.height = height - this$static.nodeNodeSpacing; } function BlockRow(x_0, y_0, nodeNodeSpacing){ this.rects = new ArrayList; this.x_0 = x_0; this.y_0 = y_0; this.nodeNodeSpacing = nodeNodeSpacing; } defineClass(209, 1, {209:1}, BlockRow); _.height = 0; _.nodeNodeSpacing = 0; _.width_0 = 0; _.x_0 = 0; _.y_0 = 0; var Lorg_eclipse_elk_alg_rectpacking_util_BlockRow_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.util', 'BlockRow', 209); function $addBlock(this$static, block){ block.stack_0 = this$static; this$static.width_0 = $wnd.Math.max(this$static.width_0, block.width_0); this$static.height += block.height + (this$static.blocks.array.length == 0?0:this$static.nodeNodeSpacing); $add_3(this$static.blocks, block); } function $expand_1(this$static, additionalWidth, additionalHeight){ var additionalHeightPerBlock, block, block$iterator, index_0; index_0 = 0; additionalHeightPerBlock = additionalHeight / this$static.blocks.array.length; for (block$iterator = new ArrayList$1(this$static.blocks); block$iterator.i < block$iterator.this$01.array.length;) { block = castTo($next_6(block$iterator), 172); $setLocation(block, block.x_0, block.y_0 + index_0 * additionalHeightPerBlock); $expand(block, this$static.width_0 - block.width_0 + additionalWidth, additionalHeightPerBlock); ++index_0; } } function $getMinimumWidth_1(this$static){ var block, block$iterator, minWidth; minWidth = 0; for (block$iterator = new ArrayList$1(this$static.blocks); block$iterator.i < block$iterator.this$01.array.length;) { block = castTo($next_6(block$iterator), 172); minWidth = $wnd.Math.max(minWidth, block.minWidth); } return minWidth; } function $getWidthForFixedHeight(this$static, height){ var block, block$iterator, bounds, lowerBound, minWidth, newWidth, totalHeight, upperBound, viableWidth; if (this$static.blocks.array.length == 1) { return $getWidthForTargetHeight(castTo($get_11(this$static.blocks, 0), 172), height); } minWidth = $getMinimumWidth_1(this$static); totalHeight = 0; upperBound = this$static.width_0; lowerBound = minWidth; viableWidth = this$static.width_0; newWidth = (upperBound - lowerBound) / 2 + lowerBound; while (lowerBound + 1 < upperBound) { totalHeight = 0; for (block$iterator = new ArrayList$1(this$static.blocks); block$iterator.i < block$iterator.this$01.array.length;) { block = castTo($next_6(block$iterator), 172); totalHeight += (bounds = $placeRectsIn_1(block, newWidth, false) , bounds.height); } if (totalHeight < height) { viableWidth = newWidth; upperBound = newWidth; } else { lowerBound = newWidth; } newWidth = (upperBound - lowerBound) / 2 + lowerBound; } return viableWidth; } function $placeRectsIn_2(this$static, targetWidth){ var block, block$iterator, currentHeight, currentWidth, currentY; currentY = this$static.y_0; currentHeight = 0; currentWidth = 0; for (block$iterator = new ArrayList$1(this$static.blocks); block$iterator.i < block$iterator.this$01.array.length;) { block = castTo($next_6(block$iterator), 172); $setLocation(block, this$static.x_0, currentY); $placeRectsIn(block, targetWidth); currentWidth = $wnd.Math.max(currentWidth, block.width_0); currentY += block.height + this$static.nodeNodeSpacing; currentHeight = currentY; } this$static.width_0 = currentWidth; this$static.height = currentHeight; } function $setLocation_0(this$static, x_0, y_0){ var block, block$iterator, xDiff, yDiff; xDiff = x_0 - this$static.x_0; yDiff = y_0 - this$static.y_0; for (block$iterator = new ArrayList$1(this$static.blocks); block$iterator.i < block$iterator.this$01.array.length;) { block = castTo($next_6(block$iterator), 172); $setLocation(block, block.x_0 + xDiff, block.y_0 + yDiff); } this$static.x_0 = x_0; this$static.y_0 = y_0; } function $updateDimension(this$static){ var block, block$iterator, height, index_0, width_0; height = 0; width_0 = 0; index_0 = 0; for (block$iterator = new ArrayList$1(this$static.blocks); block$iterator.i < block$iterator.this$01.array.length;) { block = castTo($next_6(block$iterator), 172); width_0 = $wnd.Math.max(width_0, block.width_0); height += block.height + (index_0 > 0?this$static.nodeNodeSpacing:0); ++index_0; } this$static.height = height; this$static.width_0 = width_0; } function BlockStack(x_0, y_0, nodeNodeSpacing){ this.blocks = new ArrayList; this.x_0 = x_0; this.y_0 = y_0; this.nodeNodeSpacing = nodeNodeSpacing; } defineClass(315, 1, {315:1}, BlockStack); _.height = 0; _.nodeNodeSpacing = 0; _.width_0 = 0; _.x_0 = 0; _.y_0 = 0; var Lorg_eclipse_elk_alg_rectpacking_util_BlockStack_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.util', 'BlockStack', 315); function $setDrawingHeight(this$static, drawingHeight){ this$static.drawingHeight = drawingHeight; this$static.drawingWidth > 0 && this$static.drawingHeight > 0 && (this$static.scaleMeasure = computeScaleMeasure(this$static.drawingWidth, this$static.drawingHeight, this$static.dar)); } function $setDrawingWidth(this$static, drawingWidth){ this$static.drawingWidth = drawingWidth; this$static.drawingWidth > 0 && this$static.drawingHeight > 0 && (this$static.scaleMeasure = computeScaleMeasure(this$static.drawingWidth, this$static.drawingHeight, this$static.dar)); } function $setPlacementOption(this$static, placementOption){ this$static.placementOption = placementOption; } function DrawingData(dar, drawingWidth, drawingHeight, placementOption){ DrawingData_0.call(this, dar, drawingWidth, drawingHeight, placementOption, 0, 0); } function DrawingData_0(dar, drawingWidth, drawingHeight, placementOption, nextXcoord, nextYcoord){ this.dar = dar; this.drawingWidth = drawingWidth; this.drawingHeight = drawingHeight; this.placementOption = placementOption; this.nextXcoordinate = nextXcoord; this.nextYcoordinate = nextYcoord; this.drawingWidth > 0 && this.drawingHeight > 0 && (this.scaleMeasure = computeScaleMeasure(this.drawingWidth, this.drawingHeight, this.dar)); } defineClass(238, 1, {238:1}, DrawingData, DrawingData_0); _.dar = 0; _.drawingHeight = 0; _.drawingWidth = 0; _.nextXcoordinate = 0; _.nextYcoordinate = 0; _.scaleMeasure = 0; var Lorg_eclipse_elk_alg_rectpacking_util_DrawingData_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.util', 'DrawingData', 238); function $clinit_DrawingDataDescriptor(){ $clinit_DrawingDataDescriptor = emptyMethod; CANDIDATE_POSITION_LAST_PLACED_RIGHT = new DrawingDataDescriptor('CANDIDATE_POSITION_LAST_PLACED_RIGHT', 0); CANDIDATE_POSITION_LAST_PLACED_BELOW = new DrawingDataDescriptor('CANDIDATE_POSITION_LAST_PLACED_BELOW', 1); CANDIDATE_POSITION_WHOLE_DRAWING_RIGHT = new DrawingDataDescriptor('CANDIDATE_POSITION_WHOLE_DRAWING_RIGHT', 2); CANDIDATE_POSITION_WHOLE_DRAWING_BELOW = new DrawingDataDescriptor('CANDIDATE_POSITION_WHOLE_DRAWING_BELOW', 3); WHOLE_DRAWING = new DrawingDataDescriptor('WHOLE_DRAWING', 4); } function DrawingDataDescriptor(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_88(name_0){ $clinit_DrawingDataDescriptor(); return valueOf(($clinit_DrawingDataDescriptor$Map() , $MAP_78), name_0); } function values_96(){ $clinit_DrawingDataDescriptor(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_rectpacking_util_DrawingDataDescriptor_2_classLit, 1), $intern_37, 373, 0, [CANDIDATE_POSITION_LAST_PLACED_RIGHT, CANDIDATE_POSITION_LAST_PLACED_BELOW, CANDIDATE_POSITION_WHOLE_DRAWING_RIGHT, CANDIDATE_POSITION_WHOLE_DRAWING_BELOW, WHOLE_DRAWING]); } defineClass(373, 22, {3:1, 34:1, 22:1, 373:1}, DrawingDataDescriptor); var CANDIDATE_POSITION_LAST_PLACED_BELOW, CANDIDATE_POSITION_LAST_PLACED_RIGHT, CANDIDATE_POSITION_WHOLE_DRAWING_BELOW, CANDIDATE_POSITION_WHOLE_DRAWING_RIGHT, WHOLE_DRAWING; var Lorg_eclipse_elk_alg_rectpacking_util_DrawingDataDescriptor_2_classLit = createForEnum('org.eclipse.elk.alg.rectpacking.util', 'DrawingDataDescriptor', 373, Ljava_lang_Enum_2_classLit, values_96, valueOf_88); function $clinit_DrawingDataDescriptor$Map(){ $clinit_DrawingDataDescriptor$Map = emptyMethod; $MAP_78 = createValueOfMap(($clinit_DrawingDataDescriptor() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_rectpacking_util_DrawingDataDescriptor_2_classLit, 1), $intern_37, 373, 0, [CANDIDATE_POSITION_LAST_PLACED_RIGHT, CANDIDATE_POSITION_LAST_PLACED_BELOW, CANDIDATE_POSITION_WHOLE_DRAWING_RIGHT, CANDIDATE_POSITION_WHOLE_DRAWING_BELOW, WHOLE_DRAWING]))); } var $MAP_78; function calculateDimensions(rectangles){ var maxHeight, maxWidth, node, node$iterator; maxWidth = 0; maxHeight = 0; for (node$iterator = new AbstractEList$EIterator(rectangles); node$iterator.cursor != node$iterator.this$01_2.size_1();) { node = castTo($doNext(node$iterator), 27); maxWidth = $wnd.Math.max(node.width_0 + node.x_0, maxWidth); maxHeight = $wnd.Math.max(node.height + node.y_0, maxHeight); } return new KVector_1(maxWidth, maxHeight); } function calculateDimensions_0(rows_0, nodeNodeSpacing){ var index_0, maxWidth, newHeight, row, row$iterator; maxWidth = 0; newHeight = 0; index_0 = 0; for (row$iterator = new ArrayList$1(rows_0); row$iterator.i < row$iterator.this$01.array.length;) { row = castTo($next_6(row$iterator), 186); maxWidth = $wnd.Math.max(maxWidth, row.width_0); newHeight += row.height + (index_0 > 0?nodeNodeSpacing:0); ++index_0; } return new KVector_1(maxWidth, newHeight); } function computeScaleMeasure(width_0, height, dar){ return $wnd.Math.min(dar / width_0, 1 / height); } function resetCoordinates(graph){ var node, node$iterator; for (node$iterator = new AbstractEList$EIterator(graph); node$iterator.cursor != node$iterator.this$01_2.size_1();) { node = castTo($doNext(node$iterator), 27); $setX_2(node, 0); $setY_3(node, 0); } } function $addBlock_0(this$static, block){ this$static.height = $wnd.Math.max(this$static.height, block.height); this$static.width_0 += block.width_0 + (this$static.children.array.length == 0?0:this$static.nodeNodeSpacing); $add_3(this$static.children, block); } function $expand_2(this$static, width_0, additionalHeight){ var additionalHeightForStack, additionalWidth, additionalWidthPerStack, index_0, stack_0, stack$iterator; additionalWidth = width_0 - this$static.width_0; additionalWidthPerStack = additionalWidth / this$static.stacks.array.length; index_0 = 0; for (stack$iterator = new ArrayList$1(this$static.stacks); stack$iterator.i < stack$iterator.this$01.array.length;) { stack_0 = castTo($next_6(stack$iterator), 315); additionalHeightForStack = this$static.height - stack_0.height + additionalHeight; $setLocation_0(stack_0, stack_0.x_0 + index_0 * additionalWidthPerStack, stack_0.y_0); $expand_1(stack_0, additionalWidthPerStack, additionalHeightForStack); ++index_0; } } function $notifyAboutNodeChange(this$static){ var child, child$iterator, index_0, newMaxHeight, totalStackWidth; totalStackWidth = 0; newMaxHeight = $intern_61; index_0 = 0; for (child$iterator = new ArrayList$1(this$static.children); child$iterator.i < child$iterator.this$01.array.length;) { child = castTo($next_6(child$iterator), 172); totalStackWidth += child.width_0 + (index_0 > 0?this$static.nodeNodeSpacing:0); newMaxHeight = $wnd.Math.max(newMaxHeight, child.height); ++index_0; } this$static.width_0 = totalStackWidth; this$static.height = newMaxHeight; } function $removeBlock(this$static, block){ var child, child$iterator, newMaxHeight; $remove_12(this$static.children, block); this$static.width_0 -= block.width_0 + (this$static.children.array.length == 0?0:this$static.nodeNodeSpacing); newMaxHeight = $intern_127; for (child$iterator = new ArrayList$1(this$static.children); child$iterator.i < child$iterator.this$01.array.length;) { child = castTo($next_6(child$iterator), 172); newMaxHeight = $wnd.Math.max(newMaxHeight, child.height); } this$static.height = newMaxHeight; } function $setY_1(this$static, y_0){ var stack_0, stack$iterator, yChange; yChange = y_0 - this$static.y_0; for (stack$iterator = new ArrayList$1(this$static.stacks); stack$iterator.i < stack$iterator.this$01.array.length;) { stack_0 = castTo($next_6(stack$iterator), 315); $setLocation_0(stack_0, stack_0.x_0, stack_0.y_0 + yChange); } this$static.y_0 = y_0; } function RectRow(y_0, nodeNodeSpacing){ this.children = new ArrayList; this.stacks = new ArrayList; this.y_0 = y_0; this.nodeNodeSpacing = nodeNodeSpacing; } defineClass(186, 1, {186:1}, RectRow); _.height = 0; _.nodeNodeSpacing = 0; _.width_0 = 0; _.y_0 = 0; var Lorg_eclipse_elk_alg_rectpacking_util_RectRow_2_classLit = createForClass('org.eclipse.elk.alg.rectpacking.util', 'RectRow', 186); function $applyPositions_0(this$static, g){ var e, e$iterator, elkNode, endLocation, kedgeSection, maxX, maxY, minX, minY, node, node$iterator, padding, source, startLocation, target, uv, vu; minX = $intern_60; minY = $intern_60; maxX = $intern_61; maxY = $intern_61; for (node$iterator = new ArrayList$1(g.vertices); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 68); elkNode = castTo(castTo($get_10(this$static.nodeMap, node.originalVertex), 42).second, 27); $setLocation_1(elkNode, node.rect.x_0, node.rect.y_0); minX = $wnd.Math.min(minX, elkNode.x_0); minY = $wnd.Math.min(minY, elkNode.y_0); maxX = $wnd.Math.max(maxX, elkNode.x_0 + elkNode.width_0); maxY = $wnd.Math.max(maxY, elkNode.y_0 + elkNode.height); } padding = castTo($getProperty_0(this$static.elkGraph, ($clinit_SporeCompactionOptions() , PADDING_4)), 107); resizeNode_1(this$static.elkGraph, maxX - minX + (padding.left + padding.right), maxY - minY + (padding.top_0 + padding.bottom), true, true); translate_0(this$static.elkGraph, -minX + padding.left, -minY + padding.top_0); for (e$iterator = new AbstractEList$EIterator($getContainedEdges(this$static.elkGraph)); e$iterator.cursor != e$iterator.this$01_2.size_1();) { e = castTo($doNext(e$iterator), 74); kedgeSection = firstEdgeSection(e, true, true); source = getSourceNode(e); target = getTargetNode_0(e); startLocation = new KVector_1(source.x_0 + source.width_0 / 2, source.y_0 + source.height / 2); endLocation = new KVector_1(target.x_0 + target.width_0 / 2, target.y_0 + target.height / 2); uv = $sub_0(new KVector_1(endLocation.x_0, endLocation.y_0), startLocation); clipVector(uv, source.width_0, source.height); $add_19(startLocation, uv); vu = $sub_0(new KVector_1(startLocation.x_0, startLocation.y_0), endLocation); clipVector(vu, target.width_0, target.height); $add_19(endLocation, vu); $setStartLocation(kedgeSection, startLocation.x_0, startLocation.y_0); $setEndLocation(kedgeSection, endLocation.x_0, endLocation.y_0); } } function $importGraph_2(this$static, inputGraph){ var adapter, calcu, center, closest, compactionStrategy, costFunction, costFunctionID, distance, elkNode, elkNode$iterator, halfHeight, halfWidth, id_0, margin, node, node$iterator, node$iterator0, preferredRootID, rootSelection, treeConstructionStrategy, vertex; this$static.elkGraph = inputGraph; this$static.nodeMap = new HashMap; adapter = ($clinit_ElkGraphAdapters() , new ElkGraphAdapters$ElkGraphAdapter(this$static.elkGraph)); calcu = new NodeMarginCalculator(adapter); $process(calcu); preferredRootID = castToString($getProperty_0(this$static.elkGraph, ($clinit_SporeCompactionOptions() , PROCESSING_ORDER_PREFERRED_ROOT))); costFunctionID = castTo($getProperty_0(this$static.elkGraph, PROCESSING_ORDER_SPANNING_TREE_COST_FUNCTION), 324); treeConstructionStrategy = castTo($getProperty_0(this$static.elkGraph, PROCESSING_ORDER_TREE_CONSTRUCTION), 437); compactionStrategy = castTo($getProperty_0(this$static.elkGraph, COMPACTION_COMPACTION_STRATEGY), 490); rootSelection = castTo($getProperty_0(this$static.elkGraph, PROCESSING_ORDER_ROOT_SELECTION), 438); this$static.spacingNodeNode = $doubleValue(castToDouble($getProperty_0(this$static.elkGraph, SPACING_NODE_NODE_4))); costFunction = this$static.centerDistance; switch (costFunctionID.ordinal) { case 0: costFunction = this$static.centerDistance; break; case 1: costFunction = this$static.circleUnderlap; break; case 2: costFunction = this$static.rectangleUnderlap; break; case 3: costFunction = this$static.invertedOverlap; break; case 4: costFunction = this$static.minimumRootDistance; break; default:throw toJs(new IllegalArgumentException_0('No implementation available for ' + (costFunctionID.name_0 != null?costFunctionID.name_0:'' + costFunctionID.ordinal))); } this$static.graph_0 = new Graph(costFunction, treeConstructionStrategy, compactionStrategy); $setProperty_0(this$static.graph_0, ($clinit_InternalProperties() , DEBUG_SVG), castToBoolean($getProperty_0(this$static.elkGraph, DEBUG_MODE_1))); this$static.graph_0.orthogonalCompaction = $booleanValue(castToBoolean($getProperty_0(this$static.elkGraph, COMPACTION_ORTHOGONAL))); if ($getChildren(this$static.elkGraph).size_0 == 0) { return this$static.graph_0; } for (elkNode$iterator = new AbstractEList$EIterator($getChildren(this$static.elkGraph)); elkNode$iterator.cursor != elkNode$iterator.this$01_2.size_1();) { elkNode = castTo($doNext(elkNode$iterator), 27); halfWidth = elkNode.width_0 / 2; halfHeight = elkNode.height / 2; vertex = new KVector_1(elkNode.x_0 + halfWidth, elkNode.y_0 + halfHeight); while ($containsKey_3(this$static.nodeMap, vertex)) { $add_18(vertex, ($wnd.Math.random() - 0.5) * $intern_101, ($wnd.Math.random() - 0.5) * $intern_101); } margin = castTo($getProperty_0(elkNode, ($clinit_CoreOptions() , MARGINS_0)), 140); node = new Node_0(vertex, new ElkRectangle_0(vertex.x_0 - halfWidth - this$static.spacingNodeNode / 2 - margin.left, vertex.y_0 - halfHeight - this$static.spacingNodeNode / 2 - margin.top_0, elkNode.width_0 + this$static.spacingNodeNode + (margin.left + margin.right), elkNode.height + this$static.spacingNodeNode + (margin.top_0 + margin.bottom))); $add_3(this$static.graph_0.vertices, node); $put_6(this$static.nodeMap, vertex, new Pair(node, elkNode)); } switch (rootSelection.ordinal) { case 0: if (preferredRootID == null) { this$static.graph_0.preferredRoot = castTo($get_11(this$static.graph_0.vertices, 0), 68); } else { for (node$iterator0 = new ArrayList$1(this$static.graph_0.vertices); node$iterator0.i < node$iterator0.this$01.array.length;) { node = castTo($next_6(node$iterator0), 68); id_0 = castTo(castTo($get_10(this$static.nodeMap, node.originalVertex), 42).second, 27).getIdentifier(); id_0 != null && $equals_5(id_0, preferredRootID) && (this$static.graph_0.preferredRoot = node); } } break; case 1: center = new KVector_1(this$static.elkGraph.width_0, this$static.elkGraph.height); center.x_0 *= 0.5; center.y_0 *= 0.5; $add_18(center, this$static.elkGraph.x_0, this$static.elkGraph.y_0); closest = $intern_60; for (node$iterator = new ArrayList$1(this$static.graph_0.vertices); node$iterator.i < node$iterator.this$01.array.length;) { node = castTo($next_6(node$iterator), 68); distance = $distance_0(node.originalVertex, center); if (distance < closest) { closest = distance; this$static.graph_0.preferredRoot = node; } } break; default:throw toJs(new IllegalArgumentException_0('No implementation available for ' + (rootSelection.name_0 != null?rootSelection.name_0:'' + rootSelection.ordinal))); } return this$static.graph_0; } function $lambda$1_7(this$static, e_0){ return $wnd.Math.min($distance_0(e_0.u, this$static.graph_0.preferredRoot.vertex), $distance_0(e_0.v, this$static.graph_0.preferredRoot.vertex)); } function $lambda$2_4(this$static, e_0){ var n1, n2; n1 = castTo(castTo($get_10(this$static.nodeMap, e_0.u), 42).first, 68); n2 = castTo(castTo($get_10(this$static.nodeMap, e_0.v), 42).first, 68); return $distance_0(e_0.u, e_0.v) - $distance_0(e_0.u, $getPosition(n1.rect)) - $distance_0(e_0.v, $getPosition(n2.rect)); } function $lambda$3_3(this$static, e_0){ var n1, n2; n1 = castTo(castTo($get_10(this$static.nodeMap, e_0.u), 42).first, 68); n2 = castTo(castTo($get_10(this$static.nodeMap, e_0.v), 42).first, 68); return $underlap(n1, n2); } function $lambda$4_2(this$static, e_0){ var dist, n1, n2, r1, r2, s; n1 = castTo(castTo($get_10(this$static.nodeMap, e_0.u), 42).first, 68); n2 = castTo(castTo($get_10(this$static.nodeMap, e_0.v), 42).first, 68); r1 = n1.rect; r2 = n2.rect; dist = shortestDistance_0(r1, r2); if (dist >= 0) { return dist; } s = $length($sub_0(new KVector_1(r2.x_0 + r2.width_0 / 2, r2.y_0 + r2.height / 2), new KVector_1(r1.x_0 + r1.width_0 / 2, r1.y_0 + r1.height / 2))); return -(overlap_0(r1, r2) - 1) * s; } function $updateGraph(this$static, g){ var n, n$iterator, original, updatedNodeMap; updatedNodeMap = new HashMap; g.tEdges = null; g.tree = null; for (n$iterator = new ArrayList$1(g.vertices); n$iterator.i < n$iterator.this$01.array.length;) { n = castTo($next_6(n$iterator), 68); original = castTo($get_10(this$static.nodeMap, n.originalVertex), 42); n.originalVertex = $getCenter(n.rect); $put_6(updatedNodeMap, n.originalVertex, original); } this$static.nodeMap = updatedNodeMap; } function ElkGraphImporter_0(){ this.centerDistance = new ElkGraphImporter$lambda$0$Type_1; this.minimumRootDistance = new ElkGraphImporter$lambda$1$Type_0(this); this.circleUnderlap = new ElkGraphImporter$lambda$2$Type_0(this); this.rectangleUnderlap = new ElkGraphImporter$lambda$3$Type(this); this.invertedOverlap = new ElkGraphImporter$lambda$4$Type_0(this); } defineClass(763, 1, {}, ElkGraphImporter_0); _.spacingNodeNode = 0; var Lorg_eclipse_elk_alg_spore_ElkGraphImporter_2_classLit = createForClass('org.eclipse.elk.alg.spore', 'ElkGraphImporter', 763); function ElkGraphImporter$lambda$0$Type_1(){ } defineClass(1209, 1, {}, ElkGraphImporter$lambda$0$Type_1); _.cost = function cost_0(arg0){ return $distance_0(arg0.u, arg0.v); } ; var Lorg_eclipse_elk_alg_spore_ElkGraphImporter$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.spore', 'ElkGraphImporter/lambda$0$Type', 1209); function ElkGraphImporter$lambda$1$Type_0($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1210, 1, {}, ElkGraphImporter$lambda$1$Type_0); _.cost = function cost_1(arg0){ return $lambda$1_7(this.$$outer_0, arg0); } ; var Lorg_eclipse_elk_alg_spore_ElkGraphImporter$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.alg.spore', 'ElkGraphImporter/lambda$1$Type', 1210); function ElkGraphImporter$lambda$2$Type_0($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1211, 1, {}, ElkGraphImporter$lambda$2$Type_0); _.cost = function cost_2(arg0){ return $lambda$2_4(this.$$outer_0, arg0); } ; var Lorg_eclipse_elk_alg_spore_ElkGraphImporter$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.alg.spore', 'ElkGraphImporter/lambda$2$Type', 1211); function ElkGraphImporter$lambda$3$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1212, 1, {}, ElkGraphImporter$lambda$3$Type); _.cost = function cost_3(arg0){ return $lambda$3_3(this.$$outer_0, arg0); } ; var Lorg_eclipse_elk_alg_spore_ElkGraphImporter$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.alg.spore', 'ElkGraphImporter/lambda$3$Type', 1212); function ElkGraphImporter$lambda$4$Type_0($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1213, 1, {}, ElkGraphImporter$lambda$4$Type_0); _.cost = function cost_4(arg0){ return $lambda$4_2(this.$$outer_0, arg0); } ; var Lorg_eclipse_elk_alg_spore_ElkGraphImporter$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.alg.spore', 'ElkGraphImporter/lambda$4$Type', 1213); function OverlapRemovalLayoutProvider(){ this.algorithmAssembler = new AlgorithmAssembler(Lorg_eclipse_elk_alg_spore_SPOrEPhases_2_classLit); } function lambda$0_39(overlapEdges_0, n1_1, n2_2){ return $add_6(overlapEdges_0, new TEdge(n1_1.originalVertex, n2_2.originalVertex)); } defineClass(1115, 205, $intern_96, OverlapRemovalLayoutProvider); _.layout = function layout_6(layoutGraph, progressMonitor){ var graph, graphImporter, iteration, lad, layoutProvider, maxIterations, overlapEdges, overlapHandler, overlapsExisted, processor, processor$iterator, requestedAlgorithm; if ($hasProperty_0(layoutGraph, ($clinit_SporeCompactionOptions() , UNDERLYING_LAYOUT_ALGORITHM))) { requestedAlgorithm = castToString($getProperty_0(layoutGraph, ($clinit_SporeOverlapRemovalOptions() , UNDERLYING_LAYOUT_ALGORITHM_1))); lad = $getAlgorithmDataBySuffix(getInstance(), requestedAlgorithm); if (lad) { layoutProvider = castTo($fetch(lad.providerPool), 205); layoutProvider.layout(layoutGraph, progressMonitor.subTask(1)); } } $setProperty_1(layoutGraph, PROCESSING_ORDER_ROOT_SELECTION, ($clinit_RootSelection() , CENTER_NODE)); $setProperty_1(layoutGraph, PROCESSING_ORDER_SPANNING_TREE_COST_FUNCTION, ($clinit_SpanningTreeCostFunction() , INVERTED_OVERLAP)); $setProperty_1(layoutGraph, PROCESSING_ORDER_TREE_CONSTRUCTION, ($clinit_TreeConstructionStrategy() , MINIMUM_SPANNING_TREE)); maxIterations = castTo($getProperty_0(layoutGraph, ($clinit_SporeOverlapRemovalOptions() , OVERLAP_REMOVAL_MAX_ITERATIONS_0)), 17).value_0; progressMonitor.begin('Overlap removal', 1); $booleanValue(castToBoolean($getProperty_0(layoutGraph, DEBUG_MODE_2))) && 'null45scanlineOverlaps'; overlapEdges = new HashSet; overlapHandler = new OverlapRemovalLayoutProvider$lambda$0$Type(overlapEdges); graphImporter = new ElkGraphImporter_0; graph = $importGraph_2(graphImporter, layoutGraph); overlapsExisted = true; iteration = 0; while (iteration < maxIterations && overlapsExisted) { if ($booleanValue(castToBoolean($getProperty_0(layoutGraph, OVERLAP_REMOVAL_RUN_SCANLINE_0)))) { overlapEdges.map_0.clear_0(); $sweep_0(new ScanlineOverlapCheck(overlapHandler), graph.vertices); if (overlapEdges.map_0.size_1() == 0) { break; } graph.tEdges = overlapEdges; } $reset_4(this.algorithmAssembler); $setPhase(this.algorithmAssembler, ($clinit_SPOrEPhases() , P1_STRUCTURE), ($clinit_StructureExtractionStrategy() , DELAUNAY_TRIANGULATION)); $setPhase(this.algorithmAssembler, P2_PROCESSING_ORDER, graph.treeConstructionStrategy); $setPhase(this.algorithmAssembler, P3_EXECUTION, ($clinit_OverlapRemovalStrategy() , GROW_TREE)); this.algorithm = $build_0(this.algorithmAssembler, graph); for (processor$iterator = new ArrayList$1(this.algorithm); processor$iterator.i < processor$iterator.this$01.array.length;) { processor = castTo($next_6(processor$iterator), 47); processor.process(graph, progressMonitor.subTask(1)); } $updateGraph(graphImporter, graph); overlapsExisted = $booleanValue(castToBoolean($getProperty(graph, ($clinit_InternalProperties() , OVERLAPS_EXISTED)))); ++iteration; } $applyPositions_0(graphImporter, graph); progressMonitor.done_1(); } ; var Lorg_eclipse_elk_alg_spore_OverlapRemovalLayoutProvider_2_classLit = createForClass('org.eclipse.elk.alg.spore', 'OverlapRemovalLayoutProvider', 1115); function $handle_4(this$static, arg0, arg1){ lambda$0_39(this$static.overlapEdges_0, arg0, arg1); } function OverlapRemovalLayoutProvider$lambda$0$Type(overlapEdges_0){ this.overlapEdges_0 = overlapEdges_0; } defineClass(1116, 1, {}, OverlapRemovalLayoutProvider$lambda$0$Type); var Lorg_eclipse_elk_alg_spore_OverlapRemovalLayoutProvider$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.spore', 'OverlapRemovalLayoutProvider/lambda$0$Type', 1116); function $clinit_SPOrEPhases(){ $clinit_SPOrEPhases = emptyMethod; P1_STRUCTURE = new SPOrEPhases('P1_STRUCTURE', 0); P2_PROCESSING_ORDER = new SPOrEPhases('P2_PROCESSING_ORDER', 1); P3_EXECUTION = new SPOrEPhases('P3_EXECUTION', 2); } function SPOrEPhases(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_89(name_0){ $clinit_SPOrEPhases(); return valueOf(($clinit_SPOrEPhases$Map() , $MAP_79), name_0); } function values_97(){ $clinit_SPOrEPhases(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_spore_SPOrEPhases_2_classLit, 1), $intern_37, 444, 0, [P1_STRUCTURE, P2_PROCESSING_ORDER, P3_EXECUTION]); } defineClass(444, 22, {3:1, 34:1, 22:1, 444:1}, SPOrEPhases); var P1_STRUCTURE, P2_PROCESSING_ORDER, P3_EXECUTION; var Lorg_eclipse_elk_alg_spore_SPOrEPhases_2_classLit = createForEnum('org.eclipse.elk.alg.spore', 'SPOrEPhases', 444, Ljava_lang_Enum_2_classLit, values_97, valueOf_89); function $clinit_SPOrEPhases$Map(){ $clinit_SPOrEPhases$Map = emptyMethod; $MAP_79 = createValueOfMap(($clinit_SPOrEPhases() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_spore_SPOrEPhases_2_classLit, 1), $intern_37, 444, 0, [P1_STRUCTURE, P2_PROCESSING_ORDER, P3_EXECUTION]))); } var $MAP_79; function $shrink(this$static, graph, progressMonitor){ var processor, processor$iterator; $reset_4(this$static.algorithmAssembler); $setPhase(this$static.algorithmAssembler, ($clinit_SPOrEPhases() , P1_STRUCTURE), ($clinit_StructureExtractionStrategy() , DELAUNAY_TRIANGULATION)); $setPhase(this$static.algorithmAssembler, P2_PROCESSING_ORDER, graph.treeConstructionStrategy); $setPhase(this$static.algorithmAssembler, P3_EXECUTION, graph.compactionStrategy); this$static.algorithm = $build_0(this$static.algorithmAssembler, graph); progressMonitor.begin('Compaction by shrinking a tree', this$static.algorithm.array.length); if (graph.vertices.array.length > 1) { for (processor$iterator = new ArrayList$1(this$static.algorithm); processor$iterator.i < processor$iterator.this$01.array.length;) { processor = castTo($next_6(processor$iterator), 47); processor.process(graph, progressMonitor.subTask(1)); } } progressMonitor.done_1(); } function ShrinkTree(){ this.algorithmAssembler = new AlgorithmAssembler(Lorg_eclipse_elk_alg_spore_SPOrEPhases_2_classLit); } defineClass(1219, 1, {}, ShrinkTree); var Lorg_eclipse_elk_alg_spore_ShrinkTree_2_classLit = createForClass('org.eclipse.elk.alg.spore', 'ShrinkTree', 1219); function ShrinkTreeLayoutProvider(){ this.shrinktree = new ShrinkTree; } defineClass(1117, 205, $intern_96, ShrinkTreeLayoutProvider); _.layout = function layout_7(layoutGraph, progressMonitor){ var graph, graphImporter, lad, layoutProvider, requestedAlgorithm; if ($hasProperty_0(layoutGraph, ($clinit_SporeCompactionOptions() , UNDERLYING_LAYOUT_ALGORITHM))) { requestedAlgorithm = castToString($getProperty_0(layoutGraph, UNDERLYING_LAYOUT_ALGORITHM)); lad = $getAlgorithmDataBySuffix(getInstance(), requestedAlgorithm); if (lad) { layoutProvider = castTo($fetch(lad.providerPool), 205); layoutProvider.layout(layoutGraph, progressMonitor.subTask(1)); } } graphImporter = new ElkGraphImporter_0; graph = $importGraph_2(graphImporter, layoutGraph); $shrink(this.shrinktree, graph, progressMonitor.subTask(1)); $applyPositions_0(graphImporter, graph); } ; var Lorg_eclipse_elk_alg_spore_ShrinkTreeLayoutProvider_2_classLit = createForClass('org.eclipse.elk.alg.spore', 'ShrinkTreeLayoutProvider', 1117); function Graph(costFun, treeStrategy, compStrategy){ this.vertices = new ArrayList; this.costFunction = costFun; this.treeConstructionStrategy = treeStrategy; this.compactionStrategy = compStrategy; } defineClass(306, 137, {3:1, 306:1, 96:1, 137:1}, Graph); _.orthogonalCompaction = false; var Lorg_eclipse_elk_alg_spore_graph_Graph_2_classLit = createForClass('org.eclipse.elk.alg.spore.graph', 'Graph', 306); function $clinit_CompactionStrategy_1(){ $clinit_CompactionStrategy_1 = emptyMethod; DEPTH_FIRST_0 = new CompactionStrategy_1; } function $create_17(this$static){ switch (this$static.ordinal) { case 0: return new ShrinkTreeCompactionPhase; default:throw toJs(new IllegalArgumentException_0('No implementation available for ' + (this$static.name_0 != null?this$static.name_0:'' + this$static.ordinal))); } } function CompactionStrategy_1(){ Enum.call(this, 'DEPTH_FIRST', 0); } function valueOf_90(name_0){ $clinit_CompactionStrategy_1(); return valueOf(($clinit_CompactionStrategy$Map_1() , $MAP_80), name_0); } function values_98(){ $clinit_CompactionStrategy_1(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_spore_options_CompactionStrategy_2_classLit, 1), $intern_37, 490, 0, [DEPTH_FIRST_0]); } defineClass(490, 22, {3:1, 34:1, 22:1, 490:1, 188:1, 196:1}, CompactionStrategy_1); _.create_1 = function create_35(){ return $create_17(this); } ; _.create_2 = function create_34(){ return $create_17(this); } ; var DEPTH_FIRST_0; var Lorg_eclipse_elk_alg_spore_options_CompactionStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.spore.options', 'CompactionStrategy', 490, Ljava_lang_Enum_2_classLit, values_98, valueOf_90); function $clinit_CompactionStrategy$Map_1(){ $clinit_CompactionStrategy$Map_1 = emptyMethod; $MAP_80 = createValueOfMap(($clinit_CompactionStrategy_1() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_spore_options_CompactionStrategy_2_classLit, 1), $intern_37, 490, 0, [DEPTH_FIRST_0]))); } var $MAP_80; function $clinit_OverlapRemovalStrategy(){ $clinit_OverlapRemovalStrategy = emptyMethod; GROW_TREE = new OverlapRemovalStrategy; } function OverlapRemovalStrategy(){ Enum.call(this, 'GROW_TREE', 0); } function valueOf_91(name_0){ $clinit_OverlapRemovalStrategy(); return valueOf(($clinit_OverlapRemovalStrategy$Map() , $MAP_81), name_0); } function values_99(){ $clinit_OverlapRemovalStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_spore_options_OverlapRemovalStrategy_2_classLit, 1), $intern_37, 558, 0, [GROW_TREE]); } defineClass(558, 22, {3:1, 34:1, 22:1, 558:1, 188:1, 196:1}, OverlapRemovalStrategy); _.create_1 = function create_37(){ return new GrowTreePhase; } ; _.create_2 = function create_36(){ return new GrowTreePhase; } ; var GROW_TREE; var Lorg_eclipse_elk_alg_spore_options_OverlapRemovalStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.spore.options', 'OverlapRemovalStrategy', 558, Ljava_lang_Enum_2_classLit, values_99, valueOf_91); function $clinit_OverlapRemovalStrategy$Map(){ $clinit_OverlapRemovalStrategy$Map = emptyMethod; $MAP_81 = createValueOfMap(($clinit_OverlapRemovalStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_spore_options_OverlapRemovalStrategy_2_classLit, 1), $intern_37, 558, 0, [GROW_TREE]))); } var $MAP_81; function $clinit_RootSelection(){ $clinit_RootSelection = emptyMethod; FIXED_1 = new RootSelection('FIXED', 0); CENTER_NODE = new RootSelection('CENTER_NODE', 1); } function RootSelection(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_92(name_0){ $clinit_RootSelection(); return valueOf(($clinit_RootSelection$Map() , $MAP_82), name_0); } function values_100(){ $clinit_RootSelection(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_spore_options_RootSelection_2_classLit, 1), $intern_37, 438, 0, [FIXED_1, CENTER_NODE]); } defineClass(438, 22, {3:1, 34:1, 22:1, 438:1}, RootSelection); var CENTER_NODE, FIXED_1; var Lorg_eclipse_elk_alg_spore_options_RootSelection_2_classLit = createForEnum('org.eclipse.elk.alg.spore.options', 'RootSelection', 438, Ljava_lang_Enum_2_classLit, values_100, valueOf_92); function $clinit_RootSelection$Map(){ $clinit_RootSelection$Map = emptyMethod; $MAP_82 = createValueOfMap(($clinit_RootSelection() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_spore_options_RootSelection_2_classLit, 1), $intern_37, 438, 0, [FIXED_1, CENTER_NODE]))); } var $MAP_82; function $clinit_SpanningTreeCostFunction(){ $clinit_SpanningTreeCostFunction = emptyMethod; CENTER_DISTANCE = new SpanningTreeCostFunction('CENTER_DISTANCE', 0); CIRCLE_UNDERLAP = new SpanningTreeCostFunction('CIRCLE_UNDERLAP', 1); RECTANGLE_UNDERLAP = new SpanningTreeCostFunction('RECTANGLE_UNDERLAP', 2); INVERTED_OVERLAP = new SpanningTreeCostFunction('INVERTED_OVERLAP', 3); MINIMUM_ROOT_DISTANCE = new SpanningTreeCostFunction('MINIMUM_ROOT_DISTANCE', 4); } function SpanningTreeCostFunction(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_93(name_0){ $clinit_SpanningTreeCostFunction(); return valueOf(($clinit_SpanningTreeCostFunction$Map() , $MAP_83), name_0); } function values_101(){ $clinit_SpanningTreeCostFunction(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_spore_options_SpanningTreeCostFunction_2_classLit, 1), $intern_37, 324, 0, [CENTER_DISTANCE, CIRCLE_UNDERLAP, RECTANGLE_UNDERLAP, INVERTED_OVERLAP, MINIMUM_ROOT_DISTANCE]); } defineClass(324, 22, {3:1, 34:1, 22:1, 324:1}, SpanningTreeCostFunction); var CENTER_DISTANCE, CIRCLE_UNDERLAP, INVERTED_OVERLAP, MINIMUM_ROOT_DISTANCE, RECTANGLE_UNDERLAP; var Lorg_eclipse_elk_alg_spore_options_SpanningTreeCostFunction_2_classLit = createForEnum('org.eclipse.elk.alg.spore.options', 'SpanningTreeCostFunction', 324, Ljava_lang_Enum_2_classLit, values_101, valueOf_93); function $clinit_SpanningTreeCostFunction$Map(){ $clinit_SpanningTreeCostFunction$Map = emptyMethod; $MAP_83 = createValueOfMap(($clinit_SpanningTreeCostFunction() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_spore_options_SpanningTreeCostFunction_2_classLit, 1), $intern_37, 324, 0, [CENTER_DISTANCE, CIRCLE_UNDERLAP, RECTANGLE_UNDERLAP, INVERTED_OVERLAP, MINIMUM_ROOT_DISTANCE]))); } var $MAP_83; function $clinit_SporeCompactionOptions(){ $clinit_SporeCompactionOptions = emptyMethod; UNDERLYING_LAYOUT_ALGORITHM = ($clinit_SporeMetaDataProvider() , UNDERLYING_LAYOUT_ALGORITHM_0); PROCESSING_ORDER_TREE_CONSTRUCTION = PROCESSING_ORDER_TREE_CONSTRUCTION_0; PROCESSING_ORDER_SPANNING_TREE_COST_FUNCTION = PROCESSING_ORDER_SPANNING_TREE_COST_FUNCTION_0; PROCESSING_ORDER_PREFERRED_ROOT = PROCESSING_ORDER_PREFERRED_ROOT_0; PROCESSING_ORDER_ROOT_SELECTION = PROCESSING_ORDER_ROOT_SELECTION_0; PADDING_DEFAULT_3 = new ElkPadding_0(8); PADDING_4 = new Property_2(($clinit_CoreOptions() , PADDING_6), PADDING_DEFAULT_3); SPACING_NODE_NODE_4 = new Property_2(SPACING_NODE_NODE_6, 8); STRUCTURE_STRUCTURE_EXTRACTION_STRATEGY = STRUCTURE_STRUCTURE_EXTRACTION_STRATEGY_0; COMPACTION_COMPACTION_STRATEGY = COMPACTION_COMPACTION_STRATEGY_0; COMPACTION_ORTHOGONAL = COMPACTION_ORTHOGONAL_0; DEBUG_MODE_1 = new Property_2(DEBUG_MODE_3, ($clinit_Boolean() , false)); } function $apply_22(registry){ $register(registry, new LayoutAlgorithmData($providerFactory($description($name_0($id(new LayoutAlgorithmData$Builder, 'org.eclipse.elk.sporeCompaction'), 'ELK SPOrE Compaction'), 'ShrinkTree is a compaction algorithm that maintains the topology of a layout. The relocation of diagram elements is based on contracting a spanning tree.'), new SporeCompactionOptions$SporeCompactionFactory))); $addOptionSupport(registry, 'org.eclipse.elk.sporeCompaction', 'org.eclipse.elk.underlyingLayoutAlgorithm', $getDefault(UNDERLYING_LAYOUT_ALGORITHM)); $addOptionSupport(registry, 'org.eclipse.elk.sporeCompaction', 'org.eclipse.elk.processingOrder.treeConstruction', $getDefault(PROCESSING_ORDER_TREE_CONSTRUCTION)); $addOptionSupport(registry, 'org.eclipse.elk.sporeCompaction', 'org.eclipse.elk.processingOrder.spanningTreeCostFunction', $getDefault(PROCESSING_ORDER_SPANNING_TREE_COST_FUNCTION)); $addOptionSupport(registry, 'org.eclipse.elk.sporeCompaction', 'org.eclipse.elk.processingOrder.preferredRoot', $getDefault(PROCESSING_ORDER_PREFERRED_ROOT)); $addOptionSupport(registry, 'org.eclipse.elk.sporeCompaction', 'org.eclipse.elk.processingOrder.rootSelection', $getDefault(PROCESSING_ORDER_ROOT_SELECTION)); $addOptionSupport(registry, 'org.eclipse.elk.sporeCompaction', 'org.eclipse.elk.padding', PADDING_DEFAULT_3); $addOptionSupport(registry, 'org.eclipse.elk.sporeCompaction', 'org.eclipse.elk.spacing.nodeNode', 8); $addOptionSupport(registry, 'org.eclipse.elk.sporeCompaction', 'org.eclipse.elk.structure.structureExtractionStrategy', $getDefault(STRUCTURE_STRUCTURE_EXTRACTION_STRATEGY)); $addOptionSupport(registry, 'org.eclipse.elk.sporeCompaction', 'org.eclipse.elk.compaction.compactionStrategy', $getDefault(COMPACTION_COMPACTION_STRATEGY)); $addOptionSupport(registry, 'org.eclipse.elk.sporeCompaction', 'org.eclipse.elk.compaction.orthogonal', $getDefault(COMPACTION_ORTHOGONAL)); $addOptionSupport(registry, 'org.eclipse.elk.sporeCompaction', 'org.eclipse.elk.debugMode', ($clinit_Boolean() , false)); } function SporeCompactionOptions(){ $clinit_SporeCompactionOptions(); } defineClass(1014, 1, $intern_90, SporeCompactionOptions); _.apply_4 = function apply_171(registry){ $apply_22(registry); } ; var COMPACTION_COMPACTION_STRATEGY, COMPACTION_ORTHOGONAL, DEBUG_MODE_1, PADDING_4, PADDING_DEFAULT_3, PROCESSING_ORDER_PREFERRED_ROOT, PROCESSING_ORDER_ROOT_SELECTION, PROCESSING_ORDER_SPANNING_TREE_COST_FUNCTION, PROCESSING_ORDER_TREE_CONSTRUCTION, SPACING_NODE_NODE_4, STRUCTURE_STRUCTURE_EXTRACTION_STRATEGY, UNDERLYING_LAYOUT_ALGORITHM; var Lorg_eclipse_elk_alg_spore_options_SporeCompactionOptions_2_classLit = createForClass('org.eclipse.elk.alg.spore.options', 'SporeCompactionOptions', 1014); function SporeCompactionOptions$SporeCompactionFactory(){ } defineClass(1015, 1, {}, SporeCompactionOptions$SporeCompactionFactory); _.create_0 = function create_38(){ var provider; return provider = new ShrinkTreeLayoutProvider , provider; } ; _.destroy = function destroy_6(obj){ } ; var Lorg_eclipse_elk_alg_spore_options_SporeCompactionOptions$SporeCompactionFactory_2_classLit = createForClass('org.eclipse.elk.alg.spore.options', 'SporeCompactionOptions/SporeCompactionFactory', 1015); function $clinit_SporeMetaDataProvider(){ $clinit_SporeMetaDataProvider = emptyMethod; UNDERLYING_LAYOUT_ALGORITHM_0 = new Property('org.eclipse.elk.underlyingLayoutAlgorithm'); STRUCTURE_STRUCTURE_EXTRACTION_STRATEGY_DEFAULT = ($clinit_StructureExtractionStrategy() , DELAUNAY_TRIANGULATION); STRUCTURE_STRUCTURE_EXTRACTION_STRATEGY_0 = new Property_1('org.eclipse.elk.structure.structureExtractionStrategy', STRUCTURE_STRUCTURE_EXTRACTION_STRATEGY_DEFAULT); PROCESSING_ORDER_TREE_CONSTRUCTION_DEFAULT = ($clinit_TreeConstructionStrategy() , MINIMUM_SPANNING_TREE); PROCESSING_ORDER_TREE_CONSTRUCTION_0 = new Property_1('org.eclipse.elk.processingOrder.treeConstruction', PROCESSING_ORDER_TREE_CONSTRUCTION_DEFAULT); PROCESSING_ORDER_SPANNING_TREE_COST_FUNCTION_DEFAULT = ($clinit_SpanningTreeCostFunction() , CIRCLE_UNDERLAP); PROCESSING_ORDER_SPANNING_TREE_COST_FUNCTION_0 = new Property_1('org.eclipse.elk.processingOrder.spanningTreeCostFunction', PROCESSING_ORDER_SPANNING_TREE_COST_FUNCTION_DEFAULT); PROCESSING_ORDER_PREFERRED_ROOT_0 = new Property_1('org.eclipse.elk.processingOrder.preferredRoot', null); PROCESSING_ORDER_ROOT_SELECTION_DEFAULT = ($clinit_RootSelection() , CENTER_NODE); PROCESSING_ORDER_ROOT_SELECTION_0 = new Property_1('org.eclipse.elk.processingOrder.rootSelection', PROCESSING_ORDER_ROOT_SELECTION_DEFAULT); COMPACTION_COMPACTION_STRATEGY_DEFAULT = ($clinit_CompactionStrategy_1() , DEPTH_FIRST_0); COMPACTION_COMPACTION_STRATEGY_0 = new Property_1('org.eclipse.elk.compaction.compactionStrategy', COMPACTION_COMPACTION_STRATEGY_DEFAULT); COMPACTION_ORTHOGONAL_0 = new Property_1('org.eclipse.elk.compaction.orthogonal', ($clinit_Boolean() , false)); OVERLAP_REMOVAL_MAX_ITERATIONS = new Property_1('org.eclipse.elk.overlapRemoval.maxIterations', valueOf_3(64)); OVERLAP_REMOVAL_RUN_SCANLINE = new Property_1('org.eclipse.elk.overlapRemoval.runScanline', true); PROCESSING_ORDER_PREFERRED_ROOT_DEP_PROCESSING_ORDER_ROOT_SELECTION_0 = FIXED_1; } function SporeMetaDataProvider(){ $clinit_SporeMetaDataProvider(); } defineClass(866, 1, $intern_90, SporeMetaDataProvider); _.apply_4 = function apply_172(registry){ $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.underlyingLayoutAlgorithm'), ''), 'Underlying Layout Algorithm'), 'A layout algorithm that is applied to the graph before it is compacted. If this is null, nothing is applied before compaction.'), ($clinit_LayoutOptionData$Type() , STRING)), Ljava_lang_String_2_classLit), of_1(($clinit_LayoutOptionData$Target() , PARENTS))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.structure.structureExtractionStrategy'), 'structure'), 'Structure Extraction Strategy'), 'This option defines what kind of triangulation or other partitioning of the plane is applied to the vertices.'), STRUCTURE_STRUCTURE_EXTRACTION_STRATEGY_DEFAULT), ENUM), Lorg_eclipse_elk_alg_spore_options_StructureExtractionStrategy_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.processingOrder.treeConstruction'), 'processingOrder'), 'Tree Construction Strategy'), 'Whether a minimum spanning tree or a maximum spanning tree should be constructed.'), PROCESSING_ORDER_TREE_CONSTRUCTION_DEFAULT), ENUM), Lorg_eclipse_elk_alg_spore_options_TreeConstructionStrategy_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.processingOrder.spanningTreeCostFunction'), 'processingOrder'), 'Cost Function for Spanning Tree'), 'The cost function is used in the creation of the spanning tree.'), PROCESSING_ORDER_SPANNING_TREE_COST_FUNCTION_DEFAULT), ENUM), Lorg_eclipse_elk_alg_spore_options_SpanningTreeCostFunction_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.processingOrder.preferredRoot'), 'processingOrder'), 'Root node for spanning tree construction'), 'The identifier of the node that is preferred as the root of the spanning tree. If this is null, the first node is chosen.'), null), STRING), Ljava_lang_String_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.processingOrder.preferredRoot', 'org.eclipse.elk.processingOrder.rootSelection', PROCESSING_ORDER_PREFERRED_ROOT_DEP_PROCESSING_ORDER_ROOT_SELECTION_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.processingOrder.rootSelection'), 'processingOrder'), 'Root selection for spanning tree'), 'This sets the method used to select a root node for the construction of a spanning tree'), PROCESSING_ORDER_ROOT_SELECTION_DEFAULT), ENUM), Lorg_eclipse_elk_alg_spore_options_RootSelection_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.compaction.compactionStrategy'), 'compaction'), 'Compaction Strategy'), 'This option defines how the compaction is applied.'), COMPACTION_COMPACTION_STRATEGY_DEFAULT), ENUM), Lorg_eclipse_elk_alg_spore_options_CompactionStrategy_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.compaction.orthogonal'), 'compaction'), 'Orthogonal Compaction'), 'Restricts the translation of nodes to orthogonal directions in the compaction phase.'), ($clinit_Boolean() , false)), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.overlapRemoval.maxIterations'), 'overlapRemoval'), 'Upper limit for iterations of overlap removal'), null), valueOf_3(64)), INT), Ljava_lang_Integer_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.overlapRemoval.runScanline'), 'overlapRemoval'), 'Whether to run a supplementary scanline overlap check.'), null), true), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $apply_23((new SporeOverlapRemovalOptions , registry)); $apply_22((new SporeCompactionOptions , registry)); } ; var COMPACTION_COMPACTION_STRATEGY_0, COMPACTION_COMPACTION_STRATEGY_DEFAULT, COMPACTION_ORTHOGONAL_0, OVERLAP_REMOVAL_MAX_ITERATIONS, OVERLAP_REMOVAL_RUN_SCANLINE, PROCESSING_ORDER_PREFERRED_ROOT_0, PROCESSING_ORDER_PREFERRED_ROOT_DEP_PROCESSING_ORDER_ROOT_SELECTION_0, PROCESSING_ORDER_ROOT_SELECTION_0, PROCESSING_ORDER_ROOT_SELECTION_DEFAULT, PROCESSING_ORDER_SPANNING_TREE_COST_FUNCTION_0, PROCESSING_ORDER_SPANNING_TREE_COST_FUNCTION_DEFAULT, PROCESSING_ORDER_TREE_CONSTRUCTION_0, PROCESSING_ORDER_TREE_CONSTRUCTION_DEFAULT, STRUCTURE_STRUCTURE_EXTRACTION_STRATEGY_0, STRUCTURE_STRUCTURE_EXTRACTION_STRATEGY_DEFAULT, UNDERLYING_LAYOUT_ALGORITHM_0; var Lorg_eclipse_elk_alg_spore_options_SporeMetaDataProvider_2_classLit = createForClass('org.eclipse.elk.alg.spore.options', 'SporeMetaDataProvider', 866); function $clinit_SporeOverlapRemovalOptions(){ $clinit_SporeOverlapRemovalOptions = emptyMethod; UNDERLYING_LAYOUT_ALGORITHM_1 = ($clinit_SporeMetaDataProvider() , UNDERLYING_LAYOUT_ALGORITHM_0); PADDING_DEFAULT_4 = new ElkPadding_0(8); new Property_2(($clinit_CoreOptions() , PADDING_6), PADDING_DEFAULT_4); new Property_2(SPACING_NODE_NODE_6, 8); STRUCTURE_STRUCTURE_EXTRACTION_STRATEGY_1 = STRUCTURE_STRUCTURE_EXTRACTION_STRATEGY_0; OVERLAP_REMOVAL_MAX_ITERATIONS_0 = OVERLAP_REMOVAL_MAX_ITERATIONS; OVERLAP_REMOVAL_RUN_SCANLINE_0 = OVERLAP_REMOVAL_RUN_SCANLINE; DEBUG_MODE_2 = new Property_2(DEBUG_MODE_3, ($clinit_Boolean() , false)); } function $apply_23(registry){ $register(registry, new LayoutAlgorithmData($providerFactory($description($name_0($id(new LayoutAlgorithmData$Builder, 'org.eclipse.elk.sporeOverlap'), 'ELK SPOrE Overlap Removal'), 'A node overlap removal algorithm proposed by Nachmanson et al. in "Node overlap removal by growing a tree".'), new SporeOverlapRemovalOptions$SporeOverlapFactory))); $addOptionSupport(registry, 'org.eclipse.elk.sporeOverlap', 'org.eclipse.elk.underlyingLayoutAlgorithm', $getDefault(UNDERLYING_LAYOUT_ALGORITHM_1)); $addOptionSupport(registry, 'org.eclipse.elk.sporeOverlap', 'org.eclipse.elk.padding', PADDING_DEFAULT_4); $addOptionSupport(registry, 'org.eclipse.elk.sporeOverlap', 'org.eclipse.elk.spacing.nodeNode', 8); $addOptionSupport(registry, 'org.eclipse.elk.sporeOverlap', 'org.eclipse.elk.structure.structureExtractionStrategy', $getDefault(STRUCTURE_STRUCTURE_EXTRACTION_STRATEGY_1)); $addOptionSupport(registry, 'org.eclipse.elk.sporeOverlap', 'org.eclipse.elk.overlapRemoval.maxIterations', $getDefault(OVERLAP_REMOVAL_MAX_ITERATIONS_0)); $addOptionSupport(registry, 'org.eclipse.elk.sporeOverlap', 'org.eclipse.elk.overlapRemoval.runScanline', $getDefault(OVERLAP_REMOVAL_RUN_SCANLINE_0)); $addOptionSupport(registry, 'org.eclipse.elk.sporeOverlap', 'org.eclipse.elk.debugMode', ($clinit_Boolean() , false)); } function SporeOverlapRemovalOptions(){ $clinit_SporeOverlapRemovalOptions(); } defineClass(1012, 1, $intern_90, SporeOverlapRemovalOptions); _.apply_4 = function apply_173(registry){ $apply_23(registry); } ; var DEBUG_MODE_2, OVERLAP_REMOVAL_MAX_ITERATIONS_0, OVERLAP_REMOVAL_RUN_SCANLINE_0, PADDING_DEFAULT_4, STRUCTURE_STRUCTURE_EXTRACTION_STRATEGY_1, UNDERLYING_LAYOUT_ALGORITHM_1; var Lorg_eclipse_elk_alg_spore_options_SporeOverlapRemovalOptions_2_classLit = createForClass('org.eclipse.elk.alg.spore.options', 'SporeOverlapRemovalOptions', 1012); function SporeOverlapRemovalOptions$SporeOverlapFactory(){ } defineClass(1013, 1, {}, SporeOverlapRemovalOptions$SporeOverlapFactory); _.create_0 = function create_39(){ var provider; return provider = new OverlapRemovalLayoutProvider , provider; } ; _.destroy = function destroy_7(obj){ } ; var Lorg_eclipse_elk_alg_spore_options_SporeOverlapRemovalOptions$SporeOverlapFactory_2_classLit = createForClass('org.eclipse.elk.alg.spore.options', 'SporeOverlapRemovalOptions/SporeOverlapFactory', 1013); function $clinit_StructureExtractionStrategy(){ $clinit_StructureExtractionStrategy = emptyMethod; DELAUNAY_TRIANGULATION = new StructureExtractionStrategy; } function $create_18(this$static){ switch (this$static.ordinal) { case 0: return new DelaunayTriangulationPhase; default:throw toJs(new IllegalArgumentException_0('No implementation available for ' + (this$static.name_0 != null?this$static.name_0:'' + this$static.ordinal))); } } function StructureExtractionStrategy(){ Enum.call(this, 'DELAUNAY_TRIANGULATION', 0); } function valueOf_94(name_0){ $clinit_StructureExtractionStrategy(); return valueOf(($clinit_StructureExtractionStrategy$Map() , $MAP_84), name_0); } function values_102(){ $clinit_StructureExtractionStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_spore_options_StructureExtractionStrategy_2_classLit, 1), $intern_37, 539, 0, [DELAUNAY_TRIANGULATION]); } defineClass(539, 22, {3:1, 34:1, 22:1, 539:1, 188:1, 196:1}, StructureExtractionStrategy); _.create_1 = function create_41(){ return $create_18(this); } ; _.create_2 = function create_40(){ return $create_18(this); } ; var DELAUNAY_TRIANGULATION; var Lorg_eclipse_elk_alg_spore_options_StructureExtractionStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.spore.options', 'StructureExtractionStrategy', 539, Ljava_lang_Enum_2_classLit, values_102, valueOf_94); function $clinit_StructureExtractionStrategy$Map(){ $clinit_StructureExtractionStrategy$Map = emptyMethod; $MAP_84 = createValueOfMap(($clinit_StructureExtractionStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_spore_options_StructureExtractionStrategy_2_classLit, 1), $intern_37, 539, 0, [DELAUNAY_TRIANGULATION]))); } var $MAP_84; function $clinit_TreeConstructionStrategy(){ $clinit_TreeConstructionStrategy = emptyMethod; MINIMUM_SPANNING_TREE = new TreeConstructionStrategy('MINIMUM_SPANNING_TREE', 0); MAXIMUM_SPANNING_TREE = new TreeConstructionStrategy('MAXIMUM_SPANNING_TREE', 1); } function $create_19(this$static){ switch (this$static.ordinal) { case 0: return new MinSTPhase; case 1: return new MaxSTPhase; default:throw toJs(new IllegalArgumentException_0('No implementation available for ' + (this$static.name_0 != null?this$static.name_0:'' + this$static.ordinal))); } } function TreeConstructionStrategy(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_95(name_0){ $clinit_TreeConstructionStrategy(); return valueOf(($clinit_TreeConstructionStrategy$Map() , $MAP_85), name_0); } function values_103(){ $clinit_TreeConstructionStrategy(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_spore_options_TreeConstructionStrategy_2_classLit, 1), $intern_37, 437, 0, [MINIMUM_SPANNING_TREE, MAXIMUM_SPANNING_TREE]); } defineClass(437, 22, {3:1, 34:1, 22:1, 437:1, 188:1, 196:1}, TreeConstructionStrategy); _.create_1 = function create_43(){ return $create_19(this); } ; _.create_2 = function create_42(){ return $create_19(this); } ; var MAXIMUM_SPANNING_TREE, MINIMUM_SPANNING_TREE; var Lorg_eclipse_elk_alg_spore_options_TreeConstructionStrategy_2_classLit = createForEnum('org.eclipse.elk.alg.spore.options', 'TreeConstructionStrategy', 437, Ljava_lang_Enum_2_classLit, values_103, valueOf_95); function $clinit_TreeConstructionStrategy$Map(){ $clinit_TreeConstructionStrategy$Map = emptyMethod; $MAP_85 = createValueOfMap(($clinit_TreeConstructionStrategy() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_alg_spore_options_TreeConstructionStrategy_2_classLit, 1), $intern_37, 437, 0, [MINIMUM_SPANNING_TREE, MAXIMUM_SPANNING_TREE]))); } var $MAP_85; function $process_113(graph, progressMonitor){ var vertices; progressMonitor.begin('Delaunay triangulation', 1); vertices = new ArrayList; $forEach_1(graph.vertices, new DelaunayTriangulationPhase$lambda$0$Type(vertices)); $booleanValue(castToBoolean($getProperty(graph, ($clinit_InternalProperties() , DEBUG_SVG)))) && 'null10bw'; !graph.tEdges?(graph.tEdges = triangulate(vertices)):$addAll(graph.tEdges, triangulate(vertices)); progressMonitor.done_1(); } function DelaunayTriangulationPhase(){ } defineClass(1463, 1, $intern_113, DelaunayTriangulationPhase); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_35(graph){ return castTo(graph, 306) , new LayoutProcessorConfiguration; } ; _.process = function process_111(graph, progressMonitor){ $process_113(castTo(graph, 306), progressMonitor); } ; var Lorg_eclipse_elk_alg_spore_p1structure_DelaunayTriangulationPhase_2_classLit = createForClass('org.eclipse.elk.alg.spore.p1structure', 'DelaunayTriangulationPhase', 1463); function DelaunayTriangulationPhase$lambda$0$Type(vertices_0){ this.vertices_0 = vertices_0; } defineClass(1464, 1, $intern_19, DelaunayTriangulationPhase$lambda$0$Type); _.accept = function accept_134(arg0){ $add_3(this.vertices_0, castTo(arg0, 68).originalVertex); } ; var Lorg_eclipse_elk_alg_spore_p1structure_DelaunayTriangulationPhase$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.spore.p1structure', 'DelaunayTriangulationPhase/lambda$0$Type', 1464); function $addNode_1(this$static, s, t){ var child, tTree, tTree$iterator; for (tTree$iterator = new ArrayList$1(t.children); tTree$iterator.i < tTree$iterator.this$01.array.length;) { tTree = castTo($next_6(tTree$iterator), 225); child = new Tree(castTo($get_10(this$static.nodeMap, tTree.node), 68)); $add_3(s.children, child); $addNode_1(this$static, child, tTree); } } function $convert(this$static, tTree, graph){ var root; $reset(this$static.nodeMap); $forEach_1(graph.vertices, new MinSTPhase$lambda$0$Type(this$static)); root = new Tree(castTo($get_10(this$static.nodeMap, tTree.node), 68)); $addNode_1(this$static, root, tTree); graph.tree = root; } function $lambda$0_10(this$static, n_0){ return $put_6(this$static.nodeMap, n_0.originalVertex, n_0); } function MinSTPhase(){ this.nodeMap = new HashMap; } defineClass(794, 1, $intern_113, MinSTPhase); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_36(graph){ return castTo(graph, 306) , new LayoutProcessorConfiguration; } ; _.process = function process_112(graph, progressMonitor){ this.process_1(castTo(graph, 306), progressMonitor); } ; _.process_1 = function process_113(graph, progressMonitor){ var lastArg, root, tTree; progressMonitor.begin('Minimum spanning tree construction', 1); graph.preferredRoot?(root = graph.preferredRoot.originalVertex):(root = castTo($get_11(graph.vertices, 0), 68).originalVertex); $booleanValue(castToBoolean($getProperty(graph, ($clinit_InternalProperties() , DEBUG_SVG))))?(tTree = createSpanningTree(graph.tEdges, root, (lastArg = graph.costFunction , lastArg))):(tTree = createSpanningTree(graph.tEdges, root, graph.costFunction)); $convert(this, tTree, graph); progressMonitor.done_1(); } ; var Lorg_eclipse_elk_alg_spore_p2processingorder_MinSTPhase_2_classLit = createForClass('org.eclipse.elk.alg.spore.p2processingorder', 'MinSTPhase', 794); function MaxSTPhase(){ MinSTPhase.call(this); } function lambda$0_40(graph_0, e_1){ return -graph_0.costFunction.cost(e_1); } defineClass(1466, 794, $intern_113, MaxSTPhase); _.process_1 = function process_114(graph, progressMonitor){ var invertedCF, lastArg, root, tree; progressMonitor.begin('Maximum spanning tree construction', 1); invertedCF = new MaxSTPhase$lambda$0$Type(graph); graph.preferredRoot?(root = graph.preferredRoot.vertex):(root = castTo($get_11(graph.vertices, 0), 68).vertex); $booleanValue(castToBoolean($getProperty(graph, ($clinit_InternalProperties() , DEBUG_SVG))))?(tree = createSpanningTree(graph.tEdges, root, (lastArg = invertedCF , lastArg))):(tree = createSpanningTree(graph.tEdges, root, invertedCF)); $convert(this, tree, graph); progressMonitor.done_1(); } ; var Lorg_eclipse_elk_alg_spore_p2processingorder_MaxSTPhase_2_classLit = createForClass('org.eclipse.elk.alg.spore.p2processingorder', 'MaxSTPhase', 1466); function MaxSTPhase$lambda$0$Type(graph_0){ this.graph_0 = graph_0; } defineClass(1467, 1, {}, MaxSTPhase$lambda$0$Type); _.cost = function cost_5(arg0){ return lambda$0_40(this.graph_0, arg0); } ; var Lorg_eclipse_elk_alg_spore_p2processingorder_MaxSTPhase$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.spore.p2processingorder', 'MaxSTPhase/lambda$0$Type', 1467); function MinSTPhase$lambda$0$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1465, 1, $intern_19, MinSTPhase$lambda$0$Type); _.accept = function accept_135(arg0){ $lambda$0_10(this.$$outer_0, castTo(arg0, 68)); } ; var Lorg_eclipse_elk_alg_spore_p2processingorder_MinSTPhase$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.spore.p2processingorder', 'MinSTPhase/lambda$0$Type', 1465); function $debugOut(this$static, c){ $drawTree(this$static, this$static.root, this$static.svg); castTo(this$static.root.node, 68); !!c && castTo(c.node, 68).rect; } function $drawTree(this$static, t, img){ castTo(t.node, 68); $forEach_1(t.children, new GrowTreePhase$lambda$0$Type(this$static, img, t)); } function $growAt(this$static, r){ var c, c$iterator, t; for (c$iterator = new ArrayList$1(r.children); c$iterator.i < c$iterator.this$01.array.length;) { c = castTo($next_6(c$iterator), 225); $translate(castTo(c.node, 68), $sub_0($clone_1(castTo(r.node, 68).vertex), castTo(r.node, 68).originalVertex)); t = overlap_0(castTo(r.node, 68).rect, castTo(c.node, 68).rect); t > 1 && (this$static.overlapsExisted = true); $setCenterPosition(castTo(c.node, 68), $add_19($clone_1(castTo(r.node, 68).vertex), $scale($sub_0($clone_1(castTo(c.node, 68).originalVertex), castTo(r.node, 68).originalVertex), t))); $debugOut(this$static, r); $growAt(this$static, c); } } function $lambda$0_11(this$static, img_1, t_2, c_2){ castTo(t_2.node, 68); castTo(t_2.node, 68); castTo(c_2.node, 68); castTo(c_2.node, 68); castTo(c_2.node, 68); $forEach_1(c_2.children, new GrowTreePhase$lambda$0$Type(this$static, img_1, c_2)); } function $process_114(this$static, graph, progressMonitor){ progressMonitor.begin('Grow Tree', 1); this$static.root = graph.tree; if ($booleanValue(castToBoolean($getProperty(graph, ($clinit_InternalProperties() , DEBUG_SVG))))) { this$static.svg = new SVGImage; $debugOut(this$static, null); } else { this$static.svg = new SVGImage; } this$static.overlapsExisted = false; $growAt(this$static, graph.tree); $setProperty_0(graph, OVERLAPS_EXISTED, ($clinit_Boolean() , this$static.overlapsExisted?true:false)); progressMonitor.done_1(); } function GrowTreePhase(){ } defineClass(796, 1, $intern_113, GrowTreePhase); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_37(graph){ return castTo(graph, 306) , new LayoutProcessorConfiguration; } ; _.process = function process_115(graph, progressMonitor){ $process_114(this, castTo(graph, 306), progressMonitor); } ; _.overlapsExisted = false; var Lorg_eclipse_elk_alg_spore_p3execution_GrowTreePhase_2_classLit = createForClass('org.eclipse.elk.alg.spore.p3execution', 'GrowTreePhase', 796); function GrowTreePhase$lambda$0$Type($$outer_0, img_1, t_2){ this.$$outer_0 = $$outer_0; this.img_1 = img_1; this.t_2 = t_2; } defineClass(797, 1, $intern_19, GrowTreePhase$lambda$0$Type); _.accept = function accept_136(arg0){ $lambda$0_11(this.$$outer_0, this.img_1, this.t_2, castTo(arg0, 225)); } ; var Lorg_eclipse_elk_alg_spore_p3execution_GrowTreePhase$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.spore.p3execution', 'GrowTreePhase/lambda$0$Type', 797); function $debugOut_0(this$static, tree){ var svg; svg = new SVGImage; castTo(tree.node, 68); castTo(tree.node, 68); castTo(tree.node, 68); $forEach_1(tree.children, new ShrinkTreeCompactionPhase$lambda$0$Type(this$static, svg, tree)); } function $lambda$0_12(this$static, svg_1, t_2, c_2){ var cv; castTo(t_2.node, 68); castTo(t_2.node, 68); castTo(c_2.node, 68); castTo(c_2.node, 68); cv = $sub_0($clone_1(castTo(t_2.node, 68).vertex), castTo(c_2.node, 68).vertex); $scaleToLength(cv, $distance(castTo(t_2.node, 68), castTo(c_2.node, 68), cv)); castTo(c_2.node, 68); castTo(c_2.node, 68); castTo(c_2.node, 68).vertex.x_0 + cv.x_0; castTo(c_2.node, 68).vertex.y_0 + cv.y_0; castTo(c_2.node, 68); $forEach_1(c_2.children, new ShrinkTreeCompactionPhase$lambda$0$Type(this$static, svg_1, c_2)); } function $process_115(this$static, graph, progressMonitor){ var lastArg; progressMonitor.begin('Shrinking tree compaction', 1); if ($booleanValue(castToBoolean($getProperty(graph, ($clinit_InternalProperties() , DEBUG_SVG))))) { $debugOut_0(this$static, graph.tree); compact_0(graph.tree, (lastArg = graph.orthogonalCompaction , lastArg)); } else { compact_0(graph.tree, graph.orthogonalCompaction); } progressMonitor.done_1(); } function ShrinkTreeCompactionPhase(){ } defineClass(1468, 1, $intern_113, ShrinkTreeCompactionPhase); _.getLayoutProcessorConfiguration = function getLayoutProcessorConfiguration_38(graph){ return castTo(graph, 306) , new LayoutProcessorConfiguration; } ; _.process = function process_116(graph, progressMonitor){ $process_115(this, castTo(graph, 306), progressMonitor); } ; var Lorg_eclipse_elk_alg_spore_p3execution_ShrinkTreeCompactionPhase_2_classLit = createForClass('org.eclipse.elk.alg.spore.p3execution', 'ShrinkTreeCompactionPhase', 1468); function ShrinkTreeCompactionPhase$lambda$0$Type($$outer_0, svg_1, t_2){ this.$$outer_0 = $$outer_0; this.svg_1 = svg_1; this.t_2 = t_2; } defineClass(795, 1, $intern_19, ShrinkTreeCompactionPhase$lambda$0$Type); _.accept = function accept_137(arg0){ $lambda$0_12(this.$$outer_0, this.svg_1, this.t_2, castTo(arg0, 225)); } ; var Lorg_eclipse_elk_alg_spore_p3execution_ShrinkTreeCompactionPhase$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.alg.spore.p3execution', 'ShrinkTreeCompactionPhase/lambda$0$Type', 795); var Lorg_eclipse_elk_core_util_IGraphElementVisitor_2_classLit = createForInterface('org.eclipse.elk.core.util', 'IGraphElementVisitor'); function $clinit_LayoutConfigurator(){ $clinit_LayoutConfigurator = emptyMethod; new Property('org.eclipse.elk.addLayoutConfig'); NO_OVERWRITE_HOLDER = new LayoutConfigurator$lambda$1$Type; NO_OVERWRITE = new LayoutConfigurator$lambda$0$Type; OPTION_TARGET_FILTER = new LayoutConfigurator$lambda$2$Type; } function $addFilter(this$static, filter){ $add_3(this$static.optionFilters, filter); return this$static; } function $applyProperties(this$static, element, properties){ var accept, clone, entry, entry$iterator, filters, value_0; filters = this$static.optionFilters; for (entry$iterator = (!properties.propertyMap?($clinit_Collections() , $clinit_Collections() , EMPTY_MAP):properties.propertyMap).entrySet_0().iterator_0(); entry$iterator.hasNext_0();) { entry = castTo(entry$iterator.next_1(), 44); accept = !$spliterator($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(filters, 16)), new Predicate$lambda$2$Type(new LayoutConfigurator$lambda$3$Type(element, entry)))).tryAdvance(($clinit_StreamImpl() , NULL_CONSUMER)); if (accept) { value_0 = entry.getValue(); if (instanceOf(value_0, 4)) { clone = clone_11(value_0); clone != null && (value_0 = clone); } element.setProperty(castTo(entry.getKey(), 149), value_0); } } } function $configure(this$static, elementClass){ var result; result = castTo($get_10(this$static.classOptionMap, elementClass), 137); if (!result) { result = new MapPropertyHolder; $put_6(this$static.classOptionMap, elementClass, result); } return result; } function $findClassOptions(this$static, element){ var combined; combined = new MapPropertyHolder; !!element && $copyProperties(combined, castTo($get_10(this$static.classOptionMap, Lorg_eclipse_elk_graph_ElkGraphElement_2_classLit), 96)); instanceOf(element, 422) && $copyProperties(combined, castTo($get_10(this$static.classOptionMap, Lorg_eclipse_elk_graph_ElkShape_2_classLit), 96)); if (instanceOf(element, 366)) { $copyProperties(combined, castTo($get_10(this$static.classOptionMap, Lorg_eclipse_elk_graph_ElkLabel_2_classLit), 96)); return combined; } instanceOf(element, 84) && $copyProperties(combined, castTo($get_10(this$static.classOptionMap, Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit), 96)); if (instanceOf(element, 207)) { $copyProperties(combined, castTo($get_10(this$static.classOptionMap, Lorg_eclipse_elk_graph_ElkNode_2_classLit), 96)); return combined; } if (instanceOf(element, 193)) { $copyProperties(combined, castTo($get_10(this$static.classOptionMap, Lorg_eclipse_elk_graph_ElkPort_2_classLit), 96)); return combined; } instanceOf(element, 326) && $copyProperties(combined, castTo($get_10(this$static.classOptionMap, Lorg_eclipse_elk_graph_ElkEdge_2_classLit), 96)); return combined; } function LayoutConfigurator(){ $clinit_LayoutConfigurator(); this.elementOptionMap = new HashMap; this.classOptionMap = new HashMap; this.optionFilters = new ArrayList; } function lambda$2_12(e_0, property_1){ $clinit_LayoutConfigurator(); var optionData, targets; optionData = $getOptionData(getInstance(), property_1.getId()); if (optionData) { targets = optionData.targets; if (instanceOf(e_0, 207)) { return $isHierarchical_0(castTo(e_0, 27))?$containsEnum(targets, ($clinit_LayoutOptionData$Target() , NODES)) || $containsEnum(targets, PARENTS):$containsEnum(targets, ($clinit_LayoutOptionData$Target() , NODES)); } else if (instanceOf(e_0, 326)) { return $containsEnum(targets, ($clinit_LayoutOptionData$Target() , EDGES)); } else if (instanceOf(e_0, 193)) { return $containsEnum(targets, ($clinit_LayoutOptionData$Target() , PORTS)); } else if (instanceOf(e_0, 366)) { return $containsEnum(targets, ($clinit_LayoutOptionData$Target() , LABELS)); } } return true; } function lambda$3_9(element_0, entry_1, filter_2){ $clinit_LayoutConfigurator(); return filter_2.accept_3(element_0, castTo(entry_1.getKey(), 149)); } defineClass(872, 1, {536:1}, LayoutConfigurator); _.visit = function visit(element){ var combined; combined = $findClassOptions(this, element); $copyProperties(combined, castTo($get_10(this.elementOptionMap, element), 96)); $applyProperties(this, element, combined); } ; var NO_OVERWRITE, NO_OVERWRITE_HOLDER, OPTION_TARGET_FILTER; var Lorg_eclipse_elk_core_LayoutConfigurator_2_classLit = createForClass('org.eclipse.elk.core', 'LayoutConfigurator', 872); var Lorg_eclipse_elk_core_LayoutConfigurator$IPropertyHolderOptionFilter_2_classLit = createForInterface('org.eclipse.elk.core', 'LayoutConfigurator/IPropertyHolderOptionFilter'); function LayoutConfigurator$lambda$0$Type(){ } defineClass(944, 1, {2032:1}, LayoutConfigurator$lambda$0$Type); _.accept_3 = function accept_138(e, p){ return $clinit_LayoutConfigurator() , !e.hasProperty(p); } ; var Lorg_eclipse_elk_core_LayoutConfigurator$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.core', 'LayoutConfigurator/lambda$0$Type', 944); function LayoutConfigurator$lambda$1$Type(){ } defineClass(943, 1, {845:1}, LayoutConfigurator$lambda$1$Type); _.accept_4 = function accept_139(holder, property){ return $clinit_LayoutConfigurator() , !holder.hasProperty(property); } ; var Lorg_eclipse_elk_core_LayoutConfigurator$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.core', 'LayoutConfigurator/lambda$1$Type', 943); function $accept_5(e, p){ return lambda$2_12(e, p); } function LayoutConfigurator$lambda$2$Type(){ } defineClass(945, 1, {2032:1}, LayoutConfigurator$lambda$2$Type); _.accept_3 = function accept_140(e, p){ return $accept_5(e, p); } ; var Lorg_eclipse_elk_core_LayoutConfigurator$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.core', 'LayoutConfigurator/lambda$2$Type', 945); function LayoutConfigurator$lambda$3$Type(element_0, entry_1){ this.element_0 = element_0; this.entry_1 = entry_1; } defineClass(946, 1, $intern_40, LayoutConfigurator$lambda$3$Type); _.test_0 = function test_120(arg0){ return lambda$3_9(this.element_0, this.entry_1, castTo(arg0, 2032)); } ; var Lorg_eclipse_elk_core_LayoutConfigurator$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.core', 'LayoutConfigurator/lambda$3$Type', 946); function $countNodesRecursively(this$static, layoutNode, countAncestors){ var childNode, childNode$iterator, count, parent_0; count = (!layoutNode.children && (layoutNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, layoutNode, 10, 11)) , layoutNode.children).size_0; for (childNode$iterator = new AbstractEList$EIterator((!layoutNode.children && (layoutNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, layoutNode, 10, 11)) , layoutNode.children)); childNode$iterator.cursor != childNode$iterator.this$01_2.size_1();) { childNode = castTo($doNext(childNode$iterator), 27); (!childNode.children && (childNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, childNode, 10, 11)) , childNode.children).size_0 == 0 || (count += $countNodesRecursively(this$static, childNode, false)); } if (countAncestors) { parent_0 = $getParent_2(layoutNode); while (parent_0) { count += (!parent_0.children && (parent_0.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, parent_0, 10, 11)) , parent_0.children).size_0; parent_0 = $getParent_2(parent_0); } } return count; } function $countNodesWithHierarchy(this$static, parentNode){ var childData, childNode, childNode$iterator, count, parentData; count = (!parentNode.children && (parentNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, parentNode, 10, 11)) , parentNode.children).size_0; for (childNode$iterator = new AbstractEList$EIterator((!parentNode.children && (parentNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, parentNode, 10, 11)) , parentNode.children)); childNode$iterator.cursor != childNode$iterator.this$01_2.size_1();) { childNode = castTo($doNext(childNode$iterator), 27); if (maskUndefined($getProperty_0(childNode, ($clinit_CoreOptions() , HIERARCHY_HANDLING_0))) !== maskUndefined(($clinit_HierarchyHandling() , SEPARATE_CHILDREN))) { parentData = castTo($getProperty_0(parentNode, RESOLVED_ALGORITHM), 143); childData = castTo($getProperty_0(childNode, RESOLVED_ALGORITHM), 143); (parentData == childData || !!parentData && $equals_8(parentData, childData)) && (!childNode.children && (childNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, childNode, 10, 11)) , childNode.children).size_0 != 0 && (count += $countNodesWithHierarchy(this$static, childNode)); } } return count; } function $evaluateHierarchyHandlingInheritance(layoutNode){ var parentHandling; if (maskUndefined($getProperty_0(layoutNode, ($clinit_CoreOptions() , HIERARCHY_HANDLING_0))) === maskUndefined(($clinit_HierarchyHandling() , INHERIT))) { if (!$getParent_2(layoutNode)) { $setProperty_1(layoutNode, HIERARCHY_HANDLING_0, SEPARATE_CHILDREN); } else { parentHandling = castTo($getProperty_0($getParent_2(layoutNode), HIERARCHY_HANDLING_0), 346); $setProperty_1(layoutNode, HIERARCHY_HANDLING_0, parentHandling); } } } function $executeAlgorithm(layoutNode, algorithmData, progressMonitor){ var exception, layoutProvider; layoutProvider = castTo($fetch(algorithmData.providerPool), 205); try { layoutProvider.layout(layoutNode, progressMonitor); $release(algorithmData.providerPool, layoutProvider); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 103)) { exception = $e0; throw toJs(exception); } else throw toJs($e0); } } function $gatherInsideSelfLoops(node){ var edge, edge$iterator, insideSelfLoops; if ($booleanValue(castToBoolean($getProperty_0(node, ($clinit_CoreOptions() , INSIDE_SELF_LOOPS_ACTIVATE_0))))) { insideSelfLoops = new ArrayList; for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2(allOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 74); $isSelfloop(edge) && $booleanValue(castToBoolean($getProperty_0(edge, INSIDE_SELF_LOOPS_YO_0))) && (push_1(insideSelfLoops.array, edge) , true); } return insideSelfLoops; } else { return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } } function $layout_3(this$static, layoutGraph, progressMonitor){ var nodeCount; nodeCount = $countNodesRecursively(this$static, layoutGraph, true); $begin(progressMonitor, 'Recursive Graph Layout', nodeCount); applyVisitors(layoutGraph, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_util_IGraphElementVisitor_2_classLit, 1), $intern_2, 536, 0, [new DeprecatedLayoutOptionReplacer])); $hasProperty_0(layoutGraph, ($clinit_CoreOptions() , RESOLVED_ALGORITHM)) || applyVisitors(layoutGraph, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_util_IGraphElementVisitor_2_classLit, 1), $intern_2, 536, 0, [new LayoutAlgorithmResolver])); $layoutRecursively(this$static, layoutGraph, null, progressMonitor); $done_0(progressMonitor); } function $layoutRecursively(this$static, layoutNode, testController, progressMonitor){ var algorithmData, alignmentShiftX, alignmentShiftY, approximator, bendPoint, bendPoint$iterator, child, child$iterator, childAreaAvailableHeight, childAreaAvailableWidth, childAreaDesiredHeight, childAreaDesiredWidth, childLayoutSelfLoops, childNode, childNode$iterator, childrenInsideSelfLoops, contentAlignment, edge, edge$iterator, hasChildren, hasInsideSelfLoops, insideSelfLoops, junctionPoint, junctionPoint$iterator, junctionPoints, label_0, label$iterator, localAlgorithmData, node, node$iterator, nodeCount, nodeQueue, padding, scaleFactor, scaleFactorX, scaleFactorY, section, section$iterator, selfLoop, selfLoop$iterator, size_0, stopHierarchy, supportsInsideSelfLoops, topdownLayoutMonitor, xShift, yShift; if (progressMonitor.isCanceled()) { return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } if ($booleanValue(castToBoolean($getProperty_0(layoutNode, ($clinit_CoreOptions() , NO_LAYOUT_0))))) { return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } hasChildren = (!layoutNode.children && (layoutNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, layoutNode, 10, 11)) , layoutNode.children).size_0 != 0; insideSelfLoops = $gatherInsideSelfLoops(layoutNode); hasInsideSelfLoops = !insideSelfLoops.isEmpty(); if (hasChildren || hasInsideSelfLoops) { algorithmData = castTo($getProperty_0(layoutNode, RESOLVED_ALGORITHM), 143); if (!algorithmData) { throw toJs(new UnsupportedConfigurationException_0('Resolved algorithm is not set; apply a LayoutAlgorithmResolver before computing layout.')); } supportsInsideSelfLoops = $supportsFeature(algorithmData, ($clinit_GraphFeature() , INSIDE_SELF_LOOPS)); $evaluateHierarchyHandlingInheritance(layoutNode); if (!hasChildren && hasInsideSelfLoops && !supportsInsideSelfLoops) { return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } childrenInsideSelfLoops = new ArrayList; if (maskUndefined($getProperty_0(layoutNode, HIERARCHY_HANDLING_0)) === maskUndefined(($clinit_HierarchyHandling() , INCLUDE_CHILDREN)) && ($supportsFeature(algorithmData, COMPOUND) || $supportsFeature(algorithmData, CLUSTERS))) { if ($booleanValue(castToBoolean($getProperty_0(layoutNode, TOPDOWN_LAYOUT_2)))) { throw toJs(new UnsupportedConfigurationException_0('Topdown layout cannot be used together with hierarchy handling.')); } nodeCount = $countNodesWithHierarchy(this$static, layoutNode); nodeQueue = new LinkedList; $addAll(nodeQueue, (!layoutNode.children && (layoutNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, layoutNode, 10, 11)) , layoutNode.children)); while (nodeQueue.size_0 != 0) { node = castTo(nodeQueue.size_0 == 0?null:(checkCriticalElement(nodeQueue.size_0 != 0) , $removeNode_0(nodeQueue, nodeQueue.header.next_0)), 27); $evaluateHierarchyHandlingInheritance(node); stopHierarchy = maskUndefined($getProperty_0(node, HIERARCHY_HANDLING_0)) === maskUndefined(SEPARATE_CHILDREN); if (stopHierarchy || $hasProperty_0(node, ALGORITHM) && !$equals_8(algorithmData, $getProperty_0(node, RESOLVED_ALGORITHM))) { childLayoutSelfLoops = $layoutRecursively(this$static, node, testController, progressMonitor); $addAll_2(childrenInsideSelfLoops, childLayoutSelfLoops); $setProperty_1(node, HIERARCHY_HANDLING_0, SEPARATE_CHILDREN); applyConfiguredNodeScaling(node); } else { $addAll(nodeQueue, (!node.children && (node.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, node, 10, 11)) , node.children)); } } } else { nodeCount = (!layoutNode.children && (layoutNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, layoutNode, 10, 11)) , layoutNode.children).size_0; if ($booleanValue(castToBoolean($getProperty_0(layoutNode, TOPDOWN_LAYOUT_2)))) { topdownLayoutMonitor = progressMonitor.subTask(1); topdownLayoutMonitor.begin('Topdown Layout', 1); if ($getProperty_0(layoutNode, TOPDOWN_NODE_TYPE) == null) { throw toJs(new UnsupportedConfigurationException_0(layoutNode.identifier + ' has not been assigned a top-down node type.')); } if (castTo($getProperty_0(layoutNode, TOPDOWN_NODE_TYPE), 280) == ($clinit_TopdownNodeTypes() , HIERARCHICAL_NODE) || castTo($getProperty_0(layoutNode, TOPDOWN_NODE_TYPE), 280) == ROOT_NODE_0) { for (childNode$iterator = new AbstractEList$EIterator((!layoutNode.children && (layoutNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, layoutNode, 10, 11)) , layoutNode.children)); childNode$iterator.cursor != childNode$iterator.this$01_2.size_1();) { childNode = castTo($doNext(childNode$iterator), 27); localAlgorithmData = castTo($getProperty_0(childNode, RESOLVED_ALGORITHM), 143); if ((!childNode.children && (childNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, childNode, 10, 11)) , childNode.children).size_0 > 0 && ($fetch(localAlgorithmData.providerPool) , false)) { if (castTo($getProperty_0(childNode, TOPDOWN_NODE_TYPE), 280) == HIERARCHICAL_NODE) { throw toJs(new UnsupportedConfigurationException_0('Topdown Layout Providers should only be used on parallel nodes.')); } throwClassCastExceptionUnlessNull($fetch(localAlgorithmData.providerPool)); null.$_nullMethod(); $setDimensions_0(childNode, $wnd.Math.max(childNode.width_0, null.$_nullField), $wnd.Math.max(childNode.height, null.$_nullField)); } else if ($getProperty_0(childNode, TOPDOWN_SIZE_APPROXIMATOR) != null) { approximator = castTo($getProperty_0(childNode, TOPDOWN_SIZE_APPROXIMATOR), 347); size_0 = approximator.getSize_0(childNode); $setDimensions_0(childNode, $wnd.Math.max(childNode.width_0, size_0.x_0), $wnd.Math.max(childNode.height, size_0.y_0)); } } } padding = castTo($getProperty_0(layoutNode, PADDING_6), 107); childAreaAvailableWidth = layoutNode.width_0 - (padding.left + padding.right); childAreaAvailableHeight = layoutNode.height - (padding.top_0 + padding.bottom); topdownLayoutMonitor.log_0('Available Child Area: (' + childAreaAvailableWidth + '|' + childAreaAvailableHeight + ')'); $setProperty_1(layoutNode, ASPECT_RATIO_5, childAreaAvailableWidth / childAreaAvailableHeight); $executeAlgorithm(layoutNode, algorithmData, progressMonitor.subTask(nodeCount)); if (castTo($getProperty_0(layoutNode, TOPDOWN_NODE_TYPE), 280) == ROOT_NODE_0) { computeChildAreaDimensions(layoutNode); $setDimensions_0(layoutNode, padding.left + $doubleValue(castToDouble($getProperty_0(layoutNode, CHILD_AREA_WIDTH))) + padding.right, padding.top_0 + $doubleValue(castToDouble($getProperty_0(layoutNode, CHILD_AREA_HEIGHT))) + padding.bottom); } topdownLayoutMonitor.log_0('Executed layout algorithm: ' + castToString($getProperty_0(layoutNode, ALGORITHM)) + ' on node ' + layoutNode.identifier); if (castTo($getProperty_0(layoutNode, TOPDOWN_NODE_TYPE), 280) == HIERARCHICAL_NODE) { if (childAreaAvailableWidth < 0 || childAreaAvailableHeight < 0) { throw toJs(new UnsupportedConfigurationException_0('The size defined by the parent parallel node is too small for the space provided by the paddings of the child hierarchical node. ' + layoutNode.identifier)); } $hasProperty_0(layoutNode, CHILD_AREA_WIDTH) || $hasProperty_0(layoutNode, CHILD_AREA_HEIGHT) || computeChildAreaDimensions(layoutNode); childAreaDesiredWidth = $doubleValue(castToDouble($getProperty_0(layoutNode, CHILD_AREA_WIDTH))); childAreaDesiredHeight = $doubleValue(castToDouble($getProperty_0(layoutNode, CHILD_AREA_HEIGHT))); topdownLayoutMonitor.log_0('Desired Child Area: (' + childAreaDesiredWidth + '|' + childAreaDesiredHeight + ')'); scaleFactorX = childAreaAvailableWidth / childAreaDesiredWidth; scaleFactorY = childAreaAvailableHeight / childAreaDesiredHeight; scaleFactor = $wnd.Math.min(scaleFactorX, $wnd.Math.min(scaleFactorY, $doubleValue(castToDouble($getProperty_0(layoutNode, TOPDOWN_SCALE_CAP))))); $setProperty_1(layoutNode, TOPDOWN_SCALE_FACTOR_2, scaleFactor); topdownLayoutMonitor.log_0(layoutNode.identifier + ' -- Local Scale Factor (X|Y): (' + scaleFactorX + '|' + scaleFactorY + ')'); contentAlignment = castTo($getProperty_0(layoutNode, CONTENT_ALIGNMENT_2), 21); alignmentShiftX = 0; alignmentShiftY = 0; scaleFactor < scaleFactorX && (contentAlignment.contains(($clinit_ContentAlignment() , H_CENTER))?(alignmentShiftX = (childAreaAvailableWidth / 2 - childAreaDesiredWidth * scaleFactor / 2) / scaleFactor):contentAlignment.contains(H_RIGHT) && (alignmentShiftX = (childAreaAvailableWidth - childAreaDesiredWidth * scaleFactor) / scaleFactor)); scaleFactor < scaleFactorY && (contentAlignment.contains(($clinit_ContentAlignment() , V_CENTER))?(alignmentShiftY = (childAreaAvailableHeight / 2 - childAreaDesiredHeight * scaleFactor / 2) / scaleFactor):contentAlignment.contains(V_BOTTOM) && (alignmentShiftY = (childAreaAvailableHeight - childAreaDesiredHeight * scaleFactor) / scaleFactor)); xShift = alignmentShiftX + (padding.left / scaleFactor - padding.left); yShift = alignmentShiftY + (padding.top_0 / scaleFactor - padding.top_0); topdownLayoutMonitor.log_0('Shift: (' + xShift + '|' + yShift + ')'); for (node$iterator = new AbstractEList$EIterator((!layoutNode.children && (layoutNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, layoutNode, 10, 11)) , layoutNode.children)); node$iterator.cursor != node$iterator.this$01_2.size_1();) { node = castTo($doNext(node$iterator), 27); $setX_2(node, node.x_0 + xShift); $setY_3(node, node.y_0 + yShift); } for (edge$iterator = new AbstractEList$EIterator((!layoutNode.containedEdges && (layoutNode.containedEdges = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, layoutNode, 12, 3)) , layoutNode.containedEdges)); edge$iterator.cursor != edge$iterator.this$01_2.size_1();) { edge = castTo($doNext(edge$iterator), 74); for (section$iterator = new AbstractEList$EIterator((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections)); section$iterator.cursor != section$iterator.this$01_2.size_1();) { section = castTo($doNext(section$iterator), 166); $setStartLocation(section, section.startX + xShift, section.startY + yShift); $setEndLocation(section, section.endX + xShift, section.endY + yShift); for (bendPoint$iterator = new AbstractEList$EIterator((!section.bendPoints && (section.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, section, 5)) , section.bendPoints)); bendPoint$iterator.cursor != bendPoint$iterator.this$01_2.size_1();) { bendPoint = castTo($doNext(bendPoint$iterator), 377); $set_9(bendPoint, bendPoint.x_0 + xShift, bendPoint.y_0 + yShift); } } for (label$iterator = new AbstractEList$EIterator((!edge.labels && (edge.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, edge, 1, 7)) , edge.labels)); label$iterator.cursor != label$iterator.this$01_2.size_1();) { label_0 = castTo($doNext(label$iterator), 135); $setLocation_1(label_0, label_0.x_0 + xShift, label_0.y_0 + yShift); } junctionPoints = castTo($getProperty_0(edge, JUNCTION_POINTS_0), 75); for (junctionPoint$iterator = $listIterator_2(junctionPoints, 0); junctionPoint$iterator.currentNode != junctionPoint$iterator.this$01.tail;) { junctionPoint = castTo($next_9(junctionPoint$iterator), 8); junctionPoint.x_0 += xShift; junctionPoint.y_0 += yShift; } $setProperty_1(edge, JUNCTION_POINTS_0, junctionPoints); } } topdownLayoutMonitor.done_1(); } for (child$iterator = new AbstractEList$EIterator((!layoutNode.children && (layoutNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, layoutNode, 10, 11)) , layoutNode.children)); child$iterator.cursor != child$iterator.this$01_2.size_1();) { child = castTo($doNext(child$iterator), 27); childLayoutSelfLoops = $layoutRecursively(this$static, child, testController, progressMonitor); $addAll_2(childrenInsideSelfLoops, childLayoutSelfLoops); applyConfiguredNodeScaling(child); } } if (progressMonitor.isCanceled()) { return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } for (selfLoop$iterator = new ArrayList$1(childrenInsideSelfLoops); selfLoop$iterator.i < selfLoop$iterator.this$01.array.length;) { selfLoop = castTo($next_6(selfLoop$iterator), 74); $setProperty_1(selfLoop, NO_LAYOUT_0, ($clinit_Boolean() , true)); } $booleanValue(castToBoolean($getProperty_0(layoutNode, TOPDOWN_LAYOUT_2))) || $executeAlgorithm(layoutNode, algorithmData, progressMonitor.subTask(nodeCount)); $postProcessInsideSelfLoops(childrenInsideSelfLoops); return hasInsideSelfLoops && supportsInsideSelfLoops?insideSelfLoops:($clinit_Collections() , $clinit_Collections() , EMPTY_LIST); } else { return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } } function $postProcessInsideSelfLoops(insideSelfLoops){ var bend, bend$iterator, node, section, selfLoop, selfLoop$iterator, xOffset, yOffset; for (selfLoop$iterator = new ArrayList$1(insideSelfLoops); selfLoop$iterator.i < selfLoop$iterator.this$01.array.length;) { selfLoop = castTo($next_6(selfLoop$iterator), 74); node = connectableShapeToNode(castTo($get_20((!selfLoop.sources && (selfLoop.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, selfLoop, 4, 7)) , selfLoop.sources), 0), 84)); xOffset = node.x_0; yOffset = node.y_0; section = castTo($get_20((!selfLoop.sections && (selfLoop.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, selfLoop, 6, 6)) , selfLoop.sections), 0), 166); $setStartLocation(section, section.startX + xOffset, section.startY + yOffset); $setEndLocation(section, section.endX + xOffset, section.endY + yOffset); for (bend$iterator = new AbstractEList$EIterator((!section.bendPoints && (section.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, section, 5)) , section.bendPoints)); bend$iterator.cursor != bend$iterator.this$01_2.size_1();) { bend = castTo($doNext(bend$iterator), 377); $set_9(bend, bend.x_0 + xOffset, bend.y_0 + yOffset); } $offset_1(castTo($getProperty_0(selfLoop, ($clinit_CoreOptions() , JUNCTION_POINTS_0)), 75), xOffset, yOffset); } } function RecursiveGraphLayoutEngine(){ } defineClass(869, 1, {}, RecursiveGraphLayoutEngine); var Lorg_eclipse_elk_core_RecursiveGraphLayoutEngine_2_classLit = createForClass('org.eclipse.elk.core', 'RecursiveGraphLayoutEngine', 869); function UnsupportedConfigurationException(){ RuntimeException.call(this); } function UnsupportedConfigurationException_0(message){ RuntimeException_0.call(this, message); } defineClass(224, 63, $intern_44, UnsupportedConfigurationException, UnsupportedConfigurationException_0); var Lorg_eclipse_elk_core_UnsupportedConfigurationException_2_classLit = createForClass('org.eclipse.elk.core', 'UnsupportedConfigurationException', 224); function UnsupportedGraphException(message){ RuntimeException_0.call(this, message); } defineClass(370, 63, $intern_44, UnsupportedGraphException); var Lorg_eclipse_elk_core_UnsupportedGraphException_2_classLit = createForClass('org.eclipse.elk.core', 'UnsupportedGraphException', 370); function $ensureListSize(this$static, size_0){ var i; for (i = this$static.list.array.length; i < size_0; i++) { $add_3(this$static.list, this$static.provideDefault()); } } function $getListItem(this$static, index_0){ if (index_0 < 0) { throw toJs(new IndexOutOfBoundsException_0('Invalid index: ' + index_0)); } $ensureListSize(this$static, index_0 + 1); return $get_11(this$static.list, index_0); } function $setListItem(this$static, index_0, value_0){ if (index_0 < 0) { throw toJs(new IndexOutOfBoundsException_0('Invalid index: ' + index_0)); } if (index_0 < this$static.list.array.length) { $set_1(this$static.list, index_0, value_0); } else { $ensureListSize(this$static, index_0); $add_3(this$static.list, value_0); } } function AbstractRandomListAccessor(){ this.list = new ArrayList; } defineClass(761, 1, {}); var Lorg_eclipse_elk_core_util_AbstractRandomListAccessor_2_classLit = createForClass('org.eclipse.elk.core.util', 'AbstractRandomListAccessor', 761); function $addProcessorConfiguration(this$static, config){ $addAll_6(this$static.additionalProcessors, config); return this$static; } function $build_0(this$static, graph){ var algorithm, phase, phase$array, phase$array0, phase$index, phase$index0, phase$max, phase$max0, phaseEnumConstants, phaseFactory, phaseImplementation, phaseImplementations, processorConfiguration; if (this$static.failOnMissingPhase && this$static.configuredPhases.size_0 < this$static.numberOfPhases) { throw toJs(new IllegalStateException_0('Expected ' + this$static.numberOfPhases + ' phases to be configured; ' + 'only found ' + this$static.configuredPhases.size_0)); } phaseEnumConstants = castTo($getEnumConstants(this$static.phasesEnumClass), 9); phaseImplementations = newArrayListWithCapacity(this$static.numberOfPhases); for (phase$array0 = phaseEnumConstants , phase$index0 = 0 , phase$max0 = phase$array0.length; phase$index0 < phase$max0; ++phase$index0) { phase = phase$array0[phase$index0]; phaseFactory = castTo($getListItem(this$static, phase.ordinal), 188); phaseFactory?$add_3(phaseImplementations, castTo($retrieveProcessor(this$static, phaseFactory), 106)):(phaseImplementations.array.push(null) , undefined , true); } processorConfiguration = new LayoutProcessorConfiguration; $forEach_3($filter($map($filter(new StreamImpl(null, new Spliterators$IteratorSpliterator(phaseImplementations, 16)), new AlgorithmAssembler$lambda$0$Type), new AlgorithmAssembler$lambda$1$Type(graph)), new AlgorithmAssembler$lambda$2$Type), new AlgorithmAssembler$lambda$3$Type(processorConfiguration)); $addAll_6(processorConfiguration, this$static.additionalProcessors); algorithm = new ArrayList; for (phase$array = phaseEnumConstants , phase$index = 0 , phase$max = phase$array.length; phase$index < phase$max; ++phase$index) { phase = phase$array[phase$index]; $addAll_2(algorithm, $retrieveProcessors(this$static, newHashSet(castTo($getListItem(processorConfiguration, phase.ordinal), 20)))); phaseImplementation = castTo($get_11(phaseImplementations, phase.ordinal), 106); !!phaseImplementation && (push_1(algorithm.array, phaseImplementation) , true); } $addAll_2(algorithm, $retrieveProcessors(this$static, newHashSet(castTo($getListItem(processorConfiguration, phaseEnumConstants[phaseEnumConstants.length - 1].ordinal + 1), 20)))); return algorithm; } function $lambda$4_3(this$static, processors_1, factory_1){ return $add_3(processors_1, $retrieveProcessor(this$static, factory_1)); } function $reset_4(this$static){ this$static.list.array.length = 0; $clear_0(this$static.configuredPhases); $clear_10(this$static.additionalProcessors); return this$static; } function $retrieveProcessor(this$static, factory){ var processor; if (this$static.enableCaching) { if ($containsKey_3(this$static.cache, factory)) { return castTo($get_10(this$static.cache, factory), 47); } else { processor = factory.create_1(); $put_6(this$static.cache, factory, processor); return processor; } } else { return factory.create_1(); } } function $retrieveProcessors(this$static, factories){ var processors; processors = newArrayListWithCapacity(factories.map_0.size_1()); $forEach_3($sorted_1(new StreamImpl(null, new Spliterators$IteratorSpliterator(factories, 1)), this$static.processorComparator), new AlgorithmAssembler$lambda$4$Type(this$static, processors)); return processors; } function $setPhase(this$static, phase, phaseFactory){ $setListItem(this$static, phase.ordinal, phaseFactory); $add_5(this$static.configuredPhases, phase); return this$static; } function AlgorithmAssembler(phaseEnum){ var all; AbstractRandomListAccessor.call(this); this.processorComparator = new EnumBasedFactoryComparator; this.phasesEnumClass = phaseEnum; this.numberOfPhases = castTo(phaseEnum.enumConstantsFunc && phaseEnum.enumConstantsFunc(), 9).length; if (this.numberOfPhases == 0) { throw toJs(new IllegalArgumentException_0('There must be at least one phase in the phase enumeration.')); } this.configuredPhases = (all = castTo($getEnumConstants(this.phasesEnumClass), 9) , new EnumSet$EnumSetImpl(all, castTo(createFrom(all, all.length), 9), 0)); this.additionalProcessors = new LayoutProcessorConfiguration; this.cache = new HashMap; } function lambda$1_19(graph_0, phase_1){ return phase_1.getLayoutProcessorConfiguration(graph_0); } defineClass(450, 761, {}, AlgorithmAssembler); _.provideDefault = function provideDefault(){ return null; } ; _.enableCaching = true; _.failOnMissingPhase = true; _.numberOfPhases = 0; var Lorg_eclipse_elk_core_alg_AlgorithmAssembler_2_classLit = createForClass('org.eclipse.elk.core.alg', 'AlgorithmAssembler', 450); function AlgorithmAssembler$lambda$0$Type(){ } defineClass(1200, 1, $intern_40, AlgorithmAssembler$lambda$0$Type); _.test_0 = function test_121(arg0){ return !!castTo(arg0, 106); } ; var Lorg_eclipse_elk_core_alg_AlgorithmAssembler$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.core.alg', 'AlgorithmAssembler/lambda$0$Type', 1200); function AlgorithmAssembler$lambda$1$Type(graph_0){ this.graph_0 = graph_0; } defineClass(1201, 1, {}, AlgorithmAssembler$lambda$1$Type); _.apply_0 = function apply_174(arg0){ return lambda$1_19(this.graph_0, castTo(arg0, 106)); } ; var Lorg_eclipse_elk_core_alg_AlgorithmAssembler$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.core.alg', 'AlgorithmAssembler/lambda$1$Type', 1201); function AlgorithmAssembler$lambda$2$Type(){ } defineClass(1202, 1, $intern_40, AlgorithmAssembler$lambda$2$Type); _.test_0 = function test_122(arg0){ return !!castTo(arg0, 80); } ; var Lorg_eclipse_elk_core_alg_AlgorithmAssembler$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.core.alg', 'AlgorithmAssembler/lambda$2$Type', 1202); function AlgorithmAssembler$lambda$3$Type(processorConfiguration_0){ this.processorConfiguration_0 = processorConfiguration_0; } defineClass(1203, 1, $intern_19, AlgorithmAssembler$lambda$3$Type); _.accept = function accept_141(arg0){ $addAll_6(this.processorConfiguration_0, castTo(arg0, 80)); } ; var Lorg_eclipse_elk_core_alg_AlgorithmAssembler$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.core.alg', 'AlgorithmAssembler/lambda$3$Type', 1203); function AlgorithmAssembler$lambda$4$Type($$outer_0, processors_1){ this.$$outer_0 = $$outer_0; this.processors_1 = processors_1; } defineClass(1204, 1, $intern_19, AlgorithmAssembler$lambda$4$Type); _.accept = function accept_142(arg0){ $lambda$4_3(this.$$outer_0, this.processors_1, castTo(arg0, 196)); } ; var Lorg_eclipse_elk_core_alg_AlgorithmAssembler$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.core.alg', 'AlgorithmAssembler/lambda$4$Type', 1204); function $compare_26(factory1, factory2){ getClass__Ljava_lang_Class___devirtual$(factory1); getClass__Ljava_lang_Class___devirtual$(factory2); return $compareTo(castTo(factory1, 22), castTo(factory2, 22)); } function EnumBasedFactoryComparator(){ } defineClass(1343, 1, $intern_88, EnumBasedFactoryComparator); _.compare_1 = function compare_108(factory1, factory2){ return $compare_26(castTo(factory1, 196), castTo(factory2, 196)); } ; _.equals_0 = function equals_195(other){ return this === other; } ; _.reversed = function reversed_100(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_core_alg_EnumBasedFactoryComparator_2_classLit = createForClass('org.eclipse.elk.core.alg', 'EnumBasedFactoryComparator', 1343); function $add_17(this$static, processor){ if (this$static.currentIndex < 0) { throw toJs(new IllegalStateException_0('Did not call before(...) or after(...) before calling add(...).')); } $doAdd(this$static, this$static.currentIndex, processor); return this$static; } function $addAfter(this$static, phase, processor){ this$static.currentIndex = -1; $doAdd(this$static, phase.ordinal + 1, processor); return this$static; } function $addAll_6(this$static, configuration){ var i; for (i = 0; i < configuration.list.array.length; i++) { castTo($getListItem(this$static, i), 21).addAll(castTo($getListItem(configuration, i), 16)); } return this$static; } function $addBefore(this$static, phase, processor){ this$static.currentIndex = -1; $doAdd(this$static, phase.ordinal, processor); return this$static; } function $after(this$static, phase){ this$static.currentIndex = phase.ordinal + 1; return this$static; } function $before(this$static, phase){ this$static.currentIndex = phase.ordinal; return this$static; } function $clear_10(this$static){ setLength(this$static.list.array, 0); this$static.currentIndex = -1; return this$static; } function $doAdd(this$static, index_0, processor){ castTo($getListItem(this$static, index_0), 21).add_2(processor); } function LayoutProcessorConfiguration(){ AbstractRandomListAccessor.call(this); setLength(this.list.array, 0); this.currentIndex = -1; } function createFrom_0(source){ return $addAll_6(new LayoutProcessorConfiguration, source); } defineClass(80, 761, {80:1}, LayoutProcessorConfiguration); _.provideDefault = function provideDefault_0(){ return new HashSet; } ; _.currentIndex = 0; var Lorg_eclipse_elk_core_alg_LayoutProcessorConfiguration_2_classLit = createForClass('org.eclipse.elk.core.alg', 'LayoutProcessorConfiguration', 80); function $clinit_DeprecatedLayoutOptionReplacer(){ $clinit_DeprecatedLayoutOptionReplacer = emptyMethod; NEXT_TO_PORT_IF_POSSIBLE = new DeprecatedLayoutOptionReplacer$lambda$0$Type; SPACE_EFFICIENT = new DeprecatedLayoutOptionReplacer$lambda$1$Type; RULES = of_0(($clinit_CoreOptions() , PORT_LABELS_NEXT_TO_PORT_IF_POSSIBLE_0), NEXT_TO_PORT_IF_POSSIBLE, NODE_SIZE_OPTIONS_6, SPACE_EFFICIENT); } function DeprecatedLayoutOptionReplacer(){ $clinit_DeprecatedLayoutOptionReplacer(); } function lambda$0_41(e_0){ $clinit_DeprecatedLayoutOptionReplacer(); castTo(e_0.getProperty(($clinit_CoreOptions() , PORT_LABELS_PLACEMENT_5)), 181).add_2(($clinit_PortLabelPlacement() , NEXT_TO_PORT_IF_POSSIBLE_0)); e_0.setProperty(PORT_LABELS_NEXT_TO_PORT_IF_POSSIBLE_0, null); } function lambda$1_20(e_0){ $clinit_DeprecatedLayoutOptionReplacer(); if (castTo(e_0.getProperty(($clinit_CoreOptions() , NODE_SIZE_OPTIONS_6)), 181).contains(($clinit_SizeOptions() , SPACE_EFFICIENT_PORT_LABELS))) { castTo(e_0.getProperty(PORT_LABELS_PLACEMENT_5), 181).add_2(($clinit_PortLabelPlacement() , SPACE_EFFICIENT_0)); castTo(e_0.getProperty(NODE_SIZE_OPTIONS_6), 181).remove_1(SPACE_EFFICIENT_PORT_LABELS); } } function lambda$2_13(element_0, option_1, replacer_2){ $clinit_DeprecatedLayoutOptionReplacer(); element_0.hasProperty(option_1) && replacer_2.accept(element_0); } defineClass(1025, 1, {536:1}, DeprecatedLayoutOptionReplacer); _.visit = function visit_0(element){ $forEach_2(RULES, new DeprecatedLayoutOptionReplacer$lambda$2$Type(element)); } ; var NEXT_TO_PORT_IF_POSSIBLE, RULES, SPACE_EFFICIENT; var Lorg_eclipse_elk_core_data_DeprecatedLayoutOptionReplacer_2_classLit = createForClass('org.eclipse.elk.core.data', 'DeprecatedLayoutOptionReplacer', 1025); function DeprecatedLayoutOptionReplacer$lambda$0$Type(){ } defineClass(1026, 1, $intern_19, DeprecatedLayoutOptionReplacer$lambda$0$Type); _.accept = function accept_143(arg0){ lambda$0_41(castTo(arg0, 167)); } ; var Lorg_eclipse_elk_core_data_DeprecatedLayoutOptionReplacer$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'DeprecatedLayoutOptionReplacer/lambda$0$Type', 1026); function DeprecatedLayoutOptionReplacer$lambda$1$Type(){ } defineClass(1027, 1, $intern_19, DeprecatedLayoutOptionReplacer$lambda$1$Type); _.accept = function accept_144(arg0){ lambda$1_20(castTo(arg0, 167)); } ; var Lorg_eclipse_elk_core_data_DeprecatedLayoutOptionReplacer$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'DeprecatedLayoutOptionReplacer/lambda$1$Type', 1027); function DeprecatedLayoutOptionReplacer$lambda$2$Type(element_0){ this.element_0 = element_0; } defineClass(1028, 1, {}, DeprecatedLayoutOptionReplacer$lambda$2$Type); _.accept_1 = function accept_145(arg0, arg1){ lambda$2_13(this.element_0, castTo(arg0, 149), castTo(arg1, 41)); } ; var Lorg_eclipse_elk_core_data_DeprecatedLayoutOptionReplacer$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'DeprecatedLayoutOptionReplacer/lambda$2$Type', 1028); function $addKnownOption(this$static, property, defaultValue){ $putStringValue(this$static.knownOptions, property.id_0, defaultValue); } function $equals_8(this$static, obj){ if (instanceOf(obj, 143)) { return $equals_5(this$static.id_0, castTo(obj, 143).id_0); } return false; } function $supportsFeature(this$static, graphFeature){ return $containsEnum(this$static.supportedFeatures, graphFeature); } function LayoutAlgorithmData(builder){ var all; this.knownOptions = new HashMap; this.id_0 = builder.id_0; this.name_0 = builder.name_0; this.description = builder.description; this.providerPool = new InstancePool(builder.providerFactory); this.category = builder.category; !builder.supportedFeatures?(this.supportedFeatures = (all = castTo($getEnumConstants(Lorg_eclipse_elk_graph_properties_GraphFeature_2_classLit), 9) , new EnumSet$EnumSetImpl(all, castTo(createFrom(all, all.length), 9), 0))):(this.supportedFeatures = builder.supportedFeatures); } defineClass(143, 1, {701:1, 143:1}, LayoutAlgorithmData); _.equals_0 = function equals_196(obj){ return $equals_8(this, obj); } ; _.getDescription = function getDescription(){ return this.description; } ; _.getId = function getId(){ return this.id_0; } ; _.getName = function getName_2(){ return this.name_0; } ; _.hashCode_1 = function hashCode_65(){ return $hashCode_2(this.id_0); } ; _.toString_0 = function toString_111(){ return 'Layout Algorithm: ' + this.id_0; } ; var Lorg_eclipse_elk_core_data_LayoutAlgorithmData_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutAlgorithmData', 143); function $category(this$static, acategory){ this$static.category = acategory; return this$static; } function $description(this$static, adescription){ this$static.description = adescription; return this$static; } function $id(this$static, aid){ this$static.id_0 = aid; return this$static; } function $name_0(this$static, aname){ this$static.name_0 = aname; return this$static; } function $providerFactory(this$static, aproviderFactory){ this$static.providerFactory = aproviderFactory; return this$static; } function $supportedFeatures(this$static, asupportedFeatures){ this$static.supportedFeatures = asupportedFeatures; return this$static; } function LayoutAlgorithmData$Builder(){ } defineClass(269, 1, {}, LayoutAlgorithmData$Builder); var Lorg_eclipse_elk_core_data_LayoutAlgorithmData$Builder_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutAlgorithmData/Builder', 269); function $resolveAlgorithm(node){ var algorithmId, message; algorithmId = castToString($getProperty_0(node, ($clinit_CoreOptions() , ALGORITHM))); if ($resolveAndSetAlgorithm(algorithmId, node)) { return; } if (!$hasProperty_0(node, RESOLVED_ALGORITHM) && ((!node.children && (node.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, node, 10, 11)) , node.children).size_0 != 0 || $booleanValue(castToBoolean($getProperty_0(node, INSIDE_SELF_LOOPS_ACTIVATE_0))))) { if (algorithmId == null || $trim(algorithmId).length == 0) { if (!$resolveAndSetAlgorithm('org.eclipse.elk.layered', node)) { message = $append_11($append_11(new StringBuilder_1('Unable to load default layout algorithm '), 'org.eclipse.elk.layered'), ' for unconfigured node '); printElementPath(node, message); throw toJs(new UnsupportedConfigurationException_0(message.string)); } } else { message = $append_11($append_11(new StringBuilder_1("Layout algorithm '"), algorithmId), "' not found for "); printElementPath(node, message); throw toJs(new UnsupportedConfigurationException_0(message.string)); } } } function $resolveAndSetAlgorithm(algorithmId, node){ var algorithmData; algorithmData = $getAlgorithmDataBySuffix(getInstance(), algorithmId); if (algorithmData) { $setProperty_1(node, ($clinit_CoreOptions() , RESOLVED_ALGORITHM), algorithmData); return true; } else { return false; } } function LayoutAlgorithmResolver(){ } defineClass(1029, 1, {536:1}, LayoutAlgorithmResolver); _.visit = function visit_1(element){ instanceOf(element, 207) && !$booleanValue(castToBoolean(element.getProperty(($clinit_CoreOptions() , NO_LAYOUT_0)))) && $resolveAlgorithm(castTo(element, 27)); } ; var Lorg_eclipse_elk_core_data_LayoutAlgorithmResolver_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutAlgorithmResolver', 1029); function LayoutCategoryData(builder){ this.layouters = new LinkedList; this.id_0 = builder.id_0; this.name_0 = builder.name_0; this.description = builder.description; } defineClass(233, 1, {701:1, 233:1}, LayoutCategoryData); _.equals_0 = function equals_197(obj){ if (instanceOf(obj, 233)) { return $equals_5(this.id_0, castTo(obj, 233).id_0); } return false; } ; _.getDescription = function getDescription_0(){ return this.description; } ; _.getId = function getId_0(){ return this.id_0; } ; _.getName = function getName_3(){ return this.name_0; } ; _.hashCode_1 = function hashCode_66(){ return $hashCode_2(this.id_0); } ; _.toString_0 = function toString_112(){ return 'Layout Type: ' + this.id_0; } ; var Lorg_eclipse_elk_core_data_LayoutCategoryData_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutCategoryData', 233); function $description_0(this$static, adescription){ this$static.description = adescription; return this$static; } function $id_0(this$static, aid){ this$static.id_0 = aid; return this$static; } function $name_1(this$static, aname){ this$static.name_0 = aname; return this$static; } function LayoutCategoryData$Builder(){ } defineClass(357, 1, {}, LayoutCategoryData$Builder); var Lorg_eclipse_elk_core_data_LayoutCategoryData$Builder_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutCategoryData/Builder', 357); function $getAlgorithmData(this$static, id_0){ return castTo($get_16(this$static.layoutAlgorithmMap, id_0), 143); } function $getAlgorithmDataBySuffix(this$static, suffix){ var d, d$iterator, data_0, entry, id_0, outerIter, suffixlength; if (suffix == null || suffix.length == 0) { return null; } data_0 = castTo($getStringValue(this$static.algorithmSuffixMap, suffix), 143); if (!data_0) { for (d$iterator = (outerIter = (new AbstractMap$2(this$static.layoutAlgorithmMap)).this$01.entrySet_0().iterator_0() , new AbstractMap$2$1(outerIter)); d$iterator.val$outerIter2.hasNext_0();) { d = (entry = castTo(d$iterator.val$outerIter2.next_1(), 44) , castTo(entry.getValue(), 143)); id_0 = d.id_0; suffixlength = suffix.length; if ($equals_5(id_0.substr(id_0.length - suffixlength, suffixlength), suffix) && (suffix.length == id_0.length || $charAt(id_0, id_0.length - suffix.length - 1) == 46)) { if (data_0) { return null; } data_0 = d; } } !!data_0 && $putStringValue(this$static.algorithmSuffixMap, suffix, data_0); } return data_0; } function $getCategoryData(this$static, id_0){ return castTo($get_16(this$static.layoutCategoryMap, id_0), 233); } function $getOptionData(this$static, id_0){ var data_0; data_0 = castTo($get_16(this$static.layoutOptionMap, id_0), 23); return data_0?data_0:castTo($get_16(this$static.legacyLayoutOptionMap, id_0), 23); } function $getOptionDataBySuffix(this$static, suffix){ var d, d$iterator, d$iterator0, data_0, entry, id_0, id$array, id$index, id$max, legacyIds, outerIter, outerIter0, suffixlength; if (suffix == null || suffix.length == 0) { return null; } data_0 = castTo($getStringValue(this$static.optionSuffixMap, suffix), 23); if (!data_0) { for (d$iterator0 = (outerIter0 = (new AbstractMap$2(this$static.layoutOptionMap)).this$01.entrySet_0().iterator_0() , new AbstractMap$2$1(outerIter0)); d$iterator0.val$outerIter2.hasNext_0();) { d = (entry = castTo(d$iterator0.val$outerIter2.next_1(), 44) , castTo(entry.getValue(), 23)); id_0 = d.id_0; suffixlength = suffix.length; if ($equals_5(id_0.substr(id_0.length - suffixlength, suffixlength), suffix) && (suffix.length == id_0.length || $charAt(id_0, id_0.length - suffix.length - 1) == 46)) { if (data_0) { return null; } data_0 = d; } } if (!data_0) { for (d$iterator = (outerIter = (new AbstractMap$2(this$static.layoutOptionMap)).this$01.entrySet_0().iterator_0() , new AbstractMap$2$1(outerIter)); d$iterator.val$outerIter2.hasNext_0();) { d = (entry = castTo(d$iterator.val$outerIter2.next_1(), 44) , castTo(entry.getValue(), 23)); legacyIds = d.legacyIds; if (legacyIds != null) { for (id$array = legacyIds , id$index = 0 , id$max = id$array.length; id$index < id$max; ++id$index) { id_0 = id$array[id$index]; suffixlength = suffix.length; if ($equals_5(id_0.substr(id_0.length - suffixlength, suffixlength), suffix) && (suffix.length == id_0.length || $charAt(id_0, id_0.length - suffix.length - 1) == 46)) { if (data_0) { return null; } data_0 = d; } } } } } !!data_0 && $putStringValue(this$static.optionSuffixMap, suffix, data_0); } return data_0; } function $registerLayoutMetaDataProviders(this$static, providers){ var provider, provider$array, provider$index, provider$max, registry; for (provider$array = providers , provider$index = 0 , provider$max = provider$array.length; provider$index < provider$max; ++provider$index) { provider = provider$array[provider$index]; registry = new LayoutMetaDataService$Registry(this$static); provider.apply_4(registry); $applyDependencies(registry); } $reset(this$static.optionSuffixMap); } function LayoutMetaDataService(){ this.layoutAlgorithmMap = new LinkedHashMap; this.layoutOptionMap = new LinkedHashMap; this.legacyLayoutOptionMap = new LinkedHashMap; this.layoutCategoryMap = new LinkedHashMap; this.algorithmSuffixMap = new HashMap; this.optionSuffixMap = new HashMap; register(Lorg_eclipse_elk_core_math_KVector_2_classLit, new LayoutMetaDataService$lambda$0$Type, new LayoutMetaDataService$lambda$1$Type); register(Lorg_eclipse_elk_core_math_KVectorChain_2_classLit, new LayoutMetaDataService$lambda$2$Type, new LayoutMetaDataService$lambda$3$Type); register(Lorg_eclipse_elk_core_math_ElkMargin_2_classLit, new LayoutMetaDataService$lambda$4$Type, new LayoutMetaDataService$lambda$5$Type); register(Lorg_eclipse_elk_core_math_ElkPadding_2_classLit, new LayoutMetaDataService$lambda$6$Type, new LayoutMetaDataService$lambda$7$Type); register(Lorg_eclipse_elk_core_util_IndividualSpacings_2_classLit, new LayoutMetaDataService$lambda$8$Type, new LayoutMetaDataService$lambda$9$Type); register(Ljava_util_ArrayList_2_classLit, new LayoutMetaDataService$lambda$10$Type, new LayoutMetaDataService$lambda$11$Type); register(Ljava_util_LinkedList_2_classLit, new LayoutMetaDataService$lambda$12$Type, new LayoutMetaDataService$lambda$13$Type); register(Ljava_util_HashSet_2_classLit, new LayoutMetaDataService$lambda$14$Type, new LayoutMetaDataService$lambda$15$Type); register(Ljava_util_LinkedHashSet_2_classLit, new LayoutMetaDataService$lambda$16$Type, new LayoutMetaDataService$lambda$17$Type); register(Ljava_util_TreeSet_2_classLit, new LayoutMetaDataService$lambda$18$Type, new LayoutMetaDataService$lambda$19$Type); } function getInstance(){ if (!instance_2) { instance_2 = new LayoutMetaDataService; $registerLayoutMetaDataProviders(instance_2, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_ILayoutMetaDataProvider_2_classLit, 1), $intern_2, 134, 0, [new CoreOptions])); } return instance_2; } defineClass(879, 1, {}, LayoutMetaDataService); var instance_2; var Lorg_eclipse_elk_core_data_LayoutMetaDataService_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService', 879); function $addDependency(this$static, sourceOption, targetOption, requiredValue){ var dep; dep = new LayoutMetaDataService$Registry$Triple; dep.firstId = sourceOption; dep.secondId = targetOption; dep.value_0 = requiredValue; $add_7(this$static.optionDependencies, dep); } function $addOptionSupport(this$static, algorithm, option, defaultValue){ var sup_0; sup_0 = new LayoutMetaDataService$Registry$Triple; sup_0.firstId = algorithm; sup_0.secondId = option; sup_0.value_0 = defaultValue; $add_7(this$static.optionSupport, sup_0); } function $applyDependencies(this$static){ var algorithm, algorithm$iterator, category, categoryId, dep, dep$iterator, entry, option, outerIter, source, sup_0, sup$iterator, target; for (algorithm$iterator = (outerIter = (new AbstractMap$2(this$static.this$01.layoutAlgorithmMap)).this$01.entrySet_0().iterator_0() , new AbstractMap$2$1(outerIter)); algorithm$iterator.val$outerIter2.hasNext_0();) { algorithm = (entry = castTo(algorithm$iterator.val$outerIter2.next_1(), 44) , castTo(entry.getValue(), 143)); categoryId = algorithm.category; categoryId == null && (categoryId = ''); category = $getCategoryData(this$static.this$01, categoryId); !category && categoryId.length == 0 && (category = $retrieveBackupCategory(this$static)); !!category && !$advanceToFind(category.layouters, algorithm, false) && $add_7(category.layouters, algorithm); } for (dep$iterator = $listIterator_2(this$static.optionDependencies, 0); dep$iterator.currentNode != dep$iterator.this$01.tail;) { dep = castTo($next_9(dep$iterator), 487); source = $getOptionData(this$static.this$01, dep.firstId); target = $getOptionData(this$static.this$01, dep.secondId); !!source && !!target && $add_7(source.dependencies, new Pair(target, dep.value_0)); } $reset_0(this$static.optionDependencies); for (sup$iterator = $listIterator_2(this$static.optionSupport, 0); sup$iterator.currentNode != sup$iterator.this$01.tail;) { sup_0 = castTo($next_9(sup$iterator), 487); algorithm = $getAlgorithmData(this$static.this$01, sup_0.firstId); option = $getOptionData(this$static.this$01, sup_0.secondId); !!algorithm && !!option && $addKnownOption(algorithm, option, sup_0.value_0); } $reset_0(this$static.optionSupport); } function $register(this$static, algorithmData){ $put_11(this$static.this$01.layoutAlgorithmMap, algorithmData.id_0, algorithmData); } function $register_0(this$static, categoryData){ $put_11(this$static.this$01.layoutCategoryMap, categoryData.id_0, categoryData); } function $register_1(this$static, optionData){ var id_0, legacyId, legacyId$array, legacyId$index, legacyId$max; id_0 = optionData.id_0; $put_11(this$static.this$01.layoutOptionMap, id_0, optionData); if (optionData.legacyIds != null) { for (legacyId$array = optionData.legacyIds , legacyId$index = 0 , legacyId$max = legacyId$array.length; legacyId$index < legacyId$max; ++legacyId$index) { legacyId = legacyId$array[legacyId$index]; $put_11(this$static.this$01.legacyLayoutOptionMap, legacyId, optionData); } } } function $retrieveBackupCategory(this$static){ var otherCategory; otherCategory = castTo($get_16(this$static.this$01.layoutCategoryMap, ''), 233); if (!otherCategory) { otherCategory = new LayoutCategoryData($name_1($id_0(new LayoutCategoryData$Builder, ''), 'Other')); $put_11(this$static.this$01.layoutCategoryMap, '', otherCategory); } return otherCategory; } function LayoutMetaDataService$Registry(this$0){ this.this$01 = this$0; this.optionDependencies = new LinkedList; this.optionSupport = new LinkedList; } defineClass(880, 1, {}, LayoutMetaDataService$Registry); var Lorg_eclipse_elk_core_data_LayoutMetaDataService$Registry_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/Registry', 880); function LayoutMetaDataService$Registry$Triple(){ } defineClass(487, 1, {487:1}, LayoutMetaDataService$Registry$Triple); var Lorg_eclipse_elk_core_data_LayoutMetaDataService$Registry$Triple_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/Registry/Triple', 487); function LayoutMetaDataService$lambda$0$Type(){ } defineClass(881, 1, $intern_132, LayoutMetaDataService$lambda$0$Type); _.newInstance = function newInstance_0(){ return new KVector; } ; var Lorg_eclipse_elk_core_data_LayoutMetaDataService$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/lambda$0$Type', 881); function LayoutMetaDataService$lambda$1$Type(){ } defineClass(882, 1, $intern_133, LayoutMetaDataService$lambda$1$Type); _.clone = function clone_1(arg0){ return $clone_1(castTo(arg0, 8)); } ; var Lorg_eclipse_elk_core_data_LayoutMetaDataService$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/lambda$1$Type', 882); function LayoutMetaDataService$lambda$10$Type(){ } defineClass(891, 1, $intern_132, LayoutMetaDataService$lambda$10$Type); _.newInstance = function newInstance_1(){ return new ArrayList; } ; var Lorg_eclipse_elk_core_data_LayoutMetaDataService$lambda$10$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/lambda$10$Type', 891); function LayoutMetaDataService$lambda$11$Type(){ } defineClass(892, 1, $intern_133, LayoutMetaDataService$lambda$11$Type); _.clone = function clone_2(arg0){ return new ArrayList_1(castTo(arg0, 13)); } ; var Lorg_eclipse_elk_core_data_LayoutMetaDataService$lambda$11$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/lambda$11$Type', 892); function LayoutMetaDataService$lambda$12$Type(){ } defineClass(893, 1, $intern_132, LayoutMetaDataService$lambda$12$Type); _.newInstance = function newInstance_2(){ return new LinkedList; } ; var Lorg_eclipse_elk_core_data_LayoutMetaDataService$lambda$12$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/lambda$12$Type', 893); function LayoutMetaDataService$lambda$13$Type(){ } defineClass(894, 1, $intern_133, LayoutMetaDataService$lambda$13$Type); _.clone = function clone_3(arg0){ return newLinkedList(castTo(arg0, 67)); } ; var Lorg_eclipse_elk_core_data_LayoutMetaDataService$lambda$13$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/lambda$13$Type', 894); function LayoutMetaDataService$lambda$14$Type(){ } defineClass(895, 1, $intern_132, LayoutMetaDataService$lambda$14$Type); _.newInstance = function newInstance_3(){ return new HashSet; } ; var Lorg_eclipse_elk_core_data_LayoutMetaDataService$lambda$14$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/lambda$14$Type', 895); function LayoutMetaDataService$lambda$15$Type(){ } defineClass(896, 1, $intern_133, LayoutMetaDataService$lambda$15$Type); _.clone = function clone_4(arg0){ return newHashSet(castTo(arg0, 49)); } ; var Lorg_eclipse_elk_core_data_LayoutMetaDataService$lambda$15$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/lambda$15$Type', 896); function LayoutMetaDataService$lambda$16$Type(){ } defineClass(897, 1, $intern_132, LayoutMetaDataService$lambda$16$Type); _.newInstance = function newInstance_4(){ return new LinkedHashSet; } ; var Lorg_eclipse_elk_core_data_LayoutMetaDataService$lambda$16$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/lambda$16$Type', 897); function LayoutMetaDataService$lambda$17$Type(){ } defineClass(898, 1, $intern_133, LayoutMetaDataService$lambda$17$Type); _.clone = function clone_5(arg0){ return newLinkedHashSet(castTo(arg0, 49)); } ; var Lorg_eclipse_elk_core_data_LayoutMetaDataService$lambda$17$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/lambda$17$Type', 898); function LayoutMetaDataService$lambda$18$Type(){ } defineClass(899, 1, $intern_132, LayoutMetaDataService$lambda$18$Type); _.newInstance = function newInstance_5(){ return new TreeSet; } ; var Lorg_eclipse_elk_core_data_LayoutMetaDataService$lambda$18$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/lambda$18$Type', 899); function LayoutMetaDataService$lambda$19$Type(){ } defineClass(900, 1, $intern_133, LayoutMetaDataService$lambda$19$Type); _.clone = function clone_6(arg0){ return newTreeSet(castTo(arg0, 157)); } ; var Lorg_eclipse_elk_core_data_LayoutMetaDataService$lambda$19$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/lambda$19$Type', 900); function LayoutMetaDataService$lambda$2$Type(){ } defineClass(883, 1, $intern_132, LayoutMetaDataService$lambda$2$Type); _.newInstance = function newInstance_6(){ return new KVectorChain; } ; var Lorg_eclipse_elk_core_data_LayoutMetaDataService$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/lambda$2$Type', 883); function LayoutMetaDataService$lambda$3$Type(){ } defineClass(884, 1, $intern_133, LayoutMetaDataService$lambda$3$Type); _.clone = function clone_7(arg0){ return new KVectorChain_0(castTo(arg0, 75)); } ; var Lorg_eclipse_elk_core_data_LayoutMetaDataService$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/lambda$3$Type', 884); function LayoutMetaDataService$lambda$4$Type(){ } defineClass(885, 1, $intern_132, LayoutMetaDataService$lambda$4$Type); _.newInstance = function newInstance_7(){ return new ElkMargin; } ; var Lorg_eclipse_elk_core_data_LayoutMetaDataService$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/lambda$4$Type', 885); function LayoutMetaDataService$lambda$5$Type(){ } defineClass(886, 1, $intern_133, LayoutMetaDataService$lambda$5$Type); _.clone = function clone_8(arg0){ return new ElkMargin_2(castTo(arg0, 140)); } ; var Lorg_eclipse_elk_core_data_LayoutMetaDataService$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/lambda$5$Type', 886); function LayoutMetaDataService$lambda$6$Type(){ } defineClass(887, 1, $intern_132, LayoutMetaDataService$lambda$6$Type); _.newInstance = function newInstance_8(){ return new ElkPadding; } ; var Lorg_eclipse_elk_core_data_LayoutMetaDataService$lambda$6$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/lambda$6$Type', 887); function LayoutMetaDataService$lambda$7$Type(){ } defineClass(888, 1, $intern_133, LayoutMetaDataService$lambda$7$Type); _.clone = function clone_9(arg0){ return new ElkPadding_1(castTo(arg0, 107)); } ; var Lorg_eclipse_elk_core_data_LayoutMetaDataService$lambda$7$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/lambda$7$Type', 888); function LayoutMetaDataService$lambda$8$Type(){ } defineClass(889, 1, $intern_132, LayoutMetaDataService$lambda$8$Type); _.newInstance = function newInstance_9(){ return new IndividualSpacings; } ; var Lorg_eclipse_elk_core_data_LayoutMetaDataService$lambda$8$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/lambda$8$Type', 889); function LayoutMetaDataService$lambda$9$Type(){ } defineClass(890, 1, $intern_133, LayoutMetaDataService$lambda$9$Type); _.clone = function clone_10(arg0){ return new IndividualSpacings_0(castTo(arg0, 385)); } ; var Lorg_eclipse_elk_core_data_LayoutMetaDataService$lambda$9$Type_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutMetaDataService/lambda$9$Type', 890); var Lorg_eclipse_elk_graph_properties_IProperty_2_classLit = createForInterface('org.eclipse.elk.graph.properties', 'IProperty'); function $checkEnumClass(this$static){ if (!this$static.clazz || (this$static.clazz.modifiers & 8) == 0) { throw toJs(new IllegalStateException_0('Enumeration class expected for layout option ' + this$static.id_0)); } } function $compareTo_19(this$static, other){ return $compareTo_9(this$static.id_0, other.getId()); } function $createDataInstance(this$static){ var instance; if (!this$static.clazz) { throw toJs(new IllegalStateException_0('IDataType class expected for layout option ' + this$static.id_0)); } instance = newInstance_10(this$static.clazz); if (instance == null) { throw toJs(new IllegalStateException_0("Couldn't create new instance of property '" + this$static.id_0 + "'. " + 'Make sure its type is registered with the ' + ($ensureNamesAreInitialized(Lorg_eclipse_elk_graph_util_ElkReflect_2_classLit) , Lorg_eclipse_elk_graph_util_ElkReflect_2_classLit.simpleName) + ' utility class.')); } return castTo(instance, 423); } function $enumForString(this$static, leString){ var constants, index_0, value_0; try { value_0 = valueOf_0(this$static.clazz, leString); return value_0; } catch ($e1) { $e1 = toJava($e1); if (instanceOf($e1, 33)) { try { index_0 = __parseAndValidateInt(leString, $intern_43, $intern_0); constants = $getEnumConstants(this$static.clazz); if (index_0 >= 0 && index_0 < constants.length) { return constants[index_0]; } } catch ($e0) { $e0 = toJava($e0); if (!instanceOf($e0, 130)) throw toJs($e0); } return null; } else throw toJs($e1); } } function $enumSetForStringArray(this$static, leClazz, leString){ var all, component, component$array, component$index, component$max, components, o, set_0; set_0 = (all = castTo(leClazz.enumConstantsFunc && leClazz.enumConstantsFunc(), 9) , new EnumSet$EnumSetImpl(all, castTo(createFrom(all, all.length), 9), 0)); components = $split_0(leString, '[\\[\\]\\s,]+'); for (component$array = components , component$index = 0 , component$max = component$array.length; component$index < component$max; ++component$index) { component = component$array[component$index]; if ($trim(component).length == 0) { continue; } o = $enumForString(this$static, component); if (o == null) { return null; } else { $add_5(set_0, castTo(o, 22)); } } return set_0; } function $parseValue(this$static, valueString){ var value_0; if (valueString == null || $equals_5(valueString, 'null')) { return null; } if (valueString.length == 0 && this$static.type_0 != ($clinit_LayoutOptionData$Type() , ENUMSET)) { return null; } switch (this$static.type_0.ordinal) { case 1: return $equalsIgnoreCase(valueString, 'true')?($clinit_Boolean() , TRUE_0):$equalsIgnoreCase(valueString, 'false')?($clinit_Boolean() , FALSE_0):null; case 2: try { return valueOf_3(__parseAndValidateInt(valueString, $intern_43, $intern_0)); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 130)) { return null; } else throw toJs($e0); } case 4: try { return __parseAndValidateDouble(valueString); } catch ($e1) { $e1 = toJava($e1); if (instanceOf($e1, 130)) { return null; } else throw toJs($e1); } case 3: return valueString; case 5: $checkEnumClass(this$static); return $enumForString(this$static, valueString); case 6: $checkEnumClass(this$static); return $enumSetForStringArray(this$static, this$static.clazz, valueString); case 7: try { value_0 = $createDataInstance(this$static); value_0.parse_0(valueString); return value_0; } catch ($e2) { $e2 = toJava($e2); if (instanceOf($e2, 33)) { return null; } else throw toJs($e2); } default:throw toJs(new IllegalStateException_0('Invalid type set for this layout option.')); } } function LayoutOptionData(builder){ var all; this.dependencies = new LinkedList; this.id_0 = builder.id_0; this.group_0 = builder.group_0; this.name_0 = builder.name_0; this.description = builder.description; this.defaultValue = builder.defaultValue; this.type_0 = builder.type_0; this.clazz = builder.clazz; !builder.targets?(this.targets = (all = castTo($getEnumConstants(Lorg_eclipse_elk_core_data_LayoutOptionData$Target_2_classLit), 9) , new EnumSet$EnumSetImpl(all, castTo(createFrom(all, all.length), 9), 0))):(this.targets = builder.targets); this.legacyIds = builder.legacyIds; } defineClass(23, 1, {34:1, 701:1, 23:1, 149:1}, LayoutOptionData); _.compareTo_0 = function compareTo_20(other){ return $compareTo_19(this, castTo(other, 149)); } ; _.equals_0 = function equals_198(obj){ return instanceOf(obj, 23)?$equals_5(this.id_0, castTo(obj, 23).id_0):instanceOf(obj, 149) && $equals_5(this.id_0, castTo(obj, 149).getId()); } ; _.getDefault = function getDefault(){ var clone; if (instanceOf(this.defaultValue, 4)) { clone = clone_11(this.defaultValue); if (clone == null) { throw toJs(new IllegalStateException_0("Couldn't clone property '" + this.id_0 + "'. " + "Make sure it's type is registered with the " + ($ensureNamesAreInitialized(Lorg_eclipse_elk_graph_util_ElkReflect_2_classLit) , Lorg_eclipse_elk_graph_util_ElkReflect_2_classLit.simpleName) + ' utility class.')); } return clone; } else { return this.defaultValue; } } ; _.getDescription = function getDescription_1(){ return this.description; } ; _.getId = function getId_1(){ return this.id_0; } ; _.getName = function getName_4(){ return this.name_0; } ; _.hashCode_1 = function hashCode_67(){ return $hashCode_2(this.id_0); } ; _.toString_0 = function toString_113(){ return 'Layout Option: ' + this.id_0; } ; var Lorg_eclipse_elk_core_data_LayoutOptionData_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutOptionData', 23); function $defaultValue(this$static, adefaultValue){ this$static.defaultValue = adefaultValue; return this$static; } function $description_1(this$static, adescription){ this$static.description = adescription; return this$static; } function $group(this$static, agroup){ this$static.group_0 = agroup; return this$static; } function $id_1(this$static, aid){ this$static.id_0 = aid; return this$static; } function $legacyIds(this$static, alegacyIds){ this$static.legacyIds = alegacyIds; return this$static; } function $name_2(this$static, aname){ this$static.name_0 = aname; return this$static; } function $optionClass(this$static, aclazz){ this$static.clazz = aclazz; return this$static; } function $targets(this$static, atargets){ this$static.targets = atargets; return this$static; } function $type(this$static, atype){ this$static.type_0 = atype; return this$static; } function LayoutOptionData$Builder(){ } defineClass(24, 1, {}, LayoutOptionData$Builder); var Lorg_eclipse_elk_core_data_LayoutOptionData$Builder_2_classLit = createForClass('org.eclipse.elk.core.data', 'LayoutOptionData/Builder', 24); function $clinit_LayoutOptionData$Target(){ $clinit_LayoutOptionData$Target = emptyMethod; PARENTS = new LayoutOptionData$Target('PARENTS', 0); NODES = new LayoutOptionData$Target('NODES', 1); EDGES = new LayoutOptionData$Target('EDGES', 2); PORTS = new LayoutOptionData$Target('PORTS', 3); LABELS = new LayoutOptionData$Target('LABELS', 4); } function LayoutOptionData$Target(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_96(name_0){ $clinit_LayoutOptionData$Target(); return valueOf(($clinit_LayoutOptionData$Target$Map() , $MAP_86), name_0); } function values_104(){ $clinit_LayoutOptionData$Target(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_LayoutOptionData$Target_2_classLit, 1), $intern_37, 170, 0, [PARENTS, NODES, EDGES, PORTS, LABELS]); } defineClass(170, 22, {3:1, 34:1, 22:1, 170:1}, LayoutOptionData$Target); var EDGES, LABELS, NODES, PARENTS, PORTS; var Lorg_eclipse_elk_core_data_LayoutOptionData$Target_2_classLit = createForEnum('org.eclipse.elk.core.data', 'LayoutOptionData/Target', 170, Ljava_lang_Enum_2_classLit, values_104, valueOf_96); function $clinit_LayoutOptionData$Target$Map(){ $clinit_LayoutOptionData$Target$Map = emptyMethod; $MAP_86 = createValueOfMap(($clinit_LayoutOptionData$Target() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_LayoutOptionData$Target_2_classLit, 1), $intern_37, 170, 0, [PARENTS, NODES, EDGES, PORTS, LABELS]))); } var $MAP_86; function $clinit_LayoutOptionData$Type(){ $clinit_LayoutOptionData$Type = emptyMethod; UNDEFINED_1 = new LayoutOptionData$Type('UNDEFINED', 0); BOOLEAN = new LayoutOptionData$Type('BOOLEAN', 1); INT = new LayoutOptionData$Type('INT', 2); STRING = new LayoutOptionData$Type('STRING', 3); DOUBLE = new LayoutOptionData$Type('DOUBLE', 4); ENUM = new LayoutOptionData$Type('ENUM', 5); ENUMSET = new LayoutOptionData$Type('ENUMSET', 6); OBJECT = new LayoutOptionData$Type('OBJECT', 7); } function LayoutOptionData$Type(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_97(name_0){ $clinit_LayoutOptionData$Type(); return valueOf(($clinit_LayoutOptionData$Type$Map() , $MAP_87), name_0); } function values_105(){ $clinit_LayoutOptionData$Type(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_LayoutOptionData$Type_2_classLit, 1), $intern_37, 285, 0, [UNDEFINED_1, BOOLEAN, INT, STRING, DOUBLE, ENUM, ENUMSET, OBJECT]); } defineClass(285, 22, {3:1, 34:1, 22:1, 285:1}, LayoutOptionData$Type); var BOOLEAN, DOUBLE, ENUM, ENUMSET, INT, OBJECT, STRING, UNDEFINED_1; var Lorg_eclipse_elk_core_data_LayoutOptionData$Type_2_classLit = createForEnum('org.eclipse.elk.core.data', 'LayoutOptionData/Type', 285, Ljava_lang_Enum_2_classLit, values_105, valueOf_97); function $clinit_LayoutOptionData$Type$Map(){ $clinit_LayoutOptionData$Type$Map = emptyMethod; $MAP_87 = createValueOfMap(($clinit_LayoutOptionData$Type() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_LayoutOptionData$Type_2_classLit, 1), $intern_37, 285, 0, [UNDEFINED_1, BOOLEAN, INT, STRING, DOUBLE, ENUM, ENUMSET, OBJECT]))); } var $MAP_87; function $clinit_LabelManagementOptions(){ $clinit_LabelManagementOptions = emptyMethod; LABEL_MANAGER = new Property('org.eclipse.elk.labels.labelManager'); } var LABEL_MANAGER; function $clinit_ElkMath(){ $clinit_ElkMath = emptyMethod; FACT_TABLE = stampJavaTypeInfo(getClassLiteralForArray(J_classLit, 1), $intern_63, 28, 14, [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800, 479001600, 6227020800, 87178291200, 1307674368000, {l:3506176, m:794077, h:1}, {l:884736, m:916411, h:20}, {l:3342336, m:3912489, h:363}, {l:589824, m:3034138, h:6914}, {l:3407872, m:1962506, h:138294}]); $wnd.Math.pow(2, -65); } function approximateBezierSegment(controlPoints){ $clinit_ElkMath(); var i, result, t; result = initUnidimensionalArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, $intern_16, 8, 2, 0, 1); t = 0; for (i = 0; i < 2; i++) { t += 0.5; result[i] = getPointOnBezierSegment(t, controlPoints); } return result; } function binomiald(n, k){ if (n < 0 || k < 0) { throw toJs(new IllegalArgumentException_0('k and n must be positive')); } else if (k > n) { throw toJs(new IllegalArgumentException_0('k must be smaller than n')); } else return k == 0 || k == n?1:n == 0?0:factd(n) / (factd(k) * factd(n - k)); } function clipVector(v, width_0, height){ $clinit_ElkMath(); var absx, absy, hh, wh, xscale, yscale; wh = width_0 / 2; hh = height / 2; absx = $wnd.Math.abs(v.x_0); absy = $wnd.Math.abs(v.y_0); xscale = 1; yscale = 1; absx > wh && (xscale = wh / absx); absy > hh && (yscale = hh / absy); $scale(v, $wnd.Math.min(xscale, yscale)); return v; } function contains_49(rect, p){ var maxX, maxY, minX, minY; minX = rect.x_0; maxX = rect.x_0 + rect.width_0; minY = rect.y_0; maxY = rect.y_0 + rect.height; return p.x_0 > minX && p.x_0 < maxX && p.y_0 > minY && p.y_0 < maxY; } function contains_50(rect, p1, p2){ $clinit_ElkMath(); return contains_49(rect, p1) && contains_49(rect, p2); } function contains_51(rect, path){ $clinit_ElkMath(); var first, p1, p2, pathIt; if (path.size_0 < 2) { return false; } pathIt = $listIterator_2(path, 0); first = castTo($next_9(pathIt), 8); p1 = first; while (pathIt.currentNode != pathIt.this$01.tail) { p2 = castTo($next_9(pathIt), 8); if (!(contains_49(rect, p1) && contains_49(rect, p2))) { return false; } p1 = p2; } if (!(contains_49(rect, p1) && contains_49(rect, first))) { return false; } return true; } function distance_0(a1, a2, b1, b2, v){ $clinit_ElkMath(); return $wnd.Math.min(traceRays(a1, a2, b1, b2, v), traceRays(b1, b2, a1, a2, $negate_0(new KVector_1(v.x_0, v.y_0)))); } function factd(x_0){ if (x_0 < 0) { throw toJs(new IllegalArgumentException_0('The input must be positive')); } else return x_0 < FACT_TABLE.length?toDouble_0(FACT_TABLE[x_0]):$wnd.Math.sqrt($intern_126 * x_0) * (powf(x_0, x_0) / powd(2.718281828459045, x_0)); } function getPointOnBezierSegment(t, controlPoints){ var factor, j, n, p, px, py; n = controlPoints.length - 1; px = 0; py = 0; for (j = 0; j <= n; j++) { p = controlPoints[j]; factor = binomiald(n, j) * powd(1 - t, n - j) * powd(t, j); px += p.x_0 * factor; py += p.y_0 * factor; } return new KVector_1(px, py); } function intersects_0(rect, p1, p2){ $clinit_ElkMath(); if (contains_49(rect, p1) && contains_49(rect, p2)) { return false; } return intersects_2(new KVector_1(rect.x_0, rect.y_0), new KVector_1(rect.x_0 + rect.width_0, rect.y_0), p1, p2) || intersects_2(new KVector_1(rect.x_0 + rect.width_0, rect.y_0), new KVector_1(rect.x_0 + rect.width_0, rect.y_0 + rect.height), p1, p2) || intersects_2(new KVector_1(rect.x_0 + rect.width_0, rect.y_0 + rect.height), new KVector_1(rect.x_0, rect.y_0 + rect.height), p1, p2) || intersects_2(new KVector_1(rect.x_0, rect.y_0 + rect.height), new KVector_1(rect.x_0, rect.y_0), p1, p2); } function intersects_1(rect, path){ $clinit_ElkMath(); var first, p1, p2, pathIt; if (path.size_0 < 2) { return false; } pathIt = $listIterator_2(path, 0); first = castTo($next_9(pathIt), 8); p1 = first; while (pathIt.currentNode != pathIt.this$01.tail) { p2 = castTo($next_9(pathIt), 8); if (intersects_0(rect, p1, p2)) { return true; } p1 = p2; } if (intersects_0(rect, p1, first)) { return true; } return false; } function intersects_2(l11, l12, l21, l22){ var d, intersects, s, t, u0, u1, v0, v1, x00, x01, x10, x11, y00, y01, y10, y11; u0 = l11; v0 = $sub_0(new KVector_1(l12.x_0, l12.y_0), l11); u1 = l21; v1 = $sub_0(new KVector_1(l22.x_0, l22.y_0), l21); x00 = u0.x_0; y00 = u0.y_0; x10 = u1.x_0; y10 = u1.y_0; x01 = v0.x_0; y01 = v0.y_0; x11 = v1.x_0; y11 = v1.y_0; d = x11 * y01 - x01 * y11; $clinit_DoubleMath(); checkNonNegative($intern_117); if ($wnd.Math.abs(0 - d) <= $intern_117 || 0 == d || isNaN(0) && isNaN(d)) { return false; } s = 1 / d * ((x00 - x10) * y01 - (y00 - y10) * x01); t = 1 / d * -(-(x00 - x10) * y11 + (y00 - y10) * x11); intersects = (null , checkNonNegative($intern_117) , ($wnd.Math.abs(0 - s) <= $intern_117 || 0 == s || isNaN(0) && isNaN(s)?0:0 < s?-1:0 > s?1:compare_0(isNaN(0), isNaN(s))) < 0 && (null , checkNonNegative($intern_117) , ($wnd.Math.abs(s - 1) <= $intern_117 || s == 1 || isNaN(s) && isNaN(1)?0:s < 1?-1:s > 1?1:compare_0(isNaN(s), isNaN(1))) < 0) && (null , checkNonNegative($intern_117) , ($wnd.Math.abs(0 - t) <= $intern_117 || 0 == t || isNaN(0) && isNaN(t)?0:0 < t?-1:0 > t?1:compare_0(isNaN(0), isNaN(t))) < 0) && (null , checkNonNegative($intern_117) , ($wnd.Math.abs(t - 1) <= $intern_117 || t == 1 || isNaN(t) && isNaN(1)?0:t < 1?-1:t > 1?1:compare_0(isNaN(t), isNaN(1))) < 0)); return intersects; } function intersects2(p, r, q, s){ var center, d1, d2, l, pq, pqXr, rXs, t, u; pq = $sub_0(new KVector_1(q.x_0, q.y_0), p); pqXr = pq.x_0 * r.y_0 - pq.y_0 * r.x_0; rXs = r.x_0 * s.y_0 - r.y_0 * s.x_0; t = (pq.x_0 * s.y_0 - pq.y_0 * s.x_0) / rXs; u = pqXr / rXs; if (rXs == 0) { if (pqXr == 0) { center = $add_19(new KVector_1(q.x_0, q.y_0), $scale(new KVector_1(s.x_0, s.y_0), 0.5)); d1 = $distance_0(p, center); d2 = $distance_0($add_19(new KVector_1(p.x_0, p.y_0), r), center); l = $wnd.Math.sqrt(s.x_0 * s.x_0 + s.y_0 * s.y_0) * 0.5; if (d1 < d2 && d1 <= l) { return new KVector_1(p.x_0, p.y_0); } if (d2 <= l) { return $add_19(new KVector_1(p.x_0, p.y_0), r); } return null; } else { return null; } } else { return t >= 0 && t <= 1 && u >= 0 && u <= 1?$add_19(new KVector_1(p.x_0, p.y_0), $scale(new KVector_1(r.x_0, r.y_0), t)):null; } } function maxd(values){ $clinit_ElkMath(); var i, max_0; max_0 = $intern_124; for (i = 0; i < values.length; i++) { values[i] > max_0 && (max_0 = values[i]); } return max_0; } function powd(a, b){ var base, exp_0, result; result = 1; base = a; exp_0 = b >= 0?b:-b; while (exp_0 > 0) { if (exp_0 % 2 == 0) { base *= base; exp_0 = exp_0 / 2 | 0; } else { result *= base; exp_0 -= 1; } } return b < 0?1 / result:result; } function powf(a, b){ var base, exp_0, result; result = 1; base = a; exp_0 = b >= 0?b:-b; while (exp_0 > 0) { if (exp_0 % 2 == 0) { base *= base; exp_0 = exp_0 / 2 | 0; } else { result *= base; exp_0 -= 1; } } return b < 0?1 / result:result; } function shortestDistance_0(r1, r2){ $clinit_ElkMath(); var bottomDist, horzDist, leftDist, rightDist, topDist, vertDist; rightDist = r2.x_0 - (r1.x_0 + r1.width_0); leftDist = r1.x_0 - (r2.x_0 + r2.width_0); topDist = r1.y_0 - (r2.y_0 + r2.height); bottomDist = r2.y_0 - (r1.y_0 + r1.height); horzDist = $wnd.Math.max(leftDist, rightDist); vertDist = $wnd.Math.max(topDist, bottomDist); $clinit_DoubleMath(); checkNonNegative($intern_117); if (($wnd.Math.abs(horzDist) <= $intern_117 || horzDist == 0 || isNaN(horzDist) && isNaN(0)?0:horzDist < 0?-1:horzDist > 0?1:compare_0(isNaN(horzDist), isNaN(0))) >= 0 ^ (null , checkNonNegative($intern_117) , ($wnd.Math.abs(vertDist) <= $intern_117 || vertDist == 0 || isNaN(vertDist) && isNaN(0)?0:vertDist < 0?-1:vertDist > 0?1:compare_0(isNaN(vertDist), isNaN(0))) >= 0)) { return $wnd.Math.max(vertDist, horzDist); } checkNonNegative($intern_117); if (($wnd.Math.abs(horzDist) <= $intern_117 || horzDist == 0 || isNaN(horzDist) && isNaN(0)?0:horzDist < 0?-1:horzDist > 0?1:compare_0(isNaN(horzDist), isNaN(0))) > 0) { return $wnd.Math.sqrt(vertDist * vertDist + horzDist * horzDist); } return -$wnd.Math.sqrt(vertDist * vertDist + horzDist * horzDist); } function traceRays(a1, a2, b1, b2, v){ var edgeCase, endpointHit, intersection, result; result = $intern_60; endpointHit = false; intersection = intersects2(a1, $sub_0(new KVector_1(a2.x_0, a2.y_0), a1), $add_19(new KVector_1(b1.x_0, b1.y_0), v), $sub_0(new KVector_1(b2.x_0, b2.y_0), b1)); edgeCase = !!intersection && !($wnd.Math.abs(intersection.x_0 - a1.x_0) <= $intern_134 && $wnd.Math.abs(intersection.y_0 - a1.y_0) <= $intern_134 || $wnd.Math.abs(intersection.x_0 - a2.x_0) <= $intern_134 && $wnd.Math.abs(intersection.y_0 - a2.y_0) <= $intern_134); intersection = intersects2(a1, $sub_0(new KVector_1(a2.x_0, a2.y_0), a1), b1, v); !!intersection && (($wnd.Math.abs(intersection.x_0 - a1.x_0) <= $intern_134 && $wnd.Math.abs(intersection.y_0 - a1.y_0) <= $intern_134) == ($wnd.Math.abs(intersection.x_0 - a2.x_0) <= $intern_134 && $wnd.Math.abs(intersection.y_0 - a2.y_0) <= $intern_134) || edgeCase?(result = $wnd.Math.min(result, $length($sub_0(intersection, b1)))):(endpointHit = true)); intersection = intersects2(a1, $sub_0(new KVector_1(a2.x_0, a2.y_0), a1), b2, v); !!intersection && (endpointHit || ($wnd.Math.abs(intersection.x_0 - a1.x_0) <= $intern_134 && $wnd.Math.abs(intersection.y_0 - a1.y_0) <= $intern_134) == ($wnd.Math.abs(intersection.x_0 - a2.x_0) <= $intern_134 && $wnd.Math.abs(intersection.y_0 - a2.y_0) <= $intern_134) || edgeCase) && (result = $wnd.Math.min(result, $length($sub_0(intersection, b2)))); return result; } var FACT_TABLE; function $getBottomLeft(this$static){ return new KVector_1(this$static.x_0, this$static.y_0 + this$static.height); } function $getBottomRight(this$static){ return new KVector_1(this$static.x_0 + this$static.width_0, this$static.y_0 + this$static.height); } function $getCenter(this$static){ return new KVector_1(this$static.x_0 + this$static.width_0 / 2, this$static.y_0 + this$static.height / 2); } function $getPosition(this$static){ return new KVector_1(this$static.x_0, this$static.y_0); } function $getTopLeft(this$static){ return new KVector_1(this$static.x_0, this$static.y_0); } function $setRect(this$static, nx, ny, nw, nh){ this$static.x_0 = nx; this$static.y_0 = ny; this$static.width_0 = nw; this$static.height = nh; } function $union(this$static, other){ var t, x1, x2, y1, y2; x1 = $wnd.Math.min(this$static.x_0, other.x_0); y1 = $wnd.Math.min(this$static.y_0, other.y_0); x2 = $wnd.Math.max(this$static.x_0 + this$static.width_0, other.x_0 + other.width_0); y2 = $wnd.Math.max(this$static.y_0 + this$static.height, other.y_0 + other.height); if (x2 < x1) { t = x1; x1 = x2; x2 = t; } if (y2 < y1) { t = y1; y1 = y2; y2 = t; } $setRect(this$static, x1, y1, x2 - x1, y2 - y1); } function ElkRectangle(){ ElkRectangle_0.call(this, 0, 0, 0, 0); } function ElkRectangle_0(x_0, y_0, w, h){ this.x_0 = x_0; this.y_0 = y_0; this.width_0 = w; this.height = h; } function ElkRectangle_1(rect){ this.x_0 = rect.x_0; this.y_0 = rect.y_0; this.width_0 = rect.width_0; this.height = rect.height; } defineClass(116, 1, {116:1}, ElkRectangle, ElkRectangle_0, ElkRectangle_1); _.equals_0 = function equals_199(obj){ var other; if (obj == null || !instanceOf(obj, 116)) { return false; } other = castTo(obj, 116); return equals_57(this.x_0, other.x_0) && equals_57(this.y_0, other.y_0) && equals_57(this.width_0, other.width_0) && equals_57(this.height, other.height); } ; _.hashCode_1 = function hashCode_68(){ return hashCode_47(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, [this.x_0, this.y_0, this.width_0, this.height])); } ; _.toString_0 = function toString_114(){ return 'Rect[x=' + this.x_0 + ',y=' + this.y_0 + ',w=' + this.width_0 + ',h=' + this.height + ']'; } ; _.height = 0; _.width_0 = 0; _.x_0 = 0; _.y_0 = 0; var Lorg_eclipse_elk_core_math_ElkRectangle_2_classLit = createForClass('org.eclipse.elk.core.math', 'ElkRectangle', 116); function $add_18(this$static, dx, dy){ this$static.x_0 += dx; this$static.y_0 += dy; return this$static; } function $add_19(this$static, v){ this$static.x_0 += v.x_0; this$static.y_0 += v.y_0; return this$static; } function $bound(this$static, lowx, lowy, highx, highy){ if (highx < lowx || highy < lowy) { throw toJs(new IllegalArgumentException_0('The highx must be bigger then lowx and the highy must be bigger then lowy')); } this$static.x_0 < lowx?(this$static.x_0 = lowx):this$static.x_0 > highx && (this$static.x_0 = highx); this$static.y_0 < lowy?(this$static.y_0 = lowy):this$static.y_0 > highy && (this$static.y_0 = highy); return this$static; } function $clone_1(this$static){ return new KVector_1(this$static.x_0, this$static.y_0); } function $distance_0(this$static, v2){ var dx, dy; dx = this$static.x_0 - v2.x_0; dy = this$static.y_0 - v2.y_0; return $wnd.Math.sqrt(dx * dx + dy * dy); } function $dotProduct(this$static, v2){ return this$static.x_0 * v2.x_0 + this$static.y_0 * v2.y_0; } function $equals_9(this$static, obj){ var other; if (instanceOf(obj, 8)) { other = castTo(obj, 8); return this$static.x_0 == other.x_0 && this$static.y_0 == other.y_0; } else { return false; } } function $length(this$static){ return $wnd.Math.sqrt(this$static.x_0 * this$static.x_0 + this$static.y_0 * this$static.y_0); } function $negate_0(this$static){ this$static.x_0 = -this$static.x_0; this$static.y_0 = -this$static.y_0; return this$static; } function $normalize_0(this$static){ var length_0; length_0 = $wnd.Math.sqrt(this$static.x_0 * this$static.x_0 + this$static.y_0 * this$static.y_0); if (length_0 > 0) { this$static.x_0 /= length_0; this$static.y_0 /= length_0; } return this$static; } function $reset_5(this$static){ this$static.x_0 = 0; this$static.y_0 = 0; return this$static; } function $scale(this$static, scale){ this$static.x_0 *= scale; this$static.y_0 *= scale; return this$static; } function $scale_0(this$static, scalex, scaley){ this$static.x_0 *= scalex; this$static.y_0 *= scaley; return this$static; } function $scaleToLength(this$static, length_0){ $normalize_0(this$static); this$static.x_0 *= length_0; this$static.y_0 *= length_0; return this$static; } function $set_7(this$static, newX, newY){ this$static.x_0 = newX; this$static.y_0 = newY; return this$static; } function $set_8(this$static, other){ this$static.x_0 = other.x_0; this$static.y_0 = other.y_0; return this$static; } function $sub(this$static, dx, dy){ this$static.x_0 -= dx; this$static.y_0 -= dy; return this$static; } function $sub_0(this$static, v){ this$static.x_0 -= v.x_0; this$static.y_0 -= v.y_0; return this$static; } function KVector(){ this.x_0 = 0; this.y_0 = 0; } function KVector_0(angle){ this.x_0 = $wnd.Math.cos(angle); this.y_0 = $wnd.Math.sin(angle); } function KVector_1(thex, they){ this.x_0 = thex; this.y_0 = they; } function KVector_2(v){ this.x_0 = v.x_0; this.y_0 = v.y_0; } function isdelim_0(c, delims){ var i; for (i = 0; i < delims.length; i++) { if (c == (checkCriticalStringElementIndex(i, delims.length) , delims.charCodeAt(i))) { return true; } } return false; } function sum_0(vs){ var sum, v, v$array, v$index, v$max; sum = new KVector; for (v$array = vs , v$index = 0 , v$max = v$array.length; v$index < v$max; ++v$index) { v = v$array[v$index]; sum.x_0 += v.x_0; sum.y_0 += v.y_0; } return sum; } defineClass(8, 1, {3:1, 4:1, 8:1, 423:1}, KVector, KVector_0, KVector_1, KVector_2); _.equals_0 = function equals_200(obj){ return $equals_9(this, obj); } ; _.hashCode_1 = function hashCode_69(){ return $hashCode_1(this.x_0) + reverse_1($hashCode_1(this.y_0)); } ; _.parse_0 = function parse_1(string){ var end, exception, start_0, tokens; start_0 = 0; while (start_0 < string.length && isdelim_0((checkCriticalStringElementIndex(start_0, string.length) , string.charCodeAt(start_0)), '([{"\' \t\r\n')) { ++start_0; } end = string.length; while (end > 0 && isdelim_0((checkCriticalStringElementIndex(end - 1, string.length) , string.charCodeAt(end - 1)), ')]}"\' \t\r\n')) { --end; } if (start_0 >= end) { throw toJs(new IllegalArgumentException_0('The given string does not contain any numbers.')); } tokens = $split_0((checkCriticalStringBounds(start_0, end, string.length) , string.substr(start_0, end - start_0)), ',|;|\r|\n'); if (tokens.length != 2) { throw toJs(new IllegalArgumentException_0('Exactly two numbers are expected, ' + tokens.length + ' were found.')); } try { this.x_0 = __parseAndValidateDouble($trim(tokens[0])); this.y_0 = __parseAndValidateDouble($trim(tokens[1])); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 130)) { exception = $e0; throw toJs(new IllegalArgumentException_0('The given string contains parts that cannot be parsed as numbers.' + exception)); } else throw toJs($e0); } } ; _.toString_0 = function toString_115(){ return '(' + this.x_0 + ',' + this.y_0 + ')'; } ; _.x_0 = 0; _.y_0 = 0; var Lorg_eclipse_elk_core_math_KVector_2_classLit = createForClass('org.eclipse.elk.core.math', 'KVector', 8); function $addAll_7(this$static, vectors){ var vector, vector$array, vector$index, vector$max; for (vector$array = vectors , vector$index = 0 , vector$max = vector$array.length; vector$index < vector$max; ++vector$index) { vector = vector$array[vector$index]; $addNode_0(this$static, vector, this$static.tail.prev, this$static.tail); } } function $addAllAsCopies(this$static, index_0, chain){ var copies, v, v$iterator; copies = new LinkedList; for (v$iterator = $listIterator_2(chain, 0); v$iterator.currentNode != v$iterator.this$01.tail;) { v = castTo($next_9(v$iterator), 8); $add_7(copies, new KVector_2(v)); } $addAll_0(this$static, index_0, copies); } function $offset_1(this$static, dx, dy){ var vector, vector$iterator; for (vector$iterator = $listIterator_2(this$static, 0); vector$iterator.currentNode != vector$iterator.this$01.tail;) { vector = castTo($next_9(vector$iterator), 8); vector.x_0 += dx; vector.y_0 += dy; } return this$static; } function $offset_2(this$static, offset){ var vector, vector$iterator; for (vector$iterator = $listIterator_2(this$static, 0); vector$iterator.currentNode != vector$iterator.this$01.tail;) { vector = castTo($next_9(vector$iterator), 8); vector.x_0 += offset.x_0; vector.y_0 += offset.y_0; } return this$static; } function $toArray_7(this$static){ var i, iter, result; i = 0; result = initUnidimensionalArray(Lorg_eclipse_elk_core_math_KVector_2_classLit, $intern_16, 8, this$static.size_0, 0, 1); iter = $listIterator_2(this$static, 0); while (iter.currentNode != iter.this$01.tail) { result[i++] = castTo($next_9(iter), 8); } return result; } function KVectorChain(){ LinkedList.call(this); } function KVectorChain_0(collection){ LinkedList_0.call(this, collection); } function KVectorChain_1(vectors){ LinkedList.call(this); $addAll_7(this, vectors); } function reverse_3(chain){ var result, vector, vector$iterator; result = new KVectorChain; for (vector$iterator = $listIterator_2(chain, 0); vector$iterator.currentNode != vector$iterator.this$01.tail;) { vector = castTo($next_9(vector$iterator), 8); $add_0(result, 0, new KVector_2(vector)); } return result; } defineClass(75, 67, {3:1, 4:1, 20:1, 31:1, 56:1, 16:1, 67:1, 15:1, 75:1, 423:1}, KVectorChain, KVectorChain_0, KVectorChain_1); _.toArray = function toArray_25(){ return $toArray_7(this); } ; _.parse_0 = function parse_2(string){ var exception, i, tokens, x_0, xy, y_0; tokens = $split_0(string, ',|;|\\(|\\)|\\[|\\]|\\{|\\}| |\t|\n'); $reset_0(this); try { i = 0; xy = 0; x_0 = 0; y_0 = 0; while (i < tokens.length) { if (tokens[i] != null && $trim(tokens[i]).length > 0) { xy % 2 == 0?(x_0 = __parseAndValidateDouble(tokens[i])):(y_0 = __parseAndValidateDouble(tokens[i])); xy > 0 && xy % 2 != 0 && $add_7(this, new KVector_1(x_0, y_0)); ++xy; } ++i; } } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 130)) { exception = $e0; throw toJs(new IllegalArgumentException_0('The given string does not match the expected format for vectors.' + exception)); } else throw toJs($e0); } } ; _.toString_0 = function toString_116(){ var builder, iter, vector; builder = new StringBuilder_1('('); iter = $listIterator_2(this, 0); while (iter.currentNode != iter.this$01.tail) { vector = castTo($next_9(iter), 8); $append_11(builder, vector.x_0 + ',' + vector.y_0); iter.currentNode != iter.this$01.tail && (builder.string += '; ' , builder); } return (builder.string += ')' , builder).string; } ; var Lorg_eclipse_elk_core_math_KVectorChain_2_classLit = createForClass('org.eclipse.elk.core.math', 'KVectorChain', 75); function $clinit_Alignment(){ $clinit_Alignment = emptyMethod; AUTOMATIC = new Alignment('AUTOMATIC', 0); LEFT_5 = new Alignment('LEFT', 1); RIGHT_5 = new Alignment('RIGHT', 2); TOP_2 = new Alignment('TOP', 3); BOTTOM_1 = new Alignment('BOTTOM', 4); CENTER_4 = new Alignment('CENTER', 5); } function Alignment(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_98(name_0){ $clinit_Alignment(); return valueOf(($clinit_Alignment$Map() , $MAP_88), name_0); } function values_106(){ $clinit_Alignment(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_Alignment_2_classLit, 1), $intern_37, 255, 0, [AUTOMATIC, LEFT_5, RIGHT_5, TOP_2, BOTTOM_1, CENTER_4]); } defineClass(255, 22, {3:1, 34:1, 22:1, 255:1}, Alignment); var AUTOMATIC, BOTTOM_1, CENTER_4, LEFT_5, RIGHT_5, TOP_2; var Lorg_eclipse_elk_core_options_Alignment_2_classLit = createForEnum('org.eclipse.elk.core.options', 'Alignment', 255, Ljava_lang_Enum_2_classLit, values_106, valueOf_98); function $clinit_Alignment$Map(){ $clinit_Alignment$Map = emptyMethod; $MAP_88 = createValueOfMap(($clinit_Alignment() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_Alignment_2_classLit, 1), $intern_37, 255, 0, [AUTOMATIC, LEFT_5, RIGHT_5, TOP_2, BOTTOM_1, CENTER_4]))); } var $MAP_88; function $clinit_BoxLayouterOptions(){ $clinit_BoxLayouterOptions = emptyMethod; PADDING_DEFAULT_5 = new ElkPadding_0(15); PADDING_5 = new Property_2(($clinit_CoreOptions() , PADDING_6), PADDING_DEFAULT_5); SPACING_NODE_NODE_5 = new Property_2(SPACING_NODE_NODE_6, 15); PRIORITY_2 = new Property_2(PRIORITY_3, valueOf_3(0)); EXPAND_NODES = EXPAND_NODES_0; NODE_SIZE_CONSTRAINTS_5 = NODE_SIZE_CONSTRAINTS_6; NODE_SIZE_OPTIONS_5 = NODE_SIZE_OPTIONS_6; ASPECT_RATIO_4 = new Property_2(ASPECT_RATIO_5, $intern_135); INTERACTIVE_7 = INTERACTIVE_8; NODE_SIZE_MINIMUM_4 = NODE_SIZE_MINIMUM_5; BOX_PACKING_MODE = BOX_PACKING_MODE_0; CONTENT_ALIGNMENT_1 = CONTENT_ALIGNMENT_2; } function $apply_24(registry){ $register(registry, new LayoutAlgorithmData($providerFactory($description($name_0($id(new LayoutAlgorithmData$Builder, 'org.eclipse.elk.box'), 'ELK Box'), 'Algorithm for packing of unconnected boxes, i.e. graphs without edges.'), new BoxLayouterOptions$BoxFactory))); $addOptionSupport(registry, 'org.eclipse.elk.box', 'org.eclipse.elk.padding', PADDING_DEFAULT_5); $addOptionSupport(registry, 'org.eclipse.elk.box', 'org.eclipse.elk.spacing.nodeNode', 15); $addOptionSupport(registry, 'org.eclipse.elk.box', 'org.eclipse.elk.priority', valueOf_3(0)); $addOptionSupport(registry, 'org.eclipse.elk.box', 'org.eclipse.elk.expandNodes', $getDefault(EXPAND_NODES)); $addOptionSupport(registry, 'org.eclipse.elk.box', 'org.eclipse.elk.nodeSize.constraints', $getDefault(NODE_SIZE_CONSTRAINTS_5)); $addOptionSupport(registry, 'org.eclipse.elk.box', 'org.eclipse.elk.nodeSize.options', $getDefault(NODE_SIZE_OPTIONS_5)); $addOptionSupport(registry, 'org.eclipse.elk.box', 'org.eclipse.elk.aspectRatio', $intern_135); $addOptionSupport(registry, 'org.eclipse.elk.box', 'org.eclipse.elk.interactive', $getDefault(INTERACTIVE_7)); $addOptionSupport(registry, 'org.eclipse.elk.box', 'org.eclipse.elk.nodeSize.minimum', $getDefault(NODE_SIZE_MINIMUM_4)); $addOptionSupport(registry, 'org.eclipse.elk.box', 'org.eclipse.elk.box.packingMode', $getDefault(BOX_PACKING_MODE)); $addOptionSupport(registry, 'org.eclipse.elk.box', 'org.eclipse.elk.contentAlignment', $getDefault(CONTENT_ALIGNMENT_1)); } function BoxLayouterOptions(){ $clinit_BoxLayouterOptions(); } defineClass(991, 1, $intern_90, BoxLayouterOptions); _.apply_4 = function apply_175(registry){ $apply_24(registry); } ; var ASPECT_RATIO_4, BOX_PACKING_MODE, CONTENT_ALIGNMENT_1, EXPAND_NODES, INTERACTIVE_7, NODE_SIZE_CONSTRAINTS_5, NODE_SIZE_MINIMUM_4, NODE_SIZE_OPTIONS_5, PADDING_5, PADDING_DEFAULT_5, PRIORITY_2, SPACING_NODE_NODE_5; var Lorg_eclipse_elk_core_options_BoxLayouterOptions_2_classLit = createForClass('org.eclipse.elk.core.options', 'BoxLayouterOptions', 991); function BoxLayouterOptions$BoxFactory(){ } defineClass(992, 1, {}, BoxLayouterOptions$BoxFactory); _.create_0 = function create_44(){ var provider; return provider = new BoxLayoutProvider , provider; } ; _.destroy = function destroy_8(obj){ } ; var Lorg_eclipse_elk_core_options_BoxLayouterOptions$BoxFactory_2_classLit = createForClass('org.eclipse.elk.core.options', 'BoxLayouterOptions/BoxFactory', 992); function $clinit_ContentAlignment(){ $clinit_ContentAlignment = emptyMethod; V_TOP = new ContentAlignment('V_TOP', 0); V_CENTER = new ContentAlignment('V_CENTER', 1); V_BOTTOM = new ContentAlignment('V_BOTTOM', 2); H_LEFT = new ContentAlignment('H_LEFT', 3); H_CENTER = new ContentAlignment('H_CENTER', 4); H_RIGHT = new ContentAlignment('H_RIGHT', 5); } function ContentAlignment(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_99(name_0){ $clinit_ContentAlignment(); return valueOf(($clinit_ContentAlignment$Map() , $MAP_89), name_0); } function values_107(){ $clinit_ContentAlignment(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_ContentAlignment_2_classLit, 1), $intern_37, 298, 0, [V_TOP, V_CENTER, V_BOTTOM, H_LEFT, H_CENTER, H_RIGHT]); } defineClass(298, 22, {3:1, 34:1, 22:1, 298:1}, ContentAlignment); var H_CENTER, H_LEFT, H_RIGHT, V_BOTTOM, V_CENTER, V_TOP; var Lorg_eclipse_elk_core_options_ContentAlignment_2_classLit = createForEnum('org.eclipse.elk.core.options', 'ContentAlignment', 298, Ljava_lang_Enum_2_classLit, values_107, valueOf_99); function $clinit_ContentAlignment$Map(){ $clinit_ContentAlignment$Map = emptyMethod; $MAP_89 = createValueOfMap(($clinit_ContentAlignment() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_ContentAlignment_2_classLit, 1), $intern_37, 298, 0, [V_TOP, V_CENTER, V_BOTTOM, H_LEFT, H_CENTER, H_RIGHT]))); } var $MAP_89; function $clinit_CoreOptions(){ $clinit_CoreOptions = emptyMethod; var all, all0; ALGORITHM = new Property('org.eclipse.elk.algorithm'); RESOLVED_ALGORITHM = new Property('org.eclipse.elk.resolvedAlgorithm'); ALIGNMENT_DEFAULT = ($clinit_Alignment() , AUTOMATIC); ALIGNMENT_0 = new Property_1('org.eclipse.elk.alignment', ALIGNMENT_DEFAULT); new ExclusiveBounds$ExclusiveLowerBound; ASPECT_RATIO_5 = new Property_1('org.eclipse.elk.aspectRatio', null); BEND_POINTS = new Property('org.eclipse.elk.bendPoints'); CONTENT_ALIGNMENT_DEFAULT = ($clinit_ContentAlignment() , of_2(V_TOP, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_ContentAlignment_2_classLit, 1), $intern_37, 298, 0, [H_LEFT]))); CONTENT_ALIGNMENT_2 = new Property_1('org.eclipse.elk.contentAlignment', CONTENT_ALIGNMENT_DEFAULT); DEBUG_MODE_3 = new Property_1('org.eclipse.elk.debugMode', ($clinit_Boolean() , false)); DIRECTION_DEFAULT_1 = ($clinit_Direction_0() , UNDEFINED_2); DIRECTION_1 = new Property_1('org.eclipse.elk.direction', DIRECTION_DEFAULT_1); EDGE_ROUTING_DEFAULT_0 = ($clinit_EdgeRouting() , UNDEFINED_3); EDGE_ROUTING_0 = new Property_1('org.eclipse.elk.edgeRouting', EDGE_ROUTING_DEFAULT_0); EXPAND_NODES_0 = new Property_1('org.eclipse.elk.expandNodes', false); HIERARCHY_HANDLING_DEFAULT = ($clinit_HierarchyHandling() , INHERIT); HIERARCHY_HANDLING_0 = new Property_1('org.eclipse.elk.hierarchyHandling', HIERARCHY_HANDLING_DEFAULT); PADDING_DEFAULT_6 = new ElkPadding_0(12); PADDING_6 = new Property_1('org.eclipse.elk.padding', PADDING_DEFAULT_6); INTERACTIVE_8 = new Property_1('org.eclipse.elk.interactive', false); INTERACTIVE_LAYOUT_2 = new Property_1('org.eclipse.elk.interactiveLayout', false); OMIT_NODE_MICRO_LAYOUT_4 = new Property_1('org.eclipse.elk.omitNodeMicroLayout', false); PORT_CONSTRAINTS_DEFAULT = ($clinit_PortConstraints() , UNDEFINED_4); PORT_CONSTRAINTS_1 = new Property_1('org.eclipse.elk.portConstraints', PORT_CONSTRAINTS_DEFAULT); POSITION_2 = new Property('org.eclipse.elk.position'); PRIORITY_3 = new Property('org.eclipse.elk.priority'); RANDOM_SEED_1 = new Property('org.eclipse.elk.randomSeed'); SEPARATE_CONNECTED_COMPONENTS_2 = new Property('org.eclipse.elk.separateConnectedComponents'); JUNCTION_POINTS_DEFAULT = new KVectorChain; JUNCTION_POINTS_0 = new Property_1('org.eclipse.elk.junctionPoints', JUNCTION_POINTS_DEFAULT); COMMENT_BOX_0 = new Property_1('org.eclipse.elk.commentBox', false); HYPERNODE_0 = new Property_1('org.eclipse.elk.hypernode', false); new Property('org.eclipse.elk.labelManager'); MARGINS_DEFAULT = new ElkMargin; MARGINS_0 = new Property_1('org.eclipse.elk.margins', MARGINS_DEFAULT); NO_LAYOUT_0 = new Property_1('org.eclipse.elk.noLayout', false); new ExclusiveBounds$ExclusiveLowerBound; SCALE_FACTOR = new Property_1('org.eclipse.elk.scaleFactor', 1); CHILD_AREA_WIDTH = new Property('org.eclipse.elk.childAreaWidth'); CHILD_AREA_HEIGHT = new Property('org.eclipse.elk.childAreaHeight'); TOPDOWN_LAYOUT_2 = new Property_1('org.eclipse.elk.topdownLayout', false); new Property_1('org.eclipse.elk.animate', true); valueOf_3(0); new Property_1('org.eclipse.elk.animTimeFactor', valueOf_3(100)); new Property_1('org.eclipse.elk.layoutAncestors', false); valueOf_3(0); new Property_1('org.eclipse.elk.maxAnimTime', valueOf_3(4000)); valueOf_3(0); new Property_1('org.eclipse.elk.minAnimTime', valueOf_3(400)); new Property_1('org.eclipse.elk.progressBar', false); new Property_1('org.eclipse.elk.validateGraph', false); new Property_1('org.eclipse.elk.validateOptions', true); new Property_1('org.eclipse.elk.zoomToFit', false); BOX_PACKING_MODE_DEFAULT = ($clinit_BoxLayoutProvider$PackingMode() , SIMPLE_1); BOX_PACKING_MODE_0 = new Property_1('org.eclipse.elk.box.packingMode', BOX_PACKING_MODE_DEFAULT); SPACING_COMMENT_COMMENT_0 = new Property_1('org.eclipse.elk.spacing.commentComment', 10); SPACING_COMMENT_NODE_0 = new Property_1('org.eclipse.elk.spacing.commentNode', 10); SPACING_COMPONENT_COMPONENT_1 = new Property_1('org.eclipse.elk.spacing.componentComponent', 20); SPACING_EDGE_EDGE_0 = new Property_1('org.eclipse.elk.spacing.edgeEdge', 10); SPACING_EDGE_LABEL_1 = new Property_1('org.eclipse.elk.spacing.edgeLabel', 2); SPACING_EDGE_NODE_1 = new Property_1('org.eclipse.elk.spacing.edgeNode', 10); SPACING_LABEL_LABEL_0 = new Property_1('org.eclipse.elk.spacing.labelLabel', 0); SPACING_LABEL_NODE_0 = new Property_1('org.eclipse.elk.spacing.labelNode', 5); SPACING_LABEL_PORT_HORIZONTAL_0 = new Property_1('org.eclipse.elk.spacing.labelPortHorizontal', 1); SPACING_LABEL_PORT_VERTICAL_0 = new Property_1('org.eclipse.elk.spacing.labelPortVertical', 1); SPACING_NODE_NODE_6 = new Property_1('org.eclipse.elk.spacing.nodeNode', 20); SPACING_NODE_SELF_LOOP_0 = new Property_1('org.eclipse.elk.spacing.nodeSelfLoop', 10); SPACING_PORT_PORT_0 = new Property_1('org.eclipse.elk.spacing.portPort', 10); SPACING_INDIVIDUAL_0 = new Property('org.eclipse.elk.spacing.individual'); SPACING_PORTS_SURROUNDING_DEFAULT = new ElkMargin_0; SPACING_PORTS_SURROUNDING_0 = new Property_1('org.eclipse.elk.spacing.portsSurrounding', SPACING_PORTS_SURROUNDING_DEFAULT); PARTITIONING_PARTITION_0 = new Property('org.eclipse.elk.partitioning.partition'); PARTITIONING_ACTIVATE_DEFAULT = false; PARTITIONING_ACTIVATE_0 = new Property_1('org.eclipse.elk.partitioning.activate', PARTITIONING_ACTIVATE_DEFAULT); NODE_LABELS_PADDING_DEFAULT = new ElkPadding_0(5); NODE_LABELS_PADDING_0 = new Property_1('org.eclipse.elk.nodeLabels.padding', NODE_LABELS_PADDING_DEFAULT); NODE_LABELS_PLACEMENT_DEFAULT = ($clinit_NodeLabelPlacement() , all0 = castTo($getEnumConstants(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit), 9) , new EnumSet$EnumSetImpl(all0, castTo(createFrom(all0, all0.length), 9), 0)); NODE_LABELS_PLACEMENT_5 = new Property_1('org.eclipse.elk.nodeLabels.placement', NODE_LABELS_PLACEMENT_DEFAULT); PORT_ALIGNMENT_DEFAULT_DEFAULT_0 = ($clinit_PortAlignment() , DISTRIBUTED); PORT_ALIGNMENT_DEFAULT = new Property_1('org.eclipse.elk.portAlignment.default', PORT_ALIGNMENT_DEFAULT_DEFAULT_0); PORT_ALIGNMENT_NORTH_0 = new Property('org.eclipse.elk.portAlignment.north'); PORT_ALIGNMENT_SOUTH_0 = new Property('org.eclipse.elk.portAlignment.south'); PORT_ALIGNMENT_WEST_0 = new Property('org.eclipse.elk.portAlignment.west'); PORT_ALIGNMENT_EAST_0 = new Property('org.eclipse.elk.portAlignment.east'); NODE_SIZE_CONSTRAINTS_DEFAULT = (all = castTo($getEnumConstants(Lorg_eclipse_elk_core_options_SizeConstraint_2_classLit), 9) , new EnumSet$EnumSetImpl(all, castTo(createFrom(all, all.length), 9), 0)); NODE_SIZE_CONSTRAINTS_6 = new Property_1('org.eclipse.elk.nodeSize.constraints', NODE_SIZE_CONSTRAINTS_DEFAULT); NODE_SIZE_OPTIONS_DEFAULT = of_1(($clinit_SizeOptions() , DEFAULT_MINIMUM_SIZE)); NODE_SIZE_OPTIONS_6 = new Property_1('org.eclipse.elk.nodeSize.options', NODE_SIZE_OPTIONS_DEFAULT); NODE_SIZE_MINIMUM_DEFAULT = new KVector_1(0, 0); NODE_SIZE_MINIMUM_5 = new Property_1('org.eclipse.elk.nodeSize.minimum', NODE_SIZE_MINIMUM_DEFAULT); NODE_SIZE_FIXED_GRAPH_SIZE_3 = new Property_1('org.eclipse.elk.nodeSize.fixedGraphSize', false); EDGE_LABELS_PLACEMENT_DEFAULT = ($clinit_EdgeLabelPlacement() , CENTER_5); EDGE_LABELS_PLACEMENT_0 = new Property_1('org.eclipse.elk.edgeLabels.placement', EDGE_LABELS_PLACEMENT_DEFAULT); EDGE_LABELS_INLINE_1 = new Property_1('org.eclipse.elk.edgeLabels.inline', false); new Property('org.eclipse.elk.font.name'); valueOf_3(1); new Property_1('org.eclipse.elk.font.size', null); PORT_ANCHOR_0 = new Property('org.eclipse.elk.port.anchor'); PORT_INDEX_0 = new Property('org.eclipse.elk.port.index'); PORT_SIDE_DEFAULT = ($clinit_PortSide() , UNDEFINED_5); PORT_SIDE_0 = new Property_1('org.eclipse.elk.port.side', PORT_SIDE_DEFAULT); PORT_BORDER_OFFSET_0 = new Property('org.eclipse.elk.port.borderOffset'); PORT_LABELS_PLACEMENT_DEFAULT = ($clinit_PortLabelPlacement() , of_1(OUTSIDE_0)); PORT_LABELS_PLACEMENT_5 = new Property_1('org.eclipse.elk.portLabels.placement', PORT_LABELS_PLACEMENT_DEFAULT); PORT_LABELS_NEXT_TO_PORT_IF_POSSIBLE_0 = new Property_1('org.eclipse.elk.portLabels.nextToPortIfPossible', false); PORT_LABELS_TREAT_AS_GROUP_0 = new Property_1('org.eclipse.elk.portLabels.treatAsGroup', true); new ExclusiveBounds$ExclusiveLowerBound; TOPDOWN_SCALE_FACTOR_2 = new Property_1('org.eclipse.elk.topdown.scaleFactor', 1); TOPDOWN_SIZE_APPROXIMATOR = new Property_1('org.eclipse.elk.topdown.sizeApproximator', null); TOPDOWN_HIERARCHICAL_NODE_WIDTH_2 = new Property_1('org.eclipse.elk.topdown.hierarchicalNodeWidth', 150); TOPDOWN_HIERARCHICAL_NODE_ASPECT_RATIO_2 = new Property_1('org.eclipse.elk.topdown.hierarchicalNodeAspectRatio', 1.414); TOPDOWN_NODE_TYPE = new Property_1('org.eclipse.elk.topdown.nodeType', null); TOPDOWN_SCALE_CAP = new Property_1('org.eclipse.elk.topdown.scaleCap', 1); INSIDE_SELF_LOOPS_ACTIVATE_0 = new Property_1('org.eclipse.elk.insideSelfLoops.activate', false); INSIDE_SELF_LOOPS_YO_0 = new Property_1('org.eclipse.elk.insideSelfLoops.yo', false); EDGE_THICKNESS_1 = new Property_1('org.eclipse.elk.edge.thickness', 1); EDGE_TYPE_DEFAULT = ($clinit_EdgeType() , NONE_16); new Property_1('org.eclipse.elk.edge.type', EDGE_TYPE_DEFAULT); PARTITIONING_PARTITION_DEP_PARTITIONING_ACTIVATE_0 = true; TOPDOWN_SCALE_FACTOR_DEP_TOPDOWN_NODE_TYPE_0 = ($clinit_TopdownNodeTypes() , HIERARCHICAL_NODE); TOPDOWN_SIZE_APPROXIMATOR_DEP_TOPDOWN_NODE_TYPE_0 = HIERARCHICAL_NODE; TOPDOWN_SCALE_CAP_DEP_TOPDOWN_NODE_TYPE_0 = HIERARCHICAL_NODE; } function CoreOptions(){ $clinit_CoreOptions(); } defineClass(699, 1, $intern_90, CoreOptions); _.apply_4 = function apply_176(registry){ $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.algorithm'), ''), 'Layout Algorithm'), 'Select a specific layout algorithm.'), ($clinit_LayoutOptionData$Type() , STRING)), Ljava_lang_String_2_classLit), of_1(($clinit_LayoutOptionData$Target() , PARENTS))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.resolvedAlgorithm'), ''), 'Resolved Layout Algorithm'), 'Meta data associated with the selected algorithm.'), OBJECT), Lorg_eclipse_elk_core_data_LayoutAlgorithmData_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.alignment'), ''), 'Alignment'), 'Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm.'), ALIGNMENT_DEFAULT), ENUM), Lorg_eclipse_elk_core_options_Alignment_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.aspectRatio'), ''), 'Aspect Ratio'), 'The desired aspect ratio of the drawing, that is the quotient of width by height.'), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.bendPoints'), ''), 'Bend Points'), "A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."), OBJECT), Lorg_eclipse_elk_core_math_KVectorChain_2_classLit), of_1(EDGES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.contentAlignment'), ''), 'Content Alignment'), 'Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option.'), CONTENT_ALIGNMENT_DEFAULT), ENUMSET), Lorg_eclipse_elk_core_options_ContentAlignment_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.debugMode'), ''), 'Debug Mode'), 'Whether additional debug information shall be generated.'), ($clinit_Boolean() , false)), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.direction'), ''), 'Direction'), 'Overall direction of edges: horizontal (right / left) or vertical (down / up).'), DIRECTION_DEFAULT_1), ENUM), Lorg_eclipse_elk_core_options_Direction_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.edgeRouting'), ''), 'Edge Routing'), 'What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline.'), EDGE_ROUTING_DEFAULT_0), ENUM), Lorg_eclipse_elk_core_options_EdgeRouting_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.expandNodes'), ''), 'Expand Nodes'), 'If active, nodes are expanded to fill the area of their parent.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.hierarchyHandling'), ''), 'Hierarchy Handling'), "Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."), HIERARCHY_HANDLING_DEFAULT), ENUM), Lorg_eclipse_elk_core_options_HierarchyHandling_2_classLit), of_2(PARENTS, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_LayoutOptionData$Target_2_classLit, 1), $intern_37, 170, 0, [NODES]))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.padding'), ''), 'Padding'), "The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."), PADDING_DEFAULT_6), OBJECT), Lorg_eclipse_elk_core_math_ElkPadding_2_classLit), of_2(PARENTS, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_LayoutOptionData$Target_2_classLit, 1), $intern_37, 170, 0, [NODES]))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.interactive'), ''), 'Interactive'), 'Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.interactiveLayout'), ''), 'interactive Layout'), 'Whether the graph should be changeable interactively and by setting constraints'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.omitNodeMicroLayout'), ''), 'Omit Node Micro Layout'), "Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node labels. The functionality is implemented independent of any specific layout algorithm and shouldn't have any negative impact on the layout algorithm's performance itself. Yet, if any unforeseen behavior occurs, this option allows to deactivate the micro layout."), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.portConstraints'), ''), 'Port Constraints'), 'Defines constraints of the position of the ports of a node.'), PORT_CONSTRAINTS_DEFAULT), ENUM), Lorg_eclipse_elk_core_options_PortConstraints_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.position'), ''), 'Position'), "The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."), OBJECT), Lorg_eclipse_elk_core_math_KVector_2_classLit), of_2(NODES, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_LayoutOptionData$Target_2_classLit, 1), $intern_37, 170, 0, [PORTS, LABELS]))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.priority'), ''), 'Priority'), 'Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used.'), INT), Ljava_lang_Integer_2_classLit), of_2(NODES, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_LayoutOptionData$Target_2_classLit, 1), $intern_37, 170, 0, [EDGES]))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.randomSeed'), ''), 'Randomization Seed'), 'Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time).'), INT), Ljava_lang_Integer_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.separateConnectedComponents'), ''), 'Separate Connected Components'), 'Whether each connected component should be processed separately.'), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.junctionPoints'), ''), 'Junction Points'), 'This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order.'), JUNCTION_POINTS_DEFAULT), OBJECT), Lorg_eclipse_elk_core_math_KVectorChain_2_classLit), of_1(EDGES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.commentBox'), ''), 'Comment Box'), 'Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.hypernode'), ''), 'Hypernode'), 'Whether the node should be handled as a hypernode.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.labelManager'), ''), 'Label Manager'), "Label managers can shorten labels upon a layout algorithm's request."), OBJECT), Lorg_eclipse_elk_core_labels_ILabelManager_2_classLit), of_2(PARENTS, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_LayoutOptionData$Target_2_classLit, 1), $intern_37, 170, 0, [LABELS]))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.margins'), ''), 'Margins'), "Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."), MARGINS_DEFAULT), OBJECT), Lorg_eclipse_elk_core_math_ElkMargin_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.noLayout'), ''), 'No Layout'), "No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_2(NODES, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_LayoutOptionData$Target_2_classLit, 1), $intern_37, 170, 0, [EDGES, PORTS, LABELS]))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.scaleFactor'), ''), 'Scale Factor'), "The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."), 1), DOUBLE), Ljava_lang_Double_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.childAreaWidth'), ''), 'Child Area Width'), 'The width of the area occupied by the laid out children of a node.'), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.childAreaHeight'), ''), 'Child Area Height'), 'The height of the area occupied by the laid out children of a node.'), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.topdownLayout'), ''), 'Topdown Layout'), "Turns topdown layout on and off. If this option is enabled, hierarchical layout will be computed first for the root node and then for its children recursively. Layouts are then scaled down to fit the area provided by their parents. Graphs must follow a certain structure for topdown layout to work properly. {@link TopdownNodeTypes.PARALLEL_NODE} nodes must have children of type {@link TopdownNodeTypes.HIERARCHICAL_NODE} and must define {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} for their children. Furthermore they need to be laid out using an algorithm that is a {@link TopdownLayoutProvider}. Hierarchical nodes can also be parents of other hierarchical nodes and can optionally use a {@link TopdownSizeApproximator} to dynamically set sizes during topdown layout. In this case {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} should be set on the node itself rather than the parent. The values are then used by the size approximator as base values. Hierarchical nodes require the layout option {@link nodeSize.fixedGraphSize} to be true to prevent the algorithm used there from resizing the hierarchical node. This option is not supported if 'Hierarchy Handling' is set to 'INCLUDE_CHILDREN'"), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.topdownLayout', 'org.eclipse.elk.topdown.nodeType', null); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.animate'), ''), 'Animate'), 'Whether the shift from the old layout to the new computed layout shall be animated.'), true), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.animTimeFactor'), ''), 'Animation Time Factor'), "Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."), valueOf_3(100)), INT), Ljava_lang_Integer_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.layoutAncestors'), ''), 'Layout Ancestors'), 'Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.maxAnimTime'), ''), 'Maximal Animation Time'), 'The maximal time for animations, in milliseconds.'), valueOf_3(4000)), INT), Ljava_lang_Integer_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.minAnimTime'), ''), 'Minimal Animation Time'), 'The minimal time for animations, in milliseconds.'), valueOf_3(400)), INT), Ljava_lang_Integer_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.progressBar'), ''), 'Progress Bar'), 'Whether a progress bar shall be displayed during layout computations.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.validateGraph'), ''), 'Validate Graph'), 'Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.validateOptions'), ''), 'Validate Options'), 'Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user.'), true), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.zoomToFit'), ''), 'Zoom to Fit'), 'Whether the zoom level shall be set to view the whole diagram after layout.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.box.packingMode'), 'box'), 'Box Layout Mode'), 'Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better.'), BOX_PACKING_MODE_DEFAULT), ENUM), Lorg_eclipse_elk_core_util_BoxLayoutProvider$PackingMode_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.spacing.commentComment'), 'spacing'), 'Comment Comment Spacing'), 'Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing.'), 10), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.spacing.commentNode'), 'spacing'), 'Comment Node Spacing'), 'Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing.'), 10), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.spacing.componentComponent'), 'spacing'), 'Components Spacing'), "Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."), 20), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.spacing.edgeEdge'), 'spacing'), 'Edge Spacing'), 'Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines.'), 10), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.spacing.edgeLabel'), 'spacing'), 'Edge Label Spacing'), "The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."), 2), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.spacing.edgeNode'), 'spacing'), 'Edge Node Spacing'), 'Spacing to be preserved between nodes and edges.'), 10), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.spacing.labelLabel'), 'spacing'), 'Label Spacing'), 'Determines the amount of space to be left between two labels of the same graph element.'), 0), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.spacing.labelNode'), 'spacing'), 'Label Node Spacing'), "Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."), 5), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.spacing.labelPortHorizontal'), 'spacing'), 'Horizontal spacing between Label and Port'), "Horizontal spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."), 1), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.spacing.labelPortVertical'), 'spacing'), 'Vertical spacing between Label and Port'), "Vertical spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."), 1), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.spacing.nodeNode'), 'spacing'), 'Node Spacing'), 'The minimal distance to be preserved between each two nodes.'), 20), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.spacing.nodeSelfLoop'), 'spacing'), 'Node Self Loop Spacing'), 'Spacing to be preserved between a node and its self loops.'), 10), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.spacing.portPort'), 'spacing'), 'Port Spacing'), 'Spacing between pairs of ports of the same node.'), 10), DOUBLE), Ljava_lang_Double_2_classLit), of_2(PARENTS, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_LayoutOptionData$Target_2_classLit, 1), $intern_37, 170, 0, [NODES]))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.spacing.individual'), 'spacing'), 'Individual Spacing'), "Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent."), OBJECT), Lorg_eclipse_elk_core_util_IndividualSpacings_2_classLit), of_2(NODES, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_LayoutOptionData$Target_2_classLit, 1), $intern_37, 170, 0, [EDGES, PORTS, LABELS]))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.spacing.portsSurrounding'), 'spacing'), 'Additional Port Space'), 'Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border.'), SPACING_PORTS_SURROUNDING_DEFAULT), OBJECT), Lorg_eclipse_elk_core_math_ElkMargin_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.partitioning.partition'), 'partitioning'), 'Layout Partition'), 'Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction).'), INT), Ljava_lang_Integer_2_classLit), of_2(PARENTS, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_LayoutOptionData$Target_2_classLit, 1), $intern_37, 170, 0, [NODES]))))); $addDependency(registry, 'org.eclipse.elk.partitioning.partition', 'org.eclipse.elk.partitioning.activate', PARTITIONING_PARTITION_DEP_PARTITIONING_ACTIVATE_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.partitioning.activate'), 'partitioning'), 'Layout Partitioning'), 'Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle.'), PARTITIONING_ACTIVATE_DEFAULT), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.nodeLabels.padding'), 'nodeLabels'), 'Node Label Padding'), 'Define padding for node labels that are placed inside of a node.'), NODE_LABELS_PADDING_DEFAULT), OBJECT), Lorg_eclipse_elk_core_math_ElkPadding_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.nodeLabels.placement'), 'nodeLabels'), 'Node Label Placement'), "Hints for where node labels are to be placed; if empty, the node label's position is not modified."), NODE_LABELS_PLACEMENT_DEFAULT), ENUMSET), Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit), of_2(NODES, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_LayoutOptionData$Target_2_classLit, 1), $intern_37, 170, 0, [LABELS]))))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.portAlignment.default'), 'portAlignment'), 'Port Alignment'), 'Defines the default port distribution for a node. May be overridden for each side individually.'), PORT_ALIGNMENT_DEFAULT_DEFAULT_0), ENUM), Lorg_eclipse_elk_core_options_PortAlignment_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.portAlignment.north'), 'portAlignment'), 'Port Alignment (North)'), "Defines how ports on the northern side are placed, overriding the node's general port alignment."), ENUM), Lorg_eclipse_elk_core_options_PortAlignment_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.portAlignment.south'), 'portAlignment'), 'Port Alignment (South)'), "Defines how ports on the southern side are placed, overriding the node's general port alignment."), ENUM), Lorg_eclipse_elk_core_options_PortAlignment_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.portAlignment.west'), 'portAlignment'), 'Port Alignment (West)'), "Defines how ports on the western side are placed, overriding the node's general port alignment."), ENUM), Lorg_eclipse_elk_core_options_PortAlignment_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.portAlignment.east'), 'portAlignment'), 'Port Alignment (East)'), "Defines how ports on the eastern side are placed, overriding the node's general port alignment."), ENUM), Lorg_eclipse_elk_core_options_PortAlignment_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.nodeSize.constraints'), 'nodeSize'), 'Node Size Constraints'), "What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed."), NODE_SIZE_CONSTRAINTS_DEFAULT), ENUMSET), Lorg_eclipse_elk_core_options_SizeConstraint_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.nodeSize.options'), 'nodeSize'), 'Node Size Options'), 'Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications.'), NODE_SIZE_OPTIONS_DEFAULT), ENUMSET), Lorg_eclipse_elk_core_options_SizeOptions_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.nodeSize.minimum'), 'nodeSize'), 'Node Size Minimum'), 'The minimal size to which a node can be reduced.'), NODE_SIZE_MINIMUM_DEFAULT), OBJECT), Lorg_eclipse_elk_core_math_KVector_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.nodeSize.fixedGraphSize'), 'nodeSize'), 'Fixed Graph Size'), "By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so."), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(PARENTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.edgeLabels.placement'), 'edgeLabels'), 'Edge Label Placement'), 'Gives a hint on where to put edge labels.'), EDGE_LABELS_PLACEMENT_DEFAULT), ENUM), Lorg_eclipse_elk_core_options_EdgeLabelPlacement_2_classLit), of_1(LABELS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.edgeLabels.inline'), 'edgeLabels'), 'Inline Edge Labels'), "If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(LABELS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.font.name'), 'font'), 'Font Name'), 'Font name used for a label.'), STRING), Ljava_lang_String_2_classLit), of_1(LABELS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.font.size'), 'font'), 'Font Size'), 'Font size used for a label.'), INT), Ljava_lang_Integer_2_classLit), of_1(LABELS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.port.anchor'), 'port'), 'Port Anchor Offset'), 'The offset to the port position where connections shall be attached.'), OBJECT), Lorg_eclipse_elk_core_math_KVector_2_classLit), of_1(PORTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.port.index'), 'port'), 'Port Index'), "The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."), INT), Ljava_lang_Integer_2_classLit), of_1(PORTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.port.side'), 'port'), 'Port Side'), "The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."), PORT_SIDE_DEFAULT), ENUM), Lorg_eclipse_elk_core_options_PortSide_2_classLit), of_1(PORTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.port.borderOffset'), 'port'), 'Port Border Offset'), "The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PORTS)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.portLabels.placement'), 'portLabels'), 'Port Label Placement'), "Decides on a placement method for port labels; if empty, the node label's position is not modified."), PORT_LABELS_PLACEMENT_DEFAULT), ENUMSET), Lorg_eclipse_elk_core_options_PortLabelPlacement_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.portLabels.nextToPortIfPossible'), 'portLabels'), 'Port Labels Next to Port'), "Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE."), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.portLabels.treatAsGroup'), 'portLabels'), 'Treat Port Labels as Group'), 'If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port.'), true), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.topdown.scaleFactor'), 'topdown'), 'Topdown Scale Factor'), "The scaling factor to be applied to the nodes laid out within the node in recursive topdown layout. The difference to 'Scale Factor' is that the node itself is not scaled. This value has to be set on hierarchical nodes."), 1), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.topdown.scaleFactor', 'org.eclipse.elk.topdown.nodeType', TOPDOWN_SCALE_FACTOR_DEP_TOPDOWN_NODE_TYPE_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.topdown.sizeApproximator'), 'topdown'), 'Topdown Size Approximator'), 'The size approximator to be used to set sizes of hierarchical nodes during topdown layout. The default value is null, which results in nodes keeping whatever size is defined for them e.g. through parent parallel node or by manually setting the size.'), null), ENUM), Lorg_eclipse_elk_core_options_TopdownSizeApproximator_2_classLit), of_1(NODES)))); $addDependency(registry, 'org.eclipse.elk.topdown.sizeApproximator', 'org.eclipse.elk.topdown.nodeType', TOPDOWN_SIZE_APPROXIMATOR_DEP_TOPDOWN_NODE_TYPE_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.topdown.hierarchicalNodeWidth'), 'topdown'), 'Topdown Hierarchical Node Width'), 'The fixed size of a hierarchical node when using topdown layout. If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself.'), 150), DOUBLE), Ljava_lang_Double_2_classLit), of_2(PARENTS, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_LayoutOptionData$Target_2_classLit, 1), $intern_37, 170, 0, [NODES]))))); $addDependency(registry, 'org.eclipse.elk.topdown.hierarchicalNodeWidth', 'org.eclipse.elk.topdown.nodeType', null); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.topdown.hierarchicalNodeAspectRatio'), 'topdown'), 'Topdown Hierarchical Node Aspect Ratio'), 'The fixed aspect ratio of a hierarchical node when using topdown layout. Default is 1/sqrt(2). If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself.'), 1.414), DOUBLE), Ljava_lang_Double_2_classLit), of_2(PARENTS, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_LayoutOptionData$Target_2_classLit, 1), $intern_37, 170, 0, [NODES]))))); $addDependency(registry, 'org.eclipse.elk.topdown.hierarchicalNodeAspectRatio', 'org.eclipse.elk.topdown.nodeType', null); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.topdown.nodeType'), 'topdown'), 'Topdown Node Type'), 'The different node types used for topdown layout. If the node type is set to {@link TopdownNodeTypes.PARALLEL_NODE} the algorithm must be set to a {@link TopdownLayoutProvider} such as {@link TopdownPacking}. The {@link nodeSize.fixedGraphSize} option is technically only required for hierarchical nodes.'), null), ENUM), Lorg_eclipse_elk_core_options_TopdownNodeTypes_2_classLit), of_1(NODES)))); $addDependency(registry, 'org.eclipse.elk.topdown.nodeType', 'org.eclipse.elk.nodeSize.fixedGraphSize', null); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.topdown.scaleCap'), 'topdown'), 'Topdown Scale Cap'), 'Determines the upper limit for the topdown scale factor. The default value is 1.0 which ensures that nested children never end up appearing larger than their parents in terms of unit sizes such as the font size. If the limit is larger, nodes will fully utilize the available space, but it is counteriniuitive for inner nodes to have a larger scale than outer nodes.'), 1), DOUBLE), Ljava_lang_Double_2_classLit), of_1(PARENTS)))); $addDependency(registry, 'org.eclipse.elk.topdown.scaleCap', 'org.eclipse.elk.topdown.nodeType', TOPDOWN_SCALE_CAP_DEP_TOPDOWN_NODE_TYPE_0); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.insideSelfLoops.activate'), 'insideSelfLoops'), 'Activate Inside Self Loops'), "Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(NODES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.insideSelfLoops.yo'), 'insideSelfLoops'), 'Inside Self Loop'), 'Whether a self loop should be routed inside a node instead of around that node.'), false), BOOLEAN), Ljava_lang_Boolean_2_classLit), of_1(EDGES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.edge.thickness'), 'edge'), 'Edge Thickness'), 'The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it.'), 1), DOUBLE), Ljava_lang_Double_2_classLit), of_1(EDGES)))); $register_1(registry, new LayoutOptionData($targets($optionClass($type($defaultValue($description_1($name_2($group($id_1(new LayoutOptionData$Builder, 'org.eclipse.elk.edge.type'), 'edge'), 'Edge Type'), 'The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations.'), EDGE_TYPE_DEFAULT), ENUM), Lorg_eclipse_elk_core_options_EdgeType_2_classLit), of_1(EDGES)))); $register_0(registry, new LayoutCategoryData($description_0($name_1($id_0(new LayoutCategoryData$Builder, 'org.eclipse.elk.layered'), 'Layered'), 'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.'))); $register_0(registry, new LayoutCategoryData($description_0($name_1($id_0(new LayoutCategoryData$Builder, 'org.eclipse.elk.orthogonal'), 'Orthogonal'), 'Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia \'86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.'))); $register_0(registry, new LayoutCategoryData($description_0($name_1($id_0(new LayoutCategoryData$Builder, 'org.eclipse.elk.force'), 'Force'), 'Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984.'))); $register_0(registry, new LayoutCategoryData($description_0($name_1($id_0(new LayoutCategoryData$Builder, 'org.eclipse.elk.circle'), 'Circle'), 'Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph.'))); $register_0(registry, new LayoutCategoryData($description_0($name_1($id_0(new LayoutCategoryData$Builder, 'org.eclipse.elk.tree'), 'Tree'), 'Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type.'))); $register_0(registry, new LayoutCategoryData($description_0($name_1($id_0(new LayoutCategoryData$Builder, 'org.eclipse.elk.planar'), 'Planar'), 'Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable.'))); $register_0(registry, new LayoutCategoryData($description_0($name_1($id_0(new LayoutCategoryData$Builder, 'org.eclipse.elk.radial'), 'Radial'), 'Radial layout algorithms usually position the nodes of the graph on concentric circles.'))); $apply_25((new FixedLayouterOptions , registry)); $apply_24((new BoxLayouterOptions , registry)); $apply_26((new RandomLayouterOptions , registry)); } ; var ALGORITHM, ALIGNMENT_0, ALIGNMENT_DEFAULT, ASPECT_RATIO_5, BEND_POINTS, BOX_PACKING_MODE_0, BOX_PACKING_MODE_DEFAULT, CHILD_AREA_HEIGHT, CHILD_AREA_WIDTH, COMMENT_BOX_0, CONTENT_ALIGNMENT_2, CONTENT_ALIGNMENT_DEFAULT, DEBUG_MODE_3, DIRECTION_1, DIRECTION_DEFAULT_1, EDGE_LABELS_INLINE_1, EDGE_LABELS_PLACEMENT_0, EDGE_LABELS_PLACEMENT_DEFAULT, EDGE_ROUTING_0, EDGE_ROUTING_DEFAULT_0, EDGE_THICKNESS_1, EDGE_TYPE_DEFAULT, EXPAND_NODES_0, HIERARCHY_HANDLING_0, HIERARCHY_HANDLING_DEFAULT, HYPERNODE_0, INSIDE_SELF_LOOPS_ACTIVATE_0, INSIDE_SELF_LOOPS_YO_0, INTERACTIVE_8, INTERACTIVE_LAYOUT_2, JUNCTION_POINTS_0, JUNCTION_POINTS_DEFAULT, MARGINS_0, MARGINS_DEFAULT, NODE_LABELS_PADDING_0, NODE_LABELS_PADDING_DEFAULT, NODE_LABELS_PLACEMENT_5, NODE_LABELS_PLACEMENT_DEFAULT, NODE_SIZE_CONSTRAINTS_6, NODE_SIZE_CONSTRAINTS_DEFAULT, NODE_SIZE_FIXED_GRAPH_SIZE_3, NODE_SIZE_MINIMUM_5, NODE_SIZE_MINIMUM_DEFAULT, NODE_SIZE_OPTIONS_6, NODE_SIZE_OPTIONS_DEFAULT, NO_LAYOUT_0, OMIT_NODE_MICRO_LAYOUT_4, PADDING_6, PADDING_DEFAULT_6, PARTITIONING_ACTIVATE_0, PARTITIONING_ACTIVATE_DEFAULT, PARTITIONING_PARTITION_0, PARTITIONING_PARTITION_DEP_PARTITIONING_ACTIVATE_0, PORT_ALIGNMENT_DEFAULT, PORT_ALIGNMENT_DEFAULT_DEFAULT_0, PORT_ALIGNMENT_EAST_0, PORT_ALIGNMENT_NORTH_0, PORT_ALIGNMENT_SOUTH_0, PORT_ALIGNMENT_WEST_0, PORT_ANCHOR_0, PORT_BORDER_OFFSET_0, PORT_CONSTRAINTS_1, PORT_CONSTRAINTS_DEFAULT, PORT_INDEX_0, PORT_LABELS_NEXT_TO_PORT_IF_POSSIBLE_0, PORT_LABELS_PLACEMENT_5, PORT_LABELS_PLACEMENT_DEFAULT, PORT_LABELS_TREAT_AS_GROUP_0, PORT_SIDE_0, PORT_SIDE_DEFAULT, POSITION_2, PRIORITY_3, RANDOM_SEED_1, RESOLVED_ALGORITHM, SCALE_FACTOR, SEPARATE_CONNECTED_COMPONENTS_2, SPACING_COMMENT_COMMENT_0, SPACING_COMMENT_NODE_0, SPACING_COMPONENT_COMPONENT_1, SPACING_EDGE_EDGE_0, SPACING_EDGE_LABEL_1, SPACING_EDGE_NODE_1, SPACING_INDIVIDUAL_0, SPACING_LABEL_LABEL_0, SPACING_LABEL_NODE_0, SPACING_LABEL_PORT_HORIZONTAL_0, SPACING_LABEL_PORT_VERTICAL_0, SPACING_NODE_NODE_6, SPACING_NODE_SELF_LOOP_0, SPACING_PORTS_SURROUNDING_0, SPACING_PORTS_SURROUNDING_DEFAULT, SPACING_PORT_PORT_0, TOPDOWN_HIERARCHICAL_NODE_ASPECT_RATIO_2, TOPDOWN_HIERARCHICAL_NODE_WIDTH_2, TOPDOWN_LAYOUT_2, TOPDOWN_NODE_TYPE, TOPDOWN_SCALE_CAP, TOPDOWN_SCALE_CAP_DEP_TOPDOWN_NODE_TYPE_0, TOPDOWN_SCALE_FACTOR_2, TOPDOWN_SCALE_FACTOR_DEP_TOPDOWN_NODE_TYPE_0, TOPDOWN_SIZE_APPROXIMATOR, TOPDOWN_SIZE_APPROXIMATOR_DEP_TOPDOWN_NODE_TYPE_0; var Lorg_eclipse_elk_core_options_CoreOptions_2_classLit = createForClass('org.eclipse.elk.core.options', 'CoreOptions', 699); function $clinit_Direction_0(){ $clinit_Direction_0 = emptyMethod; UNDEFINED_2 = new Direction_0('UNDEFINED', 0); RIGHT_6 = new Direction_0('RIGHT', 1); LEFT_6 = new Direction_0('LEFT', 2); DOWN_1 = new Direction_0('DOWN', 3); UP_1 = new Direction_0('UP', 4); } function $isHorizontal(this$static){ return this$static == LEFT_6 || this$static == RIGHT_6; } function $isVertical(this$static){ return this$static == UP_1 || this$static == DOWN_1; } function $opposite(this$static){ switch (this$static.ordinal) { case 2: return RIGHT_6; case 1: return LEFT_6; case 4: return DOWN_1; case 3: return UP_1; default:return UNDEFINED_2; } } function Direction_0(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_100(name_0){ $clinit_Direction_0(); return valueOf(($clinit_Direction$Map_0() , $MAP_90), name_0); } function values_108(){ $clinit_Direction_0(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_Direction_2_classLit, 1), $intern_37, 88, 0, [UNDEFINED_2, RIGHT_6, LEFT_6, DOWN_1, UP_1]); } defineClass(88, 22, {3:1, 34:1, 22:1, 88:1}, Direction_0); var DOWN_1, LEFT_6, RIGHT_6, UNDEFINED_2, UP_1; var Lorg_eclipse_elk_core_options_Direction_2_classLit = createForEnum('org.eclipse.elk.core.options', 'Direction', 88, Ljava_lang_Enum_2_classLit, values_108, valueOf_100); function $clinit_Direction$Map_0(){ $clinit_Direction$Map_0 = emptyMethod; $MAP_90 = createValueOfMap(($clinit_Direction_0() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_Direction_2_classLit, 1), $intern_37, 88, 0, [UNDEFINED_2, RIGHT_6, LEFT_6, DOWN_1, UP_1]))); } var $MAP_90; function $clinit_EdgeLabelPlacement(){ $clinit_EdgeLabelPlacement = emptyMethod; CENTER_5 = new EdgeLabelPlacement('CENTER', 0); HEAD = new EdgeLabelPlacement('HEAD', 1); TAIL = new EdgeLabelPlacement('TAIL', 2); } function EdgeLabelPlacement(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_101(name_0){ $clinit_EdgeLabelPlacement(); return valueOf(($clinit_EdgeLabelPlacement$Map() , $MAP_91), name_0); } function values_109(){ $clinit_EdgeLabelPlacement(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_EdgeLabelPlacement_2_classLit, 1), $intern_37, 278, 0, [CENTER_5, HEAD, TAIL]); } defineClass(278, 22, {3:1, 34:1, 22:1, 278:1}, EdgeLabelPlacement); var CENTER_5, HEAD, TAIL; var Lorg_eclipse_elk_core_options_EdgeLabelPlacement_2_classLit = createForEnum('org.eclipse.elk.core.options', 'EdgeLabelPlacement', 278, Ljava_lang_Enum_2_classLit, values_109, valueOf_101); function $clinit_EdgeLabelPlacement$Map(){ $clinit_EdgeLabelPlacement$Map = emptyMethod; $MAP_91 = createValueOfMap(($clinit_EdgeLabelPlacement() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_EdgeLabelPlacement_2_classLit, 1), $intern_37, 278, 0, [CENTER_5, HEAD, TAIL]))); } var $MAP_91; function $clinit_EdgeRouting(){ $clinit_EdgeRouting = emptyMethod; UNDEFINED_3 = new EdgeRouting('UNDEFINED', 0); POLYLINE = new EdgeRouting('POLYLINE', 1); ORTHOGONAL = new EdgeRouting('ORTHOGONAL', 2); SPLINES = new EdgeRouting('SPLINES', 3); } function EdgeRouting(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_102(name_0){ $clinit_EdgeRouting(); return valueOf(($clinit_EdgeRouting$Map() , $MAP_92), name_0); } function values_110(){ $clinit_EdgeRouting(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_EdgeRouting_2_classLit, 1), $intern_37, 223, 0, [UNDEFINED_3, POLYLINE, ORTHOGONAL, SPLINES]); } defineClass(223, 22, {3:1, 34:1, 22:1, 223:1}, EdgeRouting); var ORTHOGONAL, POLYLINE, SPLINES, UNDEFINED_3; var Lorg_eclipse_elk_core_options_EdgeRouting_2_classLit = createForEnum('org.eclipse.elk.core.options', 'EdgeRouting', 223, Ljava_lang_Enum_2_classLit, values_110, valueOf_102); function $clinit_EdgeRouting$Map(){ $clinit_EdgeRouting$Map = emptyMethod; $MAP_92 = createValueOfMap(($clinit_EdgeRouting() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_EdgeRouting_2_classLit, 1), $intern_37, 223, 0, [UNDEFINED_3, POLYLINE, ORTHOGONAL, SPLINES]))); } var $MAP_92; function $clinit_EdgeType(){ $clinit_EdgeType = emptyMethod; NONE_16 = new EdgeType('NONE', 0); DIRECTED = new EdgeType('DIRECTED', 1); UNDIRECTED = new EdgeType('UNDIRECTED', 2); ASSOCIATION = new EdgeType('ASSOCIATION', 3); GENERALIZATION = new EdgeType('GENERALIZATION', 4); DEPENDENCY = new EdgeType('DEPENDENCY', 5); } function EdgeType(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_103(name_0){ $clinit_EdgeType(); return valueOf(($clinit_EdgeType$Map() , $MAP_93), name_0); } function values_111(){ $clinit_EdgeType(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_EdgeType_2_classLit, 1), $intern_37, 321, 0, [NONE_16, DIRECTED, UNDIRECTED, ASSOCIATION, GENERALIZATION, DEPENDENCY]); } defineClass(321, 22, {3:1, 34:1, 22:1, 321:1}, EdgeType); var ASSOCIATION, DEPENDENCY, DIRECTED, GENERALIZATION, NONE_16, UNDIRECTED; var Lorg_eclipse_elk_core_options_EdgeType_2_classLit = createForEnum('org.eclipse.elk.core.options', 'EdgeType', 321, Ljava_lang_Enum_2_classLit, values_111, valueOf_103); function $clinit_EdgeType$Map(){ $clinit_EdgeType$Map = emptyMethod; $MAP_93 = createValueOfMap(($clinit_EdgeType() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_EdgeType_2_classLit, 1), $intern_37, 321, 0, [NONE_16, DIRECTED, UNDIRECTED, ASSOCIATION, GENERALIZATION, DEPENDENCY]))); } var $MAP_93; function $clinit_FixedLayouterOptions(){ $clinit_FixedLayouterOptions = emptyMethod; PADDING_DEFAULT_7 = new ElkPadding_0(15); PADDING_7 = new Property_2(($clinit_CoreOptions() , PADDING_6), PADDING_DEFAULT_7); POSITION_3 = POSITION_2; BEND_POINTS_0 = BEND_POINTS; NODE_SIZE_CONSTRAINTS_7 = NODE_SIZE_CONSTRAINTS_6; NODE_SIZE_MINIMUM_6 = NODE_SIZE_MINIMUM_5; NODE_SIZE_FIXED_GRAPH_SIZE_4 = NODE_SIZE_FIXED_GRAPH_SIZE_3; } function $apply_25(registry){ $register(registry, new LayoutAlgorithmData($providerFactory($description($name_0($id(new LayoutAlgorithmData$Builder, 'org.eclipse.elk.fixed'), 'ELK Fixed'), 'Keeps the current layout as it is, without any automatic modification. Optional coordinates can be given for nodes and edge bend points.'), new FixedLayouterOptions$FixedFactory))); $addOptionSupport(registry, 'org.eclipse.elk.fixed', 'org.eclipse.elk.padding', PADDING_DEFAULT_7); $addOptionSupport(registry, 'org.eclipse.elk.fixed', 'org.eclipse.elk.position', $getDefault(POSITION_3)); $addOptionSupport(registry, 'org.eclipse.elk.fixed', 'org.eclipse.elk.bendPoints', $getDefault(BEND_POINTS_0)); $addOptionSupport(registry, 'org.eclipse.elk.fixed', 'org.eclipse.elk.nodeSize.constraints', $getDefault(NODE_SIZE_CONSTRAINTS_7)); $addOptionSupport(registry, 'org.eclipse.elk.fixed', 'org.eclipse.elk.nodeSize.minimum', $getDefault(NODE_SIZE_MINIMUM_6)); $addOptionSupport(registry, 'org.eclipse.elk.fixed', 'org.eclipse.elk.nodeSize.fixedGraphSize', $getDefault(NODE_SIZE_FIXED_GRAPH_SIZE_4)); } function FixedLayouterOptions(){ $clinit_FixedLayouterOptions(); } defineClass(989, 1, $intern_90, FixedLayouterOptions); _.apply_4 = function apply_177(registry){ $apply_25(registry); } ; var BEND_POINTS_0, NODE_SIZE_CONSTRAINTS_7, NODE_SIZE_FIXED_GRAPH_SIZE_4, NODE_SIZE_MINIMUM_6, PADDING_7, PADDING_DEFAULT_7, POSITION_3; var Lorg_eclipse_elk_core_options_FixedLayouterOptions_2_classLit = createForClass('org.eclipse.elk.core.options', 'FixedLayouterOptions', 989); function FixedLayouterOptions$FixedFactory(){ } defineClass(990, 1, {}, FixedLayouterOptions$FixedFactory); _.create_0 = function create_45(){ var provider; return provider = new FixedLayoutProvider , provider; } ; _.destroy = function destroy_9(obj){ } ; var Lorg_eclipse_elk_core_options_FixedLayouterOptions$FixedFactory_2_classLit = createForClass('org.eclipse.elk.core.options', 'FixedLayouterOptions/FixedFactory', 990); function $clinit_HierarchyHandling(){ $clinit_HierarchyHandling = emptyMethod; INHERIT = new HierarchyHandling('INHERIT', 0); INCLUDE_CHILDREN = new HierarchyHandling('INCLUDE_CHILDREN', 1); SEPARATE_CHILDREN = new HierarchyHandling('SEPARATE_CHILDREN', 2); } function HierarchyHandling(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_104(name_0){ $clinit_HierarchyHandling(); return valueOf(($clinit_HierarchyHandling$Map() , $MAP_94), name_0); } function values_112(){ $clinit_HierarchyHandling(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_HierarchyHandling_2_classLit, 1), $intern_37, 346, 0, [INHERIT, INCLUDE_CHILDREN, SEPARATE_CHILDREN]); } defineClass(346, 22, {3:1, 34:1, 22:1, 346:1}, HierarchyHandling); var INCLUDE_CHILDREN, INHERIT, SEPARATE_CHILDREN; var Lorg_eclipse_elk_core_options_HierarchyHandling_2_classLit = createForEnum('org.eclipse.elk.core.options', 'HierarchyHandling', 346, Ljava_lang_Enum_2_classLit, values_112, valueOf_104); function $clinit_HierarchyHandling$Map(){ $clinit_HierarchyHandling$Map = emptyMethod; $MAP_94 = createValueOfMap(($clinit_HierarchyHandling() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_HierarchyHandling_2_classLit, 1), $intern_37, 346, 0, [INHERIT, INCLUDE_CHILDREN, SEPARATE_CHILDREN]))); } var $MAP_94; function $clinit_LabelSide(){ $clinit_LabelSide = emptyMethod; UNKNOWN = new LabelSide('UNKNOWN', 0); ABOVE = new LabelSide('ABOVE', 1); BELOW = new LabelSide('BELOW', 2); INLINE = new LabelSide('INLINE', 3); new Property_0('org.eclipse.elk.labelSide', UNKNOWN); } function $opposite_0(this$static){ switch (this$static.ordinal) { case 1: return BELOW; case 2: return ABOVE; case 3: return INLINE; default:return UNKNOWN; } } function LabelSide(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_105(name_0){ $clinit_LabelSide(); return valueOf(($clinit_LabelSide$Map() , $MAP_95), name_0); } function values_113(){ $clinit_LabelSide(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_LabelSide_2_classLit, 1), $intern_37, 291, 0, [UNKNOWN, ABOVE, BELOW, INLINE]); } defineClass(291, 22, {3:1, 34:1, 22:1, 291:1}, LabelSide); var ABOVE, BELOW, INLINE, UNKNOWN; var Lorg_eclipse_elk_core_options_LabelSide_2_classLit = createForEnum('org.eclipse.elk.core.options', 'LabelSide', 291, Ljava_lang_Enum_2_classLit, values_113, valueOf_105); function $clinit_LabelSide$Map(){ $clinit_LabelSide$Map = emptyMethod; $MAP_95 = createValueOfMap(($clinit_LabelSide() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_LabelSide_2_classLit, 1), $intern_37, 291, 0, [UNKNOWN, ABOVE, BELOW, INLINE]))); } var $MAP_95; function $clinit_NodeLabelPlacement(){ $clinit_NodeLabelPlacement = emptyMethod; H_LEFT_0 = new NodeLabelPlacement('H_LEFT', 0); H_CENTER_0 = new NodeLabelPlacement('H_CENTER', 1); H_RIGHT_0 = new NodeLabelPlacement('H_RIGHT', 2); V_TOP_0 = new NodeLabelPlacement('V_TOP', 3); V_CENTER_0 = new NodeLabelPlacement('V_CENTER', 4); V_BOTTOM_0 = new NodeLabelPlacement('V_BOTTOM', 5); INSIDE = new NodeLabelPlacement('INSIDE', 6); OUTSIDE = new NodeLabelPlacement('OUTSIDE', 7); H_PRIORITY = new NodeLabelPlacement('H_PRIORITY', 8); } function NodeLabelPlacement(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function isValid_0(placement){ $clinit_NodeLabelPlacement(); var validHorizontal, validInsideOutside, validVertical; validInsideOutside = of_2(INSIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [OUTSIDE])); if ($size_1(intersection_0(validInsideOutside, placement)) > 1) { return false; } validHorizontal = of_2(H_LEFT_0, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [H_CENTER_0, H_RIGHT_0])); if ($size_1(intersection_0(validHorizontal, placement)) > 1) { return false; } validVertical = of_2(V_TOP_0, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [V_CENTER_0, V_BOTTOM_0])); if ($size_1(intersection_0(validVertical, placement)) > 1) { return false; } return true; } function valueOf_106(name_0){ $clinit_NodeLabelPlacement(); return valueOf(($clinit_NodeLabelPlacement$Map() , $MAP_96), name_0); } function values_114(){ $clinit_NodeLabelPlacement(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [H_LEFT_0, H_CENTER_0, H_RIGHT_0, V_TOP_0, V_CENTER_0, V_BOTTOM_0, INSIDE, OUTSIDE, H_PRIORITY]); } defineClass(95, 22, {3:1, 34:1, 22:1, 95:1}, NodeLabelPlacement); var H_CENTER_0, H_LEFT_0, H_PRIORITY, H_RIGHT_0, INSIDE, OUTSIDE, V_BOTTOM_0, V_CENTER_0, V_TOP_0; var Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit = createForEnum('org.eclipse.elk.core.options', 'NodeLabelPlacement', 95, Ljava_lang_Enum_2_classLit, values_114, valueOf_106); function $clinit_NodeLabelPlacement$Map(){ $clinit_NodeLabelPlacement$Map = emptyMethod; $MAP_96 = createValueOfMap(($clinit_NodeLabelPlacement() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_NodeLabelPlacement_2_classLit, 1), $intern_37, 95, 0, [H_LEFT_0, H_CENTER_0, H_RIGHT_0, V_TOP_0, V_CENTER_0, V_BOTTOM_0, INSIDE, OUTSIDE, H_PRIORITY]))); } var $MAP_96; function $clinit_PortAlignment(){ $clinit_PortAlignment = emptyMethod; DISTRIBUTED = new PortAlignment('DISTRIBUTED', 0); JUSTIFIED = new PortAlignment('JUSTIFIED', 1); BEGIN_0 = new PortAlignment('BEGIN', 2); CENTER_6 = new PortAlignment('CENTER', 3); END_1 = new PortAlignment('END', 4); } function PortAlignment(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_107(name_0){ $clinit_PortAlignment(); return valueOf(($clinit_PortAlignment$Map() , $MAP_97), name_0); } function values_115(){ $clinit_PortAlignment(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortAlignment_2_classLit, 1), $intern_37, 256, 0, [DISTRIBUTED, JUSTIFIED, BEGIN_0, CENTER_6, END_1]); } defineClass(256, 22, {3:1, 34:1, 22:1, 256:1}, PortAlignment); var BEGIN_0, CENTER_6, DISTRIBUTED, END_1, JUSTIFIED; var Lorg_eclipse_elk_core_options_PortAlignment_2_classLit = createForEnum('org.eclipse.elk.core.options', 'PortAlignment', 256, Ljava_lang_Enum_2_classLit, values_115, valueOf_107); function $clinit_PortAlignment$Map(){ $clinit_PortAlignment$Map = emptyMethod; $MAP_97 = createValueOfMap(($clinit_PortAlignment() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortAlignment_2_classLit, 1), $intern_37, 256, 0, [DISTRIBUTED, JUSTIFIED, BEGIN_0, CENTER_6, END_1]))); } var $MAP_97; function $clinit_PortConstraints(){ $clinit_PortConstraints = emptyMethod; UNDEFINED_4 = new PortConstraints('UNDEFINED', 0); FREE = new PortConstraints('FREE', 1); FIXED_SIDE = new PortConstraints('FIXED_SIDE', 2); FIXED_ORDER = new PortConstraints('FIXED_ORDER', 3); FIXED_RATIO = new PortConstraints('FIXED_RATIO', 4); FIXED_POS = new PortConstraints('FIXED_POS', 5); } function $isOrderFixed(this$static){ return this$static == FIXED_ORDER || this$static == FIXED_RATIO || this$static == FIXED_POS; } function $isSideFixed(this$static){ return this$static != FREE && this$static != UNDEFINED_4; } function PortConstraints(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_108(name_0){ $clinit_PortConstraints(); return valueOf(($clinit_PortConstraints$Map() , $MAP_98), name_0); } function values_116(){ $clinit_PortConstraints(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortConstraints_2_classLit, 1), $intern_37, 101, 0, [UNDEFINED_4, FREE, FIXED_SIDE, FIXED_ORDER, FIXED_RATIO, FIXED_POS]); } defineClass(101, 22, {3:1, 34:1, 22:1, 101:1}, PortConstraints); var FIXED_ORDER, FIXED_POS, FIXED_RATIO, FIXED_SIDE, FREE, UNDEFINED_4; var Lorg_eclipse_elk_core_options_PortConstraints_2_classLit = createForEnum('org.eclipse.elk.core.options', 'PortConstraints', 101, Ljava_lang_Enum_2_classLit, values_116, valueOf_108); function $clinit_PortConstraints$Map(){ $clinit_PortConstraints$Map = emptyMethod; $MAP_98 = createValueOfMap(($clinit_PortConstraints() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortConstraints_2_classLit, 1), $intern_37, 101, 0, [UNDEFINED_4, FREE, FIXED_SIDE, FIXED_ORDER, FIXED_RATIO, FIXED_POS]))); } var $MAP_98; function $clinit_PortLabelPlacement(){ $clinit_PortLabelPlacement = emptyMethod; OUTSIDE_0 = new PortLabelPlacement('OUTSIDE', 0); INSIDE_0 = new PortLabelPlacement('INSIDE', 1); NEXT_TO_PORT_IF_POSSIBLE_0 = new PortLabelPlacement('NEXT_TO_PORT_IF_POSSIBLE', 2); ALWAYS_SAME_SIDE = new PortLabelPlacement('ALWAYS_SAME_SIDE', 3); ALWAYS_OTHER_SAME_SIDE = new PortLabelPlacement('ALWAYS_OTHER_SAME_SIDE', 4); SPACE_EFFICIENT_0 = new PortLabelPlacement('SPACE_EFFICIENT', 5); } function PortLabelPlacement(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function isFixed(placement){ $clinit_PortLabelPlacement(); return !placement.contains(INSIDE_0) && !placement.contains(OUTSIDE_0); } function isValid_1(placement){ $clinit_PortLabelPlacement(); var validInsideOutside, validPosition; validInsideOutside = of_2(INSIDE_0, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortLabelPlacement_2_classLit, 1), $intern_37, 279, 0, [OUTSIDE_0])); if ($size_1(intersection_0(validInsideOutside, placement)) > 1) { return false; } validPosition = of_2(ALWAYS_SAME_SIDE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortLabelPlacement_2_classLit, 1), $intern_37, 279, 0, [ALWAYS_OTHER_SAME_SIDE, SPACE_EFFICIENT_0])); if ($size_1(intersection_0(validPosition, placement)) > 1) { return false; } return true; } function valueOf_109(name_0){ $clinit_PortLabelPlacement(); return valueOf(($clinit_PortLabelPlacement$Map() , $MAP_99), name_0); } function values_117(){ $clinit_PortLabelPlacement(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortLabelPlacement_2_classLit, 1), $intern_37, 279, 0, [OUTSIDE_0, INSIDE_0, NEXT_TO_PORT_IF_POSSIBLE_0, ALWAYS_SAME_SIDE, ALWAYS_OTHER_SAME_SIDE, SPACE_EFFICIENT_0]); } defineClass(279, 22, {3:1, 34:1, 22:1, 279:1}, PortLabelPlacement); var ALWAYS_OTHER_SAME_SIDE, ALWAYS_SAME_SIDE, INSIDE_0, NEXT_TO_PORT_IF_POSSIBLE_0, OUTSIDE_0, SPACE_EFFICIENT_0; var Lorg_eclipse_elk_core_options_PortLabelPlacement_2_classLit = createForEnum('org.eclipse.elk.core.options', 'PortLabelPlacement', 279, Ljava_lang_Enum_2_classLit, values_117, valueOf_109); function $clinit_PortLabelPlacement$Map(){ $clinit_PortLabelPlacement$Map = emptyMethod; $MAP_99 = createValueOfMap(($clinit_PortLabelPlacement() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortLabelPlacement_2_classLit, 1), $intern_37, 279, 0, [OUTSIDE_0, INSIDE_0, NEXT_TO_PORT_IF_POSSIBLE_0, ALWAYS_SAME_SIDE, ALWAYS_OTHER_SAME_SIDE, SPACE_EFFICIENT_0]))); } var $MAP_99; function $clinit_PortSide(){ $clinit_PortSide = emptyMethod; var all; UNDEFINED_5 = new PortSide('UNDEFINED', 0); NORTH_3 = new PortSide('NORTH', 1); EAST_2 = new PortSide('EAST', 2); SOUTH_2 = new PortSide('SOUTH', 3); WEST_2 = new PortSide('WEST', 4); SIDES_NONE = ($clinit_Collections() , new Collections$UnmodifiableSet((all = castTo($getEnumConstants(Lorg_eclipse_elk_core_options_PortSide_2_classLit), 9) , new EnumSet$EnumSetImpl(all, castTo(createFrom(all, all.length), 9), 0)))); SIDES_NORTH = asImmutable(of_2(NORTH_3, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, []))); SIDES_EAST = asImmutable(of_2(EAST_2, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, []))); SIDES_SOUTH = asImmutable(of_2(SOUTH_2, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, []))); SIDES_WEST = asImmutable(of_2(WEST_2, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, []))); SIDES_NORTH_SOUTH = asImmutable(of_2(NORTH_3, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [SOUTH_2]))); SIDES_EAST_WEST = asImmutable(of_2(EAST_2, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [WEST_2]))); SIDES_NORTH_WEST = asImmutable(of_2(NORTH_3, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [WEST_2]))); SIDES_NORTH_EAST = asImmutable(of_2(NORTH_3, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [EAST_2]))); SIDES_SOUTH_WEST = asImmutable(of_2(SOUTH_2, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [WEST_2]))); SIDES_EAST_SOUTH = asImmutable(of_2(EAST_2, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [SOUTH_2]))); SIDES_NORTH_EAST_WEST = asImmutable(of_2(NORTH_3, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [EAST_2, WEST_2]))); SIDES_EAST_SOUTH_WEST = asImmutable(of_2(EAST_2, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [SOUTH_2, WEST_2]))); SIDES_NORTH_SOUTH_WEST = asImmutable(of_2(NORTH_3, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [SOUTH_2, WEST_2]))); SIDES_NORTH_EAST_SOUTH = asImmutable(of_2(NORTH_3, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [EAST_2, SOUTH_2]))); SIDES_NORTH_EAST_SOUTH_WEST = asImmutable(of_2(NORTH_3, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [EAST_2, SOUTH_2, WEST_2]))); } function $left(this$static){ switch (this$static.ordinal) { case 1: return WEST_2; case 2: return NORTH_3; case 3: return EAST_2; case 4: return SOUTH_2; default:return UNDEFINED_5; } } function $opposed(this$static){ switch (this$static.ordinal) { case 1: return SOUTH_2; case 2: return WEST_2; case 3: return NORTH_3; case 4: return EAST_2; default:return UNDEFINED_5; } } function $right(this$static){ switch (this$static.ordinal) { case 1: return EAST_2; case 2: return SOUTH_2; case 3: return WEST_2; case 4: return NORTH_3; default:return UNDEFINED_5; } } function PortSide(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function fromDirection(direction){ $clinit_PortSide(); switch (direction.ordinal) { case 4: return NORTH_3; case 1: return EAST_2; case 3: return SOUTH_2; case 2: return WEST_2; default:return UNDEFINED_5; } } function valueOf_110(name_0){ $clinit_PortSide(); return valueOf(($clinit_PortSide$Map() , $MAP_100), name_0); } function values_118(){ $clinit_PortSide(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [UNDEFINED_5, NORTH_3, EAST_2, SOUTH_2, WEST_2]); } defineClass(64, 22, {3:1, 34:1, 22:1, 64:1}, PortSide); var EAST_2, NORTH_3, SIDES_EAST, SIDES_EAST_SOUTH, SIDES_EAST_SOUTH_WEST, SIDES_EAST_WEST, SIDES_NONE, SIDES_NORTH, SIDES_NORTH_EAST, SIDES_NORTH_EAST_SOUTH, SIDES_NORTH_EAST_SOUTH_WEST, SIDES_NORTH_EAST_WEST, SIDES_NORTH_SOUTH, SIDES_NORTH_SOUTH_WEST, SIDES_NORTH_WEST, SIDES_SOUTH, SIDES_SOUTH_WEST, SIDES_WEST, SOUTH_2, UNDEFINED_5, WEST_2; var Lorg_eclipse_elk_core_options_PortSide_2_classLit = createForEnum('org.eclipse.elk.core.options', 'PortSide', 64, Ljava_lang_Enum_2_classLit, values_118, valueOf_110); function $clinit_PortSide$Map(){ $clinit_PortSide$Map = emptyMethod; $MAP_100 = createValueOfMap(($clinit_PortSide() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_PortSide_2_classLit, 1), $intern_103, 64, 0, [UNDEFINED_5, NORTH_3, EAST_2, SOUTH_2, WEST_2]))); } var $MAP_100; function $clinit_RandomLayouterOptions(){ $clinit_RandomLayouterOptions = emptyMethod; PADDING_DEFAULT_8 = new ElkPadding_0(15); PADDING_8 = new Property_2(($clinit_CoreOptions() , PADDING_6), PADDING_DEFAULT_8); SPACING_NODE_NODE_7 = new Property_2(SPACING_NODE_NODE_6, 15); RANDOM_SEED_2 = new Property_2(RANDOM_SEED_1, valueOf_3(0)); ASPECT_RATIO_6 = new Property_2(ASPECT_RATIO_5, $intern_102); } function $apply_26(registry){ $register(registry, new LayoutAlgorithmData($providerFactory($description($name_0($id(new LayoutAlgorithmData$Builder, 'org.eclipse.elk.random'), 'ELK Randomizer'), 'Distributes the nodes randomly on the plane, leading to very obfuscating layouts. Can be useful to demonstrate the power of "real" layout algorithms.'), new RandomLayouterOptions$RandomFactory))); $addOptionSupport(registry, 'org.eclipse.elk.random', 'org.eclipse.elk.padding', PADDING_DEFAULT_8); $addOptionSupport(registry, 'org.eclipse.elk.random', 'org.eclipse.elk.spacing.nodeNode', 15); $addOptionSupport(registry, 'org.eclipse.elk.random', 'org.eclipse.elk.randomSeed', valueOf_3(0)); $addOptionSupport(registry, 'org.eclipse.elk.random', 'org.eclipse.elk.aspectRatio', $intern_102); } function RandomLayouterOptions(){ $clinit_RandomLayouterOptions(); } defineClass(993, 1, $intern_90, RandomLayouterOptions); _.apply_4 = function apply_178(registry){ $apply_26(registry); } ; var ASPECT_RATIO_6, PADDING_8, PADDING_DEFAULT_8, RANDOM_SEED_2, SPACING_NODE_NODE_7; var Lorg_eclipse_elk_core_options_RandomLayouterOptions_2_classLit = createForClass('org.eclipse.elk.core.options', 'RandomLayouterOptions', 993); function RandomLayouterOptions$RandomFactory(){ } defineClass(994, 1, {}, RandomLayouterOptions$RandomFactory); _.create_0 = function create_46(){ var provider; return provider = new RandomLayoutProvider , provider; } ; _.destroy = function destroy_10(obj){ } ; var Lorg_eclipse_elk_core_options_RandomLayouterOptions$RandomFactory_2_classLit = createForClass('org.eclipse.elk.core.options', 'RandomLayouterOptions/RandomFactory', 994); function $clinit_SizeConstraint(){ $clinit_SizeConstraint = emptyMethod; PORTS_0 = new SizeConstraint('PORTS', 0); PORT_LABELS = new SizeConstraint('PORT_LABELS', 1); NODE_LABELS = new SizeConstraint('NODE_LABELS', 2); MINIMUM_SIZE = new SizeConstraint('MINIMUM_SIZE', 3); } function SizeConstraint(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_111(name_0){ $clinit_SizeConstraint(); return valueOf(($clinit_SizeConstraint$Map() , $MAP_101), name_0); } function values_119(){ $clinit_SizeConstraint(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_SizeConstraint_2_classLit, 1), $intern_37, 386, 0, [PORTS_0, PORT_LABELS, NODE_LABELS, MINIMUM_SIZE]); } defineClass(386, 22, {3:1, 34:1, 22:1, 386:1}, SizeConstraint); var MINIMUM_SIZE, NODE_LABELS, PORTS_0, PORT_LABELS; var Lorg_eclipse_elk_core_options_SizeConstraint_2_classLit = createForEnum('org.eclipse.elk.core.options', 'SizeConstraint', 386, Ljava_lang_Enum_2_classLit, values_119, valueOf_111); function $clinit_SizeConstraint$Map(){ $clinit_SizeConstraint$Map = emptyMethod; $MAP_101 = createValueOfMap(($clinit_SizeConstraint() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_SizeConstraint_2_classLit, 1), $intern_37, 386, 0, [PORTS_0, PORT_LABELS, NODE_LABELS, MINIMUM_SIZE]))); } var $MAP_101; function $clinit_SizeOptions(){ $clinit_SizeOptions = emptyMethod; DEFAULT_MINIMUM_SIZE = new SizeOptions('DEFAULT_MINIMUM_SIZE', 0); MINIMUM_SIZE_ACCOUNTS_FOR_PADDING = new SizeOptions('MINIMUM_SIZE_ACCOUNTS_FOR_PADDING', 1); COMPUTE_PADDING = new SizeOptions('COMPUTE_PADDING', 2); OUTSIDE_NODE_LABELS_OVERHANG = new SizeOptions('OUTSIDE_NODE_LABELS_OVERHANG', 3); PORTS_OVERHANG = new SizeOptions('PORTS_OVERHANG', 4); UNIFORM_PORT_SPACING = new SizeOptions('UNIFORM_PORT_SPACING', 5); SPACE_EFFICIENT_PORT_LABELS = new SizeOptions('SPACE_EFFICIENT_PORT_LABELS', 6); FORCE_TABULAR_NODE_LABELS = new SizeOptions('FORCE_TABULAR_NODE_LABELS', 7); ASYMMETRICAL = new SizeOptions('ASYMMETRICAL', 8); } function SizeOptions(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_112(name_0){ $clinit_SizeOptions(); return valueOf(($clinit_SizeOptions$Map() , $MAP_102), name_0); } function values_120(){ $clinit_SizeOptions(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_SizeOptions_2_classLit, 1), $intern_37, 264, 0, [DEFAULT_MINIMUM_SIZE, MINIMUM_SIZE_ACCOUNTS_FOR_PADDING, COMPUTE_PADDING, OUTSIDE_NODE_LABELS_OVERHANG, PORTS_OVERHANG, UNIFORM_PORT_SPACING, SPACE_EFFICIENT_PORT_LABELS, FORCE_TABULAR_NODE_LABELS, ASYMMETRICAL]); } defineClass(264, 22, {3:1, 34:1, 22:1, 264:1}, SizeOptions); var ASYMMETRICAL, COMPUTE_PADDING, DEFAULT_MINIMUM_SIZE, FORCE_TABULAR_NODE_LABELS, MINIMUM_SIZE_ACCOUNTS_FOR_PADDING, OUTSIDE_NODE_LABELS_OVERHANG, PORTS_OVERHANG, SPACE_EFFICIENT_PORT_LABELS, UNIFORM_PORT_SPACING; var Lorg_eclipse_elk_core_options_SizeOptions_2_classLit = createForEnum('org.eclipse.elk.core.options', 'SizeOptions', 264, Ljava_lang_Enum_2_classLit, values_120, valueOf_112); function $clinit_SizeOptions$Map(){ $clinit_SizeOptions$Map = emptyMethod; $MAP_102 = createValueOfMap(($clinit_SizeOptions() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_SizeOptions_2_classLit, 1), $intern_37, 264, 0, [DEFAULT_MINIMUM_SIZE, MINIMUM_SIZE_ACCOUNTS_FOR_PADDING, COMPUTE_PADDING, OUTSIDE_NODE_LABELS_OVERHANG, PORTS_OVERHANG, UNIFORM_PORT_SPACING, SPACE_EFFICIENT_PORT_LABELS, FORCE_TABULAR_NODE_LABELS, ASYMMETRICAL]))); } var $MAP_102; function $clinit_TopdownNodeTypes(){ $clinit_TopdownNodeTypes = emptyMethod; PARALLEL_NODE = new TopdownNodeTypes('PARALLEL_NODE', 0); HIERARCHICAL_NODE = new TopdownNodeTypes('HIERARCHICAL_NODE', 1); ROOT_NODE_0 = new TopdownNodeTypes('ROOT_NODE', 2); } function TopdownNodeTypes(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_113(name_0){ $clinit_TopdownNodeTypes(); return valueOf(($clinit_TopdownNodeTypes$Map() , $MAP_103), name_0); } function values_121(){ $clinit_TopdownNodeTypes(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_TopdownNodeTypes_2_classLit, 1), $intern_37, 280, 0, [PARALLEL_NODE, HIERARCHICAL_NODE, ROOT_NODE_0]); } defineClass(280, 22, {3:1, 34:1, 22:1, 280:1}, TopdownNodeTypes); var HIERARCHICAL_NODE, PARALLEL_NODE, ROOT_NODE_0; var Lorg_eclipse_elk_core_options_TopdownNodeTypes_2_classLit = createForEnum('org.eclipse.elk.core.options', 'TopdownNodeTypes', 280, Ljava_lang_Enum_2_classLit, values_121, valueOf_113); function $clinit_TopdownNodeTypes$Map(){ $clinit_TopdownNodeTypes$Map = emptyMethod; $MAP_103 = createValueOfMap(($clinit_TopdownNodeTypes() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_TopdownNodeTypes_2_classLit, 1), $intern_37, 280, 0, [PARALLEL_NODE, HIERARCHICAL_NODE, ROOT_NODE_0]))); } var $MAP_103; function $clinit_TopdownSizeApproximator(){ $clinit_TopdownSizeApproximator = emptyMethod; COUNT_CHILDREN = new TopdownSizeApproximator$1; LOOKAHEAD_LAYOUT = new TopdownSizeApproximator$2; } function TopdownSizeApproximator(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_114(name_0){ $clinit_TopdownSizeApproximator(); return valueOf(($clinit_TopdownSizeApproximator$Map() , $MAP_104), name_0); } function values_122(){ $clinit_TopdownSizeApproximator(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_TopdownSizeApproximator_2_classLit, 1), $intern_37, 347, 0, [COUNT_CHILDREN, LOOKAHEAD_LAYOUT]); } defineClass(347, 22, $intern_136); var COUNT_CHILDREN, LOOKAHEAD_LAYOUT; var Lorg_eclipse_elk_core_options_TopdownSizeApproximator_2_classLit = createForEnum('org.eclipse.elk.core.options', 'TopdownSizeApproximator', 347, Ljava_lang_Enum_2_classLit, values_122, valueOf_114); function $getSize(node){ var size_0; size_0 = $doubleValue(castToDouble($getProperty_0(node, ($clinit_CoreOptions() , TOPDOWN_HIERARCHICAL_NODE_WIDTH_2)))) * $wnd.Math.sqrt((!node.children && (node.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, node, 10, 11)) , node.children).size_0); return new KVector_1(size_0, size_0 / $doubleValue(castToDouble($getProperty_0(node, TOPDOWN_HIERARCHICAL_NODE_ASPECT_RATIO_2)))); } function TopdownSizeApproximator$1(){ TopdownSizeApproximator.call(this, 'COUNT_CHILDREN', 0); } defineClass(987, 347, $intern_136, TopdownSizeApproximator$1); _.getSize_0 = function getSize_1(node){ return $getSize(node); } ; var Lorg_eclipse_elk_core_options_TopdownSizeApproximator$1_2_classLit = createForEnum('org.eclipse.elk.core.options', 'TopdownSizeApproximator/1', 987, Lorg_eclipse_elk_core_options_TopdownSizeApproximator_2_classLit, null, null); function TopdownSizeApproximator$2(){ TopdownSizeApproximator.call(this, 'LOOKAHEAD_LAYOUT', 1); } defineClass(988, 347, $intern_136, TopdownSizeApproximator$2); _.getSize_0 = function getSize_2(originalGraph){ var algorithmData, baseSize, child, child$iterator, child$iterator0, childAreaDesiredAspectRatio, childAreaDesiredHeight, childAreaDesiredWidth, edge, edge$iterator, elkEdge, elkNode, elkNode0, exception, layoutProvider, minHeight, minWidth, newChild, newEdge, newSrc, newTar, node, oldToNewNodeMap, padding, size_0; algorithmData = castTo($getProperty_0(originalGraph, ($clinit_CoreOptions() , RESOLVED_ALGORITHM)), 143); node = ($clinit_ElkGraphFactory() , elkNode0 = new ElkNodeImpl , elkNode0); $copyProperties_0(node, originalGraph); oldToNewNodeMap = new HashMap; for (child$iterator0 = new AbstractEList$EIterator((!originalGraph.children && (originalGraph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, originalGraph, 10, 11)) , originalGraph.children)); child$iterator0.cursor != child$iterator0.this$01_2.size_1();) { child = castTo($doNext(child$iterator0), 27); newChild = (elkNode = new ElkNodeImpl , elkNode); $setParent_2(newChild, node); $copyProperties_0(newChild, child); size_0 = $getSize(child); $setDimensions_0(newChild, $wnd.Math.max(child.width_0, size_0.x_0), $wnd.Math.max(child.height, size_0.y_0)); $put_9(oldToNewNodeMap.hashCodeMap, child, newChild); } for (child$iterator = new AbstractEList$EIterator((!originalGraph.children && (originalGraph.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, originalGraph, 10, 11)) , originalGraph.children)); child$iterator.cursor != child$iterator.this$01_2.size_1();) { child = castTo($doNext(child$iterator), 27); for (edge$iterator = new AbstractEList$EIterator((!child.outgoingEdges && (child.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, child, 7, 4)) , child.outgoingEdges)); edge$iterator.cursor != edge$iterator.this$01_2.size_1();) { edge = castTo($doNext(edge$iterator), 74); newSrc = castTo(getEntryValueOrNull($getEntry_0(oldToNewNodeMap.hashCodeMap, child)), 27); newTar = castTo($get_10(oldToNewNodeMap, $get_20((!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets), 0)), 27); newEdge = (elkEdge = new ElkEdgeImpl , elkEdge); $add_21((!newEdge.sources && (newEdge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, newEdge, 4, 7)) , newEdge.sources), newSrc); $add_21((!newEdge.targets && (newEdge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, newEdge, 5, 8)) , newEdge.targets), newTar); $setContainingNode(newEdge, $getParent_2(newSrc)); $copyProperties_0(newEdge, edge); } } layoutProvider = castTo($fetch(algorithmData.providerPool), 205); try { layoutProvider.layout(node, new NullElkProgressMonitor); $release(algorithmData.providerPool, layoutProvider); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 103)) { exception = $e0; throw toJs(exception); } else throw toJs($e0); } $hasProperty_0(node, CHILD_AREA_WIDTH) || $hasProperty_0(node, CHILD_AREA_HEIGHT) || computeChildAreaDimensions(node); childAreaDesiredWidth = $doubleValue(castToDouble($getProperty_0(node, CHILD_AREA_WIDTH))); childAreaDesiredHeight = $doubleValue(castToDouble($getProperty_0(node, CHILD_AREA_HEIGHT))); childAreaDesiredAspectRatio = childAreaDesiredWidth / childAreaDesiredHeight; baseSize = $doubleValue(castToDouble($getProperty_0(node, TOPDOWN_HIERARCHICAL_NODE_WIDTH_2))) * $wnd.Math.sqrt((!node.children && (node.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, node, 10, 11)) , node.children).size_0); padding = castTo($getProperty_0(node, PADDING_6), 107); minWidth = padding.left + padding.right + 1; minHeight = padding.top_0 + padding.bottom + 1; return new KVector_1($wnd.Math.max(minWidth, baseSize), $wnd.Math.max(minHeight, baseSize / childAreaDesiredAspectRatio)); } ; var Lorg_eclipse_elk_core_options_TopdownSizeApproximator$2_2_classLit = createForEnum('org.eclipse.elk.core.options', 'TopdownSizeApproximator/2', 988, Lorg_eclipse_elk_core_options_TopdownSizeApproximator_2_classLit, null, null); function $clinit_TopdownSizeApproximator$Map(){ $clinit_TopdownSizeApproximator$Map = emptyMethod; $MAP_104 = createValueOfMap(($clinit_TopdownSizeApproximator() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_options_TopdownSizeApproximator_2_classLit, 1), $intern_37, 347, 0, [COUNT_CHILDREN, LOOKAHEAD_LAYOUT]))); } var $MAP_104; function $begin(this$static, name_0, thetotalWork){ if (this$static.closed_0) { throw toJs(new IllegalStateException_0('The task is already done.')); } else if (this$static.taskName != null) { return false; } else { this$static.taskName = name_0; this$static.totalWork = thetotalWork; this$static.recordExecutionTime && (this$static.startTime = ($clinit_System() , mul_0(fromDouble_0(Date.now()), $intern_46))); return true; } } function $doSubTask(this$static, maxHierarchyLevels){ var newMaxHierarchyLevels; newMaxHierarchyLevels = maxHierarchyLevels > 0?maxHierarchyLevels - 1:maxHierarchyLevels; return $withExecutionTimeMeasurement($withLogPersistence($withLogging($withMaxHierarchyLevels(new BasicProgressMonitor, newMaxHierarchyLevels), this$static.recordLogs), this$static.persistLogs), this$static.recordExecutionTime); } function $done_0(this$static){ var endTime; if (this$static.taskName == null) { throw toJs(new IllegalStateException_0('The task has not begun yet.')); } if (!this$static.closed_0) { if (this$static.recordExecutionTime) { endTime = ($clinit_System() , mul_0(fromDouble_0(Date.now()), $intern_46)); this$static.totalTime = toDouble_0(sub_2(endTime, this$static.startTime)) * 1.0E-9; } this$static.completedWork < this$static.totalWork && $internalWorked(this$static, this$static.totalWork - this$static.completedWork); this$static.closed_0 = true; } } function $internalWorked(this$static, work){ if (this$static.totalWork > 0 && this$static.completedWork < this$static.totalWork) { this$static.completedWork += work; !!this$static.parentMonitor && this$static.parentMonitor.currentChildWork > 0 && this$static.maxLevels != 0 && $internalWorked(this$static.parentMonitor, work / this$static.totalWork * this$static.parentMonitor.currentChildWork); } } function $logGraph(this$static, object, graphType){ var loggedGraph; if (this$static.recordLogs && !!object && !!graphType) { loggedGraph = new LoggedGraph; $add_3(this$static.logGraphs, loggedGraph); } } function $withExecutionTimeMeasurement(this$static, enabled){ this$static.recordExecutionTime = enabled; return this$static; } function $withLogPersistence(this$static, enabled){ this$static.persistLogs = enabled; return this$static; } function $withLogging(this$static, enabled){ this$static.recordLogs = enabled; if (this$static.recordLogs) { this$static.logMessages = new ArrayList; this$static.logGraphs = new ArrayList; } else { this$static.logMessages = null; this$static.logGraphs = null; } return this$static; } function $withMaxHierarchyLevels(this$static, levels){ levels < 0?(this$static.maxLevels = -1):(this$static.maxLevels = levels); return this$static; } function BasicProgressMonitor(){ this.children = new LinkedList; } defineClass(344, 1, {871:1}, BasicProgressMonitor); _.begin = function begin_0(name_0, thetotalWork){ return $begin(this, name_0, thetotalWork); } ; _.done_1 = function done(){ $done_0(this); } ; _.getExecutionTime = function getExecutionTime(){ return this.totalTime; } ; _.getLogs = function getLogs(){ return !this.logMessages?null:unmodifiableList(this.logMessages); } ; _.getSubMonitors = function getSubMonitors(){ return unmodifiableList(this.children); } ; _.getTaskName = function getTaskName(){ return this.taskName; } ; _.isCanceled = function isCanceled(){ return false; } ; _.isLoggingEnabled = function isLoggingEnabled(){ return this.recordLogs; } ; _.isRunning = function isRunning(){ return this.taskName != null && !this.closed_0; } ; _.log_0 = function log_0(object){ var logMessage; if (this.recordLogs) { logMessage = object; $add_3(this.logMessages, logMessage); } } ; _.logGraph = function logGraph(graph, tag){ var copier, result; this.recordLogs && !!graph && $logGraph(this, (copier = new EcoreUtil$Copier , result = $copy_1(copier, graph) , $copyReferences(copier) , result), ($clinit_LoggedGraph$Type() , ELK)); } ; _.subTask = function subTask(work){ var subMonitor; if (this.closed_0) { return null; } else { subMonitor = $doSubTask(this, this.maxLevels); $add_7(this.children, subMonitor); subMonitor.parentMonitor = this; this.currentChildWork = work; return subMonitor; } } ; _.worked = function worked(work){ work > 0 && !this.closed_0 && $internalWorked(this, work); } ; _.closed_0 = false; _.completedWork = 0; _.currentChildWork = -1; _.logGraphs = null; _.logMessages = null; _.maxLevels = -1; _.persistLogs = false; _.recordExecutionTime = false; _.recordLogs = false; _.startTime = 0; _.totalTime = 0; _.totalWork = 0; var Lorg_eclipse_elk_core_util_BasicProgressMonitor_2_classLit = createForClass('org.eclipse.elk.core.util', 'BasicProgressMonitor', 344); function $areaStdDev(boxes, mean){ var box, box$iterator, stddev, variance; variance = 0; for (box$iterator = new ArrayList$1(boxes); box$iterator.i < box$iterator.this$01.array.length;) { box = castTo($next_6(box$iterator), 27); variance += $wnd.Math.pow(box.width_0 * box.height - mean, 2); } stddev = $wnd.Math.sqrt(variance / (boxes.array.length - 1)); return stddev; } function $areaStdDev2(boxes, mean){ var box, box$iterator, stddev, variance; variance = 0; for (box$iterator = new ArrayList$1(boxes); box$iterator.i < box$iterator.this$01.array.length;) { box = castTo($next_6(box$iterator), 163); variance += $wnd.Math.pow($getWidth(box) * $getHeight(box) - mean, 2); } stddev = $wnd.Math.sqrt(variance / (boxes.array.length - 1)); return stddev; } function $layout_4(layoutNode, progressMonitor){ var expandNodes, interactive, objSpacing, padding, sortedBoxes, minSize, aspectRatio, parentSize, sortedBoxes_0; progressMonitor.begin('Box layout', 2); objSpacing = $floatValue(castToDouble($getProperty_0(layoutNode, ($clinit_BoxLayouterOptions() , SPACING_NODE_NODE_5)))); padding = castTo($getProperty_0(layoutNode, PADDING_5), 107); expandNodes = $booleanValue(castToBoolean($getProperty_0(layoutNode, EXPAND_NODES))); interactive = $booleanValue(castToBoolean($getProperty_0(layoutNode, INTERACTIVE_7))); switch (castTo($getProperty_0(layoutNode, BOX_PACKING_MODE), 320).ordinal) { case 0: sortedBoxes = (sortedBoxes_0 = new ArrayList_1((!layoutNode.children && (layoutNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, layoutNode, 10, 11)) , layoutNode.children)) , $clinit_Collections() , $sort(sortedBoxes_0, new BoxLayoutProvider$1(interactive)) , sortedBoxes_0); minSize = effectiveMinSizeConstraintFor(layoutNode); aspectRatio = castToDouble($getProperty_0(layoutNode, ASPECT_RATIO_4)); (aspectRatio == null || (checkCriticalNotNull(aspectRatio) , aspectRatio) <= 0) && (aspectRatio = 1.3); parentSize = $placeBoxes(sortedBoxes, objSpacing, padding, minSize.x_0, minSize.y_0, expandNodes, (checkCriticalNotNull(aspectRatio) , aspectRatio)); resizeNode_1(layoutNode, parentSize.x_0, parentSize.y_0, false, true); break; default:$placeBoxesGrouping(layoutNode, objSpacing, padding, expandNodes); } progressMonitor.done_1(); } function $mergeAndPlaceDec(groups, objSpacing, minWidth, minHeight, expandNodes){ var box, boxQueue, boxToBeat, collectedArea, groupSize, innerAspectRatio, innerGroup, maybeGroup, toBePlaced; $clinit_Collections(); $sort(groups, new BoxLayoutProvider$lambda$0$Type); boxQueue = newLinkedList(groups); toBePlaced = new ArrayList; maybeGroup = new ArrayList; boxToBeat = null; collectedArea = 0; while (boxQueue.size_0 != 0) { box = castTo(boxQueue.size_0 == 0?null:(checkCriticalElement(boxQueue.size_0 != 0) , $removeNode_0(boxQueue, boxQueue.header.next_0)), 163); if (!boxToBeat || $getWidth(boxToBeat) * $getHeight(boxToBeat) / 2 < $getWidth(box) * $getHeight(box)) { boxToBeat = box; push_1(toBePlaced.array, box); } else { collectedArea += $getWidth(box) * $getHeight(box); push_1(maybeGroup.array, box); if (maybeGroup.array.length > 1 && (collectedArea > $getWidth(boxToBeat) * $getHeight(boxToBeat) / 2 || boxQueue.size_0 == 0)) { innerGroup = new BoxLayoutProvider$Group(maybeGroup); innerAspectRatio = $getWidth(boxToBeat) / $getHeight(boxToBeat); groupSize = $placeInnerBoxes(innerGroup, objSpacing, new ElkPadding, minWidth, minHeight, expandNodes, innerAspectRatio); $add_19($reset_5(innerGroup.size_0), groupSize); boxToBeat = innerGroup; push_1(toBePlaced.array, innerGroup); collectedArea = 0; maybeGroup.array.length = 0; } } } $addAll_2(toBePlaced, maybeGroup); return toBePlaced; } function $mergeAndPlaceInc(groups, objSpacing, minWidth, minHeight, expandNodes){ var commonArea, g, groupIterator, groupSize, innerAspectRatio, merged, toBePlaced; $clinit_Collections(); $sort(groups, new BoxLayoutProvider$lambda$2$Type); groupIterator = new AbstractList$ListIteratorImpl(groups, 0); toBePlaced = new ArrayList; commonArea = 0; while (groupIterator.i < groupIterator.this$01_0.size_1()) { g = (checkCriticalElement(groupIterator.i < groupIterator.this$01_0.size_1()) , castTo(groupIterator.this$01_0.get_0(groupIterator.last = groupIterator.i++), 163)); if (toBePlaced.array.length != 0 && $getWidth(g) * $getHeight(g) > commonArea * 2) { merged = new BoxLayoutProvider$Group(toBePlaced); innerAspectRatio = $getWidth(g) / $getHeight(g); groupSize = $placeInnerBoxes(merged, objSpacing, new ElkPadding, minWidth, minHeight, expandNodes, innerAspectRatio); $add_19($reset_5(merged.size_0), groupSize); toBePlaced.array.length = 0; commonArea = 0; push_1(toBePlaced.array, merged); push_1(toBePlaced.array, g); commonArea = $getWidth(merged) * $getHeight(merged) + $getWidth(g) * $getHeight(g); } else { push_1(toBePlaced.array, g); commonArea += $getWidth(g) * $getHeight(g); } } return toBePlaced; } function $mergeAndPlaceMixed(groups, objSpacing, minWidth, minHeight, expandNodes){ var anIndex, box, cumAreaArray, groupSize, index_0, innerAspectRatio, innerGroup, pq, remain, select, toBePlaced, value_0; cumAreaArray = initUnidimensionalArray(D_classLit, $intern_66, 28, groups.array.length, 15, 1); pq = new PriorityQueue(new BoxLayoutProvider$lambda$1$Type); $addAll_4(pq, groups); index_0 = 0; toBePlaced = new ArrayList; while (pq.heap.array.length != 0) { box = castTo(pq.heap.array.length == 0?null:$get_11(pq.heap, 0), 163); if (index_0 > 1 && $getWidth(box) * $getHeight(box) / 2 > cumAreaArray[0]) { anIndex = 0; while (anIndex < toBePlaced.array.length - 1 && $getWidth(box) * $getHeight(box) / 2 > cumAreaArray[anIndex]) { ++anIndex; } select = new AbstractList$SubList(toBePlaced, 0, anIndex + 1); innerGroup = new BoxLayoutProvider$Group(select); innerAspectRatio = $getWidth(box) / $getHeight(box); groupSize = $placeInnerBoxes(innerGroup, objSpacing, new ElkPadding, minWidth, minHeight, expandNodes, innerAspectRatio); $add_19($reset_5(innerGroup.size_0), groupSize); checkCriticalState_0($offer(pq, innerGroup), 'Unable to add element to queue'); remain = new AbstractList$SubList(toBePlaced, anIndex + 1, toBePlaced.array.length); $addAll_4(pq, remain); toBePlaced.array.length = 0; index_0 = 0; fill0_0(cumAreaArray, cumAreaArray.length, 0); } else { value_0 = pq.heap.array.length == 0?null:$get_11(pq.heap, 0); value_0 != null && $removeAtIndex_0(pq, 0); index_0 > 0 && (cumAreaArray[index_0] = cumAreaArray[index_0 - 1]); cumAreaArray[index_0] += $getWidth(box) * $getHeight(box); ++index_0; push_1(toBePlaced.array, box); } } return toBePlaced; } function $placeBoxes(sortedBoxes, minSpacing, padding, minTotalWidth, minTotalHeight, expandNodes, aspectRatio){ var box, box$iterator, boxIter, broadestRow, height, highestBox, maxRowWidth, mean, newHeight, newWidth, nextRowIndex, oldHeight, oldWidth, rowHeight, rowHeightIter, rowHeights, rowIndexIter, rowIndices, stddev, totalArea, totalHeight, width_0, xpos, ypos; maxRowWidth = 0; totalArea = 0; for (box$iterator = new ArrayList$1(sortedBoxes); box$iterator.i < box$iterator.this$01.array.length;) { box = castTo($next_6(box$iterator), 27); resizeNode_0(box); maxRowWidth = $wnd.Math.max(maxRowWidth, box.width_0); totalArea += box.width_0 * box.height; } mean = totalArea / sortedBoxes.array.length; stddev = $areaStdDev(sortedBoxes, mean); totalArea += sortedBoxes.array.length * stddev; maxRowWidth = $wnd.Math.max(maxRowWidth, $wnd.Math.sqrt(totalArea * aspectRatio)) + padding.left; xpos = padding.left; ypos = padding.top_0; highestBox = 0; broadestRow = padding.left + padding.right; rowIndices = new LinkedList; $add_7(rowIndices, valueOf_3(0)); rowHeights = new LinkedList; boxIter = new AbstractList$ListIteratorImpl(sortedBoxes, 0); while (boxIter.i < boxIter.this$01_0.size_1()) { box = (checkCriticalElement(boxIter.i < boxIter.this$01_0.size_1()) , castTo(boxIter.this$01_0.get_0(boxIter.last = boxIter.i++), 27)); width_0 = box.width_0; height = box.height; if (xpos + width_0 > maxRowWidth) { if (expandNodes) { $addLast_0(rowHeights, highestBox); $addLast_0(rowIndices, valueOf_3(boxIter.i - 1)); } xpos = padding.left; ypos += highestBox + minSpacing; highestBox = 0; broadestRow = $wnd.Math.max(broadestRow, padding.left + padding.right + width_0); } $setX_2(box, xpos); $setY_3(box, ypos); broadestRow = $wnd.Math.max(broadestRow, xpos + width_0 + padding.right); highestBox = $wnd.Math.max(highestBox, height); xpos += width_0 + minSpacing; } broadestRow = $wnd.Math.max(broadestRow, minTotalWidth); totalHeight = ypos + highestBox + padding.bottom; if (totalHeight < minTotalHeight) { highestBox += minTotalHeight - totalHeight; totalHeight = minTotalHeight; } if (expandNodes) { xpos = padding.left; boxIter = new AbstractList$ListIteratorImpl(sortedBoxes, 0); $addLast_0(rowIndices, valueOf_3(sortedBoxes.array.length)); rowIndexIter = $listIterator_2(rowIndices, 0); nextRowIndex = castTo($next_9(rowIndexIter), 17).value_0; $addLast_0(rowHeights, highestBox); rowHeightIter = $listIterator_2(rowHeights, 0); rowHeight = 0; while (boxIter.i < boxIter.this$01_0.size_1()) { if (boxIter.i == nextRowIndex) { xpos = padding.left; rowHeight = $doubleValue(castToDouble($next_9(rowHeightIter))); nextRowIndex = castTo($next_9(rowIndexIter), 17).value_0; } box = (checkCriticalElement(boxIter.i < boxIter.this$01_0.size_1()) , castTo(boxIter.this$01_0.get_0(boxIter.last = boxIter.i++), 27)); oldHeight = box.height; $setHeight_0(box, rowHeight); newHeight = rowHeight; if (boxIter.i == nextRowIndex) { newWidth = broadestRow - xpos - padding.right; oldWidth = box.width_0; $setWidth_0(box, newWidth); translate_1(box, new KVector_1(newWidth, newHeight), new KVector_1(oldWidth, oldHeight)); } xpos += box.width_0 + minSpacing; } } return new KVector_1(broadestRow, totalHeight); } function $placeBoxesGrouping(parentNode, objSpacing, padding, expandNodes){ var aspectRatio, finalGroup, g, groups, lastArg, lastArg0, lastArg1, minSize, mode, node, node$iterator, parentSize, toBePlaced; minSize = new KVector_2(castTo($getProperty_0(parentNode, ($clinit_BoxLayouterOptions() , NODE_SIZE_MINIMUM_4)), 8)); minSize.x_0 = $wnd.Math.max(minSize.x_0 - padding.left - padding.right, 0); minSize.y_0 = $wnd.Math.max(minSize.y_0 - padding.top_0 - padding.bottom, 0); aspectRatio = castToDouble($getProperty_0(parentNode, ASPECT_RATIO_4)); (aspectRatio == null || (checkCriticalNotNull(aspectRatio) , aspectRatio) <= 0) && (aspectRatio = 1.3); groups = new ArrayList; for (node$iterator = new AbstractEList$EIterator((!parentNode.children && (parentNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, parentNode, 10, 11)) , parentNode.children)); node$iterator.cursor != node$iterator.this$01_2.size_1();) { node = castTo($doNext(node$iterator), 27); g = new BoxLayoutProvider$Group_0(node); push_1(groups.array, g); } mode = castTo($getProperty_0(parentNode, BOX_PACKING_MODE), 320); switch (mode.ordinal) { case 3: toBePlaced = $mergeAndPlaceInc(groups, objSpacing, minSize.x_0, minSize.y_0, (lastArg0 = expandNodes , checkCriticalNotNull(aspectRatio) , aspectRatio , lastArg0)); break; case 1: toBePlaced = $mergeAndPlaceDec(groups, objSpacing, minSize.x_0, minSize.y_0, (lastArg1 = expandNodes , checkCriticalNotNull(aspectRatio) , aspectRatio , lastArg1)); break; default:toBePlaced = $mergeAndPlaceMixed(groups, objSpacing, minSize.x_0, minSize.y_0, (lastArg = expandNodes , checkCriticalNotNull(aspectRatio) , aspectRatio , lastArg)); } finalGroup = new BoxLayoutProvider$Group(toBePlaced); parentSize = $placeInnerBoxes(finalGroup, objSpacing, padding, minSize.x_0, minSize.y_0, expandNodes, (checkCriticalNotNull(aspectRatio) , aspectRatio)); resizeNode_1(parentNode, parentSize.x_0, parentSize.y_0, false, true); } function $placeInnerBoxes(group, minSpacing, padding, minTotalWidth, minTotalHeight, expandNodes, aspectRatio){ var bottoms, box, box$iterator, boxIter, broadestRow, height, highestBox, last, maxRowWidth, mean, newWidth, nextRowIndex, oldWidth, rowHeight, rowHeightIter, rowHeights, rowIndexIter, rowIndices, stddev, totalArea, totalHeight, width_0, xpos, ypos; maxRowWidth = 0; totalArea = 0; for (box$iterator = new ArrayList$1(group.groups); box$iterator.i < box$iterator.this$01.array.length;) { box = castTo($next_6(box$iterator), 163); !!box.node && resizeNode_0(box.node); maxRowWidth = $wnd.Math.max(maxRowWidth, $getWidth(box)); totalArea += $getWidth(box) * $getHeight(box); } mean = totalArea / group.groups.array.length; stddev = $areaStdDev2(group.groups, mean); totalArea += group.groups.array.length * stddev; maxRowWidth = $wnd.Math.max(maxRowWidth, $wnd.Math.sqrt(totalArea * aspectRatio)) + padding.left; xpos = padding.left; ypos = padding.top_0; highestBox = 0; broadestRow = padding.left + padding.right; rowIndices = new LinkedList; $add_7(rowIndices, valueOf_3(0)); rowHeights = new LinkedList; boxIter = new AbstractList$ListIteratorImpl(group.groups, 0); last = null; bottoms = new ArrayList; while (boxIter.i < boxIter.this$01_0.size_1()) { box = (checkCriticalElement(boxIter.i < boxIter.this$01_0.size_1()) , castTo(boxIter.this$01_0.get_0(boxIter.last = boxIter.i++), 163)); width_0 = $getWidth(box); height = $getHeight(box); if (xpos + width_0 > maxRowWidth) { if (expandNodes) { $addLast_0(rowHeights, highestBox); $addLast_0(rowIndices, valueOf_3(boxIter.i - 1)); $add_3(group.right, last); bottoms.array.length = 0; } xpos = padding.left; ypos += highestBox + minSpacing; highestBox = 0; broadestRow = $wnd.Math.max(broadestRow, padding.left + padding.right + width_0); } push_1(bottoms.array, box); $translate_1(box, xpos, ypos); broadestRow = $wnd.Math.max(broadestRow, xpos + width_0 + padding.right); highestBox = $wnd.Math.max(highestBox, height); xpos += width_0 + minSpacing; last = box; } $addAll_2(group.bottom, bottoms); $add_3(group.right, castTo($get_11(bottoms, bottoms.array.length - 1), 163)); broadestRow = $wnd.Math.max(broadestRow, minTotalWidth); totalHeight = ypos + highestBox + padding.bottom; if (totalHeight < minTotalHeight) { highestBox += minTotalHeight - totalHeight; totalHeight = minTotalHeight; } if (expandNodes) { xpos = padding.left; boxIter = new AbstractList$ListIteratorImpl(group.groups, 0); $addLast_0(rowIndices, valueOf_3(group.groups.array.length)); rowIndexIter = $listIterator_2(rowIndices, 0); nextRowIndex = castTo($next_9(rowIndexIter), 17).value_0; $addLast_0(rowHeights, highestBox); rowHeightIter = $listIterator_2(rowHeights, 0); rowHeight = 0; while (boxIter.i < boxIter.this$01_0.size_1()) { if (boxIter.i == nextRowIndex) { xpos = padding.left; rowHeight = $doubleValue(castToDouble($next_9(rowHeightIter))); nextRowIndex = castTo($next_9(rowIndexIter), 17).value_0; } box = (checkCriticalElement(boxIter.i < boxIter.this$01_0.size_1()) , castTo(boxIter.this$01_0.get_0(boxIter.last = boxIter.i++), 163)); $setHeight(box, rowHeight); if (boxIter.i == nextRowIndex) { newWidth = broadestRow - xpos - padding.right; oldWidth = $getWidth(box); $setWidth(box, newWidth); $translateInnerNodes(box, (newWidth - oldWidth) / 2, 0); } xpos += $getWidth(box) + minSpacing; } } return new KVector_1(broadestRow, totalHeight); } function BoxLayoutProvider(){ } function lambda$0_42(g1_0, g2_1){ return -compare_4($getWidth(g1_0) * $getHeight(g1_0), $getWidth(g2_1) * $getHeight(g2_1)); } function lambda$1_21(g1_0, g2_1){ return compare_4($getWidth(g1_0) * $getHeight(g1_0), $getWidth(g2_1) * $getHeight(g2_1)); } function lambda$2_14(g1_0, g2_1){ return compare_4($getWidth(g1_0) * $getHeight(g1_0), $getWidth(g2_1) * $getHeight(g2_1)); } defineClass(717, 205, $intern_96, BoxLayoutProvider); _.layout = function layout_8(layoutNode, progressMonitor){ $layout_4(layoutNode, progressMonitor); } ; var Lorg_eclipse_elk_core_util_BoxLayoutProvider_2_classLit = createForClass('org.eclipse.elk.core.util', 'BoxLayoutProvider', 717); function $compare_27(this$static, child1, child2){ var c, prio1, prio2, size1, size2; prio1 = castTo($getProperty_0(child1, ($clinit_BoxLayouterOptions() , PRIORITY_2)), 17); !prio1 && (prio1 = valueOf_3(0)); prio2 = castTo($getProperty_0(child2, PRIORITY_2), 17); !prio2 && (prio2 = valueOf_3(0)); if (prio1.value_0 > prio2.value_0) { return -1; } else if (prio1.value_0 < prio2.value_0) { return 1; } else { if (this$static.val$interactive2) { c = compare_4(child1.y_0, child2.y_0); if (c != 0) { return c; } c = compare_4(child1.x_0, child2.x_0); if (c != 0) { return c; } } size1 = child1.width_0 * child1.height; size2 = child2.width_0 * child2.height; return compare_4(size1, size2); } } function BoxLayoutProvider$1(val$interactive){ this.val$interactive2 = val$interactive; } defineClass(983, 1, $intern_88, BoxLayoutProvider$1); _.compare_1 = function compare_109(child1, child2){ return $compare_27(this, castTo(child1, 27), castTo(child2, 27)); } ; _.equals_0 = function equals_201(other){ return this === other; } ; _.reversed = function reversed_101(){ return new Comparators$ReversedComparator(this); } ; _.val$interactive2 = false; var Lorg_eclipse_elk_core_util_BoxLayoutProvider$1_2_classLit = createForClass('org.eclipse.elk.core.util', 'BoxLayoutProvider/1', 983); function $getHeight(this$static){ if (this$static.node) { return this$static.node.height; } return this$static.size_0.y_0; } function $getWidth(this$static){ if (this$static.node) { return this$static.node.width_0; } return this$static.size_0.x_0; } function $setHeight(this$static, h){ var delta, g, g$iterator; if (this$static.node) { $setHeight_0(this$static.node, h); } else { delta = h - $getHeight(this$static); for (g$iterator = new ArrayList$1(this$static.bottom); g$iterator.i < g$iterator.this$01.array.length;) { g = castTo($next_6(g$iterator), 163); $setHeight(g, $getHeight(g) + delta); } } } function $setWidth(this$static, w){ var delta, g, g$iterator; if (this$static.node) { $setWidth_0(this$static.node, w); } else { delta = w - $getWidth(this$static); for (g$iterator = new ArrayList$1(this$static.right); g$iterator.i < g$iterator.this$01.array.length;) { g = castTo($next_6(g$iterator), 163); $setWidth(g, $getWidth(g) + delta); } } } function $translate_1(this$static, x_0, y_0){ var g, g$iterator; if (this$static.node) { $setX_2(this$static.node, this$static.node.x_0 + x_0); $setY_3(this$static.node, this$static.node.y_0 + y_0); } else { for (g$iterator = new ArrayList$1(this$static.groups); g$iterator.i < g$iterator.this$01.array.length;) { g = castTo($next_6(g$iterator), 163); $translate_1(g, x_0, y_0); } } } function $translateInnerNodes(this$static, x_0, y_0){ var g, g$iterator; if (this$static.node) { translate_0(this$static.node, x_0, y_0); } else { for (g$iterator = new ArrayList$1(this$static.groups); g$iterator.i < g$iterator.this$01.array.length;) { g = castTo($next_6(g$iterator), 163); $translateInnerNodes(g, x_0, y_0); } } } function BoxLayoutProvider$Group(groups){ this.groups = (checkNotNull(groups) , new ArrayList_1(groups)); this.bottom = new ArrayList; this.right = new ArrayList; this.size_0 = new KVector; } function BoxLayoutProvider$Group_0(node){ this.node = node; $setX_2(node, 0); $setY_3(node, 0); } defineClass(163, 1, {163:1}, BoxLayoutProvider$Group, BoxLayoutProvider$Group_0); _.toString_0 = function toString_117(){ return this.node?$toString_23(this.node):$toString_2(this.groups); } ; var Lorg_eclipse_elk_core_util_BoxLayoutProvider$Group_2_classLit = createForClass('org.eclipse.elk.core.util', 'BoxLayoutProvider/Group', 163); function $clinit_BoxLayoutProvider$PackingMode(){ $clinit_BoxLayoutProvider$PackingMode = emptyMethod; SIMPLE_1 = new BoxLayoutProvider$PackingMode('SIMPLE', 0); GROUP_DEC = new BoxLayoutProvider$PackingMode('GROUP_DEC', 1); GROUP_MIXED = new BoxLayoutProvider$PackingMode('GROUP_MIXED', 2); GROUP_INC = new BoxLayoutProvider$PackingMode('GROUP_INC', 3); } function BoxLayoutProvider$PackingMode(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_115(name_0){ $clinit_BoxLayoutProvider$PackingMode(); return valueOf(($clinit_BoxLayoutProvider$PackingMode$Map() , $MAP_105), name_0); } function values_123(){ $clinit_BoxLayoutProvider$PackingMode(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_util_BoxLayoutProvider$PackingMode_2_classLit, 1), $intern_37, 320, 0, [SIMPLE_1, GROUP_DEC, GROUP_MIXED, GROUP_INC]); } defineClass(320, 22, {3:1, 34:1, 22:1, 320:1}, BoxLayoutProvider$PackingMode); var GROUP_DEC, GROUP_INC, GROUP_MIXED, SIMPLE_1; var Lorg_eclipse_elk_core_util_BoxLayoutProvider$PackingMode_2_classLit = createForEnum('org.eclipse.elk.core.util', 'BoxLayoutProvider/PackingMode', 320, Ljava_lang_Enum_2_classLit, values_123, valueOf_115); function $clinit_BoxLayoutProvider$PackingMode$Map(){ $clinit_BoxLayoutProvider$PackingMode$Map = emptyMethod; $MAP_105 = createValueOfMap(($clinit_BoxLayoutProvider$PackingMode() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_util_BoxLayoutProvider$PackingMode_2_classLit, 1), $intern_37, 320, 0, [SIMPLE_1, GROUP_DEC, GROUP_MIXED, GROUP_INC]))); } var $MAP_105; function BoxLayoutProvider$lambda$0$Type(){ } defineClass(984, 1, $intern_88, BoxLayoutProvider$lambda$0$Type); _.compare_1 = function compare_110(arg0, arg1){ return lambda$0_42(castTo(arg0, 163), castTo(arg1, 163)); } ; _.equals_0 = function equals_202(other){ return this === other; } ; _.reversed = function reversed_102(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_core_util_BoxLayoutProvider$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.core.util', 'BoxLayoutProvider/lambda$0$Type', 984); function BoxLayoutProvider$lambda$1$Type(){ } defineClass(985, 1, $intern_88, BoxLayoutProvider$lambda$1$Type); _.compare_1 = function compare_111(arg0, arg1){ return lambda$1_21(castTo(arg0, 163), castTo(arg1, 163)); } ; _.equals_0 = function equals_203(other){ return this === other; } ; _.reversed = function reversed_103(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_core_util_BoxLayoutProvider$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.core.util', 'BoxLayoutProvider/lambda$1$Type', 985); function BoxLayoutProvider$lambda$2$Type(){ } defineClass(986, 1, $intern_88, BoxLayoutProvider$lambda$2$Type); _.compare_1 = function compare_112(arg0, arg1){ return lambda$2_14(castTo(arg0, 163), castTo(arg1, 163)); } ; _.equals_0 = function equals_204(other){ return this === other; } ; _.reversed = function reversed_104(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_core_util_BoxLayoutProvider$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.core.util', 'BoxLayoutProvider/lambda$2$Type', 986); function ElkSpacings$AbstractSpacingsBuilder$lambda$0$Type(){ } defineClass(1384, 1, {845:1}, ElkSpacings$AbstractSpacingsBuilder$lambda$0$Type); _.accept_4 = function accept_146(arg0, arg1){ return $clinit_ElkSpacings$AbstractSpacingsBuilder() , !instanceOf(arg1, 167) || $accept_5(($clinit_LayoutConfigurator() , OPTION_TARGET_FILTER , castTo(arg0, 167)), arg1); } ; var Lorg_eclipse_elk_core_util_ElkSpacings$AbstractSpacingsBuilder$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.core.util', 'ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type', 1384); function ElkSpacings$AbstractSpacingsBuilder$lambda$1$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1385, 1, $intern_19, ElkSpacings$AbstractSpacingsBuilder$lambda$1$Type); _.accept = function accept_147(arg0){ $lambda$1_2(this.$$outer_0, castTo(arg0, 149)); } ; var Lorg_eclipse_elk_core_util_ElkSpacings$AbstractSpacingsBuilder$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.core.util', 'ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type', 1385); function ElkSpacings$AbstractSpacingsBuilder$lambda$2$Type(){ } defineClass(1386, 1, $intern_19, ElkSpacings$AbstractSpacingsBuilder$lambda$2$Type); _.accept = function accept_148(arg0){ castTo(arg0, 96); $clinit_ElkSpacings$AbstractSpacingsBuilder(); } ; var Lorg_eclipse_elk_core_util_ElkSpacings$AbstractSpacingsBuilder$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.core.util', 'ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type', 1386); function ElkSpacings$AbstractSpacingsBuilder$lambda$3$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(1390, 1, $intern_19, ElkSpacings$AbstractSpacingsBuilder$lambda$3$Type); _.accept = function accept_149(arg0){ $lambda$3_0(this.$$outer_0, castTo(arg0, 96)); } ; var Lorg_eclipse_elk_core_util_ElkSpacings$AbstractSpacingsBuilder$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.core.util', 'ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type', 1390); function ElkSpacings$AbstractSpacingsBuilder$lambda$4$Type($$outer_0, element_1){ this.$$outer_0 = $$outer_0; this.element_1 = element_1; } defineClass(1388, 1, $intern_40, ElkSpacings$AbstractSpacingsBuilder$lambda$4$Type); _.test_0 = function test_123(arg0){ return $lambda$4_1(this.$$outer_0, this.element_1, castTo(arg0, 149)); } ; var Lorg_eclipse_elk_core_util_ElkSpacings$AbstractSpacingsBuilder$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.core.util', 'ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type', 1388); function ElkSpacings$AbstractSpacingsBuilder$lambda$5$Type(element_0, p_1){ this.element_0 = element_0; this.p_1 = p_1; } defineClass(1387, 1, $intern_40, ElkSpacings$AbstractSpacingsBuilder$lambda$5$Type); _.test_0 = function test_124(arg0){ return lambda$5_3(this.element_0, this.p_1, castTo(arg0, 845)); } ; var Lorg_eclipse_elk_core_util_ElkSpacings$AbstractSpacingsBuilder$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.core.util', 'ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type', 1387); function ElkSpacings$AbstractSpacingsBuilder$lambda$6$Type($$outer_0, element_1){ this.$$outer_0 = $$outer_0; this.element_1 = element_1; } defineClass(1389, 1, $intern_19, ElkSpacings$AbstractSpacingsBuilder$lambda$6$Type); _.accept = function accept_150(arg0){ $lambda$6(this.$$outer_0, this.element_1, castTo(arg0, 149)); } ; var Lorg_eclipse_elk_core_util_ElkSpacings$AbstractSpacingsBuilder$lambda$6$Type_2_classLit = createForClass('org.eclipse.elk.core.util', 'ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type', 1389); function applyConfiguredNodeScaling(node){ var anchor, portLabels, scalingFactor, shape_0, shape$iterator; scalingFactor = $doubleValue(castToDouble($getProperty_0(node, ($clinit_CoreOptions() , SCALE_FACTOR)))); if (scalingFactor == 1) { return; } $setDimensions_0(node, scalingFactor * node.width_0, scalingFactor * node.height); portLabels = concat_0(transform_1((!node.ports && (node.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, node, 9, 9)) , node.ports), new ElkUtil$lambda$0$Type)); for (shape$iterator = $iterator(concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [(!node.labels && (node.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, node, 1, 7)) , node.labels), (!node.ports && (node.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, node, 9, 9)) , node.ports), portLabels]))); $hasNext_1(shape$iterator);) { shape_0 = castTo($next_0(shape$iterator), 422); shape_0.setLocation(scalingFactor * shape_0.getX(), scalingFactor * shape_0.getY()); shape_0.setDimensions(scalingFactor * shape_0.getWidth(), scalingFactor * shape_0.getHeight()); anchor = castTo(shape_0.getProperty(PORT_ANCHOR_0), 8); if (anchor) { anchor.x_0 *= scalingFactor; anchor.y_0 *= scalingFactor; } } } function applyVectorChain(vectorChain, section){ var bendpoint, elkBendPoint, firstPoint, lastPoint, newPointIter, nextPoint, oldPointIter; if (vectorChain.size_0 < 2) { throw toJs(new IllegalArgumentException_0('The vector chain must contain at least a source and a target point.')); } firstPoint = (checkCriticalElement(vectorChain.size_0 != 0) , castTo(vectorChain.header.next_0.value_0, 8)); $setStartLocation(section, firstPoint.x_0, firstPoint.y_0); oldPointIter = new AbstractEList$EListIterator((!section.bendPoints && (section.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, section, 5)) , section.bendPoints)); newPointIter = $listIterator_2(vectorChain, 1); while (newPointIter.currentIndex < vectorChain.size_0 - 1) { nextPoint = castTo($next_9(newPointIter), 8); if (oldPointIter.cursor != oldPointIter.this$01_2.size_1()) { bendpoint = castTo($doNext(oldPointIter), 377); } else { bendpoint = ($clinit_ElkGraphFactory() , elkBendPoint = new ElkBendPointImpl , elkBendPoint); $doAdd_0(oldPointIter, bendpoint); } $set_9(bendpoint, nextPoint.x_0, nextPoint.y_0); } while (oldPointIter.cursor != oldPointIter.this$01_2.size_1()) { $doNext(oldPointIter); $remove_36(oldPointIter); } lastPoint = (checkCriticalElement(vectorChain.size_0 != 0) , castTo(vectorChain.tail.prev.value_0, 8)); $setEndLocation(section, lastPoint.x_0, lastPoint.y_0); } function applyVisitors(graph, visitors){ var allElements, graphElement, i, nextElement; allElements = new ElkGraphUtil$PropertiesSkippingTreeIterator(graph); while (allElements.data_0 == null && !allElements.includeRoot?$hasAnyChildren(allElements):allElements.data_0 == null || allElements.size_0 != 0 && castTo(allElements.data_0[allElements.size_0 - 1], 51).hasNext_0()) { nextElement = castTo($next_13(allElements), 58); if (instanceOf(nextElement, 167)) { graphElement = castTo(nextElement, 167); for (i = 0; i < visitors.length; i++) { visitors[i].visit(graphElement); } } } } function calcPortOffset_0(port, side){ var node; if (!$getParent_3(port)) { throw toJs(new IllegalStateException_0('port must have a parent node to calculate the port side')); } node = $getParent_3(port); switch (side.ordinal) { case 1: return -(port.y_0 + port.height); case 2: return port.x_0 - node.width_0; case 3: return port.y_0 - node.height; case 4: return -(port.x_0 + port.width_0); } return 0; } function calcPortSide_0(port, direction){ var heightPercent, node, nodeHeight, nodeWidth, widthPercent, xpos, ypos; if (!$getParent_3(port)) { throw toJs(new IllegalStateException_0('port must have a parent node to calculate the port side')); } node = $getParent_3(port); nodeWidth = node.width_0; nodeHeight = node.height; if (nodeWidth <= 0 && nodeHeight <= 0) { return $clinit_PortSide() , UNDEFINED_5; } xpos = port.x_0; ypos = port.y_0; switch (direction.ordinal) { case 2: case 1: if (xpos < 0) { return $clinit_PortSide() , WEST_2; } else if (xpos + port.width_0 > nodeWidth) { return $clinit_PortSide() , EAST_2; } break; case 4: case 3: if (ypos < 0) { return $clinit_PortSide() , NORTH_3; } else if (ypos + port.height > nodeHeight) { return $clinit_PortSide() , SOUTH_2; } } widthPercent = (xpos + port.width_0 / 2) / nodeWidth; heightPercent = (ypos + port.height / 2) / nodeHeight; return widthPercent + heightPercent <= 1 && widthPercent - heightPercent <= 0?($clinit_PortSide() , WEST_2):widthPercent + heightPercent >= 1 && widthPercent - heightPercent >= 0?($clinit_PortSide() , EAST_2):heightPercent < 0.5?($clinit_PortSide() , NORTH_3):($clinit_PortSide() , SOUTH_2); } function computeChildAreaDimensions(node){ var bendpoint, bendpoint$iterator, eX, eY, edge, edge$iterator, edge$iterator0, edgeLabels, margins, maxX, maxY, minX, minY, sX, sY, section, section$iterator, shape_0, shape$iterator; minX = $intern_60; minY = $intern_60; maxX = 0; maxY = 0; edgeLabels = new ArrayList; for (edge$iterator0 = new AbstractEList$EIterator((!node.containedEdges && (node.containedEdges = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, node, 12, 3)) , node.containedEdges)); edge$iterator0.cursor != edge$iterator0.this$01_2.size_1();) { edge = castTo($doNext(edge$iterator0), 74); edgeLabels = concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [edgeLabels, (!edge.labels && (edge.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, edge, 1, 7)) , edge.labels)])); } for (shape$iterator = $iterator(concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [(!node.labels && (node.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, node, 1, 7)) , node.labels), (!node.children && (node.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, node, 10, 11)) , node.children), edgeLabels]))); $hasNext_1(shape$iterator);) { shape_0 = castTo($next_0(shape$iterator), 422); margins = castTo(shape_0.getProperty(($clinit_CoreOptions() , MARGINS_0)), 140); minX > shape_0.getX() - margins.left && (minX = shape_0.getX() - margins.left); minY > shape_0.getY() - margins.top_0 && (minY = shape_0.getY() - margins.top_0); maxX < shape_0.getX() + shape_0.getWidth() + margins.right && (maxX = shape_0.getX() + shape_0.getWidth() + margins.right); maxY < shape_0.getY() + shape_0.getHeight() + margins.bottom && (maxY = shape_0.getY() + shape_0.getHeight() + margins.bottom); } for (edge$iterator = new AbstractEList$EIterator((!node.containedEdges && (node.containedEdges = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, node, 12, 3)) , node.containedEdges)); edge$iterator.cursor != edge$iterator.this$01_2.size_1();) { edge = castTo($doNext(edge$iterator), 74); for (section$iterator = new AbstractEList$EIterator((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections)); section$iterator.cursor != section$iterator.this$01_2.size_1();) { section = castTo($doNext(section$iterator), 166); sX = section.startX; eX = section.endX; sY = section.startY; eY = section.endY; minX = $wnd.Math.min(minX, sX); minX = $wnd.Math.min(minX, eX); maxX = $wnd.Math.max(maxX, sX); maxX = $wnd.Math.max(maxX, eX); minY = $wnd.Math.min(minY, sY); minY = $wnd.Math.min(minY, eY); maxY = $wnd.Math.max(maxY, sY); maxY = $wnd.Math.max(maxY, eY); for (bendpoint$iterator = new AbstractEList$EIterator((!section.bendPoints && (section.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, section, 5)) , section.bendPoints)); bendpoint$iterator.cursor != bendpoint$iterator.this$01_2.size_1();) { bendpoint = castTo($doNext(bendpoint$iterator), 377); minX = $wnd.Math.min(minX, bendpoint.x_0); maxX = $wnd.Math.max(maxX, bendpoint.x_0); minY = $wnd.Math.min(minY, bendpoint.y_0); maxY = $wnd.Math.max(maxY, bendpoint.y_0); } } } $setProperty_1(node, ($clinit_CoreOptions() , CHILD_AREA_WIDTH), maxX - minX); $setProperty_1(node, CHILD_AREA_HEIGHT, maxY - minY); } function computeInsidePart(labelPosition, labelSize, portSize, portBorderOffset, portSide){ var insidePart; insidePart = 0; switch (portSide.ordinal) { case 1: insidePart = $wnd.Math.max(0, labelSize.y_0 + labelPosition.y_0 - (portSize.y_0 + portBorderOffset)); break; case 3: insidePart = $wnd.Math.max(0, -labelPosition.y_0 - portBorderOffset); break; case 2: insidePart = $wnd.Math.max(0, -labelPosition.x_0 - portBorderOffset); break; case 4: insidePart = $wnd.Math.max(0, labelSize.x_0 + labelPosition.x_0 - (portSize.x_0 + portBorderOffset)); } return insidePart; } function computeInsidePart_0(port, portBorderOffset){ var labelBounds; labelBounds = getLabelsBounds(port); return computeInsidePart(new KVector_1(labelBounds.x_0, labelBounds.y_0), new KVector_1(labelBounds.width_0, labelBounds.height), port.getSize(), portBorderOffset, port.getSide()); } function createVectorChain(edgeSection){ var bendPoint, bendPoint$iterator, chain; chain = new KVectorChain; $add_7(chain, new KVector_1(edgeSection.startX, edgeSection.startY)); for (bendPoint$iterator = new AbstractEList$EIterator((!edgeSection.bendPoints && (edgeSection.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, edgeSection, 5)) , edgeSection.bendPoints)); bendPoint$iterator.cursor != bendPoint$iterator.this$01_2.size_1();) { bendPoint = castTo($doNext(bendPoint$iterator), 377); $add_7(chain, new KVector_1(bendPoint.x_0, bendPoint.y_0)); } $add_7(chain, new KVector_1(edgeSection.endX, edgeSection.endY)); return chain; } function determineJunctionPoints(edge){ var junctionPoints; if ((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections).size_0 != 1) { throw toJs(new IllegalArgumentException_0('The edge needs to have exactly one edge section. Found: ' + (!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections).size_0)); } junctionPoints = new KVectorChain; !!connectableShapeToPort(castTo($get_20((!edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)) , edge.sources), 0), 84)) && $addAll(junctionPoints, determineJunctionPoints_0(edge, connectableShapeToPort(castTo($get_20((!edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)) , edge.sources), 0), 84)), false)); !!connectableShapeToPort(castTo($get_20((!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets), 0), 84)) && $addAll(junctionPoints, determineJunctionPoints_0(edge, connectableShapeToPort(castTo($get_20((!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets), 0), 84)), true)); return junctionPoints; } function determineJunctionPoints_0(edge, port, reverse){ var allConnectedSections, allSectIter, dx2, dx3, dy2, dy3, i, junctionPoints, offset, offsetMap, otherEdge, otherEdge$iterator, otherPoints, otherSection, p1, p2, p3, pointsMap, section, sectionPoints; section = castTo($get_20((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections), 0), 166); junctionPoints = new KVectorChain; pointsMap = new HashMap; sectionPoints = getPoints(section); $put_9(pointsMap.hashCodeMap, section, sectionPoints); offsetMap = new HashMap; allConnectedSections = new LinkedList; for (otherEdge$iterator = $iterator(concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [(!port.incomingEdges && (port.incomingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, port, 8, 5)) , port.incomingEdges), (!port.outgoingEdges && (port.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, port, 7, 4)) , port.outgoingEdges)]))); $hasNext_1(otherEdge$iterator);) { otherEdge = castTo($next_0(otherEdge$iterator), 74); if ((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections).size_0 != 1) { throw toJs(new IllegalArgumentException_0('The edge needs to have exactly one edge section. Found: ' + (!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections).size_0)); } if (otherEdge != edge) { otherSection = castTo($get_20((!otherEdge.sections && (otherEdge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, otherEdge, 6, 6)) , otherEdge.sections), 0), 166); $addNode_0(allConnectedSections, otherSection, allConnectedSections.tail.prev, allConnectedSections.tail); otherPoints = castTo(getEntryValueOrNull($getEntry_0(pointsMap.hashCodeMap, otherSection)), 13); if (!otherPoints) { otherPoints = getPoints(otherSection); $put_9(pointsMap.hashCodeMap, otherSection, otherPoints); } offset = reverse?$sub_0(new KVector_2(castTo($get_11(sectionPoints, sectionPoints.array.length - 1), 8)), castTo($get_11(otherPoints, otherPoints.array.length - 1), 8)):$sub_0(new KVector_2((checkCriticalElementIndex(0, sectionPoints.array.length) , castTo(sectionPoints.array[0], 8))), (checkCriticalElementIndex(0, otherPoints.array.length) , castTo(otherPoints.array[0], 8))); $put_9(offsetMap.hashCodeMap, otherSection, offset); } } if (allConnectedSections.size_0 != 0) { p1 = castTo($get_11(sectionPoints, reverse?sectionPoints.array.length - 1:0), 8); for (i = 1; i < sectionPoints.array.length; i++) { p2 = castTo($get_11(sectionPoints, reverse?sectionPoints.array.length - 1 - i:i), 8); allSectIter = $listIterator_2(allConnectedSections, 0); while (allSectIter.currentNode != allSectIter.this$01.tail) { otherSection = castTo($next_9(allSectIter), 166); otherPoints = castTo(getEntryValueOrNull($getEntry_0(pointsMap.hashCodeMap, otherSection)), 13); if (otherPoints.array.length <= i) { $remove_24(allSectIter); } else { p3 = $add_19(new KVector_2(castTo($get_11(otherPoints, reverse?otherPoints.array.length - 1 - i:i), 8)), castTo(getEntryValueOrNull($getEntry_0(offsetMap.hashCodeMap, otherSection)), 8)); if (p2.x_0 != p3.x_0 || p2.y_0 != p3.y_0) { dx2 = p2.x_0 - p1.x_0; dy2 = p2.y_0 - p1.y_0; dx3 = p3.x_0 - p1.x_0; dy3 = p3.y_0 - p1.y_0; dx3 * dy2 == dy3 * dx2 && (dx2 == 0 || isNaN(dx2)?dx2:dx2 < 0?-1:1) == (dx3 == 0 || isNaN(dx3)?dx3:dx3 < 0?-1:1) && (dy2 == 0 || isNaN(dy2)?dy2:dy2 < 0?-1:1) == (dy3 == 0 || isNaN(dy3)?dy3:dy3 < 0?-1:1)?($wnd.Math.abs(dx2) < $wnd.Math.abs(dx3) || $wnd.Math.abs(dy2) < $wnd.Math.abs(dy3)) && ($addNode_0(junctionPoints, p2, junctionPoints.tail.prev, junctionPoints.tail) , true):i > 1 && ($addNode_0(junctionPoints, p1, junctionPoints.tail.prev, junctionPoints.tail) , true); $remove_24(allSectIter); } } } p1 = p2; } } return junctionPoints; } function effectiveMinSizeConstraintFor(node){ var minSize, sizeConstraint, sizeOptions; sizeConstraint = castTo($getProperty_0(node, ($clinit_CoreOptions() , NODE_SIZE_CONSTRAINTS_6)), 21); if (sizeConstraint.contains(($clinit_SizeConstraint() , MINIMUM_SIZE))) { sizeOptions = castTo($getProperty_0(node, NODE_SIZE_OPTIONS_6), 21); minSize = new KVector_2(castTo($getProperty_0(node, NODE_SIZE_MINIMUM_5), 8)); if (sizeOptions.contains(($clinit_SizeOptions() , DEFAULT_MINIMUM_SIZE))) { minSize.x_0 <= 0 && (minSize.x_0 = 20); minSize.y_0 <= 0 && (minSize.y_0 = 20); } return minSize; } else { return new KVector; } } function getLabelsBounds(port){ var bounds, currentLabelBounds, label_0, label$iterator; bounds = null; for (label$iterator = new ArrayList$1(port.getLabels()); label$iterator.i < label$iterator.this$01.array.length;) { label_0 = castTo($next_6(label$iterator), 187); currentLabelBounds = new ElkRectangle_0(label_0.getPosition().x_0, label_0.getPosition().y_0, label_0.getSize().x_0, label_0.getSize().y_0); !bounds?(bounds = currentLabelBounds):$union(bounds, currentLabelBounds); } !bounds && (bounds = new ElkRectangle); return bounds; } function getPoints(section){ var i, n, p1, p2, p3, points; n = (!section.bendPoints && (section.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, section, 5)) , section.bendPoints).size_0 + 2; points = new ArrayList_0(n); $add_3(points, new KVector_1(section.startX, section.startY)); $forEach_3(new StreamImpl(null, (!section.bendPoints && (section.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, section, 5)) , new Spliterators$IteratorSpliterator(section.bendPoints, 16))), new ElkUtil$lambda$4$Type(points)); $add_3(points, new KVector_1(section.endX, section.endY)); i = 1; while (i < points.array.length - 1) { p1 = (checkCriticalElementIndex(i - 1, points.array.length) , castTo(points.array[i - 1], 8)); p2 = (checkCriticalElementIndex(i, points.array.length) , castTo(points.array[i], 8)); p3 = (checkCriticalElementIndex(i + 1, points.array.length) , castTo(points.array[i + 1], 8)); p1.x_0 == p2.x_0 && p2.x_0 == p3.x_0 || p1.y_0 == p2.y_0 && p2.y_0 == p3.y_0?$remove_11(points, i):++i; } return points; } function lambda$1_22(xoffset_0, yoffset_2, edge_2){ var junctionPoints; $forEach_3(new StreamImpl(null, (!edge_2.sections && (edge_2.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge_2, 6, 6)) , new Spliterators$IteratorSpliterator(edge_2.sections, 16))), new ElkUtil$lambda$2$Type(xoffset_0, yoffset_2)); $forEach_3(new StreamImpl(null, (!edge_2.labels && (edge_2.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, edge_2, 1, 7)) , new Spliterators$IteratorSpliterator(edge_2.labels, 16))), new ElkUtil$lambda$3$Type(xoffset_0, yoffset_2)); junctionPoints = castTo($getProperty_0(edge_2, ($clinit_CoreOptions() , JUNCTION_POINTS_0)), 75); !!junctionPoints && $offset_1(junctionPoints, xoffset_0, yoffset_2); } function lambda$2_15(xoffset_0, yoffset_2, s_2){ translate(s_2, xoffset_0, yoffset_2); } function lambda$3_10(xoffset_0, yoffset_2, label_2){ $setLocation_1(label_2, label_2.x_0 + xoffset_0, label_2.y_0 + yoffset_2); } function lambda$4_11(points_0, bendPoint_1){ return $add_3(points_0, new KVector_1(bendPoint_1.x_0, bendPoint_1.y_0)); } function printElementPath(element, builder){ var className, edge, identifier, label_0, label$iterator, sourceIter, targetIter, text_0; if (instanceOf(element.eContainer_0(), 167)) { printElementPath(castTo(element.eContainer_0(), 167), builder); builder.string += ' > '; } else { builder.string += 'Root '; } className = element.eClass_0().name_0; $equals_5(className.substr(0, 3), 'Elk')?$append_11(builder, (checkCriticalStringElementIndex(3, className.length + 1) , className.substr(3))):(builder.string += '' + className , builder); identifier = element.getIdentifier(); if (identifier) { $append_11((builder.string += ' ' , builder), identifier); return; } if (instanceOf(element, 366)) { text_0 = castTo(element, 135).text_0; if (text_0) { $append_11((builder.string += ' ' , builder), text_0); return; } } for (label$iterator = new AbstractEList$EIterator(element.getLabels_0()); label$iterator.cursor != label$iterator.this$01_2.size_1();) { label_0 = castTo($doNext(label$iterator), 135); text_0 = label_0.text_0; if (text_0) { $append_11((builder.string += ' ' , builder), text_0); return; } } if (instanceOf(element, 326)) { edge = castTo(element, 74); !edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)); if (edge.sources.size_0 != 0 && (!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets.size_0 != 0)) { builder.string += ' ('; sourceIter = new AbstractEList$EListIterator((!edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)) , edge.sources)); while (sourceIter.cursor != sourceIter.this$01_2.size_1()) { sourceIter.cursor > 0 && (builder.string += ', ' , builder); printElementPath(castTo($doNext(sourceIter), 167), builder); } builder.string += ' -> '; targetIter = new AbstractEList$EListIterator((!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets)); while (targetIter.cursor != targetIter.this$01_2.size_1()) { targetIter.cursor > 0 && (builder.string += ', ' , builder); printElementPath(castTo($doNext(targetIter), 167), builder); } builder.string += ')'; } } } function resizeNode_0(node){ var direction, minEast, minNorth, minSouth, minWest, newHeight, newWidth, port, port$iterator, portConstraints, portSide, sizeConstraint; sizeConstraint = castTo($getProperty_0(node, ($clinit_CoreOptions() , NODE_SIZE_CONSTRAINTS_6)), 21); if (sizeConstraint.isEmpty()) { return null; } newWidth = 0; newHeight = 0; if (sizeConstraint.contains(($clinit_SizeConstraint() , PORTS_0))) { portConstraints = castTo($getProperty_0(node, PORT_CONSTRAINTS_1), 101); minNorth = 2; minEast = 2; minSouth = 2; minWest = 2; direction = !$getParent_2(node)?castTo($getProperty_0(node, DIRECTION_1), 88):castTo($getProperty_0($getParent_2(node), DIRECTION_1), 88); for (port$iterator = new AbstractEList$EIterator((!node.ports && (node.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, node, 9, 9)) , node.ports)); port$iterator.cursor != port$iterator.this$01_2.size_1();) { port = castTo($doNext(port$iterator), 123); portSide = castTo($getProperty_0(port, PORT_SIDE_0), 64); if (portSide == ($clinit_PortSide() , UNDEFINED_5)) { portSide = calcPortSide_0(port, direction); $setProperty_1(port, PORT_SIDE_0, portSide); } if (portConstraints == ($clinit_PortConstraints() , FIXED_POS)) { switch (portSide.ordinal) { case 1: minNorth = $wnd.Math.max(minNorth, port.x_0 + port.width_0); break; case 2: minEast = $wnd.Math.max(minEast, port.y_0 + port.height); break; case 3: minSouth = $wnd.Math.max(minSouth, port.x_0 + port.width_0); break; case 4: minWest = $wnd.Math.max(minWest, port.y_0 + port.height); } } else { switch (portSide.ordinal) { case 1: minNorth += port.width_0 + 2; break; case 2: minEast += port.height + 2; break; case 3: minSouth += port.width_0 + 2; break; case 4: minWest += port.height + 2; } } } newWidth = $wnd.Math.max(minNorth, minSouth); newHeight = $wnd.Math.max(minEast, minWest); } return resizeNode_1(node, newWidth, newHeight, true, true); } function resizeNode_1(node, newWidth, newHeight, movePorts, moveLabels){ var all, direction, fixedPorts, heightDiff, heightPercent, heightRatio, label_0, label$iterator, midx, midy, newSize, oldSize, port, port$iterator, portSide, widthDiff, widthPercent, widthRatio; oldSize = new KVector_1(node.width_0, node.height); newSize = effectiveMinSizeConstraintFor(node); newSize.x_0 = $wnd.Math.max(newSize.x_0, newWidth); newSize.y_0 = $wnd.Math.max(newSize.y_0, newHeight); widthRatio = newSize.x_0 / oldSize.x_0; heightRatio = newSize.y_0 / oldSize.y_0; widthDiff = newSize.x_0 - oldSize.x_0; heightDiff = newSize.y_0 - oldSize.y_0; if (movePorts) { direction = !$getParent_2(node)?castTo($getProperty_0(node, ($clinit_CoreOptions() , DIRECTION_1)), 88):castTo($getProperty_0($getParent_2(node), ($clinit_CoreOptions() , DIRECTION_1)), 88); fixedPorts = maskUndefined($getProperty_0(node, ($clinit_CoreOptions() , PORT_CONSTRAINTS_1))) === maskUndefined(($clinit_PortConstraints() , FIXED_POS)); for (port$iterator = new AbstractEList$EIterator((!node.ports && (node.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, node, 9, 9)) , node.ports)); port$iterator.cursor != port$iterator.this$01_2.size_1();) { port = castTo($doNext(port$iterator), 123); portSide = castTo($getProperty_0(port, PORT_SIDE_0), 64); if (portSide == ($clinit_PortSide() , UNDEFINED_5)) { portSide = calcPortSide_0(port, direction); $setProperty_1(port, PORT_SIDE_0, portSide); } switch (portSide.ordinal) { case 1: fixedPorts || $setX_2(port, port.x_0 * widthRatio); break; case 2: $setX_2(port, port.x_0 + widthDiff); fixedPorts || $setY_3(port, port.y_0 * heightRatio); break; case 3: fixedPorts || $setX_2(port, port.x_0 * widthRatio); $setY_3(port, port.y_0 + heightDiff); break; case 4: fixedPorts || $setY_3(port, port.y_0 * heightRatio); } } } $setDimensions_0(node, newSize.x_0, newSize.y_0); if (moveLabels) { for (label$iterator = new AbstractEList$EIterator((!node.labels && (node.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, node, 1, 7)) , node.labels)); label$iterator.cursor != label$iterator.this$01_2.size_1();) { label_0 = castTo($doNext(label$iterator), 135); midx = label_0.x_0 + label_0.width_0 / 2; midy = label_0.y_0 + label_0.height / 2; widthPercent = midx / oldSize.x_0; heightPercent = midy / oldSize.y_0; if (widthPercent + heightPercent >= 1) { if (widthPercent - heightPercent > 0 && midy >= 0) { $setX_2(label_0, label_0.x_0 + widthDiff); $setY_3(label_0, label_0.y_0 + heightDiff * heightPercent); } else if (widthPercent - heightPercent < 0 && midx >= 0) { $setX_2(label_0, label_0.x_0 + widthDiff * widthPercent); $setY_3(label_0, label_0.y_0 + heightDiff); } } } } $setProperty_1(node, ($clinit_CoreOptions() , NODE_SIZE_CONSTRAINTS_6), ($clinit_SizeConstraint() , all = castTo($getEnumConstants(Lorg_eclipse_elk_core_options_SizeConstraint_2_classLit), 9) , new EnumSet$EnumSetImpl(all, castTo(createFrom(all, all.length), 9), 0))); return new KVector_1(widthRatio, heightRatio); } function toAbsolute(point, parent_0){ var node; node = parent_0; while (node) { $add_18(point, node.x_0, node.y_0); node = $getParent_2(node); } return point; } function toRelative(point, parent_0){ var node; node = parent_0; while (node) { $add_18(point, -node.x_0, -node.y_0); node = $getParent_2(node); } return point; } function translate(section, xoffset, yoffset){ var bendPoint, bendPoint$iterator; $setStartLocation(section, section.startX + xoffset, section.startY + yoffset); for (bendPoint$iterator = new AbstractEList$EIterator((!section.bendPoints && (section.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, section, 5)) , section.bendPoints)); bendPoint$iterator.cursor != bendPoint$iterator.this$01_2.size_1();) { bendPoint = castTo($doNext(bendPoint$iterator), 377); $set_9(bendPoint, bendPoint.x_0 + xoffset, bendPoint.y_0 + yoffset); } $setEndLocation(section, section.endX + xoffset, section.endY + yoffset); } function translate_0(parent_0, xoffset, yoffset){ var child, child$iterator; for (child$iterator = new AbstractEList$EIterator((!parent_0.children && (parent_0.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, parent_0, 10, 11)) , parent_0.children)); child$iterator.cursor != child$iterator.this$01_2.size_1();) { child = castTo($doNext(child$iterator), 27); $setLocation_1(child, child.x_0 + xoffset, child.y_0 + yoffset); } $forEach_0((!parent_0.containedEdges && (parent_0.containedEdges = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, parent_0, 12, 3)) , parent_0.containedEdges), new ElkUtil$lambda$1$Type(xoffset, yoffset)); } function translate_1(parent_0, newSize, oldSize){ var contentAlignment, xTranslate, yTranslate; contentAlignment = castTo($getProperty_0(parent_0, ($clinit_CoreOptions() , CONTENT_ALIGNMENT_2)), 21); xTranslate = 0; yTranslate = 0; newSize.x_0 > oldSize.x_0 && (contentAlignment.contains(($clinit_ContentAlignment() , H_CENTER))?(xTranslate = (newSize.x_0 - oldSize.x_0) / 2):contentAlignment.contains(H_RIGHT) && (xTranslate = newSize.x_0 - oldSize.x_0)); newSize.y_0 > oldSize.y_0 && (contentAlignment.contains(($clinit_ContentAlignment() , V_CENTER))?(yTranslate = (newSize.y_0 - oldSize.y_0) / 2):contentAlignment.contains(V_BOTTOM) && (yTranslate = newSize.y_0 - oldSize.y_0)); translate_0(parent_0, xTranslate, yTranslate); } function $apply_27(arg0){ return $getLabels_1(castTo(arg0, 123)); } function ElkUtil$lambda$0$Type(){ } defineClass(947, 1, {}, ElkUtil$lambda$0$Type); _.apply_0 = function apply_179(arg0){ return $apply_27(arg0); } ; _.equals_0 = function equals_205(other){ return this === other; } ; var Lorg_eclipse_elk_core_util_ElkUtil$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.core.util', 'ElkUtil/lambda$0$Type', 947); function ElkUtil$lambda$1$Type(xoffset_0, yoffset_2){ this.xoffset_0 = xoffset_0; this.yoffset_2 = yoffset_2; } defineClass(948, 1, $intern_19, ElkUtil$lambda$1$Type); _.accept = function accept_151(arg0){ lambda$1_22(this.xoffset_0, this.yoffset_2, castTo(arg0, 74)); } ; _.xoffset_0 = 0; _.yoffset_2 = 0; var Lorg_eclipse_elk_core_util_ElkUtil$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.core.util', 'ElkUtil/lambda$1$Type', 948); function ElkUtil$lambda$2$Type(xoffset_0, yoffset_2){ this.xoffset_0 = xoffset_0; this.yoffset_2 = yoffset_2; } defineClass(949, 1, $intern_19, ElkUtil$lambda$2$Type); _.accept = function accept_152(arg0){ lambda$2_15(this.xoffset_0, this.yoffset_2, castTo(arg0, 166)); } ; _.xoffset_0 = 0; _.yoffset_2 = 0; var Lorg_eclipse_elk_core_util_ElkUtil$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.core.util', 'ElkUtil/lambda$2$Type', 949); function ElkUtil$lambda$3$Type(xoffset_0, yoffset_2){ this.xoffset_0 = xoffset_0; this.yoffset_2 = yoffset_2; } defineClass(950, 1, $intern_19, ElkUtil$lambda$3$Type); _.accept = function accept_153(arg0){ lambda$3_10(this.xoffset_0, this.yoffset_2, castTo(arg0, 135)); } ; _.xoffset_0 = 0; _.yoffset_2 = 0; var Lorg_eclipse_elk_core_util_ElkUtil$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.core.util', 'ElkUtil/lambda$3$Type', 950); function ElkUtil$lambda$4$Type(points_0){ this.points_0 = points_0; } defineClass(951, 1, $intern_19, ElkUtil$lambda$4$Type); _.accept = function accept_154(arg0){ lambda$4_11(this.points_0, castTo(arg0, 377)); } ; var Lorg_eclipse_elk_core_util_ElkUtil$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.core.util', 'ElkUtil/lambda$4$Type', 951); function $compareTo_20(this$static, x_0){ return this$static.exclusiveLowerBound < doubleValue__D__devirtual$(x_0)?-1:1; } function ExclusiveBounds$ExclusiveLowerBound(){ this.exclusiveLowerBound = 0; } defineClass(325, 1, {34:1, 325:1}, ExclusiveBounds$ExclusiveLowerBound); _.compareTo_0 = function compareTo_21(x_0){ return $compareTo_20(this, castTo(x_0, 242)); } ; _.equals_0 = function equals_206(obj){ var other; if (instanceOf(obj, 325)) { other = castTo(obj, 325); return this.exclusiveLowerBound == other.exclusiveLowerBound; } return false; } ; _.hashCode_1 = function hashCode_70(){ return round_int(this.exclusiveLowerBound); } ; _.toString_0 = function toString_118(){ return this.exclusiveLowerBound + ' (exclusive)'; } ; _.exclusiveLowerBound = 0; var Lorg_eclipse_elk_core_util_ExclusiveBounds$ExclusiveLowerBound_2_classLit = createForClass('org.eclipse.elk.core.util', 'ExclusiveBounds/ExclusiveLowerBound', 325); function $processEdge(edge){ var bendPoints, edgeSection, edgeSection$iterator, elkEdgeSection, label_0, label$iterator, maxv, point, point$iterator, pos, sameHierarchy, sections, sourceParent, targetParent; sourceParent = $getParent_2(connectableShapeToNode(castTo($get_20((!edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)) , edge.sources), 0), 84))); targetParent = $getParent_2(connectableShapeToNode(castTo($get_20((!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets), 0), 84))); sameHierarchy = sourceParent == targetParent; maxv = new KVector; bendPoints = castTo($getProperty_0(edge, ($clinit_FixedLayouterOptions() , BEND_POINTS_0)), 75); if (!!bendPoints && bendPoints.size_0 >= 2) { if ((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections).size_0 == 0) { edgeSection = ($clinit_ElkGraphFactory() , elkEdgeSection = new ElkEdgeSectionImpl , elkEdgeSection); $add_21((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections), edgeSection); } else if ((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections).size_0 > 1) { sections = new AbstractEList$EListIterator((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections)); while (sections.cursor != sections.this$01_2.size_1()) { $remove_36(sections); } } applyVectorChain(bendPoints, castTo($get_20((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections), 0), 166)); } if (sameHierarchy) { for (edgeSection$iterator = new AbstractEList$EIterator((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections)); edgeSection$iterator.cursor != edgeSection$iterator.this$01_2.size_1();) { edgeSection = castTo($doNext(edgeSection$iterator), 166); for (point$iterator = new AbstractEList$EIterator((!edgeSection.bendPoints && (edgeSection.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, edgeSection, 5)) , edgeSection.bendPoints)); point$iterator.cursor != point$iterator.this$01_2.size_1();) { point = castTo($doNext(point$iterator), 377); maxv.x_0 = $wnd.Math.max(maxv.x_0, point.x_0); maxv.y_0 = $wnd.Math.max(maxv.y_0, point.y_0); } } } for (label$iterator = new AbstractEList$EIterator((!edge.labels && (edge.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, edge, 1, 7)) , edge.labels)); label$iterator.cursor != label$iterator.this$01_2.size_1();) { label_0 = castTo($doNext(label$iterator), 135); pos = castTo($getProperty_0(label_0, POSITION_3), 8); !!pos && $setLocation_1(label_0, pos.x_0, pos.y_0); if (sameHierarchy) { maxv.x_0 = $wnd.Math.max(maxv.x_0, label_0.x_0 + label_0.width_0); maxv.y_0 = $wnd.Math.max(maxv.y_0, label_0.y_0 + label_0.height); } } return maxv; } function FixedLayoutProvider(){ } defineClass(1119, 205, $intern_96, FixedLayoutProvider); _.layout = function layout_9(layoutNode, progressMonitor){ var edge, edge$iterator, edge$iterator0, edgeRouting, junctionPoints, label_0, label$iterator, label$iterator0, maxv, maxx, maxy, minSize, newHeight, newWidth, node, node$iterator, node$iterator0, padding, port, port$iterator, portx, porty, pos; progressMonitor.begin('Fixed Layout', 1); edgeRouting = castTo($getProperty_0(layoutNode, ($clinit_CoreOptions() , EDGE_ROUTING_0)), 223); maxx = 0; maxy = 0; for (node$iterator0 = new AbstractEList$EIterator((!layoutNode.children && (layoutNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, layoutNode, 10, 11)) , layoutNode.children)); node$iterator0.cursor != node$iterator0.this$01_2.size_1();) { node = castTo($doNext(node$iterator0), 27); pos = castTo($getProperty_0(node, ($clinit_FixedLayouterOptions() , POSITION_3)), 8); if (pos) { $setLocation_1(node, pos.x_0, pos.y_0); if (castTo($getProperty_0(node, NODE_SIZE_CONSTRAINTS_7), 181).contains(($clinit_SizeConstraint() , MINIMUM_SIZE))) { minSize = castTo($getProperty_0(node, NODE_SIZE_MINIMUM_6), 8); minSize.x_0 > 0 && minSize.y_0 > 0 && resizeNode_1(node, minSize.x_0, minSize.y_0, true, true); } } maxx = $wnd.Math.max(maxx, node.x_0 + node.width_0); maxy = $wnd.Math.max(maxy, node.y_0 + node.height); for (label$iterator0 = new AbstractEList$EIterator((!node.labels && (node.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, node, 1, 7)) , node.labels)); label$iterator0.cursor != label$iterator0.this$01_2.size_1();) { label_0 = castTo($doNext(label$iterator0), 135); pos = castTo($getProperty_0(label_0, POSITION_3), 8); !!pos && $setLocation_1(label_0, pos.x_0, pos.y_0); maxx = $wnd.Math.max(maxx, node.x_0 + label_0.x_0 + label_0.width_0); maxy = $wnd.Math.max(maxy, node.y_0 + label_0.y_0 + label_0.height); } for (port$iterator = new AbstractEList$EIterator((!node.ports && (node.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, node, 9, 9)) , node.ports)); port$iterator.cursor != port$iterator.this$01_2.size_1();) { port = castTo($doNext(port$iterator), 123); pos = castTo($getProperty_0(port, POSITION_3), 8); !!pos && $setLocation_1(port, pos.x_0, pos.y_0); portx = node.x_0 + port.x_0; porty = node.y_0 + port.y_0; maxx = $wnd.Math.max(maxx, portx + port.width_0); maxy = $wnd.Math.max(maxy, porty + port.height); for (label$iterator = new AbstractEList$EIterator((!port.labels && (port.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, port, 1, 7)) , port.labels)); label$iterator.cursor != label$iterator.this$01_2.size_1();) { label_0 = castTo($doNext(label$iterator), 135); pos = castTo($getProperty_0(label_0, POSITION_3), 8); !!pos && $setLocation_1(label_0, pos.x_0, pos.y_0); maxx = $wnd.Math.max(maxx, portx + label_0.x_0 + label_0.width_0); maxy = $wnd.Math.max(maxy, porty + label_0.y_0 + label_0.height); } } for (edge$iterator0 = new Iterators$ConcatenatedIterator(transform_2(allOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator0);) { edge = castTo($next_0(edge$iterator0), 74); maxv = $processEdge(edge); maxx = $wnd.Math.max(maxx, maxv.x_0); maxy = $wnd.Math.max(maxy, maxv.y_0); } for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2(allIncomingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 74); if ($getParent_2(getSourceNode(edge)) != layoutNode) { maxv = $processEdge(edge); maxx = $wnd.Math.max(maxx, maxv.x_0); maxy = $wnd.Math.max(maxy, maxv.y_0); } } } if (edgeRouting == ($clinit_EdgeRouting() , ORTHOGONAL)) { for (node$iterator = new AbstractEList$EIterator((!layoutNode.children && (layoutNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, layoutNode, 10, 11)) , layoutNode.children)); node$iterator.cursor != node$iterator.this$01_2.size_1();) { node = castTo($doNext(node$iterator), 27); for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2(allOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 74); junctionPoints = determineJunctionPoints(edge); junctionPoints.size_0 == 0?$setProperty_1(edge, JUNCTION_POINTS_0, null):$setProperty_1(edge, JUNCTION_POINTS_0, junctionPoints); } } } if (!$booleanValue(castToBoolean($getProperty_0(layoutNode, ($clinit_FixedLayouterOptions() , NODE_SIZE_FIXED_GRAPH_SIZE_4))))) { padding = castTo($getProperty_0(layoutNode, PADDING_7), 107); newWidth = maxx + padding.left + padding.right; newHeight = maxy + padding.top_0 + padding.bottom; resizeNode_1(layoutNode, newWidth, newHeight, true, true); } progressMonitor.done_1(); } ; var Lorg_eclipse_elk_core_util_FixedLayoutProvider_2_classLit = createForClass('org.eclipse.elk.core.util', 'FixedLayoutProvider', 1119); function IndividualSpacings(){ } function IndividualSpacings_0(other){ (!this.propertyMap?($clinit_Collections() , $clinit_Collections() , EMPTY_MAP):this.propertyMap).putAll(!other.propertyMap?($clinit_Collections() , $clinit_Collections() , EMPTY_MAP):other.propertyMap); } function getIndividualOrInherited_0(node, property){ var individualSpacings, result; result = null; if (node.hasProperty(($clinit_CoreOptions() , SPACING_INDIVIDUAL_0))) { individualSpacings = castTo(node.getProperty(SPACING_INDIVIDUAL_0), 96); individualSpacings.hasProperty(property) && (result = individualSpacings.getProperty(property)); } result == null && !!node.getGraph() && (result = node.getGraph().getProperty(property)); result == null && (result = $getDefault(property)); return result; } function lambda$0_43(entry_0){ return castTo(entry_0.getKey(), 149).getId() + ':' + toString_40(entry_0.getValue()); } defineClass(385, 137, {3:1, 423:1, 385:1, 96:1, 137:1}, IndividualSpacings, IndividualSpacings_0); _.parse_0 = function parse_3(string){ var e, option, optionData, optionString, optionString$array, optionString$index, optionString$max, options, value_0; if (!string) { return; } try { options = $split_0(string, ';,;'); for (optionString$array = options , optionString$index = 0 , optionString$max = optionString$array.length; optionString$index < optionString$max; ++optionString$index) { optionString = optionString$array[optionString$index]; option = $split_0(optionString, '\\:'); optionData = $getOptionDataBySuffix(getInstance(), option[0]); if (!optionData) { throw toJs(new IllegalArgumentException_0('Invalid option id: ' + option[0])); } value_0 = $parseValue(optionData, option[1]); if (value_0 == null) { throw toJs(new IllegalArgumentException_0('Invalid option value: ' + option[1])); } value_0 == null?(!this.propertyMap && (this.propertyMap = new HashMap) , $remove_6(this.propertyMap, optionData)):(!this.propertyMap && (this.propertyMap = new HashMap) , $put_6(this.propertyMap, optionData, value_0)); } } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 103)) { e = $e0; throw toJs(new IllegalArgumentException_1(e)); } else throw toJs($e0); } } ; _.toString_0 = function toString_119(){ var serialized; serialized = castToString($collect_1($map((!this.propertyMap?($clinit_Collections() , $clinit_Collections() , EMPTY_MAP):this.propertyMap).entrySet_0().stream(), new IndividualSpacings$lambda$0$Type), of_3(new Collectors$lambda$15$Type, new Collectors$9methodref$add$Type, new Collectors$10methodref$merge$Type, new Collectors$11methodref$toString$Type, stampJavaTypeInfo(getClassLiteralForArray(Ljava_util_stream_Collector$Characteristics_2_classLit, 1), $intern_37, 108, 0, [])))); return serialized; } ; var Lorg_eclipse_elk_core_util_IndividualSpacings_2_classLit = createForClass('org.eclipse.elk.core.util', 'IndividualSpacings', 385); function IndividualSpacings$lambda$0$Type(){ } defineClass(982, 1, {}, IndividualSpacings$lambda$0$Type); _.apply_0 = function apply_180(arg0){ return lambda$0_43(castTo(arg0, 44)); } ; var Lorg_eclipse_elk_core_util_IndividualSpacings$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.core.util', 'IndividualSpacings/lambda$0$Type', 982); function $fetch(this$static){ if (this$static.instances.size_0 == 0) { return this$static.factory.create_0(); } return $removeFirst_0(this$static.instances); } function $release(this$static, obj){ this$static.limit < 0 || this$static.instances.size_0 < this$static.limit?$addLast_0(this$static.instances, obj):this$static.factory.destroy(obj); } function InstancePool(thefactory){ this.instances = new LinkedList; this.factory = thefactory; this.limit = -1; } defineClass(718, 1, {}, InstancePool); _.limit = 0; var Lorg_eclipse_elk_core_util_InstancePool_2_classLit = createForClass('org.eclipse.elk.core.util', 'InstancePool', 718); function LoggedGraph(){ } defineClass(1835, 1, {}, LoggedGraph); var Lorg_eclipse_elk_core_util_LoggedGraph_2_classLit = createForClass('org.eclipse.elk.core.util', 'LoggedGraph', 1835); function $clinit_LoggedGraph$Type(){ $clinit_LoggedGraph$Type = emptyMethod; ELK = new LoggedGraph$Type('ELK', 0); JSON_0 = new LoggedGraph$Type('JSON', 1); DOT = new LoggedGraph$Type('DOT', 2); SVG = new LoggedGraph$Type('SVG', 3); } function LoggedGraph$Type(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_116(name_0){ $clinit_LoggedGraph$Type(); return valueOf(($clinit_LoggedGraph$Type$Map() , $MAP_106), name_0); } function values_124(){ $clinit_LoggedGraph$Type(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_util_LoggedGraph$Type_2_classLit, 1), $intern_37, 415, 0, [ELK, JSON_0, DOT, SVG]); } defineClass(415, 22, {3:1, 34:1, 22:1, 415:1}, LoggedGraph$Type); var DOT, ELK, JSON_0, SVG; var Lorg_eclipse_elk_core_util_LoggedGraph$Type_2_classLit = createForEnum('org.eclipse.elk.core.util', 'LoggedGraph/Type', 415, Ljava_lang_Enum_2_classLit, values_124, valueOf_116); function $clinit_LoggedGraph$Type$Map(){ $clinit_LoggedGraph$Type$Map = emptyMethod; $MAP_106 = createValueOfMap(($clinit_LoggedGraph$Type() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_util_LoggedGraph$Type_2_classLit, 1), $intern_37, 415, 0, [ELK, JSON_0, DOT, SVG]))); } var $MAP_106; function NullElkProgressMonitor(){ } defineClass(1063, 1, {871:1}, NullElkProgressMonitor); _.begin = function begin_1(name_0, totalWork){ return false; } ; _.done_1 = function done_0(){ } ; _.getExecutionTime = function getExecutionTime_0(){ return 0; } ; _.getLogs = function getLogs_0(){ return null; } ; _.getSubMonitors = function getSubMonitors_0(){ return null; } ; _.getTaskName = function getTaskName_0(){ return null; } ; _.isCanceled = function isCanceled_0(){ return false; } ; _.isLoggingEnabled = function isLoggingEnabled_0(){ return false; } ; _.isRunning = function isRunning_0(){ return false; } ; _.log_0 = function log_1(object){ } ; _.logGraph = function logGraph_0(graph, tag){ } ; _.subTask = function subTask_0(work){ return this; } ; _.worked = function worked_0(work){ } ; var Lorg_eclipse_elk_core_util_NullElkProgressMonitor_2_classLit = createForClass('org.eclipse.elk.core.util', 'NullElkProgressMonitor', 1063); function $setFirst(this$static, thefirst){ this$static.first = thefirst; } function $setSecond(this$static, thesecond){ this$static.second = thesecond; } function Pair(thefirst, thesecond){ this.first = thefirst; this.second = thesecond; } defineClass(42, 1, {20:1, 42:1}, Pair); _.forEach_0 = function forEach_36(action){ $forEach_0(this, action); } ; _.equals_0 = function equals_207(obj){ var firstEqual, other, secondEqual; if (instanceOf(obj, 42)) { other = castTo(obj, 42); firstEqual = this.first == null?other.first == null:equals_Ljava_lang_Object__Z__devirtual$(this.first, other.first); secondEqual = this.second == null?other.second == null:equals_Ljava_lang_Object__Z__devirtual$(this.second, other.second); return firstEqual && secondEqual; } else { return false; } } ; _.hashCode_1 = function hashCode_71(){ var first1, first2, firstCode, second1, second2, secondCode; firstCode = this.first == null?0:hashCode__I__devirtual$(this.first); first1 = firstCode & $intern_47; first2 = firstCode & -65536; secondCode = this.second == null?0:hashCode__I__devirtual$(this.second); second1 = secondCode & $intern_47; second2 = secondCode & -65536; return first1 ^ second2 >> 16 & $intern_47 | first2 ^ second1 << 16; } ; _.iterator_0 = function iterator_78(){ return new Pair$1(this); } ; _.toString_0 = function toString_120(){ return this.first == null && this.second == null?'pair(null,null)':this.first == null?'pair(null,' + toString_40(this.second) + ')':this.second == null?'pair(' + toString_40(this.first) + ',null)':'pair(' + toString_40(this.first) + ',' + toString_40(this.second) + ')'; } ; var Lorg_eclipse_elk_core_util_Pair_2_classLit = createForClass('org.eclipse.elk.core.util', 'Pair', 42); function Pair$1(this$0){ this.this$01 = this$0; } defineClass(995, 1, $intern_6, Pair$1); _.forEachRemaining = function forEachRemaining_51(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_40(){ return !this.visitedSecond && (!this.visitedFirst && this.this$01.first != null || this.this$01.second != null); } ; _.next_1 = function next_41(){ if (!this.visitedSecond && !this.visitedFirst && this.this$01.first != null) { this.visitedFirst = true; return this.this$01.first; } else if (!this.visitedSecond && this.this$01.second != null) { this.visitedSecond = true; return this.this$01.second; } throw toJs(new NoSuchElementException); } ; _.remove = function remove_97(){ this.visitedSecond && this.this$01.second != null?(this.this$01.second = null):this.visitedFirst && this.this$01.first != null && (this.this$01.first = null); throw toJs(new IllegalStateException); } ; _.visitedFirst = false; _.visitedSecond = false; var Lorg_eclipse_elk_core_util_Pair$1_2_classLit = createForClass('org.eclipse.elk.core.util', 'Pair/1', 995); function Quadruple(a, b, c, d){ this.first = a; this.second = b; this.third = c; this.fourth = d; } defineClass(455, 1, {455:1}, Quadruple); _.equals_0 = function equals_208(obj){ return equals_57(this.first, castTo(obj, 455).first) && equals_57(this.second, castTo(obj, 455).second) && equals_57(this.third, castTo(obj, 455).third) && equals_57(this.fourth, castTo(obj, 455).fourth); } ; _.hashCode_1 = function hashCode_72(){ return hashCode_47(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, [this.first, this.second, this.third, this.fourth])); } ; _.toString_0 = function toString_121(){ return '(' + this.first + ', ' + this.second + ', ' + this.third + ', ' + this.fourth + ')'; } ; var Lorg_eclipse_elk_core_util_Quadruple_2_classLit = createForClass('org.eclipse.elk.core.util', 'Quadruple', 455); function $randomize(edge, random, drawWidth, drawHeight){ var bendPoint, bendsNum, edgeSection, edgeSection0, elkBendPoint, elkEdgeSection, i, maxRand, randx, randy, sections, sourceHeight, sourcePX, sourcePY, sourcePort, sourceShape, sourceWidth, sourceX, sourceY, targetHeight, targetPX, targetPY, targetPort, targetShape, targetWidth, targetX, targetY, totalDist, x_0, xdiff, xincr, y_0, ydiff, yincr; sourceShape = castTo($get_20((!edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)) , edge.sources), 0), 84); sourceX = sourceShape.getX(); sourceY = sourceShape.getY(); sourceWidth = sourceShape.getWidth() / 2; sourceHeight = sourceShape.getHeight() / 2; if (instanceOf(sourceShape, 193)) { sourcePort = castTo(sourceShape, 123); sourceX += $getParent_3(sourcePort).x_0; sourceX += $getParent_3(sourcePort).x_0; } sourceX += sourceWidth; sourceY += sourceHeight; targetShape = castTo($get_20((!edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)) , edge.sources), 0), 84); targetX = targetShape.getX(); targetY = targetShape.getY(); targetWidth = targetShape.getWidth() / 2; targetHeight = targetShape.getHeight() / 2; if (instanceOf(targetShape, 193)) { targetPort = castTo(targetShape, 123); targetX += $getParent_3(targetPort).x_0; targetX += $getParent_3(targetPort).x_0; } targetX += targetWidth; targetY += targetHeight; if ((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections).size_0 == 0) { edgeSection0 = ($clinit_ElkGraphFactory() , elkEdgeSection = new ElkEdgeSectionImpl , elkEdgeSection); $add_21((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections), edgeSection0); } else if ((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections).size_0 > 1) { sections = new AbstractEList$EListIterator((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections)); while (sections.cursor != sections.this$01_2.size_1()) { $remove_36(sections); } } edgeSection = castTo($get_20((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections), 0), 166); sourcePX = targetX; targetX > sourceX + sourceWidth?(sourcePX = sourceX + sourceWidth):targetX < sourceX - sourceWidth && (sourcePX = sourceX - sourceWidth); sourcePY = targetY; targetY > sourceY + sourceHeight?(sourcePY = sourceY + sourceHeight):targetY < sourceY - sourceHeight && (sourcePY = sourceY - sourceHeight); sourcePX > sourceX - sourceWidth && sourcePX < sourceX + sourceWidth && sourcePY > sourceY - sourceHeight && sourcePY < sourceY + sourceHeight && (sourcePX = sourceX + sourceWidth); $setStartX(edgeSection, sourcePX); $setStartY(edgeSection, sourcePY); targetPX = sourceX; sourceX > targetX + targetWidth?(targetPX = targetX + targetWidth):sourceX < targetX - targetWidth && (targetPX = targetX - targetWidth); targetPY = sourceY; sourceY > targetY + targetHeight?(targetPY = targetY + targetHeight):sourceY < targetY - targetHeight && (targetPY = targetY - targetHeight); targetPX > targetX - targetWidth && targetPX < targetX + targetWidth && targetPY > targetY - targetHeight && targetPY < targetY + targetHeight && (targetPY = targetY + targetHeight); $setEndX(edgeSection, targetPX); $setEndY(edgeSection, targetPY); $clear_13((!edgeSection.bendPoints && (edgeSection.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, edgeSection, 5)) , edgeSection.bendPoints)); bendsNum = $nextInt(random, 5); sourceShape == targetShape && ++bendsNum; xdiff = targetPX - sourcePX; ydiff = targetPY - sourcePY; totalDist = $wnd.Math.sqrt(xdiff * xdiff + ydiff * ydiff); maxRand = totalDist * 0.20000000298023224; xincr = xdiff / (bendsNum + 1); yincr = ydiff / (bendsNum + 1); x_0 = sourcePX; y_0 = sourcePY; for (i = 0; i < bendsNum; i++) { x_0 += xincr; y_0 += yincr; randx = x_0 + $nextInternal(random, 24) * $intern_81 * maxRand - maxRand / 2; randx < 0?(randx = 1):randx > drawWidth && (randx = drawWidth - 1); randy = y_0 + $nextInternal(random, 24) * $intern_81 * maxRand - maxRand / 2; randy < 0?(randy = 1):randy > drawHeight && (randy = drawHeight - 1); bendPoint = ($clinit_ElkGraphFactory() , elkBendPoint = new ElkBendPointImpl , elkBendPoint); $setX_1(bendPoint, randx); $setY_2(bendPoint, randy); $add_21((!edgeSection.bendPoints && (edgeSection.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, edgeSection, 5)) , edgeSection.bendPoints), bendPoint); } } function $randomize_0(parent_0, random, aspectRatio, spacing, padding){ var areaSqrt, drawArea, drawHeight, drawWidth, edge, edge$iterator, height, m, maxHeight, maxWidth, n, node, node$iterator, node$iterator0, nodesArea, source, source$iterator, totalHeight, totalWidth, width_0, x_0, y_0; nodesArea = 0; maxWidth = 0; maxHeight = 0; m = 1; for (node$iterator0 = new AbstractEList$EIterator((!parent_0.children && (parent_0.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, parent_0, 10, 11)) , parent_0.children)); node$iterator0.cursor != node$iterator0.this$01_2.size_1();) { node = castTo($doNext(node$iterator0), 27); m += size_24(new Iterators$ConcatenatedIterator(transform_2(allOutgoingEdges(node).val$inputs1.iterator_0(), new Iterables$10))); width_0 = node.width_0; maxWidth = $wnd.Math.max(maxWidth, width_0); height = node.height; maxHeight = $wnd.Math.max(maxHeight, height); nodesArea += width_0 * height; } n = (!parent_0.children && (parent_0.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, parent_0, 10, 11)) , parent_0.children).size_0; drawArea = nodesArea + 2 * spacing * spacing * m * n; areaSqrt = $wnd.Math.sqrt(drawArea); drawWidth = $wnd.Math.max(areaSqrt * aspectRatio, maxWidth); drawHeight = $wnd.Math.max(areaSqrt / aspectRatio, maxHeight); for (node$iterator = new AbstractEList$EIterator((!parent_0.children && (parent_0.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, parent_0, 10, 11)) , parent_0.children)); node$iterator.cursor != node$iterator.this$01_2.size_1();) { node = castTo($doNext(node$iterator), 27); x_0 = padding.left + ($nextInternal(random, 26) * $intern_78 + $nextInternal(random, 27) * $intern_79) * (drawWidth - node.width_0); y_0 = padding.left + ($nextInternal(random, 26) * $intern_78 + $nextInternal(random, 27) * $intern_79) * (drawHeight - node.height); $setX_2(node, x_0); $setY_3(node, y_0); } totalWidth = drawWidth + (padding.left + padding.right); totalHeight = drawHeight + (padding.top_0 + padding.bottom); for (source$iterator = new AbstractEList$EIterator((!parent_0.children && (parent_0.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, parent_0, 10, 11)) , parent_0.children)); source$iterator.cursor != source$iterator.this$01_2.size_1();) { source = castTo($doNext(source$iterator), 27); for (edge$iterator = new Iterators$ConcatenatedIterator(transform_2(allOutgoingEdges(source).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(edge$iterator);) { edge = castTo($next_0(edge$iterator), 74); $isHierarchical(edge) || $randomize(edge, random, totalWidth, totalHeight); } } totalWidth += padding.left + padding.right; totalHeight += padding.top_0 + padding.bottom; resizeNode_1(parent_0, totalWidth, totalHeight, false, true); } function RandomLayoutProvider(){ } defineClass(1108, 205, $intern_96, RandomLayoutProvider); _.layout = function layout_10(parentNode, progressMonitor){ var aspectRatio, padding, random, randomSeed, spacing; progressMonitor.begin('Random Layout', 1); if ((!parentNode.children && (parentNode.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, parentNode, 10, 11)) , parentNode.children).size_0 == 0) { progressMonitor.done_1(); return; } randomSeed = castTo($getProperty_0(parentNode, ($clinit_RandomLayouterOptions() , RANDOM_SEED_2)), 17); !!randomSeed && randomSeed.value_0 != 0?(random = new Random_0(randomSeed.value_0)):(random = new Random); aspectRatio = $floatValue(castToDouble($getProperty_0(parentNode, ASPECT_RATIO_6))); spacing = $floatValue(castToDouble($getProperty_0(parentNode, SPACING_NODE_NODE_7))); padding = castTo($getProperty_0(parentNode, PADDING_8), 107); $randomize_0(parentNode, random, aspectRatio, spacing, padding); progressMonitor.done_1(); } ; var Lorg_eclipse_elk_core_util_RandomLayoutProvider_2_classLit = createForClass('org.eclipse.elk.core.util', 'RandomLayoutProvider', 1108); function Triple(f, s, t){ this.first = f; this.second = s; this.third = t; } defineClass(240, 1, {240:1}, Triple); _.equals_0 = function equals_209(obj){ return equals_57(this.first, castTo(obj, 240).first) && equals_57(this.second, castTo(obj, 240).second) && equals_57(this.third, castTo(obj, 240).third); } ; _.hashCode_1 = function hashCode_73(){ return hashCode_47(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, [this.first, this.second, this.third])); } ; _.toString_0 = function toString_122(){ return '(' + this.first + ', ' + this.second + ', ' + this.third + ')'; } ; var Lorg_eclipse_elk_core_util_Triple_2_classLit = createForClass('org.eclipse.elk.core.util', 'Triple', 240); function $clinit_ElkGraphAdapters(){ $clinit_ElkGraphAdapters = emptyMethod; DEFAULT_PORTLIST_SORTER_0 = new ElkGraphAdapters$PortComparator; } var DEFAULT_PORTLIST_SORTER_0; function $clinit_ElkGraphAdapters$AbstractElkGraphElementAdapter(){ $clinit_ElkGraphAdapters$AbstractElkGraphElementAdapter = emptyMethod; OFFSET_PROXY = new Property_2(($clinit_CoreOptions() , PORT_BORDER_OFFSET_0), 0); } defineClass(562, 1, {}); _.getPosition = function getPosition_1(){ return new KVector_1(this.element.x_0, this.element.y_0); } ; _.getProperty = function getProperty_2(prop){ if ($equals_10(prop, ($clinit_CoreOptions() , PORT_BORDER_OFFSET_0))) { return $getProperty_0(this.element, OFFSET_PROXY); } return $getProperty_0(this.element, prop); } ; _.getSize = function getSize_3(){ return new KVector_1(this.element.width_0, this.element.height); } ; _.getVolatileId = function getVolatileId_1(){ return this.id_0; } ; _.hasProperty = function hasProperty_2(prop){ return $hasProperty_0(this.element, prop); } ; _.setPosition = function setPosition_1(pos){ $setX_2(this.element, pos.x_0); $setY_3(this.element, pos.y_0); } ; _.setSize = function setSize_1(size_0){ $setWidth_0(this.element, size_0.x_0); $setHeight_0(this.element, size_0.y_0); } ; _.setVolatileId = function setVolatileId_1(volatileId){ this.id_0 = volatileId; } ; _.id_0 = 0; var OFFSET_PROXY; var Lorg_eclipse_elk_core_util_adapters_ElkGraphAdapters$AbstractElkGraphElementAdapter_2_classLit = createForClass('org.eclipse.elk.core.util.adapters', 'ElkGraphAdapters/AbstractElkGraphElementAdapter', 562); function ElkGraphAdapters$ElkEdgeAdapter(edge){ this.element = edge; } defineClass(563, 1, {853:1}, ElkGraphAdapters$ElkEdgeAdapter); _.getLabels = function getLabels_2(){ var l, l$iterator; if (!this.labelAdapters) { this.labelAdapters = newArrayListWithExpectedSize($getLabels_1(this.element).size_0); for (l$iterator = new AbstractEList$EIterator($getLabels_1(this.element)); l$iterator.cursor != l$iterator.this$01_2.size_1();) { l = castTo($doNext(l$iterator), 135); $add_3(this.labelAdapters, new ElkGraphAdapters$ElkLabelAdapter(l)); } } return this.labelAdapters; } ; _.labelAdapters = null; var Lorg_eclipse_elk_core_util_adapters_ElkGraphAdapters$ElkEdgeAdapter_2_classLit = createForClass('org.eclipse.elk.core.util.adapters', 'ElkGraphAdapters/ElkEdgeAdapter', 563); function $getNodes(this$static){ var n, n$iterator; if (!this$static.childNodes) { this$static.childNodes = newArrayListWithExpectedSize($getChildren(castTo(this$static.element, 27)).size_0); for (n$iterator = new AbstractEList$EIterator($getChildren(castTo(this$static.element, 27))); n$iterator.cursor != n$iterator.this$01_2.size_1();) { n = castTo($doNext(n$iterator), 27); $add_3(this$static.childNodes, new ElkGraphAdapters$ElkNodeAdapter(this$static, n)); } } return this$static.childNodes; } function ElkGraphAdapters$ElkGraphAdapter(node){ $clinit_ElkGraphAdapters$AbstractElkGraphElementAdapter(); this.element = node; } defineClass(289, 562, {}, ElkGraphAdapters$ElkGraphAdapter); _.getNodes = function getNodes_0(){ return $getNodes(this); } ; _.childNodes = null; var Lorg_eclipse_elk_core_util_adapters_ElkGraphAdapters$ElkGraphAdapter_2_classLit = createForClass('org.eclipse.elk.core.util.adapters', 'ElkGraphAdapters/ElkGraphAdapter', 289); function ElkGraphAdapters$ElkLabelAdapter(label_0){ $clinit_ElkGraphAdapters$AbstractElkGraphElementAdapter(); this.element = label_0; } defineClass(640, 562, {187:1}, ElkGraphAdapters$ElkLabelAdapter); var Lorg_eclipse_elk_core_util_adapters_ElkGraphAdapters$ElkLabelAdapter_2_classLit = createForClass('org.eclipse.elk.core.util.adapters', 'ElkGraphAdapters/ElkLabelAdapter', 640); function $getLabels(this$static){ var l, l$iterator; if (!this$static.labelAdapters) { this$static.labelAdapters = newArrayListWithExpectedSize(castTo(this$static.element, 27).getLabels_0().size_0); for (l$iterator = new AbstractEList$EIterator(castTo(this$static.element, 27).getLabels_0()); l$iterator.cursor != l$iterator.this$01_2.size_1();) { l = castTo($doNext(l$iterator), 135); $add_3(this$static.labelAdapters, new ElkGraphAdapters$ElkLabelAdapter(l)); } } return this$static.labelAdapters; } function $getPorts_2(this$static){ var p, p$iterator; if (!this$static.portAdapters) { this$static.portAdapters = newArrayListWithExpectedSize($getPorts_3(castTo(this$static.element, 27)).size_0); for (p$iterator = new AbstractEList$EIterator($getPorts_3(castTo(this$static.element, 27))); p$iterator.cursor != p$iterator.this$01_2.size_1();) { p = castTo($doNext(p$iterator), 123); $add_3(this$static.portAdapters, new ElkGraphAdapters$ElkPortAdapter(p)); } } return this$static.portAdapters; } function $sortPortList_1(this$static, comparator){ $isOrderFixed(castTo(castTo(this$static.element, 27).getProperty(($clinit_CoreOptions() , PORT_CONSTRAINTS_1)), 101)) && sort_14($getPorts_3(castTo(this$static.element, 27)), comparator); } function ElkGraphAdapters$ElkNodeAdapter(parent_0, node){ $clinit_ElkGraphAdapters$AbstractElkGraphElementAdapter(); this.element = node; this.parentGraphAdapter = parent_0; } defineClass(639, 562, {695:1}, ElkGraphAdapters$ElkNodeAdapter); _.getLabels = function getLabels_3(){ return $getLabels(this); } ; _.getMargin = function getMargin_0(){ var margins; return margins = castTo($getProperty_0(this.element, ($clinit_CoreOptions() , MARGINS_0)), 140) , !margins && (margins = new ElkMargin) , margins; } ; _.getPorts = function getPorts_0(){ return $getPorts_2(this); } ; _.setMargin = function setMargin_0(margin){ var newMargin; newMargin = new ElkMargin_2(margin); $setProperty_1(this.element, ($clinit_CoreOptions() , MARGINS_0), newMargin); } ; _.setPadding = function setPadding_0(padding){ $setProperty_1(this.element, ($clinit_CoreOptions() , PADDING_6), new ElkPadding_1(padding)); } ; _.getGraph = function getGraph_0(){ return this.parentGraphAdapter; } ; _.getIncomingEdges = function getIncomingEdges_1(){ var e, e$iterator; if (!this.incomingEdgeAdapters) { this.incomingEdgeAdapters = new ArrayList; for (e$iterator = new Iterators$ConcatenatedIterator(transform_2(allIncomingEdges(castTo(this.element, 27)).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 74); $add_3(this.incomingEdgeAdapters, new ElkGraphAdapters$ElkEdgeAdapter(e)); } } return this.incomingEdgeAdapters; } ; _.getOutgoingEdges = function getOutgoingEdges_1(){ var e, e$iterator; if (!this.outgoingEdgeAdapters) { this.outgoingEdgeAdapters = new ArrayList; for (e$iterator = new Iterators$ConcatenatedIterator(transform_2(allOutgoingEdges(castTo(this.element, 27)).val$inputs1.iterator_0(), new Iterables$10)); $hasNext_1(e$iterator);) { e = castTo($next_0(e$iterator), 74); $add_3(this.outgoingEdgeAdapters, new ElkGraphAdapters$ElkEdgeAdapter(e)); } } return this.outgoingEdgeAdapters; } ; _.isCompoundNode = function isCompoundNode_0(){ return $getChildren(castTo(this.element, 27)).size_0 != 0 || $booleanValue(castToBoolean(castTo(this.element, 27).getProperty(($clinit_CoreOptions() , INSIDE_SELF_LOOPS_ACTIVATE_0)))); } ; _.sortPortList = function sortPortList_0(){ $sortPortList_1(this, ($clinit_ElkGraphAdapters() , DEFAULT_PORTLIST_SORTER_0)); } ; _.incomingEdgeAdapters = null; _.labelAdapters = null; _.outgoingEdgeAdapters = null; _.parentGraphAdapter = null; _.portAdapters = null; var Lorg_eclipse_elk_core_util_adapters_ElkGraphAdapters$ElkNodeAdapter_2_classLit = createForClass('org.eclipse.elk.core.util.adapters', 'ElkGraphAdapters/ElkNodeAdapter', 639); function $getLabels_0(this$static){ var l, l$iterator; if (!this$static.labelAdapters) { this$static.labelAdapters = newArrayListWithExpectedSize(castTo(this$static.element, 123).getLabels_0().size_0); for (l$iterator = new AbstractEList$EIterator(castTo(this$static.element, 123).getLabels_0()); l$iterator.cursor != l$iterator.this$01_2.size_1();) { l = castTo($doNext(l$iterator), 135); $add_3(this$static.labelAdapters, new ElkGraphAdapters$ElkLabelAdapter(l)); } } return this$static.labelAdapters; } function ElkGraphAdapters$ElkPortAdapter(port){ this.element = port; } defineClass(1284, 562, {852:1}, ElkGraphAdapters$ElkPortAdapter); _.getLabels = function getLabels_4(){ return $getLabels_0(this); } ; _.getIncomingEdges = function getIncomingEdges_2(){ var e, e$iterator; if (!this.incomingEdgeAdapters) { this.incomingEdgeAdapters = newArrayListWithCapacity(castTo(this.element, 123).getIncomingEdges_0().size_0); for (e$iterator = new AbstractEList$EIterator(castTo(this.element, 123).getIncomingEdges_0()); e$iterator.cursor != e$iterator.this$01_2.size_1();) { e = castTo($doNext(e$iterator), 74); $add_3(this.incomingEdgeAdapters, new ElkGraphAdapters$ElkEdgeAdapter(e)); } } return this.incomingEdgeAdapters; } ; _.getOutgoingEdges = function getOutgoingEdges_2(){ var e, e$iterator; if (!this.outgoingEdgeAdapters) { this.outgoingEdgeAdapters = newArrayListWithCapacity(castTo(this.element, 123).getOutgoingEdges_0().size_0); for (e$iterator = new AbstractEList$EIterator(castTo(this.element, 123).getOutgoingEdges_0()); e$iterator.cursor != e$iterator.this$01_2.size_1();) { e = castTo($doNext(e$iterator), 74); $add_3(this.outgoingEdgeAdapters, new ElkGraphAdapters$ElkEdgeAdapter(e)); } } return this.outgoingEdgeAdapters; } ; _.getSide = function getSide_0(){ return castTo(castTo(this.element, 123).getProperty(($clinit_CoreOptions() , PORT_SIDE_0)), 64); } ; _.hasCompoundConnections = function hasCompoundConnections_0(){ var edge, edge$iterator, edge$iterator0, node, source, source$iterator, target, target$iterator; node = $getParent_3(castTo(this.element, 123)); for (edge$iterator0 = new AbstractEList$EIterator(castTo(this.element, 123).getOutgoingEdges_0()); edge$iterator0.cursor != edge$iterator0.this$01_2.size_1();) { edge = castTo($doNext(edge$iterator0), 74); for (target$iterator = new AbstractEList$EIterator((!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets)); target$iterator.cursor != target$iterator.this$01_2.size_1();) { target = castTo($doNext(target$iterator), 84); if (isDescendant_0(connectableShapeToNode(target), node)) { return true; } else if (connectableShapeToNode(target) == node && $booleanValue(castToBoolean($getProperty_0(edge, ($clinit_CoreOptions() , INSIDE_SELF_LOOPS_YO_0))))) { return true; } } } for (edge$iterator = new AbstractEList$EIterator(castTo(this.element, 123).getIncomingEdges_0()); edge$iterator.cursor != edge$iterator.this$01_2.size_1();) { edge = castTo($doNext(edge$iterator), 74); for (source$iterator = new AbstractEList$EIterator((!edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)) , edge.sources)); source$iterator.cursor != source$iterator.this$01_2.size_1();) { source = castTo($doNext(source$iterator), 84); if (isDescendant_0(connectableShapeToNode(source), node)) { return true; } } } return false; } ; _.incomingEdgeAdapters = null; _.labelAdapters = null; _.outgoingEdgeAdapters = null; var Lorg_eclipse_elk_core_util_adapters_ElkGraphAdapters$ElkPortAdapter_2_classLit = createForClass('org.eclipse.elk.core.util.adapters', 'ElkGraphAdapters/ElkPortAdapter', 1284); function $compare_28(port1, port2){ var index1, index2, indexDifference, ordinalDifference; ordinalDifference = castTo($getProperty_0(port1, ($clinit_CoreOptions() , PORT_SIDE_0)), 64).ordinal - castTo($getProperty_0(port2, PORT_SIDE_0), 64).ordinal; if (ordinalDifference != 0) { return ordinalDifference; } index1 = castTo($getProperty_0(port1, PORT_INDEX_0), 17); index2 = castTo($getProperty_0(port2, PORT_INDEX_0), 17); if (!!index1 && !!index2) { indexDifference = index1.value_0 - index2.value_0; if (indexDifference != 0) { return indexDifference; } } switch (castTo($getProperty_0(port1, PORT_SIDE_0), 64).ordinal) { case 1: return compare_4(port1.x_0, port2.x_0); case 2: return compare_4(port1.y_0, port2.y_0); case 3: return compare_4(port2.x_0, port1.x_0); case 4: return compare_4(port2.y_0, port1.y_0); default:throw toJs(new IllegalStateException_0('Port side is undefined')); } } function ElkGraphAdapters$PortComparator(){ } defineClass(1285, 1, $intern_88, ElkGraphAdapters$PortComparator); _.compare_1 = function compare_113(port1, port2){ return $compare_28(castTo(port1, 123), castTo(port2, 123)); } ; _.equals_0 = function equals_210(other){ return this === other; } ; _.reversed = function reversed_105(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_core_util_adapters_ElkGraphAdapters$PortComparator_2_classLit = createForClass('org.eclipse.elk.core.util.adapters', 'ElkGraphAdapters/PortComparator', 1285); var Lorg_eclipse_emf_ecore_EObject_2_classLit = createForInterface('org.eclipse.emf.ecore', 'EObject'); var Lorg_eclipse_elk_graph_EMapPropertyHolder_2_classLit = createForInterface('org.eclipse.elk.graph', 'EMapPropertyHolder'); var Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit = createForInterface('org.eclipse.elk.graph', 'ElkBendPoint'); var Lorg_eclipse_elk_graph_ElkGraphElement_2_classLit = createForInterface('org.eclipse.elk.graph', 'ElkGraphElement'); var Lorg_eclipse_elk_graph_ElkShape_2_classLit = createForInterface('org.eclipse.elk.graph', 'ElkShape'); var Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit = createForInterface('org.eclipse.elk.graph', 'ElkConnectableShape'); var Lorg_eclipse_elk_graph_ElkEdge_2_classLit = createForInterface('org.eclipse.elk.graph', 'ElkEdge'); var Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit = createForInterface('org.eclipse.elk.graph', 'ElkEdgeSection'); var Lorg_eclipse_emf_ecore_EModelElement_2_classLit = createForInterface('org.eclipse.emf.ecore', 'EModelElement'); var Lorg_eclipse_emf_ecore_EFactory_2_classLit = createForInterface('org.eclipse.emf.ecore', 'EFactory'); function $clinit_ElkGraphFactory(){ $clinit_ElkGraphFactory = emptyMethod; eINSTANCE = init_1(); } var eINSTANCE; var Lorg_eclipse_emf_ecore_ENamedElement_2_classLit = createForInterface('org.eclipse.emf.ecore', 'ENamedElement'); var Lorg_eclipse_emf_ecore_EPackage_2_classLit = createForInterface('org.eclipse.emf.ecore', 'EPackage'); function $clinit_ElkGraphPackage(){ $clinit_ElkGraphPackage = emptyMethod; eINSTANCE_0 = init_2(); } var eINSTANCE_0; function $clinit_ElkGraphPackage$Literals(){ $clinit_ElkGraphPackage$Literals = emptyMethod; $clinit_ElkGraphPackage(); EMAP_PROPERTY_HOLDER = eINSTANCE_0.eMapPropertyHolderEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_0.eMapPropertyHolderEClass), 0), 19); ELK_GRAPH_ELEMENT = eINSTANCE_0.elkGraphElementEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkGraphElementEClass), 0), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkGraphElementEClass), 1), 35); ELK_SHAPE = eINSTANCE_0.elkShapeEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkShapeEClass), 0), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkShapeEClass), 1), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkShapeEClass), 2), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkShapeEClass), 3), 35); ELK_LABEL = eINSTANCE_0.elkLabelEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkLabelEClass), 0), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkLabelEClass), 1), 35); ELK_CONNECTABLE_SHAPE = eINSTANCE_0.elkConnectableShapeEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkConnectableShapeEClass), 0), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkConnectableShapeEClass), 1), 19); ELK_NODE = eINSTANCE_0.elkNodeEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkNodeEClass), 0), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkNodeEClass), 1), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkNodeEClass), 2), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkNodeEClass), 3), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkNodeEClass), 4), 35); ELK_PORT = eINSTANCE_0.elkPortEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkPortEClass), 0), 19); ELK_EDGE = eINSTANCE_0.elkEdgeEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkEdgeEClass), 0), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkEdgeEClass), 1), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkEdgeEClass), 2), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkEdgeEClass), 3), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkEdgeEClass), 4), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkEdgeEClass), 5), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkEdgeEClass), 6), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkEdgeEClass), 7), 35); ELK_BEND_POINT = eINSTANCE_0.elkBendPointEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkBendPointEClass), 0), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkBendPointEClass), 1), 35); ELK_EDGE_SECTION = eINSTANCE_0.elkEdgeSectionEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkEdgeSectionEClass), 0), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkEdgeSectionEClass), 1), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkEdgeSectionEClass), 2), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkEdgeSectionEClass), 3), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkEdgeSectionEClass), 4), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkEdgeSectionEClass), 5), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkEdgeSectionEClass), 6), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkEdgeSectionEClass), 7), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkEdgeSectionEClass), 8), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkEdgeSectionEClass), 9), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkEdgeSectionEClass), 10), 35); ELK_PROPERTY_TO_VALUE_MAP_ENTRY = eINSTANCE_0.elkPropertyToValueMapEntryEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkPropertyToValueMapEntryEClass), 0), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_0.elkPropertyToValueMapEntryEClass), 1), 35); } var ELK_BEND_POINT, ELK_CONNECTABLE_SHAPE, ELK_EDGE, ELK_EDGE_SECTION, ELK_GRAPH_ELEMENT, ELK_LABEL, ELK_NODE, ELK_PORT, ELK_PROPERTY_TO_VALUE_MAP_ENTRY, ELK_SHAPE, EMAP_PROPERTY_HOLDER; var Lorg_eclipse_elk_graph_ElkLabel_2_classLit = createForInterface('org.eclipse.elk.graph', 'ElkLabel'); var Lorg_eclipse_elk_graph_ElkNode_2_classLit = createForInterface('org.eclipse.elk.graph', 'ElkNode'); var Lorg_eclipse_elk_graph_ElkPort_2_classLit = createForInterface('org.eclipse.elk.graph', 'ElkPort'); function $eNotify(this$static, notification){ var eAdapters, i, size_0; eAdapters = this$static.eBasicAdapterArray(); if (eAdapters != null && this$static.eDeliver()) { for (i = 0 , size_0 = eAdapters.length; i < size_0; ++i) { eAdapters[i].notifyChanged(notification); } } } defineClass(93, 1, $intern_137); _.eBasicAdapterArray = function eBasicAdapterArray(){ this.eBasicAdapters(); return null; } ; _.eBasicAdapters = function eBasicAdapters(){ return null; } ; _.eBasicHasAdapters = function eBasicHasAdapters(){ return this.eBasicAdapters() , false; } ; _.eDeliver = function eDeliver(){ return false; } ; _.eNotify = function eNotify(notification){ $eNotify(this, notification); } ; var Lorg_eclipse_emf_common_notify_impl_BasicNotifierImpl_2_classLit = createForClass('org.eclipse.emf.common.notify.impl', 'BasicNotifierImpl', 93); function $eAttribute(eClass, name_0){ var eStructuralFeature; eStructuralFeature = $getEStructuralFeature_0(eClass, name_0); if (instanceOf(eStructuralFeature, 331)) { return castTo(eStructuralFeature, 35); } throw toJs(new IllegalArgumentException_0("The feature '" + name_0 + "' is not a valid attribute")); } function $eBasicSetContainer(this$static, newContainer, newContainerFeatureID, msgs){ var newResource, notification, oldContainer, oldContainerFeatureID, oldResource; oldContainer = this$static.eInternalContainer(); oldResource = this$static.eDirectResource(); newResource = null; if (oldResource) { if (!!newContainer && (eContainmentFeature(this$static, newContainer, newContainerFeatureID).eFlags & $intern_64) == 0) { msgs = $basicRemove_0(oldResource.getContents(), this$static, msgs); this$static.eSetDirectResource(null); newResource = newContainer.eInternalResource(); } else { oldResource = null; } } else { !!oldContainer && (oldResource = oldContainer.eInternalResource()); !!newContainer && (newResource = newContainer.eInternalResource()); } oldResource != newResource && !!oldResource && oldResource.detached(this$static); oldContainerFeatureID = this$static.eContainerFeatureID_0(); this$static.eBasicSetContainer(newContainer, newContainerFeatureID); oldResource != newResource && !!newResource && newResource.attached(this$static); if (this$static.eBasicHasAdapters() && this$static.eDeliver()) { if (!!oldContainer && oldContainerFeatureID >= 0 && oldContainerFeatureID != newContainerFeatureID) { notification = new ENotificationImpl_1(this$static, 1, oldContainerFeatureID, oldContainer, null); !msgs?(msgs = notification):msgs.add_5(notification); } if (newContainerFeatureID >= 0) { notification = new ENotificationImpl_1(this$static, 1, newContainerFeatureID, oldContainerFeatureID == newContainerFeatureID?oldContainer:null, newContainer); !msgs?(msgs = notification):msgs.add_5(notification); } } return msgs; } function $eContainer(this$static){ var eContainerFeatureID, eContainerFeatureID0, notificationChain, resolved, result; result = this$static.eInternalContainer(); if (result) { if (result.eIsProxy()) { resolved = $eResolveProxy(this$static, result); if (resolved != result) { eContainerFeatureID0 = this$static.eContainerFeatureID_0(); notificationChain = (eContainerFeatureID = this$static.eContainerFeatureID_0() , eContainerFeatureID >= 0?this$static.eBasicRemoveFromContainerFeature(null):this$static.eInternalContainer().eInverseRemove(this$static, -1 - eContainerFeatureID, null, null)); this$static.eBasicSetContainer(castTo(resolved, 54), eContainerFeatureID0); !!notificationChain && notificationChain.dispatch_0(); this$static.eBasicHasAdapters() && this$static.eDeliver() && eContainerFeatureID0 > -1 && $eNotify(this$static, new ENotificationImpl_1(this$static, 9, eContainerFeatureID0, result, resolved)); return resolved; } } } return result; } function $eDynamicGet(this$static, dynamicFeatureID, eFeature, resolve, coreType){ return dynamicFeatureID < 0?$eOpenGet(this$static, eFeature, resolve):castTo(eFeature, 69).getSettingDelegate().dynamicGet_0(this$static, this$static.eSettings_0(), dynamicFeatureID, resolve, coreType); } function $eDynamicIsSet(this$static, dynamicFeatureID, eFeature){ return dynamicFeatureID < 0?$eOpenIsSet(this$static, eFeature):castTo(eFeature, 69).getSettingDelegate().dynamicIsSet(this$static, this$static.eSettings_0(), dynamicFeatureID); } function $eDynamicSet(this$static, dynamicFeatureID, eFeature, newValue){ if (dynamicFeatureID < 0) { $eOpenSet(this$static, eFeature, newValue); } else { if (!eFeature.isChangeable()) { throw toJs(new IllegalArgumentException_0("The feature '" + eFeature.getName() + "' is not a valid changeable feature")); } castTo(eFeature, 69).getSettingDelegate().dynamicSet_0(this$static, this$static.eSettings_0(), dynamicFeatureID, newValue); } } function $eDynamicUnset(this$static, dynamicFeatureID, eFeature){ if (dynamicFeatureID < 0) { $eOpenUnset(this$static, eFeature); } else { if (!eFeature.isChangeable()) { throw toJs(new IllegalArgumentException_0("The feature '" + eFeature.getName() + "' is not a valid changeable feature")); } castTo(eFeature, 69).getSettingDelegate().dynamicUnset_0(this$static, this$static.eSettings_0(), dynamicFeatureID); } } function $eGet(this$static, featureID0, resolve, coreType){ var dynamicFeatureID, eFeature, featureID; eFeature = $getEStructuralFeature(this$static.eClass_0(), featureID0); dynamicFeatureID = featureID0 - this$static.eStaticFeatureCount(); return dynamicFeatureID < 0?(featureID = this$static.eDerivedStructuralFeatureID_0(eFeature) , featureID >= 0?this$static.eGet(featureID, resolve, true):$eOpenGet(this$static, eFeature, resolve)):castTo(eFeature, 69).getSettingDelegate().dynamicGet_0(this$static, this$static.eSettings_0(), dynamicFeatureID, resolve, coreType); } function $eGet_0(this$static, eFeature){ var featureID; return featureID = this$static.eDerivedStructuralFeatureID_0(eFeature) , featureID >= 0?this$static.eGet(featureID, true, true):$eOpenGet(this$static, eFeature, true); } function $eGet_1(this$static, eFeature, resolve){ var featureID; return featureID = this$static.eDerivedStructuralFeatureID_0(eFeature) , featureID >= 0?this$static.eGet(featureID, resolve, true):$eOpenGet(this$static, eFeature, resolve); } function $eGet_2(this$static, eFeature){ var featureID; featureID = $getFeatureID(this$static.eClass, eFeature); return featureID >= 0?$eGet(this$static, featureID, true, true):$eOpenGet(this$static, eFeature, true); } function $eInternalResource(this$static){ var count, eContainer, result; result = this$static.eDirectResource(); if (!result) { count = 0; for (eContainer = this$static.eInternalContainer(); eContainer; eContainer = eContainer.eInternalContainer()) { if (++count > $intern_67) { return eContainer.eInternalResource(); } result = eContainer.eDirectResource(); if (!!result || eContainer == this$static) { break; } } } return result; } function $eInverseAdd(this$static, otherEnd, featureID, msgs){ var eContainerFeatureID; if (featureID >= 0) { return this$static.eInverseAdd_0(otherEnd, featureID, msgs); } else { !!this$static.eInternalContainer() && (msgs = (eContainerFeatureID = this$static.eContainerFeatureID_0() , eContainerFeatureID >= 0?this$static.eBasicRemoveFromContainerFeature(msgs):this$static.eInternalContainer().eInverseRemove(this$static, -1 - eContainerFeatureID, null, msgs))); return this$static.eBasicSetContainer_0(otherEnd, featureID, msgs); } } function $eInverseRemove(this$static, otherEnd, featureID, msgs){ return featureID >= 0?this$static.eInverseRemove_0(otherEnd, featureID, msgs):this$static.eBasicSetContainer_0(null, featureID, msgs); } function $eIsSet(this$static, featureID0){ var dynamicFeatureID, eFeature, featureID; eFeature = $getEStructuralFeature(this$static.eClass_0(), featureID0); dynamicFeatureID = featureID0 - this$static.eStaticFeatureCount(); return dynamicFeatureID < 0?(featureID = this$static.eDerivedStructuralFeatureID_0(eFeature) , featureID >= 0?this$static.eIsSet(featureID):$eOpenIsSet(this$static, eFeature)):dynamicFeatureID < 0?$eOpenIsSet(this$static, eFeature):castTo(eFeature, 69).getSettingDelegate().dynamicIsSet(this$static, this$static.eSettings_0(), dynamicFeatureID); } function $eIsSet_0(this$static, eFeature){ var featureID; featureID = this$static.eDerivedStructuralFeatureID_0(eFeature); return featureID >= 0?this$static.eIsSet(featureID):$eOpenIsSet(this$static, eFeature); } function $eNotificationRequired(this$static){ return this$static.eBasicHasAdapters() && this$static.eDeliver(); } function $eObjectForURIFragmentPredicate(this$static, predicate, eReference){ var eAttribute, eDataType, eFactory, eReferenceType, end, featureMapEntries, i, index_0, length_0, values; featureMapEntries = new ArrayList; length_0 = predicate.length; eReferenceType = $getEReferenceType(eReference); for (i = 0; i < length_0; ++i) { index_0 = $indexOf_2(predicate, fromCodePoint(61), i); eAttribute = $eAttribute(eReferenceType, (checkCriticalStringBounds(i, index_0, predicate.length) , predicate.substr(i, index_0 - i))); eDataType = $getEAttributeType(eAttribute); eFactory = eDataType.getEPackage().getEFactoryInstance(); switch ($charAt(predicate, ++index_0)) { case 39: { end = $indexOf_0(predicate, 39, ++index_0); $add_3(featureMapEntries, new BasicEObjectImpl$1(eAttribute, eDecodeValue((checkCriticalStringBounds(index_0, end, predicate.length) , predicate.substr(index_0, end - index_0)), eFactory, eDataType))); i = end + 1; break; } case 34: { end = $indexOf_0(predicate, 34, ++index_0); $add_3(featureMapEntries, new BasicEObjectImpl$1(eAttribute, eDecodeValue((checkCriticalStringBounds(index_0, end, predicate.length) , predicate.substr(index_0, end - index_0)), eFactory, eDataType))); i = end + 1; break; } case 91: { values = new ArrayList; $add_3(featureMapEntries, new BasicEObjectImpl$1(eAttribute, values)); LOOP: for (;;) { switch ($charAt(predicate, ++index_0)) { case 39: { end = $indexOf_0(predicate, 39, ++index_0); $add_3(values, eDecodeValue((checkCriticalStringBounds(index_0, end, predicate.length) , predicate.substr(index_0, end - index_0)), eFactory, eDataType)); index_0 = end + 1; break; } case 34: { end = $indexOf_0(predicate, 34, ++index_0); $add_3(values, eDecodeValue((checkCriticalStringBounds(index_0, end, predicate.length) , predicate.substr(index_0, end - index_0)), eFactory, eDataType)); index_0 = end + 1; break; } case 110: { ++index_0; if (predicate.indexOf('ull', index_0) == index_0) { values.array.push(null); } else { throw toJs(new RuntimeException_0('Expecting null')); } index_0 += 3; break; } } if (index_0 < length_0) { switch (checkCriticalStringElementIndex(index_0, predicate.length) , predicate.charCodeAt(index_0)) { case 44: { break; } case 93: { break LOOP; } default:{ throw toJs(new RuntimeException_0('Expecting , or ]')); } } } else { break; } } i = index_0 + 1; break; } case 110: { ++index_0; if (predicate.indexOf('ull', index_0) == index_0) { $add_3(featureMapEntries, new BasicEObjectImpl$1(eAttribute, null)); } else { throw toJs(new RuntimeException_0('Expecting null')); } i = index_0 + 3; break; } } if (i < length_0) { checkCriticalStringElementIndex(i, predicate.length); if (predicate.charCodeAt(i) != 44) { throw toJs(new RuntimeException_0('Expecting ,')); } } else { break; } } return $eObjectForURIFragmentPredicate_0(this$static, featureMapEntries, eReference); } function $eObjectForURIFragmentPredicate_0(this$static, predicate, eReference){ var actualValue, eObject, eObject$iterator, entry, entryFeature, entryValue, featureID, i, list, size_0; size_0 = predicate.array.length; list = (featureID = this$static.eDerivedStructuralFeatureID_0(eReference) , castTo(featureID >= 0?this$static.eGet(featureID, false, true):$eOpenGet(this$static, eReference, false), 61)); LOOP: for (eObject$iterator = list.iterator_0(); eObject$iterator.hasNext_0();) { eObject = castTo(eObject$iterator.next_1(), 58); for (i = 0; i < size_0; ++i) { entry = (checkCriticalElementIndex(i, predicate.array.length) , castTo(predicate.array[i], 76)); entryValue = entry.getValue(); entryFeature = entry.getEStructuralFeature(); actualValue = eObject.eGet_1(entryFeature, false); if (entryValue == null?actualValue != null:!equals_Ljava_lang_Object__Z__devirtual$(entryValue, actualValue)) { continue LOOP; } } return eObject; } return null; } function $eObjectForURIFragmentSegment(this$static, uriFragmentSegment){ var dotIndex, eList, eReference, exception, index_0, lastChar, lastIndex, position, predicate, result; lastIndex = uriFragmentSegment.length - 1; lastChar = (checkCriticalStringElementIndex(lastIndex, uriFragmentSegment.length) , uriFragmentSegment.charCodeAt(lastIndex)); if (lastChar == 93) { index_0 = $indexOf_1(uriFragmentSegment, fromCodePoint(91)); if (index_0 >= 0) { eReference = $eReference(this$static, (checkCriticalStringBounds(1, index_0, uriFragmentSegment.length) , uriFragmentSegment.substr(1, index_0 - 1))); predicate = (checkCriticalStringBounds(index_0 + 1, lastIndex, uriFragmentSegment.length) , uriFragmentSegment.substr(index_0 + 1, lastIndex - (index_0 + 1))); return $eObjectForURIFragmentPredicate(this$static, predicate, eReference); } } else { dotIndex = -1; digitRegex == null && (digitRegex = new RegExp('\\d')); if (digitRegex.test(String.fromCharCode(lastChar))) { dotIndex = $lastIndexOf_0(uriFragmentSegment, fromCodePoint(46), lastIndex - 1); if (dotIndex >= 0) { eList = castTo($eGet_1(this$static, $eStructuralFeature(this$static, (checkCriticalStringBounds(1, dotIndex, uriFragmentSegment.length) , uriFragmentSegment.substr(1, dotIndex - 1))), false), 61); position = 0; try { position = __parseAndValidateInt((checkCriticalStringElementIndex(dotIndex + 1, uriFragmentSegment.length + 1) , uriFragmentSegment.substr(dotIndex + 1)), $intern_43, $intern_0); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 130)) { exception = $e0; throw toJs(new WrappedException(exception)); } else throw toJs($e0); } if (position < eList.size_1()) { result = eList.get_0(position); instanceOf(result, 76) && (result = castTo(result, 76).getValue()); return castTo(result, 58); } } } if (dotIndex < 0) { return castTo($eGet_1(this$static, $eStructuralFeature(this$static, (checkCriticalStringElementIndex(1, uriFragmentSegment.length + 1) , uriFragmentSegment.substr(1))), false), 58); } } return null; } function $eOpenGet(this$static, eFeature, resolve){ var featureID, featureMap, openFeature; openFeature = $getAffiliation(($clinit_ExtendedMetaData() , INSTANCE_11), this$static.eClass_0(), eFeature); if (openFeature) { $clinit_FeatureMapUtil(); castTo(openFeature, 69).isFeatureMap_0() || (openFeature = $getGroup($getExtendedMetaData_1(INSTANCE_11, openFeature))); featureMap = (featureID = this$static.eDerivedStructuralFeatureID_0(openFeature) , castTo(featureID >= 0?this$static.eGet(featureID, true, true):$eOpenGet(this$static, openFeature, true), 160)); return castTo(featureMap, 220).get_7(eFeature, resolve); } else { throw toJs(new IllegalArgumentException_0("The feature '" + eFeature.getName() + "' is not a valid feature")); } } function $eOpenIsSet(this$static, eFeature){ var featureID, featureMap, openFeature; openFeature = $getAffiliation(($clinit_ExtendedMetaData() , INSTANCE_11), this$static.eClass_0(), eFeature); if (openFeature) { $clinit_FeatureMapUtil(); castTo(openFeature, 69).isFeatureMap_0() || (openFeature = $getGroup($getExtendedMetaData_1(INSTANCE_11, openFeature))); featureMap = (featureID = this$static.eDerivedStructuralFeatureID_0(openFeature) , castTo(featureID >= 0?this$static.eGet(featureID, true, true):$eOpenGet(this$static, openFeature, true), 160)); return castTo(featureMap, 220).isSet_1(eFeature); } else { throw toJs(new IllegalArgumentException_0("The feature '" + eFeature.getName() + "' is not a valid feature")); } } function $eOpenSet(this$static, eFeature, newValue){ var featureID, featureMap, openFeature; openFeature = $getAffiliation(($clinit_ExtendedMetaData() , INSTANCE_11), this$static.eClass_0(), eFeature); if (openFeature) { $clinit_FeatureMapUtil(); if (!castTo(openFeature, 69).isFeatureMap_0()) { openFeature = $getGroup($getExtendedMetaData_1(INSTANCE_11, openFeature)); if (!openFeature) { throw toJs(new IllegalArgumentException_0("The feature '" + eFeature.getName() + "' is not a valid changeable feature")); } } featureMap = (featureID = this$static.eDerivedStructuralFeatureID_0(openFeature) , castTo(featureID >= 0?this$static.eGet(featureID, true, true):$eOpenGet(this$static, openFeature, true), 160)); castTo(featureMap, 220).set_3(eFeature, newValue); } else { throw toJs(new IllegalArgumentException_0("The feature '" + eFeature.getName() + "' is not a valid changeable feature")); } } function $eOpenUnset(this$static, eFeature){ var featureID, featureMap, openFeature; openFeature = $getAffiliation(($clinit_ExtendedMetaData() , INSTANCE_11), this$static.eClass_0(), eFeature); if (openFeature) { $clinit_FeatureMapUtil(); castTo(openFeature, 69).isFeatureMap_0() || (openFeature = $getGroup($getExtendedMetaData_1(INSTANCE_11, openFeature))); featureMap = (featureID = this$static.eDerivedStructuralFeatureID_0(openFeature) , castTo(featureID >= 0?this$static.eGet(featureID, true, true):$eOpenGet(this$static, openFeature, true), 160)); castTo(featureMap, 220).unset_0(eFeature); } else { throw toJs(new IllegalArgumentException_0("The feature '" + eFeature.getName() + "' is not a valid changeable feature")); } } function $eReference(this$static, name_0){ var eStructuralFeature; eStructuralFeature = $getEStructuralFeature_0(this$static.eClass_0(), name_0); if (instanceOf(eStructuralFeature, 102)) { return castTo(eStructuralFeature, 19); } throw toJs(new IllegalArgumentException_0("The feature '" + name_0 + "' is not a valid reference")); } function $eResolveProxy(this$static, proxy){ var eResource, lastArg, resourceContext, result; result = (resourceContext = this$static?$eInternalResource(this$static):null , resolve_20((lastArg = proxy , resourceContext?resourceContext.getResourceSet():null , lastArg))); if (result == proxy) { eResource = $eInternalResource(this$static); !!eResource && eResource.getResourceSet(); } return result; } function $eSet(this$static, featureID0, newValue){ var dynamicFeatureID, eFeature, featureID; eFeature = $getEStructuralFeature(this$static.eClass_0(), featureID0); dynamicFeatureID = featureID0 - this$static.eStaticFeatureCount(); if (dynamicFeatureID < 0) { if (!eFeature) { throw toJs(new IllegalArgumentException_0('The feature ID' + featureID0 + ' is not a valid feature ID')); } else if (eFeature.isChangeable()) { featureID = this$static.eDerivedStructuralFeatureID_0(eFeature); featureID >= 0?this$static.eSet(featureID, newValue):$eOpenSet(this$static, eFeature, newValue); } else { throw toJs(new IllegalArgumentException_0("The feature '" + eFeature.getName() + "' is not a valid changeable feature")); } } else { $eDynamicSet(this$static, dynamicFeatureID, eFeature, newValue); } } function $eSet_0(this$static, eFeature, newValue){ var featureID; featureID = this$static.eDerivedStructuralFeatureID_0(eFeature); featureID >= 0?this$static.eSet(featureID, newValue):$eOpenSet(this$static, eFeature, newValue); } function $eSettings(this$static){ var size_0; if (!this$static.eHasSettings()) { size_0 = $getFeatureCount(this$static.eClass_0()) - this$static.eStaticFeatureCount(); this$static.eProperties_0().allocateSettings(size_0); } return this$static.eBasicProperties(); } function $eStructuralFeature(this$static, name_0){ var eStructuralFeature; eStructuralFeature = $getEStructuralFeature_0(this$static.eClass_0(), name_0); if (!eStructuralFeature) { throw toJs(new IllegalArgumentException_0("The feature '" + name_0 + "' is not a valid feature")); } return eStructuralFeature; } function $eUnset(this$static, featureID0){ var dynamicFeatureID, eFeature, featureID; eFeature = $getEStructuralFeature(this$static.eClass_0(), featureID0); dynamicFeatureID = featureID0 - this$static.eStaticFeatureCount(); if (dynamicFeatureID < 0) { if (!eFeature) { throw toJs(new IllegalArgumentException_0('The feature ID' + featureID0 + ' is not a valid feature ID')); } else if (eFeature.isChangeable()) { featureID = this$static.eDerivedStructuralFeatureID_0(eFeature); featureID >= 0?this$static.eUnset(featureID):$eOpenUnset(this$static, eFeature); } else { throw toJs(new IllegalArgumentException_0("The feature '" + eFeature.getName() + "' is not a valid changeable feature")); } } else { $eDynamicUnset(this$static, dynamicFeatureID, eFeature); } } function $eUnset_0(this$static, eFeature){ var featureID; featureID = this$static.eDerivedStructuralFeatureID_0(eFeature); featureID >= 0?this$static.eUnset(featureID):$eOpenUnset(this$static, eFeature); } function $toString_16(this$static){ var number, result; result = new StringBuilder_1($getName(this$static.___clazz)); result.string += '@'; $append_11(result, (number = hashCode__I__devirtual$(this$static) >>> 0 , number.toString(16))); if (this$static.eIsProxy()) { result.string += ' (eProxyURI: '; $append_10(result, this$static.eProxyURI_0()); if (this$static.eDynamicClass()) { result.string += ' eClass: '; $append_10(result, this$static.eDynamicClass()); } result.string += ')'; } else if (this$static.eDynamicClass()) { result.string += ' (eClass: '; $append_10(result, this$static.eDynamicClass()); result.string += ')'; } return result.string; } function eContainmentFeature(eObject, eContainer, eContainerFeatureID){ var eFeature, entryFeature, entryReference, featureMap, i, size_0; if (!eContainer) { return null; } else { if (eContainerFeatureID <= -1) { eFeature = $getEStructuralFeature(eContainer.eClass_0(), -1 - eContainerFeatureID); if (instanceOf(eFeature, 102)) { return castTo(eFeature, 19); } else { featureMap = castTo(eContainer.eGet_0(eFeature), 160); for (i = 0 , size_0 = featureMap.size_1(); i < size_0; ++i) { if (maskUndefined(featureMap.getValue_1(i)) === maskUndefined(eObject)) { entryFeature = featureMap.getEStructuralFeature_0(i); if (instanceOf(entryFeature, 102)) { entryReference = castTo(entryFeature, 19); if ((entryReference.eFlags & $intern_138) != 0) { return entryReference; } } } } throw toJs(new IllegalStateException_0('The containment feature could not be located')); } } else { return $getEOpposite(castTo($getEStructuralFeature(eObject.eClass_0(), eContainerFeatureID), 19)); } } } function eDecodeValue(encodedValue, eFactory, eDataType){ var literal, value_0; literal = decode(encodedValue); value_0 = eFactory.createFromString(eDataType, literal); return value_0; } defineClass(99, 93, $intern_139); _.eNotificationRequired = function eNotificationRequired(){ return $eNotificationRequired(this); } ; _.eBaseStructuralFeatureID = function eBaseStructuralFeatureID(derivedFeatureID, baseClass){ return derivedFeatureID; } ; _.eBasicProperties = function eBasicProperties(){ throw toJs(new UnsupportedOperationException); } ; _.eBasicRemoveFromContainerFeature = function eBasicRemoveFromContainerFeature(msgs){ var inverseFeature; return inverseFeature = $getEOpposite(castTo($getEStructuralFeature(this.eClass_0(), this.eContainerFeatureID_0()), 19)) , this.eInternalContainer().eInverseRemove(this, inverseFeature.featureID, inverseFeature.containerClass, msgs); } ; _.eBasicSetContainer = function eBasicSetContainer(newContainer, newContainerFeatureID){ throw toJs(new UnsupportedOperationException); } ; _.eBasicSetContainer_0 = function eBasicSetContainer_0(newContainer, newContainerFeatureID, msgs){ return $eBasicSetContainer(this, newContainer, newContainerFeatureID, msgs); } ; _.eClass_0 = function eClass_0(){ var result; if (this.eBasicProperties()) { result = this.eBasicProperties().getEClass(); if (result) { return result; } } return this.eStaticClass(); } ; _.eContainer_0 = function eContainer_0(){ return $eContainer(this); } ; _.eContainerFeatureID_0 = function eContainerFeatureID_0(){ throw toJs(new UnsupportedOperationException); } ; _.eContents_0 = function eContents_0(){ var eStructuralFeatures, result; result = this.eProperties_0().getEContents(); !result && this.eBasicProperties().setEContents(result = ($clinit_EContentsEList() , eStructuralFeatures = $containments($getEAllStructuralFeatures(this.eClass_0())) , eStructuralFeatures == null?EMPTY_CONTENTS_ELIST:new EContentsEList(this, eStructuralFeatures))); return result; } ; _.eDerivedStructuralFeatureID = function eDerivedStructuralFeatureID(baseFeatureID, baseClass){ return baseFeatureID; } ; _.eDerivedStructuralFeatureID_0 = function eDerivedStructuralFeatureID_0(eStructuralFeature){ var containerClass; containerClass = eStructuralFeature.getContainerClass(); return !containerClass?$getFeatureID(this.eClass_0(), eStructuralFeature):eStructuralFeature.getFeatureID_0(); } ; _.eDirectResource = function eDirectResource(){ var eProperties; eProperties = this.eBasicProperties(); return !eProperties?null:eProperties.getEResource(); } ; _.eDynamicClass = function eDynamicClass(){ return !this.eBasicProperties()?null:this.eBasicProperties().getEClass(); } ; _.eGet = function eGet(featureID, resolve, coreType){ return $eGet(this, featureID, resolve, coreType); } ; _.eGet_0 = function eGet_0(eFeature){ return $eGet_0(this, eFeature); } ; _.eGet_1 = function eGet_1(eFeature, resolve){ return $eGet_1(this, eFeature, resolve); } ; _.eHasSettings = function eHasSettings(){ var eProperties; eProperties = this.eBasicProperties(); return !!eProperties && eProperties.hasSettings(); } ; _.eInternalContainer = function eInternalContainer_0(){ throw toJs(new UnsupportedOperationException); } ; _.eInternalResource = function eInternalResource(){ return $eInternalResource(this); } ; _.eInverseAdd = function eInverseAdd(otherEnd, featureID, baseClass, msgs){ return $eInverseAdd(this, otherEnd, featureID, msgs); } ; _.eInverseAdd_0 = function eInverseAdd_0(otherEnd, featureID, msgs){ var feature; return feature = castTo($getEStructuralFeature(this.eClass_0(), featureID), 69) , feature.getSettingDelegate().dynamicInverseAdd(this, this.eSettings_0(), featureID - this.eStaticFeatureCount(), otherEnd, msgs); } ; _.eInverseRemove = function eInverseRemove(otherEnd, featureID, baseClass, msgs){ return $eInverseRemove(this, otherEnd, featureID, msgs); } ; _.eInverseRemove_0 = function eInverseRemove_0(otherEnd, featureID, msgs){ var feature; return feature = castTo($getEStructuralFeature(this.eClass_0(), featureID), 69) , feature.getSettingDelegate().dynamicInverseRemove(this, this.eSettings_0(), featureID - this.eStaticFeatureCount(), otherEnd, msgs); } ; _.eIsProxy = function eIsProxy(){ return !!this.eBasicProperties() && !!this.eBasicProperties().getEProxyURI(); } ; _.eIsSet = function eIsSet(featureID){ return $eIsSet(this, featureID); } ; _.eIsSet_0 = function eIsSet_0(eFeature){ return $eIsSet_0(this, eFeature); } ; _.eObjectForURIFragmentSegment = function eObjectForURIFragmentSegment(uriFragmentSegment){ return $eObjectForURIFragmentSegment(this, uriFragmentSegment); } ; _.eProperties_0 = function eProperties_0(){ throw toJs(new UnsupportedOperationException); } ; _.eProxyURI_0 = function eProxyURI_0(){ return !this.eBasicProperties()?null:this.eBasicProperties().getEProxyURI(); } ; _.eResource_0 = function eResource_0(){ return $eInternalResource(this); } ; _.eSet = function eSet(featureID, newValue){ $eSet(this, featureID, newValue); } ; _.eSetClass = function eSetClass(eClass){ this.eProperties_0().setEClass(eClass); } ; _.eSetDirectResource = function eSetDirectResource(resource){ this.eProperties_0().setEResource(resource); } ; _.eSetProxyURI = function eSetProxyURI(uri_0){ this.eProperties_0().setEProxyURI(uri_0); } ; _.eSetResource = function eSetResource(resource, notifications){ var eContainerFeatureID, oldContainer, oldContainerResource, oldResource; oldResource = this.eDirectResource(); if (!!oldResource && !!resource) { notifications = $basicRemove_0(oldResource.getContents(), this, notifications); oldResource.detached(this); } oldContainer = this.eInternalContainer(); if (oldContainer) { if ((eContainmentFeature(this, this.eInternalContainer(), this.eContainerFeatureID_0()).eFlags & $intern_64) != 0) { oldContainerResource = oldContainer.eInternalResource(); !!oldContainerResource && (!resource?oldContainerResource.attached(this):!oldResource && oldContainerResource.detached(this)); } else { notifications = (eContainerFeatureID = this.eContainerFeatureID_0() , eContainerFeatureID >= 0?this.eBasicRemoveFromContainerFeature(notifications):this.eInternalContainer().eInverseRemove(this, -1 - eContainerFeatureID, null, notifications)); notifications = this.eBasicSetContainer_0(null, -1, notifications); } } this.eSetDirectResource(resource); return notifications; } ; _.eSetting = function eSetting(eFeature){ var dynamicIndex, eClass, featureID, featureMap, index_0, openFeature, setting, upperBound; eClass = this.eClass_0(); index_0 = $getFeatureID(eClass, eFeature); dynamicIndex = this.eStaticFeatureCount(); if (index_0 >= dynamicIndex) { return castTo(eFeature, 69).getSettingDelegate().dynamicSetting(this, this.eSettings_0(), index_0 - dynamicIndex); } else if (index_0 <= -1) { openFeature = $getAffiliation(($clinit_ExtendedMetaData() , INSTANCE_11), eClass, eFeature); if (openFeature) { $clinit_FeatureMapUtil(); castTo(openFeature, 69).isFeatureMap_0() || (openFeature = $getGroup($getExtendedMetaData_1(INSTANCE_11, openFeature))); featureMap = (featureID = this.eDerivedStructuralFeatureID_0(openFeature) , castTo(featureID >= 0?this.eGet(featureID, true, true):$eOpenGet(this, openFeature, true), 160)); upperBound = openFeature.getUpperBound(); if (upperBound > 1 || upperBound == -1) { return castTo(castTo(featureMap, 220).get_7(eFeature, false), 79); } } else { throw toJs(new IllegalArgumentException_0("The feature '" + eFeature.getName() + "' is not a valid feature")); } } else if (eFeature.isMany()) { return featureID = this.eDerivedStructuralFeatureID_0(eFeature) , castTo(featureID >= 0?this.eGet(featureID, false, true):$eOpenGet(this, eFeature, false), 79); } setting = new BasicEObjectImpl$4(this, eFeature); return setting; } ; _.eSettings_0 = function eSettings(){ return $eSettings(this); } ; _.eStaticClass = function eStaticClass(){ return ($clinit_EcorePackage() , eINSTANCE_2).eObjectEClass; } ; _.eStaticFeatureCount = function eStaticFeatureCount(){ return $getFeatureCount(this.eStaticClass()); } ; _.eUnset = function eUnset(featureID){ $eUnset(this, featureID); } ; _.toString_0 = function toString_123(){ return $toString_16(this); } ; var Lorg_eclipse_emf_ecore_impl_BasicEObjectImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'BasicEObjectImpl', 99); function $clinit_EStructuralFeature$Internal$DynamicValueHolder(){ $clinit_EStructuralFeature$Internal$DynamicValueHolder = emptyMethod; NIL = new EStructuralFeature$Internal$DynamicValueHolder$1; } var NIL; function $addField(this$static, field, value_0){ var bit, fieldCount, fieldIndex, oldStorage, result, sourceIndex, targetIndex; fieldCount = bitCount(this$static.eFlags_0 & 254); if (fieldCount == 0) { this$static.eStorage = value_0; } else { if (fieldCount == 1) { result = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, 2, 5, 1); fieldIndex = $fieldIndex(this$static, field); if (fieldIndex == 0) { result[0] = value_0; result[1] = this$static.eStorage; } else { result[0] = this$static.eStorage; result[1] = value_0; } } else { result = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, fieldCount + 1, 5, 1); oldStorage = castToArray(this$static.eStorage); for (bit = 2 , sourceIndex = 0 , targetIndex = 0; bit <= 128; bit <<= 1) { bit == field?(result[targetIndex++] = value_0):(this$static.eFlags_0 & bit) != 0 && (result[targetIndex++] = oldStorage[sourceIndex++]); } } this$static.eStorage = result; } this$static.eFlags_0 |= field; } function $eClass(this$static){ var eClass; eClass = castTo($getField(this$static, 16), 29); return !eClass?this$static.eStaticClass():eClass; } function $eDynamicSettings(this$static){ var settings; settings = castToArray($getField(this$static, 32)); if (settings == null) { $eSettings_0(this$static); settings = castToArray($getField(this$static, 32)); } return settings; } function $eSettings_0(this$static){ var eClass, size_0; if ((this$static.eFlags_0 & 32) == 0) { size_0 = (eClass = castTo($getField(this$static, 16), 29) , $getFeatureCount(!eClass?this$static.eStaticClass():eClass) - $getFeatureCount(this$static.eStaticClass())); size_0 != 0 && $setField(this$static, 32, initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, size_0, 5, 1)); } return this$static; } function $fieldIndex(this$static, field){ var bit, bit0, result; result = 0; for (bit0 = 2; bit0 < field; bit0 <<= 1) { (this$static.eFlags_0 & bit0) != 0 && ++result; } if (result == 0) { for (bit = field <<= 1; bit <= 128; bit <<= 1) { if ((this$static.eFlags_0 & bit) != 0) { return 0; } } return -1; } else { return result; } } function $getField(this$static, field){ var fieldIndex; if ((this$static.eFlags_0 & field) != 0) { fieldIndex = $fieldIndex(this$static, field); return fieldIndex == -1?this$static.eStorage:castToArray(this$static.eStorage)[fieldIndex]; } else { return null; } } function $removeField(this$static, field){ var bit, fieldCount, fieldIndex, oldStorage, result, sourceIndex, targetIndex; fieldCount = bitCount(this$static.eFlags_0 & 254); if (fieldCount == 1) { this$static.eStorage = null; } else { oldStorage = castToArray(this$static.eStorage); if (fieldCount == 2) { fieldIndex = $fieldIndex(this$static, field); this$static.eStorage = oldStorage[fieldIndex == 0?1:0]; } else { result = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, fieldCount - 1, 5, 1); for (bit = 2 , sourceIndex = 0 , targetIndex = 0; bit <= 128; bit <<= 1) { bit == field?++sourceIndex:(this$static.eFlags_0 & bit) != 0 && (result[targetIndex++] = oldStorage[sourceIndex++]); } this$static.eStorage = result; } } this$static.eFlags_0 &= ~field; } function $setField(this$static, field, value_0){ var fieldIndex; if ((this$static.eFlags_0 & field) != 0) { if (value_0 == null) { $removeField(this$static, field); } else { fieldIndex = $fieldIndex(this$static, field); fieldIndex == -1?(this$static.eStorage = value_0):setCheck(castToArray(this$static.eStorage), fieldIndex, value_0); } } else value_0 != null && $addField(this$static, field, value_0); } defineClass(119, 99, {110:1, 94:1, 93:1, 58:1, 114:1, 54:1, 99:1, 119:1}); _.dynamicGet = function dynamicGet(dynamicFeatureID){ var settings; settings = $eDynamicSettings(this); return settings[dynamicFeatureID]; } ; _.dynamicSet = function dynamicSet(dynamicFeatureID, newValue){ var settings; settings = $eDynamicSettings(this); setCheck(settings, dynamicFeatureID, newValue); } ; _.dynamicUnset = function dynamicUnset(dynamicFeatureID){ var settings; settings = $eDynamicSettings(this); setCheck(settings, dynamicFeatureID, null); } ; _.eBasicAdapterArray = function eBasicAdapterArray_0(){ return castTo($getField(this, 4), 129); } ; _.eBasicAdapters = function eBasicAdapters_0(){ throw toJs(new UnsupportedOperationException); } ; _.eBasicHasAdapters = function eBasicHasAdapters_0(){ return (this.eFlags_0 & 4) != 0; } ; _.eBasicProperties = function eBasicProperties_0(){ throw toJs(new UnsupportedOperationException); } ; _.eBasicSetContainer_1 = function eBasicSetContainer_1(newContainer){ $setField(this, 2, newContainer); } ; _.eBasicSetContainer = function eBasicSetContainer_2(newContainer, newContainerFeatureID){ this.eFlags_0 = newContainerFeatureID << 16 | this.eFlags_0 & 255; this.eBasicSetContainer_1(newContainer); } ; _.eClass_0 = function eClass_1(){ return $eClass(this); } ; _.eContainerFeatureID_0 = function eContainerFeatureID_1(){ return this.eFlags_0 >> 16; } ; _.eContents_0 = function eContents_1(){ var eClass, eStructuralFeatures; return $clinit_EContentsEList() , eStructuralFeatures = $containments($getEAllStructuralFeatures((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass))) , eStructuralFeatures == null?(null , EMPTY_CONTENTS_ELIST):new EContentsEList(this, eStructuralFeatures); } ; _.eDeliver = function eDeliver_0(){ return (this.eFlags_0 & 1) == 0; } ; _.eDirectResource = function eDirectResource_0(){ return castTo($getField(this, 128), 2034); } ; _.eDynamicClass = function eDynamicClass_0(){ return castTo($getField(this, 16), 29); } ; _.eHasSettings = function eHasSettings_0(){ return (this.eFlags_0 & 32) != 0; } ; _.eInternalContainer = function eInternalContainer_1(){ return castTo($getField(this, 2), 54); } ; _.eIsProxy = function eIsProxy_0(){ return (this.eFlags_0 & 64) != 0; } ; _.eProperties_0 = function eProperties_1(){ throw toJs(new UnsupportedOperationException); } ; _.eProxyURI_0 = function eProxyURI_1(){ return castTo($getField(this, 64), 288); } ; _.eSetClass = function eSetClass_0(eClass){ $setField(this, 16, eClass); } ; _.eSetDirectResource = function eSetDirectResource_0(resource){ $setField(this, 128, resource); } ; _.eSetProxyURI = function eSetProxyURI_0(uri_0){ $setField(this, 64, uri_0); } ; _.eSettings_0 = function eSettings_0(){ return $eSettings_0(this); } ; _.eFlags_0 = 0; var Lorg_eclipse_emf_ecore_impl_MinimalEObjectImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'MinimalEObjectImpl', 119); defineClass(120, 119, {110:1, 94:1, 93:1, 58:1, 114:1, 54:1, 99:1, 119:1, 120:1}); _.eBasicSetContainer_1 = function eBasicSetContainer_3(newContainer){ this.eContainer = newContainer; } ; _.eInternalContainer = function eInternalContainer_2(){ return this.eContainer; } ; var Lorg_eclipse_emf_ecore_impl_MinimalEObjectImpl$Container_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'MinimalEObjectImpl/Container', 120); function $copyProperties_0(this$static, source){ var entry, entry$iterator, other, ourProps, value_0; if (!source) { return this$static; } if (instanceOf(source, 342)) { other = castTo(source, 342); ourProps = (!this$static.properties && (this$static.properties = new EcoreEMap(($clinit_ElkGraphPackage$Literals() , ELK_PROPERTY_TO_VALUE_MAP_ENTRY), Lorg_eclipse_elk_graph_impl_ElkPropertyToValueMapEntryImpl_2_classLit, this$static, 0)) , this$static.properties); for (entry$iterator = other.getProperties().delegateEList.iterator_0(); entry$iterator.cursor != entry$iterator.this$01_2.size_1();) { entry = castTo(entry$iterator.doNext(), 44); value_0 = entry.getValue(); $put_14(ourProps, castTo(entry.getKey(), 149), value_0); } } else { !this$static.properties && (this$static.properties = new EcoreEMap(($clinit_ElkGraphPackage$Literals() , ELK_PROPERTY_TO_VALUE_MAP_ENTRY), Lorg_eclipse_elk_graph_impl_ElkPropertyToValueMapEntryImpl_2_classLit, this$static, 0)); $putAll_1(this$static.properties, source.getAllProperties()); } return this$static; } function $eGet_3(this$static, featureID, resolve, coreType){ if (featureID == 0) { return coreType?(!this$static.properties && (this$static.properties = new EcoreEMap(($clinit_ElkGraphPackage$Literals() , ELK_PROPERTY_TO_VALUE_MAP_ENTRY), Lorg_eclipse_elk_graph_impl_ElkPropertyToValueMapEntryImpl_2_classLit, this$static, 0)) , this$static.properties):(!this$static.properties && (this$static.properties = new EcoreEMap(($clinit_ElkGraphPackage$Literals() , ELK_PROPERTY_TO_VALUE_MAP_ENTRY), Lorg_eclipse_elk_graph_impl_ElkPropertyToValueMapEntryImpl_2_classLit, this$static, 0)) , $map_0(this$static.properties)); } return $eGet(this$static, featureID, resolve, coreType); } function $eInverseRemove_0(this$static, otherEnd, featureID, msgs){ var eClass, feature; if (featureID == 0) { return !this$static.properties && (this$static.properties = new EcoreEMap(($clinit_ElkGraphPackage$Literals() , ELK_PROPERTY_TO_VALUE_MAP_ENTRY), Lorg_eclipse_elk_graph_impl_ElkPropertyToValueMapEntryImpl_2_classLit, this$static, 0)) , $basicRemove_1(this$static.properties, otherEnd, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this$static, 16), 29) , !eClass?this$static.eStaticClass():eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseRemove(this$static, $eSettings_0(this$static), featureID - $getFeatureCount(this$static.eStaticClass()), otherEnd, msgs); } function $eIsSet_1(this$static, featureID){ if (featureID == 0) { return !!this$static.properties && this$static.properties.size_0 != 0; } return $eIsSet(this$static, featureID); } function $eSet_1(this$static, featureID, newValue){ switch (featureID) { case 0: !this$static.properties && (this$static.properties = new EcoreEMap(($clinit_ElkGraphPackage$Literals() , ELK_PROPERTY_TO_VALUE_MAP_ENTRY), Lorg_eclipse_elk_graph_impl_ElkPropertyToValueMapEntryImpl_2_classLit, this$static, 0)); $set_13(this$static.properties, newValue); return; } $eSet(this$static, featureID, newValue); } function $eUnset_1(this$static, featureID){ switch (featureID) { case 0: !this$static.properties && (this$static.properties = new EcoreEMap(($clinit_ElkGraphPackage$Literals() , ELK_PROPERTY_TO_VALUE_MAP_ENTRY), Lorg_eclipse_elk_graph_impl_ElkPropertyToValueMapEntryImpl_2_classLit, this$static, 0)); this$static.properties.delegateEList.clear_0(); return; } $eUnset(this$static, featureID); } function $getAllProperties_0(this$static){ var entry, entry$iterator, props; props = (!this$static.properties && (this$static.properties = new EcoreEMap(($clinit_ElkGraphPackage$Literals() , ELK_PROPERTY_TO_VALUE_MAP_ENTRY), Lorg_eclipse_elk_graph_impl_ElkPropertyToValueMapEntryImpl_2_classLit, this$static, 0)) , this$static.properties); for (entry$iterator = props.delegateEList.iterator_0(); entry$iterator.cursor != entry$iterator.this$01_2.size_1();) { entry = castTo(entry$iterator.doNext(), 44); entry.getValue(); } return $map_0(props); } function $getProperty_0(this$static, property){ var defaultValue, value_0; value_0 = (!this$static.properties && (this$static.properties = new EcoreEMap(($clinit_ElkGraphPackage$Literals() , ELK_PROPERTY_TO_VALUE_MAP_ENTRY), Lorg_eclipse_elk_graph_impl_ElkPropertyToValueMapEntryImpl_2_classLit, this$static, 0)) , $get_21(this$static.properties, property)); if (value_0 != null) { return value_0; } defaultValue = property.getDefault(); instanceOf(defaultValue, 4) && (defaultValue == null?(!this$static.properties && (this$static.properties = new EcoreEMap(($clinit_ElkGraphPackage$Literals() , ELK_PROPERTY_TO_VALUE_MAP_ENTRY), Lorg_eclipse_elk_graph_impl_ElkPropertyToValueMapEntryImpl_2_classLit, this$static, 0)) , $removeKey(this$static.properties, property)):(!this$static.properties && (this$static.properties = new EcoreEMap(($clinit_ElkGraphPackage$Literals() , ELK_PROPERTY_TO_VALUE_MAP_ENTRY), Lorg_eclipse_elk_graph_impl_ElkPropertyToValueMapEntryImpl_2_classLit, this$static, 0)) , $put_14(this$static.properties, property, defaultValue)) , this$static); return defaultValue; } function $hasProperty_0(this$static, property){ return !this$static.properties && (this$static.properties = new EcoreEMap(($clinit_ElkGraphPackage$Literals() , ELK_PROPERTY_TO_VALUE_MAP_ENTRY), Lorg_eclipse_elk_graph_impl_ElkPropertyToValueMapEntryImpl_2_classLit, this$static, 0)) , $containsKey_7(this$static.properties, property); } function $setProperty_1(this$static, property, value_0){ value_0 == null?(!this$static.properties && (this$static.properties = new EcoreEMap(($clinit_ElkGraphPackage$Literals() , ELK_PROPERTY_TO_VALUE_MAP_ENTRY), Lorg_eclipse_elk_graph_impl_ElkPropertyToValueMapEntryImpl_2_classLit, this$static, 0)) , $removeKey(this$static.properties, property)):(!this$static.properties && (this$static.properties = new EcoreEMap(($clinit_ElkGraphPackage$Literals() , ELK_PROPERTY_TO_VALUE_MAP_ENTRY), Lorg_eclipse_elk_graph_impl_ElkPropertyToValueMapEntryImpl_2_classLit, this$static, 0)) , $put_14(this$static.properties, property, value_0)); return this$static; } defineClass(2083, 120, {110:1, 342:1, 96:1, 94:1, 93:1, 58:1, 114:1, 54:1, 99:1, 119:1, 120:1}); _.eGet = function eGet_2(featureID, resolve, coreType){ return $eGet_3(this, featureID, resolve, coreType); } ; _.eInverseRemove_0 = function eInverseRemove_1(otherEnd, featureID, msgs){ return $eInverseRemove_0(this, otherEnd, featureID, msgs); } ; _.eIsSet = function eIsSet_1(featureID){ return $eIsSet_1(this, featureID); } ; _.eSet = function eSet_0(featureID, newValue){ $eSet_1(this, featureID, newValue); } ; _.eStaticClass = function eStaticClass_0(){ return $clinit_ElkGraphPackage$Literals() , EMAP_PROPERTY_HOLDER; } ; _.eUnset = function eUnset_0(featureID){ $eUnset_1(this, featureID); } ; _.getAllProperties = function getAllProperties_0(){ return $getAllProperties_0(this); } ; _.getProperties = function getProperties(){ return !this.properties && (this.properties = new EcoreEMap(($clinit_ElkGraphPackage$Literals() , ELK_PROPERTY_TO_VALUE_MAP_ENTRY), Lorg_eclipse_elk_graph_impl_ElkPropertyToValueMapEntryImpl_2_classLit, this, 0)) , this.properties; } ; _.getProperty = function getProperty_3(property){ return $getProperty_0(this, property); } ; _.hasProperty = function hasProperty_3(property){ return $hasProperty_0(this, property); } ; _.setProperty = function setProperty_0(property, value_0){ return $setProperty_1(this, property, value_0); } ; var Lorg_eclipse_elk_graph_impl_EMapPropertyHolderImpl_2_classLit = createForClass('org.eclipse.elk.graph.impl', 'EMapPropertyHolderImpl', 2083); function $set_9(this$static, x_0, y_0){ $setX_1(this$static, x_0); $setY_2(this$static, y_0); } function $setX_1(this$static, newX){ var oldX; oldX = this$static.x_0; this$static.x_0 = newX; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl(this$static, 0, oldX, this$static.x_0)); } function $setY_2(this$static, newY){ var oldY; oldY = this$static.y_0; this$static.y_0 = newY; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl(this$static, 1, oldY, this$static.y_0)); } function ElkBendPointImpl(){ } defineClass(572, 120, {110:1, 377:1, 94:1, 93:1, 58:1, 114:1, 54:1, 99:1, 119:1, 120:1}, ElkBendPointImpl); _.eGet = function eGet_3(featureID, resolve, coreType){ switch (featureID) { case 0: return this.x_0; case 1: return this.y_0; } return $eGet(this, featureID, resolve, coreType); } ; _.eIsSet = function eIsSet_2(featureID){ switch (featureID) { case 0: return this.x_0 != 0; case 1: return this.y_0 != 0; } return $eIsSet(this, featureID); } ; _.eSet = function eSet_1(featureID, newValue){ switch (featureID) { case 0: $setX_1(this, $doubleValue(castToDouble(newValue))); return; case 1: $setY_2(this, $doubleValue(castToDouble(newValue))); return; } $eSet(this, featureID, newValue); } ; _.eStaticClass = function eStaticClass_1(){ return $clinit_ElkGraphPackage$Literals() , ELK_BEND_POINT; } ; _.eUnset = function eUnset_1(featureID){ switch (featureID) { case 0: $setX_1(this, 0); return; case 1: $setY_2(this, 0); return; } $eUnset(this, featureID); } ; _.toString_0 = function toString_124(){ var result; if ((this.eFlags_0 & 64) != 0) return $toString_16(this); result = new StringBuffer_1($toString_16(this)); result.string += ' (x: '; $append_0(result, this.x_0); result.string += ', y: '; $append_0(result, this.y_0); result.string += ')'; return result.string; } ; _.x_0 = 0; _.y_0 = 0; var Lorg_eclipse_elk_graph_impl_ElkBendPointImpl_2_classLit = createForClass('org.eclipse.elk.graph.impl', 'ElkBendPointImpl', 572); function $eGet_4(this$static, featureID, resolve, coreType){ switch (featureID) { case 1: return !this$static.labels && (this$static.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, this$static, 1, 7)) , this$static.labels; case 2: return this$static.identifier; } return $eGet_3(this$static, featureID, resolve, coreType); } function $eInverseAdd_0(this$static, otherEnd, featureID, msgs){ var eClass, feature; if (featureID == 1) { return !this$static.labels && (this$static.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, this$static, 1, 7)) , $basicAdd_0(this$static.labels, otherEnd, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this$static, 16), 29) , !eClass?this$static.eStaticClass():eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseAdd(this$static, $eSettings_0(this$static), featureID - $getFeatureCount(this$static.eStaticClass()), otherEnd, msgs); } function $eInverseRemove_1(this$static, otherEnd, featureID, msgs){ if (featureID == 1) { return !this$static.labels && (this$static.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, this$static, 1, 7)) , $basicRemove_0(this$static.labels, otherEnd, msgs); } return $eInverseRemove_0(this$static, otherEnd, featureID, msgs); } function $eIsSet_2(this$static, featureID){ switch (featureID) { case 1: return !!this$static.labels && this$static.labels.size_0 != 0; case 2: return this$static.identifier != null; } return $eIsSet_1(this$static, featureID); } function $eSet_2(this$static, featureID, newValue){ switch (featureID) { case 1: !this$static.labels && (this$static.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, this$static, 1, 7)); $clear_13(this$static.labels); !this$static.labels && (this$static.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, this$static, 1, 7)); $addAll_9(this$static.labels, castTo(newValue, 16)); return; case 2: $setIdentifier(this$static, castToString(newValue)); return; } $eSet_1(this$static, featureID, newValue); } function $eUnset_2(this$static, featureID){ switch (featureID) { case 1: !this$static.labels && (this$static.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, this$static, 1, 7)); $clear_13(this$static.labels); return; case 2: $setIdentifier(this$static, null); return; } $eUnset_1(this$static, featureID); } function $getLabels_1(this$static){ !this$static.labels && (this$static.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, this$static, 1, 7)); return this$static.labels; } function $setIdentifier(this$static, newIdentifier){ var oldIdentifier; oldIdentifier = this$static.identifier; this$static.identifier = newIdentifier; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 2, oldIdentifier, this$static.identifier)); } function $toString_17(this$static){ var result; if ((this$static.eFlags_0 & 64) != 0) return $toString_16(this$static); result = new StringBuffer_1($toString_16(this$static)); result.string += ' (identifier: '; $append_3(result, this$static.identifier); result.string += ')'; return result.string; } defineClass(739, 2083, {110:1, 342:1, 167:1, 96:1, 94:1, 93:1, 58:1, 114:1, 54:1, 99:1, 119:1, 120:1}); _.eGet = function eGet_4(featureID, resolve, coreType){ return $eGet_4(this, featureID, resolve, coreType); } ; _.eInverseAdd_0 = function eInverseAdd_1(otherEnd, featureID, msgs){ return $eInverseAdd_0(this, otherEnd, featureID, msgs); } ; _.eInverseRemove_0 = function eInverseRemove_2(otherEnd, featureID, msgs){ return $eInverseRemove_1(this, otherEnd, featureID, msgs); } ; _.eIsSet = function eIsSet_3(featureID){ return $eIsSet_2(this, featureID); } ; _.eSet = function eSet_2(featureID, newValue){ $eSet_2(this, featureID, newValue); } ; _.eStaticClass = function eStaticClass_2(){ return $clinit_ElkGraphPackage$Literals() , ELK_GRAPH_ELEMENT; } ; _.eUnset = function eUnset_2(featureID){ $eUnset_2(this, featureID); } ; _.getIdentifier = function getIdentifier_0(){ return this.identifier; } ; _.getLabels_0 = function getLabels_5(){ return $getLabels_1(this); } ; _.toString_0 = function toString_125(){ return $toString_17(this); } ; _.identifier = null; var Lorg_eclipse_elk_graph_impl_ElkGraphElementImpl_2_classLit = createForClass('org.eclipse.elk.graph.impl', 'ElkGraphElementImpl', 739); function $eGet_5(this$static, featureID, resolve, coreType){ switch (featureID) { case 3: return this$static.height; case 4: return this$static.width_0; case 5: return this$static.x_0; case 6: return this$static.y_0; } return $eGet_4(this$static, featureID, resolve, coreType); } function $eIsSet_3(this$static, featureID){ switch (featureID) { case 3: return this$static.height != 0; case 4: return this$static.width_0 != 0; case 5: return this$static.x_0 != 0; case 6: return this$static.y_0 != 0; } return $eIsSet_2(this$static, featureID); } function $eSet_3(this$static, featureID, newValue){ switch (featureID) { case 3: $setHeight_0(this$static, $doubleValue(castToDouble(newValue))); return; case 4: $setWidth_0(this$static, $doubleValue(castToDouble(newValue))); return; case 5: $setX_2(this$static, $doubleValue(castToDouble(newValue))); return; case 6: $setY_3(this$static, $doubleValue(castToDouble(newValue))); return; } $eSet_2(this$static, featureID, newValue); } function $eUnset_3(this$static, featureID){ switch (featureID) { case 3: $setHeight_0(this$static, 0); return; case 4: $setWidth_0(this$static, 0); return; case 5: $setX_2(this$static, 0); return; case 6: $setY_3(this$static, 0); return; } $eUnset_2(this$static, featureID); } function $setDimensions_0(this$static, width_0, height){ $setWidth_0(this$static, width_0); $setHeight_0(this$static, height); } function $setHeight_0(this$static, newHeight){ var oldHeight; oldHeight = this$static.height; this$static.height = newHeight; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl(this$static, 3, oldHeight, this$static.height)); } function $setLocation_1(this$static, x_0, y_0){ $setX_2(this$static, x_0); $setY_3(this$static, y_0); } function $setWidth_0(this$static, newWidth){ var oldWidth; oldWidth = this$static.width_0; this$static.width_0 = newWidth; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl(this$static, 4, oldWidth, this$static.width_0)); } function $setX_2(this$static, newX){ var oldX; oldX = this$static.x_0; this$static.x_0 = newX; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl(this$static, 5, oldX, this$static.x_0)); } function $setY_3(this$static, newY){ var oldY; oldY = this$static.y_0; this$static.y_0 = newY; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl(this$static, 6, oldY, this$static.y_0)); } function $toString_18(this$static){ var result; if ((this$static.eFlags_0 & 64) != 0) return $toString_17(this$static); result = new StringBuffer_1($toString_17(this$static)); result.string += ' (height: '; $append_0(result, this$static.height); result.string += ', width: '; $append_0(result, this$static.width_0); result.string += ', x: '; $append_0(result, this$static.x_0); result.string += ', y: '; $append_0(result, this$static.y_0); result.string += ')'; return result.string; } defineClass(740, 739, {110:1, 342:1, 167:1, 422:1, 96:1, 94:1, 93:1, 58:1, 114:1, 54:1, 99:1, 119:1, 120:1}); _.eGet = function eGet_5(featureID, resolve, coreType){ return $eGet_5(this, featureID, resolve, coreType); } ; _.eIsSet = function eIsSet_4(featureID){ return $eIsSet_3(this, featureID); } ; _.eSet = function eSet_3(featureID, newValue){ $eSet_3(this, featureID, newValue); } ; _.eStaticClass = function eStaticClass_3(){ return $clinit_ElkGraphPackage$Literals() , ELK_SHAPE; } ; _.eUnset = function eUnset_3(featureID){ $eUnset_3(this, featureID); } ; _.getHeight = function getHeight(){ return this.height; } ; _.getWidth = function getWidth(){ return this.width_0; } ; _.getX = function getX(){ return this.x_0; } ; _.getY = function getY(){ return this.y_0; } ; _.setDimensions = function setDimensions(width_0, height){ $setDimensions_0(this, width_0, height); } ; _.setLocation = function setLocation(x_0, y_0){ $setLocation_1(this, x_0, y_0); } ; _.setX = function setX(newX){ $setX_2(this, newX); } ; _.setY = function setY(newY){ $setY_3(this, newY); } ; _.toString_0 = function toString_126(){ return $toString_18(this); } ; _.height = 0; _.width_0 = 0; _.x_0 = 0; _.y_0 = 0; var Lorg_eclipse_elk_graph_impl_ElkShapeImpl_2_classLit = createForClass('org.eclipse.elk.graph.impl', 'ElkShapeImpl', 740); function $eGet_6(this$static, featureID, resolve, coreType){ switch (featureID) { case 7: return !this$static.outgoingEdges && (this$static.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this$static, 7, 4)) , this$static.outgoingEdges; case 8: return !this$static.incomingEdges && (this$static.incomingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this$static, 8, 5)) , this$static.incomingEdges; } return $eGet_5(this$static, featureID, resolve, coreType); } function $eInverseAdd_1(this$static, otherEnd, featureID, msgs){ switch (featureID) { case 7: return !this$static.outgoingEdges && (this$static.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this$static, 7, 4)) , $basicAdd_0(this$static.outgoingEdges, otherEnd, msgs); case 8: return !this$static.incomingEdges && (this$static.incomingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this$static, 8, 5)) , $basicAdd_0(this$static.incomingEdges, otherEnd, msgs); } return $eInverseAdd_0(this$static, otherEnd, featureID, msgs); } function $eInverseRemove_2(this$static, otherEnd, featureID, msgs){ switch (featureID) { case 7: return !this$static.outgoingEdges && (this$static.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this$static, 7, 4)) , $basicRemove_0(this$static.outgoingEdges, otherEnd, msgs); case 8: return !this$static.incomingEdges && (this$static.incomingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this$static, 8, 5)) , $basicRemove_0(this$static.incomingEdges, otherEnd, msgs); } return $eInverseRemove_1(this$static, otherEnd, featureID, msgs); } function $eIsSet_4(this$static, featureID){ switch (featureID) { case 7: return !!this$static.outgoingEdges && this$static.outgoingEdges.size_0 != 0; case 8: return !!this$static.incomingEdges && this$static.incomingEdges.size_0 != 0; } return $eIsSet_3(this$static, featureID); } function $eSet_4(this$static, featureID, newValue){ switch (featureID) { case 7: !this$static.outgoingEdges && (this$static.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this$static, 7, 4)); $clear_13(this$static.outgoingEdges); !this$static.outgoingEdges && (this$static.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this$static, 7, 4)); $addAll_9(this$static.outgoingEdges, castTo(newValue, 16)); return; case 8: !this$static.incomingEdges && (this$static.incomingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this$static, 8, 5)); $clear_13(this$static.incomingEdges); !this$static.incomingEdges && (this$static.incomingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this$static, 8, 5)); $addAll_9(this$static.incomingEdges, castTo(newValue, 16)); return; } $eSet_3(this$static, featureID, newValue); } function $eUnset_4(this$static, featureID){ switch (featureID) { case 7: !this$static.outgoingEdges && (this$static.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this$static, 7, 4)); $clear_13(this$static.outgoingEdges); return; case 8: !this$static.incomingEdges && (this$static.incomingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this$static, 8, 5)); $clear_13(this$static.incomingEdges); return; } $eUnset_3(this$static, featureID); } function ElkConnectableShapeImpl(){ } defineClass(741, 740, {110:1, 342:1, 84:1, 167:1, 422:1, 96:1, 94:1, 93:1, 58:1, 114:1, 54:1, 99:1, 119:1, 120:1}); _.eGet = function eGet_6(featureID, resolve, coreType){ return $eGet_6(this, featureID, resolve, coreType); } ; _.eInverseAdd_0 = function eInverseAdd_2(otherEnd, featureID, msgs){ return $eInverseAdd_1(this, otherEnd, featureID, msgs); } ; _.eInverseRemove_0 = function eInverseRemove_3(otherEnd, featureID, msgs){ return $eInverseRemove_2(this, otherEnd, featureID, msgs); } ; _.eIsSet = function eIsSet_5(featureID){ return $eIsSet_4(this, featureID); } ; _.eSet = function eSet_4(featureID, newValue){ $eSet_4(this, featureID, newValue); } ; _.eStaticClass = function eStaticClass_4(){ return $clinit_ElkGraphPackage$Literals() , ELK_CONNECTABLE_SHAPE; } ; _.eUnset = function eUnset_4(featureID){ $eUnset_4(this, featureID); } ; _.getIncomingEdges_0 = function getIncomingEdges_3(){ return !this.incomingEdges && (this.incomingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this, 8, 5)) , this.incomingEdges; } ; _.getOutgoingEdges_0 = function getOutgoingEdges_3(){ return !this.outgoingEdges && (this.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this, 7, 4)) , this.outgoingEdges; } ; var Lorg_eclipse_elk_graph_impl_ElkConnectableShapeImpl_2_classLit = createForClass('org.eclipse.elk.graph.impl', 'ElkConnectableShapeImpl', 741); function $basicSetContainingNode(this$static, newContainingNode, msgs){ msgs = $eBasicSetContainer(this$static, newContainingNode, 3, msgs); return msgs; } function $eBasicRemoveFromContainerFeature(this$static, msgs){ var eClass, inverseFeature; if (this$static.eFlags_0 >> 16 == 3) { return this$static.eContainer.eInverseRemove(this$static, 12, Lorg_eclipse_elk_graph_ElkNode_2_classLit, msgs); } return inverseFeature = $getEOpposite(castTo($getEStructuralFeature((eClass = castTo($getField(this$static, 16), 29) , !eClass?($clinit_ElkGraphPackage$Literals() , ELK_EDGE):eClass), this$static.eFlags_0 >> 16), 19)) , this$static.eContainer.eInverseRemove(this$static, inverseFeature.featureID, inverseFeature.containerClass, msgs); } function $getContainingNode(this$static){ if (this$static.eFlags_0 >> 16 != 3) return null; return castTo(this$static.eContainer, 27); } function $getSources(this$static){ !this$static.sources && (this$static.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this$static, 4, 7)); return this$static.sources; } function $getTargets(this$static){ !this$static.targets && (this$static.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this$static, 5, 8)); return this$static.targets; } function $isHierarchical(this$static){ var commonRepresentingNode, incidentShape, incidentShape$iterator, shapeNode; commonRepresentingNode = null; for (incidentShape$iterator = $iterator(concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [(!this$static.sources && (this$static.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this$static, 4, 7)) , this$static.sources), (!this$static.targets && (this$static.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this$static, 5, 8)) , this$static.targets)]))); $hasNext_1(incidentShape$iterator);) { incidentShape = castTo($next_0(incidentShape$iterator), 84); shapeNode = connectableShapeToNode(incidentShape); if (!commonRepresentingNode) { commonRepresentingNode = $getParent_2(shapeNode); } else if (commonRepresentingNode != $getParent_2(shapeNode)) { return true; } } return false; } function $isSelfloop(this$static){ var commonNode, incidentShape, incidentShape$iterator, shapeNode; commonNode = null; for (incidentShape$iterator = $iterator(concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [(!this$static.sources && (this$static.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this$static, 4, 7)) , this$static.sources), (!this$static.targets && (this$static.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this$static, 5, 8)) , this$static.targets)]))); $hasNext_1(incidentShape$iterator);) { incidentShape = castTo($next_0(incidentShape$iterator), 84); shapeNode = connectableShapeToNode(incidentShape); if (!commonNode) { commonNode = shapeNode; } else if (commonNode != shapeNode) { return false; } } return true; } function $setContainingNode(this$static, newContainingNode){ var eContainerFeatureID, msgs; if (newContainingNode != this$static.eContainer || this$static.eFlags_0 >> 16 != 3 && !!newContainingNode) { if (isAncestor(this$static, newContainingNode)) throw toJs(new IllegalArgumentException_0('Recursive containment not allowed for ' + $toString_19(this$static))); msgs = null; !!this$static.eContainer && (msgs = (eContainerFeatureID = this$static.eFlags_0 >> 16 , eContainerFeatureID >= 0?$eBasicRemoveFromContainerFeature(this$static, msgs):this$static.eContainer.eInverseRemove(this$static, -1 - eContainerFeatureID, null, msgs))); !!newContainingNode && (msgs = $eInverseAdd(newContainingNode, this$static, 12, msgs)); msgs = $basicSetContainingNode(this$static, newContainingNode, msgs); !!msgs && msgs.dispatch_0(); } else (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 3, newContainingNode, newContainingNode)); } function $toString_19(this$static){ var builder, hyperedge, id_0, text_0; if ((this$static.eFlags_0 & 64) != 0) return $toString_17(this$static); builder = new StringBuilder_1('ElkEdge'); id_0 = this$static.identifier; if (!id_0) { !this$static.labels && (this$static.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, this$static, 1, 7)); if (this$static.labels.size_0 > 0) { text_0 = (!this$static.labels && (this$static.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, this$static, 1, 7)) , castTo($get_20(this$static.labels, 0), 135)).text_0; !text_0 || $append_11($append_11((builder.string += ' "' , builder), text_0), '"'); } } else { $append_11($append_11((builder.string += ' "' , builder), id_0), '"'); } hyperedge = (!this$static.sources && (this$static.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this$static, 4, 7)) , !(this$static.sources.size_0 <= 1 && (!this$static.targets && (this$static.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this$static, 5, 8)) , this$static.targets.size_0 <= 1))); hyperedge?(builder.string += ' [' , builder):(builder.string += ' ' , builder); $append_11(builder, $join(new Joiner, new AbstractEList$EIterator(this$static.sources))); hyperedge && (builder.string += ']' , builder); builder.string += ' -> '; hyperedge && (builder.string += '[' , builder); $append_11(builder, $join(new Joiner, new AbstractEList$EIterator(this$static.targets))); hyperedge && (builder.string += ']' , builder); return builder.string; } function ElkEdgeImpl(){ } defineClass(326, 739, {110:1, 342:1, 74:1, 167:1, 326:1, 96:1, 94:1, 93:1, 58:1, 114:1, 54:1, 99:1, 119:1, 120:1}, ElkEdgeImpl); _.eBasicRemoveFromContainerFeature = function eBasicRemoveFromContainerFeature_0(msgs){ return $eBasicRemoveFromContainerFeature(this, msgs); } ; _.eGet = function eGet_7(featureID, resolve, coreType){ switch (featureID) { case 3: return $getContainingNode(this); case 4: return !this.sources && (this.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this, 4, 7)) , this.sources; case 5: return !this.targets && (this.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this, 5, 8)) , this.targets; case 6: return !this.sections && (this.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, this, 6, 6)) , this.sections; case 7: return $clinit_Boolean() , !this.sources && (this.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this, 4, 7)) , this.sources.size_0 <= 1 && (!this.targets && (this.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this, 5, 8)) , this.targets.size_0 <= 1)?false:true; case 8: return $clinit_Boolean() , $isHierarchical(this)?true:false; case 9: return $clinit_Boolean() , $isSelfloop(this)?true:false; case 10: return $clinit_Boolean() , !this.sources && (this.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this, 4, 7)) , this.sources.size_0 != 0 && (!this.targets && (this.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this, 5, 8)) , this.targets.size_0 != 0)?true:false; } return $eGet_4(this, featureID, resolve, coreType); } ; _.eInverseAdd_0 = function eInverseAdd_3(otherEnd, featureID, msgs){ var eContainerFeatureID; switch (featureID) { case 3: !!this.eContainer && (msgs = (eContainerFeatureID = this.eFlags_0 >> 16 , eContainerFeatureID >= 0?$eBasicRemoveFromContainerFeature(this, msgs):this.eContainer.eInverseRemove(this, -1 - eContainerFeatureID, null, msgs))); return $basicSetContainingNode(this, castTo(otherEnd, 27), msgs); case 4: return !this.sources && (this.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this, 4, 7)) , $basicAdd_0(this.sources, otherEnd, msgs); case 5: return !this.targets && (this.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this, 5, 8)) , $basicAdd_0(this.targets, otherEnd, msgs); case 6: return !this.sections && (this.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, this, 6, 6)) , $basicAdd_0(this.sections, otherEnd, msgs); } return $eInverseAdd_0(this, otherEnd, featureID, msgs); } ; _.eInverseRemove_0 = function eInverseRemove_4(otherEnd, featureID, msgs){ switch (featureID) { case 3: return $basicSetContainingNode(this, null, msgs); case 4: return !this.sources && (this.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this, 4, 7)) , $basicRemove_0(this.sources, otherEnd, msgs); case 5: return !this.targets && (this.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this, 5, 8)) , $basicRemove_0(this.targets, otherEnd, msgs); case 6: return !this.sections && (this.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, this, 6, 6)) , $basicRemove_0(this.sections, otherEnd, msgs); } return $eInverseRemove_1(this, otherEnd, featureID, msgs); } ; _.eIsSet = function eIsSet_6(featureID){ switch (featureID) { case 3: return !!$getContainingNode(this); case 4: return !!this.sources && this.sources.size_0 != 0; case 5: return !!this.targets && this.targets.size_0 != 0; case 6: return !!this.sections && this.sections.size_0 != 0; case 7: return !this.sources && (this.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this, 4, 7)) , !(this.sources.size_0 <= 1 && (!this.targets && (this.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this, 5, 8)) , this.targets.size_0 <= 1)); case 8: return $isHierarchical(this); case 9: return $isSelfloop(this); case 10: return !this.sources && (this.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this, 4, 7)) , this.sources.size_0 != 0 && (!this.targets && (this.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this, 5, 8)) , this.targets.size_0 != 0); } return $eIsSet_2(this, featureID); } ; _.eSet = function eSet_5(featureID, newValue){ switch (featureID) { case 3: $setContainingNode(this, castTo(newValue, 27)); return; case 4: !this.sources && (this.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this, 4, 7)); $clear_13(this.sources); !this.sources && (this.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this, 4, 7)); $addAll_9(this.sources, castTo(newValue, 16)); return; case 5: !this.targets && (this.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this, 5, 8)); $clear_13(this.targets); !this.targets && (this.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this, 5, 8)); $addAll_9(this.targets, castTo(newValue, 16)); return; case 6: !this.sections && (this.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, this, 6, 6)); $clear_13(this.sections); !this.sections && (this.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, this, 6, 6)); $addAll_9(this.sections, castTo(newValue, 16)); return; } $eSet_2(this, featureID, newValue); } ; _.eStaticClass = function eStaticClass_5(){ return $clinit_ElkGraphPackage$Literals() , ELK_EDGE; } ; _.eUnset = function eUnset_5(featureID){ switch (featureID) { case 3: $setContainingNode(this, null); return; case 4: !this.sources && (this.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this, 4, 7)); $clear_13(this.sources); return; case 5: !this.targets && (this.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, this, 5, 8)); $clear_13(this.targets); return; case 6: !this.sections && (this.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, this, 6, 6)); $clear_13(this.sections); return; } $eUnset_2(this, featureID); } ; _.toString_0 = function toString_127(){ return $toString_19(this); } ; var Lorg_eclipse_elk_graph_impl_ElkEdgeImpl_2_classLit = createForClass('org.eclipse.elk.graph.impl', 'ElkEdgeImpl', 326); function $basicSetParent(this$static, newParent, msgs){ msgs = $eBasicSetContainer(this$static, newParent, 6, msgs); return msgs; } function $eBasicRemoveFromContainerFeature_0(this$static, msgs){ var eClass, inverseFeature; if (this$static.eFlags_0 >> 16 == 6) { return this$static.eContainer.eInverseRemove(this$static, 6, Lorg_eclipse_elk_graph_ElkEdge_2_classLit, msgs); } return inverseFeature = $getEOpposite(castTo($getEStructuralFeature((eClass = castTo($getField(this$static, 16), 29) , !eClass?($clinit_ElkGraphPackage$Literals() , ELK_EDGE_SECTION):eClass), this$static.eFlags_0 >> 16), 19)) , this$static.eContainer.eInverseRemove(this$static, inverseFeature.featureID, inverseFeature.containerClass, msgs); } function $getIncomingShape(this$static){ var oldIncomingShape; if (!!this$static.incomingShape && this$static.incomingShape.eIsProxy()) { oldIncomingShape = castTo(this$static.incomingShape, 54); this$static.incomingShape = castTo($eResolveProxy(this$static, oldIncomingShape), 84); this$static.incomingShape != oldIncomingShape && (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 9, 8, oldIncomingShape, this$static.incomingShape)); } return this$static.incomingShape; } function $getOutgoingShape(this$static){ var oldOutgoingShape; if (!!this$static.outgoingShape && this$static.outgoingShape.eIsProxy()) { oldOutgoingShape = castTo(this$static.outgoingShape, 54); this$static.outgoingShape = castTo($eResolveProxy(this$static, oldOutgoingShape), 84); this$static.outgoingShape != oldOutgoingShape && (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 9, 7, oldOutgoingShape, this$static.outgoingShape)); } return this$static.outgoingShape; } function $getParent_0(this$static){ if (this$static.eFlags_0 >> 16 != 6) return null; return castTo(this$static.eContainer, 74); } function $setEndLocation(this$static, x_0, y_0){ $setEndX(this$static, x_0); $setEndY(this$static, y_0); } function $setEndX(this$static, newEndX){ var oldEndX; oldEndX = this$static.endX; this$static.endX = newEndX; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl(this$static, 3, oldEndX, this$static.endX)); } function $setEndY(this$static, newEndY){ var oldEndY; oldEndY = this$static.endY; this$static.endY = newEndY; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl(this$static, 4, oldEndY, this$static.endY)); } function $setIdentifier_0(this$static, newIdentifier){ var oldIdentifier; oldIdentifier = this$static.identifier; this$static.identifier = newIdentifier; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 11, oldIdentifier, this$static.identifier)); } function $setIncomingShape(this$static, newIncomingShape){ var oldIncomingShape; oldIncomingShape = this$static.incomingShape; this$static.incomingShape = newIncomingShape; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 8, oldIncomingShape, this$static.incomingShape)); } function $setOutgoingShape(this$static, newOutgoingShape){ var oldOutgoingShape; oldOutgoingShape = this$static.outgoingShape; this$static.outgoingShape = newOutgoingShape; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 7, oldOutgoingShape, this$static.outgoingShape)); } function $setParent_0(this$static, newParent){ var eContainerFeatureID, msgs; if (newParent != this$static.eContainer || this$static.eFlags_0 >> 16 != 6 && !!newParent) { if (isAncestor(this$static, newParent)) throw toJs(new IllegalArgumentException_0('Recursive containment not allowed for ' + $toString_20(this$static))); msgs = null; !!this$static.eContainer && (msgs = (eContainerFeatureID = this$static.eFlags_0 >> 16 , eContainerFeatureID >= 0?$eBasicRemoveFromContainerFeature_0(this$static, msgs):this$static.eContainer.eInverseRemove(this$static, -1 - eContainerFeatureID, null, msgs))); !!newParent && (msgs = $eInverseAdd(newParent, this$static, 6, msgs)); msgs = $basicSetParent(this$static, newParent, msgs); !!msgs && msgs.dispatch_0(); } else (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 6, newParent, newParent)); } function $setStartLocation(this$static, x_0, y_0){ $setStartX(this$static, x_0); $setStartY(this$static, y_0); } function $setStartX(this$static, newStartX){ var oldStartX; oldStartX = this$static.startX; this$static.startX = newStartX; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl(this$static, 1, oldStartX, this$static.startX)); } function $setStartY(this$static, newStartY){ var oldStartY; oldStartY = this$static.startY; this$static.startY = newStartY; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl(this$static, 2, oldStartY, this$static.startY)); } function $toString_20(this$static){ var result; if ((this$static.eFlags_0 & 64) != 0) return $toString_16(this$static); result = new StringBuffer_1($toString_16(this$static)); result.string += ' (startX: '; $append_0(result, this$static.startX); result.string += ', startY: '; $append_0(result, this$static.startY); result.string += ', endX: '; $append_0(result, this$static.endX); result.string += ', endY: '; $append_0(result, this$static.endY); result.string += ', identifier: '; $append_3(result, this$static.identifier); result.string += ')'; return result.string; } function ElkEdgeSectionImpl(){ } defineClass(452, 2083, {110:1, 342:1, 166:1, 452:1, 96:1, 94:1, 93:1, 58:1, 114:1, 54:1, 99:1, 119:1, 120:1}, ElkEdgeSectionImpl); _.eBasicRemoveFromContainerFeature = function eBasicRemoveFromContainerFeature_1(msgs){ return $eBasicRemoveFromContainerFeature_0(this, msgs); } ; _.eGet = function eGet_8(featureID, resolve, coreType){ switch (featureID) { case 1: return this.startX; case 2: return this.startY; case 3: return this.endX; case 4: return this.endY; case 5: return !this.bendPoints && (this.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, this, 5)) , this.bendPoints; case 6: return $getParent_0(this); case 7: if (resolve) return $getOutgoingShape(this); return this.outgoingShape; case 8: if (resolve) return $getIncomingShape(this); return this.incomingShape; case 9: return !this.outgoingSections && (this.outgoingSections = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, this, 9, 10)) , this.outgoingSections; case 10: return !this.incomingSections && (this.incomingSections = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, this, 10, 9)) , this.incomingSections; case 11: return this.identifier; } return $eGet_3(this, featureID, resolve, coreType); } ; _.eInverseAdd_0 = function eInverseAdd_4(otherEnd, featureID, msgs){ var eClass, eContainerFeatureID, feature; switch (featureID) { case 6: !!this.eContainer && (msgs = (eContainerFeatureID = this.eFlags_0 >> 16 , eContainerFeatureID >= 0?$eBasicRemoveFromContainerFeature_0(this, msgs):this.eContainer.eInverseRemove(this, -1 - eContainerFeatureID, null, msgs))); return $basicSetParent(this, castTo(otherEnd, 74), msgs); case 9: return !this.outgoingSections && (this.outgoingSections = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, this, 9, 10)) , $basicAdd_0(this.outgoingSections, otherEnd, msgs); case 10: return !this.incomingSections && (this.incomingSections = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, this, 10, 9)) , $basicAdd_0(this.incomingSections, otherEnd, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?($clinit_ElkGraphPackage$Literals() , ELK_EDGE_SECTION):eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseAdd(this, $eSettings_0(this), featureID - $getFeatureCount(($clinit_ElkGraphPackage$Literals() , ELK_EDGE_SECTION)), otherEnd, msgs); } ; _.eInverseRemove_0 = function eInverseRemove_5(otherEnd, featureID, msgs){ switch (featureID) { case 5: return !this.bendPoints && (this.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, this, 5)) , $basicRemove_0(this.bendPoints, otherEnd, msgs); case 6: return $basicSetParent(this, null, msgs); case 9: return !this.outgoingSections && (this.outgoingSections = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, this, 9, 10)) , $basicRemove_0(this.outgoingSections, otherEnd, msgs); case 10: return !this.incomingSections && (this.incomingSections = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, this, 10, 9)) , $basicRemove_0(this.incomingSections, otherEnd, msgs); } return $eInverseRemove_0(this, otherEnd, featureID, msgs); } ; _.eIsSet = function eIsSet_7(featureID){ switch (featureID) { case 1: return this.startX != 0; case 2: return this.startY != 0; case 3: return this.endX != 0; case 4: return this.endY != 0; case 5: return !!this.bendPoints && this.bendPoints.size_0 != 0; case 6: return !!$getParent_0(this); case 7: return !!this.outgoingShape; case 8: return !!this.incomingShape; case 9: return !!this.outgoingSections && this.outgoingSections.size_0 != 0; case 10: return !!this.incomingSections && this.incomingSections.size_0 != 0; case 11: return this.identifier != null; } return $eIsSet_1(this, featureID); } ; _.eSet = function eSet_6(featureID, newValue){ switch (featureID) { case 1: $setStartX(this, $doubleValue(castToDouble(newValue))); return; case 2: $setStartY(this, $doubleValue(castToDouble(newValue))); return; case 3: $setEndX(this, $doubleValue(castToDouble(newValue))); return; case 4: $setEndY(this, $doubleValue(castToDouble(newValue))); return; case 5: !this.bendPoints && (this.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, this, 5)); $clear_13(this.bendPoints); !this.bendPoints && (this.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, this, 5)); $addAll_9(this.bendPoints, castTo(newValue, 16)); return; case 6: $setParent_0(this, castTo(newValue, 74)); return; case 7: $setOutgoingShape(this, castTo(newValue, 84)); return; case 8: $setIncomingShape(this, castTo(newValue, 84)); return; case 9: !this.outgoingSections && (this.outgoingSections = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, this, 9, 10)); $clear_13(this.outgoingSections); !this.outgoingSections && (this.outgoingSections = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, this, 9, 10)); $addAll_9(this.outgoingSections, castTo(newValue, 16)); return; case 10: !this.incomingSections && (this.incomingSections = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, this, 10, 9)); $clear_13(this.incomingSections); !this.incomingSections && (this.incomingSections = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, this, 10, 9)); $addAll_9(this.incomingSections, castTo(newValue, 16)); return; case 11: $setIdentifier_0(this, castToString(newValue)); return; } $eSet_1(this, featureID, newValue); } ; _.eStaticClass = function eStaticClass_6(){ return $clinit_ElkGraphPackage$Literals() , ELK_EDGE_SECTION; } ; _.eUnset = function eUnset_6(featureID){ switch (featureID) { case 1: $setStartX(this, 0); return; case 2: $setStartY(this, 0); return; case 3: $setEndX(this, 0); return; case 4: $setEndY(this, 0); return; case 5: !this.bendPoints && (this.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, this, 5)); $clear_13(this.bendPoints); return; case 6: $setParent_0(this, null); return; case 7: $setOutgoingShape(this, null); return; case 8: $setIncomingShape(this, null); return; case 9: !this.outgoingSections && (this.outgoingSections = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, this, 9, 10)); $clear_13(this.outgoingSections); return; case 10: !this.incomingSections && (this.incomingSections = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, this, 10, 9)); $clear_13(this.incomingSections); return; case 11: $setIdentifier_0(this, null); return; } $eUnset_1(this, featureID); } ; _.toString_0 = function toString_128(){ return $toString_20(this); } ; _.endX = 0; _.endY = 0; _.identifier = null; _.startX = 0; _.startY = 0; var Lorg_eclipse_elk_graph_impl_ElkEdgeSectionImpl_2_classLit = createForClass('org.eclipse.elk.graph.impl', 'ElkEdgeSectionImpl', 452); function $eObjectForURIFragmentSegment_0(this$static, uriFragmentSegment){ var count, count0, eAnnotation, eNamedElement, encodedSource, exception, firstCharacter, hasCount, index_0, index0, length_0, name_0, object, object$iterator, object$iterator0, otherName, otherSource, source; length_0 = uriFragmentSegment.length; if (length_0 > 0) { firstCharacter = (checkCriticalStringElementIndex(0, uriFragmentSegment.length) , uriFragmentSegment.charCodeAt(0)); if (firstCharacter != 64) { if (firstCharacter == 37) { index0 = uriFragmentSegment.lastIndexOf('%'); hasCount = false; if (index0 != 0 && (index0 == length_0 - 1 || (hasCount = (checkCriticalStringElementIndex(index0 + 1, uriFragmentSegment.length) , uriFragmentSegment.charCodeAt(index0 + 1) == 46)))) { encodedSource = (checkCriticalStringBounds(1, index0, uriFragmentSegment.length) , uriFragmentSegment.substr(1, index0 - 1)); source = $equals_5('%', encodedSource)?null:decode(encodedSource); count0 = 0; if (hasCount) { try { count0 = __parseAndValidateInt((checkCriticalStringElementIndex(index0 + 2, uriFragmentSegment.length + 1) , uriFragmentSegment.substr(index0 + 2)), $intern_43, $intern_0); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 130)) { exception = $e0; throw toJs(new WrappedException(exception)); } else throw toJs($e0); } } for (object$iterator0 = $iterator_1(this$static.eContents_0()); object$iterator0.hasNext_0();) { object = $next_14(object$iterator0); if (instanceOf(object, 519)) { eAnnotation = castTo(object, 598); otherSource = eAnnotation.source; if ((source == null?otherSource == null:$equals_5(source, otherSource)) && count0-- == 0) { return eAnnotation; } } } return null; } } index_0 = uriFragmentSegment.lastIndexOf('.'); name_0 = index_0 == -1?uriFragmentSegment:(checkCriticalStringBounds(0, index_0, uriFragmentSegment.length) , uriFragmentSegment.substr(0, index_0)); count = 0; if (index_0 != -1) { try { count = __parseAndValidateInt((checkCriticalStringElementIndex(index_0 + 1, uriFragmentSegment.length + 1) , uriFragmentSegment.substr(index_0 + 1)), $intern_43, $intern_0); } catch ($e1) { $e1 = toJava($e1); if (instanceOf($e1, 130)) { name_0 = uriFragmentSegment; } else throw toJs($e1); } } name_0 = $equals_5('%', name_0)?null:decode(name_0); for (object$iterator = $iterator_1(this$static.eContents_0()); object$iterator.hasNext_0();) { object = $next_14(object$iterator); if (instanceOf(object, 197)) { eNamedElement = castTo(object, 197); otherName = eNamedElement.getName(); if ((name_0 == null?otherName == null:$equals_5(name_0, otherName)) && count-- == 0) { return eNamedElement; } } } return null; } } return $eObjectForURIFragmentSegment(this$static, uriFragmentSegment); } function $freeze(eModelElement){ instanceOf(eModelElement, 158) && castTo(eModelElement, 158).freeze(); } function $getEAnnotation(this$static, source){ var eAnnotation, eAnnotation$iterator, eAnnotationArray, i, size_0; if (this$static.eAnnotations) { if (this$static.eAnnotations) { size_0 = this$static.eAnnotations.size_0; if (size_0 > 0) { eAnnotationArray = castTo(this$static.eAnnotations.data_0, 2033); if (source == null) { for (i = 0; i < size_0; ++i) { eAnnotation = eAnnotationArray[i]; if (eAnnotation.source == null) { return eAnnotation; } } } else { for (i = 0; i < size_0; ++i) { eAnnotation = eAnnotationArray[i]; if ($equals_5(source, eAnnotation.source)) { return eAnnotation; } } } } } else { if (source == null) { for (eAnnotation$iterator = new AbstractEList$EIterator(this$static.eAnnotations); eAnnotation$iterator.cursor != eAnnotation$iterator.this$01_2.size_1();) { eAnnotation = castTo($doNext(eAnnotation$iterator), 598); if (eAnnotation.source == null) { return eAnnotation; } } } else { for (eAnnotation$iterator = new AbstractEList$EIterator(this$static.eAnnotations); eAnnotation$iterator.cursor != eAnnotation$iterator.this$01_2.size_1();) { eAnnotation = castTo($doNext(eAnnotation$iterator), 598); if ($equals_5(source, eAnnotation.source)) { return eAnnotation; } } } } } return null; } defineClass(158, 120, {110:1, 94:1, 93:1, 155:1, 58:1, 114:1, 54:1, 99:1, 158:1, 119:1, 120:1}); _.eGet = function eGet_9(featureID, resolve, coreType){ var eClass; if (featureID == 0) { return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , this.eAnnotations; } return $eDynamicGet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID), resolve, coreType); } ; _.eInverseAdd_0 = function eInverseAdd_5(otherEnd, featureID, msgs){ var eClass, feature; if (featureID == 0) { return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicAdd_0(this.eAnnotations, otherEnd, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseAdd(this, $eSettings_0(this), featureID - $getFeatureCount(this.eStaticClass()), otherEnd, msgs); } ; _.eInverseRemove_0 = function eInverseRemove_6(otherEnd, featureID, msgs){ var eClass, feature; if (featureID == 0) { return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicRemove_0(this.eAnnotations, otherEnd, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseRemove(this, $eSettings_0(this), featureID - $getFeatureCount(this.eStaticClass()), otherEnd, msgs); } ; _.eIsSet = function eIsSet_8(featureID){ var eClass; if (featureID == 0) { return !!this.eAnnotations && this.eAnnotations.size_0 != 0; } return $eDynamicIsSet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID)); } ; _.eObjectForURIFragmentSegment = function eObjectForURIFragmentSegment_0(uriFragmentSegment){ return $eObjectForURIFragmentSegment_0(this, uriFragmentSegment); } ; _.eSet = function eSet_7(featureID, newValue){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $addAll_9(this.eAnnotations, castTo(newValue, 16)); return; } $eDynamicSet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID), newValue); } ; _.eSetDirectResource = function eSetDirectResource_1(resource){ $setField(this, 128, resource); } ; _.eStaticClass = function eStaticClass_7(){ return $clinit_EcorePackage$Literals() , EMODEL_ELEMENT; } ; _.eUnset = function eUnset_7(featureID){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); return; } $eDynamicUnset(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID)); } ; _.freeze = function freeze(){ this.eFlags |= 1; } ; _.getEAnnotation = function getEAnnotation(source){ return $getEAnnotation(this, source); } ; _.eFlags = 0; var Lorg_eclipse_emf_ecore_impl_EModelElementImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EModelElementImpl', 158); function $clinit_EFactoryImpl(){ $clinit_EFactoryImpl = emptyMethod; HEX_DIGITS = stampJavaTypeInfo(getClassLiteralForArray(C_classLit, 1), $intern_45, 28, 15, [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70]); WHITE_SPACE = new RegExp('[ \t\n\r\f]+'); try { EDATE_FORMATS = stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_emf_ecore_impl_EFactoryImpl$InternalEDateTimeFormat_2_classLit, 1), $intern_2, 2114, 0, [new EFactoryImpl$1ClientInternalEDateTimeFormat(($clinit_DateTimeFormat_0() , getFormat("yyyy-MM-dd'T'HH:mm:ss'.'SSSZ", $getDateTimeFormatInfo(($clinit_LocaleInfo() , $clinit_LocaleInfo() , instance_0))))), new EFactoryImpl$1ClientInternalEDateTimeFormat(getFormat("yyyy-MM-dd'T'HH:mm:ss'.'SSS", $getDateTimeFormatInfo((null , instance_0)))), new EFactoryImpl$1ClientInternalEDateTimeFormat(getFormat("yyyy-MM-dd'T'HH:mm:ss", $getDateTimeFormatInfo((null , instance_0)))), new EFactoryImpl$1ClientInternalEDateTimeFormat(getFormat("yyyy-MM-dd'T'HH:mm", $getDateTimeFormatInfo((null , instance_0)))), new EFactoryImpl$1ClientInternalEDateTimeFormat(getFormat('yyyy-MM-dd', $getDateTimeFormatInfo((null , instance_0))))]); } catch ($e0) { $e0 = toJava($e0); if (!instanceOf($e0, 82)) throw toJs($e0); } } function $basicSetEPackage(this$static, newEPackage, msgs){ var notification, oldEPackage; oldEPackage = this$static.ePackage; this$static.ePackage = newEPackage; if ((this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0) { notification = new ENotificationImpl_1(this$static, 1, 1, oldEPackage, newEPackage); !msgs?(msgs = notification):msgs.add_5(notification); } return msgs; } function $bytesToHexString(bytes, count){ var high, i, j, low, result; if (bytes == null) { return null; } else { result = initUnidimensionalArray(C_classLit, $intern_45, 28, 2 * count, 15, 1); for (i = 0 , j = 0; i < count; ++i) { high = bytes[i] >> 4 & 15; low = bytes[i] & 15; result[j++] = HEX_DIGITS[high]; result[j++] = HEX_DIGITS[low]; } return valueOf_8(result, 0, result.length); } } function $convertToString(this$static, eDataType, objectValue){ var baseType, item_0, item$iterator, itemType, list, memberType, memberType$iterator, memberTypes, result; if (this$static.ePackage != eDataType.getEPackage()) { throw toJs(new IllegalArgumentException_0("The datatype '" + eDataType.getName() + "' is not a valid classifier")); } baseType = $getExtendedMetaData(($clinit_ExtendedMetaData() , INSTANCE_11), eDataType).getBaseType(); if (baseType) { return baseType.getEPackage().getEFactoryInstance().convertToString(baseType, objectValue); } itemType = $getExtendedMetaData(INSTANCE_11, eDataType).getItemType(); if (itemType) { if (objectValue == null) { return null; } list = castTo(objectValue, 15); if (list.isEmpty()) { return ''; } result = new StringBuffer; for (item$iterator = list.iterator_0(); item$iterator.hasNext_0();) { item_0 = item$iterator.next_1(); $append_3(result, itemType.getEPackage().getEFactoryInstance().convertToString(itemType, item_0)); result.string += ' '; } return $substring(result, result.string.length - 1); } memberTypes = $getExtendedMetaData(INSTANCE_11, eDataType).getMemberTypes(); if (!memberTypes.isEmpty()) { for (memberType$iterator = memberTypes.iterator_0(); memberType$iterator.hasNext_0();) { memberType = castTo(memberType$iterator.next_1(), 156); if (memberType.isInstance(objectValue)) { try { result = memberType.getEPackage().getEFactoryInstance().convertToString(memberType, objectValue); if (result != null) { return result; } } catch ($e0) { $e0 = toJava($e0); if (!instanceOf($e0, 103)) throw toJs($e0); } } } throw toJs(new IllegalArgumentException_0("Invalid value: '" + objectValue + "' for datatype :" + eDataType.getName())); } castTo(eDataType, 847).getConversionDelegate(); return objectValue == null?null:instanceOf(objectValue, 180)?'' + castTo(objectValue, 180).value_0:getClass__Ljava_lang_Class___devirtual$(objectValue) == Ljava_util_Date_2_classLit?$format_0(EDATE_FORMATS[0], castTo(objectValue, 206)):toString_40(objectValue); } function $createFromString(this$static, eDataType, stringValue){ var baseType, c, carray, charValue, i, item_0, item$array, item$index, item$max, itemType, memberType, memberType$iterator, memberTypes, result; if (stringValue == null) { return null; } if (this$static.ePackage != eDataType.getEPackage()) { throw toJs(new IllegalArgumentException_0("The datatype '" + eDataType.getName() + "' is not a valid classifier")); } if (instanceOf(eDataType, 469)) { result = $getEEnumLiteralByLiteral(castTo(eDataType, 685), stringValue); if (!result) { throw toJs(new IllegalArgumentException_0("The value '" + stringValue + "' is not a valid enumerator of '" + eDataType.getName() + "'")); } return result; } switch ($getExtendedMetaData(($clinit_ExtendedMetaData() , INSTANCE_11), eDataType).getWhiteSpaceFacet()) { case 2: { stringValue = normalize(stringValue, false); break; } case 3: { stringValue = normalize(stringValue, true); break; } } baseType = $getExtendedMetaData(INSTANCE_11, eDataType).getBaseType(); if (baseType) { return baseType.getEPackage().getEFactoryInstance().createFromString(baseType, stringValue); } itemType = $getExtendedMetaData(INSTANCE_11, eDataType).getItemType(); if (itemType) { result = new ArrayList; for (item$array = $split_5(stringValue) , item$index = 0 , item$max = item$array.length; item$index < item$max; ++item$index) { item_0 = item$array[item$index]; $add_3(result, itemType.getEPackage().getEFactoryInstance().createFromString(itemType, item_0)); } return result; } memberTypes = $getExtendedMetaData(INSTANCE_11, eDataType).getMemberTypes(); if (!memberTypes.isEmpty()) { for (memberType$iterator = memberTypes.iterator_0(); memberType$iterator.hasNext_0();) { memberType = castTo(memberType$iterator.next_1(), 156); try { result = memberType.getEPackage().getEFactoryInstance().createFromString(memberType, stringValue); if (result != null) { return result; } } catch ($e0) { $e0 = toJava($e0); if (!instanceOf($e0, 63)) throw toJs($e0); } } throw toJs(new IllegalArgumentException_0("The value '" + stringValue + "' does not match any member types of the union datatype '" + eDataType.getName() + "'")); } castTo(eDataType, 847).getConversionDelegate(); c = wrapperClassFor(eDataType.getInstanceClass()); if (!c) return null; if (c == Ljava_lang_Character_2_classLit) { charValue = 0; try { charValue = __parseAndValidateInt(stringValue, $intern_43, $intern_0) & $intern_47; } catch ($e1) { $e1 = toJava($e1); if (instanceOf($e1, 130)) { carray = $toCharArray(stringValue); charValue = carray[0]; } else throw toJs($e1); } return valueOf_2(charValue); } if (c == Ljava_util_Date_2_classLit) { for (i = 0; i < EDATE_FORMATS.length; ++i) { try { return $parse_2(EDATE_FORMATS[i], stringValue); } catch ($e2) { $e2 = toJava($e2); if (!instanceOf($e2, 33)) throw toJs($e2); } } throw toJs(new IllegalArgumentException_0("The value '" + stringValue + "' is not a date formatted string of the form yyyy-MM-dd'T'HH:mm:ss'.'SSSZ or a valid subset thereof")); } throw toJs(new IllegalArgumentException_0("The value '" + stringValue + "' is invalid. ")); } function $hexStringToBytes(initialValue){ var high, i, j, limit, low, result, size_0; if (initialValue == null) { return null; } size_0 = initialValue.length; limit = (size_0 + 1) / 2 | 0; result = initUnidimensionalArray(B_classLit, $intern_140, 28, limit, 15, 1); size_0 % 2 != 0 && (result[--limit] = hexCharToByte((checkCriticalStringElementIndex(size_0 - 1, initialValue.length) , initialValue.charCodeAt(size_0 - 1)))); for (i = 0 , j = 0; i < limit; ++i) { high = hexCharToByte($charAt(initialValue, j++)); low = hexCharToByte($charAt(initialValue, j++)); result[i] = (high << 4 | low) << 24 >> 24; } return result; } function $setEPackage(this$static, newEPackage){ var msgs; if (newEPackage != this$static.ePackage) { msgs = null; !!this$static.ePackage && (msgs = castTo(this$static.ePackage, 54).eInverseRemove(this$static, 4, Lorg_eclipse_emf_ecore_EPackage_2_classLit, msgs)); !!newEPackage && (msgs = castTo(newEPackage, 54).eInverseAdd(this$static, 4, Lorg_eclipse_emf_ecore_EPackage_2_classLit, msgs)); msgs = $basicSetEPackage(this$static, newEPackage, msgs); !!msgs && msgs.dispatch_0(); } else (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 1, newEPackage, newEPackage)); } function $split_5(value_0){ var i, length_0, result, split_0; split_0 = $split(WHITE_SPACE, value_0); length_0 = split_0.length; result = initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, length_0, 6, 1); for (i = 0; i < length_0; ++i) { result[i] = split_0[i]; } return result; } function EFactoryImpl(){ $clinit_EFactoryImpl(); } function hexCharToByte(character){ switch (character) { case 48: case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: { return character - 48 << 24 >> 24; } case 97: case 98: case 99: case 100: case 101: case 102: { return character - 97 + 10 << 24 >> 24; } case 65: case 66: case 67: case 68: case 69: case 70: { return character - 65 + 10 << 24 >> 24; } default:{ throw toJs(new NumberFormatException('Invalid hexadecimal')); } } } defineClass(720, 158, {110:1, 94:1, 93:1, 480:1, 155:1, 58:1, 114:1, 54:1, 99:1, 158:1, 119:1, 120:1}, EFactoryImpl); _.convertToString = function convertToString(eDataType, objectValue){ return $convertToString(this, eDataType, objectValue); } ; _.create_3 = function create_47(eClass){ var eGenericType, eSuperType, eSuperTypes, result, result0; if (this.ePackage != $getEPackage(eClass) || (eClass.eFlags & 256) != 0) { throw toJs(new IllegalArgumentException_0("The class '" + eClass.name_0 + "' is not a valid classifier")); } for (eSuperTypes = $getESuperTypes(eClass); $getEGenericSuperTypes(eSuperTypes.this$01).size_0 != 0;) { eSuperType = castTo($resolve_1(eSuperTypes, 0, (eGenericType = castTo($get_20($getEGenericSuperTypes(eSuperTypes.this$01), 0), 89) , result0 = eGenericType.eRawType , instanceOf(result0, 90)?castTo(result0, 29):($clinit_EcorePackage$Literals() , EOBJECT))), 29); if ($getInstanceClass(eSuperType)) { result = $getEPackage(eSuperType).getEFactoryInstance().create_3(eSuperType); castTo(result, 54).eSetClass(eClass); return result; } eSuperTypes = $getESuperTypes(eSuperType); } return (eClass.instanceClassName != null?eClass.instanceClassName:eClass.generatedInstanceClassName) == 'java.util.Map$Entry'?new DynamicEObjectImpl$BasicEMapEntry(eClass):new DynamicEObjectImpl(eClass); } ; _.createFromString = function createFromString(eDataType, stringValue){ return $createFromString(this, eDataType, stringValue); } ; _.eGet = function eGet_10(featureID, resolve, coreType){ var eClass; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , this.eAnnotations; case 1: return this.ePackage; } return $eDynamicGet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EFACTORY)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EFACTORY:eClass), featureID), resolve, coreType); } ; _.eInverseAdd_0 = function eInverseAdd_6(otherEnd, featureID, msgs){ var eClass, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicAdd_0(this.eAnnotations, otherEnd, msgs); case 1: !!this.ePackage && (msgs = castTo(this.ePackage, 54).eInverseRemove(this, 4, Lorg_eclipse_emf_ecore_EPackage_2_classLit, msgs)); return $basicSetEPackage(this, castTo(otherEnd, 241), msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , EFACTORY):eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseAdd(this, $eSettings_0(this), featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EFACTORY)), otherEnd, msgs); } ; _.eInverseRemove_0 = function eInverseRemove_7(otherEnd, featureID, msgs){ var eClass, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicRemove_0(this.eAnnotations, otherEnd, msgs); case 1: return $basicSetEPackage(this, null, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , EFACTORY):eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseRemove(this, $eSettings_0(this), featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EFACTORY)), otherEnd, msgs); } ; _.eIsSet = function eIsSet_9(featureID){ var eClass; switch (featureID) { case 0: return !!this.eAnnotations && this.eAnnotations.size_0 != 0; case 1: return !!this.ePackage; } return $eDynamicIsSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EFACTORY)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EFACTORY:eClass), featureID)); } ; _.eSet = function eSet_8(featureID, newValue){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $addAll_9(this.eAnnotations, castTo(newValue, 16)); return; case 1: $setEPackage(this, castTo(newValue, 241)); return; } $eDynamicSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EFACTORY)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EFACTORY:eClass), featureID), newValue); } ; _.eStaticClass = function eStaticClass_8(){ return $clinit_EcorePackage$Literals() , EFACTORY; } ; _.eUnset = function eUnset_8(featureID){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); return; case 1: $setEPackage(this, null); return; } $eDynamicUnset(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EFACTORY)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EFACTORY:eClass), featureID)); } ; var EDATE_FORMATS, HEX_DIGITS, WHITE_SPACE; var Lorg_eclipse_emf_ecore_impl_EFactoryImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EFactoryImpl', 720); function ElkGraphFactoryImpl(){ } function init_1(){ $clinit_EFactoryImpl(); var exception, theElkGraphFactory; try { theElkGraphFactory = castTo($getEFactory(($clinit_EPackage$Registry() , INSTANCE_6), 'http://www.eclipse.org/elk/ElkGraph'), 2113); if (theElkGraphFactory) { return theElkGraphFactory; } } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 103)) { exception = $e0; $log_2(($clinit_EcorePlugin() , exception)); } else throw toJs($e0); } return new ElkGraphFactoryImpl; } defineClass(1037, 720, {110:1, 2113:1, 94:1, 93:1, 480:1, 155:1, 58:1, 114:1, 54:1, 99:1, 158:1, 119:1, 120:1}, ElkGraphFactoryImpl); _.convertToString = function convertToString_0(eDataType, instanceValue){ switch (eDataType.getClassifierID()) { case 12: return castTo(instanceValue, 149).getId(); case 13: return toString_40(instanceValue); default:throw toJs(new IllegalArgumentException_0("The datatype '" + eDataType.getName() + "' is not a valid classifier")); } } ; _.create_3 = function create_48(eClass){ var ePackage, elkBendPoint, elkEdge, elkEdgeSection, elkLabel, elkNode, elkPort, elkPropertyToValueMapEntry; switch (eClass.metaObjectID == -1 && (eClass.metaObjectID = (ePackage = $getEPackage(eClass) , ePackage?$indexOf_6(ePackage.getEClassifiers(), eClass):-1)) , eClass.metaObjectID) { case 4: return elkLabel = new ElkLabelImpl , elkLabel; case 6: return elkNode = new ElkNodeImpl , elkNode; case 7: return elkPort = new ElkPortImpl , elkPort; case 8: return elkEdge = new ElkEdgeImpl , elkEdge; case 9: return elkBendPoint = new ElkBendPointImpl , elkBendPoint; case 10: return elkEdgeSection = new ElkEdgeSectionImpl , elkEdgeSection; case 11: return elkPropertyToValueMapEntry = new ElkPropertyToValueMapEntryImpl , elkPropertyToValueMapEntry; default:throw toJs(new IllegalArgumentException_0("The class '" + eClass.name_0 + "' is not a valid classifier")); } } ; _.createFromString = function createFromString_0(eDataType, initialValue){ switch (eDataType.getClassifierID()) { case 13: case 12: return null; default:throw toJs(new IllegalArgumentException_0("The datatype '" + eDataType.getName() + "' is not a valid classifier")); } } ; var Lorg_eclipse_elk_graph_impl_ElkGraphFactoryImpl_2_classLit = createForClass('org.eclipse.elk.graph.impl', 'ElkGraphFactoryImpl', 1037); function $setName(this$static, newName){ var oldName; oldName = this$static.name_0; this$static.name_0 = newName; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 1, oldName, this$static.name_0)); } function $toString_21(this$static){ var result; if ((this$static.eFlags_0 & 64) != 0) return $toString_16(this$static); result = new StringBuffer_1($toString_16(this$static)); result.string += ' (name: '; $append_3(result, this$static.name_0); result.string += ')'; return result.string; } defineClass(448, 158, {110:1, 94:1, 93:1, 155:1, 197:1, 58:1, 114:1, 54:1, 99:1, 158:1, 119:1, 120:1}); _.eContents_0 = function eContents_2(){ var eClass, eStructuralFeatures; eStructuralFeatures = (eClass = castTo($getField(this, 16), 29) , $containments($getEAllStructuralFeatures(!eClass?this.eStaticClass():eClass))); return eStructuralFeatures == null?($clinit_EContentsEList() , $clinit_EContentsEList() , EMPTY_CONTENTS_ELIST):new ENamedElementImpl$1(this, eStructuralFeatures); } ; _.eGet = function eGet_11(featureID, resolve, coreType){ var eClass; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , this.eAnnotations; case 1: return this.getName(); } return $eDynamicGet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID), resolve, coreType); } ; _.eIsSet = function eIsSet_10(featureID){ var eClass; switch (featureID) { case 0: return !!this.eAnnotations && this.eAnnotations.size_0 != 0; case 1: return this.name_0 != null; } return $eDynamicIsSet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID)); } ; _.eSet = function eSet_9(featureID, newValue){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $addAll_9(this.eAnnotations, castTo(newValue, 16)); return; case 1: this.setName(castToString(newValue)); return; } $eDynamicSet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID), newValue); } ; _.eStaticClass = function eStaticClass_9(){ return $clinit_EcorePackage$Literals() , ENAMED_ELEMENT; } ; _.eUnset = function eUnset_9(featureID){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); return; case 1: this.setName(null); return; } $eDynamicUnset(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID)); } ; _.getName = function getName_5(){ return this.name_0; } ; _.setName = function setName(newName){ $setName(this, newName); } ; _.toString_0 = function toString_129(){ return $toString_21(this); } ; _.name_0 = null; var Lorg_eclipse_emf_ecore_impl_ENamedElementImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'ENamedElementImpl', 448); function $addAnnotation(eNamedElement, source, details){ var annotations, childAnnotations, eAnnotation, eAnnotation0, i, i0, theDetails; eAnnotation0 = (eAnnotation = new EAnnotationImpl , eAnnotation); $setSourceGen(eAnnotation0, (checkCriticalNotNull(source) , source)); theDetails = (!eAnnotation0.details && (eAnnotation0.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, eAnnotation0)) , eAnnotation0.details); for (i0 = 1; i0 < details.length; i0 += 2) { $put_14(theDetails, details[i0 - 1], details[i0]); } annotations = (!eNamedElement.eAnnotations && (eNamedElement.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, eNamedElement, 0, 3)) , eNamedElement.eAnnotations); for (i = 0; i < 0; ++i) { childAnnotations = $getContents(castTo($get_20(annotations, annotations.size_0 - 1), 598)); annotations = childAnnotations; } $add_21(annotations, eAnnotation0); } function $addEException(owner, exception){ $add_21((!owner.eExceptions && (owner.eExceptions = new EOperationImpl$1(owner, owner)) , owner.eExceptions), exception); } function $addEOperation(owner, type_0, name_0){ var eOperation, o; o = (eOperation = new EOperationImpl , eOperation); $initEOperation(o, type_0, name_0); $add_21((!owner.eOperations && (owner.eOperations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EOperation_2_classLit, owner, 11, 10)) , owner.eOperations), o); return o; } function $addEParameter(owner, type_0, name_0){ var p, p_0; p = (p_0 = new EParameterImpl , $setEType(p_0, type_0) , $setName(p_0, name_0) , $add_21((!owner.eParameters && (owner.eParameters = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EParameter_2_classLit, owner, 12, 10)) , owner.eParameters), p_0) , p_0); $setLowerBound(p, 0); $setUpperBound(p, 1); $setUnique_2(p, true); $setOrdered(p, true); return p; } function $addEParameter_0(owner, type_0, name_0){ var eParameter, msgs, p; p = (eParameter = new EParameterImpl , eParameter); msgs = $setEGenericType(p, type_0, null); !!msgs && msgs.dispatch_0(); $setName(p, name_0); $add_21((!owner.eParameters && (owner.eParameters = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EParameter_2_classLit, owner, 12, 10)) , owner.eParameters), p); $setLowerBound(p, 0); $setUpperBound(p, 1); $setUnique_2(p, true); $setOrdered(p, true); } function $addETypeParameter(owner, name_0){ var eTypeParameter, eTypeParameter0; eTypeParameter0 = (eTypeParameter = new ETypeParameterImpl , eTypeParameter); $setName(eTypeParameter0, name_0); $add_21((!owner.eTypeParameters && (owner.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, owner, 7)) , owner.eTypeParameters), eTypeParameter0); return eTypeParameter0; } function $addETypeParameter_0(owner){ var eTypeParameter, eTypeParameter0; eTypeParameter0 = (eTypeParameter = new ETypeParameterImpl , eTypeParameter); $setName(eTypeParameter0, 'T'); $add_21((!owner.eTypeParameters && (owner.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, owner, 11)) , owner.eTypeParameters), eTypeParameter0); return eTypeParameter0; } function $basicGetESuperPackage(this$static){ if (this$static.eFlags_0 >> 16 != 7) return null; return castTo(this$static.eContainer, 241); } function $basicSetEFactoryInstance(this$static, newEFactoryInstance, msgs){ var notification, oldEFactoryInstance; oldEFactoryInstance = this$static.eFactoryInstance; this$static.eFactoryInstance = newEFactoryInstance; if ((this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0) { notification = new ENotificationImpl_1(this$static, 1, 4, oldEFactoryInstance, newEFactoryInstance); !msgs?(msgs = notification):msgs.add_5(notification); } return msgs; } function $createEAttribute(owner, id_0){ var a, eAttribute; a = (eAttribute = new EAttributeImpl , eAttribute); a.featureID = id_0; $add_21((!owner.eStructuralFeatures && (owner.eStructuralFeatures = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, owner, 21, 17)) , owner.eStructuralFeatures), a); } function $createEClass(this$static, id_0){ var c, eClass; c = (eClass = new EClassImpl , eClass); c.metaObjectID = id_0; !this$static.eClassifiers && (this$static.eClassifiers = new EPackageImpl$2(this$static, Lorg_eclipse_emf_ecore_EClassifier_2_classLit, this$static)); $add_21(this$static.eClassifiers, c); return c; } function $createEDataType(this$static, id_0){ var d, eDataType; d = (eDataType = new EDataTypeImpl , eDataType); d.metaObjectID = id_0; !this$static.eClassifiers && (this$static.eClassifiers = new EPackageImpl$2(this$static, Lorg_eclipse_emf_ecore_EClassifier_2_classLit, this$static)); $add_21(this$static.eClassifiers, d); return d; } function $createEGenericType(eClassifier){ var eGenericType, eGenericType0; eGenericType0 = (eGenericType = new EGenericTypeImpl , eGenericType); $setEClassifier(eGenericType0, eClassifier); return eGenericType0; } function $createEGenericType_0(eTypeParameter){ var eGenericType, eGenericType0; eGenericType0 = (eGenericType = new EGenericTypeImpl , eGenericType); $setETypeParameter(eGenericType0, eTypeParameter); return eGenericType0; } function $createEOperation(owner){ var eOperation, o; o = (eOperation = new EOperationImpl , eOperation); $add_21((!owner.eOperations && (owner.eOperations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EOperation_2_classLit, owner, 11, 10)) , owner.eOperations), o); } function $createEReference(owner, id_0){ var eReference, r; r = (eReference = new EReferenceImpl , eReference); r.featureID = id_0; $add_21((!owner.eStructuralFeatures && (owner.eStructuralFeatures = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, owner, 21, 17)) , owner.eStructuralFeatures), r); } function $createResource(this$static, uri_0){ var actualURI, resource; resource = $eInternalResource(this$static); if (!resource) { !resourceFactory && (resourceFactory = new EPackageImpl$3); actualURI = ($clinit_URI() , createURIWithCache(uri_0)); resource = new BinaryResourceImpl(actualURI); $add_21(resource.getContents(), this$static); } return resource; } function $eBasicRemoveFromContainerFeature_1(this$static, msgs){ var eClass, inverseFeature; if (this$static.eFlags_0 >> 16 == 7) { return this$static.eContainer.eInverseRemove(this$static, 6, Lorg_eclipse_emf_ecore_EPackage_2_classLit, msgs); } return inverseFeature = $getEOpposite(castTo($getEStructuralFeature((eClass = castTo($getField(this$static, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , EPACKAGE):eClass), this$static.eFlags_0 >> 16), 19)) , this$static.eContainer.eInverseRemove(this$static, inverseFeature.featureID, inverseFeature.containerClass, msgs); } function $freeze_0(this$static){ var i, size_0; if (this$static.eClassifiers) { for (i = 0 , size_0 = this$static.eClassifiers.size_0; i < size_0; ++i) { $freeze($get_20(this$static.eClassifiers, i)); } } if (this$static.eSubpackages) { for (i = 0 , size_0 = this$static.eSubpackages.size_0; i < size_0; ++i) { $freeze($get_20(this$static.eSubpackages, i)); } } $getNamespace(($clinit_ExtendedMetaData() , INSTANCE_11), this$static); this$static.eFlags |= 1; } function $getEClassifierGen(this$static, name_0){ var duplicate, eClassifier, eClassifier$iterator, eClassifiers, key, result; if (!this$static.eNameToEClassifierMap) { eClassifiers = (!this$static.eClassifiers && (this$static.eClassifiers = new EPackageImpl$2(this$static, Lorg_eclipse_emf_ecore_EClassifier_2_classLit, this$static)) , this$static.eClassifiers); result = new HashMap_0(eClassifiers.size_0); for (eClassifier$iterator = new AbstractEList$EIterator(eClassifiers); eClassifier$iterator.cursor != eClassifier$iterator.this$01_2.size_1();) { eClassifier = castTo($doNext(eClassifier$iterator), 142); key = eClassifier.getName(); duplicate = castTo(key == null?$put_9(result.hashCodeMap, null, eClassifier):$put_10(result.stringMap, key, eClassifier), 142); !!duplicate && (key == null?$put_9(result.hashCodeMap, null, duplicate):$put_10(result.stringMap, key, duplicate)); } this$static.eNameToEClassifierMap = result; } return castTo($getStringValue(this$static.eNameToEClassifierMap, name_0), 142); } function $initEAttribute(a, type_0, name_0, defaultValue, lowerBound, upperBound, containerClass, isTransient, isVolatile, isChangeable, isUnsettable, isUnique, isDerived){ $initEStructuralFeature(a, type_0, name_0, defaultValue, lowerBound, upperBound, containerClass, isTransient, isVolatile, isChangeable, isUnsettable, isUnique, isDerived); $setID(a, false); return a; } function $initEAttribute_0(a, type_0, name_0, containerClass, isTransient, isVolatile, isChangeable, isDerived){ var msgs; instanceOf(a.eContainer, 90) && $setFlags_0($getESuperAdapter(castTo(a.eContainer, 90)), 4); $setName(a, name_0); a.containerClass = containerClass; $setTransient(a, isTransient); $setVolatile(a, isVolatile); $setChangeable(a, isChangeable); $setUnsettable(a, false); $setUnique_2(a, true); $setDerived(a, isDerived); $setOrdered(a, true); $setLowerBound(a, 0); a.effectiveIsMany = 0; $setUpperBound(a, 1); msgs = $setEGenericType(a, type_0, null); !!msgs && msgs.dispatch_0(); $setID(a, false); return a; } function $initEClass(c, instanceClass, name_0, isAbstract, isInterface, isGenerated){ $initEClassifier(c, instanceClass, name_0, isGenerated); $setAbstract(c, isAbstract); $setInterface(c, isInterface); return c; } function $initEClassifier(o, instanceClass, name_0, isGenerated){ instanceOf(o.eContainer, 184) && (castTo(o.eContainer, 184).eNameToEClassifierMap = null); $setName(o, name_0); !!instanceClass && $setInstanceClass(o, instanceClass); isGenerated && o.setGeneratedInstanceClass(true); } function $initEDataType(d, instanceClass, name_0, isSerializable){ $initEClassifier(d, instanceClass, name_0, false); $setSerializable(d, isSerializable); return d; } function $initEOperation(eOperation, type_0, name_0){ $setEType(eOperation, type_0); $setName(eOperation, name_0); $setLowerBound(eOperation, 0); $setUpperBound(eOperation, 1); $setUnique_2(eOperation, true); $setOrdered(eOperation, true); return eOperation; } function $initEReference(r, type_0, otherEnd, name_0, lowerBound, upperBound, containerClass, isTransient, isVolatile, isChangeable, isContainment, isResolveProxies, isUnsettable, isDerived){ $initEStructuralFeature(r, type_0, name_0, null, lowerBound, upperBound, containerClass, isTransient, isVolatile, isChangeable, isUnsettable, true, isDerived); $setContainmentGen(r, isContainment); instanceOf(r.eContainer, 90) && $setFlags_0($getESuperAdapter(castTo(r.eContainer, 90)), 2); !!otherEnd && $setEOpposite(r, otherEnd); $setResolveProxies(r, isResolveProxies); return r; } function $initEStructuralFeature(s, type_0, name_0, defaultValue, lowerBound, upperBound, containerClass, isTransient, isVolatile, isChangeable, isUnsettable, isUnique, isDerived){ instanceOf(s.eContainer, 90) && $setFlags_0($getESuperAdapter(castTo(s.eContainer, 90)), 4); $setName(s, name_0); s.containerClass = containerClass; $setTransient(s, isTransient); $setVolatile(s, isVolatile); $setChangeable(s, isChangeable); $setUnsettable(s, isUnsettable); $setUnique_2(s, isUnique); $setDerived(s, isDerived); $setOrdered(s, true); $setLowerBound(s, lowerBound); s.setUpperBound(upperBound); $setEType(s, type_0); defaultValue != null && (s.defaultValueFactory = null , $setDefaultValueLiteralGen(s, defaultValue)); } function $setEFactoryInstance(this$static, newEFactoryInstance){ var msgs; if (newEFactoryInstance != this$static.eFactoryInstance) { msgs = null; !!this$static.eFactoryInstance && (msgs = castTo(this$static.eFactoryInstance, 54).eInverseRemove(this$static, 1, Lorg_eclipse_emf_ecore_EFactory_2_classLit, msgs)); !!newEFactoryInstance && (msgs = castTo(newEFactoryInstance, 54).eInverseAdd(this$static, 1, Lorg_eclipse_emf_ecore_EFactory_2_classLit, msgs)); msgs = $basicSetEFactoryInstance(this$static, newEFactoryInstance, msgs); !!msgs && msgs.dispatch_0(); } else (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 4, newEFactoryInstance, newEFactoryInstance)); } function $setNsPrefix(this$static, newNsPrefix){ var oldNsPrefix; oldNsPrefix = this$static.nsPrefix; this$static.nsPrefix = newNsPrefix; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 3, oldNsPrefix, this$static.nsPrefix)); } function $setNsURI(this$static, newNsURI){ var oldNsURI; oldNsURI = this$static.nsURI; this$static.nsURI = newNsURI; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 2, oldNsURI, this$static.nsURI)); } function EPackageImpl(){ $setEFactoryInstance(this, new EFactoryImpl); this.ecorePackage = ($clinit_EcorePackage() , eINSTANCE_2); $clinit_EcoreFactory(); } function EPackageImpl_0(packageURI, factory){ var registration; registration = $getStringValue(($clinit_EPackage$Registry() , INSTANCE_6), packageURI); instanceOf(registration, 507)?$putStringValue(INSTANCE_6, packageURI, new EPackageImpl$1(this, factory)):$putStringValue(INSTANCE_6, packageURI, this); $setEFactoryInstance(this, factory); if (factory == ($clinit_EcoreFactory() , eINSTANCE_1)) { this.ecorePackage = castTo(this, 2038); castTo(factory, 2040); } else { this.ecorePackage = ($clinit_EcorePackage() , eINSTANCE_2); } } defineClass(184, 448, {110:1, 94:1, 93:1, 155:1, 197:1, 58:1, 241:1, 114:1, 54:1, 99:1, 158:1, 184:1, 119:1, 120:1, 690:1}, EPackageImpl); _.eBasicRemoveFromContainerFeature = function eBasicRemoveFromContainerFeature_2(msgs){ return $eBasicRemoveFromContainerFeature_1(this, msgs); } ; _.eGet = function eGet_12(featureID, resolve, coreType){ var eClass; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , this.eAnnotations; case 1: return this.name_0; case 2: return this.nsURI; case 3: return this.nsPrefix; case 4: return this.eFactoryInstance; case 5: return !this.eClassifiers && (this.eClassifiers = new EPackageImpl$2(this, Lorg_eclipse_emf_ecore_EClassifier_2_classLit, this)) , this.eClassifiers; case 6: return !this.eSubpackages && (this.eSubpackages = new EObjectContainmentWithInverseEList$Resolving(Lorg_eclipse_emf_ecore_EPackage_2_classLit, this, 6, 7)) , this.eSubpackages; case 7: if (resolve) return this.eFlags_0 >> 16 == 7?castTo(this.eContainer, 241):null; return $basicGetESuperPackage(this); } return $eDynamicGet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EPACKAGE)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EPACKAGE:eClass), featureID), resolve, coreType); } ; _.eInverseAdd_0 = function eInverseAdd_7(otherEnd, featureID, msgs){ var eClass, eContainerFeatureID, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicAdd_0(this.eAnnotations, otherEnd, msgs); case 4: !!this.eFactoryInstance && (msgs = castTo(this.eFactoryInstance, 54).eInverseRemove(this, 1, Lorg_eclipse_emf_ecore_EFactory_2_classLit, msgs)); return $basicSetEFactoryInstance(this, castTo(otherEnd, 480), msgs); case 5: return !this.eClassifiers && (this.eClassifiers = new EPackageImpl$2(this, Lorg_eclipse_emf_ecore_EClassifier_2_classLit, this)) , $basicAdd_0(this.eClassifiers, otherEnd, msgs); case 6: return !this.eSubpackages && (this.eSubpackages = new EObjectContainmentWithInverseEList$Resolving(Lorg_eclipse_emf_ecore_EPackage_2_classLit, this, 6, 7)) , $basicAdd_0(this.eSubpackages, otherEnd, msgs); case 7: !!this.eContainer && (msgs = (eContainerFeatureID = this.eFlags_0 >> 16 , eContainerFeatureID >= 0?$eBasicRemoveFromContainerFeature_1(this, msgs):this.eContainer.eInverseRemove(this, -1 - eContainerFeatureID, null, msgs))); return $eBasicSetContainer(this, otherEnd, 7, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , EPACKAGE):eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseAdd(this, $eSettings_0(this), featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EPACKAGE)), otherEnd, msgs); } ; _.eInverseRemove_0 = function eInverseRemove_8(otherEnd, featureID, msgs){ var eClass, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicRemove_0(this.eAnnotations, otherEnd, msgs); case 4: return $basicSetEFactoryInstance(this, null, msgs); case 5: return !this.eClassifiers && (this.eClassifiers = new EPackageImpl$2(this, Lorg_eclipse_emf_ecore_EClassifier_2_classLit, this)) , $basicRemove_0(this.eClassifiers, otherEnd, msgs); case 6: return !this.eSubpackages && (this.eSubpackages = new EObjectContainmentWithInverseEList$Resolving(Lorg_eclipse_emf_ecore_EPackage_2_classLit, this, 6, 7)) , $basicRemove_0(this.eSubpackages, otherEnd, msgs); case 7: return $eBasicSetContainer(this, null, 7, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , EPACKAGE):eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseRemove(this, $eSettings_0(this), featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EPACKAGE)), otherEnd, msgs); } ; _.eIsSet = function eIsSet_11(featureID){ var eClass; switch (featureID) { case 0: return !!this.eAnnotations && this.eAnnotations.size_0 != 0; case 1: return this.name_0 != null; case 2: return this.nsURI != null; case 3: return this.nsPrefix != null; case 4: return !!this.eFactoryInstance; case 5: return !!this.eClassifiers && this.eClassifiers.size_0 != 0; case 6: return !!this.eSubpackages && this.eSubpackages.size_0 != 0; case 7: return !!$basicGetESuperPackage(this); } return $eDynamicIsSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EPACKAGE)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EPACKAGE:eClass), featureID)); } ; _.eObjectForURIFragmentSegment = function eObjectForURIFragmentSegment_1(uriFragmentSegment){ var result; result = $getEClassifierGen(this, uriFragmentSegment); return result?result:$eObjectForURIFragmentSegment_0(this, uriFragmentSegment); } ; _.eSet = function eSet_10(featureID, newValue){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $addAll_9(this.eAnnotations, castTo(newValue, 16)); return; case 1: $setName(this, castToString(newValue)); return; case 2: $setNsURI(this, castToString(newValue)); return; case 3: $setNsPrefix(this, castToString(newValue)); return; case 4: $setEFactoryInstance(this, castTo(newValue, 480)); return; case 5: !this.eClassifiers && (this.eClassifiers = new EPackageImpl$2(this, Lorg_eclipse_emf_ecore_EClassifier_2_classLit, this)); $clear_13(this.eClassifiers); !this.eClassifiers && (this.eClassifiers = new EPackageImpl$2(this, Lorg_eclipse_emf_ecore_EClassifier_2_classLit, this)); $addAll_9(this.eClassifiers, castTo(newValue, 16)); return; case 6: !this.eSubpackages && (this.eSubpackages = new EObjectContainmentWithInverseEList$Resolving(Lorg_eclipse_emf_ecore_EPackage_2_classLit, this, 6, 7)); $clear_13(this.eSubpackages); !this.eSubpackages && (this.eSubpackages = new EObjectContainmentWithInverseEList$Resolving(Lorg_eclipse_emf_ecore_EPackage_2_classLit, this, 6, 7)); $addAll_9(this.eSubpackages, castTo(newValue, 16)); return; } $eDynamicSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EPACKAGE)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EPACKAGE:eClass), featureID), newValue); } ; _.eSetProxyURI = function eSetProxyURI_1(uri_0){ var eClassifier, eClassifier$iterator; if (!!uri_0 && !!this.eClassifiers) { for (eClassifier$iterator = new AbstractEList$EIterator(this.eClassifiers); eClassifier$iterator.cursor != eClassifier$iterator.this$01_2.size_1();) { eClassifier = $doNext(eClassifier$iterator); instanceOf(eClassifier, 364) && (castTo(eClassifier, 364).ePackage = null); } } $setField(this, 64, uri_0); } ; _.eStaticClass = function eStaticClass_10(){ return $clinit_EcorePackage$Literals() , EPACKAGE; } ; _.eUnset = function eUnset_10(featureID){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); return; case 1: $setName(this, null); return; case 2: $setNsURI(this, null); return; case 3: $setNsPrefix(this, null); return; case 4: $setEFactoryInstance(this, null); return; case 5: !this.eClassifiers && (this.eClassifiers = new EPackageImpl$2(this, Lorg_eclipse_emf_ecore_EClassifier_2_classLit, this)); $clear_13(this.eClassifiers); return; case 6: !this.eSubpackages && (this.eSubpackages = new EObjectContainmentWithInverseEList$Resolving(Lorg_eclipse_emf_ecore_EPackage_2_classLit, this, 6, 7)); $clear_13(this.eSubpackages); return; } $eDynamicUnset(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EPACKAGE)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EPACKAGE:eClass), featureID)); } ; _.freeze = function freeze_0(){ $freeze_0(this); } ; _.getEClassifiers = function getEClassifiers(){ return !this.eClassifiers && (this.eClassifiers = new EPackageImpl$2(this, Lorg_eclipse_emf_ecore_EClassifier_2_classLit, this)) , this.eClassifiers; } ; _.getEFactoryInstance = function getEFactoryInstance(){ return this.eFactoryInstance; } ; _.getExtendedMetaData = function getExtendedMetaData(){ return this.ePackageExtendedMetaData; } ; _.getNsPrefix = function getNsPrefix(){ return this.nsPrefix; } ; _.getNsURI = function getNsURI(){ return this.nsURI; } ; _.setExtendedMetaData = function setExtendedMetaData(ePackageExtendedMetaData){ this.ePackageExtendedMetaData = ePackageExtendedMetaData; } ; _.toString_0 = function toString_130(){ var result; if ((this.eFlags_0 & 64) != 0) return $toString_21(this); result = new StringBuffer_1($toString_21(this)); result.string += ' (nsURI: '; $append_3(result, this.nsURI); result.string += ', nsPrefix: '; $append_3(result, this.nsPrefix); result.string += ')'; return result.string; } ; _.nsPrefix = null; _.nsURI = null; var resourceFactory; var Lorg_eclipse_emf_ecore_impl_EPackageImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EPackageImpl', 184); function $createPackageContents(this$static){ if (this$static.isCreated) return; this$static.isCreated = true; this$static.iPropertyHolderEClass = $createEClass(this$static, 0); this$static.eMapPropertyHolderEClass = $createEClass(this$static, 1); $createEReference(this$static.eMapPropertyHolderEClass, 0); this$static.elkGraphElementEClass = $createEClass(this$static, 2); $createEReference(this$static.elkGraphElementEClass, 1); $createEAttribute(this$static.elkGraphElementEClass, 2); this$static.elkShapeEClass = $createEClass(this$static, 3); $createEAttribute(this$static.elkShapeEClass, 3); $createEAttribute(this$static.elkShapeEClass, 4); $createEAttribute(this$static.elkShapeEClass, 5); $createEAttribute(this$static.elkShapeEClass, 6); this$static.elkLabelEClass = $createEClass(this$static, 4); $createEReference(this$static.elkLabelEClass, 7); $createEAttribute(this$static.elkLabelEClass, 8); this$static.elkConnectableShapeEClass = $createEClass(this$static, 5); $createEReference(this$static.elkConnectableShapeEClass, 7); $createEReference(this$static.elkConnectableShapeEClass, 8); this$static.elkNodeEClass = $createEClass(this$static, 6); $createEReference(this$static.elkNodeEClass, 9); $createEReference(this$static.elkNodeEClass, 10); $createEReference(this$static.elkNodeEClass, 11); $createEReference(this$static.elkNodeEClass, 12); $createEAttribute(this$static.elkNodeEClass, 13); this$static.elkPortEClass = $createEClass(this$static, 7); $createEReference(this$static.elkPortEClass, 9); this$static.elkEdgeEClass = $createEClass(this$static, 8); $createEReference(this$static.elkEdgeEClass, 3); $createEReference(this$static.elkEdgeEClass, 4); $createEReference(this$static.elkEdgeEClass, 5); $createEReference(this$static.elkEdgeEClass, 6); $createEAttribute(this$static.elkEdgeEClass, 7); $createEAttribute(this$static.elkEdgeEClass, 8); $createEAttribute(this$static.elkEdgeEClass, 9); $createEAttribute(this$static.elkEdgeEClass, 10); this$static.elkBendPointEClass = $createEClass(this$static, 9); $createEAttribute(this$static.elkBendPointEClass, 0); $createEAttribute(this$static.elkBendPointEClass, 1); this$static.elkEdgeSectionEClass = $createEClass(this$static, 10); $createEAttribute(this$static.elkEdgeSectionEClass, 1); $createEAttribute(this$static.elkEdgeSectionEClass, 2); $createEAttribute(this$static.elkEdgeSectionEClass, 3); $createEAttribute(this$static.elkEdgeSectionEClass, 4); $createEReference(this$static.elkEdgeSectionEClass, 5); $createEReference(this$static.elkEdgeSectionEClass, 6); $createEReference(this$static.elkEdgeSectionEClass, 7); $createEReference(this$static.elkEdgeSectionEClass, 8); $createEReference(this$static.elkEdgeSectionEClass, 9); $createEReference(this$static.elkEdgeSectionEClass, 10); $createEAttribute(this$static.elkEdgeSectionEClass, 11); this$static.elkPropertyToValueMapEntryEClass = $createEClass(this$static, 11); $createEAttribute(this$static.elkPropertyToValueMapEntryEClass, 0); $createEAttribute(this$static.elkPropertyToValueMapEntryEClass, 1); this$static.iPropertyEDataType = $createEDataType(this$static, 12); this$static.propertyValueEDataType = $createEDataType(this$static, 13); } function $initializePackageContents(this$static){ var eGenericType, eGenericType0, eGenericType1, eGenericType2, eGenericType3, eGenericType4, eGenericType5, eGenericType6, g1, g2, g3, msgs, msgs0, op, t1; if (this$static.isInitialized) return; this$static.isInitialized = true; $setName(this$static, 'graph'); $setNsPrefix(this$static, 'graph'); $setNsURI(this$static, 'http://www.eclipse.org/elk/ElkGraph'); $addETypeParameter(this$static.iPropertyEDataType, 'T'); $add_21($getESuperTypes(this$static.eMapPropertyHolderEClass), this$static.iPropertyHolderEClass); $add_21($getESuperTypes(this$static.elkGraphElementEClass), this$static.eMapPropertyHolderEClass); $add_21($getESuperTypes(this$static.elkShapeEClass), this$static.elkGraphElementEClass); $add_21($getESuperTypes(this$static.elkLabelEClass), this$static.elkShapeEClass); $add_21($getESuperTypes(this$static.elkConnectableShapeEClass), this$static.elkShapeEClass); $add_21($getESuperTypes(this$static.elkNodeEClass), this$static.elkConnectableShapeEClass); $add_21($getESuperTypes(this$static.elkPortEClass), this$static.elkConnectableShapeEClass); $add_21($getESuperTypes(this$static.elkEdgeEClass), this$static.elkGraphElementEClass); $add_21($getESuperTypes(this$static.elkEdgeSectionEClass), this$static.eMapPropertyHolderEClass); $initEClass(this$static.iPropertyHolderEClass, Lorg_eclipse_elk_graph_properties_IPropertyHolder_2_classLit, 'IPropertyHolder', true, true, false); op = $addEOperation(this$static.iPropertyHolderEClass, this$static.iPropertyHolderEClass, 'setProperty'); t1 = $addETypeParameter_0(op); g1 = $createEGenericType(this$static.iPropertyEDataType); g2 = (eGenericType0 = (eGenericType1 = new EGenericTypeImpl , eGenericType1) , eGenericType0); $add_21((!g1.eTypeArguments && (g1.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, g1, 1)) , g1.eTypeArguments), g2); g3 = $createEGenericType_0(t1); $setELowerBound(g2, g3); $addEParameter_0(op, g1, 'property'); g1 = $createEGenericType_0(t1); $addEParameter_0(op, g1, 'value'); op = $addEOperation(this$static.iPropertyHolderEClass, null, 'getProperty'); t1 = $addETypeParameter_0(op); g1 = $createEGenericType(this$static.iPropertyEDataType); g2 = $createEGenericType_0(t1); $add_21((!g1.eTypeArguments && (g1.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, g1, 1)) , g1.eTypeArguments), g2); $addEParameter_0(op, g1, 'property'); g1 = $createEGenericType_0(t1); msgs0 = $setEGenericType(op, g1, null); !!msgs0 && msgs0.dispatch_0(); op = $addEOperation(this$static.iPropertyHolderEClass, this$static.ecorePackage.eBooleanEDataType, 'hasProperty'); g1 = $createEGenericType(this$static.iPropertyEDataType); g2 = (eGenericType2 = (eGenericType3 = new EGenericTypeImpl , eGenericType3) , eGenericType2); $add_21((!g1.eTypeArguments && (g1.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, g1, 1)) , g1.eTypeArguments), g2); $addEParameter_0(op, g1, 'property'); op = $addEOperation(this$static.iPropertyHolderEClass, this$static.iPropertyHolderEClass, 'copyProperties'); $addEParameter(op, this$static.iPropertyHolderEClass, 'source'); op = $addEOperation(this$static.iPropertyHolderEClass, null, 'getAllProperties'); g1 = $createEGenericType(this$static.ecorePackage.eMapEDataType); g2 = $createEGenericType(this$static.iPropertyEDataType); $add_21((!g1.eTypeArguments && (g1.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, g1, 1)) , g1.eTypeArguments), g2); g3 = (eGenericType4 = (eGenericType5 = new EGenericTypeImpl , eGenericType5) , eGenericType4); $add_21((!g2.eTypeArguments && (g2.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, g2, 1)) , g2.eTypeArguments), g3); g2 = $createEGenericType(this$static.ecorePackage.eJavaObjectEDataType); $add_21((!g1.eTypeArguments && (g1.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, g1, 1)) , g1.eTypeArguments), g2); msgs = $setEGenericType(op, g1, null); !!msgs && msgs.dispatch_0(); $initEClass(this$static.eMapPropertyHolderEClass, Lorg_eclipse_elk_graph_EMapPropertyHolder_2_classLit, 'EMapPropertyHolder', true, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eMapPropertyHolderEClass), 0), 19), this$static.elkPropertyToValueMapEntryEClass, null, 'properties', 0, -1, Lorg_eclipse_elk_graph_EMapPropertyHolder_2_classLit, false, false, true, true, false, false, false); $initEClass(this$static.elkGraphElementEClass, Lorg_eclipse_elk_graph_ElkGraphElement_2_classLit, 'ElkGraphElement', true, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.elkGraphElementEClass), 0), 19), this$static.elkLabelEClass, castTo($get_20($getEStructuralFeatures(this$static.elkLabelEClass), 0), 19), 'labels', 0, -1, Lorg_eclipse_elk_graph_ElkGraphElement_2_classLit, false, false, true, true, false, false, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.elkGraphElementEClass), 1), 35), this$static.ecorePackage.eStringEDataType, 'identifier', null, 0, 1, Lorg_eclipse_elk_graph_ElkGraphElement_2_classLit, false, false, true, false, true, false); $initEClass(this$static.elkShapeEClass, Lorg_eclipse_elk_graph_ElkShape_2_classLit, 'ElkShape', true, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.elkShapeEClass), 0), 35), this$static.ecorePackage.eDoubleEDataType, 'height', '0.0', 1, 1, Lorg_eclipse_elk_graph_ElkShape_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.elkShapeEClass), 1), 35), this$static.ecorePackage.eDoubleEDataType, 'width', '0.0', 1, 1, Lorg_eclipse_elk_graph_ElkShape_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.elkShapeEClass), 2), 35), this$static.ecorePackage.eDoubleEDataType, 'x', '0.0', 1, 1, Lorg_eclipse_elk_graph_ElkShape_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.elkShapeEClass), 3), 35), this$static.ecorePackage.eDoubleEDataType, 'y', '0.0', 1, 1, Lorg_eclipse_elk_graph_ElkShape_2_classLit, false, false, true, false, true, false); op = $addEOperation(this$static.elkShapeEClass, null, 'setDimensions'); $addEParameter(op, this$static.ecorePackage.eDoubleEDataType, 'width'); $addEParameter(op, this$static.ecorePackage.eDoubleEDataType, 'height'); op = $addEOperation(this$static.elkShapeEClass, null, 'setLocation'); $addEParameter(op, this$static.ecorePackage.eDoubleEDataType, 'x'); $addEParameter(op, this$static.ecorePackage.eDoubleEDataType, 'y'); $initEClass(this$static.elkLabelEClass, Lorg_eclipse_elk_graph_ElkLabel_2_classLit, 'ElkLabel', false, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.elkLabelEClass), 0), 19), this$static.elkGraphElementEClass, castTo($get_20($getEStructuralFeatures(this$static.elkGraphElementEClass), 0), 19), 'parent', 0, 1, Lorg_eclipse_elk_graph_ElkLabel_2_classLit, false, false, true, false, false, false, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.elkLabelEClass), 1), 35), this$static.ecorePackage.eStringEDataType, 'text', '', 0, 1, Lorg_eclipse_elk_graph_ElkLabel_2_classLit, false, false, true, false, true, false); $initEClass(this$static.elkConnectableShapeEClass, Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, 'ElkConnectableShape', true, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.elkConnectableShapeEClass), 0), 19), this$static.elkEdgeEClass, castTo($get_20($getEStructuralFeatures(this$static.elkEdgeEClass), 1), 19), 'outgoingEdges', 0, -1, Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, false, false, true, false, true, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.elkConnectableShapeEClass), 1), 19), this$static.elkEdgeEClass, castTo($get_20($getEStructuralFeatures(this$static.elkEdgeEClass), 2), 19), 'incomingEdges', 0, -1, Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, false, false, true, false, true, false, false); $initEClass(this$static.elkNodeEClass, Lorg_eclipse_elk_graph_ElkNode_2_classLit, 'ElkNode', false, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.elkNodeEClass), 0), 19), this$static.elkPortEClass, castTo($get_20($getEStructuralFeatures(this$static.elkPortEClass), 0), 19), 'ports', 0, -1, Lorg_eclipse_elk_graph_ElkNode_2_classLit, false, false, true, true, false, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.elkNodeEClass), 1), 19), this$static.elkNodeEClass, castTo($get_20($getEStructuralFeatures(this$static.elkNodeEClass), 2), 19), 'children', 0, -1, Lorg_eclipse_elk_graph_ElkNode_2_classLit, false, false, true, true, false, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.elkNodeEClass), 2), 19), this$static.elkNodeEClass, castTo($get_20($getEStructuralFeatures(this$static.elkNodeEClass), 1), 19), 'parent', 0, 1, Lorg_eclipse_elk_graph_ElkNode_2_classLit, false, false, true, false, false, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.elkNodeEClass), 3), 19), this$static.elkEdgeEClass, castTo($get_20($getEStructuralFeatures(this$static.elkEdgeEClass), 0), 19), 'containedEdges', 0, -1, Lorg_eclipse_elk_graph_ElkNode_2_classLit, false, false, true, true, false, false, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.elkNodeEClass), 4), 35), this$static.ecorePackage.eBooleanEDataType, 'hierarchical', null, 0, 1, Lorg_eclipse_elk_graph_ElkNode_2_classLit, true, true, false, false, true, true); $initEClass(this$static.elkPortEClass, Lorg_eclipse_elk_graph_ElkPort_2_classLit, 'ElkPort', false, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.elkPortEClass), 0), 19), this$static.elkNodeEClass, castTo($get_20($getEStructuralFeatures(this$static.elkNodeEClass), 0), 19), 'parent', 0, 1, Lorg_eclipse_elk_graph_ElkPort_2_classLit, false, false, true, false, false, false, false); $initEClass(this$static.elkEdgeEClass, Lorg_eclipse_elk_graph_ElkEdge_2_classLit, 'ElkEdge', false, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.elkEdgeEClass), 0), 19), this$static.elkNodeEClass, castTo($get_20($getEStructuralFeatures(this$static.elkNodeEClass), 3), 19), 'containingNode', 0, 1, Lorg_eclipse_elk_graph_ElkEdge_2_classLit, false, false, true, false, false, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.elkEdgeEClass), 1), 19), this$static.elkConnectableShapeEClass, castTo($get_20($getEStructuralFeatures(this$static.elkConnectableShapeEClass), 0), 19), 'sources', 0, -1, Lorg_eclipse_elk_graph_ElkEdge_2_classLit, false, false, true, false, true, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.elkEdgeEClass), 2), 19), this$static.elkConnectableShapeEClass, castTo($get_20($getEStructuralFeatures(this$static.elkConnectableShapeEClass), 1), 19), 'targets', 0, -1, Lorg_eclipse_elk_graph_ElkEdge_2_classLit, false, false, true, false, true, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.elkEdgeEClass), 3), 19), this$static.elkEdgeSectionEClass, castTo($get_20($getEStructuralFeatures(this$static.elkEdgeSectionEClass), 5), 19), 'sections', 0, -1, Lorg_eclipse_elk_graph_ElkEdge_2_classLit, false, false, true, true, false, false, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.elkEdgeEClass), 4), 35), this$static.ecorePackage.eBooleanEDataType, 'hyperedge', null, 0, 1, Lorg_eclipse_elk_graph_ElkEdge_2_classLit, true, true, false, false, true, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.elkEdgeEClass), 5), 35), this$static.ecorePackage.eBooleanEDataType, 'hierarchical', null, 0, 1, Lorg_eclipse_elk_graph_ElkEdge_2_classLit, true, true, false, false, true, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.elkEdgeEClass), 6), 35), this$static.ecorePackage.eBooleanEDataType, 'selfloop', null, 0, 1, Lorg_eclipse_elk_graph_ElkEdge_2_classLit, true, true, false, false, true, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.elkEdgeEClass), 7), 35), this$static.ecorePackage.eBooleanEDataType, 'connected', null, 0, 1, Lorg_eclipse_elk_graph_ElkEdge_2_classLit, true, true, false, false, true, true); $initEClass(this$static.elkBendPointEClass, Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, 'ElkBendPoint', false, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.elkBendPointEClass), 0), 35), this$static.ecorePackage.eDoubleEDataType, 'x', '0.0', 1, 1, Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.elkBendPointEClass), 1), 35), this$static.ecorePackage.eDoubleEDataType, 'y', '0.0', 1, 1, Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, false, false, true, false, true, false); op = $addEOperation(this$static.elkBendPointEClass, null, 'set'); $addEParameter(op, this$static.ecorePackage.eDoubleEDataType, 'x'); $addEParameter(op, this$static.ecorePackage.eDoubleEDataType, 'y'); $initEClass(this$static.elkEdgeSectionEClass, Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, 'ElkEdgeSection', false, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.elkEdgeSectionEClass), 0), 35), this$static.ecorePackage.eDoubleEDataType, 'startX', null, 0, 1, Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.elkEdgeSectionEClass), 1), 35), this$static.ecorePackage.eDoubleEDataType, 'startY', null, 0, 1, Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.elkEdgeSectionEClass), 2), 35), this$static.ecorePackage.eDoubleEDataType, 'endX', null, 0, 1, Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.elkEdgeSectionEClass), 3), 35), this$static.ecorePackage.eDoubleEDataType, 'endY', null, 0, 1, Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, false, false, true, false, true, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.elkEdgeSectionEClass), 4), 19), this$static.elkBendPointEClass, null, 'bendPoints', 0, -1, Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, false, false, true, true, false, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.elkEdgeSectionEClass), 5), 19), this$static.elkEdgeEClass, castTo($get_20($getEStructuralFeatures(this$static.elkEdgeEClass), 3), 19), 'parent', 0, 1, Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, false, false, true, false, false, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.elkEdgeSectionEClass), 6), 19), this$static.elkConnectableShapeEClass, null, 'outgoingShape', 0, 1, Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, false, false, true, false, true, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.elkEdgeSectionEClass), 7), 19), this$static.elkConnectableShapeEClass, null, 'incomingShape', 0, 1, Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, false, false, true, false, true, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.elkEdgeSectionEClass), 8), 19), this$static.elkEdgeSectionEClass, castTo($get_20($getEStructuralFeatures(this$static.elkEdgeSectionEClass), 9), 19), 'outgoingSections', 0, -1, Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, false, false, true, false, true, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.elkEdgeSectionEClass), 9), 19), this$static.elkEdgeSectionEClass, castTo($get_20($getEStructuralFeatures(this$static.elkEdgeSectionEClass), 8), 19), 'incomingSections', 0, -1, Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, false, false, true, false, true, false, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.elkEdgeSectionEClass), 10), 35), this$static.ecorePackage.eStringEDataType, 'identifier', null, 0, 1, Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, false, false, true, false, true, false); op = $addEOperation(this$static.elkEdgeSectionEClass, null, 'setStartLocation'); $addEParameter(op, this$static.ecorePackage.eDoubleEDataType, 'x'); $addEParameter(op, this$static.ecorePackage.eDoubleEDataType, 'y'); op = $addEOperation(this$static.elkEdgeSectionEClass, null, 'setEndLocation'); $addEParameter(op, this$static.ecorePackage.eDoubleEDataType, 'x'); $addEParameter(op, this$static.ecorePackage.eDoubleEDataType, 'y'); $initEClass(this$static.elkPropertyToValueMapEntryEClass, Ljava_util_Map$Entry_2_classLit, 'ElkPropertyToValueMapEntry', false, false, false); g1 = $createEGenericType(this$static.iPropertyEDataType); g2 = (eGenericType6 = (eGenericType = new EGenericTypeImpl , eGenericType) , eGenericType6); $add_21((!g1.eTypeArguments && (g1.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, g1, 1)) , g1.eTypeArguments), g2); $initEAttribute_0(castTo($get_20($getEStructuralFeatures(this$static.elkPropertyToValueMapEntryEClass), 0), 35), g1, 'key', Ljava_util_Map$Entry_2_classLit, false, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.elkPropertyToValueMapEntryEClass), 1), 35), this$static.propertyValueEDataType, 'value', null, 0, 1, Ljava_util_Map$Entry_2_classLit, false, false, true, false, true, false); $initEDataType(this$static.iPropertyEDataType, Lorg_eclipse_elk_graph_properties_IProperty_2_classLit, 'IProperty', true); $initEDataType(this$static.propertyValueEDataType, Ljava_lang_Object_2_classLit, 'PropertyValue', true); $createResource(this$static, 'http://www.eclipse.org/elk/ElkGraph'); } function ElkGraphPackageImpl(){ EPackageImpl_0.call(this, 'http://www.eclipse.org/elk/ElkGraph', ($clinit_ElkGraphFactory() , eINSTANCE)); this.iPropertyHolderEClass = null; this.eMapPropertyHolderEClass = null; this.elkGraphElementEClass = null; this.elkShapeEClass = null; this.elkLabelEClass = null; this.elkConnectableShapeEClass = null; this.elkNodeEClass = null; this.elkPortEClass = null; this.elkEdgeEClass = null; this.elkBendPointEClass = null; this.elkEdgeSectionEClass = null; this.elkPropertyToValueMapEntryEClass = null; this.iPropertyEDataType = null; this.propertyValueEDataType = null; this.isCreated = false; this.isInitialized = false; } function init_2(){ var theElkGraphPackage; if (isInited) return castTo($getEPackage_0(($clinit_EPackage$Registry() , INSTANCE_6), 'http://www.eclipse.org/elk/ElkGraph'), 2115); theElkGraphPackage = castTo(instanceOf($getStringValue(($clinit_EPackage$Registry() , INSTANCE_6), 'http://www.eclipse.org/elk/ElkGraph'), 569)?$getStringValue(INSTANCE_6, 'http://www.eclipse.org/elk/ElkGraph'):new ElkGraphPackageImpl, 569); isInited = true; $createPackageContents(theElkGraphPackage); $initializePackageContents(theElkGraphPackage); $freeze_0(theElkGraphPackage); $putStringValue(INSTANCE_6, 'http://www.eclipse.org/elk/ElkGraph', theElkGraphPackage); return theElkGraphPackage; } defineClass(569, 184, {110:1, 2115:1, 569:1, 94:1, 93:1, 155:1, 197:1, 58:1, 241:1, 114:1, 54:1, 99:1, 158:1, 184:1, 119:1, 120:1, 690:1}, ElkGraphPackageImpl); _.isCreated = false; _.isInitialized = false; var isInited = false; var Lorg_eclipse_elk_graph_impl_ElkGraphPackageImpl_2_classLit = createForClass('org.eclipse.elk.graph.impl', 'ElkGraphPackageImpl', 569); function $basicSetParent_0(this$static, newParent, msgs){ msgs = $eBasicSetContainer(this$static, castTo(newParent, 54), 7, msgs); return msgs; } function $eBasicRemoveFromContainerFeature_2(this$static, msgs){ var eClass, inverseFeature; if (this$static.eFlags_0 >> 16 == 7) { return this$static.eContainer.eInverseRemove(this$static, 1, Lorg_eclipse_elk_graph_ElkGraphElement_2_classLit, msgs); } return inverseFeature = $getEOpposite(castTo($getEStructuralFeature((eClass = castTo($getField(this$static, 16), 29) , !eClass?($clinit_ElkGraphPackage$Literals() , ELK_LABEL):eClass), this$static.eFlags_0 >> 16), 19)) , this$static.eContainer.eInverseRemove(this$static, inverseFeature.featureID, inverseFeature.containerClass, msgs); } function $getParent_1(this$static){ if (this$static.eFlags_0 >> 16 != 7) return null; return castTo(this$static.eContainer, 167); } function $setParent_1(this$static, newParent){ var eContainerFeatureID, msgs; if (newParent != this$static.eContainer || this$static.eFlags_0 >> 16 != 7 && !!newParent) { if (isAncestor(this$static, newParent)) throw toJs(new IllegalArgumentException_0('Recursive containment not allowed for ' + $toString_22(this$static))); msgs = null; !!this$static.eContainer && (msgs = (eContainerFeatureID = this$static.eFlags_0 >> 16 , eContainerFeatureID >= 0?$eBasicRemoveFromContainerFeature_2(this$static, msgs):this$static.eContainer.eInverseRemove(this$static, -1 - eContainerFeatureID, null, msgs))); !!newParent && (msgs = castTo(newParent, 54).eInverseAdd(this$static, 1, Lorg_eclipse_elk_graph_ElkGraphElement_2_classLit, msgs)); msgs = $basicSetParent_0(this$static, newParent, msgs); !!msgs && msgs.dispatch_0(); } else (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 7, newParent, newParent)); } function $setText(this$static, newText){ var oldText; oldText = this$static.text_0; this$static.text_0 = newText; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 8, oldText, this$static.text_0)); } function $toString_22(this$static){ var builder; if ((this$static.eFlags_0 & 64) != 0) return $toString_18(this$static); builder = new StringBuilder_1('ElkLabel'); !this$static.text_0 || $append_11($append_11((builder.string += ' "' , builder), this$static.text_0), '"'); $append_11($append_6($append_11($append_6($append_11($append_6($append_11($append_6((builder.string += ' (' , builder), this$static.x_0), ','), this$static.y_0), ' | '), this$static.width_0), ','), this$static.height), ')'); return builder.string; } function ElkLabelImpl(){ } defineClass(366, 740, {110:1, 342:1, 167:1, 135:1, 422:1, 366:1, 96:1, 94:1, 93:1, 58:1, 114:1, 54:1, 99:1, 119:1, 120:1}, ElkLabelImpl); _.eBasicRemoveFromContainerFeature = function eBasicRemoveFromContainerFeature_3(msgs){ return $eBasicRemoveFromContainerFeature_2(this, msgs); } ; _.eGet = function eGet_13(featureID, resolve, coreType){ switch (featureID) { case 7: return $getParent_1(this); case 8: return this.text_0; } return $eGet_5(this, featureID, resolve, coreType); } ; _.eInverseAdd_0 = function eInverseAdd_8(otherEnd, featureID, msgs){ var eContainerFeatureID; switch (featureID) { case 7: !!this.eContainer && (msgs = (eContainerFeatureID = this.eFlags_0 >> 16 , eContainerFeatureID >= 0?$eBasicRemoveFromContainerFeature_2(this, msgs):this.eContainer.eInverseRemove(this, -1 - eContainerFeatureID, null, msgs))); return $basicSetParent_0(this, castTo(otherEnd, 167), msgs); } return $eInverseAdd_0(this, otherEnd, featureID, msgs); } ; _.eInverseRemove_0 = function eInverseRemove_9(otherEnd, featureID, msgs){ if (featureID == 7) { return $basicSetParent_0(this, null, msgs); } return $eInverseRemove_1(this, otherEnd, featureID, msgs); } ; _.eIsSet = function eIsSet_12(featureID){ switch (featureID) { case 7: return !!$getParent_1(this); case 8: return !$equals_5('', this.text_0); } return $eIsSet_3(this, featureID); } ; _.eSet = function eSet_11(featureID, newValue){ switch (featureID) { case 7: $setParent_1(this, castTo(newValue, 167)); return; case 8: $setText(this, castToString(newValue)); return; } $eSet_3(this, featureID, newValue); } ; _.eStaticClass = function eStaticClass_11(){ return $clinit_ElkGraphPackage$Literals() , ELK_LABEL; } ; _.eUnset = function eUnset_11(featureID){ switch (featureID) { case 7: $setParent_1(this, null); return; case 8: $setText(this, ''); return; } $eUnset_3(this, featureID); } ; _.toString_0 = function toString_131(){ return $toString_22(this); } ; _.text_0 = ''; var Lorg_eclipse_elk_graph_impl_ElkLabelImpl_2_classLit = createForClass('org.eclipse.elk.graph.impl', 'ElkLabelImpl', 366); function $basicSetParent_1(this$static, newParent, msgs){ msgs = $eBasicSetContainer(this$static, newParent, 11, msgs); return msgs; } function $eBasicRemoveFromContainerFeature_3(this$static, msgs){ var eClass, inverseFeature; if (this$static.eFlags_0 >> 16 == 11) { return this$static.eContainer.eInverseRemove(this$static, 10, Lorg_eclipse_elk_graph_ElkNode_2_classLit, msgs); } return inverseFeature = $getEOpposite(castTo($getEStructuralFeature((eClass = castTo($getField(this$static, 16), 29) , !eClass?($clinit_ElkGraphPackage$Literals() , ELK_NODE):eClass), this$static.eFlags_0 >> 16), 19)) , this$static.eContainer.eInverseRemove(this$static, inverseFeature.featureID, inverseFeature.containerClass, msgs); } function $getChildren(this$static){ !this$static.children && (this$static.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, this$static, 10, 11)); return this$static.children; } function $getContainedEdges(this$static){ !this$static.containedEdges && (this$static.containedEdges = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this$static, 12, 3)); return this$static.containedEdges; } function $getParent_2(this$static){ if (this$static.eFlags_0 >> 16 != 11) return null; return castTo(this$static.eContainer, 27); } function $getPorts_3(this$static){ !this$static.ports && (this$static.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, this$static, 9, 9)); return this$static.ports; } function $isHierarchical_0(this$static){ return !this$static.children && (this$static.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, this$static, 10, 11)) , this$static.children.size_0 > 0; } function $setParent_2(this$static, newParent){ var eContainerFeatureID, msgs; if (newParent != this$static.eContainer || this$static.eFlags_0 >> 16 != 11 && !!newParent) { if (isAncestor(this$static, newParent)) throw toJs(new IllegalArgumentException_0('Recursive containment not allowed for ' + $toString_23(this$static))); msgs = null; !!this$static.eContainer && (msgs = (eContainerFeatureID = this$static.eFlags_0 >> 16 , eContainerFeatureID >= 0?$eBasicRemoveFromContainerFeature_3(this$static, msgs):this$static.eContainer.eInverseRemove(this$static, -1 - eContainerFeatureID, null, msgs))); !!newParent && (msgs = $eInverseAdd(newParent, this$static, 10, msgs)); msgs = $basicSetParent_1(this$static, newParent, msgs); !!msgs && msgs.dispatch_0(); } else (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 11, newParent, newParent)); } function $toString_23(this$static){ var builder, id_0, text_0; if ((this$static.eFlags_0 & 64) != 0) return $toString_18(this$static); builder = new StringBuilder_1('ElkNode'); id_0 = this$static.identifier; if (!id_0) { !this$static.labels && (this$static.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, this$static, 1, 7)); if (this$static.labels.size_0 > 0) { text_0 = (!this$static.labels && (this$static.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, this$static, 1, 7)) , castTo($get_20(this$static.labels, 0), 135)).text_0; !text_0 || $append_11($append_11((builder.string += ' "' , builder), text_0), '"'); } } else { $append_11($append_11((builder.string += ' "' , builder), id_0), '"'); } $append_11($append_6($append_11($append_6($append_11($append_6($append_11($append_6((builder.string += ' (' , builder), this$static.x_0), ','), this$static.y_0), ' | '), this$static.width_0), ','), this$static.height), ')'); return builder.string; } function ElkNodeImpl(){ ElkConnectableShapeImpl.call(this); } defineClass(207, 741, {110:1, 342:1, 84:1, 167:1, 27:1, 422:1, 207:1, 96:1, 94:1, 93:1, 58:1, 114:1, 54:1, 99:1, 119:1, 120:1}, ElkNodeImpl); _.eBasicRemoveFromContainerFeature = function eBasicRemoveFromContainerFeature_4(msgs){ return $eBasicRemoveFromContainerFeature_3(this, msgs); } ; _.eGet = function eGet_14(featureID, resolve, coreType){ switch (featureID) { case 9: return !this.ports && (this.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, this, 9, 9)) , this.ports; case 10: return !this.children && (this.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, this, 10, 11)) , this.children; case 11: return $getParent_2(this); case 12: return !this.containedEdges && (this.containedEdges = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this, 12, 3)) , this.containedEdges; case 13: return $clinit_Boolean() , !this.children && (this.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, this, 10, 11)) , this.children.size_0 > 0?true:false; } return $eGet_6(this, featureID, resolve, coreType); } ; _.eInverseAdd_0 = function eInverseAdd_9(otherEnd, featureID, msgs){ var eContainerFeatureID; switch (featureID) { case 9: return !this.ports && (this.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, this, 9, 9)) , $basicAdd_0(this.ports, otherEnd, msgs); case 10: return !this.children && (this.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, this, 10, 11)) , $basicAdd_0(this.children, otherEnd, msgs); case 11: !!this.eContainer && (msgs = (eContainerFeatureID = this.eFlags_0 >> 16 , eContainerFeatureID >= 0?$eBasicRemoveFromContainerFeature_3(this, msgs):this.eContainer.eInverseRemove(this, -1 - eContainerFeatureID, null, msgs))); return $basicSetParent_1(this, castTo(otherEnd, 27), msgs); case 12: return !this.containedEdges && (this.containedEdges = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this, 12, 3)) , $basicAdd_0(this.containedEdges, otherEnd, msgs); } return $eInverseAdd_1(this, otherEnd, featureID, msgs); } ; _.eInverseRemove_0 = function eInverseRemove_10(otherEnd, featureID, msgs){ switch (featureID) { case 9: return !this.ports && (this.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, this, 9, 9)) , $basicRemove_0(this.ports, otherEnd, msgs); case 10: return !this.children && (this.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, this, 10, 11)) , $basicRemove_0(this.children, otherEnd, msgs); case 11: return $basicSetParent_1(this, null, msgs); case 12: return !this.containedEdges && (this.containedEdges = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this, 12, 3)) , $basicRemove_0(this.containedEdges, otherEnd, msgs); } return $eInverseRemove_2(this, otherEnd, featureID, msgs); } ; _.eIsSet = function eIsSet_13(featureID){ switch (featureID) { case 9: return !!this.ports && this.ports.size_0 != 0; case 10: return !!this.children && this.children.size_0 != 0; case 11: return !!$getParent_2(this); case 12: return !!this.containedEdges && this.containedEdges.size_0 != 0; case 13: return !this.children && (this.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, this, 10, 11)) , this.children.size_0 > 0; } return $eIsSet_4(this, featureID); } ; _.eSet = function eSet_12(featureID, newValue){ switch (featureID) { case 9: !this.ports && (this.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, this, 9, 9)); $clear_13(this.ports); !this.ports && (this.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, this, 9, 9)); $addAll_9(this.ports, castTo(newValue, 16)); return; case 10: !this.children && (this.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, this, 10, 11)); $clear_13(this.children); !this.children && (this.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, this, 10, 11)); $addAll_9(this.children, castTo(newValue, 16)); return; case 11: $setParent_2(this, castTo(newValue, 27)); return; case 12: !this.containedEdges && (this.containedEdges = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this, 12, 3)); $clear_13(this.containedEdges); !this.containedEdges && (this.containedEdges = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this, 12, 3)); $addAll_9(this.containedEdges, castTo(newValue, 16)); return; } $eSet_4(this, featureID, newValue); } ; _.eStaticClass = function eStaticClass_12(){ return $clinit_ElkGraphPackage$Literals() , ELK_NODE; } ; _.eUnset = function eUnset_12(featureID){ switch (featureID) { case 9: !this.ports && (this.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, this, 9, 9)); $clear_13(this.ports); return; case 10: !this.children && (this.children = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkNode_2_classLit, this, 10, 11)); $clear_13(this.children); return; case 11: $setParent_2(this, null); return; case 12: !this.containedEdges && (this.containedEdges = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, this, 12, 3)); $clear_13(this.containedEdges); return; } $eUnset_4(this, featureID); } ; _.toString_0 = function toString_132(){ return $toString_23(this); } ; var Lorg_eclipse_elk_graph_impl_ElkNodeImpl_2_classLit = createForClass('org.eclipse.elk.graph.impl', 'ElkNodeImpl', 207); function $basicSetParent_2(this$static, newParent, msgs){ msgs = $eBasicSetContainer(this$static, newParent, 9, msgs); return msgs; } function $eBasicRemoveFromContainerFeature_4(this$static, msgs){ var eClass, inverseFeature; if (this$static.eFlags_0 >> 16 == 9) { return this$static.eContainer.eInverseRemove(this$static, 9, Lorg_eclipse_elk_graph_ElkNode_2_classLit, msgs); } return inverseFeature = $getEOpposite(castTo($getEStructuralFeature((eClass = castTo($getField(this$static, 16), 29) , !eClass?($clinit_ElkGraphPackage$Literals() , ELK_PORT):eClass), this$static.eFlags_0 >> 16), 19)) , this$static.eContainer.eInverseRemove(this$static, inverseFeature.featureID, inverseFeature.containerClass, msgs); } function $getParent_3(this$static){ if (this$static.eFlags_0 >> 16 != 9) return null; return castTo(this$static.eContainer, 27); } function $setParent_3(this$static, newParent){ var eContainerFeatureID, msgs; if (newParent != this$static.eContainer || this$static.eFlags_0 >> 16 != 9 && !!newParent) { if (isAncestor(this$static, newParent)) throw toJs(new IllegalArgumentException_0('Recursive containment not allowed for ' + $toString_24(this$static))); msgs = null; !!this$static.eContainer && (msgs = (eContainerFeatureID = this$static.eFlags_0 >> 16 , eContainerFeatureID >= 0?$eBasicRemoveFromContainerFeature_4(this$static, msgs):this$static.eContainer.eInverseRemove(this$static, -1 - eContainerFeatureID, null, msgs))); !!newParent && (msgs = $eInverseAdd(newParent, this$static, 9, msgs)); msgs = $basicSetParent_2(this$static, newParent, msgs); !!msgs && msgs.dispatch_0(); } else (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 9, newParent, newParent)); } function $toString_24(this$static){ var builder, id_0, text_0; if ((this$static.eFlags_0 & 64) != 0) return $toString_18(this$static); builder = new StringBuilder_1('ElkPort'); id_0 = this$static.identifier; if (!id_0) { !this$static.labels && (this$static.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, this$static, 1, 7)); if (this$static.labels.size_0 > 0) { text_0 = (!this$static.labels && (this$static.labels = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkLabel_2_classLit, this$static, 1, 7)) , castTo($get_20(this$static.labels, 0), 135)).text_0; !text_0 || $append_11($append_11((builder.string += ' "' , builder), text_0), '"'); } } else { $append_11($append_11((builder.string += ' "' , builder), id_0), '"'); } $append_11($append_6($append_11($append_6($append_11($append_6($append_11($append_6((builder.string += ' (' , builder), this$static.x_0), ','), this$static.y_0), ' | '), this$static.width_0), ','), this$static.height), ')'); return builder.string; } function ElkPortImpl(){ ElkConnectableShapeImpl.call(this); } defineClass(193, 741, {110:1, 342:1, 84:1, 167:1, 123:1, 422:1, 193:1, 96:1, 94:1, 93:1, 58:1, 114:1, 54:1, 99:1, 119:1, 120:1}, ElkPortImpl); _.eBasicRemoveFromContainerFeature = function eBasicRemoveFromContainerFeature_5(msgs){ return $eBasicRemoveFromContainerFeature_4(this, msgs); } ; _.eGet = function eGet_15(featureID, resolve, coreType){ if (featureID == 9) { return $getParent_3(this); } return $eGet_6(this, featureID, resolve, coreType); } ; _.eInverseAdd_0 = function eInverseAdd_10(otherEnd, featureID, msgs){ var eContainerFeatureID; switch (featureID) { case 9: !!this.eContainer && (msgs = (eContainerFeatureID = this.eFlags_0 >> 16 , eContainerFeatureID >= 0?$eBasicRemoveFromContainerFeature_4(this, msgs):this.eContainer.eInverseRemove(this, -1 - eContainerFeatureID, null, msgs))); return $basicSetParent_2(this, castTo(otherEnd, 27), msgs); } return $eInverseAdd_1(this, otherEnd, featureID, msgs); } ; _.eInverseRemove_0 = function eInverseRemove_11(otherEnd, featureID, msgs){ if (featureID == 9) { return $basicSetParent_2(this, null, msgs); } return $eInverseRemove_2(this, otherEnd, featureID, msgs); } ; _.eIsSet = function eIsSet_14(featureID){ if (featureID == 9) { return !!$getParent_3(this); } return $eIsSet_4(this, featureID); } ; _.eSet = function eSet_13(featureID, newValue){ switch (featureID) { case 9: $setParent_3(this, castTo(newValue, 27)); return; } $eSet_4(this, featureID, newValue); } ; _.eStaticClass = function eStaticClass_13(){ return $clinit_ElkGraphPackage$Literals() , ELK_PORT; } ; _.eUnset = function eUnset_13(featureID){ switch (featureID) { case 9: $setParent_3(this, null); return; } $eUnset_4(this, featureID); } ; _.toString_0 = function toString_133(){ return $toString_24(this); } ; var Lorg_eclipse_elk_graph_impl_ElkPortImpl_2_classLit = createForClass('org.eclipse.elk.graph.impl', 'ElkPortImpl', 193); var Lorg_eclipse_emf_common_util_BasicEMap$Entry_2_classLit = createForInterface('org.eclipse.emf.common.util', 'BasicEMap/Entry'); function $setTypedKey(this$static, newKey){ var oldKey; oldKey = this$static.key; this$static.key = newKey; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 0, oldKey, this$static.key)); } function $setTypedValue(this$static, newValue){ var oldValue; oldValue = this$static.value_0; this$static.value_0 = newValue; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 1, oldValue, this$static.value_0)); } function ElkPropertyToValueMapEntryImpl(){ } defineClass(1122, 120, {110:1, 44:1, 94:1, 93:1, 136:1, 58:1, 114:1, 54:1, 99:1, 119:1, 120:1}, ElkPropertyToValueMapEntryImpl); _.equals_0 = function equals_211(other){ return this === other; } ; _.getKey = function getKey_8(){ return this.key; } ; _.hashCode_1 = function hashCode_74(){ return getObjectIdentityHashCode(this); } ; _.setKey = function setKey(key){ $setTypedKey(this, castTo(key, 149)); } ; _.eGet = function eGet_16(featureID, resolve, coreType){ switch (featureID) { case 0: return this.key; case 1: return this.value_0; } return $eGet(this, featureID, resolve, coreType); } ; _.eIsSet = function eIsSet_15(featureID){ switch (featureID) { case 0: return !!this.key; case 1: return this.value_0 != null; } return $eIsSet(this, featureID); } ; _.eSet = function eSet_14(featureID, newValue){ switch (featureID) { case 0: $setTypedKey(this, castTo(newValue, 149)); return; case 1: $setTypedValue(this, newValue); return; } $eSet(this, featureID, newValue); } ; _.eStaticClass = function eStaticClass_14(){ return $clinit_ElkGraphPackage$Literals() , ELK_PROPERTY_TO_VALUE_MAP_ENTRY; } ; _.eUnset = function eUnset_14(featureID){ switch (featureID) { case 0: $setTypedKey(this, null); return; case 1: $setTypedValue(this, null); return; } $eUnset(this, featureID); } ; _.getHash = function getHash(){ var theKey; if (this.hash == -1) { theKey = this.key; this.hash = !theKey?0:hashCode__I__devirtual$(theKey); } return this.hash; } ; _.getValue = function getValue_10(){ return this.value_0; } ; _.setHash = function setHash(hash){ this.hash = hash; } ; _.setValue = function setValue_11(value_0){ var oldValue; oldValue = this.value_0; $setTypedValue(this, value_0); return oldValue; } ; _.toString_0 = function toString_134(){ var result; if ((this.eFlags_0 & 64) != 0) return $toString_16(this); result = new StringBuilder; $append_11($append_11($append_11(result, this.key?this.key.getId():'null'), ' -> '), valueOf_6(this.value_0)); return result.string; } ; _.hash = -1; _.value_0 = null; var Lorg_eclipse_elk_graph_impl_ElkPropertyToValueMapEntryImpl_2_classLit = createForClass('org.eclipse.elk.graph.impl', 'ElkPropertyToValueMapEntryImpl', 1122); function $addJsonArr(arr, jv){ var size_0; size_0 = arr.jsArray.length; $get_8(arr, size_0); $set0(arr, size_0, jv); } function $addJsonArr_0(arr, o){ var _doubleValue, _matched; _matched = false; if (instanceOfString(o)) { _matched = true; $addJsonArr(arr, new JSONString(castToString(o))); } if (!_matched) { if (instanceOf(o, 242)) { _matched = true; $addJsonArr(arr, (_doubleValue = doubleValue__D__devirtual$(castTo(o, 242)) , new JSONNumber(_doubleValue))); } } if (!_matched) { throw toJs(new Error_0('Severe implementation error in the Json to ElkGraph importer.')); } } function $addJsonObj(o, element, n){ var _doubleValue, _jSONNumber; _doubleValue = doubleValue__D__devirtual$(n); _jSONNumber = new JSONNumber(_doubleValue); $put_5(o, element, _jSONNumber); } function $addJsonObj_0(this$static, o, element, obj){ var _matched; _matched = false; if (instanceOfString(obj)) { _matched = true; $addJsonObj_1(o, element, castToString(obj)); } if (!_matched) { if (instanceOfBoolean(obj)) { _matched = true; $addJsonObj_0(this$static, o, element, obj); } } if (!_matched) { if (instanceOf(obj, 242)) { _matched = true; $addJsonObj(o, element, castTo(obj, 242)); } } if (!_matched) { throw toJs(new Error_0('Severe implementation error in the Json to ElkGraph importer.')); } } function $addJsonObj_1(o, element, s){ var _jSONString; _jSONString = new JSONString(s); $put_5(o, element, _jSONString); } function $asId(id_0){ var _isInt, _matched; _matched = false; if (instanceOf(id_0, 211)) { _matched = true; return castTo(id_0, 211).value_0; } if (!_matched) { if (instanceOf(id_0, 263)) { _isInt = castTo(id_0, 263).value_0 % 1 == 0; if (_isInt) { _matched = true; return valueOf_3($intValue(castTo(id_0, 263).value_0)); } } } throw toJs(new JsonImportException("Id must be a string or an integer: '" + id_0 + "'.")); } function $getId(o){ var _containsKey, _not, _xblockexpression; _xblockexpression = null; _containsKey = 'id' in o.jsObject; _not = !_containsKey; if (_not) { throw toJs(new JsonImportException('Every element must have an id.')); } _xblockexpression = $asId($get_9(o, 'id')); return _xblockexpression; } function $optDouble(o, element){ var _containsKey, num; _containsKey = element in o.jsObject; if (_containsKey) { num = $get_9(o, element).isNumber(); if (num) { return num.value_0; } } return null; } function $optJSONArray(arr, element){ var _get, _isArray; _get = $get_9(arr, element); _isArray = null; !!_get && (_isArray = _get.isArray_0()); return _isArray; } function $optJSONObject(arr, i){ var _get, _isObject; _get = $get_8(arr, i); _isObject = null; !!_get && (_isObject = _get.isObject()); return _isObject; } function $optJSONObject_0(o, element){ var _get, _isObject; _get = $get_9(o, element); _isObject = null; !!_get && (_isObject = _get.isObject()); return _isObject; } function $optString(o, element){ var _get, _stringVal; _get = $get_9(o, element); _stringVal = null; !!_get && (_stringVal = $stringVal(_get)); return _stringVal; } function $stringVal(v){ var _matched, _switchResult; _switchResult = null; _matched = false; if (instanceOf(v, 211)) { _matched = true; _switchResult = castTo(v, 211).value_0; } if (!_matched) { if (instanceOf(v, 263)) { _matched = true; _switchResult = '' + castTo(v, 263).value_0; } } if (!_matched) { if (instanceOf(v, 493)) { _matched = true; _switchResult = '' + castTo(v, 493).value_0; } } if (!_matched) { throw toJs(new Error_0('Severe implementation error in the Json to ElkGraph importer.')); } return _switchResult; } function JsonAdapter(){ } defineClass(996, 1, {}, JsonAdapter); var Lorg_eclipse_elk_graph_json_JsonAdapter_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonAdapter', 996); function JsonImportException(message){ RuntimeException_0.call(this, message); } defineClass(216, 63, $intern_44, JsonImportException); var Lorg_eclipse_elk_graph_json_JsonImportException_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImportException', 216); function $_idByElement(this$static, section){ return $get_5($inverse(this$static.edgeSectionIdMap), section); } function $_idByElement_0(this$static, node){ return $get_5($inverse(this$static.nodeIdMap), node); } function $_idByElement_1(this$static, port){ return $get_5($inverse(this$static.portIdMap), port); } function $_transferLayoutInt(this$static, edge){ var _function, _function_1, _hasProperty, _isNullOrEmpty, _isNullOrEmpty_1, _not, _not_1, edgeId, jps, jsonJPs, jsonObj, sections; jsonObj = castTo($get_10(this$static.edgeJsonMap, edge), 190); if (!jsonObj) { throw toJs(new JsonImportException('Edge did not exist in input.')); } edgeId = $getId(jsonObj); _isNullOrEmpty = isNullOrEmpty((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections)); _not = !_isNullOrEmpty; if (_not) { sections = new JSONArray; _function = new JsonImporter$lambda$36$Type(this$static, edgeId, sections); forEach_42((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections), _function); $put_5(jsonObj, 'sections', sections); } _hasProperty = $hasProperty_0(edge, ($clinit_CoreOptions() , JUNCTION_POINTS_0)); if (_hasProperty) { jps = castTo($getProperty_0(edge, JUNCTION_POINTS_0), 75); _isNullOrEmpty_1 = !jps || isEmpty_35(jps); _not_1 = !_isNullOrEmpty_1; if (_not_1) { jsonJPs = new JSONArray; _function_1 = new JsonImporter$lambda$40$Type(jsonJPs); $forEach_0(jps, _function_1); $put_5(jsonObj, 'junctionPoints', jsonJPs); } } $addJsonObj_1(jsonObj, 'container', $getContainingNode(edge).identifier); return null; } function $_transferLayoutInt_0(this$static, label_0){ var jsonObj; jsonObj = $get_10(this$static.labelJsonMap, label_0); $transferShapeLayout(label_0, jsonObj); return null; } function $_transferLayoutInt_1(this$static, node){ var jsonObj; jsonObj = $get_4(this$static.nodeJsonMap, node); if (jsonObj == null) { throw toJs(new JsonImportException('Node did not exist in input.')); } $transferShapeLayout(node, jsonObj); return null; } function $_transferLayoutInt_2(this$static, port){ var jsonObj; jsonObj = $get_10(this$static.portJsonMap, port); if (jsonObj == null) { throw toJs(new JsonImportException('Port did not exist in input.')); } $transferShapeLayout(port, jsonObj); return null; } function $idByElement(this$static, node){ if (instanceOf(node, 207)) { return $_idByElement_0(this$static, castTo(node, 27)); } else if (instanceOf(node, 193)) { return $_idByElement_1(this$static, castTo(node, 123)); } else if (instanceOf(node, 452)) { return $_idByElement(this$static, castTo(node, 166)); } else { throw toJs(new IllegalArgumentException_0('Unhandled parameter types: ' + $toString_2(new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, [node]))))); } } function $lambda$0_13(this$static, parent_1, children_1){ var _doubleDotLessThan, _optJSONObject, _sizeJsonArr, i, i$iterator; if (children_1) { _sizeJsonArr = children_1.jsArray.length; _doubleDotLessThan = new ExclusiveRange(_sizeJsonArr); for (i$iterator = (_doubleDotLessThan.last - _doubleDotLessThan.first) * _doubleDotLessThan.step < 0?($clinit_ExclusiveRange() , EMPTY_LIST_ITERATOR):new ExclusiveRange$RangeIterator(_doubleDotLessThan); i$iterator.hasNext_0();) { i = castTo(i$iterator.next_1(), 17); _optJSONObject = $optJSONObject(children_1, i.value_0); !!_optJSONObject && $transformNode_0(this$static, _optJSONObject, parent_1); } } } function $lambda$1_8(this$static, node_1, edges_1){ var _doubleDotLessThan, _sizeJsonArr, edge, i, i$iterator; if (edges_1) { _sizeJsonArr = edges_1.jsArray.length; _doubleDotLessThan = new ExclusiveRange(_sizeJsonArr); for (i$iterator = (_doubleDotLessThan.last - _doubleDotLessThan.first) * _doubleDotLessThan.step < 0?($clinit_ExclusiveRange() , EMPTY_LIST_ITERATOR):new ExclusiveRange$RangeIterator(_doubleDotLessThan); i$iterator.hasNext_0();) { i = castTo(i$iterator.next_1(), 17); edge = $optJSONObject(edges_1, i.value_0); 'sources' in edge.jsObject || 'targets' in edge.jsObject?$transformEdge_1(this$static, edge, node_1):$transformPrimitiveEdge(this$static, edge, node_1); updateContainment(castTo($get_10(this$static.edgeIdMap, $getId(edge)), 74)); } } } function $lambda$10_0(section_1, bendPoint_1){ createBendPoint(section_1, $doubleValue($optDouble(bendPoint_1, 'x')), $doubleValue($optDouble(bendPoint_1, 'y'))); } function $lambda$11(this$static, edge_1, sources_1){ var _doubleDotLessThan, _sizeJsonArr, _sources, i, i$iterator, sourceElement; if (sources_1) { _sizeJsonArr = sources_1.jsArray.length; _doubleDotLessThan = new ExclusiveRange(_sizeJsonArr); for (i$iterator = (_doubleDotLessThan.last - _doubleDotLessThan.first) * _doubleDotLessThan.step < 0?($clinit_ExclusiveRange() , EMPTY_LIST_ITERATOR):new ExclusiveRange$RangeIterator(_doubleDotLessThan); i$iterator.hasNext_0();) { i = castTo(i$iterator.next_1(), 17); sourceElement = $shapeById(this$static, $asId($get_8(sources_1, i.value_0))); if (sourceElement) { _sources = (!edge_1.sources && (edge_1.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge_1, 4, 7)) , edge_1.sources); $add_21(_sources, sourceElement); } } } } function $lambda$12_0(this$static, edge_1, targets_1){ var _doubleDotLessThan, _sizeJsonArr, _targets, i, i$iterator, targetElement; if (targets_1) { _sizeJsonArr = targets_1.jsArray.length; _doubleDotLessThan = new ExclusiveRange(_sizeJsonArr); for (i$iterator = (_doubleDotLessThan.last - _doubleDotLessThan.first) * _doubleDotLessThan.step < 0?($clinit_ExclusiveRange() , EMPTY_LIST_ITERATOR):new ExclusiveRange$RangeIterator(_doubleDotLessThan); i$iterator.hasNext_0();) { i = castTo(i$iterator.next_1(), 17); targetElement = $shapeById(this$static, $asId($get_8(targets_1, i.value_0))); if (targetElement) { _targets = (!edge_1.targets && (edge_1.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge_1, 5, 8)) , edge_1.targets); $add_21(_targets, targetElement); } } } } function $lambda$13(this$static, edge_1, incomingSectionIdentifiers_2, outgoingSectionIdentifiers_3, sections_3){ var _doubleDotLessThan, _function_1, _optJSONObject, _sizeJsonArr, i, i$iterator; if (sections_3) { _sizeJsonArr = sections_3.jsArray.length; _doubleDotLessThan = new ExclusiveRange(_sizeJsonArr); for (i$iterator = (_doubleDotLessThan.last - _doubleDotLessThan.first) * _doubleDotLessThan.step < 0?($clinit_ExclusiveRange() , EMPTY_LIST_ITERATOR):new ExclusiveRange$RangeIterator(_doubleDotLessThan); i$iterator.hasNext_0();) { i = castTo(i$iterator.next_1(), 17); _optJSONObject = $optJSONObject(sections_3, i.value_0); _function_1 = new JsonImporter$lambda$14$Type(this$static, edge_1, incomingSectionIdentifiers_2, outgoingSectionIdentifiers_3); $lambda$14_0(_function_1.$$outer_0, _function_1.edge_1, _function_1.incomingSectionIdentifiers_2, _function_1.outgoingSectionIdentifiers_3, _optJSONObject); } } } function $lambda$14_0(this$static, edge_1, incomingSectionIdentifiers_2, outgoingSectionIdentifiers_3, jsonSection_3){ var _function_2, _function_3, _function_4, _function_5, _optJSONArray_1, _optJSONArray_2, _optString, _optString_1, elkSection, jsonObj, _optJSONObject, _function, _optJSONObject_1, _function_1, _optJSONArray, _function_2_0; elkSection = $register_3(this$static, createEdgeSection(edge_1), jsonSection_3); $setIdentifier_0(elkSection, $optString(jsonSection_3, 'id')); _xblockexpression = null; jsonObj = jsonSection_3; _optJSONObject = $optJSONObject_0(jsonObj, 'startPoint'); _function = new JsonImporter$lambda$19$Type(elkSection); $lambda$19_0(_function.section_1, _optJSONObject); _optJSONObject_1 = $optJSONObject_0(jsonObj, 'endPoint'); _function_1 = new JsonImporter$lambda$22$Type(elkSection); $lambda$22_0(_function_1.section_1, _optJSONObject_1); _optJSONArray = $optJSONArray(jsonObj, 'bendPoints'); _function_2_0 = new JsonImporter$lambda$25$Type(elkSection); $lambda$25_0(_function_2_0.section_1, _optJSONArray); _optString = $optString(jsonSection_3, 'incomingShape'); _function_2 = new JsonImporter$lambda$15$Type(this$static, elkSection); $lambda$15(_function_2.$$outer_0, _function_2.elkSection_1, _optString); _optString_1 = $optString(jsonSection_3, 'outgoingShape'); _function_3 = new JsonImporter$lambda$16$Type(this$static, elkSection); $lambda$16(_function_3.$$outer_0, _function_3.elkSection_1, _optString_1); _optJSONArray_1 = $optJSONArray(jsonSection_3, 'incomingSections'); _function_4 = new JsonImporter$lambda$17$Type(incomingSectionIdentifiers_2, elkSection); $lambda$17(_function_4.incomingSectionIdentifiers_1, _function_4.elkSection_2, _optJSONArray_1); _optJSONArray_2 = $optJSONArray(jsonSection_3, 'outgoingSections'); _function_5 = new JsonImporter$lambda$18$Type(outgoingSectionIdentifiers_3, elkSection); $lambda$18_0(_function_5.outgoingSectionIdentifiers_1, _function_5.elkSection_2, _optJSONArray_2); } function $lambda$15(this$static, elkSection_1, jsonShapeId_1){ jsonShapeId_1 != null && $setIncomingShape(elkSection_1, $shapeById(this$static, jsonShapeId_1)); } function $lambda$16(this$static, elkSection_1, jsonShapeId_1){ jsonShapeId_1 != null && $setOutgoingShape(elkSection_1, $shapeById(this$static, jsonShapeId_1)); } function $lambda$17(incomingSectionIdentifiers_1, elkSection_2, jsonSectionIds_2){ var _doubleDotLessThan_1, _sizeJsonArr_1, j, j$iterator; if (jsonSectionIds_2) { _sizeJsonArr_1 = jsonSectionIds_2.jsArray.length; _doubleDotLessThan_1 = new ExclusiveRange(_sizeJsonArr_1); for (j$iterator = (_doubleDotLessThan_1.last - _doubleDotLessThan_1.first) * _doubleDotLessThan_1.step < 0?($clinit_ExclusiveRange() , EMPTY_LIST_ITERATOR):new ExclusiveRange$RangeIterator(_doubleDotLessThan_1); j$iterator.hasNext_0();) { j = castTo(j$iterator.next_1(), 17); $put(incomingSectionIdentifiers_1, elkSection_2, $asId($get_8(jsonSectionIds_2, j.value_0))); } } } function $lambda$18_0(outgoingSectionIdentifiers_1, elkSection_2, jsonSectionIds_2){ var _doubleDotLessThan_1, _sizeJsonArr_1, j, j$iterator; if (jsonSectionIds_2) { _sizeJsonArr_1 = jsonSectionIds_2.jsArray.length; _doubleDotLessThan_1 = new ExclusiveRange(_sizeJsonArr_1); for (j$iterator = (_doubleDotLessThan_1.last - _doubleDotLessThan_1.first) * _doubleDotLessThan_1.step < 0?($clinit_ExclusiveRange() , EMPTY_LIST_ITERATOR):new ExclusiveRange$RangeIterator(_doubleDotLessThan_1); j$iterator.hasNext_0();) { j = castTo(j$iterator.next_1(), 17); $put(outgoingSectionIdentifiers_1, elkSection_2, $asId($get_8(jsonSectionIds_2, j.value_0))); } } } function $lambda$19_0(section_1, startPoint_1){ var _function_1, _function_2, _optDouble, _optDouble_1; if (startPoint_1) { _optDouble = $optDouble(startPoint_1, 'x'); _function_1 = new JsonImporter$lambda$20$Type(section_1); $setStartX(_function_1.section_0, (checkCriticalNotNull(_optDouble) , _optDouble)); _optDouble_1 = $optDouble(startPoint_1, 'y'); _function_2 = new JsonImporter$lambda$21$Type(section_1); $setStartY(_function_2.section_0, (checkCriticalNotNull(_optDouble_1) , _optDouble_1)); } else { throw toJs(new JsonImportException('All edge sections need a start point.')); } } function $lambda$2_5(this$static, children_0){ var _doubleDotLessThan, _optJSONObject, _sizeJsonArr, i, i$iterator; if (children_0) { _sizeJsonArr = children_0.jsArray.length; _doubleDotLessThan = new ExclusiveRange(_sizeJsonArr); for (i$iterator = (_doubleDotLessThan.last - _doubleDotLessThan.first) * _doubleDotLessThan.step < 0?($clinit_ExclusiveRange() , EMPTY_LIST_ITERATOR):new ExclusiveRange$RangeIterator(_doubleDotLessThan); i$iterator.hasNext_0();) { i = castTo(i$iterator.next_1(), 17); _optJSONObject = $optJSONObject(children_0, i.value_0); !!_optJSONObject && $transformEdges_2(this$static, _optJSONObject); } } } function $lambda$22_0(section_1, endPoint_1){ var _function_2, _function_3, _optDouble, _optDouble_1; if (endPoint_1) { _optDouble = $optDouble(endPoint_1, 'x'); _function_2 = new JsonImporter$lambda$23$Type(section_1); $setEndX(_function_2.section_0, (checkCriticalNotNull(_optDouble) , _optDouble)); _optDouble_1 = $optDouble(endPoint_1, 'y'); _function_3 = new JsonImporter$lambda$24$Type(section_1); $setEndY(_function_3.section_0, (checkCriticalNotNull(_optDouble_1) , _optDouble_1)); } else { throw toJs(new JsonImportException('All edge sections need an end point.')); } } function $lambda$25_0(section_1, bendPoints_1){ var _doubleDotLessThan, _function_3, _optJSONObject_2, _sizeJsonArr, i, i$iterator; if (bendPoints_1) { _sizeJsonArr = bendPoints_1.jsArray.length; _doubleDotLessThan = new ExclusiveRange(_sizeJsonArr); for (i$iterator = (_doubleDotLessThan.last - _doubleDotLessThan.first) * _doubleDotLessThan.step < 0?($clinit_ExclusiveRange() , EMPTY_LIST_ITERATOR):new ExclusiveRange$RangeIterator(_doubleDotLessThan); i$iterator.hasNext_0();) { i = castTo(i$iterator.next_1(), 17); _optJSONObject_2 = $optJSONObject(bendPoints_1, i.value_0); _function_3 = new JsonImporter$lambda$26$Type(section_1); $lambda$26_0(_function_3.section_1, _optJSONObject_2); } } } function $lambda$26_0(section_1, bendPoint_1){ createBendPoint(section_1, $doubleValue($optDouble(bendPoint_1, 'x')), $doubleValue($optDouble(bendPoint_1, 'y'))); } function $lambda$27(opts_1, layoutData_2, k_2){ var _jsonObj, _stringVal, value_0; _jsonObj = $get_9(opts_1, k_2); _stringVal = null; !!_jsonObj && (_stringVal = $stringVal(_jsonObj)); value_0 = _stringVal; $setOption(layoutData_2, k_2, value_0); } function $lambda$28(opts_1, individualSpacings_2, k_2){ var _jsonObj, _stringVal, value_0; _jsonObj = $get_9(opts_1, k_2); _stringVal = null; !!_jsonObj && (_stringVal = $stringVal(_jsonObj)); value_0 = _stringVal; $setOption(individualSpacings_2, k_2, value_0); } function $lambda$29_0(this$static, element_1, labels_1){ var _doubleDotLessThan, _hasJsonObj, _sizeJsonArr, i, i$iterator, jsonLabel, label_0; if (labels_1) { _sizeJsonArr = labels_1.jsArray.length; _doubleDotLessThan = new ExclusiveRange(_sizeJsonArr); for (i$iterator = (_doubleDotLessThan.last - _doubleDotLessThan.first) * _doubleDotLessThan.step < 0?($clinit_ExclusiveRange() , EMPTY_LIST_ITERATOR):new ExclusiveRange$RangeIterator(_doubleDotLessThan); i$iterator.hasNext_0();) { i = castTo(i$iterator.next_1(), 17); jsonLabel = $optJSONObject(labels_1, i.value_0); if (jsonLabel) { label_0 = createLabel($optString(jsonLabel, 'text'), element_1); $put_6(this$static.labelJsonMap, label_0, jsonLabel); _hasJsonObj = 'id' in jsonLabel.jsObject; _hasJsonObj && $setIdentifier(label_0, $optString(jsonLabel, 'id')); $transformProperties(jsonLabel, label_0); $transformShapeLayout(jsonLabel, label_0); } } } } function $lambda$3_4(section_1, srcPnt_1){ var _function_1, _function_2, _optDouble, _optDouble_1; if (srcPnt_1) { _optDouble = $optDouble(srcPnt_1, 'x'); _function_1 = new JsonImporter$lambda$4$Type(section_1); $setStartX(_function_1.section_0, (checkCriticalNotNull(_optDouble) , _optDouble)); _optDouble_1 = $optDouble(srcPnt_1, 'y'); _function_2 = new JsonImporter$lambda$5$Type(section_1); $setStartY(_function_2.section_0, (checkCriticalNotNull(_optDouble_1) , _optDouble_1)); } } function $lambda$30(this$static, parent_1, ports_1){ var _doubleDotLessThan, _optJSONObject, _sizeJsonArr, i, i$iterator, port, port_0, elkPort; if (ports_1) { _sizeJsonArr = ports_1.jsArray.length; _doubleDotLessThan = new ExclusiveRange(_sizeJsonArr); for (i$iterator = (_doubleDotLessThan.last - _doubleDotLessThan.first) * _doubleDotLessThan.step < 0?($clinit_ExclusiveRange() , EMPTY_LIST_ITERATOR):new ExclusiveRange$RangeIterator(_doubleDotLessThan); i$iterator.hasNext_0();) { i = castTo(i$iterator.next_1(), 17); _optJSONObject = $optJSONObject(ports_1, i.value_0); !!_optJSONObject && (_xblockexpression = null , port = $register_5(this$static, (port_0 = ($clinit_ElkGraphFactory() , elkPort = new ElkPortImpl , elkPort) , !!parent_1 && $setParent_3(port_0, parent_1) , port_0), _optJSONObject) , $setIdentifier(port, $optString(_optJSONObject, 'id')) , $transformProperties(_optJSONObject, port) , $transformShapeLayout(_optJSONObject, port) , $transformLabels(this$static, _optJSONObject, port)); } } } function $lambda$31(shape_1, it_1){ $setX_2(shape_1, it_1 == null || isInfinite((checkCriticalNotNull(it_1) , it_1)) || isNaN((checkCriticalNotNull(it_1) , it_1))?0:(checkCriticalNotNull(it_1) , it_1)); } function $lambda$32(shape_1, it_1){ $setY_3(shape_1, it_1 == null || isInfinite((checkCriticalNotNull(it_1) , it_1)) || isNaN((checkCriticalNotNull(it_1) , it_1))?0:(checkCriticalNotNull(it_1) , it_1)); } function $lambda$33(shape_1, it_1){ $setWidth_0(shape_1, it_1 == null || isInfinite((checkCriticalNotNull(it_1) , it_1)) || isNaN((checkCriticalNotNull(it_1) , it_1))?0:(checkCriticalNotNull(it_1) , it_1)); } function $lambda$34(shape_1, it_1){ $setHeight_0(shape_1, it_1 == null || isInfinite((checkCriticalNotNull(it_1) , it_1)) || isNaN((checkCriticalNotNull(it_1) , it_1))?0:(checkCriticalNotNull(it_1) , it_1)); } function $lambda$36(this$static, edgeId_1, sections_2, elkSection_2, i_3){ var _function_1, _function_2, _function_3, _incomingShape, _isEmpty, _isEmpty_1, _isNullOrEmpty_1, _jSONString, _jsonObject, _not_1, _not_2, _not_3, _outgoingShape, _plus, _plus_1, _tripleNotEquals, _tripleNotEquals_1, bendPoints, endPoint, incomingSections, jsonSection, maybeSection, outgoingSections, startPoint; maybeSection = $get_10(this$static.edgeSectionJsonMap, elkSection_2); if (maybeSection == null) { maybeSection = new JSONObject; _jsonObject = castTo(maybeSection, 190); _plus = edgeId_1 + '_s'; _plus_1 = _plus + i_3; _jSONString = new JSONString(_plus_1); $put_5(_jsonObject, 'id', _jSONString); } jsonSection = castTo(maybeSection, 190); $addJsonArr(sections_2, jsonSection); startPoint = new JSONObject; $addJsonObj(startPoint, 'x', elkSection_2.startX); $addJsonObj(startPoint, 'y', elkSection_2.startY); $put_5(jsonSection, 'startPoint', startPoint); endPoint = new JSONObject; $addJsonObj(endPoint, 'x', elkSection_2.endX); $addJsonObj(endPoint, 'y', elkSection_2.endY); $put_5(jsonSection, 'endPoint', endPoint); _isNullOrEmpty_1 = isNullOrEmpty((!elkSection_2.bendPoints && (elkSection_2.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, elkSection_2, 5)) , elkSection_2.bendPoints)); _not_1 = !_isNullOrEmpty_1; if (_not_1) { bendPoints = new JSONArray; _function_1 = new JsonImporter$lambda$37$Type(bendPoints); $forEach_0((!elkSection_2.bendPoints && (elkSection_2.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, elkSection_2, 5)) , elkSection_2.bendPoints), _function_1); $put_5(jsonSection, 'bendPoints', bendPoints); } _incomingShape = $getIncomingShape(elkSection_2); _tripleNotEquals = !!_incomingShape; _tripleNotEquals && $addJsonObj_0(this$static._jsonAdapter, jsonSection, 'incomingShape', $idByElement(this$static, $getIncomingShape(elkSection_2))); _outgoingShape = $getOutgoingShape(elkSection_2); _tripleNotEquals_1 = !!_outgoingShape; _tripleNotEquals_1 && $addJsonObj_0(this$static._jsonAdapter, jsonSection, 'outgoingShape', $idByElement(this$static, $getOutgoingShape(elkSection_2))); _isEmpty = (!elkSection_2.incomingSections && (elkSection_2.incomingSections = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, elkSection_2, 10, 9)) , elkSection_2.incomingSections).size_0 == 0; _not_2 = !_isEmpty; if (_not_2) { incomingSections = new JSONArray; _function_2 = new JsonImporter$lambda$38$Type(this$static, incomingSections); $forEach_0((!elkSection_2.incomingSections && (elkSection_2.incomingSections = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, elkSection_2, 10, 9)) , elkSection_2.incomingSections), _function_2); $put_5(jsonSection, 'incomingSections', incomingSections); } _isEmpty_1 = (!elkSection_2.outgoingSections && (elkSection_2.outgoingSections = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, elkSection_2, 9, 10)) , elkSection_2.outgoingSections).size_0 == 0; _not_3 = !_isEmpty_1; if (_not_3) { outgoingSections = new JSONArray; _function_3 = new JsonImporter$lambda$39$Type(this$static, outgoingSections); $forEach_0((!elkSection_2.outgoingSections && (elkSection_2.outgoingSections = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, elkSection_2, 9, 10)) , elkSection_2.outgoingSections), _function_3); $put_5(jsonSection, 'outgoingSections', outgoingSections); } } function $lambda$37(bendPoints_1, pnt_1){ var jsonPnt; jsonPnt = new JSONObject; $addJsonObj(jsonPnt, 'x', pnt_1.x_0); $addJsonObj(jsonPnt, 'y', pnt_1.y_0); $addJsonArr(bendPoints_1, jsonPnt); } function $lambda$38(this$static, incomingSections_1, sec_1){ $addJsonArr_0(incomingSections_1, $idByElement(this$static, sec_1)); } function $lambda$39(this$static, outgoingSections_1, sec_1){ $addJsonArr_0(outgoingSections_1, $idByElement(this$static, sec_1)); } function $lambda$40(jsonJPs_1, jp_1){ var jsonPnt; jsonPnt = new JSONObject; $addJsonObj(jsonPnt, 'x', jp_1.x_0); $addJsonObj(jsonPnt, 'y', jp_1.y_0); $addJsonArr(jsonJPs_1, jsonPnt); } function $lambda$6_0(section_1, tgtPnt_1){ var _function_2, _function_3, _optDouble, _optDouble_1; if (tgtPnt_1) { _optDouble = $optDouble(tgtPnt_1, 'x'); _function_2 = new JsonImporter$lambda$7$Type(section_1); $setEndX(_function_2.section_0, (checkCriticalNotNull(_optDouble) , _optDouble)); _optDouble_1 = $optDouble(tgtPnt_1, 'y'); _function_3 = new JsonImporter$lambda$8$Type(section_1); $setEndY(_function_3.section_0, (checkCriticalNotNull(_optDouble_1) , _optDouble_1)); } } function $lambda$9_1(section_1, bendPoints_1){ var _doubleDotLessThan, _function_3, _optJSONObject_2, _sizeJsonArr, i, i$iterator; if (bendPoints_1) { _sizeJsonArr = bendPoints_1.jsArray.length; _doubleDotLessThan = new ExclusiveRange(_sizeJsonArr); for (i$iterator = (_doubleDotLessThan.last - _doubleDotLessThan.first) * _doubleDotLessThan.step < 0?($clinit_ExclusiveRange() , EMPTY_LIST_ITERATOR):new ExclusiveRange$RangeIterator(_doubleDotLessThan); i$iterator.hasNext_0();) { i = castTo(i$iterator.next_1(), 17); _optJSONObject_2 = $optJSONObject(bendPoints_1, i.value_0); _function_3 = new JsonImporter$lambda$10$Type(section_1); $lambda$10_0(_function_3.section_1, _optJSONObject_2); } } } function $register_2(this$static, edge, obj){ var id_0; id_0 = $getId(obj); $put_6(this$static.edgeIdMap, id_0, edge); $put_6(this$static.edgeJsonMap, edge, obj); return edge; } function $register_3(this$static, edgeSection, obj){ var id_0; id_0 = $getId(obj); $put_3(this$static.edgeSectionIdMap, id_0, edgeSection); $put_6(this$static.edgeSectionJsonMap, edgeSection, obj); return edgeSection; } function $register_4(this$static, node, obj){ var id_0; id_0 = $getId(obj); $put_3(this$static.nodeIdMap, id_0, node); $put_3(this$static.nodeJsonMap, node, obj); return node; } function $register_5(this$static, port, obj){ var id_0; id_0 = $getId(obj); $put_3(this$static.portIdMap, id_0, port); $put_6(this$static.portJsonMap, port, obj); return port; } function $setOption(e, id_0, value_0){ var _xblockexpression, _xblockexpression_1, _xifexpression, _xifexpression_1, optionData, parsed; _xblockexpression = null; optionData = $getOptionDataBySuffix(getInstance(), id_0); _xifexpression = null; if (optionData) { _xblockexpression_1 = null; parsed = $parseValue(optionData, value_0); _xifexpression_1 = null; parsed != null && (_xifexpression_1 = e.setProperty(optionData, parsed)); _xblockexpression_1 = _xifexpression_1; _xifexpression = _xblockexpression_1; } _xblockexpression = _xifexpression; return _xblockexpression; } function $shapeById(this$static, id_0){ var node, port; node = castTo($get_4(this$static.nodeIdMap, id_0), 27); if (node) { return node; } port = castTo($get_4(this$static.portIdMap, id_0), 123); if (port) { return port; } throw toJs(new JsonImportException('Referenced shape does not exist: ' + id_0)); } function $transferLayoutInt(this$static, node){ if (instanceOf(node, 207)) { return $_transferLayoutInt_1(this$static, castTo(node, 27)); } else if (instanceOf(node, 193)) { return $_transferLayoutInt_2(this$static, castTo(node, 123)); } else if (instanceOf(node, 366)) { return $_transferLayoutInt_0(this$static, castTo(node, 135)); } else if (instanceOf(node, 326)) { return $_transferLayoutInt(this$static, castTo(node, 74)); } else if (node) { return null; } else { throw toJs(new IllegalArgumentException_0('Unhandled parameter types: ' + $toString_2(new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, [node]))))); } } function $transferShapeLayout(shape_0, jsonObjA){ var jsonObj; jsonObj = castTo(jsonObjA, 190); $addJsonObj(jsonObj, 'x', shape_0.x_0); $addJsonObj(jsonObj, 'y', shape_0.y_0); $addJsonObj(jsonObj, 'width', shape_0.width_0); $addJsonObj(jsonObj, 'height', shape_0.height); } function $transformChildNodes(this$static, jsonNodeA, parent_0){ var _function, _optJSONArray, _xblockexpression, jsonNode; _xblockexpression = null; jsonNode = jsonNodeA; _optJSONArray = $optJSONArray(jsonNode, 'children'); _function = new JsonImporter$lambda$0$Type(this$static, parent_0); _xblockexpression = ($lambda$0_13(_function.$$outer_0, _function.parent_1, _optJSONArray) , _optJSONArray); return _xblockexpression; } function $transformEdge_1(this$static, jsonObjA, parent_0){ var _function, _function_1, _idSave, _optJSONArray, _optJSONArray_1, _plus, _plus_1, _xblockexpression, edge, jsonObj; _xblockexpression = null; jsonObj = jsonObjA; edge = $register_2(this$static, createEdge(parent_0), jsonObj); $setIdentifier(edge, $optString(jsonObj, 'id')); _optJSONArray = $optJSONArray(jsonObj, 'sources'); _function = new JsonImporter$lambda$11$Type(this$static, edge); $lambda$11(_function.$$outer_0, _function.edge_1, _optJSONArray); _optJSONArray_1 = $optJSONArray(jsonObj, 'targets'); _function_1 = new JsonImporter$lambda$12$Type(this$static, edge); $lambda$12_0(_function_1.$$outer_0, _function_1.edge_1, _optJSONArray_1); if ((!edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)) , edge.sources).size_0 == 0 || (!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets).size_0 == 0) { _idSave = $optString(jsonObj, 'id'); _plus = "An edge must have at least one source and one target (edge id: '" + _idSave; _plus_1 = _plus + "')."; throw toJs(new JsonImportException(_plus_1)); } $transformProperties(jsonObj, edge); $transformEdgeSections(this$static, jsonObj, edge); _xblockexpression = $transformLabels(this$static, jsonObj, edge); return _xblockexpression; } function $transformEdgeSections(this$static, jsonObjA, edge){ var _function, _get, _get_1, _idSave, _incomingSections, _keySet, _keySet_1, _optJSONArray, _outgoingSections, _plus, _plus_1, id_0, id$iterator, id_1, id_1$iterator, incomingSectionIdentifiers, jsonObj, outgoingSectionIdentifiers, referencedSection, result, result0, section, section$iterator, section_1, section_1$iterator, section_2; jsonObj = jsonObjA; incomingSectionIdentifiers = new HashMultimap; outgoingSectionIdentifiers = new HashMultimap; _optJSONArray = $optJSONArray(jsonObj, 'sections'); _function = new JsonImporter$lambda$13$Type(this$static, edge, incomingSectionIdentifiers, outgoingSectionIdentifiers); $lambda$13(_function.$$outer_0, _function.edge_1, _function.incomingSectionIdentifiers_2, _function.outgoingSectionIdentifiers_3, _optJSONArray); _keySet = (result0 = incomingSectionIdentifiers.keySet , !result0?(incomingSectionIdentifiers.keySet = new AbstractMapBasedMultimap$KeySet(incomingSectionIdentifiers, incomingSectionIdentifiers.map_0)):result0); for (section$iterator = _keySet.iterator_0(); section$iterator.hasNext_0();) { section = castTo(section$iterator.next_1(), 166); _get = castTo($get(incomingSectionIdentifiers, section), 21); for (id$iterator = _get.iterator_0(); id$iterator.hasNext_0();) { id_0 = id$iterator.next_1(); referencedSection = castTo($get_4(this$static.edgeSectionIdMap, id_0), 166); if (referencedSection) { _incomingSections = (!section.incomingSections && (section.incomingSections = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, section, 10, 9)) , section.incomingSections); $add_21(_incomingSections, referencedSection); } else { _idSave = $optString(jsonObj, 'id'); _plus = 'Referenced edge section does not exist: ' + id_0 + " (edge id: '" + _idSave; _plus_1 = _plus + "')."; throw toJs(new JsonImportException(_plus_1)); } } } _keySet_1 = (result = outgoingSectionIdentifiers.keySet , !result?(outgoingSectionIdentifiers.keySet = new AbstractMapBasedMultimap$KeySet(outgoingSectionIdentifiers, outgoingSectionIdentifiers.map_0)):result); for (section_1$iterator = _keySet_1.iterator_0(); section_1$iterator.hasNext_0();) { section_1 = castTo(section_1$iterator.next_1(), 166); _get_1 = castTo($get(outgoingSectionIdentifiers, section_1), 21); for (id_1$iterator = _get_1.iterator_0(); id_1$iterator.hasNext_0();) { id_1 = id_1$iterator.next_1(); referencedSection = castTo($get_4(this$static.edgeSectionIdMap, id_1), 166); if (referencedSection) { _outgoingSections = (!section_1.outgoingSections && (section_1.outgoingSections = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, section_1, 9, 10)) , section_1.outgoingSections); $add_21(_outgoingSections, referencedSection); } else { _idSave = $optString(jsonObj, 'id'); _plus = 'Referenced edge section does not exist: ' + id_1 + " (edge id: '" + _idSave; _plus_1 = _plus + "')."; throw toJs(new JsonImportException(_plus_1)); } } } !edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)); if (edge.sources.size_0 != 0 && (!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets.size_0 != 0) && (!edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)) , edge.sources.size_0 <= 1 && (!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets.size_0 <= 1)) && (!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections).size_0 == 1) { section_2 = castTo($get_20((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections), 0), 166); if (!$getIncomingShape(section_2) && !$getOutgoingShape(section_2)) { $setIncomingShape(section_2, castTo($get_20((!edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)) , edge.sources), 0), 84)); $setOutgoingShape(section_2, castTo($get_20((!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets), 0), 84)); } } } function $transformEdges_2(this$static, jsonObjA){ var _function, _function_1, _idSave, _optJSONArray, _optJSONArray_1, _plus, _plus_1, jsonObj, node; jsonObj = jsonObjA; node = castTo($get_5($inverse(this$static.nodeJsonMap), jsonObj), 27); if (!node) { _idSave = $optString(jsonObj, 'id'); _plus = "Unable to find elk node for json object '" + _idSave; _plus_1 = _plus + "' Panic!"; throw toJs(new JsonImportException(_plus_1)); } _optJSONArray = $optJSONArray(jsonObj, 'edges'); _function = new JsonImporter$lambda$1$Type(this$static, node); $lambda$1_8(_function.$$outer_0, _function.node_1, _optJSONArray); _optJSONArray_1 = $optJSONArray(jsonObj, 'children'); _function_1 = new JsonImporter$lambda$2$Type(this$static); $lambda$2_5(_function_1.$$outer_0, _optJSONArray_1); } function $transformIndividualSpacings(jsonObjA, layoutData){ var _function, _hasProperty, _individualSpacings, _keysJsonObj, _not, individualSpacings, jsonIndividualSpacings, jsonObj, keys_0, opts; jsonObj = jsonObjA; jsonIndividualSpacings = $optJSONObject_0(jsonObj, 'individualSpacings'); if (jsonIndividualSpacings) { _hasProperty = $hasProperty_0(layoutData, ($clinit_CoreOptions() , SPACING_INDIVIDUAL_0)); _not = !_hasProperty; if (_not) { _individualSpacings = new IndividualSpacings; $setProperty_1(layoutData, SPACING_INDIVIDUAL_0, _individualSpacings); } individualSpacings = castTo($getProperty_0(layoutData, SPACING_INDIVIDUAL_0), 385); opts = jsonIndividualSpacings; _keysJsonObj = null; !!opts && (_keysJsonObj = (keys_0 = $computeKeys0(opts, initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, 0, 6, 1)) , new JSONObject$1(opts, keys_0))); if (_keysJsonObj) { _function = new JsonImporter$lambda$28$Type(opts, individualSpacings); $forEach_0(_keysJsonObj, _function); } } } function $transformLabels(this$static, jsonObjA, element){ var _function, _optJSONArray, _xblockexpression, jsonObj; _xblockexpression = null; jsonObj = jsonObjA; _optJSONArray = $optJSONArray(jsonObj, 'labels'); _function = new JsonImporter$lambda$29$Type(this$static, element); _xblockexpression = ($lambda$29_0(_function.$$outer_0, _function.element_1, _optJSONArray) , _optJSONArray); return _xblockexpression; } function $transformNode_0(this$static, jsonNode, parent_0){ var node, node_0, elkNode, jsonObj, _optJSONArray, _function; node = $register_4(this$static, (node_0 = ($clinit_ElkGraphFactory() , elkNode = new ElkNodeImpl , elkNode) , !!parent_0 && $setParent_2(node_0, parent_0) , node_0), jsonNode); $setIdentifier(node, $optString(jsonNode, 'id')); $transformProperties(jsonNode, node); $transformIndividualSpacings(jsonNode, node); $transformShapeLayout(jsonNode, node); _xblockexpression = null; jsonObj = jsonNode; _optJSONArray = $optJSONArray(jsonObj, 'ports'); _function = new JsonImporter$lambda$30$Type(this$static, node); $lambda$30(_function.$$outer_0, _function.parent_1, _optJSONArray); $transformLabels(this$static, jsonNode, node); $transformChildNodes(this$static, jsonNode, node); return node; } function $transformPrimitiveEdge(this$static, jsonObjA, parent_0){ var _asId, _asId_1, _elvis, _elvis_1, _id, _idSave, _idSave_1, _idSave_2, _id_1, _jsonObj, _jsonObj_1, _plus, _plus_1, _plus_2, _plus_3, _plus_4, _plus_5, _plus_6, _plus_7, _plus_8, _plus_9, _sources, _targets, _xblockexpression, edge, jsonObj, srcNode, srcPort, tgtNode, tgtPort; _xblockexpression = null; jsonObj = jsonObjA; edge = $register_2(this$static, createEdge(parent_0), jsonObj); $setIdentifier(edge, $optString(jsonObj, 'id')); srcNode = castTo($get_4(this$static.nodeIdMap, $asId($get_9(jsonObj, 'source'))), 27); _jsonObj = $get_9(jsonObj, 'sourcePort'); _asId = null; !!_jsonObj && (_asId = $asId(_jsonObj)); srcPort = castTo($get_4(this$static.portIdMap, _asId), 123); if (!srcNode) { _id = $getId(jsonObj); _plus = "An edge must have a source node (edge id: '" + _id; _plus_1 = _plus + "')."; throw toJs(new JsonImportException(_plus_1)); } if (!!srcPort && !equal($getParent_3(srcPort), srcNode)) { _idSave = $optString(jsonObj, 'id'); _plus_2 = "The source port of an edge must be a port of the edge's source node (edge id: '" + _idSave; _plus_3 = _plus_2 + "')."; throw toJs(new JsonImportException(_plus_3)); } _sources = (!edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)) , edge.sources); _elvis = null; srcPort?(_elvis = srcPort):(_elvis = srcNode); $add_21(_sources, _elvis); tgtNode = castTo($get_4(this$static.nodeIdMap, $asId($get_9(jsonObj, 'target'))), 27); _jsonObj_1 = $get_9(jsonObj, 'targetPort'); _asId_1 = null; !!_jsonObj_1 && (_asId_1 = $asId(_jsonObj_1)); tgtPort = castTo($get_4(this$static.portIdMap, _asId_1), 123); if (!tgtNode) { _id_1 = $getId(jsonObj); _plus_4 = "An edge must have a target node (edge id: '" + _id_1; _plus_5 = _plus_4 + "')."; throw toJs(new JsonImportException(_plus_5)); } if (!!tgtPort && !equal($getParent_3(tgtPort), tgtNode)) { _idSave_1 = $optString(jsonObj, 'id'); _plus_6 = "The target port of an edge must be a port of the edge's target node (edge id: '" + _idSave_1; _plus_7 = _plus_6 + "')."; throw toJs(new JsonImportException(_plus_7)); } _targets = (!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets); _elvis_1 = null; tgtPort?(_elvis_1 = tgtPort):(_elvis_1 = tgtNode); $add_21(_targets, _elvis_1); if ((!edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)) , edge.sources).size_0 == 0 || (!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets).size_0 == 0) { _idSave_2 = $optString(jsonObj, 'id'); _plus_8 = "An edge must have at least one source and one target (edge id: '" + _idSave_2; _plus_9 = _plus_8 + "')."; throw toJs(new JsonImportException(_plus_9)); } $transformProperties(jsonObj, edge); $transformPrimitiveEdgeLayout(jsonObj, edge); _xblockexpression = $transformLabels(this$static, jsonObj, edge); return _xblockexpression; } function $transformPrimitiveEdgeLayout(jsonObjA, edge){ var _function, _function_1, _function_2, _optJSONArray, _optJSONObject, _optJSONObject_1, _xblockexpression, _xblockexpression_1, _xifexpression, jsonObj, section; _xblockexpression = null; jsonObj = jsonObjA; _xifexpression = null; if ('sourcePoint' in jsonObj.jsObject || 'targetPoint' in jsonObj.jsObject || 'bendPoints' in jsonObj.jsObject) { _xblockexpression_1 = null; section = createEdgeSection(edge); _optJSONObject = $optJSONObject_0(jsonObj, 'sourcePoint'); _function = new JsonImporter$lambda$3$Type(section); $lambda$3_4(_function.section_1, _optJSONObject); _optJSONObject_1 = $optJSONObject_0(jsonObj, 'targetPoint'); _function_1 = new JsonImporter$lambda$6$Type(section); $lambda$6_0(_function_1.section_1, _optJSONObject_1); _optJSONArray = $optJSONArray(jsonObj, 'bendPoints'); _function_2 = new JsonImporter$lambda$9$Type(section); _xblockexpression_1 = ($lambda$9_1(_function_2.section_1, _optJSONArray) , _optJSONArray); _xifexpression = _xblockexpression_1; } _xblockexpression = _xifexpression; return _xblockexpression; } function $transformProperties(jsonObjA, layoutData){ var _function, _keysJsonObj, jsonObj, keys_0, layoutOptions, opts; jsonObj = jsonObjA; layoutOptions = $optJSONObject_0(jsonObj, 'layoutOptions'); !layoutOptions && (layoutOptions = $optJSONObject_0(jsonObj, 'properties')); if (layoutOptions) { opts = layoutOptions; _keysJsonObj = null; !!opts && (_keysJsonObj = (keys_0 = $computeKeys0(opts, initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, 0, 6, 1)) , new JSONObject$1(opts, keys_0))); if (_keysJsonObj) { _function = new JsonImporter$lambda$27$Type(opts, layoutData); $forEach_0(_keysJsonObj, _function); } } } function $transformShapeLayout(jsonObjA, shape_0){ var _function, _function_1, _function_2, _function_3, _optDouble, _optDouble_1, _optDouble_2, _optDouble_3, _xblockexpression, jsonObj; _xblockexpression = null; jsonObj = jsonObjA; _optDouble = $optDouble(jsonObj, 'x'); _function = new JsonImporter$lambda$31$Type(shape_0); $lambda$31(_function.shape_1, _optDouble); _optDouble_1 = $optDouble(jsonObj, 'y'); _function_1 = new JsonImporter$lambda$32$Type(shape_0); $lambda$32(_function_1.shape_1, _optDouble_1); _optDouble_2 = $optDouble(jsonObj, 'width'); _function_2 = new JsonImporter$lambda$33$Type(shape_0); $lambda$33(_function_2.shape_1, _optDouble_2); _optDouble_3 = $optDouble(jsonObj, 'height'); _function_3 = new JsonImporter$lambda$34$Type(shape_0); _xblockexpression = ($lambda$34(_function_3.shape_1, _optDouble_3) , _optDouble_3); return _xblockexpression; } function JsonImporter(){ this._jsonAdapter = new JsonAdapter; this.nodeIdMap = new HashBiMap; this.portIdMap = new HashBiMap; this.edgeIdMap = new HashMap; this.edgeSectionIdMap = new HashBiMap; this.nodeJsonMap = new HashBiMap; this.portJsonMap = new HashMap; this.edgeJsonMap = new HashMap; this.edgeSectionJsonMap = new HashMap; this.labelJsonMap = new HashMap; } defineClass(868, 1, {}, JsonImporter); var Lorg_eclipse_elk_graph_json_JsonImporter_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter', 868); function JsonImporter$lambda$0$Type($$outer_0, parent_1){ this.$$outer_0 = $$outer_0; this.parent_1 = parent_1; } defineClass(903, 1, {}, JsonImporter$lambda$0$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$0$Type', 903); function JsonImporter$lambda$1$Type($$outer_0, node_1){ this.$$outer_0 = $$outer_0; this.node_1 = node_1; } defineClass(904, 1, {}, JsonImporter$lambda$1$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$1$Type', 904); function JsonImporter$lambda$10$Type(section_1){ this.section_1 = section_1; } defineClass(912, 1, {}, JsonImporter$lambda$10$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$10$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$10$Type', 912); function JsonImporter$lambda$11$Type($$outer_0, edge_1){ this.$$outer_0 = $$outer_0; this.edge_1 = edge_1; } defineClass(914, 1, {}, JsonImporter$lambda$11$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$11$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$11$Type', 914); function JsonImporter$lambda$12$Type($$outer_0, edge_1){ this.$$outer_0 = $$outer_0; this.edge_1 = edge_1; } defineClass(915, 1, {}, JsonImporter$lambda$12$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$12$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$12$Type', 915); function JsonImporter$lambda$13$Type($$outer_0, edge_1, incomingSectionIdentifiers_2, outgoingSectionIdentifiers_3){ this.$$outer_0 = $$outer_0; this.edge_1 = edge_1; this.incomingSectionIdentifiers_2 = incomingSectionIdentifiers_2; this.outgoingSectionIdentifiers_3 = outgoingSectionIdentifiers_3; } defineClass(921, 1, {}, JsonImporter$lambda$13$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$13$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$13$Type', 921); function JsonImporter$lambda$14$Type($$outer_0, edge_1, incomingSectionIdentifiers_2, outgoingSectionIdentifiers_3){ this.$$outer_0 = $$outer_0; this.edge_1 = edge_1; this.incomingSectionIdentifiers_2 = incomingSectionIdentifiers_2; this.outgoingSectionIdentifiers_3 = outgoingSectionIdentifiers_3; } defineClass(920, 1, {}, JsonImporter$lambda$14$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$14$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$14$Type', 920); function JsonImporter$lambda$15$Type($$outer_0, elkSection_1){ this.$$outer_0 = $$outer_0; this.elkSection_1 = elkSection_1; } defineClass(916, 1, {}, JsonImporter$lambda$15$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$15$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$15$Type', 916); function JsonImporter$lambda$16$Type($$outer_0, elkSection_1){ this.$$outer_0 = $$outer_0; this.elkSection_1 = elkSection_1; } defineClass(917, 1, {}, JsonImporter$lambda$16$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$16$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$16$Type', 917); function JsonImporter$lambda$17$Type(incomingSectionIdentifiers_1, elkSection_2){ this.incomingSectionIdentifiers_1 = incomingSectionIdentifiers_1; this.elkSection_2 = elkSection_2; } defineClass(918, 1, {}, JsonImporter$lambda$17$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$17$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$17$Type', 918); function JsonImporter$lambda$18$Type(outgoingSectionIdentifiers_1, elkSection_2){ this.outgoingSectionIdentifiers_1 = outgoingSectionIdentifiers_1; this.elkSection_2 = elkSection_2; } defineClass(919, 1, {}, JsonImporter$lambda$18$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$18$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$18$Type', 919); function JsonImporter$lambda$19$Type(section_1){ this.section_1 = section_1; } defineClass(924, 1, {}, JsonImporter$lambda$19$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$19$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$19$Type', 924); function JsonImporter$lambda$2$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(905, 1, {}, JsonImporter$lambda$2$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$2$Type', 905); function JsonImporter$lambda$20$Type(section_0){ this.section_0 = section_0; } defineClass(922, 1, {}, JsonImporter$lambda$20$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$20$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$20$Type', 922); function JsonImporter$lambda$21$Type(section_0){ this.section_0 = section_0; } defineClass(923, 1, {}, JsonImporter$lambda$21$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$21$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$21$Type', 923); function JsonImporter$lambda$22$Type(section_1){ this.section_1 = section_1; } defineClass(927, 1, {}, JsonImporter$lambda$22$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$22$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$22$Type', 927); function JsonImporter$lambda$23$Type(section_0){ this.section_0 = section_0; } defineClass(925, 1, {}, JsonImporter$lambda$23$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$23$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$23$Type', 925); function JsonImporter$lambda$24$Type(section_0){ this.section_0 = section_0; } defineClass(926, 1, {}, JsonImporter$lambda$24$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$24$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$24$Type', 926); function JsonImporter$lambda$25$Type(section_1){ this.section_1 = section_1; } defineClass(929, 1, {}, JsonImporter$lambda$25$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$25$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$25$Type', 929); function JsonImporter$lambda$26$Type(section_1){ this.section_1 = section_1; } defineClass(928, 1, {}, JsonImporter$lambda$26$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$26$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$26$Type', 928); function JsonImporter$lambda$27$Type(opts_1, layoutData_2){ this.opts_1 = opts_1; this.layoutData_2 = layoutData_2; } defineClass(930, 1, $intern_19, JsonImporter$lambda$27$Type); _.accept = function accept_155(arg0){ $lambda$27(this.opts_1, this.layoutData_2, castToString(arg0)); } ; var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$27$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$27$Type', 930); function JsonImporter$lambda$28$Type(opts_1, individualSpacings_2){ this.opts_1 = opts_1; this.individualSpacings_2 = individualSpacings_2; } defineClass(931, 1, $intern_19, JsonImporter$lambda$28$Type); _.accept = function accept_156(arg0){ $lambda$28(this.opts_1, this.individualSpacings_2, castToString(arg0)); } ; var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$28$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$28$Type', 931); function JsonImporter$lambda$29$Type($$outer_0, element_1){ this.$$outer_0 = $$outer_0; this.element_1 = element_1; } defineClass(932, 1, {}, JsonImporter$lambda$29$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$29$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$29$Type', 932); function JsonImporter$lambda$3$Type(section_1){ this.section_1 = section_1; } defineClass(908, 1, {}, JsonImporter$lambda$3$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$3$Type', 908); function JsonImporter$lambda$30$Type($$outer_0, parent_1){ this.$$outer_0 = $$outer_0; this.parent_1 = parent_1; } defineClass(933, 1, {}, JsonImporter$lambda$30$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$30$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$30$Type', 933); function JsonImporter$lambda$31$Type(shape_1){ this.shape_1 = shape_1; } defineClass(934, 1, {}, JsonImporter$lambda$31$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$31$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$31$Type', 934); function JsonImporter$lambda$32$Type(shape_1){ this.shape_1 = shape_1; } defineClass(935, 1, {}, JsonImporter$lambda$32$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$32$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$32$Type', 935); function JsonImporter$lambda$33$Type(shape_1){ this.shape_1 = shape_1; } defineClass(936, 1, {}, JsonImporter$lambda$33$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$33$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$33$Type', 936); function JsonImporter$lambda$34$Type(shape_1){ this.shape_1 = shape_1; } defineClass(937, 1, {}, JsonImporter$lambda$34$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$34$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$34$Type', 937); function $apply_28(this$static, arg0){ $transferLayoutInt(this$static.$$outer_0, castTo(arg0, 58)); } function JsonImporter$lambda$35$Type($$outer_0){ this.$$outer_0 = $$outer_0; } defineClass(870, 1, {}, JsonImporter$lambda$35$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$35$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$35$Type', 870); function $apply_29(this$static, arg0, arg1){ $lambda$36(this$static.$$outer_0, this$static.edgeId_1, this$static.sections_2, castTo(arg0, 166), arg1); } function JsonImporter$lambda$36$Type($$outer_0, edgeId_1, sections_2){ this.$$outer_0 = $$outer_0; this.edgeId_1 = edgeId_1; this.sections_2 = sections_2; } defineClass(941, 1, {}, JsonImporter$lambda$36$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$36$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$36$Type', 941); function JsonImporter$lambda$37$Type(bendPoints_1){ this.bendPoints_1 = bendPoints_1; } defineClass(938, 1, $intern_19, JsonImporter$lambda$37$Type); _.accept = function accept_157(arg0){ $lambda$37(this.bendPoints_1, castTo(arg0, 377)); } ; var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$37$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$37$Type', 938); function JsonImporter$lambda$38$Type($$outer_0, incomingSections_1){ this.$$outer_0 = $$outer_0; this.incomingSections_1 = incomingSections_1; } defineClass(939, 1, $intern_19, JsonImporter$lambda$38$Type); _.accept = function accept_158(arg0){ $lambda$38(this.$$outer_0, this.incomingSections_1, castTo(arg0, 166)); } ; var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$38$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$38$Type', 939); function JsonImporter$lambda$39$Type($$outer_0, outgoingSections_1){ this.$$outer_0 = $$outer_0; this.outgoingSections_1 = outgoingSections_1; } defineClass(940, 1, $intern_19, JsonImporter$lambda$39$Type); _.accept = function accept_159(arg0){ $lambda$39(this.$$outer_0, this.outgoingSections_1, castTo(arg0, 166)); } ; var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$39$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$39$Type', 940); function JsonImporter$lambda$4$Type(section_0){ this.section_0 = section_0; } defineClass(906, 1, {}, JsonImporter$lambda$4$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$4$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$4$Type', 906); function JsonImporter$lambda$40$Type(jsonJPs_1){ this.jsonJPs_1 = jsonJPs_1; } defineClass(942, 1, $intern_19, JsonImporter$lambda$40$Type); _.accept = function accept_160(arg0){ $lambda$40(this.jsonJPs_1, castTo(arg0, 8)); } ; var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$40$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$40$Type', 942); function JsonImporter$lambda$5$Type(section_0){ this.section_0 = section_0; } defineClass(907, 1, {}, JsonImporter$lambda$5$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$5$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$5$Type', 907); function JsonImporter$lambda$6$Type(section_1){ this.section_1 = section_1; } defineClass(911, 1, {}, JsonImporter$lambda$6$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$6$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$6$Type', 911); function JsonImporter$lambda$7$Type(section_0){ this.section_0 = section_0; } defineClass(909, 1, {}, JsonImporter$lambda$7$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$7$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$7$Type', 909); function JsonImporter$lambda$8$Type(section_0){ this.section_0 = section_0; } defineClass(910, 1, {}, JsonImporter$lambda$8$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$8$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$8$Type', 910); function JsonImporter$lambda$9$Type(section_1){ this.section_1 = section_1; } defineClass(913, 1, {}, JsonImporter$lambda$9$Type); var Lorg_eclipse_elk_graph_json_JsonImporter$lambda$9$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonImporter/lambda$9$Type', 913); function _toJson(lad){ var _categoryId, _function, _function_1, _isNullOrEmpty, _isNullOrEmpty_1, _not, _not_1, _tripleNotEquals, jsonArr, jsonArr_1, jsonObj; jsonObj = createCommon(lad); _categoryId = lad.category; _tripleNotEquals = _categoryId != null; _tripleNotEquals && $addJsonObj_1(jsonObj, 'category', lad.category); _isNullOrEmpty = isNullOrEmpty(new AbstractMap$1(lad.knownOptions)); _not = !_isNullOrEmpty; if (_not) { jsonArr = new JSONArray; $put_5(jsonObj, 'knownOptions', jsonArr); _function = new JsonMetaDataConverter$lambda$0$Type(jsonArr); $forEach_0(new AbstractMap$1(lad.knownOptions), _function); } _isNullOrEmpty_1 = isNullOrEmpty(lad.supportedFeatures); _not_1 = !_isNullOrEmpty_1; if (_not_1) { jsonArr_1 = new JSONArray; $put_5(jsonObj, 'supportedFeatures', jsonArr_1); _function_1 = new JsonMetaDataConverter$lambda$1$Type(jsonArr_1); $forEach_0(lad.supportedFeatures, _function_1); } return jsonObj; } function _toJson_0(lcd){ var _function, _isNullOrEmpty, _not, jsonArr, jsonObj; jsonObj = createCommon(lcd); _isNullOrEmpty = isNullOrEmpty(lcd.layouters); _not = !_isNullOrEmpty; if (_not) { jsonArr = new JSONArray; $put_5(jsonObj, 'knownLayouters', jsonArr); _function = new JsonMetaDataConverter$lambda$2$Type(jsonArr); $forEach_0(lcd.layouters, _function); } return jsonObj; } function _toJson_1(lod){ var _function, _group, _isNullOrEmpty, _not, _tripleNotEquals, _tripleNotEquals_1, _type, jsonArr, jsonObj; jsonObj = createCommon(lod); _group = lod.group_0; _tripleNotEquals = _group != null; _tripleNotEquals && $addJsonObj_1(jsonObj, 'group', lod.group_0); _type = lod.type_0; _tripleNotEquals_1 = !!_type; _tripleNotEquals_1 && $addJsonObj_1(jsonObj, 'type', $toString_3(lod.type_0)); _isNullOrEmpty = isNullOrEmpty(lod.targets); _not = !_isNullOrEmpty; if (_not) { jsonArr = new JSONArray; $put_5(jsonObj, 'targets', jsonArr); _function = new JsonMetaDataConverter$lambda$3$Type(jsonArr); $forEach_0(lod.targets, _function); } return jsonObj; } function createCommon(data_0){ var _description, _id, _name, _tripleNotEquals, _tripleNotEquals_1, _tripleNotEquals_2, jsonObj; jsonObj = new JSONObject; _id = data_0.getId(); _tripleNotEquals = _id != null; _tripleNotEquals && $addJsonObj_1(jsonObj, 'id', data_0.getId()); _name = data_0.getName(); _tripleNotEquals_1 = _name != null; _tripleNotEquals_1 && $addJsonObj_1(jsonObj, 'name', data_0.getName()); _description = data_0.getDescription(); _tripleNotEquals_2 = _description != null; _tripleNotEquals_2 && $addJsonObj_1(jsonObj, 'description', data_0.getDescription()); return jsonObj; } function lambda$1_23(jsonArr_1_0, f_1){ $addJsonArr(jsonArr_1_0, new JSONString(f_1.name_0 != null?f_1.name_0:'' + f_1.ordinal)); } function lambda$2_16(jsonArr_0, l_1){ var _id, _tripleNotEquals; _id = l_1.id_0; _tripleNotEquals = _id != null; _tripleNotEquals && $addJsonArr(jsonArr_0, new JSONString(l_1.id_0)); } function lambda$3_11(jsonArr_0, t_1){ $addJsonArr(jsonArr_0, new JSONString(t_1.name_0 != null?t_1.name_0:'' + t_1.ordinal)); } function toJson(lad){ if (instanceOf(lad, 143)) { return _toJson(castTo(lad, 143)); } else if (instanceOf(lad, 233)) { return _toJson_0(castTo(lad, 233)); } else if (instanceOf(lad, 23)) { return _toJson_1(castTo(lad, 23)); } else { throw toJs(new IllegalArgumentException_0('Unhandled parameter types: ' + $toString_2(new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Object_2_classLit, 1), $intern_2, 1, 5, [lad]))))); } } function JsonMetaDataConverter$lambda$0$Type(jsonArr_0){ this.jsonArr_0 = jsonArr_0; } defineClass(961, 1, $intern_19, JsonMetaDataConverter$lambda$0$Type); _.accept = function accept_161(arg0){ $addJsonArr(this.jsonArr_0, new JSONString(castToString(arg0))); } ; var Lorg_eclipse_elk_graph_json_JsonMetaDataConverter$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonMetaDataConverter/lambda$0$Type', 961); function JsonMetaDataConverter$lambda$1$Type(jsonArr_1_0){ this.jsonArr_1_0 = jsonArr_1_0; } defineClass(962, 1, $intern_19, JsonMetaDataConverter$lambda$1$Type); _.accept = function accept_162(arg0){ lambda$1_23(this.jsonArr_1_0, castTo(arg0, 245)); } ; var Lorg_eclipse_elk_graph_json_JsonMetaDataConverter$lambda$1$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonMetaDataConverter/lambda$1$Type', 962); function JsonMetaDataConverter$lambda$2$Type(jsonArr_0){ this.jsonArr_0 = jsonArr_0; } defineClass(963, 1, $intern_19, JsonMetaDataConverter$lambda$2$Type); _.accept = function accept_163(arg0){ lambda$2_16(this.jsonArr_0, castTo(arg0, 143)); } ; var Lorg_eclipse_elk_graph_json_JsonMetaDataConverter$lambda$2$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonMetaDataConverter/lambda$2$Type', 963); function JsonMetaDataConverter$lambda$3$Type(jsonArr_0){ this.jsonArr_0 = jsonArr_0; } defineClass(964, 1, $intern_19, JsonMetaDataConverter$lambda$3$Type); _.accept = function accept_164(arg0){ lambda$3_11(this.jsonArr_0, castTo(arg0, 170)); } ; var Lorg_eclipse_elk_graph_json_JsonMetaDataConverter$lambda$3$Type_2_classLit = createForClass('org.eclipse.elk.graph.json', 'JsonMetaDataConverter/lambda$3$Type', 964); function $clinit_GraphFeature(){ $clinit_GraphFeature = emptyMethod; SELF_LOOPS_0 = new GraphFeature('SELF_LOOPS', 0); INSIDE_SELF_LOOPS = new GraphFeature('INSIDE_SELF_LOOPS', 1); MULTI_EDGES = new GraphFeature('MULTI_EDGES', 2); EDGE_LABELS = new GraphFeature('EDGE_LABELS', 3); PORTS_1 = new GraphFeature('PORTS', 4); COMPOUND = new GraphFeature('COMPOUND', 5); CLUSTERS = new GraphFeature('CLUSTERS', 6); DISCONNECTED = new GraphFeature('DISCONNECTED', 7); } function GraphFeature(enum$name, enum$ordinal){ Enum.call(this, enum$name, enum$ordinal); } function valueOf_117(name_0){ $clinit_GraphFeature(); return valueOf(($clinit_GraphFeature$Map() , $MAP_107), name_0); } function values_125(){ $clinit_GraphFeature(); return stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_graph_properties_GraphFeature_2_classLit, 1), $intern_37, 245, 0, [SELF_LOOPS_0, INSIDE_SELF_LOOPS, MULTI_EDGES, EDGE_LABELS, PORTS_1, COMPOUND, CLUSTERS, DISCONNECTED]); } defineClass(245, 22, {3:1, 34:1, 22:1, 245:1}, GraphFeature); var CLUSTERS, COMPOUND, DISCONNECTED, EDGE_LABELS, INSIDE_SELF_LOOPS, MULTI_EDGES, PORTS_1, SELF_LOOPS_0; var Lorg_eclipse_elk_graph_properties_GraphFeature_2_classLit = createForEnum('org.eclipse.elk.graph.properties', 'GraphFeature', 245, Ljava_lang_Enum_2_classLit, values_125, valueOf_117); function $clinit_GraphFeature$Map(){ $clinit_GraphFeature$Map = emptyMethod; $MAP_107 = createValueOfMap(($clinit_GraphFeature() , stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_graph_properties_GraphFeature_2_classLit, 1), $intern_37, 245, 0, [SELF_LOOPS_0, INSIDE_SELF_LOOPS, MULTI_EDGES, EDGE_LABELS, PORTS_1, COMPOUND, CLUSTERS, DISCONNECTED]))); } var $MAP_107; function $compareTo_21(this$static, other){ return $compareTo_9(this$static.id_0, other.getId()); } function $equals_10(this$static, obj){ return instanceOf(obj, 149) && $equals_5(this$static.id_0, castTo(obj, 149).getId()); } function $getDefault(this$static){ var clone; if (instanceOf(this$static.defaultValue, 4)) { clone = clone_11(this$static.defaultValue); if (clone == null) { throw toJs(new IllegalStateException_0("Couldn't clone property '" + this$static.id_0 + "'. " + 'Make sure its type is registered with the ' + ($ensureNamesAreInitialized(Lorg_eclipse_elk_graph_util_ElkReflect_2_classLit) , Lorg_eclipse_elk_graph_util_ElkReflect_2_classLit.simpleName) + ' utility class.')); } return clone; } else { return this$static.defaultValue; } } function Property(theid){ this.id_0 = theid; } function Property_0(theid, thedefaultValue){ Property.call(this, theid); this.defaultValue = thedefaultValue; } function Property_1(theid, thedefaultValue){ Property_0.call(this, theid, thedefaultValue); } function Property_2(other, thedefaultValue){ Property_0.call(this, other.id_0, thedefaultValue); } defineClass(11, 1, {34:1, 149:1}, Property, Property_0, Property_1, Property_2); _.compareTo_0 = function compareTo_22(other){ return $compareTo_21(this, castTo(other, 149)); } ; _.equals_0 = function equals_212(obj){ return $equals_10(this, obj); } ; _.getDefault = function getDefault_0(){ return $getDefault(this); } ; _.getId = function getId_2(){ return this.id_0; } ; _.hashCode_1 = function hashCode_75(){ return $hashCode_2(this.id_0); } ; _.toString_0 = function toString_135(){ return this.id_0; } ; var Lorg_eclipse_elk_graph_properties_Property_2_classLit = createForClass('org.eclipse.elk.graph.properties', 'Property', 11); function $compare_29(this$static, ph1, ph2){ var p1, p2; p1 = castTo(ph1.getProperty(this$static.property), 34); p2 = castTo(ph2.getProperty(this$static.property), 34); return p1 != null && p2 != null?compareTo_Ljava_lang_Object__I__devirtual$(p1, p2):p1 != null?-1:p2 != null?1:0; } function PropertyHolderComparator(property){ this.property = property; } defineClass(671, 1, $intern_88, PropertyHolderComparator); _.compare_1 = function compare_114(ph1, ph2){ return $compare_29(this, castTo(ph1, 96), castTo(ph2, 96)); } ; _.equals_0 = function equals_213(other){ return this === other; } ; _.reversed = function reversed_106(){ return new Comparators$ReversedComparator(this); } ; var Lorg_eclipse_elk_graph_properties_PropertyHolderComparator_2_classLit = createForClass('org.eclipse.elk.graph.properties', 'PropertyHolderComparator', 671); function allIncomingEdges(node){ var incomingEdgeIterables, port, port$iterator; incomingEdgeIterables = newArrayListWithCapacity(1 + (!node.ports && (node.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, node, 9, 9)) , node.ports).size_0); $add_3(incomingEdgeIterables, (!node.incomingEdges && (node.incomingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, node, 8, 5)) , node.incomingEdges)); for (port$iterator = new AbstractEList$EIterator((!node.ports && (node.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, node, 9, 9)) , node.ports)); port$iterator.cursor != port$iterator.this$01_2.size_1();) { port = castTo($doNext(port$iterator), 123); $add_3(incomingEdgeIterables, (!port.incomingEdges && (port.incomingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, port, 8, 5)) , port.incomingEdges)); } return checkNotNull(incomingEdgeIterables) , new FluentIterable$2(incomingEdgeIterables); } function allOutgoingEdges(node){ var outgoingEdgeIterables, port, port$iterator; outgoingEdgeIterables = newArrayListWithCapacity(1 + (!node.ports && (node.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, node, 9, 9)) , node.ports).size_0); $add_3(outgoingEdgeIterables, (!node.outgoingEdges && (node.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, node, 7, 4)) , node.outgoingEdges)); for (port$iterator = new AbstractEList$EIterator((!node.ports && (node.ports = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkPort_2_classLit, node, 9, 9)) , node.ports)); port$iterator.cursor != port$iterator.this$01_2.size_1();) { port = castTo($doNext(port$iterator), 123); $add_3(outgoingEdgeIterables, (!port.outgoingEdges && (port.outgoingEdges = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkEdge_2_classLit, port, 7, 4)) , port.outgoingEdges)); } return checkNotNull(outgoingEdgeIterables) , new FluentIterable$2(outgoingEdgeIterables); } function connectableShapeToNode(connectableShape){ if (instanceOf(connectableShape, 207)) { return castTo(connectableShape, 27); } else if (instanceOf(connectableShape, 193)) { return $getParent_3(castTo(connectableShape, 123)); } else if (!connectableShape) { throw toJs(new NullPointerException_0('connectableShape cannot be null')); } else { throw toJs(new UnsupportedOperationException_0('Only support nodes and ports.')); } } function connectableShapeToPort(connectableShape){ if (instanceOf(connectableShape, 193)) { return castTo(connectableShape, 123); } else if (!connectableShape) { throw toJs(new NullPointerException_0('connectableShape cannot be null')); } else { return null; } } function createBendPoint(edgeSection, x_0, y_0){ var bendPoint, elkBendPoint; bendPoint = ($clinit_ElkGraphFactory() , elkBendPoint = new ElkBendPointImpl , elkBendPoint); $setX_1(bendPoint, x_0); $setY_2(bendPoint, y_0); !!edgeSection && $add_21((!edgeSection.bendPoints && (edgeSection.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, edgeSection, 5)) , edgeSection.bendPoints), bendPoint); return bendPoint; } function createEdge(containingNode){ var edge, elkEdge; edge = ($clinit_ElkGraphFactory() , elkEdge = new ElkEdgeImpl , elkEdge); !!containingNode && $setContainingNode(edge, containingNode); return edge; } function createEdgeSection(edge){ var elkEdgeSection, section; section = ($clinit_ElkGraphFactory() , elkEdgeSection = new ElkEdgeSectionImpl , elkEdgeSection); !!edge && $add_21((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections), section); return section; } function createLabel(text_0, parent_0){ var label_0, label_1, elkLabel; label_0 = (label_1 = ($clinit_ElkGraphFactory() , elkLabel = new ElkLabelImpl , elkLabel) , !!parent_0 && $setParent_1(label_1, parent_0) , label_1); $setText(label_0, text_0); return label_0; } function findBestEdgeContainment(edge){ var commonAncestor, incidentNode, incidentShapes, sourceNode, targetNode; requireNonNull_0(edge, 'edge cannot be null'); switch ((!edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)) , edge.sources).size_0 + (!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets).size_0) { case 0: throw toJs(new IllegalArgumentException_0('The edge must have at least one source or target.')); case 1: return (!edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)) , edge.sources).size_0 == 0?$getParent_2(connectableShapeToNode(castTo($get_20((!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets), 0), 84))):$getParent_2(connectableShapeToNode(castTo($get_20((!edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)) , edge.sources), 0), 84))); } if ((!edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)) , edge.sources).size_0 == 1 && (!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets).size_0 == 1) { sourceNode = connectableShapeToNode(castTo($get_20((!edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)) , edge.sources), 0), 84)); targetNode = connectableShapeToNode(castTo($get_20((!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets), 0), 84)); if ($getParent_2(sourceNode) == $getParent_2(targetNode)) { return $getParent_2(sourceNode); } else if (sourceNode == $getParent_2(targetNode)) { return sourceNode; } else if (targetNode == $getParent_2(sourceNode)) { return targetNode; } } incidentShapes = $iterator(concatNoDefensiveCopy(stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_Iterable_2_classLit, 1), $intern_2, 20, 0, [(!edge.sources && (edge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 4, 7)) , edge.sources), (!edge.targets && (edge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, edge, 5, 8)) , edge.targets)]))); commonAncestor = connectableShapeToNode(castTo($next_0(incidentShapes), 84)); while ($hasNext_1(incidentShapes)) { incidentNode = connectableShapeToNode(castTo($next_0(incidentShapes), 84)); if (incidentNode != commonAncestor && !isDescendant_0(incidentNode, commonAncestor)) { if ($getParent_2(incidentNode) == $getParent_2(commonAncestor)) { commonAncestor = $getParent_2(incidentNode); } else { commonAncestor = findLowestCommonAncestor(commonAncestor, incidentNode); if (!commonAncestor) { return null; } } } } return commonAncestor; } function findLowestCommonAncestor(node1, node2){ var ancestor1, ancestor2, ancestors1, ancestors2, commonAncestor, iterator1, iterator2; ancestors1 = newArrayList_0(new ElkGraphUtil$AncestorIterator(node1)); iterator1 = new AbstractList$ListIteratorImpl(ancestors1, ancestors1.array.length); ancestors2 = newArrayList_0(new ElkGraphUtil$AncestorIterator(node2)); iterator2 = new AbstractList$ListIteratorImpl(ancestors2, ancestors2.array.length); commonAncestor = null; while (iterator1.i > 0 && iterator2.i > 0) { ancestor1 = (checkCriticalElement(iterator1.i > 0) , castTo(iterator1.this$01.get_0(iterator1.last = --iterator1.i), 27)); ancestor2 = (checkCriticalElement(iterator2.i > 0) , castTo(iterator2.this$01.get_0(iterator2.last = --iterator2.i), 27)); if (ancestor1 == ancestor2) { commonAncestor = ancestor1; } else { break; } } return commonAncestor; } function firstEdgeSection(edge, resetSection, removeOtherSections){ var section, sections; if ((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections).size_0 == 0) { return createEdgeSection(edge); } else { section = castTo($get_20((!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections), 0), 166); if (resetSection) { $clear_13((!section.bendPoints && (section.bendPoints = new EObjectContainmentEList(Lorg_eclipse_elk_graph_ElkBendPoint_2_classLit, section, 5)) , section.bendPoints)); $setStartX(section, 0); $setStartY(section, 0); $setEndX(section, 0); $setEndY(section, 0); } if (removeOtherSections) { sections = (!edge.sections && (edge.sections = new EObjectContainmentWithInverseEList(Lorg_eclipse_elk_graph_ElkEdgeSection_2_classLit, edge, 6, 6)) , edge.sections); while (sections.size_0 > 1) { $remove_35(sections, sections.size_0 - 1); } } return section; } } function getSourceNode(simpleEdge){ if ((!simpleEdge.sources && (simpleEdge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, simpleEdge, 4, 7)) , simpleEdge.sources).size_0 != 1 || (!simpleEdge.targets && (simpleEdge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, simpleEdge, 5, 8)) , simpleEdge.targets).size_0 != 1) { throw toJs(new IllegalArgumentException_0("Passed edge is not 'simple'.")); } return connectableShapeToNode(castTo($get_20((!simpleEdge.sources && (simpleEdge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, simpleEdge, 4, 7)) , simpleEdge.sources), 0), 84)); } function getSourcePort(simpleEdge){ if ((!simpleEdge.sources && (simpleEdge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, simpleEdge, 4, 7)) , simpleEdge.sources).size_0 != 1 || (!simpleEdge.targets && (simpleEdge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, simpleEdge, 5, 8)) , simpleEdge.targets).size_0 != 1) { throw toJs(new IllegalArgumentException_0("Passed edge is not 'simple'.")); } return connectableShapeToPort(castTo($get_20((!simpleEdge.sources && (simpleEdge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, simpleEdge, 4, 7)) , simpleEdge.sources), 0), 84)); } function getTargetNode_0(simpleEdge){ if ((!simpleEdge.sources && (simpleEdge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, simpleEdge, 4, 7)) , simpleEdge.sources).size_0 != 1 || (!simpleEdge.targets && (simpleEdge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, simpleEdge, 5, 8)) , simpleEdge.targets).size_0 != 1) { throw toJs(new IllegalArgumentException_0("Passed edge is not 'simple'.")); } return connectableShapeToNode(castTo($get_20((!simpleEdge.targets && (simpleEdge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, simpleEdge, 5, 8)) , simpleEdge.targets), 0), 84)); } function getTargetPort(simpleEdge){ if ((!simpleEdge.sources && (simpleEdge.sources = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, simpleEdge, 4, 7)) , simpleEdge.sources).size_0 != 1 || (!simpleEdge.targets && (simpleEdge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, simpleEdge, 5, 8)) , simpleEdge.targets).size_0 != 1) { throw toJs(new IllegalArgumentException_0("Passed edge is not 'simple'.")); } return connectableShapeToPort(castTo($get_20((!simpleEdge.targets && (simpleEdge.targets = new EObjectWithInverseResolvingEList$ManyInverse(Lorg_eclipse_elk_graph_ElkConnectableShape_2_classLit, simpleEdge, 5, 8)) , simpleEdge.targets), 0), 84)); } function isDescendant_0(child, ancestor){ var current; current = child; while ($getParent_2(current)) { current = $getParent_2(current); if (current == ancestor) { return true; } } return false; } function updateContainment(edge){ requireNonNull_0(edge, 'edge cannot be null'); $setContainingNode(edge, findBestEdgeContainment(edge)); } function $next_12(this$static){ var next; if (!this$static.nextNode) { throw toJs(new NoSuchElementException_0); } next = this$static.nextNode; this$static.nextNode = $getParent_2(this$static.nextNode); return next; } function ElkGraphUtil$AncestorIterator(startNode){ this.nextNode = startNode; } defineClass(709, 1, $intern_6, ElkGraphUtil$AncestorIterator); _.forEachRemaining = function forEachRemaining_52(consumer){ $forEachRemaining(this, consumer); } ; _.next_1 = function next_42(){ return $next_12(this); } ; _.remove = function remove_98(){ $remove_21(); } ; _.hasNext_0 = function hasNext_41(){ return !!this.nextNode; } ; var Lorg_eclipse_elk_graph_util_ElkGraphUtil$AncestorIterator_2_classLit = createForClass('org.eclipse.elk.graph.util', 'ElkGraphUtil/AncestorIterator', 709); var Lorg_eclipse_emf_common_util_EList_2_classLit = createForInterface('org.eclipse.emf.common.util', 'EList'); function $add_20(this$static, index_0, object){ var size_0; size_0 = this$static.size_1(); if (index_0 > size_0) throw toJs(new AbstractEList$BasicIndexOutOfBoundsException(index_0, size_0)); if (this$static.isUnique() && this$static.contains(object)) { throw toJs(new IllegalArgumentException_0("The 'no duplicates' constraint is violated")); } this$static.addUnique(index_0, object); } function $add_21(this$static, object){ if (this$static.isUnique() && this$static.contains(object)) { return false; } else { this$static.addUnique_0(object); return true; } } function $addAll_8(this$static, index_0, collection){ var size_0; size_0 = this$static.size_1(); if (index_0 > size_0) throw toJs(new AbstractEList$BasicIndexOutOfBoundsException(index_0, size_0)); this$static.isUnique() && (collection = $getNonDuplicates(this$static, collection)); return this$static.addAllUnique(index_0, collection); } function $addAll_9(this$static, collection){ this$static.isUnique() && (collection = $getNonDuplicates(this$static, collection)); return this$static.addAllUnique_0(collection); } function $basicListIterator(this$static, index_0){ var size_0; size_0 = this$static.size_1(); if (index_0 < 0 || index_0 > size_0) throw toJs(new AbstractEList$BasicIndexOutOfBoundsException(index_0, size_0)); return new AbstractEList$NonResolvingEListIterator_0(this$static, index_0); } function $didClear(this$static, size_0, oldObjects){ var i, object; if (oldObjects != null) { for (i = 0; i < size_0; ++i) { object = oldObjects[i]; this$static.didRemove(i, object); } } } function $equals_11(this$static, object){ var i, list, o1, o2, objects, size_0; if (maskUndefined(object) === maskUndefined(this$static)) { return true; } if (!instanceOf(object, 15)) { return false; } list = castTo(object, 15); size_0 = this$static.size_1(); if (list.size_1() != size_0) { return false; } objects = list.iterator_0(); if (this$static.useEquals()) { for (i = 0; i < size_0; ++i) { o1 = this$static.primitiveGet(i); o2 = objects.next_1(); if (o1 == null?o2 != null:!equals_Ljava_lang_Object__Z__devirtual$(o1, o2)) { return false; } } } else { for (i = 0; i < size_0; ++i) { o1 = this$static.primitiveGet(i); o2 = objects.next_1(); if (maskUndefined(o1) !== maskUndefined(o2)) { return false; } } } return true; } function $getDuplicates(this$static, collection){ var filteredResult, object, object$iterator; if (collection.isEmpty()) { return $clinit_ECollections() , $clinit_ECollections() , EMPTY_ELIST; } else { filteredResult = new AbstractEList$1(this$static, collection.size_1()); for (object$iterator = new AbstractEList$EIterator(this$static); object$iterator.cursor != object$iterator.this$01_2.size_1();) { object = $doNext(object$iterator); collection.contains(object) && $add_21(filteredResult, object); } return filteredResult; } } function $getNonDuplicates(this$static, collection){ var result; result = new LinkedHashSet_1(collection); $removeAll_1(result, this$static); return new ArrayList_1(result); } function $hashCode_4(this$static){ var hashCode, i, object, size_0; hashCode = 1; for (i = 0 , size_0 = this$static.size_1(); i < size_0; ++i) { object = this$static.primitiveGet(i); hashCode = 31 * hashCode + (object == null?0:hashCode__I__devirtual$(object)); } return hashCode; } function $remove_32(this$static, object){ var index_0; index_0 = this$static.indexOf_0(object); if (index_0 >= 0) { this$static.remove_2(index_0); return true; } else { return false; } } function $set_10(this$static, index_0, object){ var currentIndex, size_0; size_0 = this$static.size_1(); if (index_0 >= size_0) throw toJs(new AbstractEList$BasicIndexOutOfBoundsException(index_0, size_0)); if (this$static.isUnique()) { currentIndex = this$static.indexOf_0(object); if (currentIndex >= 0 && currentIndex != index_0) { throw toJs(new IllegalArgumentException_0("The 'no duplicates' constraint is violated")); } } return this$static.setUnique(index_0, object); } function $toString_25(this$static){ var i, size_0, stringBuffer; stringBuffer = new StringBuffer; stringBuffer.string += '['; for (i = 0 , size_0 = this$static.size_1(); i < size_0;) { $append_3(stringBuffer, valueOf_6(this$static.primitiveGet(i))); ++i < size_0 && (stringBuffer.string += ', ' , stringBuffer); } stringBuffer.string += ']'; return stringBuffer.string; } function $validate(this$static, object){ if (!this$static.canContainNull() && object == null) { throw toJs(new IllegalArgumentException_0("The 'no null' constraint is violated")); } return object; } defineClass(70, 56, {20:1, 31:1, 56:1, 16:1, 15:1, 70:1, 61:1}); _.add_3 = function add_46(index_0, object){ $add_20(this, index_0, object); } ; _.add_2 = function add_47(object){ return $add_21(this, object); } ; _.addAll_0 = function addAll_24(index_0, collection){ return $addAll_8(this, index_0, collection); } ; _.addAll = function addAll_25(collection){ return $addAll_9(this, collection); } ; _.basicIterator = function basicIterator(){ return new AbstractEList$NonResolvingEIterator(this); } ; _.basicListIterator = function basicListIterator(){ return new AbstractEList$NonResolvingEListIterator(this); } ; _.basicListIterator_0 = function basicListIterator_0(index_0){ return $basicListIterator(this, index_0); } ; _.canContainNull = function canContainNull(){ return true; } ; _.didAdd = function didAdd(index_0, newObject){ } ; _.didChange = function didChange(){ } ; _.didClear = function didClear(size_0, oldObjects){ $didClear(this, size_0, oldObjects); } ; _.didMove = function didMove(index_0, movedObject, oldIndex){ } ; _.didRemove = function didRemove(index_0, oldObject){ } ; _.didSet = function didSet(index_0, newObject, oldObject){ } ; _.equals_0 = function equals_214(object){ return $equals_11(this, object); } ; _.hashCode_1 = function hashCode_76(){ return $hashCode_4(this); } ; _.isUnique = function isUnique_0(){ return false; } ; _.iterator_0 = function iterator_79(){ return new AbstractEList$EIterator(this); } ; _.listIterator_0 = function listIterator_17(){ return new AbstractEList$EListIterator(this); } ; _.listIterator_1 = function listIterator_18(index_0){ var size_0; size_0 = this.size_1(); if (index_0 < 0 || index_0 > size_0) throw toJs(new AbstractEList$BasicIndexOutOfBoundsException(index_0, size_0)); return new AbstractEList$EListIterator_0(this, index_0); } ; _.move_0 = function move_0(index_0, object){ this.move(index_0, this.indexOf_0(object)); } ; _.remove_1 = function remove_99(object){ return $remove_32(this, object); } ; _.resolve = function resolve_0(index_0, object){ return object; } ; _.set_2 = function set_21(index_0, object){ return $set_10(this, index_0, object); } ; _.toString_0 = function toString_136(){ return $toString_25(this); } ; _.useEquals = function useEquals(){ return true; } ; _.validate = function validate(index_0, object){ return $validate(this, object); } ; var Lorg_eclipse_emf_common_util_AbstractEList_2_classLit = createForClass('org.eclipse.emf.common.util', 'AbstractEList', 70); function $addAllUnique(this$static, index_0, collection){ var growth, i, object, objects, shifted; growth = collection.size_1(); this$static.grow(this$static.size_0 + growth); shifted = this$static.size_0 - index_0; shifted > 0 && arraycopy(this$static.data_0, index_0, this$static.data_0, index_0 + growth, shifted); objects = collection.iterator_0(); this$static.size_0 += growth; for (i = 0; i < growth; ++i) { object = objects.next_1(); $assign(this$static, index_0, this$static.validate(index_0, object)); this$static.didAdd(index_0, object); this$static.didChange(); ++index_0; } return growth != 0; } function $addAllUnique_0(this$static, collection){ var growth, i, object, objects, oldSize; growth = collection.size_1(); this$static.grow(this$static.size_0 + growth); objects = collection.iterator_0(); oldSize = this$static.size_0; this$static.size_0 += growth; for (i = oldSize; i < this$static.size_0; ++i) { object = objects.next_1(); $assign(this$static, i, this$static.validate(i, object)); this$static.didAdd(i, object); this$static.didChange(); } return growth != 0; } function $addUnique(this$static, index_0, object){ var validatedObject; this$static.grow(this$static.size_0 + 1); validatedObject = this$static.validate(index_0, object); index_0 != this$static.size_0 && arraycopy(this$static.data_0, index_0, this$static.data_0, index_0 + 1, this$static.size_0 - index_0); setCheck(this$static.data_0, index_0, validatedObject); ++this$static.size_0; this$static.didAdd(index_0, object); this$static.didChange(); } function $addUnique_0(this$static, object){ this$static.grow(this$static.size_0 + 1); $assign(this$static, this$static.size_0, this$static.validate(this$static.size_0, object)); this$static.didAdd(this$static.size_0++, object); this$static.didChange(); } function $assign(this$static, index_0, object){ setCheck(this$static.data_0, index_0, object); return object; } function $basicGet(this$static, index_0){ if (this$static.data_0 == null || index_0 >= this$static.size_0) throw toJs(new BasicEList$BasicIndexOutOfBoundsException(index_0, this$static.size_0)); return this$static.data_0[index_0]; } function $clear_11(this$static){ var oldData, oldSize; ++this$static.modCount; oldData = this$static.data_0; oldSize = this$static.size_0; this$static.data_0 = null; this$static.size_0 = 0; this$static.didClear(oldSize, oldData); this$static.didChange(); } function $contains_10(this$static, object){ var i; if (this$static.useEquals() && object != null) { for (i = 0; i < this$static.size_0; ++i) { if (equals_Ljava_lang_Object__Z__devirtual$(object, this$static.data_0[i])) { return true; } } } else { for (i = 0; i < this$static.size_0; ++i) { if (maskUndefined(this$static.data_0[i]) === maskUndefined(object)) { return true; } } } return false; } function $get_20(this$static, index_0){ if (this$static.data_0 == null || index_0 >= this$static.size_0) throw toJs(new BasicEList$BasicIndexOutOfBoundsException(index_0, this$static.size_0)); return this$static.resolve(index_0, this$static.data_0[index_0]); } function $indexOf_4(this$static, object){ var i; if (this$static.useEquals() && object != null) { for (i = 0; i < this$static.size_0; ++i) { if (equals_Ljava_lang_Object__Z__devirtual$(object, this$static.data_0[i])) { return i; } } } else { for (i = 0; i < this$static.size_0; ++i) { if (maskUndefined(this$static.data_0[i]) === maskUndefined(object)) { return i; } } } return -1; } function $move(this$static, targetIndex, sourceIndex){ var object; ++this$static.modCount; if (targetIndex >= this$static.size_0) throw toJs(new IndexOutOfBoundsException_0('targetIndex=' + targetIndex + ', size=' + this$static.size_0)); if (sourceIndex >= this$static.size_0) throw toJs(new IndexOutOfBoundsException_0('sourceIndex=' + sourceIndex + ', size=' + this$static.size_0)); object = this$static.data_0[sourceIndex]; if (targetIndex != sourceIndex) { targetIndex < sourceIndex?arraycopy(this$static.data_0, targetIndex, this$static.data_0, targetIndex + 1, sourceIndex - targetIndex):arraycopy(this$static.data_0, sourceIndex + 1, this$static.data_0, sourceIndex, targetIndex - sourceIndex); setCheck(this$static.data_0, targetIndex, object); this$static.didMove(targetIndex, object, sourceIndex); this$static.didChange(); } return object; } function $remove_33(this$static, index_0){ var oldObject, shifted; if (index_0 >= this$static.size_0) throw toJs(new BasicEList$BasicIndexOutOfBoundsException(index_0, this$static.size_0)); ++this$static.modCount; oldObject = this$static.data_0[index_0]; shifted = this$static.size_0 - index_0 - 1; shifted > 0 && arraycopy(this$static.data_0, index_0 + 1, this$static.data_0, index_0, shifted); setCheck(this$static.data_0, --this$static.size_0, null); this$static.didRemove(index_0, oldObject); this$static.didChange(); return oldObject; } function $setUnique(this$static, index_0, object){ var oldObject; oldObject = this$static.data_0[index_0]; $assign(this$static, index_0, this$static.validate(index_0, object)); this$static.didSet(index_0, object, oldObject); this$static.didChange(); return oldObject; } function $shrink_0(this$static){ var oldData; ++this$static.modCount; if (this$static.size_0 == 0) { this$static.data_0 = null; } else if (this$static.size_0 < this$static.data_0.length) { oldData = this$static.data_0; this$static.data_0 = this$static.newData(this$static.size_0); arraycopy(oldData, 0, this$static.data_0, 0, this$static.size_0); } } function $toArray_8(this$static){ var result; result = this$static.newData(this$static.size_0); this$static.size_0 > 0 && arraycopy(this$static.data_0, 0, result, 0, this$static.size_0); return result; } function $toArray_9(this$static, array){ var newArray; if (this$static.size_0 > 0) { if (array.length < this$static.size_0) { newArray = newInstance_11(getClass__Ljava_lang_Class___devirtual$(array).componentType, this$static.size_0); array = newArray; } arraycopy(this$static.data_0, 0, array, 0, this$static.size_0); } array.length > this$static.size_0 && setCheck(array, this$static.size_0, null); return array; } function BasicEList(){ } function BasicEList_0(initialCapacity){ if (initialCapacity < 0) { throw toJs(new IllegalArgumentException_0('Illegal Capacity: ' + initialCapacity)); } this.data_0 = this.newData(initialCapacity); } function BasicEList_1(collection){ this.size_0 = collection.size_1(); if (this.size_0 > 0) { this.data_0 = this.newData(this.size_0 + (this.size_0 / 8 | 0) + 1); collection.toArray_0(this.data_0); } } defineClass(66, 70, $intern_141, BasicEList, BasicEList_0, BasicEList_1); _.addAllUnique = function addAllUnique(index_0, collection){ return $addAllUnique(this, index_0, collection); } ; _.addAllUnique_0 = function addAllUnique_0(collection){ return $addAllUnique_0(this, collection); } ; _.addUnique = function addUnique(index_0, object){ $addUnique(this, index_0, object); } ; _.addUnique_0 = function addUnique_0(object){ $addUnique_0(this, object); } ; _.basicGet = function basicGet(index_0){ return $basicGet(this, index_0); } ; _.clear_0 = function clear_52(){ $clear_11(this); } ; _.contains = function contains_52(object){ return $contains_10(this, object); } ; _.get_0 = function get_52(index_0){ return $get_20(this, index_0); } ; _.grow = function grow(minimumCapacity){ var newCapacity, oldCapacity, oldData; ++this.modCount; oldCapacity = this.data_0 == null?0:this.data_0.length; if (minimumCapacity > oldCapacity) { oldData = this.data_0; newCapacity = oldCapacity + (oldCapacity / 2 | 0) + 4; newCapacity < minimumCapacity && (newCapacity = minimumCapacity); this.data_0 = this.newData(newCapacity); oldData != null && arraycopy(oldData, 0, this.data_0, 0, this.size_0); } } ; _.indexOf_0 = function indexOf_8(object){ return $indexOf_4(this, object); } ; _.isEmpty = function isEmpty_26(){ return this.size_0 == 0; } ; _.move = function move_1(targetIndex, sourceIndex){ return $move(this, targetIndex, sourceIndex); } ; _.newData = function newData_0(capacity){ return initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, capacity, 5, 1); } ; _.primitiveGet = function primitiveGet(index_0){ return this.data_0[index_0]; } ; _.remove_2 = function remove_100(index_0){ return $remove_33(this, index_0); } ; _.setUnique = function setUnique(index_0, object){ return $setUnique(this, index_0, object); } ; _.size_1 = function size_66(){ return this.size_0; } ; _.toArray = function toArray_26(){ return $toArray_8(this); } ; _.toArray_0 = function toArray_27(array){ return $toArray_9(this, array); } ; _.size_0 = 0; var Lorg_eclipse_emf_common_util_BasicEList_2_classLit = createForClass('org.eclipse.emf.common.util', 'BasicEList', 66); var Lorg_eclipse_emf_common_util_TreeIterator_2_classLit = createForInterface('org.eclipse.emf.common.util', 'TreeIterator'); function $hasAnyChildren(this$static){ var nextPruneIterator; nextPruneIterator = this$static.nextPruneIterator; nextPruneIterator = this$static.getChildren(this$static.object); $add_21(this$static, nextPruneIterator); return nextPruneIterator.hasNext_0(); } function $next_13(this$static){ var currentIterator, iterator, nextIterator, result, result0; if (this$static.data_0 == null) { this$static.nextPruneIterator = this$static.getChildren(this$static.object); $add_21(this$static, this$static.nextPruneIterator); if (this$static.includeRoot) { result0 = this$static.object; return result0; } } currentIterator = castTo(this$static.data_0[this$static.size_0 - 1], 51); result = currentIterator.next_1(); this$static.nextRemoveIterator = currentIterator; iterator = this$static.getChildren(result); if (iterator.hasNext_0()) { this$static.nextPruneIterator = iterator; $add_21(this$static, iterator); } else { this$static.nextPruneIterator = null; while (!currentIterator.hasNext_0()) { setCheck(this$static.data_0, --this$static.size_0, null); if (this$static.size_0 == 0) { break; } nextIterator = castTo(this$static.data_0[this$static.size_0 - 1], 51); currentIterator = nextIterator; } } return result; } function AbstractTreeIterator(object, includeRoot){ this.object = object; this.includeRoot = includeRoot; } defineClass(708, 66, $intern_142); _.forEachRemaining = function forEachRemaining_53(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_42(){ return this.data_0 == null && !this.includeRoot?$hasAnyChildren(this):this.data_0 == null || this.size_0 != 0 && castTo(this.data_0[this.size_0 - 1], 51).hasNext_0(); } ; _.next_1 = function next_43(){ return $next_13(this); } ; _.remove = function remove_101(){ if (!this.nextRemoveIterator) { throw toJs(new IllegalStateException_0('There is no valid object to remove.')); } this.nextRemoveIterator.remove(); } ; _.includeRoot = false; var Lorg_eclipse_emf_common_util_AbstractTreeIterator_2_classLit = createForClass('org.eclipse.emf.common.util', 'AbstractTreeIterator', 708); function ElkGraphUtil$PropertiesSkippingTreeIterator(object){ AbstractTreeIterator.call(this, object, true); } defineClass(700, 708, $intern_142, ElkGraphUtil$PropertiesSkippingTreeIterator); _.getChildren = function getChildren(object){ var iterator; iterator = castTo(object, 58).eContents_0().iterator_0(); instanceOf(iterator, 287) && castTo(iterator, 287).filter_0(new ElkGraphUtil$PropertiesSkippingTreeIterator$1); return iterator; } ; var Lorg_eclipse_elk_graph_util_ElkGraphUtil$PropertiesSkippingTreeIterator_2_classLit = createForClass('org.eclipse.elk.graph.util', 'ElkGraphUtil/PropertiesSkippingTreeIterator', 700); function ElkGraphUtil$PropertiesSkippingTreeIterator$1(){ } defineClass(965, 1, {}, ElkGraphUtil$PropertiesSkippingTreeIterator$1); var Lorg_eclipse_elk_graph_util_ElkGraphUtil$PropertiesSkippingTreeIterator$1_2_classLit = createForClass('org.eclipse.elk.graph.util', 'ElkGraphUtil/PropertiesSkippingTreeIterator/1', 965); function $clinit_ElkReflect(){ $clinit_ElkReflect = emptyMethod; REGISTRY_NEW = new HashMap; REGISTRY_CLONE = new HashMap; registerClone(Ljava_util_EnumSet_2_classLit, new ElkReflect$lambda$0$Type); } function clone_11(clonee){ $clinit_ElkReflect(); if (instanceOf(clonee, 162)) { return castTo($get_10(REGISTRY_CLONE, Ljava_util_EnumSet_2_classLit), 295).clone(clonee); } if ($containsKey_3(REGISTRY_CLONE, getClass__Ljava_lang_Class___devirtual$(clonee))) { return castTo($get_10(REGISTRY_CLONE, getClass__Ljava_lang_Class___devirtual$(clonee)), 295).clone(clonee); } return null; } function newInstance_10(clazz){ $clinit_ElkReflect(); return $containsKey_3(REGISTRY_NEW, clazz)?castTo($get_10(REGISTRY_NEW, clazz), 341).newInstance():null; } function register(clazz, newFun, cloneFun){ $clinit_ElkReflect(); !!clazz && $put_6(REGISTRY_NEW, clazz, newFun); !!clazz && $put_6(REGISTRY_CLONE, clazz, cloneFun); } function registerClone(clazz, cloneFun){ !!clazz && $put_6(REGISTRY_CLONE, clazz, cloneFun); } var REGISTRY_CLONE, REGISTRY_NEW; var Lorg_eclipse_elk_graph_util_ElkReflect_2_classLit = createForClass('org.eclipse.elk.graph.util', 'ElkReflect', null); function ElkReflect$lambda$0$Type(){ } defineClass(901, 1, $intern_133, ElkReflect$lambda$0$Type); _.clone = function clone_12(o){ return $clinit_ElkReflect() , $clone(castTo(o, 181)); } ; var Lorg_eclipse_elk_graph_util_ElkReflect$lambda$0$Type_2_classLit = createForClass('org.eclipse.elk.graph.util', 'ElkReflect/lambda$0$Type', 901); function $clinit_ElkJs(){ $clinit_ElkJs = emptyMethod; SERVICE = getInstance(); } function collectLogs(currentPM, logObject, recordLogs, recordExecutionTime){ var child, child$iterator, children, i, jsonChild, jsonExecTime, jsonLogs, jsonString, jsonTaskName, s, s$iterator; jsonTaskName = new JSONString(currentPM.getTaskName()); $put_5(logObject, 'name', jsonTaskName); if (recordLogs && !currentPM.getLogs().list.isEmpty()) { jsonLogs = new JSONArray; $put_5(logObject, 'logs', jsonLogs); i = 0; for (s$iterator = new Collections$UnmodifiableCollectionIterator(currentPM.getLogs().coll.iterator_0()); s$iterator.it.hasNext_0();) { s = castToString(s$iterator.it.next_1()); jsonString = new JSONString(s); $get_8(jsonLogs, i); $set0(jsonLogs, i, jsonString); ++i; } } if (recordExecutionTime) { jsonExecTime = new JSONNumber(currentPM.getExecutionTime()); $put_5(logObject, 'executionTime', jsonExecTime); } if (!currentPM.getSubMonitors().list.isEmpty()) { children = new JSONArray; $put_5(logObject, 'children', children); i = 0; for (child$iterator = new Collections$UnmodifiableCollectionIterator(currentPM.getSubMonitors().coll.iterator_0()); child$iterator.it.hasNext_0();) { child = castTo(child$iterator.it.next_1(), 871); jsonChild = new JSONObject; $get_8(children, i); $set0(children, i, jsonChild); collectLogs(child, jsonChild, recordLogs, recordExecutionTime); ++i; } } } function exportLayout(){ $clinit_ElkJs(); function Dispatcher(worker){ var _this = this; this.dispatch = function(event_0){ var data_0 = event_0.data; switch (data_0.cmd) { case 'algorithms': var algs = getLayoutData(($clinit_Collections() , new Collections$UnmodifiableCollection(new AbstractMap$2(SERVICE.layoutAlgorithmMap)))); worker.postMessage({id:data_0.id, data:algs}); break; case 'categories': var cats = getLayoutData(($clinit_Collections() , new Collections$UnmodifiableCollection(new AbstractMap$2(SERVICE.layoutCategoryMap)))); worker.postMessage({id:data_0.id, data:cats}); break; case 'options': var opts = getLayoutData(($clinit_Collections() , new Collections$UnmodifiableCollection(new AbstractMap$2(SERVICE.layoutOptionMap)))); worker.postMessage({id:data_0.id, data:opts}); break; case 'register': registerLayoutAlgorithms(data_0.algorithms); worker.postMessage({id:data_0.id}); break; case 'layout': layout_11(data_0.graph, data_0.layoutOptions || {}, data_0.options || {}); worker.postMessage({id:data_0.id, data:data_0.graph}); break; } } ; this.saveDispatch = function(event_0){ try { _this.dispatch(event_0); } catch (err) { worker.postMessage({id:event_0.data.id, error:err}); } } ; } function FakeWorker(url_0){ var _this = this; this.dispatcher = new Dispatcher({postMessage:function(msg){ _this.onmessage({data:msg}); } }); this.postMessage = function(msg){ setTimeout(function(){ _this.dispatcher.saveDispatch({data:msg}); } , 0); } ; } if (typeof document === 'undefined' && typeof self !== 'undefined') { var dispatcher = new Dispatcher(self); self.onmessage = dispatcher.saveDispatch; } else if (typeof module !== 'undefined' && module.exports) { Object.defineProperty(exports, '__esModule', {value:true}); module.exports = {'default':FakeWorker, Worker:FakeWorker}; } } function getLayoutData(data_0){ var arr, json, ld, ld$iterator; arr = new JSONArray; for (ld$iterator = new Collections$UnmodifiableCollectionIterator(data_0.coll.iterator_0()); ld$iterator.it.hasNext_0();) { ld = castTo(ld$iterator.it.next_1(), 701); json = toJson(ld); $set_0(arr, arr.jsArray.length, json); } return arr.jsArray; } function layout_11(graphObj, layoutOptionsObj, optionsObj){ var _function, elkGraph, graph, importer, lc, logs, options, pm, recordExecutionTime, recordLogs, root; graph = new JSONObject_0(graphObj); importer = new JsonImporter; elkGraph = ($clear_2(importer.nodeIdMap) , $clear_2(importer.portIdMap) , $reset(importer.edgeIdMap) , $clear_2(importer.edgeSectionIdMap) , $clear_2(importer.nodeJsonMap) , $reset(importer.portJsonMap) , $reset(importer.edgeJsonMap) , $reset(importer.edgeSectionJsonMap) , root = $transformNode_0(importer, graph, null) , $transformEdges_2(importer, graph) , root); if (layoutOptionsObj) { options = new JSONObject_0(layoutOptionsObj); lc = optsToCfg(options); applyVisitors(elkGraph, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_util_IGraphElementVisitor_2_classLit, 1), $intern_2, 536, 0, [lc])); } recordLogs = false; recordExecutionTime = false; if (optionsObj) { options = new JSONObject_0(optionsObj); 'logging' in options.jsObject && (recordLogs = $get_9(options, 'logging').isBoolean().value_0); 'measureExecutionTime' in options.jsObject && (recordExecutionTime = $get_9(options, 'measureExecutionTime').isBoolean().value_0); } pm = $withExecutionTimeMeasurement($withLogging(new BasicProgressMonitor, recordLogs), recordExecutionTime); $layout_3(new RecursiveGraphLayoutEngine, elkGraph, pm); 'logging' in graph.jsObject && $put_5(graph, 'logging', null); if (recordLogs || recordExecutionTime) { logs = new JSONObject; collectLogs(pm, logs, recordLogs, recordExecutionTime); $put_5(graph, 'logging', logs); } _function = new JsonImporter$lambda$35$Type(importer); forEach_43(new ElkGraphUtil$PropertiesSkippingTreeIterator(elkGraph), _function); } function optsToCfg(opts){ var jsonVal, key, key$iterator, keys_0, lc, option, serialized, value_0; lc = new LayoutConfigurator; $addFilter(lc, ($clinit_LayoutConfigurator() , NO_OVERWRITE)); for (key$iterator = (keys_0 = $computeKeys0(opts, initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, 0, 6, 1)) , new AbstractList$IteratorImpl(new Arrays$ArrayList((new JSONObject$1(opts, keys_0)).val$keys2))); key$iterator.i < key$iterator.this$01_0.size_1();) { key = (checkCriticalElement(key$iterator.i < key$iterator.this$01_0.size_1()) , castToString(key$iterator.this$01_0.get_0(key$iterator.last = key$iterator.i++))); option = $getOptionDataBySuffix(SERVICE, key); if (option) { jsonVal = $get_9(opts, key); jsonVal.isString()?(serialized = jsonVal.isString().value_0):jsonVal.isBoolean()?(serialized = '' + jsonVal.isBoolean().value_0):jsonVal.isNumber()?(serialized = '' + jsonVal.isNumber().value_0):(serialized = jsonVal.toString_0()); value_0 = $parseValue(option, serialized); if (value_0 != null) { ($containsEnum(option.targets, ($clinit_LayoutOptionData$Target() , NODES)) || $containsEnum(option.targets, PARENTS)) && $setProperty($configure(lc, Lorg_eclipse_elk_graph_ElkNode_2_classLit), option, value_0); $containsEnum(option.targets, EDGES) && $setProperty($configure(lc, Lorg_eclipse_elk_graph_ElkEdge_2_classLit), option, value_0); $containsEnum(option.targets, PORTS) && $setProperty($configure(lc, Lorg_eclipse_elk_graph_ElkPort_2_classLit), option, value_0); $containsEnum(option.targets, LABELS) && $setProperty($configure(lc, Lorg_eclipse_elk_graph_ElkLabel_2_classLit), option, value_0); } } } return lc; } function registerLayoutAlgorithms(arrayObj){ var alg, arr, i; $registerLayoutMetaDataProviders(SERVICE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_ILayoutMetaDataProvider_2_classLit, 1), $intern_2, 134, 0, [new CoreOptions])); arr = new JSONArray_0(arrayObj); for (i = 0; i < arr.jsArray.length; ++i) { alg = $get_8(arr, i).isString().value_0; $equals_5(alg, 'layered')?$registerLayoutMetaDataProviders(SERVICE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_ILayoutMetaDataProvider_2_classLit, 1), $intern_2, 134, 0, [new LayeredMetaDataProvider])):$equals_5(alg, 'force')?$registerLayoutMetaDataProviders(SERVICE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_ILayoutMetaDataProvider_2_classLit, 1), $intern_2, 134, 0, [new ForceMetaDataProvider])):$equals_5(alg, 'stress')?$registerLayoutMetaDataProviders(SERVICE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_ILayoutMetaDataProvider_2_classLit, 1), $intern_2, 134, 0, [new StressMetaDataProvider])):$equals_5(alg, 'mrtree')?$registerLayoutMetaDataProviders(SERVICE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_ILayoutMetaDataProvider_2_classLit, 1), $intern_2, 134, 0, [new MrTreeMetaDataProvider])):$equals_5(alg, 'radial')?$registerLayoutMetaDataProviders(SERVICE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_ILayoutMetaDataProvider_2_classLit, 1), $intern_2, 134, 0, [new RadialMetaDataProvider])):$equals_5(alg, 'disco')?$registerLayoutMetaDataProviders(SERVICE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_ILayoutMetaDataProvider_2_classLit, 1), $intern_2, 134, 0, [new PolyominoOptions, new DisCoMetaDataProvider])):$equals_5(alg, 'sporeOverlap') || $equals_5(alg, 'sporeCompaction')?$registerLayoutMetaDataProviders(SERVICE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_ILayoutMetaDataProvider_2_classLit, 1), $intern_2, 134, 0, [new SporeMetaDataProvider])):$equals_5(alg, 'rectpacking') && $registerLayoutMetaDataProviders(SERVICE, stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_elk_core_data_ILayoutMetaDataProvider_2_classLit, 1), $intern_2, 134, 0, [new RectPackingMetaDataProvider])); } } var SERVICE; var Lorg_eclipse_emf_common_util_ResourceLocator_2_classLit = createForInterface('org.eclipse.emf.common.util', 'ResourceLocator'); function $getString(key){ return $equals_5('_UI_EMFDiagnostic_marker', key)?'EMF Problem':$equals_5('_UI_CircularContainment_diagnostic', key)?'An object may not circularly contain itself':$equals_5('parser.parse.1', key)?'Wrong character.':$equals_5('parser.parse.2', key)?'Invalid reference number.':$equals_5('parser.next.1', key)?'A character is required after \\.':$equals_5('parser.next.2', key)?"'?' is not expected. '(?:' or '(?=' or '(?!' or '(?<' or '(?#' or '(?>'?":$equals_5('parser.next.3', key)?"'(?<' or '(?= size_0 || targetIndex < 0) throw toJs(new IndexOutOfBoundsException_0('targetIndex=' + targetIndex + ', size=' + size_0)); if (sourceIndex >= size_0 || sourceIndex < 0) throw toJs(new IndexOutOfBoundsException_0('sourceIndex=' + sourceIndex + ', size=' + size_0)); targetIndex != sourceIndex?(object = (result = this$static.delegateRemove(sourceIndex) , this$static.delegateAdd(targetIndex, result) , result)):(object = this$static.delegateGet(sourceIndex)); return object; } function $remove_34(this$static, index_0){ var oldObject; ++this$static.modCount; oldObject = this$static.delegateRemove(index_0); return oldObject; } defineClass(2093, 70, $intern_144); _.addAllUnique = function addAllUnique_1(index_0, collection){ return $addAllUnique_1(this, index_0, collection); } ; _.addAllUnique_0 = function addAllUnique_2(collection){ var i, object, object$iterator; ++this.modCount; if (collection.isEmpty()) { return false; } else { i = this.delegateSize(); for (object$iterator = collection.iterator_0(); object$iterator.hasNext_0();) { object = object$iterator.next_1(); this.delegateAdd_0(this.validate(i, object)); ++i; } return true; } } ; _.addUnique = function addUnique_1(index_0, object){ $addUnique_1(this, index_0, object); } ; _.addUnique_0 = function addUnique_2(object){ $addUnique_2(this, object); } ; _.basicList = function basicList(){ return this.delegateBasicList(); } ; _.clear_0 = function clear_53(){ $doClear(this, this.delegateSize(), this.delegateToArray()); } ; _.contains = function contains_53(object){ return this.delegateContains(object); } ; _.containsAll = function containsAll_11(collection){ return this.delegateContainsAll(collection); } ; _.delegateAdd = function delegateAdd(index_0, object){ this.delegateList_1().$_nullMethod(); } ; _.delegateAdd_0 = function delegateAdd_0(object){ this.delegateList_1().$_nullMethod(); } ; _.delegateBasicList = function delegateBasicList(){ return this.delegateList_1(); } ; _.delegateClear = function delegateClear(){ this.delegateList_1().$_nullMethod(); } ; _.delegateContains = function delegateContains(object){ return this.delegateList_1().$_nullMethod(); } ; _.delegateContainsAll = function delegateContainsAll(collection){ return this.delegateList_1().$_nullMethod(); } ; _.delegateEquals = function delegateEquals(object){ return this.delegateList_1().$_nullMethod(); } ; _.delegateGet = function delegateGet(index_0){ return this.delegateList_1().$_nullMethod(); } ; _.delegateHashCode = function delegateHashCode(){ return this.delegateList_1().$_nullMethod(); } ; _.delegateIndexOf = function delegateIndexOf(object){ return this.delegateList_1().$_nullMethod(); } ; _.delegateIsEmpty = function delegateIsEmpty(){ return this.delegateList_1().$_nullMethod(); } ; _.delegateRemove = function delegateRemove(index_0){ return this.delegateList_1().$_nullMethod(); } ; _.delegateSet = function delegateSet(index_0, object){ return this.delegateList_1().$_nullMethod(); } ; _.delegateSize = function delegateSize(){ return this.delegateList_1().$_nullMethod(); } ; _.delegateToArray = function delegateToArray(){ return this.delegateList_1().$_nullMethod(); } ; _.delegateToArray_0 = function delegateToArray_0(array){ return this.delegateList_1().$_nullMethod(); } ; _.delegateToString = function delegateToString(){ return this.delegateList_1().$_nullMethod(); } ; _.equals_0 = function equals_215(object){ return this.delegateEquals(object); } ; _.get_0 = function get_53(index_0){ return this.resolve(index_0, this.delegateGet(index_0)); } ; _.hashCode_1 = function hashCode_77(){ return this.delegateHashCode(); } ; _.indexOf_0 = function indexOf_9(object){ return this.delegateIndexOf(object); } ; _.isEmpty = function isEmpty_27(){ return this.delegateIsEmpty(); } ; _.move = function move_2(targetIndex, sourceIndex){ return $move_0(this, targetIndex, sourceIndex); } ; _.primitiveGet = function primitiveGet_0(index_0){ return this.delegateGet(index_0); } ; _.remove_2 = function remove_102(index_0){ return $remove_34(this, index_0); } ; _.remove_1 = function remove_103(object){ var index_0; index_0 = this.indexOf_0(object); if (index_0 >= 0) { this.remove_2(index_0); return true; } else { return false; } } ; _.setUnique = function setUnique_0(index_0, object){ return this.delegateSet(index_0, this.validate(index_0, object)); } ; _.size_1 = function size_67(){ return this.delegateSize(); } ; _.toArray = function toArray_28(){ return this.delegateToArray(); } ; _.toArray_0 = function toArray_29(array){ return this.delegateToArray_0(array); } ; _.toString_0 = function toString_137(){ return this.delegateToString(); } ; var Lorg_eclipse_emf_common_util_DelegatingEList_2_classLit = createForClass('org.eclipse.emf.common.util', 'DelegatingEList', 2093); function $addAllUnique_2(this$static, index_0, collection){ var collectionSize, i, lastIndex, notification, notifications, oldIsSet, value_0; collectionSize = collection.size_1(); if (collectionSize == 0) { return false; } else { if (this$static.isNotificationRequired()) { oldIsSet = this$static.isSet_0(); $addAllUnique_1(this$static, index_0, collection); notification = collectionSize == 1?this$static.createNotification(3, null, collection.iterator_0().next_1(), index_0, oldIsSet):this$static.createNotification(5, null, collection, index_0, oldIsSet); if (this$static.hasInverse()) { notifications = collectionSize < 100?null:new NotificationChainImpl_0(collectionSize); lastIndex = index_0 + collectionSize; for (i = index_0; i < lastIndex; ++i) { value_0 = this$static.delegateGet(i); notifications = this$static.inverseAdd(value_0, notifications); notifications = notifications; } if (!notifications) { this$static.dispatchNotification(notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } else { this$static.dispatchNotification(notification); } } else { $addAllUnique_1(this$static, index_0, collection); if (this$static.hasInverse()) { notifications = collectionSize < 100?null:new NotificationChainImpl_0(collectionSize); lastIndex = index_0 + collectionSize; for (i = index_0; i < lastIndex; ++i) { notifications = this$static.inverseAdd(this$static.delegateGet(i), notifications); } !!notifications && notifications.dispatch_0(); } } return true; } } function $addUnique_3(this$static, index_0, object){ var notification, notifications, oldIsSet; if (this$static.isNotificationRequired()) { oldIsSet = this$static.isSet_0(); ++this$static.modCount; this$static.delegateAdd(index_0, this$static.validate(index_0, object)); notification = this$static.createNotification(3, null, object, index_0, oldIsSet); if (this$static.hasInverse()) { notifications = this$static.inverseAdd(object, null); if (!notifications) { this$static.dispatchNotification(notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } else { this$static.dispatchNotification(notification); } } else { ++this$static.modCount; this$static.delegateAdd(index_0, this$static.validate(index_0, object)); if (this$static.hasInverse()) { notifications = this$static.inverseAdd(object, null); !!notifications && notifications.dispatch_0(); } } } function $addUnique_4(this$static, object){ var index_0, notification, notifications, oldIsSet; if (this$static.isNotificationRequired()) { index_0 = this$static.delegateSize(); oldIsSet = this$static.isSet_0(); ++this$static.modCount; this$static.delegateAdd(index_0, this$static.validate(index_0, object)); notification = this$static.createNotification(3, null, object, index_0, oldIsSet); if (this$static.hasInverse()) { notifications = this$static.inverseAdd(object, null); if (!notifications) { this$static.dispatchNotification(notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } else { this$static.dispatchNotification(notification); } } else { $addUnique_2(this$static, object); if (this$static.hasInverse()) { notifications = this$static.inverseAdd(object, null); !!notifications && notifications.dispatch_0(); } } } function $basicAdd(this$static, object, notifications){ var index_0, notification, oldIsSet; if (this$static.isNotificationRequired()) { index_0 = this$static.delegateSize(); oldIsSet = this$static.isSet_0(); ++this$static.modCount; this$static.delegateAdd(index_0, this$static.validate(index_0, object)); notification = this$static.createNotification(3, null, object, index_0, oldIsSet); !notifications?(notifications = notification):notifications.add_5(notification); } else { $addUnique_1(this$static, this$static.delegateSize(), object); } return notifications; } function $basicRemove(this$static, object, notifications){ var index_0, notification, oldIsSet, oldObject; index_0 = this$static.indexOf_0(object); if (index_0 != -1) { if (this$static.isNotificationRequired()) { oldIsSet = this$static.isSet_0(); oldObject = $remove_34(this$static, index_0); notification = this$static.createNotification(4, oldObject, null, index_0, oldIsSet); !notifications?(notifications = notification):notifications.add_5(notification); } else { $remove_34(this$static, index_0); } } return notifications; } function $clear_12(this$static){ var collection, collectionSize, i, notification, notifications, object, oldData, oldIsSet, oldSize, size_0; if (this$static.isNotificationRequired()) { size_0 = this$static.delegateSize(); oldIsSet = this$static.isSet_0(); if (size_0 > 0) { collection = new BasicEList_1(this$static.basicList()); collectionSize = size_0; notifications = collectionSize < 100?null:new NotificationChainImpl_0(collectionSize); $doClear(this$static, collectionSize, collection.data_0); notification = collectionSize == 1?this$static.createNotification(4, $get_20(collection, 0), null, 0, oldIsSet):this$static.createNotification(6, collection, null, -1, oldIsSet); if (this$static.hasInverse()) { for (i = new AbstractEList$EIterator(collection); i.cursor != i.this$01_2.size_1();) { notifications = this$static.inverseRemove($doNext(i), notifications); } if (!notifications) { this$static.dispatchNotification(notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } else { if (!notifications) { this$static.dispatchNotification(notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } } else { $doClear(this$static, this$static.delegateSize(), this$static.delegateToArray()); this$static.dispatchNotification(this$static.createNotification(6, ($clinit_Collections() , EMPTY_LIST), null, -1, oldIsSet)); } } else if (this$static.hasInverse()) { size_0 = this$static.delegateSize(); if (size_0 > 0) { oldData = this$static.delegateToArray(); oldSize = size_0; $doClear(this$static, size_0, oldData); notifications = oldSize < 100?null:new NotificationChainImpl_0(oldSize); for (i = 0; i < oldSize; ++i) { object = oldData[i]; notifications = this$static.inverseRemove(object, notifications); } !!notifications && notifications.dispatch_0(); } else { $doClear(this$static, this$static.delegateSize(), this$static.delegateToArray()); } } else { $doClear(this$static, this$static.delegateSize(), this$static.delegateToArray()); } } function $setUnique_0(this$static, index_0, object){ var notification, notifications, oldIsSet, oldObject, oldObject0; if (this$static.isNotificationRequired()) { notifications = null; oldIsSet = this$static.isSet_0(); notification = this$static.createNotification(1, oldObject0 = (oldObject = this$static.delegateSet(index_0, this$static.validate(index_0, object)) , oldObject), object, index_0, oldIsSet); if (this$static.hasInverse() && !(this$static.useEquals() && !!oldObject0?equals_Ljava_lang_Object__Z__devirtual$(oldObject0, object):maskUndefined(oldObject0) === maskUndefined(object))) { !!oldObject0 && (notifications = this$static.inverseRemove(oldObject0, notifications)); notifications = this$static.inverseAdd(object, notifications); if (!notifications) { this$static.dispatchNotification(notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } else { if (!notifications) { this$static.dispatchNotification(notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } return oldObject0; } else { oldObject0 = (oldObject = this$static.delegateSet(index_0, this$static.validate(index_0, object)) , oldObject); if (this$static.hasInverse() && !(this$static.useEquals() && !!oldObject0?equals_Ljava_lang_Object__Z__devirtual$(oldObject0, object):maskUndefined(oldObject0) === maskUndefined(object))) { notifications = null; !!oldObject0 && (notifications = this$static.inverseRemove(oldObject0, null)); notifications = this$static.inverseAdd(object, notifications); !!notifications && notifications.dispatch_0(); } return oldObject0; } } defineClass(2094, 2093, $intern_144); _.addAllUnique = function addAllUnique_3(index_0, collection){ return $addAllUnique_2(this, index_0, collection); } ; _.addAllUnique_0 = function addAllUnique_4(collection){ return this.addAllUnique(this.delegateSize(), collection); } ; _.addUnique = function addUnique_3(index_0, object){ $addUnique_3(this, index_0, object); } ; _.addUnique_0 = function addUnique_4(object){ $addUnique_4(this, object); } ; _.canContainNull = function canContainNull_0(){ return !this.hasInverse(); } ; _.clear_0 = function clear_54(){ $clear_12(this); } ; _.createNotification = function createNotification(eventType, oldObject, newObject, index_0, wasSet){ return new DelegatingNotifyingListImpl$1(this, eventType, oldObject, newObject, index_0, wasSet); } ; _.dispatchNotification = function dispatchNotification(notification){ $eNotify(this.getNotifier(), notification); } ; _.getFeature = function getFeature(){ return null; } ; _.getFeatureID_0 = function getFeatureID(){ return -1; } ; _.getNotifier = function getNotifier(){ return null; } ; _.hasInverse = function hasInverse(){ return false; } ; _.inverseAdd = function inverseAdd(object, notifications){ return notifications; } ; _.inverseRemove = function inverseRemove(object, notifications){ return notifications; } ; _.isNotificationRequired = function isNotificationRequired(){ return false; } ; _.isSet_0 = function isSet(){ return !this.delegateIsEmpty(); } ; _.move = function move_3(targetIndex, sourceIndex){ var object, oldIsSet; if (this.isNotificationRequired()) { oldIsSet = this.isSet_0(); object = $move_0(this, targetIndex, sourceIndex); this.dispatchNotification(this.createNotification(7, valueOf_3(sourceIndex), object, targetIndex, oldIsSet)); return object; } else { return $move_0(this, targetIndex, sourceIndex); } } ; _.remove_2 = function remove_104(index_0){ var notification, notifications, oldIsSet, oldObject; if (this.isNotificationRequired()) { notifications = null; oldIsSet = this.isSet_0(); notification = this.createNotification(4, oldObject = $remove_34(this, index_0), null, index_0, oldIsSet); if (this.hasInverse() && !!oldObject) { notifications = this.inverseRemove(oldObject, notifications); if (!notifications) { this.dispatchNotification(notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } else { if (!notifications) { this.dispatchNotification(notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } return oldObject; } else { oldObject = $remove_34(this, index_0); if (this.hasInverse() && !!oldObject) { notifications = this.inverseRemove(oldObject, null); !!notifications && notifications.dispatch_0(); } return oldObject; } } ; _.setUnique = function setUnique_1(index_0, object){ return $setUnique_0(this, index_0, object); } ; var Lorg_eclipse_emf_common_notify_impl_DelegatingNotifyingListImpl_2_classLit = createForClass('org.eclipse.emf.common.notify.impl', 'DelegatingNotifyingListImpl', 2094); function $add_22(this$static, newNotification){ if (!newNotification) { return false; } else { if (this$static.merge_0(newNotification)) { return false; } if (!this$static.next_0) { if (instanceOf(newNotification, 152)) { this$static.next_0 = castTo(newNotification, 152); return true; } else { this$static.next_0 = new NotificationChainImpl; return this$static.next_0.add_5(newNotification); } } else { return this$static.next_0.add_5(newNotification); } } } function $dispatch(this$static){ var notifier; notifier = this$static.getNotifier(); notifier != null && this$static.eventType != -1 && castTo(notifier, 94).eNotify(this$static); !!this$static.next_0 && this$static.next_0.dispatch_0(); } function $getNewBooleanValue(this$static){ if (this$static.primitiveType != 0) throw toJs(new IllegalStateException); return neq(this$static.newSimplePrimitiveValue, 0); } function $getNewByteValue(this$static){ if (this$static.primitiveType != 1) throw toJs(new IllegalStateException); return toInt_0(this$static.newSimplePrimitiveValue) << 24 >> 24; } function $getNewCharValue(this$static){ if (this$static.primitiveType != 2) throw toJs(new IllegalStateException); return toInt_0(this$static.newSimplePrimitiveValue) & $intern_47; } function $getNewDoubleValue(this$static){ if (this$static.primitiveType != 3) throw toJs(new IllegalStateException); return this$static.newIEEEPrimitiveValue; } function $getNewFloatValue(this$static){ if (this$static.primitiveType != 4) throw toJs(new IllegalStateException); return this$static.newIEEEPrimitiveValue; } function $getNewIntValue(this$static){ if (this$static.primitiveType != 5) throw toJs(new IllegalStateException); return toInt_0(this$static.newSimplePrimitiveValue); } function $getNewLongValue(this$static){ if (this$static.primitiveType != 6) throw toJs(new IllegalStateException); return this$static.newSimplePrimitiveValue; } function $getNewShortValue(this$static){ if (this$static.primitiveType != 7) throw toJs(new IllegalStateException); return toInt_0(this$static.newSimplePrimitiveValue) << 16 >> 16; } function $getNewValue(this$static){ if (this$static.newValue == null) { switch (this$static.primitiveType) { case 0: this$static.newValue = $getNewBooleanValue(this$static)?($clinit_Boolean() , TRUE_0):($clinit_Boolean() , FALSE_0); break; case 1: this$static.newValue = get_32($getNewByteValue(this$static)); break; case 2: this$static.newValue = valueOf_2($getNewCharValue(this$static)); break; case 3: this$static.newValue = $getNewDoubleValue(this$static); break; case 4: this$static.newValue = new Float($getNewFloatValue(this$static)); break; case 6: this$static.newValue = valueOf_4($getNewLongValue(this$static)); break; case 5: this$static.newValue = valueOf_3($getNewIntValue(this$static)); break; case 7: this$static.newValue = valueOf_5($getNewShortValue(this$static)); } } return this$static.newValue; } function $getOldBooleanValue(this$static){ if (this$static.primitiveType != 0) throw toJs(new IllegalStateException); return neq(this$static.oldSimplePrimitiveValue, 0); } function $getOldByteValue(this$static){ if (this$static.primitiveType != 1) throw toJs(new IllegalStateException); return toInt_0(this$static.oldSimplePrimitiveValue) << 24 >> 24; } function $getOldCharValue(this$static){ if (this$static.primitiveType != 2) throw toJs(new IllegalStateException); return toInt_0(this$static.oldSimplePrimitiveValue) & $intern_47; } function $getOldDoubleValue(this$static){ if (this$static.primitiveType != 3) throw toJs(new IllegalStateException); return this$static.oldIEEEPrimitiveValue; } function $getOldFloatValue(this$static){ if (this$static.primitiveType != 4) throw toJs(new IllegalStateException); return this$static.oldIEEEPrimitiveValue; } function $getOldIntValue(this$static){ if (this$static.primitiveType != 5) throw toJs(new IllegalStateException); return toInt_0(this$static.oldSimplePrimitiveValue); } function $getOldLongValue(this$static){ if (this$static.primitiveType != 6) throw toJs(new IllegalStateException); return this$static.oldSimplePrimitiveValue; } function $getOldShortValue(this$static){ if (this$static.primitiveType != 7) throw toJs(new IllegalStateException); return toInt_0(this$static.oldSimplePrimitiveValue) << 16 >> 16; } function $getOldValue(this$static){ if (this$static.oldValue == null) { switch (this$static.primitiveType) { case 0: this$static.oldValue = $getOldBooleanValue(this$static)?($clinit_Boolean() , TRUE_0):($clinit_Boolean() , FALSE_0); break; case 1: this$static.oldValue = get_32($getOldByteValue(this$static)); break; case 2: this$static.oldValue = valueOf_2($getOldCharValue(this$static)); break; case 3: this$static.oldValue = $getOldDoubleValue(this$static); break; case 4: this$static.oldValue = new Float($getOldFloatValue(this$static)); break; case 6: this$static.oldValue = valueOf_4($getOldLongValue(this$static)); break; case 5: this$static.oldValue = valueOf_3($getOldIntValue(this$static)); break; case 7: this$static.oldValue = valueOf_5($getOldShortValue(this$static)); } } return this$static.oldValue; } function $isTouch(this$static){ switch (this$static.eventType) { case 9: case 8: { return true; } case 3: case 5: case 4: case 6: { return false; } case 7: { return castTo($getOldValue(this$static), 17).value_0 == this$static.position; } case 1: case 2: { if (this$static.position == -2) { return false; } else { switch (this$static.primitiveType) { case 0: case 1: case 2: case 6: case 5: case 7: { return eq(this$static.oldSimplePrimitiveValue, this$static.newSimplePrimitiveValue); } case 3: case 4: { return this$static.oldIEEEPrimitiveValue == this$static.newIEEEPrimitiveValue; } default:{ return this$static.oldValue == null?this$static.newValue == null:equals_Ljava_lang_Object__Z__devirtual$(this$static.oldValue, this$static.newValue); } } } } default:{ return false; } } } function $wasSet(this$static){ var defaultValue; switch (this$static.eventType) { case 1: { if (this$static.isFeatureUnsettable()) { return this$static.position != -2; } break; } case 2: { if (this$static.isFeatureUnsettable()) { return this$static.position == -2; } break; } case 3: case 5: case 4: case 6: case 7: { return this$static.position > -2; } default:{ return false; } } defaultValue = this$static.getFeatureDefaultValue(); switch (this$static.primitiveType) { case 0: return defaultValue != null && $booleanValue(castToBoolean(defaultValue)) != neq(this$static.oldSimplePrimitiveValue, 0); case 1: return defaultValue != null && castTo(defaultValue, 222).value_0 != toInt_0(this$static.oldSimplePrimitiveValue) << 24 >> 24; case 2: return defaultValue != null && castTo(defaultValue, 180).value_0 != (toInt_0(this$static.oldSimplePrimitiveValue) & $intern_47); case 6: return defaultValue != null && neq(castTo(defaultValue, 168).value_0, this$static.oldSimplePrimitiveValue); case 5: return defaultValue != null && castTo(defaultValue, 17).value_0 != toInt_0(this$static.oldSimplePrimitiveValue); case 7: return defaultValue != null && castTo(defaultValue, 191).value_0 != toInt_0(this$static.oldSimplePrimitiveValue) << 16 >> 16; case 3: return defaultValue != null && $doubleValue(castToDouble(defaultValue)) != this$static.oldIEEEPrimitiveValue; case 4: return defaultValue != null && castTo(defaultValue, 161).value_0 != this$static.oldIEEEPrimitiveValue; default:return defaultValue == null?this$static.oldValue != null:!equals_Ljava_lang_Object__Z__devirtual$(defaultValue, this$static.oldValue); } } function NotificationImpl(eventType, oldDoubleValue, newDoubleValue){ this.eventType = eventType; this.oldIEEEPrimitiveValue = oldDoubleValue; this.newIEEEPrimitiveValue = newDoubleValue; this.position = -1; this.primitiveType = 3; } function NotificationImpl_0(eventType, oldIntValue, newIntValue){ this.eventType = eventType; this.oldSimplePrimitiveValue = oldIntValue; this.newSimplePrimitiveValue = newIntValue; this.position = -1; this.primitiveType = 5; } function NotificationImpl_1(eventType, oldValue, newValue, position){ this.eventType = eventType; this.oldValue = oldValue; this.newValue = newValue; this.position = position; this.primitiveType = -1; } function NotificationImpl_2(eventType, oldValue, newValue, position, wasSet){ this.eventType = eventType; this.oldValue = oldValue; this.newValue = newValue; this.position = position; this.primitiveType = -1; wasSet || (this.position = -2 - position - 1); } function NotificationImpl_3(eventType, oldBooleanValue, newBooleanValue){ this.eventType = eventType; this.oldSimplePrimitiveValue = oldBooleanValue?1:0; this.newSimplePrimitiveValue = newBooleanValue?1:0; this.position = -1; this.primitiveType = 0; } defineClass(152, 1, $intern_145); _.add_5 = function add_48(newNotification){ return $add_22(this, newNotification); } ; _.dispatch_0 = function dispatch(){ $dispatch(this); } ; _.getEventType = function getEventType(){ return this.eventType; } ; _.getFeature = function getFeature_0(){ return null; } ; _.getFeatureDefaultValue = function getFeatureDefaultValue(){ return null; } ; _.getFeatureID = function getFeatureID_0(expectedClass){ return -1; } ; _.getNewValue = function getNewValue(){ return $getNewValue(this); } ; _.getNotifier = function getNotifier_0(){ return null; } ; _.getOldValue = function getOldValue(){ return $getOldValue(this); } ; _.getPosition_0 = function getPosition_2(){ return this.position < 0?this.position < -2?-2 - this.position - 1:-1:this.position; } ; _.isFeatureUnsettable = function isFeatureUnsettable(){ return false; } ; _.merge_0 = function merge_3(notification){ var index_0, list, newPositions, notificationEventType, notificationNotifier, notificationPosition, oldPosition, originalPosition, originalWasSet, positions, removedValues; switch (this.eventType) { case 1: case 2: { notificationEventType = notification.getEventType(); switch (notificationEventType) { case 1: case 2: { notificationNotifier = notification.getNotifier(); if (maskUndefined(notificationNotifier) === maskUndefined(this.getNotifier()) && this.getFeatureID(null) == notification.getFeatureID(null)) { this.newValue = notification.getNewValue(); notification.getEventType() == 1 && (this.eventType = 1); return true; } } } } case 4: { notificationEventType = notification.getEventType(); switch (notificationEventType) { case 4: { notificationNotifier = notification.getNotifier(); if (maskUndefined(notificationNotifier) === maskUndefined(this.getNotifier()) && this.getFeatureID(null) == notification.getFeatureID(null)) { originalWasSet = $wasSet(this); originalPosition = this.position < 0?this.position < -2?-2 - this.position - 1:-1:this.position; notificationPosition = notification.getPosition_0(); this.eventType = 6; removedValues = new BasicEList_0(2); if (originalPosition <= notificationPosition) { $add_21(removedValues, this.oldValue); $add_21(removedValues, notification.getOldValue()); this.newValue = stampJavaTypeInfo(getClassLiteralForArray(I_classLit, 1), $intern_49, 28, 15, [this.position = originalPosition, notificationPosition + 1]); } else { $add_21(removedValues, notification.getOldValue()); $add_21(removedValues, this.oldValue); this.newValue = stampJavaTypeInfo(getClassLiteralForArray(I_classLit, 1), $intern_49, 28, 15, [this.position = notificationPosition, originalPosition]); } this.oldValue = removedValues; originalWasSet || (this.position = -2 - this.position - 1); return true; } break; } } break; } case 6: { notificationEventType = notification.getEventType(); switch (notificationEventType) { case 4: { notificationNotifier = notification.getNotifier(); if (maskUndefined(notificationNotifier) === maskUndefined(this.getNotifier()) && this.getFeatureID(null) == notification.getFeatureID(null)) { originalWasSet = $wasSet(this); notificationPosition = notification.getPosition_0(); positions = castTo(this.newValue, 53); newPositions = initUnidimensionalArray(I_classLit, $intern_49, 28, positions.length + 1, 15, 1); index_0 = 0; while (index_0 < positions.length) { oldPosition = positions[index_0]; if (oldPosition <= notificationPosition) { newPositions[index_0++] = oldPosition; ++notificationPosition; } else { break; } } list = castTo(this.oldValue, 15); list.add_3(index_0, notification.getOldValue()); newPositions[index_0] = notificationPosition; while (++index_0 < newPositions.length) { newPositions[index_0] = positions[index_0 - 1]; } this.newValue = newPositions; originalWasSet || (this.position = -2 - newPositions[0]); return true; } break; } } break; } } return false; } ; _.toString_0 = function toString_138(){ var i, number, positions, result; result = new StringBuffer_1($getName(this.___clazz) + '@' + (number = hashCode__I__devirtual$(this) >>> 0 , number.toString(16))); result.string += ' (eventType: '; switch (this.eventType) { case 1: { result.string += 'SET'; break; } case 2: { result.string += 'UNSET'; break; } case 3: { result.string += 'ADD'; break; } case 5: { result.string += 'ADD_MANY'; break; } case 4: { result.string += 'REMOVE'; break; } case 6: { result.string += 'REMOVE_MANY'; break; } case 7: { result.string += 'MOVE'; break; } case 8: { result.string += 'REMOVING_ADAPTER'; break; } case 9: { result.string += 'RESOLVE'; break; } default:{ $append_1(result, this.eventType); break; } } $isTouch(this) && (result.string += ', touch: true' , result); result.string += ', position: '; $append_1(result, this.position < 0?this.position < -2?-2 - this.position - 1:-1:this.position); result.string += ', notifier: '; $append_2(result, this.getNotifier()); result.string += ', feature: '; $append_2(result, this.getFeature()); result.string += ', oldValue: '; $append_2(result, $getOldValue(this)); result.string += ', newValue: '; if (this.eventType == 6 && instanceOf(this.newValue, 53)) { positions = castTo(this.newValue, 53); result.string += '['; for (i = 0; i < positions.length;) { result.string += positions[i]; ++i < positions.length && (result.string += ', ' , result); } result.string += ']'; } else { $append_2(result, $getNewValue(this)); } result.string += ', isTouch: '; $append_4(result, $isTouch(this)); result.string += ', wasSet: '; $append_4(result, $wasSet(this)); result.string += ')'; return result.string; } ; _.eventType = 0; _.newIEEEPrimitiveValue = 0; _.newSimplePrimitiveValue = 0; _.oldIEEEPrimitiveValue = 0; _.oldSimplePrimitiveValue = 0; _.position = 0; _.primitiveType = 0; var Lorg_eclipse_emf_common_notify_impl_NotificationImpl_2_classLit = createForClass('org.eclipse.emf.common.notify.impl', 'NotificationImpl', 152); function DelegatingNotifyingListImpl$1(this$0, $anonymous0, $anonymous1, $anonymous2, $anonymous3, $anonymous4){ this.this$01 = this$0; NotificationImpl_2.call(this, $anonymous0, $anonymous1, $anonymous2, $anonymous3, $anonymous4); } defineClass(1188, 152, $intern_145, DelegatingNotifyingListImpl$1); _.getFeature = function getFeature_1(){ return this.this$01.getFeature(); } ; _.getFeatureID = function getFeatureID_1(expectedClass){ return this.this$01.getFeatureID_0(); } ; _.getNotifier = function getNotifier_1(){ return this.this$01.getNotifier(); } ; var Lorg_eclipse_emf_common_notify_impl_DelegatingNotifyingListImpl$1_2_classLit = createForClass('org.eclipse.emf.common.notify.impl', 'DelegatingNotifyingListImpl/1', 1188); function $add_23(this$static, newNotification){ var i, notification; if (!newNotification) { return false; } else { for (i = 0; i < this$static.size_0; ++i) { notification = castTo(this$static.data_0[i], 378); if (notification.merge_0(newNotification)) { return false; } } return $add_21(this$static, newNotification); } } function NotificationChainImpl(){ } function NotificationChainImpl_0(initialCapacity){ BasicEList_0.call(this, initialCapacity); } defineClass(251, 66, $intern_141, NotificationChainImpl, NotificationChainImpl_0); _.add_2 = function add_49(newNotification){ return $add_23(this, castTo(newNotification, 378)); } ; _.add_5 = function add_50(newNotification){ return $add_23(this, newNotification); } ; _.dispatch_0 = function dispatch_0(){ var i, notification, notifier; for (i = 0; i < this.size_0; ++i) { notification = castTo(this.data_0[i], 378); notifier = notification.getNotifier(); notifier != null && notification.getEventType() != -1 && castTo(notifier, 94).eNotify(notification); } } ; _.newData = function newData_1(capacity){ return initUnidimensionalArray(Lorg_eclipse_emf_common_notify_Notification_2_classLit, $intern_2, 378, capacity, 0, 1); } ; var Lorg_eclipse_emf_common_notify_impl_NotificationChainImpl_2_classLit = createForClass('org.eclipse.emf.common.notify.impl', 'NotificationChainImpl', 251); defineClass(1524, 93, $intern_137); _.eBasicAdapters = function eBasicAdapters_1(){ return this.eAdapters; } ; _.eDeliver = function eDeliver_1(){ return (this.eFlags & 1) != 0; } ; _.eFlags = 1; var Lorg_eclipse_emf_common_notify_impl_NotifierImpl_2_classLit = createForClass('org.eclipse.emf.common.notify.impl', 'NotifierImpl', 1524); function $addAllUnique_3(this$static, index_0, collection){ var collectionSize, i, lastIndex, notification, notifications, object, oldIsSet, value_0; collectionSize = collection.size_1(); if (collectionSize == 0) { return false; } else { if (this$static.isNotificationRequired()) { oldIsSet = this$static.isSet_0(); $addAllUnique(this$static, index_0, collection); notification = collectionSize == 1?this$static.createNotification(3, null, collection.iterator_0().next_1(), index_0, oldIsSet):this$static.createNotification(5, null, collection, index_0, oldIsSet); if (this$static.hasInverse()) { notifications = collectionSize < 100?null:new NotificationChainImpl_0(collectionSize); lastIndex = index_0 + collectionSize; for (i = index_0; i < lastIndex; ++i) { value_0 = this$static.data_0[i]; notifications = this$static.inverseAdd(value_0, notifications); notifications = this$static.shadowAdd(value_0, notifications); } if (!notifications) { this$static.dispatchNotification(notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } else { this$static.dispatchNotification(notification); } } else { $addAllUnique(this$static, index_0, collection); if (this$static.hasInverse()) { notifications = collectionSize < 100?null:new NotificationChainImpl_0(collectionSize); lastIndex = index_0 + collectionSize; for (i = index_0; i < lastIndex; ++i) { object = this$static.data_0[i]; notifications = this$static.inverseAdd(object, notifications); } !!notifications && notifications.dispatch_0(); } } return true; } } function $addUnique_5(this$static, index_0, object){ var notification, notifications, oldIsSet; if (this$static.isNotificationRequired()) { oldIsSet = this$static.isSet_0(); $addUnique(this$static, index_0, object); notification = this$static.createNotification(3, null, object, index_0, oldIsSet); if (this$static.hasInverse()) { notifications = this$static.inverseAdd(object, null); this$static.hasShadow() && (notifications = this$static.shadowAdd(object, notifications)); if (!notifications) { this$static.dispatchNotification(notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } else { this$static.dispatchNotification(notification); } } else { $addUnique(this$static, index_0, object); if (this$static.hasInverse()) { notifications = this$static.inverseAdd(object, null); !!notifications && notifications.dispatch_0(); } } } function $addUnique_6(this$static, object){ var index_0, notification, notifications, oldIsSet; if (this$static.isNotificationRequired()) { index_0 = this$static.size_0; oldIsSet = this$static.isSet_0(); $addUnique_0(this$static, object); notification = this$static.createNotification(3, null, object, index_0, oldIsSet); if (this$static.hasInverse()) { notifications = this$static.inverseAdd(object, null); this$static.hasShadow() && (notifications = this$static.shadowAdd(object, notifications)); if (!notifications) { this$static.dispatchNotification(notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } else { this$static.dispatchNotification(notification); } } else { $addUnique_0(this$static, object); if (this$static.hasInverse()) { notifications = this$static.inverseAdd(object, null); !!notifications && notifications.dispatch_0(); } } } function $basicAdd_0(this$static, object, notifications){ var index_0, notification, oldIsSet; if (this$static.isNotificationRequired()) { index_0 = this$static.size_0; oldIsSet = this$static.isSet_0(); $addUnique(this$static, index_0, object); notification = this$static.createNotification(3, null, object, index_0, oldIsSet); !notifications?(notifications = notification):notifications.add_5(notification); } else { $addUnique(this$static, this$static.size_0, object); } return notifications; } function $basicRemove_0(this$static, object, notifications){ var index_0, notification, oldIsSet, oldObject; index_0 = this$static.indexOf_0(object); if (index_0 != -1) { if (this$static.isNotificationRequired()) { oldIsSet = this$static.isSet_0(); oldObject = $remove_33(this$static, index_0); notification = this$static.createNotification(4, oldObject, null, index_0, oldIsSet); !notifications?(notifications = notification):notifications.add_5(notification); } else { $remove_33(this$static, index_0); } } return notifications; } function $clear_13(this$static){ var collection, collectionSize, i, notification, notifications, object, oldData, oldIsSet, oldSize; if (this$static.isNotificationRequired()) { oldIsSet = this$static.isSet_0(); if (this$static.size_0 > 0) { collection = new BasicEList$UnmodifiableEList(this$static.size_0, this$static.data_0); collectionSize = this$static.size_0; notifications = collectionSize < 100?null:new NotificationChainImpl_0(collectionSize); if (this$static.hasShadow()) { for (i = 0; i < this$static.size_0; ++i) { object = this$static.data_0[i]; notifications = this$static.shadowRemove(object, notifications); } } $clear_11(this$static); notification = collectionSize == 1?this$static.createNotification(4, $get_20(collection, 0), null, 0, oldIsSet):this$static.createNotification(6, collection, null, -1, oldIsSet); if (this$static.hasInverse()) { for (i = new AbstractEList$NonResolvingEIterator(collection); i.cursor != i.this$01_2.size_1();) { notifications = this$static.inverseRemove($doNext_0(i), notifications); } if (!notifications) { this$static.dispatchNotification(notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } else { if (!notifications) { this$static.dispatchNotification(notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } } else { $clear_11(this$static); this$static.dispatchNotification(this$static.createNotification(6, ($clinit_Collections() , EMPTY_LIST), null, -1, oldIsSet)); } } else if (this$static.hasInverse()) { if (this$static.size_0 > 0) { oldData = this$static.data_0; oldSize = this$static.size_0; $clear_11(this$static); notifications = oldSize < 100?null:new NotificationChainImpl_0(oldSize); for (i = 0; i < oldSize; ++i) { object = oldData[i]; notifications = this$static.inverseRemove(object, notifications); } !!notifications && notifications.dispatch_0(); } else { $clear_11(this$static); } } else { $clear_11(this$static); } } function $createNotificationChain(capacity){ return capacity < 100?null:new NotificationChainImpl_0(capacity); } function $move_1(this$static, targetIndex, sourceIndex){ var object, oldIsSet; if (this$static.isNotificationRequired()) { oldIsSet = this$static.isSet_0(); object = $move(this$static, targetIndex, sourceIndex); this$static.dispatchNotification(this$static.createNotification(7, valueOf_3(sourceIndex), object, targetIndex, oldIsSet)); return object; } else { return $move(this$static, targetIndex, sourceIndex); } } function $remove_35(this$static, index_0){ var notification, notifications, oldIsSet, oldObject; if (this$static.isNotificationRequired()) { notifications = null; oldIsSet = this$static.isSet_0(); this$static.hasShadow() && (notifications = this$static.shadowRemove(this$static.basicGet(index_0), null)); notification = this$static.createNotification(4, oldObject = $remove_33(this$static, index_0), null, index_0, oldIsSet); if (this$static.hasInverse() && oldObject != null) { notifications = this$static.inverseRemove(oldObject, notifications); if (!notifications) { this$static.dispatchNotification(notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } else { if (!notifications) { this$static.dispatchNotification(notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } return oldObject; } else { oldObject = $remove_33(this$static, index_0); if (this$static.hasInverse() && oldObject != null) { notifications = this$static.inverseRemove(oldObject, null); !!notifications && notifications.dispatch_0(); } return oldObject; } } function $removeAll_4(this$static, collection){ var collectionSize, count, i, i0, i1, initialObject, j, list, listSize, notification, notifications, object, objects, oldIsSet, oldPositions, positions, repeat, result, resultList; oldIsSet = this$static.size_0 != 0; result = false; positions = null; if ($eNotificationRequired(this$static.owner)) { listSize = collection.size_1(); if (listSize > 0) { notifications = listSize < 100?null:new NotificationChainImpl_0(listSize); list = new BasicEList_1(collection); objects = list.data_0; positions = initUnidimensionalArray(I_classLit, $intern_49, 28, listSize, 15, 1); count = 0; resultList = new BasicEList_0(listSize); for (i = 0; i < this$static.size_0; ++i) { initialObject = this$static.data_0[i]; object = initialObject; LOOP: for (repeat = 0; repeat < 2; ++repeat) { for (j = listSize; --j >= 0;) { if (object != null?equals_Ljava_lang_Object__Z__devirtual$(object, objects[j]):maskUndefined(object) === maskUndefined(objects[j])) { if (positions.length <= count) { oldPositions = positions; positions = initUnidimensionalArray(I_classLit, $intern_49, 28, 2 * positions.length, 15, 1); arraycopy(oldPositions, 0, positions, 0, count); } positions[count++] = i; $add_21(resultList, objects[j]); break LOOP; } } object = object; if (maskUndefined(object) === maskUndefined(initialObject)) { break; } } } list = resultList; objects = resultList.data_0; listSize = count; if (count > positions.length) { oldPositions = positions; positions = initUnidimensionalArray(I_classLit, $intern_49, 28, count, 15, 1); arraycopy(oldPositions, 0, positions, 0, count); } if (count > 0) { result = true; for (i0 = 0; i0 < count; ++i0) { object = objects[i0]; notifications = $shadowRemove_2(this$static, castTo(object, 76), notifications); } for (i1 = count; --i1 >= 0;) { $remove_33(this$static, positions[i1]); } if (count != listSize) { for (i = listSize; --i >= count;) { $remove_33(list, i); } oldPositions = positions; positions = initUnidimensionalArray(I_classLit, $intern_49, 28, count, 15, 1); arraycopy(oldPositions, 0, positions, 0, count); } collection = list; } } } else { collection = $getDuplicates(this$static, collection); for (i = this$static.size_0; --i >= 0;) { if (collection.contains(this$static.data_0[i])) { $remove_33(this$static, i); result = true; } } } if (result) { if (positions != null) { collectionSize = collection.size_1(); notification = collectionSize == 1?$createNotification(this$static, 4, collection.iterator_0().next_1(), null, positions[0], oldIsSet):$createNotification(this$static, 6, collection, positions, positions[0], oldIsSet); notifications = collectionSize < 100?null:new NotificationChainImpl_0(collectionSize); for (i = collection.iterator_0(); i.hasNext_0();) { object = i.next_1(); notifications = $inverseRemove_3(this$static, castTo(object, 76), notifications); } if (!notifications) { $eNotify(this$static.owner, notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } else { notifications = $createNotificationChain(collection.size_1()); for (i = collection.iterator_0(); i.hasNext_0();) { object = i.next_1(); notifications = $inverseRemove_3(this$static, castTo(object, 76), notifications); } !!notifications && notifications.dispatch_0(); } return true; } else { return false; } } function $setUnique_1(this$static, index_0, object){ var notification, notifications, oldIsSet, oldObject; if (this$static.isNotificationRequired()) { notifications = null; oldIsSet = this$static.isSet_0(); notification = this$static.createNotification(1, oldObject = $setUnique(this$static, index_0, object), object, index_0, oldIsSet); if (this$static.hasInverse() && !(this$static.useEquals() && oldObject != null?equals_Ljava_lang_Object__Z__devirtual$(oldObject, object):maskUndefined(oldObject) === maskUndefined(object))) { oldObject != null && (notifications = this$static.inverseRemove(oldObject, notifications)); notifications = this$static.inverseAdd(object, notifications); this$static.hasShadow() && (notifications = this$static.shadowSet(oldObject, object, notifications)); if (!notifications) { this$static.dispatchNotification(notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } else { this$static.hasShadow() && (notifications = this$static.shadowSet(oldObject, object, notifications)); if (!notifications) { this$static.dispatchNotification(notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } return oldObject; } else { oldObject = $setUnique(this$static, index_0, object); if (this$static.hasInverse() && !(this$static.useEquals() && oldObject != null?equals_Ljava_lang_Object__Z__devirtual$(oldObject, object):maskUndefined(oldObject) === maskUndefined(object))) { notifications = null; oldObject != null && (notifications = this$static.inverseRemove(oldObject, null)); notifications = this$static.inverseAdd(object, notifications); !!notifications && notifications.dispatch_0(); } return oldObject; } } defineClass(2091, 66, $intern_141); _.addAllUnique = function addAllUnique_5(index_0, collection){ return $addAllUnique_3(this, index_0, collection); } ; _.addAllUnique_0 = function addAllUnique_6(collection){ return this.addAllUnique(this.size_0, collection); } ; _.addUnique = function addUnique_5(index_0, object){ $addUnique_5(this, index_0, object); } ; _.addUnique_0 = function addUnique_6(object){ $addUnique_6(this, object); } ; _.canContainNull = function canContainNull_1(){ return !this.hasInverse(); } ; _.clear_0 = function clear_55(){ $clear_13(this); } ; _.createNotification = function createNotification_0(eventType, oldObject, newObject, index_0, wasSet){ return new NotifyingListImpl$1(this, eventType, oldObject, newObject, index_0, wasSet); } ; _.dispatchNotification = function dispatchNotification_0(notification){ $eNotify(this.getNotifier(), notification); } ; _.getFeature = function getFeature_2(){ return null; } ; _.getFeatureID_0 = function getFeatureID_2(){ return -1; } ; _.getNotifier = function getNotifier_2(){ return null; } ; _.hasInverse = function hasInverse_0(){ return false; } ; _.hasShadow = function hasShadow(){ return false; } ; _.inverseAdd = function inverseAdd_0(object, notifications){ return notifications; } ; _.inverseRemove = function inverseRemove_0(object, notifications){ return notifications; } ; _.isNotificationRequired = function isNotificationRequired_0(){ return false; } ; _.isSet_0 = function isSet_0(){ return this.size_0 != 0; } ; _.move = function move_4(targetIndex, sourceIndex){ return $move_1(this, targetIndex, sourceIndex); } ; _.remove_2 = function remove_105(index_0){ return $remove_35(this, index_0); } ; _.setUnique = function setUnique_2(index_0, object){ return $setUnique_1(this, index_0, object); } ; _.shadowAdd = function shadowAdd(object, notifications){ return notifications; } ; _.shadowRemove = function shadowRemove(object, notifications){ return notifications; } ; _.shadowSet = function shadowSet(oldObject, newObject, notifications){ return notifications; } ; var Lorg_eclipse_emf_common_notify_impl_NotifyingListImpl_2_classLit = createForClass('org.eclipse.emf.common.notify.impl', 'NotifyingListImpl', 2091); function NotifyingListImpl$1(this$0, $anonymous0, $anonymous1, $anonymous2, $anonymous3, $anonymous4){ this.this$01 = this$0; NotificationImpl_2.call(this, $anonymous0, $anonymous1, $anonymous2, $anonymous3, $anonymous4); } defineClass(1187, 152, $intern_145, NotifyingListImpl$1); _.getFeature = function getFeature_3(){ return this.this$01.getFeature(); } ; _.getFeatureID = function getFeatureID_3(expectedClass){ return this.this$01.getFeatureID_0(); } ; _.getNotifier = function getNotifier_3(){ return this.this$01.getNotifier(); } ; var Lorg_eclipse_emf_common_notify_impl_NotifyingListImpl$1_2_classLit = createForClass('org.eclipse.emf.common.notify.impl', 'NotifyingListImpl/1', 1187); function AbstractEList$1(this$0, $anonymous0){ this.this$01 = this$0; BasicEList_0.call(this, $anonymous0); } defineClass(966, 66, $intern_141, AbstractEList$1); _.contains = function contains_54(object){ if (this.size_0 > 10) { if (!this.set_0 || this.this$01.modCount != this.expectedModCount) { this.set_0 = new HashSet_1(this); this.expectedModCount = this.modCount; } return $contains_6(this.set_0, object); } else { return $contains_10(this, object); } } ; _.useEquals = function useEquals_0(){ return true; } ; _.expectedModCount = 0; var Lorg_eclipse_emf_common_util_AbstractEList$1_2_classLit = createForClass('org.eclipse.emf.common.util', 'AbstractEList/1', 966); function AbstractEList$BasicIndexOutOfBoundsException(index_0, size_0){ IndexOutOfBoundsException_0.call(this, 'index=' + index_0 + ', size=' + size_0); } defineClass(302, 77, $intern_58, AbstractEList$BasicIndexOutOfBoundsException); var Lorg_eclipse_emf_common_util_AbstractEList$BasicIndexOutOfBoundsException_2_classLit = createForClass('org.eclipse.emf.common.util', 'AbstractEList/BasicIndexOutOfBoundsException', 302); function $doNext(this$static){ var next; try { next = this$static.this$01_2.get_0(this$static.cursor); this$static.checkModCount(); this$static.lastCursor = this$static.cursor++; return next; } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 77)) { this$static.checkModCount(); throw toJs(new NoSuchElementException); } else throw toJs($e0); } } function $remove_36(this$static){ if (this$static.lastCursor == -1) { throw toJs(new IllegalStateException); } this$static.checkModCount(); try { this$static.this$01_2.remove_2(this$static.lastCursor); this$static.expectedModCount = this$static.this$01_2.modCount; this$static.lastCursor < this$static.cursor && --this$static.cursor; this$static.lastCursor = -1; } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 77)) { throw toJs(new ConcurrentModificationException); } else throw toJs($e0); } } function AbstractEList$EIterator(this$0){ this.this$01_2 = this$0; this.expectedModCount = this.this$01_2.modCount; } defineClass(37, 1, $intern_6, AbstractEList$EIterator); _.forEachRemaining = function forEachRemaining_54(consumer){ $forEachRemaining(this, consumer); } ; _.checkModCount = function checkModCount(){ if (this.this$01_2.modCount != this.expectedModCount) { throw toJs(new ConcurrentModificationException); } } ; _.doNext = function doNext(){ return $doNext(this); } ; _.hasNext_0 = function hasNext_43(){ return this.cursor != this.this$01_2.size_1(); } ; _.next_1 = function next_44(){ return this.doNext(); } ; _.remove = function remove_106(){ $remove_36(this); } ; _.cursor = 0; _.expectedModCount = 0; _.lastCursor = -1; var Lorg_eclipse_emf_common_util_AbstractEList$EIterator_2_classLit = createForClass('org.eclipse.emf.common.util', 'AbstractEList/EIterator', 37); function $doAdd_0(this$static, object){ this$static.checkModCount(); try { this$static.this$01_1.add_3(this$static.cursor++, object); this$static.expectedModCount = this$static.this$01_1.modCount; this$static.lastCursor = -1; } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 77)) { throw toJs(new ConcurrentModificationException); } else throw toJs($e0); } } function $doSet(this$static, object){ if (this$static.lastCursor == -1) { throw toJs(new IllegalStateException); } this$static.checkModCount(); try { this$static.this$01_1.set_2(this$static.lastCursor, object); this$static.expectedModCount = this$static.this$01_1.modCount; } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 77)) { throw toJs(new ConcurrentModificationException); } else throw toJs($e0); } } function AbstractEList$EListIterator(this$0){ this.this$01_1 = this$0; AbstractEList$EIterator.call(this, this$0); } function AbstractEList$EListIterator_0(this$0, index_0){ this.this$01_1 = this$0; AbstractEList$EIterator.call(this, this$0); this.cursor = index_0; } defineClass(286, 37, $intern_14, AbstractEList$EListIterator, AbstractEList$EListIterator_0); _.remove = function remove_107(){ $remove_36(this); } ; _.add_1 = function add_51(object){ $doAdd_0(this, object); } ; _.doPrevious = function doPrevious(){ var previous; try { previous = this.this$01_1.get_0(--this.cursor); this.checkModCount(); this.lastCursor = this.cursor; return previous; } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 77)) { this.checkModCount(); throw toJs(new NoSuchElementException); } else throw toJs($e0); } } ; _.doSet = function doSet(object){ $doSet(this, object); } ; _.hasPrevious = function hasPrevious_7(){ return this.cursor != 0; } ; _.nextIndex_0 = function nextIndex_8(){ return this.cursor; } ; _.previous_0 = function previous_8(){ return this.doPrevious(); } ; _.previousIndex = function previousIndex_7(){ return this.cursor - 1; } ; _.set_1 = function set_22(object){ this.doSet(object); } ; var Lorg_eclipse_emf_common_util_AbstractEList$EListIterator_2_classLit = createForClass('org.eclipse.emf.common.util', 'AbstractEList/EListIterator', 286); function $doNext_0(this$static){ var next; try { next = this$static.this$01_0.primitiveGet(this$static.cursor); this$static.checkModCount(); this$static.lastCursor = this$static.cursor++; return next; } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 77)) { this$static.checkModCount(); throw toJs(new NoSuchElementException); } else throw toJs($e0); } } function AbstractEList$NonResolvingEIterator(this$0){ this.this$01_0 = this$0; AbstractEList$EIterator.call(this, this$0); } defineClass(355, 37, $intern_6, AbstractEList$NonResolvingEIterator); _.doNext = function doNext_0(){ return $doNext_0(this); } ; _.remove = function remove_108(){ throw toJs(new UnsupportedOperationException); } ; var Lorg_eclipse_emf_common_util_AbstractEList$NonResolvingEIterator_2_classLit = createForClass('org.eclipse.emf.common.util', 'AbstractEList/NonResolvingEIterator', 355); function AbstractEList$NonResolvingEListIterator(this$0){ this.this$01_0 = this$0; AbstractEList$EListIterator.call(this, this$0); } function AbstractEList$NonResolvingEListIterator_0(this$0, index_0){ this.this$01_0 = this$0; AbstractEList$EListIterator_0.call(this, this$0, index_0); } defineClass(398, 286, $intern_14, AbstractEList$NonResolvingEListIterator, AbstractEList$NonResolvingEListIterator_0); _.add_1 = function add_52(object){ throw toJs(new UnsupportedOperationException); } ; _.doNext = function doNext_1(){ var next; try { next = this.this$01_0.primitiveGet(this.cursor); this.checkModCount(); this.lastCursor = this.cursor++; return next; } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 77)) { this.checkModCount(); throw toJs(new NoSuchElementException); } else throw toJs($e0); } } ; _.doPrevious = function doPrevious_0(){ var previous; try { previous = this.this$01_0.primitiveGet(--this.cursor); this.checkModCount(); this.lastCursor = this.cursor; return previous; } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 77)) { this.checkModCount(); throw toJs(new NoSuchElementException); } else throw toJs($e0); } } ; _.remove = function remove_109(){ throw toJs(new UnsupportedOperationException); } ; _.set_1 = function set_23(object){ throw toJs(new UnsupportedOperationException); } ; var Lorg_eclipse_emf_common_util_AbstractEList$NonResolvingEListIterator_2_classLit = createForClass('org.eclipse.emf.common.util', 'AbstractEList/NonResolvingEListIterator', 398); function newInstance_11(componentType, size_0){ var helper; helper = castTo($get_10(($clinit_Reflect() , HELPER_REGISTRY), componentType), 57); return helper?helper.newArrayInstance(size_0):initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, size_0, 5, 1); } function $clinit_ArrayDelegatingEList(){ $clinit_ArrayDelegatingEList = emptyMethod; EMPTY_ARRAY = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, 0, 5, 1); } function $assign_0(data_0, index_0, object){ setCheck(data_0, index_0, object); return object; } function $copy_0(this$static){ var data_0, newData; data_0 = castTo($getField(this$static.this$01, 4), 129); if (data_0 != null) { newData = initUnidimensionalArray(Lorg_eclipse_emf_common_notify_Adapter_2_classLit, $intern_146, 424, data_0.length, 0, 1); arraycopy(data_0, 0, newData, 0, data_0.length); return newData; } else { return EMPTY_ARRAY; } } function $grow(this$static, size_0){ var data_0, oldData; oldData = castTo($getField(this$static.this$01, 4), 129); data_0 = initUnidimensionalArray(Lorg_eclipse_emf_common_notify_Adapter_2_classLit, $intern_146, 424, size_0, 0, 1); oldData != null && arraycopy(oldData, 0, data_0, 0, oldData.length); return data_0; } function $remove_37(this$static, index_0){ var data_0, newData, oldObject, shifted, size_0; data_0 = castTo($getField(this$static.this$01, 4), 129); size_0 = data_0 == null?0:data_0.length; if (index_0 >= size_0) throw toJs(new AbstractEList$BasicIndexOutOfBoundsException(index_0, size_0)); oldObject = data_0[index_0]; if (size_0 == 1) { newData = null; } else { newData = initUnidimensionalArray(Lorg_eclipse_emf_common_notify_Adapter_2_classLit, $intern_146, 424, size_0 - 1, 0, 1); arraycopy(data_0, 0, newData, 0, index_0); shifted = size_0 - index_0 - 1; shifted > 0 && arraycopy(data_0, index_0 + 1, newData, index_0, shifted); } $setData(this$static, newData); $didRemove_0(this$static, index_0, oldObject); return oldObject; } defineClass(2080, 70, $intern_147); _.addAllUnique = function addAllUnique_7(index_0, collection){ var currentIndex, data_0, growth, i, i0, object, objects, oldData, oldSize, shifted, size_0; growth = collection.size_1(); if (growth != 0) { oldData = castTo($getField(this.this$01, 4), 129); oldSize = oldData == null?0:oldData.length; size_0 = oldSize + growth; data_0 = $grow(this, size_0); shifted = oldSize - index_0; shifted > 0 && arraycopy(oldData, index_0, data_0, index_0 + growth, shifted); objects = collection.iterator_0(); for (i0 = 0; i0 < growth; ++i0) { object = objects.next_1(); currentIndex = index_0 + i0; $assign_0(data_0, currentIndex, $validate(this, object)); } $setData(this, data_0); for (i = 0; i < growth; ++i) { object = data_0[index_0]; this.didAdd(index_0, object); ++index_0; } return true; } else { ++this.modCount; return false; } } ; _.addAllUnique_0 = function addAllUnique_8(collection){ var data_0, data0, growth, i, i0, object, objects, oldSize, size_0; growth = collection.size_1(); if (growth != 0) { oldSize = (data0 = castTo($getField(this.this$01, 4), 129) , data0 == null?0:data0.length); size_0 = oldSize + growth; data_0 = $grow(this, size_0); objects = collection.iterator_0(); for (i0 = oldSize; i0 < size_0; ++i0) { object = objects.next_1(); $assign_0(data_0, i0, $validate(this, object)); } $setData(this, data_0); for (i = oldSize; i < size_0; ++i) { object = data_0[i]; this.didAdd(i, object); } return true; } else { ++this.modCount; return false; } } ; _.addUnique = function addUnique_7(index_0, object){ var data_0, oldData, size_0, validatedObject; oldData = castTo($getField(this.this$01, 4), 129); size_0 = oldData == null?0:oldData.length; data_0 = $grow(this, size_0 + 1); validatedObject = $validate(this, object); index_0 != size_0 && arraycopy(oldData, index_0, data_0, index_0 + 1, size_0 - index_0); setCheck(data_0, index_0, validatedObject); $setData(this, data_0); this.didAdd(index_0, object); } ; _.addUnique_0 = function addUnique_8(object){ var data_0, data0, size_0; size_0 = (data0 = castTo($getField(this.this$01, 4), 129) , data0 == null?0:data0.length); data_0 = $grow(this, size_0 + 1); $assign_0(data_0, size_0, $validate(this, object)); $setData(this, data_0); this.didAdd(size_0, object); } ; _.basicIterator = function basicIterator_0(){ return new ArrayDelegatingEList$NonResolvingEIterator(this); } ; _.basicListIterator = function basicListIterator_1(){ return new ArrayDelegatingEList$NonResolvingEListIterator(this); } ; _.basicListIterator_0 = function basicListIterator_2(index_0){ var data_0, size_0; size_0 = (data_0 = castTo($getField(this.this$01, 4), 129) , data_0 == null?0:data_0.length); if (index_0 < 0 || index_0 > size_0) throw toJs(new AbstractEList$BasicIndexOutOfBoundsException(index_0, size_0)); return new ArrayDelegatingEList$NonResolvingEListIterator_0(this, index_0); } ; _.clear_0 = function clear_56(){ var oldData, oldSize; ++this.modCount; oldData = castTo($getField(this.this$01, 4), 129); oldSize = oldData == null?0:oldData.length; $setData(this, null); $didClear(this, oldSize, oldData); } ; _.contains = function contains_55(object){ var data_0, datum, datum$array, datum$index, datum$max; data_0 = castTo($getField(this.this$01, 4), 129); if (data_0 != null) { if (object != null) { for (datum$array = data_0 , datum$index = 0 , datum$max = datum$array.length; datum$index < datum$max; ++datum$index) { datum = datum$array[datum$index]; if (equals_Ljava_lang_Object__Z__devirtual$(object, datum)) { return true; } } } else { for (datum$array = data_0 , datum$index = 0 , datum$max = datum$array.length; datum$index < datum$max; ++datum$index) { datum = datum$array[datum$index]; if (maskUndefined(datum) === maskUndefined(object)) { return true; } } } } return false; } ; _.get_0 = function get_54(index_0){ var data_0, size_0; data_0 = castTo($getField(this.this$01, 4), 129); size_0 = data_0 == null?0:data_0.length; if (index_0 >= size_0) throw toJs(new AbstractEList$BasicIndexOutOfBoundsException(index_0, size_0)); return data_0[index_0]; } ; _.indexOf_0 = function indexOf_10(object){ var data_0, i, size_0; data_0 = castTo($getField(this.this$01, 4), 129); if (data_0 != null) { if (object != null) { for (i = 0 , size_0 = data_0.length; i < size_0; ++i) { if (equals_Ljava_lang_Object__Z__devirtual$(object, data_0[i])) { return i; } } } else { for (i = 0 , size_0 = data_0.length; i < size_0; ++i) { if (maskUndefined(data_0[i]) === maskUndefined(object)) { return i; } } } } return -1; } ; _.isEmpty = function isEmpty_28(){ return castTo($getField(this.this$01, 4), 129) == null; } ; _.iterator_0 = function iterator_80(){ return new ArrayDelegatingEList$EIterator(this); } ; _.listIterator_0 = function listIterator_19(){ return new ArrayDelegatingEList$EListIterator(this); } ; _.listIterator_1 = function listIterator_20(index_0){ var data_0, size_0; size_0 = (data_0 = castTo($getField(this.this$01, 4), 129) , data_0 == null?0:data_0.length); if (index_0 < 0 || index_0 > size_0) throw toJs(new AbstractEList$BasicIndexOutOfBoundsException(index_0, size_0)); return new ArrayDelegatingEList$EListIterator_0(this, index_0); } ; _.move = function move_5(targetIndex, sourceIndex){ var data_0, object, size_0; data_0 = $copy_0(this); size_0 = data_0 == null?0:data_0.length; if (targetIndex >= size_0) throw toJs(new IndexOutOfBoundsException_0('targetIndex=' + targetIndex + ', size=' + size_0)); if (sourceIndex >= size_0) throw toJs(new IndexOutOfBoundsException_0('sourceIndex=' + sourceIndex + ', size=' + size_0)); object = data_0[sourceIndex]; if (targetIndex != sourceIndex) { targetIndex < sourceIndex?arraycopy(data_0, targetIndex, data_0, targetIndex + 1, sourceIndex - targetIndex):arraycopy(data_0, sourceIndex + 1, data_0, sourceIndex, targetIndex - sourceIndex); setCheck(data_0, targetIndex, object); $setData(this, data_0); } return object; } ; _.primitiveGet = function primitiveGet_1(index_0){ return castTo($getField(this.this$01, 4), 129)[index_0]; } ; _.remove_2 = function remove_110(index_0){ return $remove_37(this, index_0); } ; _.setUnique = function setUnique_3(index_0, object){ var data_0, oldObject; data_0 = $copy_0(this); oldObject = data_0[index_0]; $assign_0(data_0, index_0, $validate(this, object)); $setData(this, data_0); return oldObject; } ; _.size_1 = function size_68(){ var data_0; return data_0 = castTo($getField(this.this$01, 4), 129) , data_0 == null?0:data_0.length; } ; _.toArray = function toArray_30(){ var data_0, result, size_0; data_0 = castTo($getField(this.this$01, 4), 129); size_0 = data_0 == null?0:data_0.length; result = initUnidimensionalArray(Lorg_eclipse_emf_common_notify_Adapter_2_classLit, $intern_146, 424, size_0, 0, 1); size_0 > 0 && arraycopy(data_0, 0, result, 0, size_0); return result; } ; _.toArray_0 = function toArray_31(array){ var data_0, newArray, size_0; data_0 = castTo($getField(this.this$01, 4), 129); size_0 = data_0 == null?0:data_0.length; if (size_0 > 0) { if (array.length < size_0) { newArray = newInstance_11(getClass__Ljava_lang_Class___devirtual$(array).componentType, size_0); array = newArray; } arraycopy(data_0, 0, array, 0, size_0); } array.length > size_0 && setCheck(array, size_0, null); return array; } ; var EMPTY_ARRAY; var Lorg_eclipse_emf_common_util_ArrayDelegatingEList_2_classLit = createForClass('org.eclipse.emf.common.util', 'ArrayDelegatingEList', 2080); function ArrayDelegatingEList$EIterator(this$0){ this.this$01 = this$0; AbstractEList$EIterator.call(this, this$0); this.expectedData = castTo($getField(this.this$01.this$01, 4), 129); } defineClass(1051, 37, $intern_6, ArrayDelegatingEList$EIterator); _.checkModCount = function checkModCount_0(){ if (this.this$01.modCount != this.expectedModCount || maskUndefined(castTo($getField(this.this$01.this$01, 4), 129)) !== maskUndefined(this.expectedData)) { throw toJs(new ConcurrentModificationException); } } ; _.remove = function remove_111(){ $remove_36(this); this.expectedData = castTo($getField(this.this$01.this$01, 4), 129); } ; var Lorg_eclipse_emf_common_util_ArrayDelegatingEList$EIterator_2_classLit = createForClass('org.eclipse.emf.common.util', 'ArrayDelegatingEList/EIterator', 1051); function $$init_9(this$static){ this$static.expectedData = castTo($getField(this$static.this$01.this$01, 4), 129); } function ArrayDelegatingEList$EListIterator(this$0){ this.this$01 = this$0; AbstractEList$EListIterator.call(this, this$0); $$init_9(this); } function ArrayDelegatingEList$EListIterator_0(this$0, index_0){ this.this$01 = this$0; AbstractEList$EListIterator_0.call(this, this$0, index_0); $$init_9(this); } defineClass(722, 286, $intern_14, ArrayDelegatingEList$EListIterator, ArrayDelegatingEList$EListIterator_0); _.checkModCount = function checkModCount_1(){ if (this.this$01.modCount != this.expectedModCount || maskUndefined(castTo($getField(this.this$01.this$01, 4), 129)) !== maskUndefined(this.expectedData)) { throw toJs(new ConcurrentModificationException); } } ; _.doSet = function doSet_0(object){ $doSet(this, object); this.expectedData = castTo($getField(this.this$01.this$01, 4), 129); } ; _.remove = function remove_112(){ $remove_36(this); this.expectedData = castTo($getField(this.this$01.this$01, 4), 129); } ; var Lorg_eclipse_emf_common_util_ArrayDelegatingEList$EListIterator_2_classLit = createForClass('org.eclipse.emf.common.util', 'ArrayDelegatingEList/EListIterator', 722); function ArrayDelegatingEList$NonResolvingEIterator(this$0){ this.this$01 = this$0; AbstractEList$NonResolvingEIterator.call(this, this$0); this.expectedData = castTo($getField(this.this$01.this$01, 4), 129); } defineClass(1052, 355, $intern_6, ArrayDelegatingEList$NonResolvingEIterator); _.checkModCount = function checkModCount_2(){ if (this.this$01.modCount != this.expectedModCount || maskUndefined(castTo($getField(this.this$01.this$01, 4), 129)) !== maskUndefined(this.expectedData)) { throw toJs(new ConcurrentModificationException); } } ; var Lorg_eclipse_emf_common_util_ArrayDelegatingEList$NonResolvingEIterator_2_classLit = createForClass('org.eclipse.emf.common.util', 'ArrayDelegatingEList/NonResolvingEIterator', 1052); function $$init_10(this$static){ this$static.expectedData = castTo($getField(this$static.this$01.this$01, 4), 129); } function ArrayDelegatingEList$NonResolvingEListIterator(this$0){ this.this$01 = this$0; AbstractEList$NonResolvingEListIterator.call(this, this$0); $$init_10(this); } function ArrayDelegatingEList$NonResolvingEListIterator_0(this$0, index_0){ this.this$01 = this$0; AbstractEList$NonResolvingEListIterator_0.call(this, this$0, index_0); $$init_10(this); } defineClass(723, 398, $intern_14, ArrayDelegatingEList$NonResolvingEListIterator, ArrayDelegatingEList$NonResolvingEListIterator_0); _.checkModCount = function checkModCount_3(){ if (this.this$01.modCount != this.expectedModCount || maskUndefined(castTo($getField(this.this$01.this$01, 4), 129)) !== maskUndefined(this.expectedData)) { throw toJs(new ConcurrentModificationException); } } ; var Lorg_eclipse_emf_common_util_ArrayDelegatingEList$NonResolvingEListIterator_2_classLit = createForClass('org.eclipse.emf.common.util', 'ArrayDelegatingEList/NonResolvingEListIterator', 723); function BasicEList$BasicIndexOutOfBoundsException(index_0, size_0){ AbstractEList$BasicIndexOutOfBoundsException.call(this, index_0, size_0); } defineClass(615, 302, $intern_58, BasicEList$BasicIndexOutOfBoundsException); var Lorg_eclipse_emf_common_util_BasicEList$BasicIndexOutOfBoundsException_2_classLit = createForClass('org.eclipse.emf.common.util', 'BasicEList/BasicIndexOutOfBoundsException', 615); function BasicEList$UnmodifiableEList(size_0, data_0){ this.size_0 = size_0; this.data_0 = data_0; } defineClass(710, 66, $intern_141, BasicEList$UnmodifiableEList); _.add_3 = function add_53(index_0, object){ throw toJs(new UnsupportedOperationException); } ; _.add_2 = function add_54(object){ throw toJs(new UnsupportedOperationException); } ; _.addAll_0 = function addAll_26(index_0, collection){ throw toJs(new UnsupportedOperationException); } ; _.addAll = function addAll_27(collection){ throw toJs(new UnsupportedOperationException); } ; _.clear_0 = function clear_57(){ throw toJs(new UnsupportedOperationException); } ; _.grow = function grow_0(minimumCapacity){ throw toJs(new UnsupportedOperationException); } ; _.iterator_0 = function iterator_81(){ return this.basicIterator(); } ; _.listIterator_0 = function listIterator_21(){ return this.basicListIterator(); } ; _.listIterator_1 = function listIterator_22(index_0){ return this.basicListIterator_0(index_0); } ; _.move = function move_6(targetIndex, sourceIndex){ throw toJs(new UnsupportedOperationException); } ; _.move_0 = function move_7(index_0, object){ throw toJs(new UnsupportedOperationException); } ; _.remove_2 = function remove_113(index_0){ throw toJs(new UnsupportedOperationException); } ; _.remove_1 = function remove_114(object){ throw toJs(new UnsupportedOperationException); } ; _.set_2 = function set_24(index_0, object){ throw toJs(new UnsupportedOperationException); } ; var Lorg_eclipse_emf_common_util_BasicEList$UnmodifiableEList_2_classLit = createForClass('org.eclipse.emf.common.util', 'BasicEList/UnmodifiableEList', 710); function $add_24(this$static, index_0, object){ this$static.delegateEList.add_3(index_0, castTo(object, 136)); } function $add_25(this$static, object){ return this$static.delegateEList.add_2(castTo(object, 136)); } function $containsKey_7(this$static, key){ var entryIndex, hash, index_0; if (this$static.size_0 > 0) { this$static.ensureEntryDataExists(); hash = key == null?0:hashCode__I__devirtual$(key); index_0 = (hash & $intern_0) % this$static.entryData.length; entryIndex = $entryIndexForKey(this$static, index_0, hash, key); return entryIndex != -1; } else { return false; } } function $containsValue_4(this$static, value_0){ var eList, entries, entry, i, j, size_0; if (this$static.size_0 > 0) { this$static.ensureEntryDataExists(); if (value_0 != null) { for (i = 0; i < this$static.entryData.length; ++i) { eList = this$static.entryData[i]; if (eList) { entries = castTo(eList.data_0, 379); size_0 = eList.size_0; for (j = 0; j < size_0; ++j) { entry = entries[j]; if (equals_Ljava_lang_Object__Z__devirtual$(value_0, entry.getValue())) { return true; } } } } } else { for (i = 0; i < this$static.entryData.length; ++i) { eList = this$static.entryData[i]; if (eList) { entries = castTo(eList.data_0, 379); size_0 = eList.size_0; for (j = 0; j < size_0; ++j) { entry = entries[j]; if (maskUndefined(value_0) === maskUndefined(entry.getValue())) { return true; } } } } } } return false; } function $didClear_0(oldEntryData){ var eList, i, j, size_0; if (oldEntryData != null) { for (i = 0; i < oldEntryData.length; ++i) { eList = oldEntryData[i]; if (eList) { castTo(eList.data_0, 379); size_0 = eList.size_0; for (j = 0; j < size_0; ++j) ; } } } } function $doClear_0(this$static){ var oldEntryData; if (this$static.entryData == null) { ++this$static.modCount; this$static.size_0 = 0; $didClear_0(null); } else { ++this$static.modCount; oldEntryData = this$static.entryData; this$static.entryData = null; this$static.size_0 = 0; $didClear_0(oldEntryData); } } function $doPut(this$static, entry){ var eList, hash, index_0; if (this$static.entryData == null) { ++this$static.modCount; ++this$static.size_0; } else { hash = entry.getHash(); $grow_0(this$static, this$static.size_0 + 1); index_0 = (hash & $intern_0) % this$static.entryData.length; eList = this$static.entryData[index_0]; !eList && (eList = this$static.entryData[index_0] = this$static.newList()); eList.add_2(entry); ++this$static.size_0; } } function $doRemove(this$static, entry){ var hash, index_0, key; if (this$static.entryData == null) { ++this$static.modCount; --this$static.size_0; } else { key = entry.getKey(); hash = entry.getHash(); index_0 = (hash & $intern_0) % this$static.entryData.length; $removeEntry_0(this$static, index_0, $entryIndexForKey(this$static, index_0, hash, key)); } } function $entryForKey(this$static, index_0, hash, key){ var eList, entries, entry, j, size_0; eList = this$static.entryData[index_0]; if (eList) { entries = eList.data_0; size_0 = eList.size_0; if (key != null) { for (j = 0; j < size_0; ++j) { entry = castTo(entries[j], 136); if (entry.getHash() == hash && equals_Ljava_lang_Object__Z__devirtual$(key, entry.getKey())) { return entry; } } } else { for (j = 0; j < size_0; ++j) { entry = castTo(entries[j], 136); if (maskUndefined(entry.getKey()) === maskUndefined(key)) { return entry; } } } } return null; } function $entryIndexForKey(this$static, index_0, hash, key){ var eList, entries, entry, j, size_0; if (key != null) { eList = this$static.entryData[index_0]; if (eList) { entries = eList.data_0; size_0 = eList.size_0; for (j = 0; j < size_0; ++j) { entry = castTo(entries[j], 136); if (entry.getHash() == hash && equals_Ljava_lang_Object__Z__devirtual$(key, entry.getKey())) { return j; } } } } else { eList = this$static.entryData[index_0]; if (eList) { entries = eList.data_0; size_0 = eList.size_0; for (j = 0; j < size_0; ++j) { entry = castTo(entries[j], 136); if (maskUndefined(entry.getKey()) === maskUndefined(key)) { return j; } } } } return -1; } function $entrySet_3(this$static){ !this$static.view && (this$static.view = new BasicEMap$View); !this$static.view.entrySet && (this$static.view.entrySet = new BasicEMap$5(this$static)); return this$static.view.entrySet; } function $equals_12(this$static, object){ return instanceOf(object, 15) && $equals_11(this$static.delegateEList, object); } function $get_21(this$static, key){ var entry, hash, index_0; if (this$static.size_0 > 0) { this$static.ensureEntryDataExists(); hash = key == null?0:hashCode__I__devirtual$(key); index_0 = (hash & $intern_0) % this$static.entryData.length; entry = $entryForKey(this$static, index_0, hash, key); if (entry) { return entry.getValue(); } } return null; } function $grow_0(this$static, minimumCapacity){ var eList, entries, entry, i, index_0, j, oldCapacity, oldEList, oldEntryData, size_0; ++this$static.modCount; oldCapacity = this$static.entryData == null?0:this$static.entryData.length; if (minimumCapacity > oldCapacity) { oldEntryData = this$static.entryData; this$static.entryData = initUnidimensionalArray(Lorg_eclipse_emf_common_util_BasicEList_2_classLit, $intern_148, 66, 2 * oldCapacity + 4, 0, 1); for (i = 0; i < oldCapacity; ++i) { oldEList = oldEntryData[i]; if (oldEList) { entries = oldEList.data_0; size_0 = oldEList.size_0; for (j = 0; j < size_0; ++j) { entry = castTo(entries[j], 136); index_0 = $indexOf_5(this$static, entry.getHash()); eList = this$static.entryData[index_0]; !eList && (eList = this$static.entryData[index_0] = this$static.newList()); eList.add_2(entry); } } } return true; } else { return false; } } function $hashOf(key){ return key == null?0:hashCode__I__devirtual$(key); } function $indexOf_5(this$static, hash){ return (hash & $intern_0) % this$static.entryData.length; } function $keySet_2(this$static){ !this$static.view && (this$static.view = new BasicEMap$View); !this$static.view.keySet && (this$static.view.keySet = new BasicEMap$3(this$static)); return this$static.view.keySet; } function $map_0(this$static){ !this$static.view && (this$static.view = new BasicEMap$View); !this$static.view.map_0 && (this$static.view.map_0 = new BasicEMap$DelegatingMap(this$static)); return this$static.view.map_0; } function $move_2(this$static, index_0, object){ this$static.delegateEList.move_0(index_0, castTo(object, 136)); } function $put_14(this$static, key, value_0){ var entry, entry0, hash, index_0, result; this$static.ensureEntryDataExists(); hash = key == null?0:hashCode__I__devirtual$(key); if (this$static.size_0 > 0) { index_0 = (hash & $intern_0) % this$static.entryData.length; entry0 = $entryForKey(this$static, index_0, hash, key); if (entry0) { result = entry0.setValue(value_0); return result; } } entry = this$static.newEntry(hash, key, value_0); this$static.delegateEList.add_2(entry); return null; } function $putAll_1(this$static, map_0){ var entry, entry$iterator; for (entry$iterator = map_0.entrySet_0().iterator_0(); entry$iterator.hasNext_0();) { entry = castTo(entry$iterator.next_1(), 44); $put_14(this$static, entry.getKey(), entry.getValue()); } } function $remove_38(this$static, object){ var result; if (instanceOf(object, 44)) { return this$static.delegateEList.remove_1(object); } else { result = $containsKey_7(this$static, object); $removeKey(this$static, object); return result; } } function $removeEntry_0(this$static, index_0, entryIndex){ var entry; ++this$static.modCount; --this$static.size_0; entry = castTo(this$static.entryData[index_0].remove_2(entryIndex), 136); return entry.getValue(); } function $removeKey(this$static, key){ var entry, hash, index_0; this$static.ensureEntryDataExists(); hash = key == null?0:hashCode__I__devirtual$(key); index_0 = (hash & $intern_0) % this$static.entryData.length; entry = $entryForKey(this$static, index_0, hash, key); if (entry) { $remove_38(this$static, entry); return entry.getValue(); } else { return null; } } function $set_11(this$static, index_0, object){ return castTo(this$static.delegateEList.set_2(index_0, castTo(object, 136)), 44); } function $values_3(this$static){ !this$static.view && (this$static.view = new BasicEMap$View); !this$static.view.values && (this$static.view.values = new BasicEMap$4(this$static)); return this$static.view.values; } defineClass(721, 1, {3:1, 20:1, 16:1, 15:1, 61:1, 597:1}); _.add_3 = function add_55(index_0, object){ $add_24(this, index_0, castTo(object, 44)); } ; _.add_2 = function add_56(object){ return $add_25(this, castTo(object, 44)); } ; _.forEach_0 = function forEach_37(action){ $forEach_0(this, action); } ; _.get_0 = function get_55(index_0){ return castTo($get_20(this.delegateEList, index_0), 136); } ; _.move = function move_8(targetIndex, sourceIndex){ return castTo(this.delegateEList.move(targetIndex, sourceIndex), 44); } ; _.move_0 = function move_9(index_0, object){ $move_2(this, index_0, castTo(object, 44)); } ; _.parallelStream = function parallelStream_5(){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(this, 16)); } ; _.remove_2 = function remove_115(index_0){ return castTo(this.delegateEList.remove_2(index_0), 44); } ; _.set_2 = function set_25(index_0, object){ return $set_11(this, index_0, castTo(object, 44)); } ; _.sort_0 = function sort_13(c){ $sort_0(this, c); } ; _.spliterator_0 = function spliterator_38(){ return new Spliterators$IteratorSpliterator(this, 16); } ; _.stream = function stream_7(){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(this, 16)); } ; _.addAll_0 = function addAll_28(index_0, collection){ return this.delegateEList.addAll_0(index_0, collection); } ; _.addAll = function addAll_29(collection){ return this.delegateEList.addAll(collection); } ; _.clear_0 = function clear_58(){ this.delegateEList.clear_0(); } ; _.contains = function contains_56(object){ return this.delegateEList.contains(object); } ; _.containsAll = function containsAll_12(collection){ return $containsAll(this.delegateEList, collection); } ; _.ensureEntryDataExists = function ensureEntryDataExists(){ var entry, entry$iterator, oldModCount; if (this.entryData == null) { this.entryData = initUnidimensionalArray(Lorg_eclipse_emf_common_util_BasicEList_2_classLit, $intern_148, 66, 2 * this.size_0 + 1, 0, 1); oldModCount = this.modCount; this.size_0 = 0; for (entry$iterator = this.delegateEList.iterator_0(); entry$iterator.cursor != entry$iterator.this$01_2.size_1();) { entry = castTo(entry$iterator.doNext(), 136); $doPut(this, entry); } this.modCount = oldModCount; } } ; _.equals_0 = function equals_216(object){ return $equals_12(this, object); } ; _.hashCode_1 = function hashCode_78(){ return $hashCode_4(this.delegateEList); } ; _.indexOf_0 = function indexOf_11(object){ return this.delegateEList.indexOf_0(object); } ; _.initializeDelegateEList = function initializeDelegateEList(){ this.delegateEList = new BasicEMap$1(this); } ; _.isEmpty = function isEmpty_29(){ return this.size_0 == 0; } ; _.iterator_0 = function iterator_82(){ return this.delegateEList.iterator_0(); } ; _.listIterator_0 = function listIterator_23(){ return this.delegateEList.listIterator_0(); } ; _.listIterator_1 = function listIterator_24(index_0){ return this.delegateEList.listIterator_1(index_0); } ; _.map_2 = function map_5(){ return $map_0(this); } ; _.newEntry = function newEntry_0(hash, key, value_0){ return new BasicEMap$EntryImpl(hash, key, value_0); } ; _.newList = function newList(){ return new BasicEMap$2; } ; _.remove_1 = function remove_116(object){ return $remove_38(this, object); } ; _.size_1 = function size_69(){ return this.size_0; } ; _.subList = function subList_10(start_0, end){ return new AbstractList$SubList(this.delegateEList, start_0, end); } ; _.toArray = function toArray_32(){ return this.delegateEList.toArray(); } ; _.toArray_0 = function toArray_33(array){ return this.delegateEList.toArray_0(array); } ; _.toString_0 = function toString_139(){ return $toString_25(this.delegateEList); } ; _.modCount = 0; _.size_0 = 0; var Lorg_eclipse_emf_common_util_BasicEMap_2_classLit = createForClass('org.eclipse.emf.common.util', 'BasicEMap', 721); function $didAdd(this$static, newObject){ $doPut(this$static.this$01, newObject); } function $didRemove(this$static, oldObject){ $doRemove(this$static.this$01, oldObject); } function $didSet(this$static, newObject, oldObject){ $doRemove(this$static.this$01, oldObject); $doPut(this$static.this$01, newObject); } function BasicEMap$1(this$0){ this.this$01 = this$0; } defineClass(1046, 66, $intern_141, BasicEMap$1); _.didAdd = function didAdd_0(index_0, newObject){ $didAdd(this, castTo(newObject, 136)); } ; _.didMove = function didMove_0(index_0, movedObject, oldIndex){ var lastArg; ++(lastArg = this , castTo(movedObject, 136) , lastArg).this$01.modCount; } ; _.didRemove = function didRemove_0(index_0, oldObject){ $didRemove(this, castTo(oldObject, 136)); } ; _.didSet = function didSet_0(index_0, newObject, oldObject){ $didSet(this, castTo(newObject, 136), castTo(oldObject, 136)); } ; _.didClear = function didClear_0(size_0, oldObjects){ $doClear_0(this.this$01); } ; var Lorg_eclipse_emf_common_util_BasicEMap$1_2_classLit = createForClass('org.eclipse.emf.common.util', 'BasicEMap/1', 1046); function BasicEMap$2(){ } defineClass(1047, 66, $intern_141, BasicEMap$2); _.newData = function newData_2(listCapacity){ return initUnidimensionalArray(Lorg_eclipse_emf_common_util_BasicEMap$EntryImpl_2_classLit, $intern_149, 621, listCapacity, 0, 1); } ; var Lorg_eclipse_emf_common_util_BasicEMap$2_2_classLit = createForClass('org.eclipse.emf.common.util', 'BasicEMap/2', 1047); function BasicEMap$3(this$0){ this.this$01 = this$0; } defineClass(1048, $intern_9, $intern_10, BasicEMap$3); _.clear_0 = function clear_59(){ this.this$01.delegateEList.clear_0(); } ; _.contains = function contains_57(key){ return $containsKey_7(this.this$01, key); } ; _.iterator_0 = function iterator_83(){ return this.this$01.size_0 == 0?($clinit_ECollections() , EMPTY_ELIST.listIterator):new BasicEMap$BasicEMapKeyIterator(this.this$01); } ; _.remove_1 = function remove_117(key){ var oldSize; oldSize = this.this$01.size_0; $removeKey(this.this$01, key); return this.this$01.size_0 != oldSize; } ; _.size_1 = function size_70(){ return this.this$01.size_0; } ; var Lorg_eclipse_emf_common_util_BasicEMap$3_2_classLit = createForClass('org.eclipse.emf.common.util', 'BasicEMap/3', 1048); function BasicEMap$4(this$0){ this.this$01 = this$0; } defineClass(1049, 31, $intern_8, BasicEMap$4); _.clear_0 = function clear_60(){ this.this$01.delegateEList.clear_0(); } ; _.contains = function contains_58(value_0){ return $containsValue_4(this.this$01, value_0); } ; _.iterator_0 = function iterator_84(){ return this.this$01.size_0 == 0?($clinit_ECollections() , EMPTY_ELIST.listIterator):new BasicEMap$BasicEMapValueIterator(this.this$01); } ; _.size_1 = function size_71(){ return this.this$01.size_0; } ; var Lorg_eclipse_emf_common_util_BasicEMap$4_2_classLit = createForClass('org.eclipse.emf.common.util', 'BasicEMap/4', 1049); function $remove_39(this$static, object){ var eList, entries, entry, hash, index_0, j, key, otherEntry, size_0; if (this$static.this$01.size_0 > 0 && instanceOf(object, 44)) { this$static.this$01.ensureEntryDataExists(); otherEntry = castTo(object, 44); key = otherEntry.getKey(); hash = key == null?0:hashCode__I__devirtual$(key); index_0 = $indexOf_5(this$static.this$01, hash); eList = this$static.this$01.entryData[index_0]; if (eList) { entries = castTo(eList.data_0, 379); size_0 = eList.size_0; for (j = 0; j < size_0; ++j) { entry = entries[j]; if (entry.getHash() == hash && entry.equals_0(otherEntry)) { $remove_39(this$static, otherEntry); return true; } } } } return false; } function BasicEMap$5(this$0){ this.this$01 = this$0; } defineClass(1050, $intern_9, $intern_10, BasicEMap$5); _.clear_0 = function clear_61(){ this.this$01.delegateEList.clear_0(); } ; _.contains = function contains_59(object){ var eList, entries, entry, hash, index_0, j, key, otherEntry, size_0; if (this.this$01.size_0 > 0 && instanceOf(object, 44)) { this.this$01.ensureEntryDataExists(); otherEntry = castTo(object, 44); key = otherEntry.getKey(); hash = key == null?0:hashCode__I__devirtual$(key); index_0 = $indexOf_5(this.this$01, hash); eList = this.this$01.entryData[index_0]; if (eList) { entries = castTo(eList.data_0, 379); size_0 = eList.size_0; for (j = 0; j < size_0; ++j) { entry = entries[j]; if (entry.getHash() == hash && entry.equals_0(otherEntry)) { return true; } } } } return false; } ; _.iterator_0 = function iterator_85(){ return this.this$01.size_0 == 0?($clinit_ECollections() , EMPTY_ELIST.listIterator):new BasicEMap$BasicEMapIterator(this.this$01); } ; _.remove_1 = function remove_118(object){ return $remove_39(this, object); } ; _.size_1 = function size_72(){ return this.this$01.size_0; } ; var Lorg_eclipse_emf_common_util_BasicEMap$5_2_classLit = createForClass('org.eclipse.emf.common.util', 'BasicEMap/5', 1050); function $scan(this$static){ var eList; this$static.this$01.ensureEntryDataExists(); if (this$static.entryCursor != -1) { ++this$static.entryCursor; eList = this$static.this$01.entryData[this$static.cursor]; if (this$static.entryCursor < eList.size_0) { return; } ++this$static.cursor; } for (; this$static.cursor < this$static.this$01.entryData.length; ++this$static.cursor) { eList = this$static.this$01.entryData[this$static.cursor]; if (!!eList && eList.size_0 != 0) { this$static.entryCursor = 0; return; } } this$static.entryCursor = -1; } function BasicEMap$BasicEMapIterator(this$0){ this.this$01 = this$0; this.expectedModCount = this.this$01.modCount; this$0.size_0 > 0 && $scan(this); } defineClass(622, 1, $intern_6, BasicEMap$BasicEMapIterator); _.forEachRemaining = function forEachRemaining_55(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_44(){ return this.entryCursor != -1; } ; _.next_1 = function next_45(){ var result; if (this.this$01.modCount != this.expectedModCount) { throw toJs(new ConcurrentModificationException); } if (this.entryCursor == -1) { throw toJs(new NoSuchElementException); } this.lastCursor = this.cursor; this.lastEntryCursor = this.entryCursor; $scan(this); result = castTo(this.this$01.entryData[this.lastCursor].data_0[this.lastEntryCursor], 136); return this.yield_0(result); } ; _.remove = function remove_119(){ if (this.this$01.modCount != this.expectedModCount) { throw toJs(new ConcurrentModificationException); } if (this.lastEntryCursor == -1) { throw toJs(new IllegalStateException); } this.this$01.delegateEList.remove_1($get_20(this.this$01.entryData[this.lastCursor], this.lastEntryCursor)); this.expectedModCount = this.this$01.modCount; this.lastEntryCursor = -1; this.cursor == this.lastCursor && this.entryCursor != -1 && --this.entryCursor; } ; _.yield_0 = function yield_0(entry){ return entry; } ; _.cursor = 0; _.entryCursor = -1; _.expectedModCount = 0; _.lastCursor = 0; _.lastEntryCursor = 0; var Lorg_eclipse_emf_common_util_BasicEMap$BasicEMapIterator_2_classLit = createForClass('org.eclipse.emf.common.util', 'BasicEMap/BasicEMapIterator', 622); function BasicEMap$BasicEMapKeyIterator(this$0){ BasicEMap$BasicEMapIterator.call(this, this$0); } defineClass(1044, 622, $intern_6, BasicEMap$BasicEMapKeyIterator); _.yield_0 = function yield_1(entry){ return entry.getKey(); } ; var Lorg_eclipse_emf_common_util_BasicEMap$BasicEMapKeyIterator_2_classLit = createForClass('org.eclipse.emf.common.util', 'BasicEMap/BasicEMapKeyIterator', 1044); function BasicEMap$BasicEMapValueIterator(this$0){ BasicEMap$BasicEMapIterator.call(this, this$0); } defineClass(1045, 622, $intern_6, BasicEMap$BasicEMapValueIterator); _.yield_0 = function yield_2(entry){ return entry.getValue(); } ; var Lorg_eclipse_emf_common_util_BasicEMap$BasicEMapValueIterator_2_classLit = createForClass('org.eclipse.emf.common.util', 'BasicEMap/BasicEMapValueIterator', 1045); function $containsKey_8(this$static, key){ return $containsKey_7(this$static.this$01, key); } function BasicEMap$DelegatingMap(this$0){ this.this$01 = this$0; } defineClass(1043, 1, $intern_7, BasicEMap$DelegatingMap); _.forEach = function forEach_38(consumer){ $forEach_2(this, consumer); } ; _.merge = function merge_4(key, value_0, remappingFunction){ return $merge(this, key, value_0, remappingFunction); } ; _.clear_0 = function clear_62(){ this.this$01.delegateEList.clear_0(); } ; _.containsKey = function containsKey_15(key){ return $containsKey_8(this, key); } ; _.containsValue = function containsValue_8(value_0){ return $containsValue_4(this.this$01, value_0); } ; _.entrySet_0 = function entrySet_10(){ return $entrySet_3(this.this$01); } ; _.equals_0 = function equals_217(object){ return $equals_12(this.this$01, object); } ; _.get_3 = function get_56(key){ return $get_21(this.this$01, key); } ; _.hashCode_1 = function hashCode_79(){ return $hashCode_4(this.this$01.delegateEList); } ; _.isEmpty = function isEmpty_30(){ return this.this$01.size_0 == 0; } ; _.keySet_0 = function keySet_19(){ return $keySet_2(this.this$01); } ; _.put = function put_11(key, value_0){ return $put_14(this.this$01, key, value_0); } ; _.remove_0 = function remove_120(key){ return $removeKey(this.this$01, key); } ; _.size_1 = function size_73(){ return this.this$01.size_0; } ; _.toString_0 = function toString_140(){ return $toString_25(this.this$01.delegateEList); } ; _.values_0 = function values_126(){ return $values_3(this.this$01); } ; var Lorg_eclipse_emf_common_util_BasicEMap$DelegatingMap_2_classLit = createForClass('org.eclipse.emf.common.util', 'BasicEMap/DelegatingMap', 1043); function BasicEMap$EntryImpl(hash, key, value_0){ this.hash = hash; this.key = key; this.value_0 = value_0; } defineClass(621, 1, {44:1, 136:1, 621:1}, BasicEMap$EntryImpl); _.equals_0 = function equals_218(object){ var entry; if (instanceOf(object, 44)) { entry = castTo(object, 44); return (this.key != null?equals_Ljava_lang_Object__Z__devirtual$(this.key, entry.getKey()):maskUndefined(this.key) === maskUndefined(entry.getKey())) && (this.value_0 != null?equals_Ljava_lang_Object__Z__devirtual$(this.value_0, entry.getValue()):maskUndefined(this.value_0) === maskUndefined(entry.getValue())); } else { return false; } } ; _.getHash = function getHash_0(){ return this.hash; } ; _.getKey = function getKey_9(){ return this.key; } ; _.getValue = function getValue_11(){ return this.value_0; } ; _.hashCode_1 = function hashCode_80(){ return this.hash ^ (this.value_0 == null?0:hashCode__I__devirtual$(this.value_0)); } ; _.setHash = function setHash_0(hash){ this.hash = hash; } ; _.setKey = function setKey_0(key){ throw toJs(new RuntimeException); } ; _.setValue = function setValue_12(value_0){ var oldValue; oldValue = this.value_0; this.value_0 = value_0; return oldValue; } ; _.toString_0 = function toString_141(){ return this.key + '->' + this.value_0; } ; _.hash = 0; var Lorg_eclipse_emf_common_util_BasicEMap$EntryImpl_2_classLit = createForClass('org.eclipse.emf.common.util', 'BasicEMap/EntryImpl', 621); function BasicEMap$View(){ } defineClass(546, 1, {}, BasicEMap$View); var Lorg_eclipse_emf_common_util_BasicEMap$View_2_classLit = createForClass('org.eclipse.emf.common.util', 'BasicEMap/View', 546); function $clinit_ECollections(){ $clinit_ECollections = emptyMethod; EMPTY_ELIST = new ECollections$EmptyUnmodifiableEList; new ECollections$EmptyUnmodifiableEMap; } function indexOf_12(list, o, fromIndex){ var element, i, size_0; fromIndex < 0 && (fromIndex = 0); size_0 = list.size_0; for (i = fromIndex; i < size_0; i++) { element = $get_20(list, i); if (o == null) { if (element == null) { return i; } } else if (maskUndefined(o) === maskUndefined(element) || equals_Ljava_lang_Object__Z__devirtual$(o, element)) { return i; } } return -1; } function sort_14(list, comparator){ $clinit_ECollections(); var i, listAsArray, objectComparator, oldIndex; listAsArray = $toArray_10(list); objectComparator = comparator; mergeSort(listAsArray, 0, listAsArray.length, objectComparator); for (i = 0; i < listAsArray.length; i++) { oldIndex = indexOf_12(list, listAsArray[i], i); i != oldIndex && $move_1(list, i, oldIndex); } } var EMPTY_ELIST; function $add_26(){ throw toJs(new UnsupportedOperationException); } function $add_27(){ throw toJs(new UnsupportedOperationException); } function $addAll_10(){ throw toJs(new UnsupportedOperationException); } function $addAll_11(){ throw toJs(new UnsupportedOperationException); } function $clear_14(){ throw toJs(new UnsupportedOperationException); } function $move_3(){ throw toJs(new UnsupportedOperationException); } function $move_4(){ throw toJs(new UnsupportedOperationException); } function $remove_40(){ throw toJs(new UnsupportedOperationException); } function $remove_41(){ throw toJs(new UnsupportedOperationException); } function $set_12(){ throw toJs(new UnsupportedOperationException); } function ECollections$BasicEmptyUnmodifiableEList(){ this.listIterator = new ECollections$BasicEmptyUnmodifiableEList$1; } defineClass(783, 1, {}); _.equals_0 = function equals_219(o){ return $equals_2(($clinit_Collections() , EMPTY_LIST), o); } ; _.hashCode_1 = function hashCode_81(){ return hashCode_49(($clinit_Collections() , EMPTY_LIST)); } ; _.toString_0 = function toString_142(){ return $toString_2(($clinit_Collections() , EMPTY_LIST)); } ; var Lorg_eclipse_emf_common_util_ECollections$BasicEmptyUnmodifiableEList_2_classLit = createForClass('org.eclipse.emf.common.util', 'ECollections/BasicEmptyUnmodifiableEList', 783); function ECollections$BasicEmptyUnmodifiableEList$1(){ } defineClass(1348, 1, $intern_14, ECollections$BasicEmptyUnmodifiableEList$1); _.forEachRemaining = function forEachRemaining_56(consumer){ $forEachRemaining(this, consumer); } ; _.add_1 = function add_57(o){ throw toJs(new UnsupportedOperationException); } ; _.hasNext_0 = function hasNext_45(){ return false; } ; _.hasPrevious = function hasPrevious_8(){ return false; } ; _.next_1 = function next_46(){ throw toJs(new NoSuchElementException); } ; _.nextIndex_0 = function nextIndex_9(){ return 0; } ; _.previous_0 = function previous_9(){ throw toJs(new NoSuchElementException); } ; _.previousIndex = function previousIndex_8(){ return -1; } ; _.remove = function remove_121(){ throw toJs(new UnsupportedOperationException); } ; _.set_1 = function set_26(o){ throw toJs(new UnsupportedOperationException); } ; var Lorg_eclipse_emf_common_util_ECollections$BasicEmptyUnmodifiableEList$1_2_classLit = createForClass('org.eclipse.emf.common.util', 'ECollections/BasicEmptyUnmodifiableEList/1', 1348); function ECollections$EmptyUnmodifiableEList(){ ECollections$BasicEmptyUnmodifiableEList.call(this); } defineClass(1346, 783, {20:1, 16:1, 15:1, 61:1}, ECollections$EmptyUnmodifiableEList); _.add_3 = function add_58(index_0, element){ $add_26(); } ; _.add_2 = function add_59(o){ return $add_27(); } ; _.addAll_0 = function addAll_30(index_0, collection){ return $addAll_10(); } ; _.addAll = function addAll_31(coll){ return $addAll_11(); } ; _.clear_0 = function clear_63(){ $clear_14(); } ; _.contains = function contains_60(o){ return false; } ; _.containsAll = function containsAll_13(coll){ return false; } ; _.forEach_0 = function forEach_39(action){ $forEach_0(this, action); } ; _.get_0 = function get_57(index_0){ return $get_13(($clinit_Collections() , EMPTY_LIST , index_0)) , null; } ; _.indexOf_0 = function indexOf_13(o){ return -1; } ; _.isEmpty = function isEmpty_31(){ return true; } ; _.iterator_0 = function iterator_86(){ return this.listIterator; } ; _.listIterator_0 = function listIterator_25(){ return this.listIterator; } ; _.listIterator_1 = function listIterator_26(index_0){ return this.listIterator; } ; _.move = function move_10(newPosition, oldPosition){ return $move_3(); } ; _.move_0 = function move_11(newPosition, o){ $move_4(); } ; _.parallelStream = function parallelStream_6(){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(this, 16)); } ; _.remove_2 = function remove_122(index_0){ return $remove_40(); } ; _.remove_1 = function remove_123(o){ return $remove_41(); } ; _.set_2 = function set_27(index_0, element){ return $set_12(); } ; _.size_1 = function size_74(){ return 0; } ; _.sort_0 = function sort_15(c){ $sort_0(this, c); } ; _.spliterator_0 = function spliterator_39(){ return new Spliterators$IteratorSpliterator(this, 16); } ; _.stream = function stream_8(){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(this, 16)); } ; _.subList = function subList_11(fromIndex, toIndex){ return $clinit_Collections() , new AbstractList$SubList(EMPTY_LIST, fromIndex, toIndex); } ; _.toArray = function toArray_34(){ return $toArray(($clinit_Collections() , EMPTY_LIST)); } ; _.toArray_0 = function toArray_35(a){ return $clinit_Collections() , $toArray_0(EMPTY_LIST, a); } ; var Lorg_eclipse_emf_common_util_ECollections$EmptyUnmodifiableEList_2_classLit = createForClass('org.eclipse.emf.common.util', 'ECollections/EmptyUnmodifiableEList', 1346); function ECollections$EmptyUnmodifiableEMap(){ ECollections$BasicEmptyUnmodifiableEList.call(this); } defineClass(1347, 783, {20:1, 16:1, 15:1, 61:1, 597:1}, ECollections$EmptyUnmodifiableEMap); _.add_3 = function add_60(index_0, element){ $add_26(); } ; _.add_2 = function add_61(o){ return $add_27(); } ; _.addAll_0 = function addAll_32(index_0, collection){ return $addAll_10(); } ; _.addAll = function addAll_33(coll){ return $addAll_11(); } ; _.clear_0 = function clear_64(){ $clear_14(); } ; _.contains = function contains_61(o){ return false; } ; _.containsAll = function containsAll_14(coll){ return false; } ; _.forEach_0 = function forEach_40(action){ $forEach_0(this, action); } ; _.get_0 = function get_58(index_0){ return $get_13(($clinit_Collections() , EMPTY_LIST , index_0)) , null; } ; _.indexOf_0 = function indexOf_14(o){ return -1; } ; _.isEmpty = function isEmpty_32(){ return true; } ; _.iterator_0 = function iterator_87(){ return this.listIterator; } ; _.listIterator_0 = function listIterator_27(){ return this.listIterator; } ; _.listIterator_1 = function listIterator_28(index_0){ return this.listIterator; } ; _.move = function move_12(newPosition, oldPosition){ return $move_3(); } ; _.move_0 = function move_13(newPosition, o){ $move_4(); } ; _.parallelStream = function parallelStream_7(){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(this, 16)); } ; _.remove_2 = function remove_124(index_0){ return $remove_40(); } ; _.remove_1 = function remove_125(o){ return $remove_41(); } ; _.set_2 = function set_28(index_0, element){ return $set_12(); } ; _.size_1 = function size_75(){ return 0; } ; _.sort_0 = function sort_16(c){ $sort_0(this, c); } ; _.spliterator_0 = function spliterator_40(){ return new Spliterators$IteratorSpliterator(this, 16); } ; _.stream = function stream_9(){ return new StreamImpl(null, new Spliterators$IteratorSpliterator(this, 16)); } ; _.subList = function subList_12(fromIndex, toIndex){ return $clinit_Collections() , new AbstractList$SubList(EMPTY_LIST, fromIndex, toIndex); } ; _.toArray = function toArray_36(){ return $toArray(($clinit_Collections() , EMPTY_LIST)); } ; _.toArray_0 = function toArray_37(a){ return $clinit_Collections() , $toArray_0(EMPTY_LIST, a); } ; _.map_2 = function map_6(){ return $clinit_Collections() , $clinit_Collections() , EMPTY_MAP; } ; var Lorg_eclipse_emf_common_util_ECollections$EmptyUnmodifiableEMap_2_classLit = createForClass('org.eclipse.emf.common.util', 'ECollections/EmptyUnmodifiableEMap', 1347); var Lorg_eclipse_emf_common_util_Enumerator_2_classLit = createForInterface('org.eclipse.emf.common.util', 'Enumerator'); function $clinit_Reflect(){ $clinit_Reflect = emptyMethod; HELPER_REGISTRY = new HashMap; } function isInstance(class_, instance){ $clinit_Reflect(); var helper; helper = castTo($get_10(HELPER_REGISTRY, class_), 57); return !helper || helper.isInstance(instance); } function register_0(class_, helper){ $clinit_Reflect(); $put_6(HELPER_REGISTRY, class_, helper); } var HELPER_REGISTRY; function $clinit_URI(){ $clinit_URI = emptyMethod; var set_0; uriCache = new URI$URICache; NO_SEGMENTS = initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, 0, 6, 1); ALPHA_HI = or_0(lowBitmask_0(33, 58), lowBitmask_0(1, 26)); ALPHA_LO = or_0(lowBitmask_0(97, 122), lowBitmask_0(65, 90)); DIGIT_LO = lowBitmask_0(48, 57); ALPHANUM_HI = or_0(ALPHA_HI, 0); ALPHANUM_LO = or_0(ALPHA_LO, DIGIT_LO); HEX_HI = or_0(or_0(0, lowBitmask_0(1, 6)), lowBitmask_0(33, 38)); HEX_LO = or_0(or_0(DIGIT_LO, lowBitmask_0(65, 70)), lowBitmask_0(97, 102)); UNRESERVED_HI = or_0(ALPHANUM_HI, highBitmask_0("-_.!~*'()")); UNRESERVED_LO = or_0(ALPHANUM_LO, lowBitmask_1("-_.!~*'()")); highBitmask_0(';/?:@&=+$,'); lowBitmask_1(';/?:@&=+$,'); or_0(UNRESERVED_HI, highBitmask_0(';:@&=+$,')); or_0(UNRESERVED_LO, lowBitmask_1(';:@&=+$,')); MAJOR_SEPARATOR_HI = highBitmask_0(':/?#'); MAJOR_SEPARATOR_LO = lowBitmask_1(':/?#'); SEGMENT_END_HI = highBitmask_0('/?#'); SEGMENT_END_LO = lowBitmask_1('/?#'); set_0 = new HashSet; set_0.map_0.put('jar', set_0); set_0.map_0.put('zip', set_0); set_0.map_0.put('archive', set_0); archiveSchemes = ($clinit_Collections() , new Collections$UnmodifiableSet(set_0)); } function $appendFragment(this$static, fragment){ var result; result = new URI((this$static.hashCode_0 & 256) != 0, this$static.scheme, this$static.authority, this$static.device, (this$static.hashCode_0 & 16) != 0, this$static.segments, this$static.query, fragment); this$static.fragment != null || (result.cachedTrimFragment = this$static); return result; } function $segmentsEqual(this$static, uri_0){ var i, len; if (this$static.segments.length != uri_0.segments.length) return false; for (i = 0 , len = this$static.segments.length; i < len; i++) { if (!$equals_5(this$static.segments[i], uri_0.segments[i])) return false; } return true; } function $toString_26(this$static){ var i, len, result; if (this$static.cachedToString == null) { result = new StringBuffer; if (this$static.scheme != null) { $append_3(result, this$static.scheme); result.string += ':'; } if ((this$static.hashCode_0 & 256) != 0) { if ((this$static.hashCode_0 & 256) != 0 && this$static.authority != null) { isArchiveScheme(this$static.scheme) || (result.string += '//' , result); $append_3(result, this$static.authority); } if (this$static.device != null) { result.string += '/'; $append_3(result, this$static.device); } (this$static.hashCode_0 & 16) != 0 && (result.string += '/' , result); for (i = 0 , len = this$static.segments.length; i < len; i++) { i != 0 && (result.string += '/' , result); $append_3(result, this$static.segments[i]); } if (this$static.query != null) { result.string += '?'; $append_3(result, this$static.query); } } else { $append_3(result, this$static.authority); } if (this$static.fragment != null) { result.string += '#'; $append_3(result, this$static.fragment); } this$static.cachedToString = result.string; } return this$static.cachedToString; } function $trimFragment(this$static){ if (this$static.fragment == null) { return this$static; } else !this$static.cachedTrimFragment && (this$static.cachedTrimFragment = new URI((this$static.hashCode_0 & 256) != 0, this$static.scheme, this$static.authority, this$static.device, (this$static.hashCode_0 & 16) != 0, this$static.segments, this$static.query, null)); return this$static.cachedTrimFragment; } function URI(hierarchical, scheme, authority, device, absolutePath, segments, query, fragment){ var hashCode, i, len; hashCode = 0; scheme != null && (hashCode ^= $hashCode_2(scheme.toLowerCase())); authority != null && (hashCode ^= $hashCode_2(authority)); device != null && (hashCode ^= $hashCode_2(device)); query != null && (hashCode ^= $hashCode_2(query)); fragment != null && (hashCode ^= $hashCode_2(fragment)); for (i = 0 , len = segments.length; i < len; i++) { hashCode ^= $hashCode_2(segments[i]); } hierarchical?(hashCode |= 256):(hashCode &= -257); absolutePath?(hashCode |= 16):(hashCode &= -17); this.hashCode_0 = hashCode; this.scheme = scheme == null?null:(checkCriticalNotNull(scheme) , scheme); this.authority = authority; this.device = device; this.segments = segments; this.query = query; this.fragment = fragment; } function contains_62(s, highBitmask, lowBitmask){ var i, len; for (i = 0 , len = s.length; i < len; i++) { if (matches((checkCriticalStringElementIndex(i, s.length) , s.charCodeAt(i)), highBitmask, lowBitmask)) return true; } return false; } function createURIWithCache(uri_0){ $clinit_URI(); var base, fragment, i, result; i = $indexOf_1(uri_0, fromCodePoint(35)); base = i == -1?uri_0:(checkCriticalStringBounds(0, i, uri_0.length) , uri_0.substr(0, i)); fragment = i == -1?null:(checkCriticalStringElementIndex(i + 1, uri_0.length + 1) , uri_0.substr(i + 1)); result = $get_22(uriCache, base); if (!result) { result = parseIntoURI(base); $put_15(uriCache, base, result); fragment != null && (result = $appendFragment(result, fragment)); } else fragment != null && (result = $appendFragment(result, (checkCriticalNotNull(fragment) , fragment))); return result; } function decode(value_0){ $clinit_URI(); var bytes, character, expectedBytes, i, j, len, receivedBytes, result; if (value_0 == null) return null; i = $indexOf_1(value_0, fromCodePoint(37)); if (i < 0) { return value_0; } else { result = new StringBuilder_1((checkCriticalStringBounds(0, i, value_0.length) , value_0.substr(0, i))); bytes = initUnidimensionalArray(B_classLit, $intern_140, 28, 4, 15, 1); receivedBytes = 0; expectedBytes = 0; for (len = value_0.length; i < len; i++) { checkCriticalStringElementIndex(i, value_0.length); if (value_0.charCodeAt(i) == 37 && value_0.length > i + 2 && matches((checkCriticalStringElementIndex(i + 1, value_0.length) , value_0.charCodeAt(i + 1)), HEX_HI, HEX_LO) && matches((checkCriticalStringElementIndex(i + 2, value_0.length) , value_0.charCodeAt(i + 2)), HEX_HI, HEX_LO)) { character = unescape_0((checkCriticalStringElementIndex(i + 1, value_0.length) , value_0.charCodeAt(i + 1)), (checkCriticalStringElementIndex(i + 2, value_0.length) , value_0.charCodeAt(i + 2))); i += 2; if (expectedBytes > 0) { (character & 192) == 128?(bytes[receivedBytes++] = character << 24 >> 24):(expectedBytes = 0); } else if (character >= 128) { if ((character & 224) == 192) { bytes[receivedBytes++] = character << 24 >> 24; expectedBytes = 2; } else if ((character & 240) == 224) { bytes[receivedBytes++] = character << 24 >> 24; expectedBytes = 3; } else if ((character & 248) == 240) { bytes[receivedBytes++] = character << 24 >> 24; expectedBytes = 4; } } if (expectedBytes > 0) { if (receivedBytes == expectedBytes) { switch (receivedBytes) { case 2: { $append_5(result, ((bytes[0] & 31) << 6 | bytes[1] & 63) & $intern_47); break; } case 3: { $append_5(result, ((bytes[0] & 15) << 12 | (bytes[1] & 63) << 6 | bytes[2] & 63) & $intern_47); break; } } receivedBytes = 0; expectedBytes = 0; } } else { for (j = 0; j < receivedBytes; ++j) { $append_5(result, bytes[j] & $intern_47); } receivedBytes = 0; result.string += String.fromCharCode(character); } } else { for (j = 0; j < receivedBytes; ++j) { $append_5(result, bytes[j] & $intern_47); } receivedBytes = 0; $append_5(result, (checkCriticalStringElementIndex(i, value_0.length) , value_0.charCodeAt(i))); } } return result.string; } } function equals_221(o1, o2){ return o1 == null?o2 == null:$equals_5(o1, o2); } function equals_222(s1, s2){ return s1 == null?s2 == null:$equalsIgnoreCase(s1, s2); } function find_0(s, i, highBitmask, lowBitmask){ var len; len = s.length; if (i >= len) return len; for (i = i > 0?i:0; i < len; i++) { if (matches((checkCriticalStringElementIndex(i, s.length) , s.charCodeAt(i)), highBitmask, lowBitmask)) break; } return i; } function firstInvalidSegment(value_0){ var i, len; if (value_0 == null) return null; for (i = 0 , len = value_0.length; i < len; i++) { if (!validSegment(value_0[i])) return value_0[i]; } return null; } function highBitmask_0(chars){ var c, i, len, result; result = 0; for (i = 0 , len = chars.length; i < len; i++) { c = (checkCriticalStringElementIndex(i, chars.length) , chars.charCodeAt(i)); c >= 64 && c < 128 && (result = or_0(result, shl_0(1, c - 64))); } return result; } function isArchiveScheme(value_0){ return value_0 != null && $contains_2(archiveSchemes, value_0.toLowerCase()); } function lowBitmask_0(from, to){ var c, result; result = 0; if (from < 64 && from <= to) { to = to < 64?to:63; for (c = from; c <= to; c++) { result = or_0(result, shl_0(1, c)); } } return result; } function lowBitmask_1(chars){ var c, i, len, result; result = 0; for (i = 0 , len = chars.length; i < len; i++) { c = (checkCriticalStringElementIndex(i, chars.length) , chars.charCodeAt(i)); c < 64 && (result = or_0(result, shl_0(1, c))); } return result; } function matches(c, highBitmask, lowBitmask){ if (c >= 128) return false; return c < 64?neq(and_0(shl_0(1, c), lowBitmask), 0):neq(and_0(shl_0(1, c - 64), highBitmask), 0); } function parseIntoURI(uri_0){ var absolutePath, archiveScheme, authority, device, fragment, hierarchical, i, j, query, s, scheme, segmentList, segments; hierarchical = true; scheme = null; authority = null; device = null; absolutePath = false; segments = NO_SEGMENTS; query = null; fragment = null; i = 0; j = find_0(uri_0, i, MAJOR_SEPARATOR_HI, MAJOR_SEPARATOR_LO); if (j < uri_0.length && (checkCriticalStringElementIndex(j, uri_0.length) , uri_0.charCodeAt(j) == 58)) { scheme = (checkCriticalStringBounds(i, j, uri_0.length) , uri_0.substr(i, j - i)); i = j + 1; } archiveScheme = scheme != null && $contains_2(archiveSchemes, scheme.toLowerCase()); if (archiveScheme) { j = uri_0.lastIndexOf('!/'); if (j == -1) { throw toJs(new IllegalArgumentException_0('no archive separator')); } hierarchical = true; authority = $substring_1(uri_0, i, ++j); i = j; } else if (i >= 0 && $equals_5(uri_0.substr(i, '//'.length), '//')) { i += 2; j = find_0(uri_0, i, SEGMENT_END_HI, SEGMENT_END_LO); authority = (checkCriticalStringBounds(i, j, uri_0.length) , uri_0.substr(i, j - i)); i = j; } else if (scheme != null && (i == uri_0.length || (checkCriticalStringElementIndex(i, uri_0.length) , uri_0.charCodeAt(i) != 47))) { hierarchical = false; j = $indexOf_2(uri_0, fromCodePoint(35), i); j == -1 && (j = uri_0.length); authority = (checkCriticalStringBounds(i, j, uri_0.length) , uri_0.substr(i, j - i)); i = j; } if (!archiveScheme && i < uri_0.length && (checkCriticalStringElementIndex(i, uri_0.length) , uri_0.charCodeAt(i) == 47)) { j = find_0(uri_0, i + 1, SEGMENT_END_HI, SEGMENT_END_LO); s = (checkCriticalStringBounds(i + 1, j, uri_0.length) , uri_0.substr(i + 1, j - (i + 1))); if (s.length > 0 && $charAt(s, s.length - 1) == 58) { device = s; i = j; } } if (i < uri_0.length && (checkCriticalStringElementIndex(i, uri_0.length) , uri_0.charCodeAt(i) == 47)) { ++i; absolutePath = true; } if (i < uri_0.length && (checkCriticalStringElementIndex(i, uri_0.length) , uri_0.charCodeAt(i) != 63) && (checkCriticalStringElementIndex(i, uri_0.length) , uri_0.charCodeAt(i) != 35)) { segmentList = new ArrayList; while (i < uri_0.length && (checkCriticalStringElementIndex(i, uri_0.length) , uri_0.charCodeAt(i) != 63) && (checkCriticalStringElementIndex(i, uri_0.length) , uri_0.charCodeAt(i) != 35)) { j = find_0(uri_0, i, SEGMENT_END_HI, SEGMENT_END_LO); $add_3(segmentList, (checkCriticalStringBounds(i, j, uri_0.length) , uri_0.substr(i, j - i))); i = j; i < uri_0.length && (checkCriticalStringElementIndex(i, uri_0.length) , uri_0.charCodeAt(i) == 47) && (segmentsRemain(uri_0, ++i) || (segmentList.array.push('') , undefined , true)); } segments = initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, segmentList.array.length, 6, 1); $toArray_1(segmentList, segments); } if (i < uri_0.length && (checkCriticalStringElementIndex(i, uri_0.length) , uri_0.charCodeAt(i) == 63)) { j = $indexOf_0(uri_0, 35, ++i); j == -1 && (j = uri_0.length); query = (checkCriticalStringBounds(i, j, uri_0.length) , uri_0.substr(i, j - i)); i = j; } i < uri_0.length && (fragment = $substring_0(uri_0, ++i)); validateURI(hierarchical, scheme, authority, device, segments, query); return new URI(hierarchical, scheme, authority, device, absolutePath, segments, query, fragment); } function segmentsRemain(uri_0, i){ return i < uri_0.length && (checkCriticalStringElementIndex(i, uri_0.length) , uri_0.charCodeAt(i) != 63) && (checkCriticalStringElementIndex(i, uri_0.length) , uri_0.charCodeAt(i) != 35); } function unescape_0(highHexDigit, lowHexDigit){ return (valueOf_118(highHexDigit) << 4 | valueOf_118(lowHexDigit)) & $intern_47; } function validArchiveAuthority(value_0){ var archiveURI; if (value_0 != null && value_0.length > 0 && $charAt(value_0, value_0.length - 1) == 33) { try { archiveURI = createURIWithCache($substring_1(value_0, 0, value_0.length - 1)); return archiveURI.fragment == null; } catch ($e0) { $e0 = toJava($e0); if (!instanceOf($e0, 33)) throw toJs($e0); } } return false; } function validDevice(value_0){ var len; if (value_0 == null) return true; len = value_0.length; return len > 0 && (checkCriticalStringElementIndex(len - 1, value_0.length) , value_0.charCodeAt(len - 1) == 58) && !contains_62(value_0, SEGMENT_END_HI, SEGMENT_END_LO); } function validSegment(value_0){ return value_0 != null && !contains_62(value_0, SEGMENT_END_HI, SEGMENT_END_LO); } function validSegments(value_0){ var i, len; if (value_0 == null) return false; for (i = 0 , len = value_0.length; i < len; i++) { if (!validSegment(value_0[i])) return false; } return true; } function validateURI(hierarchical, scheme, authority, device, segments, query){ var s; if (!(scheme == null || !contains_62(scheme, MAJOR_SEPARATOR_HI, MAJOR_SEPARATOR_LO))) { throw toJs(new IllegalArgumentException_0('invalid scheme: ' + scheme)); } if (!hierarchical && !(authority != null && $indexOf_1(authority, fromCodePoint(35)) == -1 && authority.length > 0 && (checkCriticalStringElementIndex(0, authority.length) , authority.charCodeAt(0) != 47))) { throw toJs(new IllegalArgumentException_0('invalid opaquePart: ' + authority)); } if (hierarchical && !(scheme != null && $contains_2(archiveSchemes, scheme.toLowerCase())) && !(authority == null || !contains_62(authority, SEGMENT_END_HI, SEGMENT_END_LO))) { throw toJs(new IllegalArgumentException_0('invalid authority: ' + authority)); } if (hierarchical && scheme != null && $contains_2(archiveSchemes, scheme.toLowerCase()) && !validArchiveAuthority(authority)) { throw toJs(new IllegalArgumentException_0('invalid authority: ' + authority)); } if (!validDevice(device)) { throw toJs(new IllegalArgumentException_0('invalid device: ' + device)); } if (!validSegments(segments)) { s = segments == null?'invalid segments: null':'invalid segment: ' + firstInvalidSegment(segments); throw toJs(new IllegalArgumentException_0(s)); } if (!(query == null || $indexOf_1(query, fromCodePoint(35)) == -1)) { throw toJs(new IllegalArgumentException_0('invalid query: ' + query)); } } function valueOf_118(hexDigit){ if (hexDigit >= 65 && hexDigit <= 70) { return hexDigit - 65 + 10; } if (hexDigit >= 97 && hexDigit <= 102) { return hexDigit - 97 + 10; } if (hexDigit >= 48 && hexDigit <= 57) { return hexDigit - 48; } return 0; } defineClass(288, 1, {288:1}, URI); _.equals_0 = function equals_220(object){ var uri_0; if (this === object) return true; if (!instanceOf(object, 288)) return false; uri_0 = castTo(object, 288); return this.hashCode_0 == uri_0.hashCode_0 && equals_222(this.scheme, uri_0.scheme) && equals_221(this.authority, (this.hashCode_0 & 256) != 0?(uri_0.hashCode_0 & 256) != 0?uri_0.authority:null:(uri_0.hashCode_0 & 256) != 0?null:uri_0.authority) && equals_221(this.device, uri_0.device) && equals_221(this.query, uri_0.query) && equals_221(this.fragment, uri_0.fragment) && $segmentsEqual(this, uri_0); } ; _.hashCode_1 = function hashCode_82(){ return this.hashCode_0; } ; _.toString_0 = function toString_143(){ return $toString_26(this); } ; _.hashCode_0 = 0; var ALPHANUM_HI = 0, ALPHANUM_LO = 0, ALPHA_HI = 0, ALPHA_LO = 0, DIGIT_LO = 0, HEX_HI = 0, HEX_LO = 0, MAJOR_SEPARATOR_HI = 0, MAJOR_SEPARATOR_LO = 0, NO_SEGMENTS, SEGMENT_END_HI = 0, SEGMENT_END_LO = 0, UNRESERVED_HI = 0, UNRESERVED_LO = 0, archiveSchemes, uriCache; var Lorg_eclipse_emf_common_util_URI_2_classLit = createForClass('org.eclipse.emf.common.util', 'URI', 288); function $get_22(this$static, key){ return castTo(key == null?getEntryValueOrNull($getEntry_0(this$static.hashCodeMap, null)):$get_15(this$static.stringMap, key), 288); } function $put_15(this$static, key, value_0){ return castTo(key == null?$put_9(this$static.hashCodeMap, null, value_0):$put_10(this$static.stringMap, key, value_0), 288); } function URI$URICache(){ HashMap.call(this); } defineClass(1121, 45, $intern_76, URI$URICache); _.put = function put_12(key, value_0){ return castTo($putStringValue(this, castToString(key), castTo(value_0, 288)), 288); } ; var Lorg_eclipse_emf_common_util_URI$URICache_2_classLit = createForClass('org.eclipse.emf.common.util', 'URI/URICache', 1121); function UniqueEList(){ } function UniqueEList_0(collection){ BasicEList_0.call(this, collection.size_1()); $addAll_9(this, collection); } defineClass(506, 66, $intern_141, UniqueEList, UniqueEList_0); _.isUnique = function isUnique_1(){ return true; } ; var Lorg_eclipse_emf_common_util_UniqueEList_2_classLit = createForClass('org.eclipse.emf.common.util', 'UniqueEList', 506); function WrappedException(exception){ $$init_0(this); this.detailMessage = !exception?null:$toString_4(exception, exception.getMessage()); this.cause_0 = exception; $fillInStackTrace(this); this.initializeBackingError(); } defineClass(590, 63, $intern_44, WrappedException); var Lorg_eclipse_emf_common_util_WrappedException_2_classLit = createForClass('org.eclipse.emf.common.util', 'WrappedException', 590); var Lorg_eclipse_emf_ecore_EAnnotation_2_classLit = createForInterface('org.eclipse.emf.ecore', 'EAnnotation'); var Lorg_eclipse_emf_ecore_ETypedElement_2_classLit = createForInterface('org.eclipse.emf.ecore', 'ETypedElement'); var Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit = createForInterface('org.eclipse.emf.ecore', 'EStructuralFeature'); var Lorg_eclipse_emf_ecore_EAttribute_2_classLit = createForInterface('org.eclipse.emf.ecore', 'EAttribute'); var Lorg_eclipse_emf_ecore_EClassifier_2_classLit = createForInterface('org.eclipse.emf.ecore', 'EClassifier'); var Lorg_eclipse_emf_ecore_EClass_2_classLit = createForInterface('org.eclipse.emf.ecore', 'EClass'); var Lorg_eclipse_emf_ecore_EDataType_2_classLit = createForInterface('org.eclipse.emf.ecore', 'EDataType'); function $clinit_EDataType$Internal$ConversionDelegate$Factory$Registry(){ $clinit_EDataType$Internal$ConversionDelegate$Factory$Registry = emptyMethod; INSTANCE_5 = new EDataType$Internal$ConversionDelegate$Factory$Registry$Impl; } var INSTANCE_5; function $getFactory(this$static, uri_0){ var factory; return factory = uri_0 != null?$getStringValue(this$static, uri_0):getEntryValueOrNull($getEntry_0(this$static.hashCodeMap, uri_0)) , throwClassCastExceptionUnlessNull(factory); } function EDataType$Internal$ConversionDelegate$Factory$Registry$Impl(){ HashMap.call(this); } defineClass(1233, 45, $intern_76, EDataType$Internal$ConversionDelegate$Factory$Registry$Impl); _.get_3 = function get_59(key){ return instanceOfString(key)?$getStringValue(this, key):getEntryValueOrNull($getEntry_0(this.hashCodeMap, key)); } ; var Lorg_eclipse_emf_ecore_EDataType$Internal$ConversionDelegate$Factory$Registry$Impl_2_classLit = createForClass('org.eclipse.emf.ecore', 'EDataType/Internal/ConversionDelegate/Factory/Registry/Impl', 1233); var Lorg_eclipse_emf_ecore_EEnum_2_classLit = createForInterface('org.eclipse.emf.ecore', 'EEnum'); var Lorg_eclipse_emf_ecore_EEnumLiteral_2_classLit = createForInterface('org.eclipse.emf.ecore', 'EEnumLiteral'); var Lorg_eclipse_emf_ecore_EGenericType_2_classLit = createForInterface('org.eclipse.emf.ecore', 'EGenericType'); var Lorg_eclipse_emf_ecore_EOperation_2_classLit = createForInterface('org.eclipse.emf.ecore', 'EOperation'); function $clinit_EPackage$Registry(){ $clinit_EPackage$Registry = emptyMethod; INSTANCE_6 = new EPackageRegistryImpl; } var INSTANCE_6; var Lorg_eclipse_emf_ecore_EParameter_2_classLit = createForInterface('org.eclipse.emf.ecore', 'EParameter'); var Lorg_eclipse_emf_ecore_EReference_2_classLit = createForInterface('org.eclipse.emf.ecore', 'EReference'); function EStructuralFeature$Internal$DynamicValueHolder$1(){ } defineClass(1042, 1, {}, EStructuralFeature$Internal$DynamicValueHolder$1); _.toString_0 = function toString_144(){ return 'NIL'; } ; var Lorg_eclipse_emf_ecore_EStructuralFeature$Internal$DynamicValueHolder$1_2_classLit = createForClass('org.eclipse.emf.ecore', 'EStructuralFeature/Internal/DynamicValueHolder/1', 1042); function $clinit_EStructuralFeature$Internal$SettingDelegate$Factory$Registry(){ $clinit_EStructuralFeature$Internal$SettingDelegate$Factory$Registry = emptyMethod; INSTANCE_7 = new EStructuralFeature$Internal$SettingDelegate$Factory$Registry$Impl; } var INSTANCE_7; function $getFactory_0(this$static, uri_0){ var factory; return factory = uri_0 != null?$getStringValue(this$static, uri_0):getEntryValueOrNull($getEntry_0(this$static.hashCodeMap, uri_0)) , throwClassCastExceptionUnlessNull(factory); } function EStructuralFeature$Internal$SettingDelegate$Factory$Registry$Impl(){ HashMap.call(this); } defineClass(1041, 45, $intern_76, EStructuralFeature$Internal$SettingDelegate$Factory$Registry$Impl); _.get_3 = function get_60(key){ return instanceOfString(key)?$getStringValue(this, key):getEntryValueOrNull($getEntry_0(this.hashCodeMap, key)); } ; var Lorg_eclipse_emf_ecore_EStructuralFeature$Internal$SettingDelegate$Factory$Registry$Impl_2_classLit = createForClass('org.eclipse.emf.ecore', 'EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl', 1041); var Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit = createForInterface('org.eclipse.emf.ecore', 'ETypeParameter'); var Lorg_eclipse_emf_ecore_EValidator$PatternMatcher_2_classLit = createForInterface('org.eclipse.emf.ecore', 'EValidator/PatternMatcher'); function $clinit_EValidator$Registry(){ $clinit_EValidator$Registry = emptyMethod; INSTANCE_8 = new EValidatorRegistryImpl; } var INSTANCE_8; function $clinit_EcoreFactory(){ $clinit_EcoreFactory = emptyMethod; eINSTANCE_1 = init_3(); } var eINSTANCE_1; function $clinit_EcorePackage(){ $clinit_EcorePackage = emptyMethod; eINSTANCE_2 = init_4(); !!($clinit_EcorePackage$Literals() , EATTRIBUTE) && internalBootstrap(); } var eINSTANCE_2; function $clinit_EcorePackage$Literals(){ $clinit_EcorePackage$Literals = emptyMethod; EATTRIBUTE = ($clinit_EcorePackage() , eINSTANCE_2).eAttributeEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eAttributeEClass), 0), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eAttributeEClass), 1), 19); EANNOTATION = eINSTANCE_2.eAnnotationEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eAnnotationEClass), 0), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eAnnotationEClass), 1), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eAnnotationEClass), 2), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eAnnotationEClass), 3), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eAnnotationEClass), 4), 19); ECLASS = eINSTANCE_2.eClassEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassEClass), 0), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassEClass), 1), 35); ECLASS__ESUPER_TYPES = castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassEClass), 2), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassEClass), 3), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassEClass), 4), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassEClass), 5), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassEClass), 6), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassEClass), 7), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassEClass), 8), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassEClass), 9), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassEClass), 10), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassEClass), 11), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassEClass), 12), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassEClass), 13), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassEClass), 14), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassEClass), 15), 19); castTo($get_20($getEOperations(eINSTANCE_2.eClassEClass), 0), 62); castTo($get_20($getEOperations(eINSTANCE_2.eClassEClass), 1), 62); castTo($get_20($getEOperations(eINSTANCE_2.eClassEClass), 2), 62); castTo($get_20($getEOperations(eINSTANCE_2.eClassEClass), 3), 62); castTo($get_20($getEOperations(eINSTANCE_2.eClassEClass), 4), 62); castTo($get_20($getEOperations(eINSTANCE_2.eClassEClass), 5), 62); castTo($get_20($getEOperations(eINSTANCE_2.eClassEClass), 6), 62); castTo($get_20($getEOperations(eINSTANCE_2.eClassEClass), 7), 62); castTo($get_20($getEOperations(eINSTANCE_2.eClassEClass), 8), 62); castTo($get_20($getEOperations(eINSTANCE_2.eClassEClass), 9), 62); ECLASSIFIER = eINSTANCE_2.eClassifierEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassifierEClass), 0), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassifierEClass), 1), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassifierEClass), 2), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassifierEClass), 3), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassifierEClass), 4), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassifierEClass), 5), 19); castTo($get_20($getEOperations(eINSTANCE_2.eClassifierEClass), 0), 62); castTo($get_20($getEOperations(eINSTANCE_2.eClassifierEClass), 1), 62); EDATA_TYPE = eINSTANCE_2.eDataTypeEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eDataTypeEClass), 0), 35); EENUM = eINSTANCE_2.eEnumEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eEnumEClass), 0), 19); castTo($get_20($getEOperations(eINSTANCE_2.eEnumEClass), 0), 62); castTo($get_20($getEOperations(eINSTANCE_2.eEnumEClass), 1), 62); castTo($get_20($getEOperations(eINSTANCE_2.eEnumEClass), 2), 62); EENUM_LITERAL = eINSTANCE_2.eEnumLiteralEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eEnumLiteralEClass), 0), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eEnumLiteralEClass), 1), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eEnumLiteralEClass), 2), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eEnumLiteralEClass), 3), 19); EFACTORY = eINSTANCE_2.eFactoryEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eFactoryEClass), 0), 19); castTo($get_20($getEOperations(eINSTANCE_2.eFactoryEClass), 0), 62); castTo($get_20($getEOperations(eINSTANCE_2.eFactoryEClass), 1), 62); castTo($get_20($getEOperations(eINSTANCE_2.eFactoryEClass), 2), 62); EMODEL_ELEMENT = eINSTANCE_2.eModelElementEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eModelElementEClass), 0), 19); castTo($get_20($getEOperations(eINSTANCE_2.eModelElementEClass), 0), 62); ENAMED_ELEMENT = eINSTANCE_2.eNamedElementEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eNamedElementEClass), 0), 35); EOBJECT = eINSTANCE_2.eObjectEClass; castTo($get_20($getEOperations(eINSTANCE_2.eObjectEClass), 0), 62); castTo($get_20($getEOperations(eINSTANCE_2.eObjectEClass), 1), 62); castTo($get_20($getEOperations(eINSTANCE_2.eObjectEClass), 2), 62); castTo($get_20($getEOperations(eINSTANCE_2.eObjectEClass), 3), 62); castTo($get_20($getEOperations(eINSTANCE_2.eObjectEClass), 4), 62); castTo($get_20($getEOperations(eINSTANCE_2.eObjectEClass), 5), 62); castTo($get_20($getEOperations(eINSTANCE_2.eObjectEClass), 6), 62); castTo($get_20($getEOperations(eINSTANCE_2.eObjectEClass), 7), 62); castTo($get_20($getEOperations(eINSTANCE_2.eObjectEClass), 8), 62); castTo($get_20($getEOperations(eINSTANCE_2.eObjectEClass), 9), 62); castTo($get_20($getEOperations(eINSTANCE_2.eObjectEClass), 10), 62); castTo($get_20($getEOperations(eINSTANCE_2.eObjectEClass), 11), 62); castTo($get_20($getEOperations(eINSTANCE_2.eObjectEClass), 12), 62); castTo($get_20($getEOperations(eINSTANCE_2.eObjectEClass), 13), 62); castTo($get_20($getEOperations(eINSTANCE_2.eObjectEClass), 14), 62); EOPERATION = eINSTANCE_2.eOperationEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eOperationEClass), 0), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eOperationEClass), 2), 19); EOPERATION__EEXCEPTIONS = castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eOperationEClass), 3), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eOperationEClass), 4), 19); castTo($get_20($getEOperations(eINSTANCE_2.eOperationEClass), 0), 62); castTo($get_20($getEOperations(eINSTANCE_2.eOperationEClass), 1), 62); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eOperationEClass), 1), 19); EPACKAGE = eINSTANCE_2.ePackageEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_2.ePackageEClass), 0), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.ePackageEClass), 1), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.ePackageEClass), 2), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.ePackageEClass), 3), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.ePackageEClass), 4), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.ePackageEClass), 5), 19); castTo($get_20($getEOperations(eINSTANCE_2.ePackageEClass), 0), 62); EPARAMETER = eINSTANCE_2.eParameterEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eParameterEClass), 0), 19); EREFERENCE = eINSTANCE_2.eReferenceEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eReferenceEClass), 0), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eReferenceEClass), 1), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eReferenceEClass), 2), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eReferenceEClass), 3), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eReferenceEClass), 4), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eReferenceEClass), 5), 19); ESTRUCTURAL_FEATURE = eINSTANCE_2.eStructuralFeatureEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eStructuralFeatureEClass), 0), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eStructuralFeatureEClass), 1), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eStructuralFeatureEClass), 2), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eStructuralFeatureEClass), 3), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eStructuralFeatureEClass), 4), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eStructuralFeatureEClass), 5), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eStructuralFeatureEClass), 6), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eStructuralFeatureEClass), 7), 19); castTo($get_20($getEOperations(eINSTANCE_2.eStructuralFeatureEClass), 0), 62); castTo($get_20($getEOperations(eINSTANCE_2.eStructuralFeatureEClass), 1), 62); ETYPED_ELEMENT = eINSTANCE_2.eTypedElementEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eTypedElementEClass), 0), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eTypedElementEClass), 1), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eTypedElementEClass), 2), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eTypedElementEClass), 3), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eTypedElementEClass), 4), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eTypedElementEClass), 5), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eTypedElementEClass), 6), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eTypedElementEClass), 7), 19); ESTRING_TO_STRING_MAP_ENTRY = eINSTANCE_2.eStringToStringMapEntryEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eStringToStringMapEntryEClass), 0), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eStringToStringMapEntryEClass), 1), 35); EGENERIC_TYPE = eINSTANCE_2.eGenericTypeEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eGenericTypeEClass), 0), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eGenericTypeEClass), 1), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eGenericTypeEClass), 2), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eGenericTypeEClass), 3), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eGenericTypeEClass), 4), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eGenericTypeEClass), 5), 19); castTo($get_20($getEOperations(eINSTANCE_2.eGenericTypeEClass), 0), 62); ETYPE_PARAMETER = eINSTANCE_2.eTypeParameterEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eTypeParameterEClass), 0), 19); EJAVA_OBJECT = eINSTANCE_2.eJavaObjectEDataType; } var EANNOTATION, EATTRIBUTE, ECLASS, ECLASSIFIER, ECLASS__ESUPER_TYPES, EDATA_TYPE, EENUM, EENUM_LITERAL, EFACTORY, EGENERIC_TYPE, EJAVA_OBJECT, EMODEL_ELEMENT, ENAMED_ELEMENT, EOBJECT, EOPERATION, EOPERATION__EEXCEPTIONS, EPACKAGE, EPARAMETER, EREFERENCE, ESTRING_TO_STRING_MAP_ENTRY, ESTRUCTURAL_FEATURE, ETYPED_ELEMENT, ETYPE_PARAMETER; var Lorg_eclipse_emf_ecore_util_FeatureMap$Entry_2_classLit = createForInterface('org.eclipse.emf.ecore.util', 'FeatureMap/Entry'); function BasicEObjectImpl$1(val$eAttribute, val$value){ this.val$eAttribute1 = val$eAttribute; this.val$value2 = val$value; } defineClass(545, 1, {76:1}, BasicEObjectImpl$1); _.getEStructuralFeature = function getEStructuralFeature(){ return this.val$eAttribute1; } ; _.getValue = function getValue_12(){ return this.val$value2; } ; var Lorg_eclipse_emf_ecore_impl_BasicEObjectImpl$1_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'BasicEObjectImpl/1', 545); function BasicEObjectImpl$4(this$0, val$eFeature){ this.this$01 = this$0; this.val$eFeature2 = val$eFeature; } defineClass(1040, 1, $intern_150, BasicEObjectImpl$4); _.get_6 = function get_61(resolve){ return $eGet_1(this.this$01, this.val$eFeature2, resolve); } ; _.isSet_0 = function isSet_1(){ return $eIsSet_0(this.this$01, this.val$eFeature2); } ; _.set_1 = function set_29(newValue){ $eSet_0(this.this$01, this.val$eFeature2, newValue); } ; _.unset = function unset(){ $eUnset_0(this.this$01, this.val$eFeature2); } ; var Lorg_eclipse_emf_ecore_impl_BasicEObjectImpl$4_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'BasicEObjectImpl/4', 1040); function $clinit_BasicEObjectImpl$EPropertiesHolderBaseImpl(){ $clinit_BasicEObjectImpl$EPropertiesHolderBaseImpl = emptyMethod; NO_SETTINGS = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, 0, 5, 1); } defineClass(2081, 1, {114:1}); _.allocateSettings = function allocateSettings(dynamicFeatureCount){ this.eSettings = dynamicFeatureCount == 0?NO_SETTINGS:initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, dynamicFeatureCount, 5, 1); } ; _.dynamicGet = function dynamicGet_0(dynamicFeatureID){ return this.eSettings[dynamicFeatureID]; } ; _.dynamicSet = function dynamicSet_0(dynamicFeatureID, value_0){ this.eSettings[dynamicFeatureID] = value_0; } ; _.dynamicUnset = function dynamicUnset_0(dynamicFeatureID){ this.eSettings[dynamicFeatureID] = null; } ; _.getEClass = function getEClass(){ return this.eClass; } ; _.getEContents = function getEContents(){ throw toJs(new UnsupportedOperationException); } ; _.getEProxyURI = function getEProxyURI(){ throw toJs(new UnsupportedOperationException); } ; _.getEResource = function getEResource(){ return this.eResource; } ; _.hasSettings = function hasSettings(){ return this.eSettings != null; } ; _.setEClass = function setEClass(eClass){ this.eClass = eClass; } ; _.setEContents = function setEContents(eContents){ throw toJs(new UnsupportedOperationException); } ; _.setEProxyURI = function setEProxyURI(eProxyURI){ throw toJs(new UnsupportedOperationException); } ; _.setEResource = function setEResource(eResource){ this.eResource = eResource; } ; var NO_SETTINGS; var Lorg_eclipse_emf_ecore_impl_BasicEObjectImpl$EPropertiesHolderBaseImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'BasicEObjectImpl/EPropertiesHolderBaseImpl', 2081); function BasicEObjectImpl$EPropertiesHolderImpl(){ $clinit_BasicEObjectImpl$EPropertiesHolderBaseImpl(); } defineClass(192, 2081, {114:1}, BasicEObjectImpl$EPropertiesHolderImpl); _.getEContents = function getEContents_0(){ return this.eContents; } ; _.getEProxyURI = function getEProxyURI_0(){ return this.eProxyURI; } ; _.setEContents = function setEContents_0(eContents){ this.eContents = eContents; } ; _.setEProxyURI = function setEProxyURI_0(eProxyURI){ this.eProxyURI = eProxyURI; } ; var Lorg_eclipse_emf_ecore_impl_BasicEObjectImpl$EPropertiesHolderImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'BasicEObjectImpl/EPropertiesHolderImpl', 192); function EObjectImpl(){ } defineClass(516, 99, $intern_139, EObjectImpl); _.eBasicAdapters = function eBasicAdapters_2(){ return this.eAdapters; } ; _.eBasicProperties = function eBasicProperties_1(){ return this.eProperties; } ; _.eBasicSetContainer = function eBasicSetContainer_4(newContainer, newContainerFeatureID){ this.eContainer = newContainer; this.eContainerFeatureID = newContainerFeatureID; } ; _.eClass_0 = function eClass_2(){ return (this.eFlags & 2) == 0?this.eStaticClass():this.eProperties_0().getEClass(); } ; _.eContainerFeatureID_0 = function eContainerFeatureID_2(){ return this.eContainerFeatureID; } ; _.eDeliver = function eDeliver_2(){ return (this.eFlags & 1) != 0; } ; _.eInternalContainer = function eInternalContainer_3(){ return this.eContainer; } ; _.eIsProxy = function eIsProxy_1(){ return (this.eFlags & 4) != 0; } ; _.eProperties_0 = function eProperties_2(){ return !this.eProperties && (this.eProperties = new BasicEObjectImpl$EPropertiesHolderImpl) , this.eProperties; } ; _.eSetClass = function eSetClass_1(eClass){ this.eProperties_0().setEClass(eClass); eClass?(this.eFlags |= 2):(this.eFlags &= -3); } ; _.eSetProxyURI = function eSetProxyURI_2(uri_0){ this.eProperties_0().setEProxyURI(uri_0); uri_0?(this.eFlags |= 4):(this.eFlags &= -5); } ; _.eStaticClass = function eStaticClass_15(){ return ($clinit_EcorePackage() , eINSTANCE_2).eObjectEClass; } ; _.eContainerFeatureID = 0; _.eFlags = 1; var Lorg_eclipse_emf_ecore_impl_EObjectImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EObjectImpl', 516); function $clinit_DynamicEObjectImpl(){ $clinit_DynamicEObjectImpl = emptyMethod; ENO_SETTINGS = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, 0, 5, 1); } function DynamicEObjectImpl(eClass){ $clinit_DynamicEObjectImpl(); EObjectImpl.call(this); this.eSetClass(eClass); } defineClass(798, 516, {110:1, 94:1, 93:1, 58:1, 114:1, 54:1, 99:1}, DynamicEObjectImpl); _.dynamicGet = function dynamicGet_1(dynamicFeatureID){ return this.eSettings[dynamicFeatureID]; } ; _.dynamicSet = function dynamicSet_1(dynamicFeatureID, value_0){ this.eSettings[dynamicFeatureID] = value_0; } ; _.dynamicUnset = function dynamicUnset_1(dynamicFeatureID){ this.eSettings[dynamicFeatureID] = null; } ; _.eClass_0 = function eClass_3(){ return this.eClass; } ; _.eDerivedStructuralFeatureID_0 = function eDerivedStructuralFeatureID_1(eStructuralFeature){ return $getFeatureID(this.eClass, eStructuralFeature); } ; _.eDynamicClass = function eDynamicClass_1(){ return this.eClass; } ; _.eHasSettings = function eHasSettings_1(){ return this.eSettings != null; } ; _.eProperties_0 = function eProperties_3(){ !this.eProperties && (this.eProperties = new DynamicEObjectImpl$DynamicEPropertiesHolderImpl); return this.eProperties; } ; _.eSetClass = function eSetClass_2(eClass){ this.eClass = eClass; } ; _.eSettings_0 = function eSettings_1(){ var size_0; if (this.eSettings == null) { size_0 = $getFeatureCount(this.eClass); this.eSettings = size_0 == 0?ENO_SETTINGS:initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, size_0, 5, 1); } return this; } ; _.eStaticFeatureCount = function eStaticFeatureCount_0(){ return 0; } ; var ENO_SETTINGS; var Lorg_eclipse_emf_ecore_impl_DynamicEObjectImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'DynamicEObjectImpl', 798); function DynamicEObjectImpl$BasicEMapEntry(eClass){ $clinit_DynamicEObjectImpl(); DynamicEObjectImpl.call(this, eClass); this.hash = -1; } defineClass(1522, 798, {110:1, 44:1, 94:1, 93:1, 136:1, 58:1, 114:1, 54:1, 99:1}, DynamicEObjectImpl$BasicEMapEntry); _.equals_0 = function equals_223(other){ return this === other; } ; _.hashCode_1 = function hashCode_83(){ return getObjectIdentityHashCode(this); } ; _.eSetClass = function eSetClass_3(eClass){ this.eClass = eClass; this.keyFeature = $getEStructuralFeature_0(eClass, 'key'); this.valueFeature = $getEStructuralFeature_0(eClass, 'value'); } ; _.getHash = function getHash_1(){ var theKey; if (this.hash == -1) { theKey = $eGet_2(this, this.keyFeature); this.hash = theKey == null?0:hashCode__I__devirtual$(theKey); } return this.hash; } ; _.getKey = function getKey_10(){ return $eGet_2(this, this.keyFeature); } ; _.getValue = function getValue_13(){ return $eGet_2(this, this.valueFeature); } ; _.setHash = function setHash_1(hash){ this.hash = hash; } ; _.setKey = function setKey_1(key){ $eSet_0(this, this.keyFeature, key); } ; _.setValue = function setValue_13(value_0){ var result; result = $eGet_2(this, this.valueFeature); $eSet_0(this, this.valueFeature, value_0); return result; } ; _.hash = 0; var Lorg_eclipse_emf_ecore_impl_DynamicEObjectImpl$BasicEMapEntry_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'DynamicEObjectImpl/BasicEMapEntry', 1522); function DynamicEObjectImpl$DynamicEPropertiesHolderImpl(){ } defineClass(1523, 1, {114:1}, DynamicEObjectImpl$DynamicEPropertiesHolderImpl); _.allocateSettings = function allocateSettings_0(maximumDynamicFeatureID){ throw toJs(new UnsupportedOperationException); } ; _.dynamicGet = function dynamicGet_2(dynamicFeatureID){ throw toJs(new UnsupportedOperationException); } ; _.dynamicSet = function dynamicSet_2(dynamicFeatureID, value_0){ throw toJs(new UnsupportedOperationException); } ; _.dynamicUnset = function dynamicUnset_2(dynamicFeatureID){ throw toJs(new UnsupportedOperationException); } ; _.getEClass = function getEClass_0(){ throw toJs(new UnsupportedOperationException); } ; _.getEContents = function getEContents_1(){ return this.eContents; } ; _.getEProxyURI = function getEProxyURI_1(){ return this.eProxyURI; } ; _.getEResource = function getEResource_0(){ return this.eResource; } ; _.hasSettings = function hasSettings_0(){ throw toJs(new UnsupportedOperationException); } ; _.setEClass = function setEClass_0(eClass){ throw toJs(new UnsupportedOperationException); } ; _.setEContents = function setEContents_1(eContents){ this.eContents = eContents; } ; _.setEProxyURI = function setEProxyURI_1(eProxyURI){ this.eProxyURI = eProxyURI; } ; _.setEResource = function setEResource_0(eResource){ this.eResource = eResource; } ; var Lorg_eclipse_emf_ecore_impl_DynamicEObjectImpl$DynamicEPropertiesHolderImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'DynamicEObjectImpl/DynamicEPropertiesHolderImpl', 1523); function $basicSetEModelElement(this$static, newEModelElement, msgs){ msgs = $eBasicSetContainer(this$static, castTo(newEModelElement, 54), 3, msgs); return msgs; } function $eBasicRemoveFromContainerFeature_5(this$static, msgs){ var eClass, inverseFeature; if (this$static.eFlags_0 >> 16 == 3) { return this$static.eContainer.eInverseRemove(this$static, 0, Lorg_eclipse_emf_ecore_EModelElement_2_classLit, msgs); } return inverseFeature = $getEOpposite(castTo($getEStructuralFeature((eClass = castTo($getField(this$static, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , EANNOTATION):eClass), this$static.eFlags_0 >> 16), 19)) , this$static.eContainer.eInverseRemove(this$static, inverseFeature.featureID, inverseFeature.containerClass, msgs); } function $getContents(this$static){ !this$static.contents && (this$static.contents = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EObject_2_classLit, this$static, 4)); return this$static.contents; } function $getEModelElement(this$static){ if (this$static.eFlags_0 >> 16 != 3) return null; return castTo(this$static.eContainer, 155); } function $setEModelElement(this$static, newEModelElement){ var eContainerFeatureID, msgs; if (newEModelElement != this$static.eContainer || this$static.eFlags_0 >> 16 != 3 && !!newEModelElement) { if (isAncestor(this$static, newEModelElement)) throw toJs(new IllegalArgumentException_0('Recursive containment not allowed for ' + $toString_27(this$static))); msgs = null; !!this$static.eContainer && (msgs = (eContainerFeatureID = this$static.eFlags_0 >> 16 , eContainerFeatureID >= 0?$eBasicRemoveFromContainerFeature_5(this$static, msgs):this$static.eContainer.eInverseRemove(this$static, -1 - eContainerFeatureID, null, msgs))); !!newEModelElement && (msgs = castTo(newEModelElement, 54).eInverseAdd(this$static, 0, Lorg_eclipse_emf_ecore_EModelElement_2_classLit, msgs)); msgs = $basicSetEModelElement(this$static, newEModelElement, msgs); !!msgs && msgs.dispatch_0(); } else (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 3, newEModelElement, newEModelElement)); } function $setSource_2(this$static, newSource){ $setSourceGen(this$static, newSource == null?null:(checkCriticalNotNull(newSource) , newSource)); } function $setSourceGen(this$static, newSource){ var oldSource; oldSource = this$static.source; this$static.source = newSource; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 1, oldSource, this$static.source)); } function $toString_27(this$static){ var result; if ((this$static.eFlags_0 & 64) != 0) return $toString_16(this$static); result = new StringBuffer_1($toString_16(this$static)); result.string += ' (source: '; $append_3(result, this$static.source); result.string += ')'; return result.string; } function EAnnotationImpl(){ } defineClass(519, 158, {110:1, 94:1, 93:1, 598:1, 155:1, 58:1, 114:1, 54:1, 99:1, 519:1, 158:1, 119:1, 120:1}, EAnnotationImpl); _.eBasicRemoveFromContainerFeature = function eBasicRemoveFromContainerFeature_6(msgs){ return $eBasicRemoveFromContainerFeature_5(this, msgs); } ; _.eGet = function eGet_17(featureID, resolve, coreType){ var eClass; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , this.eAnnotations; case 1: return this.source; case 2: return coreType?(!this.details && (this.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, this)) , this.details):(!this.details && (this.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, this)) , $map_0(this.details)); case 3: return $getEModelElement(this); case 4: return !this.contents && (this.contents = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EObject_2_classLit, this, 4)) , this.contents; case 5: return !this.references && (this.references = new EObjectResolvingEList(Lorg_eclipse_emf_ecore_EObject_2_classLit, this, 5)) , this.references; } return $eDynamicGet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EANNOTATION)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EANNOTATION:eClass), featureID), resolve, coreType); } ; _.eInverseAdd_0 = function eInverseAdd_11(otherEnd, featureID, msgs){ var eClass, eContainerFeatureID, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicAdd_0(this.eAnnotations, otherEnd, msgs); case 3: !!this.eContainer && (msgs = (eContainerFeatureID = this.eFlags_0 >> 16 , eContainerFeatureID >= 0?$eBasicRemoveFromContainerFeature_5(this, msgs):this.eContainer.eInverseRemove(this, -1 - eContainerFeatureID, null, msgs))); return $basicSetEModelElement(this, castTo(otherEnd, 155), msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , EANNOTATION):eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseAdd(this, $eSettings_0(this), featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EANNOTATION)), otherEnd, msgs); } ; _.eInverseRemove_0 = function eInverseRemove_12(otherEnd, featureID, msgs){ var eClass, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicRemove_0(this.eAnnotations, otherEnd, msgs); case 2: return !this.details && (this.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, this)) , $basicRemove_1(this.details, otherEnd, msgs); case 3: return $basicSetEModelElement(this, null, msgs); case 4: return !this.contents && (this.contents = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EObject_2_classLit, this, 4)) , $basicRemove_0(this.contents, otherEnd, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , EANNOTATION):eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseRemove(this, $eSettings_0(this), featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EANNOTATION)), otherEnd, msgs); } ; _.eIsSet = function eIsSet_16(featureID){ var eClass; switch (featureID) { case 0: return !!this.eAnnotations && this.eAnnotations.size_0 != 0; case 1: return this.source != null; case 2: return !!this.details && this.details.size_0 != 0; case 3: return !!$getEModelElement(this); case 4: return !!this.contents && this.contents.size_0 != 0; case 5: return !!this.references && this.references.size_0 != 0; } return $eDynamicIsSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EANNOTATION)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EANNOTATION:eClass), featureID)); } ; _.eSet = function eSet_15(featureID, newValue){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $addAll_9(this.eAnnotations, castTo(newValue, 16)); return; case 1: $setSource_2(this, castToString(newValue)); return; case 2: !this.details && (this.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, this)); $set_13(this.details, newValue); return; case 3: $setEModelElement(this, castTo(newValue, 155)); return; case 4: !this.contents && (this.contents = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EObject_2_classLit, this, 4)); $clear_13(this.contents); !this.contents && (this.contents = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EObject_2_classLit, this, 4)); $addAll_9(this.contents, castTo(newValue, 16)); return; case 5: !this.references && (this.references = new EObjectResolvingEList(Lorg_eclipse_emf_ecore_EObject_2_classLit, this, 5)); $clear_13(this.references); !this.references && (this.references = new EObjectResolvingEList(Lorg_eclipse_emf_ecore_EObject_2_classLit, this, 5)); $addAll_9(this.references, castTo(newValue, 16)); return; } $eDynamicSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EANNOTATION)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EANNOTATION:eClass), featureID), newValue); } ; _.eStaticClass = function eStaticClass_16(){ return $clinit_EcorePackage$Literals() , EANNOTATION; } ; _.eUnset = function eUnset_15(featureID){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); return; case 1: $setSourceGen(this, null); return; case 2: !this.details && (this.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, this)); this.details.delegateEList.clear_0(); return; case 3: $setEModelElement(this, null); return; case 4: !this.contents && (this.contents = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EObject_2_classLit, this, 4)); $clear_13(this.contents); return; case 5: !this.references && (this.references = new EObjectResolvingEList(Lorg_eclipse_emf_ecore_EObject_2_classLit, this, 5)); $clear_13(this.references); return; } $eDynamicUnset(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EANNOTATION)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EANNOTATION:eClass), featureID)); } ; _.toString_0 = function toString_145(){ return $toString_27(this); } ; _.source = null; var Lorg_eclipse_emf_ecore_impl_EAnnotationImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EAnnotationImpl', 519); function $addUnique_7(this$static, index_0, object){ castTo(this$static.delegateEList, 71).addUnique(index_0, object); } function $basicAdd_1(this$static, object, notifications){ return castTo(this$static.delegateEList, 71).basicAdd(object, notifications); } function $basicRemove_1(this$static, object, notifications){ return castTo(this$static.delegateEList, 71).basicRemove(object, notifications); } function $set_13(this$static, value_0){ var mapValue; if (instanceOf(value_0, 85)) { castTo(this$static.delegateEList, 79).unset(); mapValue = castTo(value_0, 85); $putAll_1(this$static, mapValue); } else { castTo(this$static.delegateEList, 79).set_1(value_0); } } function EcoreEMap(entryEClass, entryClass, owner, featureID){ this.initializeDelegateEList(); this.entryClass = entryClass; this.entryEClass = entryEClass; this.delegateEList = new EcoreEMap$DelegateEObjectContainmentEList(this, entryClass, owner, featureID); } defineClass(141, 721, $intern_151, EcoreEMap); _.addUnique = function addUnique_9(index_0, object){ $addUnique_7(this, index_0, castTo(object, 44)); } ; _.basicAdd = function basicAdd(object, notifications){ return $basicAdd_1(this, castTo(object, 44), notifications); } ; _.basicGet = function basicGet_0(index_0){ return castTo(castTo(this.delegateEList, 71).basicGet(index_0), 136); } ; _.basicIterator = function basicIterator_1(){ return castTo(this.delegateEList, 71).basicIterator(); } ; _.basicListIterator = function basicListIterator_3(){ return castTo(this.delegateEList, 71).basicListIterator(); } ; _.basicListIterator_0 = function basicListIterator_4(index_0){ return castTo(this.delegateEList, 71).basicListIterator_0(index_0); } ; _.basicRemove = function basicRemove(object, notifications){ return $basicRemove_1(this, object, notifications); } ; _.get_6 = function get_62(resolve){ return castTo(this.delegateEList, 79).get_6(resolve); } ; _.initializeDelegateEList = function initializeDelegateEList_0(){ } ; _.isSet_0 = function isSet_2(){ return castTo(this.delegateEList, 79).isSet_0(); } ; _.newEntry = function newEntry_1(hash, key, value_0){ var entry; entry = castTo($getEPackage(this.entryEClass).getEFactoryInstance().create_3(this.entryEClass), 136); entry.setHash(hash); entry.setKey(key); entry.setValue(value_0); return entry; } ; _.newList = function newList_0(){ return new EcoreEMap$1(this); } ; _.set_1 = function set_30(value_0){ $set_13(this, value_0); } ; _.unset = function unset_0(){ castTo(this.delegateEList, 79).unset(); } ; var Lorg_eclipse_emf_ecore_util_EcoreEMap_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EcoreEMap', 141); function EAnnotationImpl$1($anonymous0, $anonymous1, $anonymous2){ EcoreEMap.call(this, $anonymous0, $anonymous1, $anonymous2, 2); } defineClass(165, 141, $intern_151, EAnnotationImpl$1); _.ensureEntryDataExists = function ensureEntryDataExists_0(){ var eList, entry, entry$iterator, hash, index_0, result; if (this.entryData == null) { result = initUnidimensionalArray(Lorg_eclipse_emf_common_util_BasicEList_2_classLit, $intern_148, 66, 2 * this.size_0 + 1, 0, 1); for (entry$iterator = this.delegateEList.iterator_0(); entry$iterator.cursor != entry$iterator.this$01_2.size_1();) { entry = castTo(entry$iterator.doNext(), 136); hash = entry.getHash(); index_0 = (hash & $intern_0) % result.length; eList = result[index_0]; !eList && (eList = result[index_0] = new EcoreEMap$1(this)); eList.add_2(entry); } this.entryData = result; } } ; var Lorg_eclipse_emf_ecore_impl_EAnnotationImpl$1_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EAnnotationImpl/1', 165); function $basicSetEGenericType(this$static, newEGenericType, msgs){ var newEType, notification, oldEGenericType; oldEGenericType = this$static.eGenericType; this$static.eGenericType = newEGenericType; if ((this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0) { notification = new ENotificationImpl_1(this$static, 1, 9, oldEGenericType, newEGenericType); !msgs?(msgs = notification):msgs.add_5(notification); } if (!newEGenericType) { !!this$static.eType && (msgs = this$static.setEType(null, msgs)); } else { newEType = newEGenericType.eRawType; newEType != this$static.eType && (msgs = this$static.setEType(newEType, msgs)); } return msgs; } function $basicUnsetEGenericType(this$static, msgs){ msgs = this$static.setEType(null, msgs); return $basicSetEGenericType(this$static, null, msgs); } function $getEType(this$static){ var oldEType; if ((this$static.eFlags & 1) == 0 && !!this$static.eType && this$static.eType.eIsProxy()) { oldEType = castTo(this$static.eType, 54); this$static.eType = castTo($eResolveProxy(this$static, oldEType), 142); this$static.eType != oldEType && (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 9, 8, oldEType, this$static.eType)); } return this$static.eType; } function $setEGenericType(this$static, newEGenericType, msgs){ var notification; if (newEGenericType != this$static.eGenericType) { !!this$static.eGenericType && (msgs = $eInverseRemove(this$static.eGenericType, this$static, -10, msgs)); !!newEGenericType && (msgs = $eInverseAdd(newEGenericType, this$static, -10, msgs)); msgs = $basicSetEGenericType(this$static, newEGenericType, msgs); } else if ((this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0) { notification = new ENotificationImpl_1(this$static, 1, 9, newEGenericType, newEGenericType); !msgs?(msgs = notification):msgs.add_5(notification); } return msgs; } function $setEType(this$static, newEType){ var eGenericType, msgs, newEGenericType; msgs = this$static.setEType(newEType, null); newEGenericType = null; if (newEType) { newEGenericType = ($clinit_EcoreFactory() , eGenericType = new EGenericTypeImpl , eGenericType); $setEClassifier(newEGenericType, this$static.eType); } msgs = $setEGenericType(this$static, newEGenericType, msgs); !!msgs && msgs.dispatch_0(); } function $setEType_0(this$static, newEType, msgs){ var notification, oldEType; oldEType = this$static.eType; this$static.eType = newEType; if ((this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0) { notification = new ENotificationImpl_1(this$static, 1, 8, oldEType, this$static.eType); !msgs?(msgs = notification):msgs.add_5(notification); } return msgs; } function $setLowerBound(this$static, newLowerBound){ var oldLowerBound; oldLowerBound = this$static.lowerBound; this$static.lowerBound = newLowerBound; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_0(this$static, 4, oldLowerBound, this$static.lowerBound)); } function $setOrdered(this$static, newOrdered){ var oldOrdered; oldOrdered = (this$static.eFlags & 256) != 0; newOrdered?(this$static.eFlags |= 256):(this$static.eFlags &= -257); (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_4(this$static, 1, 2, oldOrdered, newOrdered)); } function $setUnique_2(this$static, newUnique){ var oldUnique; oldUnique = (this$static.eFlags & 512) != 0; newUnique?(this$static.eFlags |= 512):(this$static.eFlags &= -513); (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_4(this$static, 1, 3, oldUnique, newUnique)); } function $setUpperBound(this$static, newUpperBound){ var oldUpperBound; oldUpperBound = this$static.upperBound; this$static.upperBound = newUpperBound; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_0(this$static, 5, oldUpperBound, this$static.upperBound)); } function $toString_28(this$static){ var result; if ((this$static.eFlags_0 & 64) != 0) return $toString_21(this$static); result = new StringBuffer_1($toString_21(this$static)); result.string += ' (ordered: '; $append_4(result, (this$static.eFlags & 256) != 0); result.string += ', unique: '; $append_4(result, (this$static.eFlags & 512) != 0); result.string += ', lowerBound: '; $append_1(result, this$static.lowerBound); result.string += ', upperBound: '; $append_1(result, this$static.upperBound); result.string += ')'; return result.string; } function ETypedElementImpl(){ this.eFlags |= 256; this.eFlags |= 512; } defineClass(292, 448, {110:1, 94:1, 93:1, 155:1, 197:1, 58:1, 114:1, 481:1, 54:1, 99:1, 158:1, 292:1, 119:1, 120:1}); _.eGet = function eGet_18(featureID, resolve, coreType){ var eClass, lower; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , this.eAnnotations; case 1: return this.name_0; case 2: return $clinit_Boolean() , (this.eFlags & 256) != 0?true:false; case 3: return $clinit_Boolean() , (this.eFlags & 512) != 0?true:false; case 4: return valueOf_3(this.lowerBound); case 5: return valueOf_3(this.upperBound); case 6: return $clinit_Boolean() , this.isMany()?true:false; case 7: return $clinit_Boolean() , lower = this.lowerBound , lower >= 1?true:false; case 8: if (resolve) return $getEType(this); return this.eType; case 9: return this.eGenericType; } return $eDynamicGet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID), resolve, coreType); } ; _.eInverseRemove_0 = function eInverseRemove_13(otherEnd, featureID, msgs){ var eClass, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicRemove_0(this.eAnnotations, otherEnd, msgs); case 9: return $basicUnsetEGenericType(this, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseRemove(this, $eSettings_0(this), featureID - $getFeatureCount(this.eStaticClass()), otherEnd, msgs); } ; _.eIsSet = function eIsSet_17(featureID){ var eClass, lower; switch (featureID) { case 0: return !!this.eAnnotations && this.eAnnotations.size_0 != 0; case 1: return this.name_0 != null; case 2: return (this.eFlags & 256) == 0; case 3: return (this.eFlags & 512) == 0; case 4: return this.lowerBound != 0; case 5: return this.upperBound != 1; case 6: return this.isMany(); case 7: return lower = this.lowerBound , lower >= 1; case 8: return !!this.eType && !this.eGenericType.eTypeParameter && $getETypeArguments(this.eGenericType).size_0 == 0; case 9: return !!this.eGenericType && !(!!this.eType && !this.eGenericType.eTypeParameter && $getETypeArguments(this.eGenericType).size_0 == 0); } return $eDynamicIsSet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID)); } ; _.eSet = function eSet_16(featureID, newValue){ var eClass, msgs; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $addAll_9(this.eAnnotations, castTo(newValue, 16)); return; case 1: this.setName(castToString(newValue)); return; case 2: $setOrdered(this, $booleanValue(castToBoolean(newValue))); return; case 3: $setUnique_2(this, $booleanValue(castToBoolean(newValue))); return; case 4: $setLowerBound(this, castTo(newValue, 17).value_0); return; case 5: this.setUpperBound(castTo(newValue, 17).value_0); return; case 8: $setEType(this, castTo(newValue, 142)); return; case 9: msgs = $setEGenericType(this, castTo(newValue, 89), null); !!msgs && msgs.dispatch_0(); return; } $eDynamicSet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID), newValue); } ; _.eStaticClass = function eStaticClass_17(){ return $clinit_EcorePackage$Literals() , ETYPED_ELEMENT; } ; _.eUnset = function eUnset_16(featureID){ var eClass, msgs; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); return; case 1: this.setName(null); return; case 2: $setOrdered(this, true); return; case 3: $setUnique_2(this, true); return; case 4: $setLowerBound(this, 0); return; case 5: this.setUpperBound(1); return; case 8: $setEType(this, null); return; case 9: msgs = $setEGenericType(this, null, null); !!msgs && msgs.dispatch_0(); return; } $eDynamicUnset(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID)); } ; _.freeze = function freeze_1(){ $getEType(this); this.eFlags |= 1; } ; _.getEType = function getEType(){ return $getEType(this); } ; _.getUpperBound = function getUpperBound(){ return this.upperBound; } ; _.isMany = function isMany(){ var upper; return upper = this.upperBound , upper > 1 || upper == -1; } ; _.isUnique = function isUnique_2(){ return (this.eFlags & 512) != 0; } ; _.setEType = function setEType(newEType, msgs){ return $setEType_0(this, newEType, msgs); } ; _.setUpperBound = function setUpperBound(newUpperBound){ $setUpperBound(this, newUpperBound); } ; _.toString_0 = function toString_146(){ return $toString_28(this); } ; _.lowerBound = 0; _.upperBound = 1; var Lorg_eclipse_emf_ecore_impl_ETypedElementImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'ETypedElementImpl', 292); function $eBasicRemoveFromContainerFeature_6(this$static, msgs){ var eClass, inverseFeature; if (this$static.eFlags_0 >> 16 == 17) { return this$static.eContainer.eInverseRemove(this$static, 21, Lorg_eclipse_emf_ecore_EClass_2_classLit, msgs); } return inverseFeature = $getEOpposite(castTo($getEStructuralFeature((eClass = castTo($getField(this$static, 16), 29) , !eClass?this$static.eStaticClass():eClass), this$static.eFlags_0 >> 16), 19)) , this$static.eContainer.eInverseRemove(this$static, inverseFeature.featureID, inverseFeature.containerClass, msgs); } function $getDefaultValue(this$static){ var eDataType, ePackage, eType, factory, literal; eType = $getEType(this$static); literal = this$static.defaultValueLiteral; if (literal == null && !!eType) { return this$static.isMany()?null:eType.getDefaultValue(); } else if (instanceOf(eType, 156)) { ePackage = eType.getEPackage(); if (ePackage) { factory = ePackage.getEFactoryInstance(); if (factory != this$static.defaultValueFactory) { eDataType = castTo(eType, 156); if (eDataType.isSerializable()) { try { this$static.defaultValue = factory.createFromString(eDataType, literal); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 82)) { this$static.defaultValue = null; } else throw toJs($e0); } } this$static.defaultValueFactory = factory; } } return this$static.defaultValue; } return null; } function $getEContainingClass(this$static){ if (this$static.eFlags_0 >> 16 != 17) return null; return castTo(this$static.eContainer, 29); } function $getFeatureMapEntryPrototype(this$static){ var eOpposite; if (!this$static.prototypeFeatureMapEntry) { eOpposite = this$static.getEOpposite(); eOpposite?(this$static.prototypeFeatureMapEntry = new EStructuralFeatureImpl$InverseUpdatingFeatureMapEntry(this$static, this$static, null)):this$static.isContainment()?(this$static.prototypeFeatureMapEntry = new EStructuralFeatureImpl$ContainmentUpdatingFeatureMapEntry(this$static, null)):$getFeatureKind($getExtendedMetaData_1(($clinit_ExtendedMetaData() , INSTANCE_11), this$static)) == 1?(this$static.prototypeFeatureMapEntry = new EStructuralFeatureImpl$SimpleContentFeatureMapEntry(this$static)):(this$static.prototypeFeatureMapEntry = new EStructuralFeatureImpl$SimpleFeatureMapEntry(this$static, null)); } return this$static.prototypeFeatureMapEntry; } function $isFeatureMap(this$static){ var eType; if (this$static.cachedEType != this$static.eType) { eType = $getEType(this$static); this$static.cachedIsFeatureMap = !!eType && eType.getInstanceClassName() == 'org.eclipse.emf.ecore.util.FeatureMap$Entry'; this$static.cachedEType = eType; } return this$static.cachedIsFeatureMap; } function $setChangeable(this$static, newChangeable){ var oldChangeable; oldChangeable = (this$static.eFlags & $intern_35) != 0; newChangeable?(this$static.eFlags |= $intern_35):(this$static.eFlags &= -1025); (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_4(this$static, 1, 10, oldChangeable, newChangeable)); } function $setDefaultValueLiteral(this$static, newDefaultValueLiteral){ this$static.defaultValueFactory = null; $setDefaultValueLiteralGen(this$static, newDefaultValueLiteral); } function $setDefaultValueLiteralGen(this$static, newDefaultValueLiteral){ var oldDefaultValueLiteral; oldDefaultValueLiteral = this$static.defaultValueLiteral; this$static.defaultValueLiteral = newDefaultValueLiteral; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 13, oldDefaultValueLiteral, this$static.defaultValueLiteral)); } function $setDerived(this$static, newDerived){ var oldDerived; oldDerived = (this$static.eFlags & $intern_17) != 0; newDerived?(this$static.eFlags |= $intern_17):(this$static.eFlags &= -16385); (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_4(this$static, 1, 16, oldDerived, newDerived)); } function $setFeatureID(this$static, featureID){ this$static.featureID = featureID; } function $setName_0(this$static, newName){ instanceOf(this$static.eContainer, 90) && $setFlags_0($getESuperAdapter(castTo(this$static.eContainer, 90)), 4); $setName(this$static, newName); } function $setTransient(this$static, newTransient){ var oldTransient; oldTransient = (this$static.eFlags & $intern_62) != 0; newTransient?(this$static.eFlags |= $intern_62):(this$static.eFlags &= -4097); (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_4(this$static, 1, 12, oldTransient, newTransient)); } function $setUnsettable(this$static, newUnsettable){ var oldUnsettable; oldUnsettable = (this$static.eFlags & $intern_152) != 0; newUnsettable?(this$static.eFlags |= $intern_152):(this$static.eFlags &= -8193); (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_4(this$static, 1, 15, oldUnsettable, newUnsettable)); } function $setVolatile(this$static, newVolatile){ var oldVolatile; oldVolatile = (this$static.eFlags & $intern_153) != 0; newVolatile?(this$static.eFlags |= $intern_153):(this$static.eFlags &= -2049); (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_4(this$static, 1, 11, oldVolatile, newVolatile)); } function $toString_29(this$static){ var result; if ((this$static.eFlags_0 & 64) != 0) return $toString_28(this$static); result = new StringBuffer_1($toString_28(this$static)); result.string += ' (changeable: '; $append_4(result, (this$static.eFlags & $intern_35) != 0); result.string += ', volatile: '; $append_4(result, (this$static.eFlags & $intern_153) != 0); result.string += ', transient: '; $append_4(result, (this$static.eFlags & $intern_62) != 0); result.string += ', defaultValueLiteral: '; $append_3(result, this$static.defaultValueLiteral); result.string += ', unsettable: '; $append_4(result, (this$static.eFlags & $intern_152) != 0); result.string += ', derived: '; $append_4(result, (this$static.eFlags & $intern_17) != 0); result.string += ')'; return result.string; } function EStructuralFeatureImpl(){ ETypedElementImpl.call(this); this.featureID = -1; this.defaultValue = null; this.defaultValueFactory = null; this.defaultValueLiteral = null; this.eFlags |= $intern_35; } defineClass(462, 292, {110:1, 94:1, 93:1, 155:1, 197:1, 58:1, 179:1, 69:1, 114:1, 481:1, 54:1, 99:1, 158:1, 462:1, 292:1, 119:1, 120:1, 692:1}); _.eBasicRemoveFromContainerFeature = function eBasicRemoveFromContainerFeature_7(msgs){ return $eBasicRemoveFromContainerFeature_6(this, msgs); } ; _.eGet = function eGet_19(featureID, resolve, coreType){ var eClass, lower; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , this.eAnnotations; case 1: return this.name_0; case 2: return $clinit_Boolean() , (this.eFlags & 256) != 0?true:false; case 3: return $clinit_Boolean() , (this.eFlags & 512) != 0?true:false; case 4: return valueOf_3(this.lowerBound); case 5: return valueOf_3(this.upperBound); case 6: return $clinit_Boolean() , this.isMany()?true:false; case 7: return $clinit_Boolean() , lower = this.lowerBound , lower >= 1?true:false; case 8: if (resolve) return $getEType(this); return this.eType; case 9: return this.eGenericType; case 10: return $clinit_Boolean() , (this.eFlags & $intern_35) != 0?true:false; case 11: return $clinit_Boolean() , (this.eFlags & $intern_153) != 0?true:false; case 12: return $clinit_Boolean() , (this.eFlags & $intern_62) != 0?true:false; case 13: return this.defaultValueLiteral; case 14: return $getDefaultValue(this); case 15: return $clinit_Boolean() , (this.eFlags & $intern_152) != 0?true:false; case 16: return $clinit_Boolean() , (this.eFlags & $intern_17) != 0?true:false; case 17: return $getEContainingClass(this); } return $eDynamicGet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID), resolve, coreType); } ; _.eInverseAdd_0 = function eInverseAdd_12(otherEnd, featureID, msgs){ var eClass, eContainerFeatureID, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicAdd_0(this.eAnnotations, otherEnd, msgs); case 17: !!this.eContainer && (msgs = (eContainerFeatureID = this.eFlags_0 >> 16 , eContainerFeatureID >= 0?$eBasicRemoveFromContainerFeature_6(this, msgs):this.eContainer.eInverseRemove(this, -1 - eContainerFeatureID, null, msgs))); return $eBasicSetContainer(this, otherEnd, 17, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseAdd(this, $eSettings_0(this), featureID - $getFeatureCount(this.eStaticClass()), otherEnd, msgs); } ; _.eInverseRemove_0 = function eInverseRemove_14(otherEnd, featureID, msgs){ var eClass, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicRemove_0(this.eAnnotations, otherEnd, msgs); case 9: return $basicUnsetEGenericType(this, msgs); case 17: return $eBasicSetContainer(this, null, 17, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseRemove(this, $eSettings_0(this), featureID - $getFeatureCount(this.eStaticClass()), otherEnd, msgs); } ; _.eIsSet = function eIsSet_18(featureID){ var eClass, lower; switch (featureID) { case 0: return !!this.eAnnotations && this.eAnnotations.size_0 != 0; case 1: return this.name_0 != null; case 2: return (this.eFlags & 256) == 0; case 3: return (this.eFlags & 512) == 0; case 4: return this.lowerBound != 0; case 5: return this.upperBound != 1; case 6: return this.isMany(); case 7: return lower = this.lowerBound , lower >= 1; case 8: return !!this.eType && !this.eGenericType.eTypeParameter && $getETypeArguments(this.eGenericType).size_0 == 0; case 9: return !!this.eGenericType && !(!!this.eType && !this.eGenericType.eTypeParameter && $getETypeArguments(this.eGenericType).size_0 == 0); case 10: return (this.eFlags & $intern_35) == 0; case 11: return (this.eFlags & $intern_153) != 0; case 12: return (this.eFlags & $intern_62) != 0; case 13: return this.defaultValueLiteral != null; case 14: return $getDefaultValue(this) != null; case 15: return (this.eFlags & $intern_152) != 0; case 16: return (this.eFlags & $intern_17) != 0; case 17: return !!$getEContainingClass(this); } return $eDynamicIsSet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID)); } ; _.eSet = function eSet_17(featureID, newValue){ var eClass, msgs; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $addAll_9(this.eAnnotations, castTo(newValue, 16)); return; case 1: $setName_0(this, castToString(newValue)); return; case 2: $setOrdered(this, $booleanValue(castToBoolean(newValue))); return; case 3: $setUnique_2(this, $booleanValue(castToBoolean(newValue))); return; case 4: $setLowerBound(this, castTo(newValue, 17).value_0); return; case 5: this.setUpperBound(castTo(newValue, 17).value_0); return; case 8: $setEType(this, castTo(newValue, 142)); return; case 9: msgs = $setEGenericType(this, castTo(newValue, 89), null); !!msgs && msgs.dispatch_0(); return; case 10: $setChangeable(this, $booleanValue(castToBoolean(newValue))); return; case 11: $setVolatile(this, $booleanValue(castToBoolean(newValue))); return; case 12: $setTransient(this, $booleanValue(castToBoolean(newValue))); return; case 13: $setDefaultValueLiteral(this, castToString(newValue)); return; case 15: $setUnsettable(this, $booleanValue(castToBoolean(newValue))); return; case 16: $setDerived(this, $booleanValue(castToBoolean(newValue))); return; } $eDynamicSet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID), newValue); } ; _.eStaticClass = function eStaticClass_18(){ return $clinit_EcorePackage$Literals() , ESTRUCTURAL_FEATURE; } ; _.eUnset = function eUnset_17(featureID){ var eClass, msgs; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); return; case 1: instanceOf(this.eContainer, 90) && $setFlags_0($getESuperAdapter(castTo(this.eContainer, 90)), 4); $setName(this, null); return; case 2: $setOrdered(this, true); return; case 3: $setUnique_2(this, true); return; case 4: $setLowerBound(this, 0); return; case 5: this.setUpperBound(1); return; case 8: $setEType(this, null); return; case 9: msgs = $setEGenericType(this, null, null); !!msgs && msgs.dispatch_0(); return; case 10: $setChangeable(this, true); return; case 11: $setVolatile(this, false); return; case 12: $setTransient(this, false); return; case 13: this.defaultValueFactory = null; $setDefaultValueLiteralGen(this, null); return; case 15: $setUnsettable(this, false); return; case 16: $setDerived(this, false); return; } $eDynamicUnset(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID)); } ; _.freeze = function freeze_2(){ $getName_0($getExtendedMetaData_1(($clinit_ExtendedMetaData() , INSTANCE_11), this)); $getEType(this); this.eFlags |= 1; } ; _.getContainerClass = function getContainerClass(){ return this.containerClass; } ; _.getDefaultValue = function getDefaultValue(){ return $getDefaultValue(this); } ; _.getEContainingClass = function getEContainingClass(){ return $getEContainingClass(this); } ; _.getEOpposite = function getEOpposite(){ return null; } ; _.getExtendedMetaData_0 = function getExtendedMetaData_0(){ return this.eStructuralFeatureExtendedMetaData; } ; _.getFeatureID_0 = function getFeatureID_4(){ return this.featureID; } ; _.getFeatureMapEntryPrototype = function getFeatureMapEntryPrototype(){ return $getFeatureMapEntryPrototype(this); } ; _.getSettingDelegate = function getSettingDelegate(){ var dataClass, defaultValue, eClass, eOpposite, eType, featureMapFeature, instanceClass, intrinsicDefaultValue, upper; if (!this.settingDelegate) { eClass = $getEContainingClass(this); (eClass.eAllStructuralFeaturesData == null && $getEAllStructuralFeatures(eClass) , eClass.eAllStructuralFeaturesData).length; eOpposite = this.getEOpposite(); !!eOpposite && $getFeatureCount($getEContainingClass(eOpposite)); eType = $getEType(this); instanceClass = eType.getInstanceClass(); dataClass = !instanceClass?null:(instanceClass.modifiers & 1) != 0?instanceClass == Z_classLit?Ljava_lang_Boolean_2_classLit:instanceClass == I_classLit?Ljava_lang_Integer_2_classLit:instanceClass == F_classLit?Ljava_lang_Float_2_classLit:instanceClass == D_classLit?Ljava_lang_Double_2_classLit:instanceClass == J_classLit?Ljava_lang_Long_2_classLit:instanceClass == S_classLit?Ljava_lang_Short_2_classLit:instanceClass == B_classLit?Ljava_lang_Byte_2_classLit:Ljava_lang_Character_2_classLit:instanceClass; defaultValue = $getDefaultValue(this); intrinsicDefaultValue = eType.getDefaultValue(); getSettingDelegateFactory(this); (this.eFlags & $intern_17) != 0 && (!!(featureMapFeature = $getMixedFeature(($clinit_ExtendedMetaData() , INSTANCE_11), eClass)) && featureMapFeature != this || !!(featureMapFeature = $getGroup($getExtendedMetaData_1(INSTANCE_11, this))))?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator(this, featureMapFeature)):this.isMany()?this.isContainment()?!eOpposite?(this.eFlags & $intern_152) != 0?!dataClass?this.isResolveProxies_0()?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_1(42, this)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_1(0, this)):dataClass == Ljava_util_Map$Entry_2_classLit?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany(50, Lorg_eclipse_emf_common_util_BasicEMap$Entry_2_classLit, this)):this.isResolveProxies_0()?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany(43, dataClass, this)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany(1, dataClass, this)):!dataClass?this.isResolveProxies_0()?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_1(44, this)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_1(2, this)):dataClass == Ljava_util_Map$Entry_2_classLit?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany(41, Lorg_eclipse_emf_common_util_BasicEMap$Entry_2_classLit, this)):this.isResolveProxies_0()?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany(45, dataClass, this)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany(3, dataClass, this)):(this.eFlags & $intern_152) != 0?!dataClass?this.isResolveProxies_0()?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_2(46, this, eOpposite)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_2(4, this, eOpposite)):this.isResolveProxies_0()?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_0(47, dataClass, this, eOpposite)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_0(5, dataClass, this, eOpposite)):!dataClass?this.isResolveProxies_0()?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_2(48, this, eOpposite)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_2(6, this, eOpposite)):this.isResolveProxies_0()?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_0(49, dataClass, this, eOpposite)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_0(7, dataClass, this, eOpposite)):instanceOf(eType, 156)?dataClass == Lorg_eclipse_emf_ecore_util_FeatureMap$Entry_2_classLit?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_1(40, this)):(this.eFlags & 512) != 0?(this.eFlags & $intern_152) != 0?!dataClass?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_1(8, this)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany(9, dataClass, this)):!dataClass?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_1(10, this)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany(11, dataClass, this)):(this.eFlags & $intern_152) != 0?!dataClass?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_1(12, this)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany(13, dataClass, this)):!dataClass?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_1(14, this)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany(15, dataClass, this)):!eOpposite?this.isResolveProxies_0()?(this.eFlags & $intern_152) != 0?!dataClass?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_1(16, this)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany(17, dataClass, this)):!dataClass?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_1(18, this)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany(19, dataClass, this)):(this.eFlags & $intern_152) != 0?!dataClass?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_1(20, this)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany(21, dataClass, this)):!dataClass?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_1(22, this)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany(23, dataClass, this)):(upper = eOpposite.upperBound , upper > 1 || upper == -1?this.isResolveProxies_0()?(this.eFlags & $intern_152) != 0?!dataClass?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_2(24, this, eOpposite)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_0(25, dataClass, this, eOpposite)):!dataClass?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_2(26, this, eOpposite)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_0(27, dataClass, this, eOpposite)):(this.eFlags & $intern_152) != 0?!dataClass?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_2(28, this, eOpposite)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_0(29, dataClass, this, eOpposite)):!dataClass?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_2(30, this, eOpposite)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_0(31, dataClass, this, eOpposite)):this.isResolveProxies_0()?(this.eFlags & $intern_152) != 0?!dataClass?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_2(32, this, eOpposite)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_0(33, dataClass, this, eOpposite)):!dataClass?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_2(34, this, eOpposite)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_0(35, dataClass, this, eOpposite)):(this.eFlags & $intern_152) != 0?!dataClass?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_2(36, this, eOpposite)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_0(37, dataClass, this, eOpposite)):!dataClass?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_2(38, this, eOpposite)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_0(39, dataClass, this, eOpposite))):this.isContainer()?this.isResolveProxies_0()?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleContainerResolving(castTo(eType, 29), this, eOpposite)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleContainer(castTo(eType, 29), this, eOpposite)):instanceOf(eType, 156)?dataClass == Lorg_eclipse_emf_ecore_util_FeatureMap$Entry_2_classLit?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateMany_1(40, this)):(this.eFlags & $intern_152) != 0?!dataClass?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleDataUnsettableDynamic(castTo(eType, 156), defaultValue, intrinsicDefaultValue, this)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleDataUnsettableStatic(defaultValue, intrinsicDefaultValue, this, ($clinit_EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator() , instanceClass == I_classLit?INT_NOTIFICATION_CREATOR:instanceClass == Z_classLit?BOOLEAN_NOTIFICATION_CREATOR:instanceClass == J_classLit?LONG_NOTIFICATION_CREATOR:instanceClass == F_classLit?FLOAT_NOTIFICATION_CREATOR:instanceClass == D_classLit?DOUBLE_NOTIFICATION_CREATOR:instanceClass == S_classLit?SHORT_NOTIFICATION_CREATOR:instanceClass == B_classLit?BYTE_NOTIFICATION_CREATOR:instanceClass == C_classLit?CHAR_NOTIFICATION_CREATOR:OBJECT_NOTIFICATION_CREATOR))):!dataClass?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleDataDynamic(castTo(eType, 156), defaultValue, intrinsicDefaultValue, this)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleDataStatic(defaultValue, intrinsicDefaultValue, this, ($clinit_EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator() , instanceClass == I_classLit?INT_NOTIFICATION_CREATOR:instanceClass == Z_classLit?BOOLEAN_NOTIFICATION_CREATOR:instanceClass == J_classLit?LONG_NOTIFICATION_CREATOR:instanceClass == F_classLit?FLOAT_NOTIFICATION_CREATOR:instanceClass == D_classLit?DOUBLE_NOTIFICATION_CREATOR:instanceClass == S_classLit?SHORT_NOTIFICATION_CREATOR:instanceClass == B_classLit?BYTE_NOTIFICATION_CREATOR:instanceClass == C_classLit?CHAR_NOTIFICATION_CREATOR:OBJECT_NOTIFICATION_CREATOR))):this.isContainment()?!eOpposite?(this.eFlags & $intern_152) != 0?this.isResolveProxies_0()?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentUnsettableResolving(castTo(eType, 29), this)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentUnsettable(castTo(eType, 29), this)):this.isResolveProxies_0()?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentResolving(castTo(eType, 29), this)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainment(castTo(eType, 29), this)):(this.eFlags & $intern_152) != 0?this.isResolveProxies_0()?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving(castTo(eType, 29), this, eOpposite)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable(castTo(eType, 29), this, eOpposite)):this.isResolveProxies_0()?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentWithInverseResolving(castTo(eType, 29), this, eOpposite)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentWithInverse(castTo(eType, 29), this, eOpposite)):this.isResolveProxies_0()?!eOpposite?(this.eFlags & $intern_152) != 0?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectResolvingUnsettable(castTo(eType, 29), this)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectResolving(castTo(eType, 29), this)):(this.eFlags & $intern_152) != 0?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable(castTo(eType, 29), this, eOpposite)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectResolvingWithInverse(castTo(eType, 29), this, eOpposite)):!eOpposite?(this.eFlags & $intern_152) != 0?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectUnsettable(castTo(eType, 29), this)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleEObject(castTo(eType, 29), this)):(this.eFlags & $intern_152) != 0?(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectWithInverseUnsettable(castTo(eType, 29), this, eOpposite)):(this.settingDelegate = new EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectWithInverse(castTo(eType, 29), this, eOpposite)); } return this.settingDelegate; } ; _.isChangeable = function isChangeable_0(){ return (this.eFlags & $intern_35) != 0; } ; _.isContainer = function isContainer(){ return false; } ; _.isContainment = function isContainment_0(){ return false; } ; _.isDerived = function isDerived_0(){ return (this.eFlags & $intern_17) != 0; } ; _.isFeatureMap_0 = function isFeatureMap_0(){ return $isFeatureMap(this); } ; _.isResolveProxies_0 = function isResolveProxies_0(){ return false; } ; _.isUnsettable = function isUnsettable_0(){ return (this.eFlags & $intern_152) != 0; } ; _.setExtendedMetaData_0 = function setExtendedMetaData_0(eStructuralFeatureExtendedMetaData){ this.eStructuralFeatureExtendedMetaData = eStructuralFeatureExtendedMetaData; } ; _.setName = function setName_0(newName){ $setName_0(this, newName); } ; _.toString_0 = function toString_147(){ return $toString_29(this); } ; _.cachedIsFeatureMap = false; _.featureID = 0; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl', 462); function $basicGetEAttributeType(this$static){ var eType; if (!this$static.eAttributeType) { eType = this$static.eType; instanceOf(eType, 156) && (this$static.eAttributeType = castTo(eType, 156)); } return this$static.eAttributeType; } function $getEAttributeType(this$static){ var eType; if (!this$static.eAttributeType || (this$static.eFlags & 1) == 0 && this$static.eAttributeType.eIsProxy()) { eType = $getEType(this$static); instanceOf(eType, 156) && (this$static.eAttributeType = castTo(eType, 156)); } return this$static.eAttributeType; } function $isMany(this$static){ var eType, upper; switch (this$static.effectiveIsMany) { case -1: { return true; } case 0: { upper = this$static.upperBound; if (upper > 1 || upper == -1) { this$static.effectiveIsMany = -1; return true; } else { eType = $getEType(this$static); if (!!eType && ($clinit_FeatureMapUtil() , eType.getInstanceClassName() == 'org.eclipse.emf.ecore.util.FeatureMap$Entry')) { this$static.effectiveIsMany = -1; return true; } else { this$static.effectiveIsMany = 1; return false; } } } default:case 1: { return false; } } } function $setID(this$static, newID){ var oldID; oldID = (this$static.eFlags & $intern_138) != 0; newID?(this$static.eFlags |= $intern_138):(this$static.eFlags &= -32769); (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_4(this$static, 1, 18, oldID, newID)); } function $setUpperBound_0(this$static, upperBound){ this$static.effectiveIsMany = 0; $setUpperBound(this$static, upperBound); } function EAttributeImpl(){ EStructuralFeatureImpl.call(this); } defineClass(331, 462, {110:1, 94:1, 93:1, 35:1, 155:1, 197:1, 58:1, 179:1, 69:1, 114:1, 481:1, 54:1, 99:1, 331:1, 158:1, 462:1, 292:1, 119:1, 120:1, 692:1}, EAttributeImpl); _.eGet = function eGet_20(featureID, resolve, coreType){ var eClass, lower; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , this.eAnnotations; case 1: return this.name_0; case 2: return $clinit_Boolean() , (this.eFlags & 256) != 0?true:false; case 3: return $clinit_Boolean() , (this.eFlags & 512) != 0?true:false; case 4: return valueOf_3(this.lowerBound); case 5: return valueOf_3(this.upperBound); case 6: return $clinit_Boolean() , $isMany(this)?true:false; case 7: return $clinit_Boolean() , lower = this.lowerBound , lower >= 1?true:false; case 8: if (resolve) return $getEType(this); return this.eType; case 9: return this.eGenericType; case 10: return $clinit_Boolean() , (this.eFlags & $intern_35) != 0?true:false; case 11: return $clinit_Boolean() , (this.eFlags & $intern_153) != 0?true:false; case 12: return $clinit_Boolean() , (this.eFlags & $intern_62) != 0?true:false; case 13: return this.defaultValueLiteral; case 14: return $getDefaultValue(this); case 15: return $clinit_Boolean() , (this.eFlags & $intern_152) != 0?true:false; case 16: return $clinit_Boolean() , (this.eFlags & $intern_17) != 0?true:false; case 17: return $getEContainingClass(this); case 18: return $clinit_Boolean() , (this.eFlags & $intern_138) != 0?true:false; case 19: if (resolve) return $getEAttributeType(this); return $basicGetEAttributeType(this); } return $eDynamicGet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EATTRIBUTE)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EATTRIBUTE:eClass), featureID), resolve, coreType); } ; _.eIsSet = function eIsSet_19(featureID){ var eClass, lower; switch (featureID) { case 0: return !!this.eAnnotations && this.eAnnotations.size_0 != 0; case 1: return this.name_0 != null; case 2: return (this.eFlags & 256) == 0; case 3: return (this.eFlags & 512) == 0; case 4: return this.lowerBound != 0; case 5: return this.upperBound != 1; case 6: return $isMany(this); case 7: return lower = this.lowerBound , lower >= 1; case 8: return !!this.eType && !this.eGenericType.eTypeParameter && $getETypeArguments(this.eGenericType).size_0 == 0; case 9: return !!this.eGenericType && !(!!this.eType && !this.eGenericType.eTypeParameter && $getETypeArguments(this.eGenericType).size_0 == 0); case 10: return (this.eFlags & $intern_35) == 0; case 11: return (this.eFlags & $intern_153) != 0; case 12: return (this.eFlags & $intern_62) != 0; case 13: return this.defaultValueLiteral != null; case 14: return $getDefaultValue(this) != null; case 15: return (this.eFlags & $intern_152) != 0; case 16: return (this.eFlags & $intern_17) != 0; case 17: return !!$getEContainingClass(this); case 18: return (this.eFlags & $intern_138) != 0; case 19: return !!$basicGetEAttributeType(this); } return $eDynamicIsSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EATTRIBUTE)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EATTRIBUTE:eClass), featureID)); } ; _.eSet = function eSet_18(featureID, newValue){ var eClass, msgs; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $addAll_9(this.eAnnotations, castTo(newValue, 16)); return; case 1: $setName_0(this, castToString(newValue)); return; case 2: $setOrdered(this, $booleanValue(castToBoolean(newValue))); return; case 3: $setUnique_2(this, $booleanValue(castToBoolean(newValue))); return; case 4: $setLowerBound(this, castTo(newValue, 17).value_0); return; case 5: $setUpperBound_0(this, castTo(newValue, 17).value_0); return; case 8: $setEType(this, castTo(newValue, 142)); return; case 9: msgs = $setEGenericType(this, castTo(newValue, 89), null); !!msgs && msgs.dispatch_0(); return; case 10: $setChangeable(this, $booleanValue(castToBoolean(newValue))); return; case 11: $setVolatile(this, $booleanValue(castToBoolean(newValue))); return; case 12: $setTransient(this, $booleanValue(castToBoolean(newValue))); return; case 13: $setDefaultValueLiteral(this, castToString(newValue)); return; case 15: $setUnsettable(this, $booleanValue(castToBoolean(newValue))); return; case 16: $setDerived(this, $booleanValue(castToBoolean(newValue))); return; case 18: $setID(this, $booleanValue(castToBoolean(newValue))); return; } $eDynamicSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EATTRIBUTE)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EATTRIBUTE:eClass), featureID), newValue); } ; _.eStaticClass = function eStaticClass_19(){ return $clinit_EcorePackage$Literals() , EATTRIBUTE; } ; _.eUnset = function eUnset_18(featureID){ var eClass, msgs; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); return; case 1: instanceOf(this.eContainer, 90) && $setFlags_0($getESuperAdapter(castTo(this.eContainer, 90)), 4); $setName(this, null); return; case 2: $setOrdered(this, true); return; case 3: $setUnique_2(this, true); return; case 4: $setLowerBound(this, 0); return; case 5: this.effectiveIsMany = 0; $setUpperBound(this, 1); return; case 8: $setEType(this, null); return; case 9: msgs = $setEGenericType(this, null, null); !!msgs && msgs.dispatch_0(); return; case 10: $setChangeable(this, true); return; case 11: $setVolatile(this, false); return; case 12: $setTransient(this, false); return; case 13: this.defaultValueFactory = null; $setDefaultValueLiteralGen(this, null); return; case 15: $setUnsettable(this, false); return; case 16: $setDerived(this, false); return; case 18: $setID(this, false); return; } $eDynamicUnset(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EATTRIBUTE)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EATTRIBUTE:eClass), featureID)); } ; _.freeze = function freeze_3(){ $getEAttributeType(this); $getName_0($getExtendedMetaData_1(($clinit_ExtendedMetaData() , INSTANCE_11), this)); $getEType(this); this.eFlags |= 1; } ; _.isMany = function isMany_0(){ return $isMany(this); } ; _.setEType = function setEType_0(newEType, msgs){ this.effectiveIsMany = 0; this.eAttributeType = null; return $setEType_0(this, newEType, msgs); } ; _.setUpperBound = function setUpperBound_0(upperBound){ $setUpperBound_0(this, upperBound); } ; _.toString_0 = function toString_148(){ var result; if ((this.eFlags_0 & 64) != 0) return $toString_29(this); result = new StringBuffer_1($toString_29(this)); result.string += ' (iD: '; $append_4(result, (this.eFlags & $intern_138) != 0); result.string += ')'; return result.string; } ; _.effectiveIsMany = 0; var Lorg_eclipse_emf_ecore_impl_EAttributeImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EAttributeImpl', 331); function $basicGetEPackage(this$static){ if (this$static.eFlags_0 >> 16 != 6) return null; return castTo(this$static.eContainer, 241); } function $basicSetInstanceClassName(this$static, value_0){ if (this$static.instanceClassName == null && this$static.generatedInstanceClassName != null) { this$static.instanceClassName = this$static.generatedInstanceClassName; this$static.generatedInstanceClassName = null; } $setInstanceClassNameGen(this$static, value_0 == null?null:(checkCriticalNotNull(value_0) , value_0)); !!this$static.instanceClass && this$static.setInstanceClassGen(null); } function $basicSetInstanceTypeName(this$static, newInstanceTypeName){ var oldInstanceTypeName; oldInstanceTypeName = this$static.instanceTypeName; this$static.instanceTypeName = newInstanceTypeName; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 5, oldInstanceTypeName, newInstanceTypeName)); } function $eBasicRemoveFromContainerFeature_7(this$static, msgs){ var eClass, inverseFeature; if (this$static.eFlags_0 >> 16 == 6) { return this$static.eContainer.eInverseRemove(this$static, 5, Lorg_eclipse_emf_ecore_EPackage_2_classLit, msgs); } return inverseFeature = $getEOpposite(castTo($getEStructuralFeature((eClass = castTo($getField(this$static, 16), 29) , !eClass?this$static.eStaticClass():eClass), this$static.eFlags_0 >> 16), 19)) , this$static.eContainer.eInverseRemove(this$static, inverseFeature.featureID, inverseFeature.containerClass, msgs); } function $getEPackage(this$static){ var result; if (this$static.ePackage) { return this$static.ePackage; } else { result = $getEPackageGen(this$static); !!result && !result.eIsProxy() && (this$static.ePackage = result); return result; } } function $getEPackageGen(this$static){ if (this$static.eFlags_0 >> 16 != 6) return null; return castTo($eContainer(this$static), 241); } function $getInstanceClass(this$static){ var primitiveClass; if (!this$static.instanceClass && (this$static.instanceClassName != null || this$static.generatedInstanceClassName != null)) { primitiveClass = $getPrimitiveOrArrayClass(this$static); if (primitiveClass) { this$static.setInstanceClassGen(primitiveClass); } else { try { this$static.setInstanceClassGen(null); } catch ($e0) { $e0 = toJava($e0); if (!instanceOf($e0, 63)) throw toJs($e0); } } } return this$static.instanceClass; } function $getPrimitiveOrArrayClass(this$static){ var arrayIndex, className, componentClassName, result; className = this$static.instanceClassName != null?this$static.instanceClassName:this$static.generatedInstanceClassName; arrayIndex = $indexOf_1(className, fromCodePoint(91)); if (arrayIndex != -1) { componentClassName = (checkCriticalStringBounds(0, arrayIndex, className.length) , className.substr(0, arrayIndex)); result = new StringBuffer; do result.string += '['; while ((arrayIndex = $indexOf_0(className, 91, ++arrayIndex)) != -1); if ($equals_5(componentClassName, 'boolean')) result.string += 'Z'; else if ($equals_5(componentClassName, 'byte')) result.string += 'B'; else if ($equals_5(componentClassName, 'char')) result.string += 'C'; else if ($equals_5(componentClassName, 'double')) result.string += 'D'; else if ($equals_5(componentClassName, 'float')) result.string += 'F'; else if ($equals_5(componentClassName, 'int')) result.string += 'I'; else if ($equals_5(componentClassName, 'long')) result.string += 'J'; else if ($equals_5(componentClassName, 'short')) result.string += 'S'; else { result.string += 'L'; result.string += '' + componentClassName; result.string += ';'; } try { return null; } catch ($e0) { $e0 = toJava($e0); if (!instanceOf($e0, 63)) throw toJs($e0); } } else if ($indexOf_1(className, fromCodePoint(46)) == -1) { if ($equals_5(className, 'boolean')) return Z_classLit; else if ($equals_5(className, 'byte')) return B_classLit; else if ($equals_5(className, 'char')) return C_classLit; else if ($equals_5(className, 'double')) return D_classLit; else if ($equals_5(className, 'float')) return F_classLit; else if ($equals_5(className, 'int')) return I_classLit; else if ($equals_5(className, 'long')) return J_classLit; else if ($equals_5(className, 'short')) return S_classLit; } return null; } function $isInstance(this$static, object){ var helper, instanceClass; if (object != null) { instanceClass = $getInstanceClass(this$static); if (instanceClass) { if ((instanceClass.modifiers & 1) != 0) { if (instanceClass == Z_classLit) { return instanceOfBoolean(object); } else if (instanceClass == I_classLit) { return instanceOf(object, 17); } else if (instanceClass == F_classLit) { return instanceOf(object, 161); } else if (instanceClass == B_classLit) { return instanceOf(object, 222); } else if (instanceClass == C_classLit) { return instanceOf(object, 180); } else if (instanceClass == D_classLit) { return instanceOfDouble(object); } else if (instanceClass == S_classLit) { return instanceOf(object, 191); } else if (instanceClass == J_classLit) { return instanceOf(object, 168); } } else { return $clinit_Reflect() , helper = castTo($get_10(HELPER_REGISTRY, instanceClass), 57) , !helper || helper.isInstance(object); } } else if (instanceOf(object, 58)) { return this$static.dynamicIsInstance(castTo(object, 58)); } } return false; } function $setGeneratedInstanceClass(this$static, isGenerated){ if (isGenerated) { if (this$static.generatedInstanceClassName == null) { this$static.generatedInstanceClassName = this$static.instanceClassName; this$static.instanceClassName = null; } } else if (this$static.generatedInstanceClassName != null) { this$static.instanceClassName = this$static.generatedInstanceClassName; this$static.generatedInstanceClassName = null; } } function $setInstanceClass(this$static, value_0){ var component, indices, name_0; if (!value_0) { $setInstanceClassNameGen(this$static, null); $basicSetInstanceTypeName(this$static, null); } else if ((value_0.modifiers & 4) != 0) { indices = '[]'; for (component = value_0.componentType;; component = component.componentType) { if ((component.modifiers & 4) == 0) { name_0 = $intern(($ensureNamesAreInitialized(component) , component.typeName + indices)); $setInstanceClassNameGen(this$static, name_0); $basicSetInstanceTypeName(this$static, name_0); break; } indices += '[]'; } } else { name_0 = $intern(($ensureNamesAreInitialized(value_0) , value_0.typeName)); $setInstanceClassNameGen(this$static, name_0); $basicSetInstanceTypeName(this$static, name_0); } this$static.setInstanceClassGen(value_0); } function $setInstanceClassName(this$static, value_0){ $basicSetInstanceClassName(this$static, value_0); $basicSetInstanceTypeName(this$static, this$static.instanceClassName); } function $setInstanceClassNameGen(this$static, newInstanceClassName){ var oldInstanceClassName; oldInstanceClassName = this$static.instanceClassName; this$static.instanceClassName = newInstanceClassName; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 2, oldInstanceClassName, this$static.instanceClassName)); } function $setInstanceTypeName(this$static, newInstanceTypeName){ var end, index_0, newInstanceClassName, oldInstanceTypeName; oldInstanceTypeName = this$static.instanceTypeName; if (newInstanceTypeName == null) { this$static.instanceTypeName = null; $basicSetInstanceClassName(this$static, null); } else { this$static.instanceTypeName = (checkCriticalNotNull(newInstanceTypeName) , newInstanceTypeName); index_0 = $indexOf_1(newInstanceTypeName, fromCodePoint(60)); if (index_0 != -1) { newInstanceClassName = (checkCriticalStringBounds(0, index_0, newInstanceTypeName.length) , newInstanceTypeName.substr(0, index_0)); $indexOf_1(newInstanceTypeName, fromCodePoint(46)) == -1 && !$equals_5(newInstanceClassName, 'boolean') && !$equals_5(newInstanceClassName, 'byte') && !$equals_5(newInstanceClassName, 'char') && !$equals_5(newInstanceClassName, 'double') && !$equals_5(newInstanceClassName, 'float') && !$equals_5(newInstanceClassName, 'int') && !$equals_5(newInstanceClassName, 'long') && !$equals_5(newInstanceClassName, 'short') && (newInstanceClassName = 'java.lang.Object'); end = $lastIndexOf(newInstanceTypeName, fromCodePoint(62)); end != -1 && (newInstanceClassName += '' + (checkCriticalStringElementIndex(end + 1, newInstanceTypeName.length + 1) , newInstanceTypeName.substr(end + 1))); $basicSetInstanceClassName(this$static, newInstanceClassName); } else { newInstanceClassName = newInstanceTypeName; if ($indexOf_1(newInstanceTypeName, fromCodePoint(46)) == -1) { index_0 = $indexOf_1(newInstanceTypeName, fromCodePoint(91)); index_0 != -1 && (newInstanceClassName = (checkCriticalStringBounds(0, index_0, newInstanceTypeName.length) , newInstanceTypeName.substr(0, index_0))); if (!$equals_5(newInstanceClassName, 'boolean') && !$equals_5(newInstanceClassName, 'byte') && !$equals_5(newInstanceClassName, 'char') && !$equals_5(newInstanceClassName, 'double') && !$equals_5(newInstanceClassName, 'float') && !$equals_5(newInstanceClassName, 'int') && !$equals_5(newInstanceClassName, 'long') && !$equals_5(newInstanceClassName, 'short')) { newInstanceClassName = 'java.lang.Object'; index_0 != -1 && (newInstanceClassName += '' + (checkCriticalStringElementIndex(index_0, newInstanceTypeName.length + 1) , newInstanceTypeName.substr(index_0))); } else { newInstanceClassName = newInstanceTypeName; } } $basicSetInstanceClassName(this$static, newInstanceClassName); newInstanceClassName == newInstanceTypeName && (this$static.instanceTypeName = this$static.instanceClassName); } } (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 5, oldInstanceTypeName, newInstanceTypeName)); } function $setName_1(this$static, newName){ instanceOf(this$static.eContainer, 184) && (castTo(this$static.eContainer, 184).eNameToEClassifierMap = null); $setName(this$static, newName); } function $toString_30(this$static){ var result; if ((this$static.eFlags_0 & 64) != 0) return $toString_21(this$static); result = new StringBuffer_1($toString_21(this$static)); result.string += ' (instanceClassName: '; $append_3(result, this$static.instanceClassName); result.string += ')'; return result.string; } defineClass(364, 448, {110:1, 94:1, 93:1, 142:1, 155:1, 197:1, 58:1, 114:1, 54:1, 99:1, 364:1, 158:1, 119:1, 120:1, 691:1}); _.dynamicIsInstance = function dynamicIsInstance(eObject){ return eObject.eClass_0() == this; } ; _.eBasicRemoveFromContainerFeature = function eBasicRemoveFromContainerFeature_8(msgs){ return $eBasicRemoveFromContainerFeature_7(this, msgs); } ; _.eBasicSetContainer = function eBasicSetContainer_5(newContainer, newContainerFeatureID){ this.ePackage = null; this.eFlags_0 = newContainerFeatureID << 16 | this.eFlags_0 & 255; this.eContainer = newContainer; } ; _.eGet = function eGet_21(featureID, resolve, coreType){ var eClass; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , this.eAnnotations; case 1: return this.name_0; case 2: return this.instanceClassName != null?this.instanceClassName:this.generatedInstanceClassName; case 3: return $getInstanceClass(this); case 4: return this.getDefaultValue(); case 5: return this.instanceTypeName; case 6: if (resolve) return $getEPackage(this); return $basicGetEPackage(this); case 7: return !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 7)) , this.eTypeParameters; } return $eDynamicGet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID), resolve, coreType); } ; _.eInverseAdd_0 = function eInverseAdd_13(otherEnd, featureID, msgs){ var eClass, eContainerFeatureID, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicAdd_0(this.eAnnotations, otherEnd, msgs); case 6: !!this.eContainer && (msgs = (eContainerFeatureID = this.eFlags_0 >> 16 , eContainerFeatureID >= 0?$eBasicRemoveFromContainerFeature_7(this, msgs):this.eContainer.eInverseRemove(this, -1 - eContainerFeatureID, null, msgs))); return $eBasicSetContainer(this, otherEnd, 6, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseAdd(this, $eSettings_0(this), featureID - $getFeatureCount(this.eStaticClass()), otherEnd, msgs); } ; _.eInverseRemove_0 = function eInverseRemove_15(otherEnd, featureID, msgs){ var eClass, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicRemove_0(this.eAnnotations, otherEnd, msgs); case 6: return $eBasicSetContainer(this, null, 6, msgs); case 7: return !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 7)) , $basicRemove_0(this.eTypeParameters, otherEnd, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseRemove(this, $eSettings_0(this), featureID - $getFeatureCount(this.eStaticClass()), otherEnd, msgs); } ; _.eIsSet = function eIsSet_20(featureID){ var eClass; switch (featureID) { case 0: return !!this.eAnnotations && this.eAnnotations.size_0 != 0; case 1: return this.name_0 != null; case 2: return this.instanceClassName != null && this.instanceClassName == this.instanceTypeName; case 3: return !!$getInstanceClass(this); case 4: return this.getDefaultValue() != null; case 5: return this.instanceTypeName != null && this.instanceTypeName != this.instanceClassName && this.instanceTypeName != this.generatedInstanceClassName; case 6: return !!$basicGetEPackage(this); case 7: return !!this.eTypeParameters && this.eTypeParameters.size_0 != 0; } return $eDynamicIsSet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID)); } ; _.eSet = function eSet_19(featureID, newValue){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $addAll_9(this.eAnnotations, castTo(newValue, 16)); return; case 1: $setName_1(this, castToString(newValue)); return; case 2: $setInstanceClassName(this, castToString(newValue)); return; case 5: $setInstanceTypeName(this, castToString(newValue)); return; case 7: !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 7)); $clear_13(this.eTypeParameters); !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 7)); $addAll_9(this.eTypeParameters, castTo(newValue, 16)); return; } $eDynamicSet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID), newValue); } ; _.eStaticClass = function eStaticClass_20(){ return $clinit_EcorePackage$Literals() , ECLASSIFIER; } ; _.eUnset = function eUnset_19(featureID){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); return; case 1: instanceOf(this.eContainer, 184) && (castTo(this.eContainer, 184).eNameToEClassifierMap = null); $setName(this, null); return; case 2: $basicSetInstanceClassName(this, null); $basicSetInstanceTypeName(this, this.instanceClassName); return; case 5: $setInstanceTypeName(this, null); return; case 7: !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 7)); $clear_13(this.eTypeParameters); return; } $eDynamicUnset(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID)); } ; _.getClassifierID = function getClassifierID(){ var ePackage; return this.metaObjectID == -1 && (this.metaObjectID = (ePackage = $getEPackage(this) , ePackage?$indexOf_6(ePackage.getEClassifiers(), this):-1)) , this.metaObjectID; } ; _.getDefaultValue = function getDefaultValue_0(){ return null; } ; _.getEPackage = function getEPackage(){ return $getEPackage(this); } ; _.getExtendedMetaData_1 = function getExtendedMetaData_1(){ return this.eClassifierExtendedMetaData; } ; _.getInstanceClass = function getInstanceClass(){ return $getInstanceClass(this); } ; _.getInstanceClassName = function getInstanceClassName(){ return this.instanceClassName != null?this.instanceClassName:this.generatedInstanceClassName; } ; _.getInstanceTypeName = function getInstanceTypeName(){ return this.instanceTypeName; } ; _.isInstance = function isInstance_0(object){ return $isInstance(this, object); } ; _.setExtendedMetaData_1 = function setExtendedMetaData_1(eClassifierExtendedMetaData){ this.eClassifierExtendedMetaData = eClassifierExtendedMetaData; } ; _.setGeneratedInstanceClass = function setGeneratedInstanceClass(isGenerated){ $setGeneratedInstanceClass(this, isGenerated); } ; _.setInstanceClassGen = function setInstanceClassGen(newInstanceClass){ this.instanceClass = newInstanceClass; } ; _.setName = function setName_1(newName){ $setName_1(this, newName); } ; _.toString_0 = function toString_149(){ return $toString_30(this); } ; _.instanceClass = null; _.instanceClassName = null; _.metaObjectID = -1; var Lorg_eclipse_emf_ecore_impl_EClassifierImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EClassifierImpl', 364); function $clinit_EClassImpl(){ $clinit_EClassImpl = emptyMethod; COMPUTATION_IN_PROGRESS = new EClassImpl$MyHashSet; NO_EALL_STRUCTURE_FEATURES_DATA = stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, 1), $intern_154, 179, 0, []); NO_EALL_OPERATIONS_DATA = stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_emf_ecore_EOperation_2_classLit, 1), $intern_155, 62, 0, []); } function $getEAllAttributes(this$static){ var attributes, computationInProgress, eStructuralFeature, eStructuralFeature$iterator, eSuperType, eSuperType$iterator, old, result; if (!this$static.eAllAttributes) { this$static.eIDAttribute = null; result = new EClassImpl$2(this$static); attributes = new EClassImpl$3; computationInProgress = COMPUTATION_IN_PROGRESS; old = computationInProgress.map_0.put(this$static, computationInProgress); if (old == null) { for (eSuperType$iterator = new AbstractEList$EIterator($getESuperTypes(this$static)); eSuperType$iterator.cursor != eSuperType$iterator.this$01_2.size_1();) { eSuperType = castTo($doNext(eSuperType$iterator), 29); $addAll_9(result, $getEAllAttributes(eSuperType)); } computationInProgress.map_0.remove_0(this$static) != null; computationInProgress.map_0.size_1() == 0 && undefined; } for (eStructuralFeature$iterator = (!this$static.eStructuralFeatures && (this$static.eStructuralFeatures = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, this$static, 21, 17)) , new AbstractEList$EIterator(this$static.eStructuralFeatures)); eStructuralFeature$iterator.cursor != eStructuralFeature$iterator.this$01_2.size_1();) { eStructuralFeature = castTo($doNext(eStructuralFeature$iterator), 179); instanceOf(eStructuralFeature, 331) && $add_21(attributes, castTo(eStructuralFeature, 35)); } $shrink_0(attributes); this$static.eAttributes = new EClassImpl$4(this$static, (castTo($get_20($getEStructuralFeatures(($clinit_EcorePackage() , eINSTANCE_2).eClassEClass), 7), 19) , attributes.size_0), attributes.data_0); $addAll_9(result, this$static.eAttributes); $shrink_0(result); this$static.eAllAttributes = new EcoreEList$UnmodifiableEList$FastCompare((castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassEClass), 4), 19) , result.size_0), result.data_0); $getESuperAdapter(this$static).modifiedState &= -2; } return this$static.eAllAttributes; } function $getEAllContainments(this$static){ var eReference, eReference$iterator, result; if (!this$static.eAllContainments) { result = new EClassImpl$7; for (eReference$iterator = new AbstractEList$NonResolvingEIterator($getEAllReferences(this$static)); eReference$iterator.cursor != eReference$iterator.this$01_2.size_1();) { eReference = castTo($doNext_0(eReference$iterator), 19); (eReference.eFlags & $intern_138) != 0 && $add_21(result, eReference); } $shrink_0(result); this$static.eAllContainments = new EcoreEList$UnmodifiableEList$FastCompare((castTo($get_20($getEStructuralFeatures(($clinit_EcorePackage() , eINSTANCE_2).eClassEClass), 8), 19) , result.size_0), result.data_0); $getESuperAdapter(this$static).modifiedState &= -9; } return this$static.eAllContainments; } function $getEAllGenericSuperTypes(this$static){ var computationInProgress, eGenericSuperType, eGenericSuperType$iterator, eSuperType, old, result; if (!this$static.eAllGenericSuperTypes) { result = new EClassImpl$1EGenericSuperTypeEList; computationInProgress = COMPUTATION_IN_PROGRESS; old = computationInProgress.map_0.put(this$static, computationInProgress); if (old == null) { for (eGenericSuperType$iterator = new AbstractEList$EIterator($getEGenericSuperTypes(this$static)); eGenericSuperType$iterator.cursor != eGenericSuperType$iterator.this$01_2.size_1();) { eGenericSuperType = castTo($doNext(eGenericSuperType$iterator), 89); eSuperType = $getERawType(eGenericSuperType); instanceOf(eSuperType, 90) && $addAll_9(result, $getEAllGenericSuperTypes(castTo(eSuperType, 29))); $add_21(result, eGenericSuperType); } computationInProgress.map_0.remove_0(this$static) != null; computationInProgress.map_0.size_1() == 0 && undefined; } $eliminateEquivalentDuplicates(result); $shrink_0(result); this$static.eAllGenericSuperTypes = new EcoreEList$UnmodifiableEList$FastCompare((castTo($get_20($getEStructuralFeatures(($clinit_EcorePackage() , eINSTANCE_2).eClassEClass), 15), 19) , result.size_0), result.data_0); $getESuperAdapter(this$static).modifiedState &= -33; } return this$static.eAllGenericSuperTypes; } function $getEAllOperations(this$static){ var computationInProgress, eSuperType, eSuperType$iterator, i, old, operationID, result; if (!this$static.eAllOperations) { result = new EClassImpl$6; computationInProgress = COMPUTATION_IN_PROGRESS; old = computationInProgress.map_0.put(this$static, computationInProgress); if (old == null) { for (eSuperType$iterator = new AbstractEList$EIterator($getESuperTypes(this$static)); eSuperType$iterator.cursor != eSuperType$iterator.this$01_2.size_1();) { eSuperType = castTo($doNext(eSuperType$iterator), 29); $addAll_9(result, $getEAllOperations(eSuperType)); } computationInProgress.map_0.remove_0(this$static) != null; computationInProgress.map_0.size_1() == 0 && undefined; } operationID = result.size_0; for (i = (!this$static.eOperations && (this$static.eOperations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EOperation_2_classLit, this$static, 11, 10)) , new AbstractEList$EIterator(this$static.eOperations)); i.cursor != i.this$01_2.size_1(); ++operationID) { castTo($doNext(i), 411); } $addAll_9(result, (!this$static.eOperations && (this$static.eOperations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EOperation_2_classLit, this$static, 11, 10)) , this$static.eOperations)); $shrink_0(result); this$static.eAllOperations = new EcoreEList$UnmodifiableEList$FastCompare((castTo($get_20($getEStructuralFeatures(($clinit_EcorePackage() , eINSTANCE_2).eClassEClass), 9), 19) , result.size_0), result.data_0); this$static.eAllOperationsData = castTo(result.data_0, 688); this$static.eAllOperationsData == null && (this$static.eAllOperationsData = NO_EALL_OPERATIONS_DATA); $getESuperAdapter(this$static).modifiedState &= -17; } return this$static.eAllOperations; } function $getEAllReferences(this$static){ var computationInProgress, eStructuralFeature, eStructuralFeature$iterator, eSuperType, eSuperType$iterator, old, references, result; if (!this$static.eAllReferences) { result = new EClassImpl$1ReferenceList; references = new EClassImpl$1ReferenceList; computationInProgress = COMPUTATION_IN_PROGRESS; old = computationInProgress.map_0.put(this$static, computationInProgress); if (old == null) { for (eSuperType$iterator = new AbstractEList$EIterator($getESuperTypes(this$static)); eSuperType$iterator.cursor != eSuperType$iterator.this$01_2.size_1();) { eSuperType = castTo($doNext(eSuperType$iterator), 29); $addAll_9(result, $getEAllReferences(eSuperType)); } computationInProgress.map_0.remove_0(this$static) != null; computationInProgress.map_0.size_1() == 0 && undefined; } for (eStructuralFeature$iterator = (!this$static.eStructuralFeatures && (this$static.eStructuralFeatures = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, this$static, 21, 17)) , new AbstractEList$EIterator(this$static.eStructuralFeatures)); eStructuralFeature$iterator.cursor != eStructuralFeature$iterator.this$01_2.size_1();) { eStructuralFeature = castTo($doNext(eStructuralFeature$iterator), 179); instanceOf(eStructuralFeature, 102) && $add_21(references, castTo(eStructuralFeature, 19)); } $shrink_0(references); this$static.eReferences = new EClassImpl$5(this$static, (castTo($get_20($getEStructuralFeatures(($clinit_EcorePackage() , eINSTANCE_2).eClassEClass), 6), 19) , references.size_0), references.data_0); $addAll_9(result, this$static.eReferences); $shrink_0(result); this$static.eAllReferences = new EcoreEList$UnmodifiableEList$FastCompare((castTo($get_20($getEStructuralFeatures(eINSTANCE_2.eClassEClass), 5), 19) , result.size_0), result.data_0); $getESuperAdapter(this$static).modifiedState &= -3; } return this$static.eAllReferences; } function $getEAllStructuralFeatures(this$static){ var computationInProgress, eSuperType, eSuperType$iterator, featureID, i, old, result; if (!this$static.eAllStructuralFeatures) { result = new EClassImpl$1EStructuralFeatureUniqueEList; computationInProgress = COMPUTATION_IN_PROGRESS; old = computationInProgress.map_0.put(this$static, computationInProgress); if (old == null) { for (eSuperType$iterator = new AbstractEList$EIterator($getESuperTypes(this$static)); eSuperType$iterator.cursor != eSuperType$iterator.this$01_2.size_1();) { eSuperType = castTo($doNext(eSuperType$iterator), 29); $addAll_9(result, $getEAllStructuralFeatures(eSuperType)); } computationInProgress.map_0.remove_0(this$static) != null; computationInProgress.map_0.size_1() == 0 && undefined; } featureID = result.size_0; for (i = (!this$static.eStructuralFeatures && (this$static.eStructuralFeatures = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, this$static, 21, 17)) , new AbstractEList$EIterator(this$static.eStructuralFeatures)); i.cursor != i.this$01_2.size_1(); ++featureID) { $setFeatureID(castTo($doNext(i), 462), featureID); } $addAll_9(result, (!this$static.eStructuralFeatures && (this$static.eStructuralFeatures = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, this$static, 21, 17)) , this$static.eStructuralFeatures)); $shrink_0(result); this$static.eAllStructuralFeatures = new EClassImpl$1EAllStructuralFeaturesList(this$static, result); this$static.eAllStructuralFeaturesData = castTo(result.data_0, 254); this$static.eAllStructuralFeaturesData == null && (this$static.eAllStructuralFeaturesData = NO_EALL_STRUCTURE_FEATURES_DATA); this$static.eNameToFeatureMap = null; $getESuperAdapter(this$static).modifiedState &= -5; } return this$static.eAllStructuralFeatures; } function $getEAllSuperTypes(this$static){ var computationInProgress, eSuperType, eSuperType$iterator, higherSupers, old, result; if (!this$static.eAllSuperTypes) { result = new EClassImpl$9; computationInProgress = COMPUTATION_IN_PROGRESS; old = computationInProgress.map_0.put(this$static, computationInProgress); if (old == null) { for (eSuperType$iterator = new AbstractEList$EIterator($getESuperTypes(this$static)); eSuperType$iterator.cursor != eSuperType$iterator.this$01_2.size_1();) { eSuperType = castTo($doNext(eSuperType$iterator), 29); higherSupers = $getEAllSuperTypes(eSuperType); $addAll_9(result, higherSupers); $add_21(result, eSuperType); } computationInProgress.map_0.remove_0(this$static) != null; } $shrink_0(result); this$static.eAllSuperTypes = new EcoreEList$UnmodifiableEList$FastCompare((castTo($get_20($getEStructuralFeatures(($clinit_EcorePackage() , eINSTANCE_2).eClassEClass), 11), 19) , result.size_0), result.data_0); $getESuperAdapter(this$static).modifiedState &= -33; } return this$static.eAllSuperTypes; } function $getEGenericSuperTypes(this$static){ if (!this$static.eGenericSuperTypes) { $getESuperAdapter(this$static); this$static.eGenericSuperTypes = new EClassImpl$1(this$static, Lorg_eclipse_emf_ecore_EGenericType_2_classLit, this$static); $getESuperTypes(this$static); } return this$static.eGenericSuperTypes; } function $getEOperations(this$static){ !this$static.eOperations && (this$static.eOperations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EOperation_2_classLit, this$static, 11, 10)); return this$static.eOperations; } function $getEStructuralFeature(this$static, featureID){ var eAllStructuralFeaturesData; eAllStructuralFeaturesData = (this$static.eAllStructuralFeaturesData == null && $getEAllStructuralFeatures(this$static) , this$static.eAllStructuralFeaturesData); return featureID >= 0 && featureID < eAllStructuralFeaturesData.length?eAllStructuralFeaturesData[featureID]:null; } function $getEStructuralFeature_0(this$static, name_0){ var duplicate, eStructuralFeature, eStructuralFeature$iterator, key, result; (this$static.eAllStructuralFeaturesData == null && $getEAllStructuralFeatures(this$static) , this$static.eAllStructuralFeaturesData).length; if (!this$static.eNameToFeatureMap) { result = new HashMap_0((3 * this$static.eAllStructuralFeatures.size_0 / 2 | 0) + 1); for (eStructuralFeature$iterator = new AbstractEList$NonResolvingEIterator(this$static.eAllStructuralFeatures); eStructuralFeature$iterator.cursor != eStructuralFeature$iterator.this$01_2.size_1();) { eStructuralFeature = castTo($doNext_0(eStructuralFeature$iterator), 179); key = eStructuralFeature.getName(); duplicate = castTo(key == null?$put_9(result.hashCodeMap, null, eStructuralFeature):$put_10(result.stringMap, key, eStructuralFeature), 179); !!duplicate && (key == null?$put_9(result.hashCodeMap, null, duplicate):$put_10(result.stringMap, key, duplicate)); } this$static.eNameToFeatureMap = result; } return castTo($getStringValue(this$static.eNameToFeatureMap, name_0), 179); } function $getEStructuralFeatures(this$static){ !this$static.eStructuralFeatures && (this$static.eStructuralFeatures = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, this$static, 21, 17)); return this$static.eStructuralFeatures; } function $getESuperAdapter(this$static){ if (!this$static.eSuperAdapter) { this$static.eSuperAdapter = new EClassImpl$10(this$static); $add_20(new MinimalEObjectImpl$1ArrayDelegatingAdapterList(this$static), 0, this$static.eSuperAdapter); } return this$static.eSuperAdapter; } function $getESuperTypes(this$static){ if (!this$static.eSuperTypes) { $getESuperAdapter(this$static); this$static.eSuperTypes = new EClassImpl$8(this$static, this$static); } return this$static.eSuperTypes; } function $getFeatureCount(this$static){ return (this$static.eAllStructuralFeaturesData == null && $getEAllStructuralFeatures(this$static) , this$static.eAllStructuralFeaturesData).length; } function $getFeatureID(this$static, feature){ var eAllStructuralFeaturesData, index_0, last; eAllStructuralFeaturesData = (this$static.eAllStructuralFeaturesData == null && $getEAllStructuralFeatures(this$static) , this$static.eAllStructuralFeaturesData); index_0 = feature.getFeatureID_0(); if (index_0 != -1) { for (last = eAllStructuralFeaturesData.length; index_0 < last; ++index_0) { if (eAllStructuralFeaturesData[index_0] == feature) { return index_0; } } } return -1; } function $isSetESuperTypes(this$static){ return !!this$static.eSuperTypes && $getEGenericSuperTypes(this$static.eSuperTypes.this$01).size_0 != 0 && !(!!this$static.eGenericSuperTypes && $isSet(this$static.eGenericSuperTypes)); } function $isSuperTypeOf(this$static, someClass){ return someClass == this$static || $contains_10($getEAllSuperTypes(someClass), this$static); } function $setAbstract(this$static, newAbstract){ var oldAbstract; oldAbstract = (this$static.eFlags & 256) != 0; newAbstract?(this$static.eFlags |= 256):(this$static.eFlags &= -257); (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_4(this$static, 1, 8, oldAbstract, newAbstract)); } function $setInterface(this$static, newInterface){ var oldInterface; oldInterface = (this$static.eFlags & 512) != 0; newInterface?(this$static.eFlags |= 512):(this$static.eFlags &= -513); (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_4(this$static, 1, 9, oldInterface, newInterface)); } function $toString_31(this$static){ var result; if ((this$static.eFlags_0 & 64) != 0) return $toString_30(this$static); result = new StringBuffer_1($toString_30(this$static)); result.string += ' (abstract: '; $append_4(result, (this$static.eFlags & 256) != 0); result.string += ', interface: '; $append_4(result, (this$static.eFlags & 512) != 0); result.string += ')'; return result.string; } function EClassImpl(){ $clinit_EClassImpl(); } defineClass(90, 364, {110:1, 94:1, 93:1, 29:1, 142:1, 155:1, 197:1, 58:1, 114:1, 54:1, 99:1, 90:1, 364:1, 158:1, 482:1, 119:1, 120:1, 691:1}, EClassImpl); _.dynamicIsInstance = function dynamicIsInstance_0(eObject){ return $isSuperTypeOf(this, eObject.eClass_0()); } ; _.eGet = function eGet_22(featureID, resolve, coreType){ var eClass; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , this.eAnnotations; case 1: return this.name_0; case 2: return this.instanceClassName != null?this.instanceClassName:this.generatedInstanceClassName; case 3: return $getInstanceClass(this); case 4: return null; case 5: return this.instanceTypeName; case 6: if (resolve) return $getEPackage(this); return $basicGetEPackage(this); case 7: return !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 7)) , this.eTypeParameters; case 8: return $clinit_Boolean() , (this.eFlags & 256) != 0?true:false; case 9: return $clinit_Boolean() , (this.eFlags & 512) != 0?true:false; case 10: return $getESuperTypes(this); case 11: return !this.eOperations && (this.eOperations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EOperation_2_classLit, this, 11, 10)) , this.eOperations; case 12: return $getEAllAttributes(this); case 13: return $getEAllReferences(this); case 14: return $getEAllReferences(this) , this.eReferences; case 15: return $getEAllAttributes(this) , this.eAttributes; case 16: return $getEAllContainments(this); case 17: return $getEAllOperations(this); case 18: return $getEAllStructuralFeatures(this); case 19: return $getEAllSuperTypes(this); case 20: return $getEAllAttributes(this) , this.eIDAttribute; case 21: return !this.eStructuralFeatures && (this.eStructuralFeatures = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, this, 21, 17)) , this.eStructuralFeatures; case 22: return $getEGenericSuperTypes(this); case 23: return $getEAllGenericSuperTypes(this); } return $eDynamicGet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , ECLASS)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?ECLASS:eClass), featureID), resolve, coreType); } ; _.eInverseAdd_0 = function eInverseAdd_14(otherEnd, featureID, msgs){ var eClass, eContainerFeatureID, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicAdd_0(this.eAnnotations, otherEnd, msgs); case 6: !!this.eContainer && (msgs = (eContainerFeatureID = this.eFlags_0 >> 16 , eContainerFeatureID >= 0?$eBasicRemoveFromContainerFeature_7(this, msgs):this.eContainer.eInverseRemove(this, -1 - eContainerFeatureID, null, msgs))); return $eBasicSetContainer(this, otherEnd, 6, msgs); case 11: return !this.eOperations && (this.eOperations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EOperation_2_classLit, this, 11, 10)) , $basicAdd_0(this.eOperations, otherEnd, msgs); case 21: return !this.eStructuralFeatures && (this.eStructuralFeatures = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, this, 21, 17)) , $basicAdd_0(this.eStructuralFeatures, otherEnd, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , ECLASS):eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseAdd(this, $eSettings_0(this), featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , ECLASS)), otherEnd, msgs); } ; _.eInverseRemove_0 = function eInverseRemove_16(otherEnd, featureID, msgs){ var eClass, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicRemove_0(this.eAnnotations, otherEnd, msgs); case 6: return $eBasicSetContainer(this, null, 6, msgs); case 7: return !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 7)) , $basicRemove_0(this.eTypeParameters, otherEnd, msgs); case 11: return !this.eOperations && (this.eOperations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EOperation_2_classLit, this, 11, 10)) , $basicRemove_0(this.eOperations, otherEnd, msgs); case 21: return !this.eStructuralFeatures && (this.eStructuralFeatures = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, this, 21, 17)) , $basicRemove_0(this.eStructuralFeatures, otherEnd, msgs); case 22: return $basicRemove_0($getEGenericSuperTypes(this), otherEnd, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , ECLASS):eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseRemove(this, $eSettings_0(this), featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , ECLASS)), otherEnd, msgs); } ; _.eIsSet = function eIsSet_21(featureID){ var eClass; switch (featureID) { case 0: return !!this.eAnnotations && this.eAnnotations.size_0 != 0; case 1: return this.name_0 != null; case 2: return this.instanceClassName != null && this.instanceClassName == this.instanceTypeName; case 3: return !!$getInstanceClass(this); case 4: return false; case 5: return this.instanceTypeName != null && this.instanceTypeName != this.instanceClassName && this.instanceTypeName != this.generatedInstanceClassName; case 6: return !!$basicGetEPackage(this); case 7: return !!this.eTypeParameters && this.eTypeParameters.size_0 != 0; case 8: return (this.eFlags & 256) != 0; case 9: return (this.eFlags & 512) != 0; case 10: return !!this.eSuperTypes && $getEGenericSuperTypes(this.eSuperTypes.this$01).size_0 != 0 && !(!!this.eGenericSuperTypes && $isSet(this.eGenericSuperTypes)); case 11: return !!this.eOperations && this.eOperations.size_0 != 0; case 12: return $getEAllAttributes(this).size_0 != 0; case 13: return $getEAllReferences(this).size_0 != 0; case 14: return $getEAllReferences(this) , this.eReferences.size_0 != 0; case 15: return $getEAllAttributes(this) , this.eAttributes.size_0 != 0; case 16: return $getEAllContainments(this).size_0 != 0; case 17: return $getEAllOperations(this).size_0 != 0; case 18: return $getEAllStructuralFeatures(this).size_0 != 0; case 19: return $getEAllSuperTypes(this).size_0 != 0; case 20: return $getEAllAttributes(this) , !!this.eIDAttribute; case 21: return !!this.eStructuralFeatures && this.eStructuralFeatures.size_0 != 0; case 22: return !!this.eGenericSuperTypes && $isSet(this.eGenericSuperTypes); case 23: return $getEAllGenericSuperTypes(this).size_0 != 0; } return $eDynamicIsSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , ECLASS)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?ECLASS:eClass), featureID)); } ; _.eObjectForURIFragmentSegment = function eObjectForURIFragmentSegment_2(uriFragmentSegment){ var result; result = this.eAllStructuralFeaturesData == null || !!this.eOperations && this.eOperations.size_0 != 0?null:$getEStructuralFeature_0(this, uriFragmentSegment); return result?result:$eObjectForURIFragmentSegment_0(this, uriFragmentSegment); } ; _.eSet = function eSet_20(featureID, newValue){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $addAll_9(this.eAnnotations, castTo(newValue, 16)); return; case 1: $setName_1(this, castToString(newValue)); return; case 2: $setInstanceClassName(this, castToString(newValue)); return; case 5: $setInstanceTypeName(this, castToString(newValue)); return; case 7: !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 7)); $clear_13(this.eTypeParameters); !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 7)); $addAll_9(this.eTypeParameters, castTo(newValue, 16)); return; case 8: $setAbstract(this, $booleanValue(castToBoolean(newValue))); return; case 9: $setInterface(this, $booleanValue(castToBoolean(newValue))); return; case 10: $clear_12($getESuperTypes(this)); $addAll_9($getESuperTypes(this), castTo(newValue, 16)); return; case 11: !this.eOperations && (this.eOperations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EOperation_2_classLit, this, 11, 10)); $clear_13(this.eOperations); !this.eOperations && (this.eOperations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EOperation_2_classLit, this, 11, 10)); $addAll_9(this.eOperations, castTo(newValue, 16)); return; case 21: !this.eStructuralFeatures && (this.eStructuralFeatures = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, this, 21, 17)); $clear_13(this.eStructuralFeatures); !this.eStructuralFeatures && (this.eStructuralFeatures = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, this, 21, 17)); $addAll_9(this.eStructuralFeatures, castTo(newValue, 16)); return; case 22: $clear_13($getEGenericSuperTypes(this)); $addAll_9($getEGenericSuperTypes(this), castTo(newValue, 16)); return; } $eDynamicSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , ECLASS)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?ECLASS:eClass), featureID), newValue); } ; _.eStaticClass = function eStaticClass_21(){ return $clinit_EcorePackage$Literals() , ECLASS; } ; _.eUnset = function eUnset_20(featureID){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); return; case 1: instanceOf(this.eContainer, 184) && (castTo(this.eContainer, 184).eNameToEClassifierMap = null); $setName(this, null); return; case 2: $basicSetInstanceClassName(this, null); $basicSetInstanceTypeName(this, this.instanceClassName); return; case 5: $setInstanceTypeName(this, null); return; case 7: !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 7)); $clear_13(this.eTypeParameters); return; case 8: $setAbstract(this, false); return; case 9: $setInterface(this, false); return; case 10: !!this.eSuperTypes && $clear_12(this.eSuperTypes); return; case 11: !this.eOperations && (this.eOperations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EOperation_2_classLit, this, 11, 10)); $clear_13(this.eOperations); return; case 21: !this.eStructuralFeatures && (this.eStructuralFeatures = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, this, 21, 17)); $clear_13(this.eStructuralFeatures); return; case 22: !!this.eGenericSuperTypes && $clear_13(this.eGenericSuperTypes); return; } $eDynamicUnset(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , ECLASS)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?ECLASS:eClass), featureID)); } ; _.freeze = function freeze_4(){ var i, size_0; $getEAllAttributes(this); $getEAllReferences(this); $getEAllContainments(this); $getEAllOperations(this); $getEAllStructuralFeatures(this); $getEAllSuperTypes(this); $getEAllGenericSuperTypes(this); $clear_11($getSubclasses($getESuperAdapter(this))); if (this.eStructuralFeatures) { for (i = 0 , size_0 = this.eStructuralFeatures.size_0; i < size_0; ++i) { $freeze($get_20(this.eStructuralFeatures, i)); } } if (this.eOperations) { for (i = 0 , size_0 = this.eOperations.size_0; i < size_0; ++i) { $freeze($get_20(this.eOperations, i)); } } $getExtendedMetaData(($clinit_ExtendedMetaData() , INSTANCE_11), this).getName(); this.eFlags |= 1; } ; _.toString_0 = function toString_150(){ return $toString_31(this); } ; _.eAttributes = null; _.eReferences = null; var COMPUTATION_IN_PROGRESS, NO_EALL_OPERATIONS_DATA, NO_EALL_STRUCTURE_FEATURES_DATA; var Lorg_eclipse_emf_ecore_impl_EClassImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EClassImpl', 90); defineClass(2092, 2091, $intern_156); _.addAllUnique = function addAllUnique_9(index_0, collection){ return $addAllUnique_3(this, index_0, collection); } ; _.addAllUnique_0 = function addAllUnique_10(collection){ return $addAllUnique_3(this, this.size_0, collection); } ; _.addUnique = function addUnique_10(index_0, object){ $addUnique_5(this, index_0, object); } ; _.addUnique_0 = function addUnique_11(object){ $addUnique_6(this, object); } ; _.basicAdd = function basicAdd_0(object, notifications){ return $basicAdd_0(this, object, notifications); } ; _.basicGet = function basicGet_1(index_0){ return $basicGet(this, index_0); } ; _.basicRemove = function basicRemove_0(object, notifications){ return $basicRemove_0(this, object, notifications); } ; _.setUnique = function setUnique_4(index_0, object){ return $setUnique_1(this, index_0, object); } ; _.basicIterator = function basicIterator_2(){ return new AbstractEList$NonResolvingEIterator(this); } ; _.basicListIterator = function basicListIterator_5(){ return new AbstractEList$NonResolvingEListIterator(this); } ; _.basicListIterator_0 = function basicListIterator_6(index_0){ return $basicListIterator(this, index_0); } ; var Lorg_eclipse_emf_ecore_util_NotifyingInternalEListImpl_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'NotifyingInternalEListImpl', 2092); function $contains_11(this$static, object){ var containedEObject, eContainer, eObject, i, opposite, result, result0; if (this$static.isEObject()) { if (this$static.size_0 > 4) { if (this$static.isInstance(object)) { if (this$static.isContainment()) { eObject = castTo(object, 54); eContainer = eObject.eContainer_0(); result0 = eContainer == this$static.owner && (this$static.hasNavigableInverse()?eObject.eBaseStructuralFeatureID(eObject.eContainerFeatureID_0(), this$static.getInverseFeatureClass()) == this$static.getInverseFeatureID():-1 - eObject.eContainerFeatureID_0() == this$static.getFeatureID_0()); if (this$static.hasProxies() && !result0 && !eContainer && !!eObject.eDirectResource()) { for (i = 0; i < this$static.size_0; ++i) { containedEObject = this$static.resolveProxy(castTo(this$static.data_0[i], 58)); if (maskUndefined(containedEObject) === maskUndefined(object)) { return true; } } } return result0; } else if (this$static.hasNavigableInverse() && !this$static.hasManyInverse()) { opposite = castTo(object, 58).eGet_0($getEOpposite(castTo(this$static.getEStructuralFeature(), 19))); if (maskUndefined(opposite) === maskUndefined(this$static.owner)) { return true; } else if (opposite == null || !castTo(opposite, 58).eIsProxy()) { return false; } } } else { return false; } } result = $contains_10(this$static, object); if (this$static.hasProxies() && !result) { for (i = 0; i < this$static.size_0; ++i) { eObject = this$static.resolveProxy(castTo(this$static.data_0[i], 58)); if (maskUndefined(eObject) === maskUndefined(object)) { return true; } } } return result; } else { return $contains_10(this$static, object); } } function $createNotification(this$static, eventType, oldObject, newObject, index_0, wasSet){ return new ENotificationImpl_3(this$static.owner, eventType, this$static.getFeatureID_0(), oldObject, newObject, index_0, wasSet); } function $dispatchNotification(this$static, notification){ $eNotify(this$static.owner, notification); } function $indexOf_6(this$static, object){ var eObject, i, index_0; index_0 = $indexOf_4(this$static, object); if (index_0 >= 0) return index_0; if (this$static.isEObject()) { for (i = 0; i < this$static.size_0; ++i) { eObject = this$static.resolveProxy(castTo(this$static.data_0[i], 58)); if (maskUndefined(eObject) === maskUndefined(object)) { return i; } } } return -1; } function $resolve(this$static, index_0, eObject){ var element, notificationChain, oldElement, oldObject, resolved, resolvedElement; resolved = this$static.resolveProxy(eObject); if (resolved != eObject) { oldObject = this$static.data_0[index_0]; resolvedElement = resolved; $assign(this$static, index_0, this$static.validate(index_0, resolvedElement)); oldElement = oldObject; this$static.didSet(index_0, resolvedElement, oldElement); if (this$static.isContainment()) { element = eObject; notificationChain = this$static.inverseRemove(element, null); !castTo(resolved, 54).eInternalContainer() && (notificationChain = this$static.inverseAdd(resolvedElement, notificationChain)); !!notificationChain && notificationChain.dispatch_0(); } $eNotificationRequired(this$static.owner) && $dispatchNotification(this$static, this$static.createNotification(9, eObject, resolved, index_0, false)); return resolved; } else { return eObject; } } function $set_14(this$static, newValue){ $clear_13(this$static); this$static.addAll(castTo(newValue, 15)); } function $toArray_10(this$static){ var i; if (this$static.hasProxies()) { for (i = this$static.size_0 - 1; i >= 0; --i) { $get_20(this$static, i); } } return $toArray_8(this$static); } function $validate_0(this$static, index_0, object){ $validate(this$static, object); if (!this$static.hasInstanceClass() && object != null && !this$static.isInstance(object)) { throw toJs(new ArrayStoreException); } return object; } function EcoreEList(dataClass, owner){ this.dataClass = dataClass; this.owner = owner; } defineClass(632, 2092, $intern_157); _.contains = function contains_63(object){ return $contains_11(this, object); } ; _.createNotification = function createNotification_1(eventType, oldObject, newObject, index_0, wasSet){ return $createNotification(this, eventType, oldObject, newObject, index_0, wasSet); } ; _.dispatchNotification = function dispatchNotification_1(notification){ $dispatchNotification(this, notification); } ; _.get_6 = function get_63(resolve){ return this; } ; _.getEStructuralFeature = function getEStructuralFeature_0(){ return $getEStructuralFeature(this.owner.eClass_0(), this.getFeatureID_0()); } ; _.getFeature = function getFeature_4(){ return this.getEStructuralFeature(); } ; _.getFeatureID_0 = function getFeatureID_5(){ return $getFeatureID(this.owner.eClass_0(), this.getEStructuralFeature()); } ; _.getInverseFeatureClass = function getInverseFeatureClass(){ return castTo(this.getEStructuralFeature().getEType(), 29).getInstanceClass(); } ; _.getInverseFeatureID = function getInverseFeatureID(){ return $getEOpposite(castTo(this.getEStructuralFeature(), 19)).featureID; } ; _.getNotifier = function getNotifier_4(){ return this.owner; } ; _.hasInstanceClass = function hasInstanceClass(){ return true; } ; _.hasManyInverse = function hasManyInverse(){ return false; } ; _.hasNavigableInverse = function hasNavigableInverse(){ return false; } ; _.hasProxies = function hasProxies(){ return false; } ; _.indexOf_0 = function indexOf_15(object){ return $indexOf_6(this, object); } ; _.inverseAdd = function inverseAdd_1(object, notifications){ var internalEObject; return internalEObject = castTo(object, 54) , this.hasNavigableInverse()?this.hasInstanceClass()?internalEObject.eInverseAdd(this.owner, this.getInverseFeatureID(), this.getInverseFeatureClass(), notifications):internalEObject.eInverseAdd(this.owner, $getFeatureID(internalEObject.eClass_0(), $getEOpposite(castTo(this.getEStructuralFeature(), 19))), null, notifications):internalEObject.eInverseAdd(this.owner, -1 - this.getFeatureID_0(), null, notifications); } ; _.inverseRemove = function inverseRemove_1(object, notifications){ var internalEObject; return internalEObject = castTo(object, 54) , this.hasNavigableInverse()?this.hasInstanceClass()?internalEObject.eInverseRemove(this.owner, this.getInverseFeatureID(), this.getInverseFeatureClass(), notifications):internalEObject.eInverseRemove(this.owner, $getFeatureID(internalEObject.eClass_0(), $getEOpposite(castTo(this.getEStructuralFeature(), 19))), null, notifications):internalEObject.eInverseRemove(this.owner, -1 - this.getFeatureID_0(), null, notifications); } ; _.isContainment = function isContainment_1(){ return false; } ; _.isEObject = function isEObject(){ return true; } ; _.isInstance = function isInstance_1(object){ return isInstance(this.dataClass, object); } ; _.isNotificationRequired = function isNotificationRequired_1(){ return $eNotificationRequired(this.owner); } ; _.isSet_0 = function isSet_3(){ return this.size_0 != 0; } ; _.newData = function newData_3(capacity){ return newInstance_11(this.dataClass, capacity); } ; _.resolve = function resolve_1(index_0, object){ return this.isEObject() && this.hasProxies()?$resolve(this, index_0, castTo(object, 58)):object; } ; _.resolveProxy = function resolveProxy(eObject){ return eObject.eIsProxy()?$eResolveProxy(this.owner, castTo(eObject, 54)):eObject; } ; _.set_1 = function set_31(newValue){ $set_14(this, newValue); } ; _.toArray = function toArray_38(){ return $toArray_10(this); } ; _.toArray_0 = function toArray_39(array){ var i; if (this.hasProxies()) { for (i = this.size_0 - 1; i >= 0; --i) { $get_20(this, i); } } return $toArray_9(this, array); } ; _.unset = function unset_1(){ $clear_13(this); } ; _.validate = function validate_0(index_0, object){ return $validate_0(this, index_0, object); } ; var Lorg_eclipse_emf_ecore_util_EcoreEList_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EcoreEList', 632); function EObjectEList(dataClass, owner, featureID){ EcoreEList.call(this, dataClass, owner); this.featureID = featureID; } defineClass(505, 632, $intern_157, EObjectEList); _.canContainNull = function canContainNull_2(){ return false; } ; _.getFeatureID_0 = function getFeatureID_6(){ return this.featureID; } ; _.hasInverse = function hasInverse_1(){ return false; } ; _.isEObject = function isEObject_0(){ return true; } ; _.isUnique = function isUnique_3(){ return true; } ; _.resolve = function resolve_2(index_0, object){ return object; } ; _.useEquals = function useEquals_1(){ return false; } ; _.featureID = 0; var Lorg_eclipse_emf_ecore_util_EObjectEList_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectEList', 505); function EObjectContainmentEList(dataClass, owner, featureID){ EObjectEList.call(this, dataClass, owner, featureID); } defineClass(83, 505, $intern_157, EObjectContainmentEList); _.hasInverse = function hasInverse_2(){ return true; } ; _.hasNavigableInverse = function hasNavigableInverse_0(){ return false; } ; _.isContainment = function isContainment_2(){ return true; } ; var Lorg_eclipse_emf_ecore_util_EObjectContainmentEList_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectContainmentEList', 83); function EObjectContainmentEList$Unsettable(dataClass, owner, featureID){ EObjectContainmentEList.call(this, dataClass, owner, featureID); } defineClass(555, 83, $intern_157, EObjectContainmentEList$Unsettable); _.didChange = function didChange_0(){ this.isSet = true; } ; _.isSet_0 = function isSet_4(){ return this.isSet; } ; _.unset = function unset_2(){ var oldIsSet; $clear_13(this); if ($eNotificationRequired(this.owner)) { oldIsSet = this.isSet; this.isSet = false; $eNotify(this.owner, new ENotificationImpl_4(this.owner, 2, this.featureID, oldIsSet, false)); } else { this.isSet = false; } } ; _.isSet = false; var Lorg_eclipse_emf_ecore_util_EObjectContainmentEList$Unsettable_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectContainmentEList/Unsettable', 555); function $isSet(this$static){ var eGenericType, eGenericType$iterator; for (eGenericType$iterator = new AbstractEList$EIterator(this$static); eGenericType$iterator.cursor != eGenericType$iterator.this$01_2.size_1();) { eGenericType = castTo($doNext(eGenericType$iterator), 89); if (!!eGenericType.eTypeParameter || (!eGenericType.eTypeArguments && (eGenericType.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, eGenericType, 1)) , eGenericType.eTypeArguments).size_0 != 0) { return true; } } return false; } function $shadowAdd(this$static, eGenericType, notifications){ var notification, result; notification = new ENotificationImpl_3(this$static.owner, 3, 10, null, (result = eGenericType.eRawType , instanceOf(result, 90)?castTo(result, 29):($clinit_EcorePackage$Literals() , EOBJECT)), $indexOf_6(this$static, eGenericType), false); !notifications?(notifications = notification):notifications.add_5(notification); return notifications; } function $shadowRemove(this$static, eGenericType, notifications){ var notification, result; notification = new ENotificationImpl_3(this$static.owner, 4, 10, (result = eGenericType.eRawType , instanceOf(result, 90)?castTo(result, 29):($clinit_EcorePackage$Literals() , EOBJECT)), null, $indexOf_6(this$static, eGenericType), false); !notifications?(notifications = notification):notifications.add_5(notification); return notifications; } function $shadowSet(this$static, oldEGenericType, newEGenericType, notifications){ var notification, result, result0; notification = new ENotificationImpl_3(this$static.owner, 1, 10, (result0 = oldEGenericType.eRawType , instanceOf(result0, 90)?castTo(result0, 29):($clinit_EcorePackage$Literals() , EOBJECT)), (result = newEGenericType.eRawType , instanceOf(result, 90)?castTo(result, 29):($clinit_EcorePackage$Literals() , EOBJECT)), $indexOf_6(this$static, oldEGenericType), false); !notifications?(notifications = notification):notifications.add_5(notification); return notifications; } function EClassImpl$1(this$0, $anonymous0, $anonymous1){ this.this$01 = this$0; EObjectContainmentEList$Unsettable.call(this, $anonymous0, $anonymous1, 22); } defineClass(1161, 555, $intern_157, EClassImpl$1); _.move = function move_14(targetIndex, sourceIndex){ var result0, result; return result0 = castTo($move_1(this, targetIndex, sourceIndex), 89) , $eNotificationRequired(this.owner) && $dispatchNotification(this, new ENotificationImpl_18(this.this$01, 7, ($clinit_EcorePackage$Literals() , ECLASS__ESUPER_TYPES), valueOf_3(sourceIndex), (result = result0.eRawType , instanceOf(result, 90)?castTo(result, 29):EOBJECT), targetIndex)) , result0; } ; _.shadowAdd = function shadowAdd_0(eGenericType, notifications){ return $shadowAdd(this, castTo(eGenericType, 89), notifications); } ; _.shadowRemove = function shadowRemove_0(eGenericType, notifications){ return $shadowRemove(this, castTo(eGenericType, 89), notifications); } ; _.shadowSet = function shadowSet_0(oldEGenericType, newEGenericType, notifications){ return $shadowSet(this, castTo(oldEGenericType, 89), castTo(newEGenericType, 89), notifications); } ; _.createNotification = function createNotification_2(eventType, oldObject, newObject, index_0, wasSet){ switch (eventType) { case 3: { return $createNotification(this, eventType, oldObject, newObject, index_0, this.size_0 > 1); } case 5: { return $createNotification(this, eventType, oldObject, newObject, index_0, this.size_0 - castTo(newObject, 15).size_1() > 0); } default:{ return new ENotificationImpl_3(this.owner, eventType, this.featureID, oldObject, newObject, index_0, true); } } } ; _.hasShadow = function hasShadow_0(){ return true; } ; _.isSet_0 = function isSet_5(){ return $isSet(this); } ; _.unset = function unset_3(){ $clear_13(this); } ; var Lorg_eclipse_emf_ecore_impl_EClassImpl$1_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EClassImpl/1', 1161); function $getSubclasses(this$static){ !this$static.subclasses && (this$static.subclasses = new ESuperAdapter$1); return this$static.subclasses; } function $setFlags(this$static, featureId){ var eSuperAdapter, i, oldModifiedState, subclass; oldModifiedState = this$static.modifiedState; switch (featureId) { case 1: { this$static.modifiedState |= 1; this$static.modifiedState |= 4; this$static.modifiedState |= 8; break; } case 2: { this$static.modifiedState |= 2; this$static.modifiedState |= 4; this$static.modifiedState |= 8; break; } case 4: { this$static.modifiedState |= 1; this$static.modifiedState |= 2; this$static.modifiedState |= 4; this$static.modifiedState |= 8; break; } case 3: { this$static.modifiedState |= 16; this$static.modifiedState |= 8; break; } case 0: { this$static.modifiedState |= 32; this$static.modifiedState |= 16; this$static.modifiedState |= 8; this$static.modifiedState |= 1; this$static.modifiedState |= 2; this$static.modifiedState |= 4; break; } } if (this$static.modifiedState != oldModifiedState && !!this$static.subclasses) { for (i = new AbstractEList$EIterator(this$static.subclasses); i.cursor != i.this$01_2.size_1();) { subclass = castTo($doNext(i), 482); eSuperAdapter = $getESuperAdapter(subclass); $setFlags_0(eSuperAdapter, featureId); } } } function getFeatureID_7(notification){ var featureID; featureID = notification.getFeatureID(null); switch (featureID) { case 10: return 0; case 15: return 1; case 14: return 2; case 11: return 3; case 21: return 4; } return -1; } defineClass(1175, 1174, $intern_143); _.notifyChanged = function notifyChanged_0(notification){ var eSuperAdapter, eventType, featureID, holder, i, newValue, oldValue; eventType = notification.getEventType(); if (eventType != 8) { featureID = getFeatureID_7(notification); if (featureID == 0) { switch (eventType) { case 1: case 9: { oldValue = notification.getOldValue(); if (oldValue != null) { eSuperAdapter = $getESuperAdapter(castTo(oldValue, 482)); !eSuperAdapter.subclasses && (eSuperAdapter.subclasses = new ESuperAdapter$1); $remove_32(eSuperAdapter.subclasses, notification.getNotifier()); } newValue = notification.getNewValue(); if (newValue != null) { holder = castTo(newValue, 482); if ((holder.eFlags & 1) == 0) { eSuperAdapter = $getESuperAdapter(holder); !eSuperAdapter.subclasses && (eSuperAdapter.subclasses = new ESuperAdapter$1); $add_21(eSuperAdapter.subclasses, castTo(notification.getNotifier(), 29)); } } break; } case 3: { newValue = notification.getNewValue(); if (newValue != null) { holder = castTo(newValue, 482); if ((holder.eFlags & 1) == 0) { eSuperAdapter = $getESuperAdapter(holder); !eSuperAdapter.subclasses && (eSuperAdapter.subclasses = new ESuperAdapter$1); $add_21(eSuperAdapter.subclasses, castTo(notification.getNotifier(), 29)); } } break; } case 5: { newValue = notification.getNewValue(); if (newValue != null) { for (i = castTo(newValue, 16).iterator_0(); i.hasNext_0();) { holder = castTo(i.next_1(), 482); if ((holder.eFlags & 1) == 0) { eSuperAdapter = $getESuperAdapter(holder); !eSuperAdapter.subclasses && (eSuperAdapter.subclasses = new ESuperAdapter$1); $add_21(eSuperAdapter.subclasses, castTo(notification.getNotifier(), 29)); } } } break; } case 4: { oldValue = notification.getOldValue(); if (oldValue != null) { holder = castTo(oldValue, 482); if ((holder.eFlags & 1) == 0) { eSuperAdapter = $getESuperAdapter(holder); !eSuperAdapter.subclasses && (eSuperAdapter.subclasses = new ESuperAdapter$1); $remove_32(eSuperAdapter.subclasses, notification.getNotifier()); } } break; } case 6: { oldValue = notification.getOldValue(); if (oldValue != null) { for (i = castTo(oldValue, 16).iterator_0(); i.hasNext_0();) { holder = castTo(i.next_1(), 482); if ((holder.eFlags & 1) == 0) { eSuperAdapter = $getESuperAdapter(holder); !eSuperAdapter.subclasses && (eSuperAdapter.subclasses = new ESuperAdapter$1); $remove_32(eSuperAdapter.subclasses, notification.getNotifier()); } } } break; } } } this.setFlags(featureID); } } ; _.setFlags = function setFlags(featureId){ $setFlags(this, featureId); } ; _.modifiedState = 63; var Lorg_eclipse_emf_ecore_impl_ESuperAdapter_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'ESuperAdapter', 1175); function $setFlags_0(this$static, featureId){ $setFlags(this$static, featureId); (this$static.modifiedState & 1) != 0 && (this$static.this$01.eAllAttributes = null); (this$static.modifiedState & 2) != 0 && (this$static.this$01.eAllReferences = null); if ((this$static.modifiedState & 4) != 0) { this$static.this$01.eAllStructuralFeatures = null; this$static.this$01.eAllStructuralFeaturesData = null; } if ((this$static.modifiedState & 16) != 0) { this$static.this$01.eAllOperations = null; this$static.this$01.eAllOperationsData = null; } (this$static.modifiedState & 8) != 0 && (this$static.this$01.eAllContainments = null); if ((this$static.modifiedState & 32) != 0) { this$static.this$01.eAllSuperTypes = null; this$static.this$01.eAllGenericSuperTypes = null; } } function EClassImpl$10(this$0){ this.this$01 = this$0; } defineClass(1176, 1175, $intern_143, EClassImpl$10); _.setFlags = function setFlags_0(featureId){ $setFlags_0(this, featureId); } ; var Lorg_eclipse_emf_ecore_impl_EClassImpl$10_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EClassImpl/10', 1176); defineClass(1165, 710, $intern_157); _.addAllUnique = function addAllUnique_11(index_0, collection){ return $addAllUnique(this, index_0, collection); } ; _.addAllUnique_0 = function addAllUnique_12(collection){ return $addAllUnique_0(this, collection); } ; _.addUnique = function addUnique_12(index_0, object){ $addUnique(this, index_0, object); } ; _.addUnique_0 = function addUnique_13(object){ $addUnique_0(this, object); } ; _.basicGet = function basicGet_2(index_0){ return $basicGet(this, index_0); } ; _.setUnique = function setUnique_5(index_0, object){ return $setUnique(this, index_0, object); } ; _.basicAdd = function basicAdd_1(object, notifications){ throw toJs(new UnsupportedOperationException); } ; _.basicIterator = function basicIterator_3(){ return new AbstractEList$NonResolvingEIterator(this); } ; _.basicListIterator = function basicListIterator_7(){ return new AbstractEList$NonResolvingEListIterator(this); } ; _.basicListIterator_0 = function basicListIterator_8(index_0){ return $basicListIterator(this, index_0); } ; _.basicRemove = function basicRemove_1(object, notifications){ throw toJs(new UnsupportedOperationException); } ; _.get_6 = function get_64(resolve){ return this; } ; _.isSet_0 = function isSet_6(){ return this.size_0 != 0; } ; _.set_1 = function set_32(newValue){ throw toJs(new UnsupportedOperationException); } ; _.unset = function unset_4(){ throw toJs(new UnsupportedOperationException); } ; var Lorg_eclipse_emf_ecore_util_EcoreEList$UnmodifiableEList_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EcoreEList/UnmodifiableEList', 1165); function EcoreEList$UnmodifiableEList$FastCompare(size_0, data_0){ BasicEList$UnmodifiableEList.call(this, size_0, data_0); } defineClass(328, 1165, $intern_157, EcoreEList$UnmodifiableEList$FastCompare); _.useEquals = function useEquals_2(){ return false; } ; var Lorg_eclipse_emf_ecore_util_EcoreEList$UnmodifiableEList$FastCompare_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EcoreEList/UnmodifiableEList/FastCompare', 328); function $containments(this$static){ maskUndefined(this$static.containments) === maskUndefined(($clinit_EClassImpl() , NO_EALL_STRUCTURE_FEATURES_DATA)) && $init_2(this$static); return this$static.containments; } function $init_2(this$static){ var containmentsList, crossReferencesList, eAnnotation, eAnnotation0, eAnnotation1, eReference, eStructuralFeature, i, isMixed, theOpposite; containmentsList = new EClassImpl$1EStructuralFeatureUniqueEList; crossReferencesList = new EClassImpl$1EStructuralFeatureUniqueEList; isMixed = $equals_5('mixed', (eAnnotation0 = $getEAnnotation(this$static.this$01, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData') , !eAnnotation0?null:castToString($get_21((!eAnnotation0.details && (eAnnotation0.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, eAnnotation0)) , eAnnotation0.details), 'kind')))); for (i = 0; i < this$static.size_0; ++i) { eStructuralFeature = castTo(this$static.data_0[i], 179); if (instanceOf(eStructuralFeature, 102)) { eReference = castTo(eStructuralFeature, 19); (eReference.eFlags & $intern_138) != 0?((eReference.eFlags & $intern_17) == 0 || !isMixed && (eAnnotation1 = $getEAnnotation(eReference, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData') , (!eAnnotation1?null:castToString($get_21((!eAnnotation1.details && (eAnnotation1.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, eAnnotation1)) , eAnnotation1.details), 'group'))) == null)) && $add_21(containmentsList, eReference):(theOpposite = $getEOpposite(eReference) , !!theOpposite && (theOpposite.eFlags & $intern_138) != 0 || ((eReference.eFlags & $intern_17) == 0 || !isMixed && (eAnnotation = $getEAnnotation(eReference, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData') , (!eAnnotation?null:castToString($get_21((!eAnnotation.details && (eAnnotation.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, eAnnotation)) , eAnnotation.details), 'group'))) == null)) && $add_21(crossReferencesList, eReference)); } else { $clinit_FeatureMapUtil(); if (castTo(eStructuralFeature, 69).isFeatureMap_0()) { if (!eStructuralFeature.isDerived()) { $add_21(containmentsList, eStructuralFeature); $add_21(crossReferencesList, eStructuralFeature); } } } } $shrink_0(containmentsList); $shrink_0(crossReferencesList); this$static.containments = castTo(containmentsList.data_0, 254); castTo(crossReferencesList.data_0, 254); } function EClassImpl$1EAllStructuralFeaturesList(this$0, eAllStructuralFeatures){ this.this$01 = this$0; EcoreEList$UnmodifiableEList$FastCompare.call(this, (castTo($get_20($getEStructuralFeatures(($clinit_EcorePackage() , eINSTANCE_2).eClassEClass), 10), 19) , eAllStructuralFeatures.size_0), eAllStructuralFeatures.data_0); this.containments = ($clinit_EClassImpl() , NO_EALL_STRUCTURE_FEATURES_DATA); } defineClass(1168, 328, $intern_157, EClassImpl$1EAllStructuralFeaturesList); _.indexOf_0 = function indexOf_16(object){ var eStructuralFeature, index_0, last; if (instanceOf(object, 179)) { eStructuralFeature = castTo(object, 179); index_0 = eStructuralFeature.getFeatureID_0(); if (index_0 != -1) { for (last = this.size_0; index_0 < last; ++index_0) { if (maskUndefined(this.data_0[index_0]) === maskUndefined(object)) { return index_0; } } } } return -1; } ; var Lorg_eclipse_emf_ecore_impl_EClassImpl$1EAllStructuralFeaturesList_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EClassImpl/1EAllStructuralFeaturesList', 1168); function $eliminateEquivalentDuplicates(this$static){ var eGenericType, eGenericTypes, i, j, otherEGenericType; eGenericTypes = castTo(this$static.data_0, 689); for (i = this$static.size_0 - 1; i >= 0; --i) { eGenericType = eGenericTypes[i]; for (j = 0; j < i; ++j) { otherEGenericType = eGenericTypes[j]; if ($equivalent(this$static, eGenericType, otherEGenericType)) { $remove_33(this$static, i); break; } } } } function $equivalent(this$static, eGenericType, otherEGenericType){ var eClassifier, eTypeArgument, eTypeArgumentSize, eTypeArguments, eTypeParameter, instanceTypeName, j, otherEClassifier, otherETypeArgument, otherETypeArguments, otherETypeParameter, otherInstanceTypeName; if (eGenericType == otherEGenericType) { return true; } else { eGenericType = $resolve_0(this$static, eGenericType); otherEGenericType = $resolve_0(this$static, otherEGenericType); eClassifier = $getEClassifier(eGenericType); if (eClassifier) { otherEClassifier = $getEClassifier(otherEGenericType); if (otherEClassifier != eClassifier) { if (!otherEClassifier) { return false; } else { instanceTypeName = eClassifier.getInstanceTypeName(); otherInstanceTypeName = otherEClassifier.getInstanceTypeName(); return instanceTypeName == otherInstanceTypeName && instanceTypeName != null; } } else { eTypeArguments = (!eGenericType.eTypeArguments && (eGenericType.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, eGenericType, 1)) , eGenericType.eTypeArguments); eTypeArgumentSize = eTypeArguments.size_0; otherETypeArguments = (!otherEGenericType.eTypeArguments && (otherEGenericType.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, otherEGenericType, 1)) , otherEGenericType.eTypeArguments); if (eTypeArgumentSize == otherETypeArguments.size_0) { for (j = 0; j < eTypeArgumentSize; ++j) { eTypeArgument = castTo($get_20(eTypeArguments, j), 89); otherETypeArgument = castTo($get_20(otherETypeArguments, j), 89); if (!$equivalent(this$static, eTypeArgument, otherETypeArgument)) { return false; } } } return true; } } else { eTypeParameter = eGenericType.eTypeParameter; otherETypeParameter = otherEGenericType.eTypeParameter; return eTypeParameter == otherETypeParameter; } } } function $resolve_0(this$static, eGenericType){ var eContainer, eGenericTypes, eTypeArguments, eTypeParameter, i, index_0, otherEGenericType; eTypeParameter = eGenericType.eTypeParameter; if (eTypeParameter) { eContainer = $eContainer(eTypeParameter); eGenericTypes = castTo(this$static.data_0, 689); for (i = 0; i < this$static.size_0; ++i) { otherEGenericType = eGenericTypes[i]; if ($getEClassifier(otherEGenericType) == eContainer) { eTypeArguments = (!otherEGenericType.eTypeArguments && (otherEGenericType.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, otherEGenericType, 1)) , otherEGenericType.eTypeArguments); index_0 = castTo(eContainer.eGet_0(eContainmentFeature(eTypeParameter, eTypeParameter.eContainer, eTypeParameter.eFlags_0 >> 16)), 15).indexOf_0(eTypeParameter); if (index_0 < eTypeArguments.size_0) { return $resolve_0(this$static, castTo($get_20(eTypeArguments, index_0), 89)); } } } } return eGenericType; } function EClassImpl$1EGenericSuperTypeEList(){ } defineClass(1162, 506, $intern_141, EClassImpl$1EGenericSuperTypeEList); _.newData = function newData_4(capacity){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, $intern_158, 89, capacity, 0, 1); } ; _.useEquals = function useEquals_3(){ return false; } ; var Lorg_eclipse_emf_ecore_impl_EClassImpl$1EGenericSuperTypeEList_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EClassImpl/1EGenericSuperTypeEList', 1162); function EClassImpl$1EStructuralFeatureUniqueEList(){ } defineClass(633, 506, $intern_141, EClassImpl$1EStructuralFeatureUniqueEList); _.newData = function newData_5(capacity){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, $intern_154, 179, capacity, 0, 1); } ; _.useEquals = function useEquals_4(){ return false; } ; var Lorg_eclipse_emf_ecore_impl_EClassImpl$1EStructuralFeatureUniqueEList_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EClassImpl/1EStructuralFeatureUniqueEList', 633); function EClassImpl$1ReferenceList(){ } defineClass(755, 506, $intern_141, EClassImpl$1ReferenceList); _.newData = function newData_6(capacity){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EReference_2_classLit, $intern_154, 19, capacity, 0, 1); } ; _.useEquals = function useEquals_5(){ return false; } ; var Lorg_eclipse_emf_ecore_impl_EClassImpl$1ReferenceList_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EClassImpl/1ReferenceList', 755); function $didAdd_0(this$static, eAttribute){ (eAttribute.eFlags & $intern_138) != 0 && !this$static.this$01.eIDAttribute && (this$static.this$01.eIDAttribute = eAttribute); } function EClassImpl$2(this$0){ this.this$01 = this$0; } defineClass(1163, 506, $intern_141, EClassImpl$2); _.didAdd = function didAdd_1(index_0, eAttribute){ $didAdd_0(this, castTo(eAttribute, 35)); } ; _.newData = function newData_7(capacity){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EAttribute_2_classLit, $intern_154, 35, capacity, 0, 1); } ; _.useEquals = function useEquals_6(){ return false; } ; var Lorg_eclipse_emf_ecore_impl_EClassImpl$2_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EClassImpl/2', 1163); function EClassImpl$3(){ } defineClass(1164, 506, $intern_141, EClassImpl$3); _.newData = function newData_8(capacity){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EAttribute_2_classLit, $intern_154, 35, capacity, 0, 1); } ; _.useEquals = function useEquals_7(){ return false; } ; var Lorg_eclipse_emf_ecore_impl_EClassImpl$3_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EClassImpl/3', 1164); function $add_28(this$static, object){ $clinit_System(); String.fromCharCode(10); return $add_21($getEStructuralFeatures(this$static.this$01), object); } function $addUnique_8(this$static, object){ $addUnique_6($getEStructuralFeatures(this$static.this$01), object); } function EClassImpl$4(this$0, $anonymous2, $anonymous3){ this.this$01 = this$0; EcoreEList$UnmodifiableEList$FastCompare.call(this, $anonymous2, $anonymous3); } defineClass(1166, 328, $intern_157, EClassImpl$4); _.add_2 = function add_62(object){ return $add_28(this, castTo(object, 35)); } ; _.addUnique_0 = function addUnique_14(object){ $addUnique_8(this, castTo(object, 35)); } ; var Lorg_eclipse_emf_ecore_impl_EClassImpl$4_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EClassImpl/4', 1166); function $add_29(this$static, object){ $clinit_System(); String.fromCharCode(10); return $add_21($getEStructuralFeatures(this$static.this$01), object); } function $addUnique_9(this$static, object){ $addUnique_6($getEStructuralFeatures(this$static.this$01), object); } function EClassImpl$5(this$0, $anonymous2, $anonymous3){ this.this$01 = this$0; EcoreEList$UnmodifiableEList$FastCompare.call(this, $anonymous2, $anonymous3); } defineClass(1167, 328, $intern_157, EClassImpl$5); _.add_2 = function add_63(object){ return $add_29(this, castTo(object, 19)); } ; _.addUnique_0 = function addUnique_15(object){ $addUnique_9(this, castTo(object, 19)); } ; var Lorg_eclipse_emf_ecore_impl_EClassImpl$5_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EClassImpl/5', 1167); function EClassImpl$6(){ } defineClass(1169, 506, $intern_141, EClassImpl$6); _.newData = function newData_9(capacity){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EOperation_2_classLit, $intern_155, 62, capacity, 0, 1); } ; _.useEquals = function useEquals_8(){ return false; } ; var Lorg_eclipse_emf_ecore_impl_EClassImpl$6_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EClassImpl/6', 1169); function EClassImpl$7(){ } defineClass(1170, 506, $intern_141, EClassImpl$7); _.newData = function newData_10(capacity){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EReference_2_classLit, $intern_154, 19, capacity, 0, 1); } ; _.useEquals = function useEquals_9(){ return false; } ; var Lorg_eclipse_emf_ecore_impl_EClassImpl$7_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EClassImpl/7', 1170); defineClass(2095, 2094, {3:1, 4:1, 20:1, 31:1, 56:1, 16:1, 15:1, 70:1, 61:1, 71:1}); _.addAllUnique = function addAllUnique_13(index_0, collection){ return $addAllUnique_2(this, index_0, collection); } ; _.addAllUnique_0 = function addAllUnique_14(collection){ return $addAllUnique_2(this, this.delegateSize(), collection); } ; _.addUnique = function addUnique_16(index_0, object){ $addUnique_3(this, index_0, object); } ; _.addUnique_0 = function addUnique_17(object){ $addUnique_4(this, object); } ; _.basicAdd = function basicAdd_2(object, notifications){ return $basicAdd(this, object, notifications); } ; _.basicRemove = function basicRemove_2(object, notifications){ return $basicRemove(this, object, notifications); } ; _.setUnique = function setUnique_6(index_0, object){ return $setUnique_0(this, index_0, object); } ; _.basicGet = function basicGet_3(index_0){ return this.delegateGet(index_0); } ; _.basicIterator = function basicIterator_4(){ return new AbstractEList$NonResolvingEIterator(this); } ; _.basicList = function basicList_0(){ return this.delegateBasicList(); } ; _.basicListIterator = function basicListIterator_9(){ return new AbstractEList$NonResolvingEListIterator(this); } ; _.basicListIterator_0 = function basicListIterator_10(index_0){ return $basicListIterator(this, index_0); } ; var Lorg_eclipse_emf_ecore_util_DelegatingNotifyingInternalEListImpl_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'DelegatingNotifyingInternalEListImpl', 2095); function $resolve_1(this$static, index_0, object){ var internalEObject, internalEObject0, notificationChain, resolved; if (this$static.isEObject() && this$static.hasProxies()) { resolved = $resolveProxy(this$static, castTo(object, 58)); if (maskUndefined(resolved) !== maskUndefined(object)) { this$static.delegateGet(index_0); this$static.delegateSet(index_0, $validate_1(this$static, index_0, resolved)); if (this$static.isContainment()) { notificationChain = (internalEObject0 = castTo(object, 54) , this$static.hasNavigableInverse()?this$static.hasInstanceClass()?internalEObject0.eInverseRemove(this$static.owner, $getEOpposite(castTo($getEStructuralFeature($eClass(this$static.owner), this$static.getFeatureID_0()), 19)).featureID, castTo($getEStructuralFeature($eClass(this$static.owner), this$static.getFeatureID_0()).getEType(), 29).getInstanceClass(), null):internalEObject0.eInverseRemove(this$static.owner, $getFeatureID(internalEObject0.eClass_0(), $getEOpposite(castTo($getEStructuralFeature($eClass(this$static.owner), this$static.getFeatureID_0()), 19))), null, null):internalEObject0.eInverseRemove(this$static.owner, -1 - this$static.getFeatureID_0(), null, null)); !castTo(resolved, 54).eInternalContainer() && (notificationChain = (internalEObject = castTo(resolved, 54) , this$static.hasNavigableInverse()?this$static.hasInstanceClass()?internalEObject.eInverseAdd(this$static.owner, $getEOpposite(castTo($getEStructuralFeature($eClass(this$static.owner), this$static.getFeatureID_0()), 19)).featureID, castTo($getEStructuralFeature($eClass(this$static.owner), this$static.getFeatureID_0()).getEType(), 29).getInstanceClass(), notificationChain):internalEObject.eInverseAdd(this$static.owner, $getFeatureID(internalEObject.eClass_0(), $getEOpposite(castTo($getEStructuralFeature($eClass(this$static.owner), this$static.getFeatureID_0()), 19))), null, notificationChain):internalEObject.eInverseAdd(this$static.owner, -1 - this$static.getFeatureID_0(), null, notificationChain))); !!notificationChain && notificationChain.dispatch_0(); } $eNotificationRequired(this$static.owner) && this$static.dispatchNotification(this$static.createNotification(9, object, resolved, index_0, false)); return resolved; } } return object; } function $resolveProxy(this$static, eObject){ return eObject.eIsProxy()?$eResolveProxy(this$static.owner, castTo(eObject, 54)):eObject; } function $validate_1(this$static, index_0, object){ $validate(this$static, object); if (object != null && !this$static.isInstance(object)) { throw toJs(new ArrayStoreException); } return object; } function DelegatingEcoreEList(owner){ this.owner = owner; } defineClass(756, 2095, $intern_159); _.canContainNull = function canContainNull_3(){ var eClassifier; eClassifier = $getEStructuralFeature($eClass(this.owner), this.getFeatureID_0()).getEType(); return instanceOf(eClassifier, 156) && !instanceOf(eClassifier, 469) && (eClassifier.getInstanceClass().modifiers & 1) == 0; } ; _.contains = function contains_64(object){ var containedEObject, eContainer, eObject, i, opposite, result, result0, size_0; if (this.isEObject()) { size_0 = this.delegateSize(); if (size_0 > 4) { if (this.isInstance(object)) { if (this.isContainment()) { eObject = castTo(object, 54); eContainer = eObject.eContainer_0(); result0 = eContainer == this.owner && (this.hasNavigableInverse()?eObject.eBaseStructuralFeatureID(eObject.eContainerFeatureID_0(), castTo($getEStructuralFeature($eClass(this.owner), this.getFeatureID_0()).getEType(), 29).getInstanceClass()) == $getEOpposite(castTo($getEStructuralFeature($eClass(this.owner), this.getFeatureID_0()), 19)).featureID:-1 - eObject.eContainerFeatureID_0() == this.getFeatureID_0()); if (this.hasProxies() && !result0 && !eContainer && !!eObject.eDirectResource()) { for (i = 0; i < size_0; ++i) { containedEObject = $resolveProxy(this, this.delegateGet(i)); if (maskUndefined(containedEObject) === maskUndefined(object)) { return true; } } } return result0; } else if (this.hasNavigableInverse() && !this.hasManyInverse()) { opposite = castTo(object, 58).eGet_0($getEOpposite(castTo($getEStructuralFeature($eClass(this.owner), this.getFeatureID_0()), 19))); if (maskUndefined(opposite) === maskUndefined(this.owner)) { return true; } else if (opposite == null || !castTo(opposite, 58).eIsProxy()) { return false; } } } else { return false; } } result = this.delegateContains(object); if (this.hasProxies() && !result) { for (i = 0; i < size_0; ++i) { eObject = $resolveProxy(this, this.delegateGet(i)); if (maskUndefined(eObject) === maskUndefined(object)) { return true; } } } return result; } else { return this.delegateContains(object); } } ; _.createNotification = function createNotification_3(eventType, oldObject, newObject, index_0, wasSet){ return new ENotificationImpl_3(this.owner, eventType, this.getFeatureID_0(), oldObject, newObject, index_0, wasSet); } ; _.dispatchNotification = function dispatchNotification_2(notification){ $eNotify(this.owner, notification); } ; _.get_6 = function get_65(resolve){ return this; } ; _.getFeature = function getFeature_5(){ return $getEStructuralFeature($eClass(this.owner), this.getFeatureID_0()); } ; _.getFeatureID_0 = function getFeatureID_8(){ return $getFeatureID($eClass(this.owner), $getEStructuralFeature($eClass(this.owner), this.getFeatureID_0())); } ; _.getNotifier = function getNotifier_5(){ return this.owner; } ; _.hasInstanceClass = function hasInstanceClass_0(){ return !!$getEStructuralFeature($eClass(this.owner), this.getFeatureID_0()).getEType().getInstanceClass(); } ; _.hasInverse = function hasInverse_3(){ var eReference, eStructuralFeature; eStructuralFeature = $getEStructuralFeature($eClass(this.owner), this.getFeatureID_0()); if (instanceOf(eStructuralFeature, 102)) { eReference = castTo(eStructuralFeature, 19); return (eReference.eFlags & $intern_138) != 0 || !!$getEOpposite(castTo(eStructuralFeature, 19)); } else { return false; } } ; _.hasManyInverse = function hasManyInverse_0(){ var eReference, eStructuralFeature, oppositeEReference, upper; eStructuralFeature = $getEStructuralFeature($eClass(this.owner), this.getFeatureID_0()); if (instanceOf(eStructuralFeature, 102)) { eReference = castTo(eStructuralFeature, 19); oppositeEReference = $getEOpposite(eReference); return !!oppositeEReference && (upper = oppositeEReference.upperBound , upper > 1 || upper == -1); } else { return false; } } ; _.hasNavigableInverse = function hasNavigableInverse_1(){ var eReference, eStructuralFeature, oppositeEReference; eStructuralFeature = $getEStructuralFeature($eClass(this.owner), this.getFeatureID_0()); if (instanceOf(eStructuralFeature, 102)) { eReference = castTo(eStructuralFeature, 19); oppositeEReference = $getEOpposite(eReference); return !!oppositeEReference; } else { return false; } } ; _.hasProxies = function hasProxies_0(){ var eReference, eStructuralFeature; eStructuralFeature = $getEStructuralFeature($eClass(this.owner), this.getFeatureID_0()); if (instanceOf(eStructuralFeature, 102)) { eReference = castTo(eStructuralFeature, 19); return (eReference.eFlags & $intern_64) != 0; } else { return false; } } ; _.indexOf_0 = function indexOf_17(object){ var eObject, i, index_0, size_0; index_0 = this.delegateIndexOf(object); if (index_0 >= 0) return index_0; if (this.isEObject()) { for (i = 0 , size_0 = this.delegateSize(); i < size_0; ++i) { eObject = $resolveProxy(this, this.delegateGet(i)); if (maskUndefined(eObject) === maskUndefined(object)) { return i; } } } return -1; } ; _.inverseAdd = function inverseAdd_2(object, notifications){ var internalEObject; return internalEObject = castTo(object, 54) , this.hasNavigableInverse()?this.hasInstanceClass()?internalEObject.eInverseAdd(this.owner, $getEOpposite(castTo($getEStructuralFeature($eClass(this.owner), this.getFeatureID_0()), 19)).featureID, castTo($getEStructuralFeature($eClass(this.owner), this.getFeatureID_0()).getEType(), 29).getInstanceClass(), notifications):internalEObject.eInverseAdd(this.owner, $getFeatureID(internalEObject.eClass_0(), $getEOpposite(castTo($getEStructuralFeature($eClass(this.owner), this.getFeatureID_0()), 19))), null, notifications):internalEObject.eInverseAdd(this.owner, -1 - this.getFeatureID_0(), null, notifications); } ; _.inverseRemove = function inverseRemove_2(object, notifications){ var internalEObject; return internalEObject = castTo(object, 54) , this.hasNavigableInverse()?this.hasInstanceClass()?internalEObject.eInverseRemove(this.owner, $getEOpposite(castTo($getEStructuralFeature($eClass(this.owner), this.getFeatureID_0()), 19)).featureID, castTo($getEStructuralFeature($eClass(this.owner), this.getFeatureID_0()).getEType(), 29).getInstanceClass(), notifications):internalEObject.eInverseRemove(this.owner, $getFeatureID(internalEObject.eClass_0(), $getEOpposite(castTo($getEStructuralFeature($eClass(this.owner), this.getFeatureID_0()), 19))), null, notifications):internalEObject.eInverseRemove(this.owner, -1 - this.getFeatureID_0(), null, notifications); } ; _.isContainment = function isContainment_3(){ var eReference, eStructuralFeature; eStructuralFeature = $getEStructuralFeature($eClass(this.owner), this.getFeatureID_0()); if (instanceOf(eStructuralFeature, 102)) { eReference = castTo(eStructuralFeature, 19); return (eReference.eFlags & $intern_138) != 0; } else { return false; } } ; _.isEObject = function isEObject_1(){ return instanceOf($getEStructuralFeature($eClass(this.owner), this.getFeatureID_0()).getEType(), 90); } ; _.isInstance = function isInstance_2(object){ return $getEStructuralFeature($eClass(this.owner), this.getFeatureID_0()).getEType().isInstance(object); } ; _.isNotificationRequired = function isNotificationRequired_2(){ return $eNotificationRequired(this.owner); } ; _.isSet_0 = function isSet_7(){ return !this.delegateIsEmpty(); } ; _.isUnique = function isUnique_4(){ return $getEStructuralFeature($eClass(this.owner), this.getFeatureID_0()).isUnique(); } ; _.resolve = function resolve_3(index_0, object){ return $resolve_1(this, index_0, object); } ; _.set_1 = function set_33(newValue){ $clear_12(this); $addAll_9(this, castTo(newValue, 15)); } ; _.toArray = function toArray_40(){ var i; if (this.hasProxies()) { for (i = this.delegateSize() - 1; i >= 0; --i) { $resolve_1(this, i, this.delegateGet(i)); } } return this.delegateToArray(); } ; _.toArray_0 = function toArray_41(array){ var i; if (this.hasProxies()) { for (i = this.delegateSize() - 1; i >= 0; --i) { $resolve_1(this, i, this.delegateGet(i)); } } return this.delegateToArray_0(array); } ; _.unset = function unset_5(){ $clear_12(this); } ; _.validate = function validate_1(index_0, object){ return $validate_1(this, index_0, object); } ; var Lorg_eclipse_emf_ecore_util_DelegatingEcoreEList_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'DelegatingEcoreEList', 756); function $delegateAdd(this$static, index_0, eClass){ $add_20($getEGenericSuperTypes(this$static.this$01), index_0, $wrap_0(eClass)); } function $delegateAdd_0(this$static, eClass){ $add_21($getEGenericSuperTypes(this$static.this$01), $wrap_0(eClass)); } function $delegateContains(this$static, object){ var eClass, eClass$iterator; for (eClass$iterator = new AbstractEList$EIterator(this$static); eClass$iterator.cursor != eClass$iterator.this$01_2.size_1();) { eClass = castTo($doNext(eClass$iterator), 29); if (maskUndefined(object) === maskUndefined(eClass)) { return true; } } return false; } function $delegateSet(this$static, index_0, eClass){ var eGenericType, result, result0; eGenericType = castTo($get_20($getEGenericSuperTypes(this$static.this$01), index_0), 89); result0 = (result = eGenericType.eRawType , instanceOf(result, 90)?castTo(result, 29):($clinit_EcorePackage$Literals() , EOBJECT)); ((result0.eFlags_0 & 64) != 0?$eResolveProxy(this$static.owner, result0):result0) == eClass?$getERawType(eGenericType):$setEClassifier(eGenericType, eClass); return result0; } function $wrap_0(eClass){ var eGenericType, eGenericType0; eGenericType0 = ($clinit_EcoreFactory() , eGenericType = new EGenericTypeImpl , eGenericType); $setEClassifier(eGenericType0, eClass); return eGenericType0; } function EClassImpl$8(this$0, $anonymous0){ this.this$01 = this$0; DelegatingEcoreEList.call(this, $anonymous0); } defineClass(1171, 756, $intern_159, EClassImpl$8); _.delegateAdd = function delegateAdd_1(index_0, eClass){ $delegateAdd(this, index_0, castTo(eClass, 29)); } ; _.delegateAdd_0 = function delegateAdd_2(eClass){ $delegateAdd_0(this, castTo(eClass, 29)); } ; _.delegateGet = function delegateGet_0(index_0){ var eGenericType, result; return eGenericType = castTo($get_20($getEGenericSuperTypes(this.this$01), index_0), 89) , result = eGenericType.eRawType , instanceOf(result, 90)?castTo(result, 29):($clinit_EcorePackage$Literals() , EOBJECT); } ; _.delegateRemove = function delegateRemove_0(index_0){ var eGenericType, result; return eGenericType = castTo($remove_35($getEGenericSuperTypes(this.this$01), index_0), 89) , result = eGenericType.eRawType , instanceOf(result, 90)?castTo(result, 29):($clinit_EcorePackage$Literals() , EOBJECT); } ; _.delegateSet = function delegateSet_0(index_0, eClass){ return $delegateSet(this, index_0, castTo(eClass, 29)); } ; _.canContainNull = function canContainNull_4(){ return false; } ; _.createNotification = function createNotification_4(eventType, oldObject, newObject, index_0, wasSet){ return null; } ; _.delegateBasicList = function delegateBasicList_0(){ return new EClassImpl$8$1(this); } ; _.delegateClear = function delegateClear_0(){ $clear_13($getEGenericSuperTypes(this.this$01)); } ; _.delegateContains = function delegateContains_0(object){ return $delegateContains(this, object); } ; _.delegateContainsAll = function delegateContainsAll_0(collection){ var object, object$iterator; for (object$iterator = collection.iterator_0(); object$iterator.hasNext_0();) { object = object$iterator.next_1(); if (!$delegateContains(this, object)) { return false; } } return true; } ; _.delegateEquals = function delegateEquals_0(object){ var i, j, list; if (instanceOf(object, 15)) { list = castTo(object, 15); if (list.size_1() == $getEGenericSuperTypes(this.this$01).size_0) { for (i = list.iterator_0() , j = new AbstractEList$EIterator(this); i.hasNext_0();) { if (maskUndefined(i.next_1()) !== maskUndefined($doNext(j))) { return false; } } return true; } } return false; } ; _.delegateHashCode = function delegateHashCode_0(){ var eGenericType, eGenericType$iterator, hashCode, object, result; hashCode = 1; for (eGenericType$iterator = new AbstractEList$EIterator($getEGenericSuperTypes(this.this$01)); eGenericType$iterator.cursor != eGenericType$iterator.this$01_2.size_1();) { eGenericType = castTo($doNext(eGenericType$iterator), 89); object = (result = eGenericType.eRawType , instanceOf(result, 90)?castTo(result, 29):($clinit_EcorePackage$Literals() , EOBJECT)); hashCode = 31 * hashCode + (!object?0:getObjectIdentityHashCode(object)); } return hashCode; } ; _.delegateIndexOf = function delegateIndexOf_0(object){ var eGenericType, eGenericType$iterator, index_0, result; index_0 = 0; for (eGenericType$iterator = new AbstractEList$EIterator($getEGenericSuperTypes(this.this$01)); eGenericType$iterator.cursor != eGenericType$iterator.this$01_2.size_1();) { eGenericType = castTo($doNext(eGenericType$iterator), 89); if (maskUndefined(object) === maskUndefined((result = eGenericType.eRawType , instanceOf(result, 90)?castTo(result, 29):($clinit_EcorePackage$Literals() , EOBJECT)))) { return index_0; } ++index_0; } return -1; } ; _.delegateIsEmpty = function delegateIsEmpty_0(){ return $getEGenericSuperTypes(this.this$01).size_0 == 0; } ; _.delegateList_1 = function delegateList_2(){ return null; } ; _.delegateSize = function delegateSize_0(){ return $getEGenericSuperTypes(this.this$01).size_0; } ; _.delegateToArray = function delegateToArray_1(){ var eGenericType, eGenericType$iterator, index_0, result, result0, size_0; size_0 = $getEGenericSuperTypes(this.this$01).size_0; result0 = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, size_0, 5, 1); index_0 = 0; for (eGenericType$iterator = new AbstractEList$EIterator($getEGenericSuperTypes(this.this$01)); eGenericType$iterator.cursor != eGenericType$iterator.this$01_2.size_1();) { eGenericType = castTo($doNext(eGenericType$iterator), 89); result0[index_0++] = (result = eGenericType.eRawType , instanceOf(result, 90)?castTo(result, 29):($clinit_EcorePackage$Literals() , EOBJECT)); } return result0; } ; _.delegateToArray_0 = function delegateToArray_2(array){ var eGenericType, eGenericType$iterator, index_0, newArray, rawType, result, size_0; size_0 = $getEGenericSuperTypes(this.this$01).size_0; if (array.length < size_0) { newArray = newInstance_11(getClass__Ljava_lang_Class___devirtual$(array).componentType, size_0); array = newArray; } array.length > size_0 && setCheck(array, size_0, null); index_0 = 0; for (eGenericType$iterator = new AbstractEList$EIterator($getEGenericSuperTypes(this.this$01)); eGenericType$iterator.cursor != eGenericType$iterator.this$01_2.size_1();) { eGenericType = castTo($doNext(eGenericType$iterator), 89); rawType = (result = eGenericType.eRawType , instanceOf(result, 90)?castTo(result, 29):($clinit_EcorePackage$Literals() , EOBJECT)); setCheck(array, index_0++, rawType); } return array; } ; _.delegateToString = function delegateToString_0(){ var eGenericSuperTypes, i, result, size_0, stringBuffer; stringBuffer = new StringBuffer; stringBuffer.string += '['; eGenericSuperTypes = $getEGenericSuperTypes(this.this$01); for (i = 0 , size_0 = $getEGenericSuperTypes(this.this$01).size_0; i < size_0;) { $append_3(stringBuffer, valueOf_6((result = castTo($get_20(eGenericSuperTypes, i), 89).eRawType , instanceOf(result, 90)?castTo(result, 29):($clinit_EcorePackage$Literals() , EOBJECT)))); ++i < size_0 && (stringBuffer.string += ', ' , stringBuffer); } stringBuffer.string += ']'; return stringBuffer.string; } ; _.dispatchNotification = function dispatchNotification_3(notification){ } ; _.getFeatureID_0 = function getFeatureID_9(){ return 10; } ; _.hasInstanceClass = function hasInstanceClass_1(){ return true; } ; _.hasInverse = function hasInverse_4(){ return false; } ; _.hasManyInverse = function hasManyInverse_1(){ return false; } ; _.hasNavigableInverse = function hasNavigableInverse_2(){ return false; } ; _.hasProxies = function hasProxies_1(){ return true; } ; _.isContainment = function isContainment_4(){ return false; } ; _.isEObject = function isEObject_2(){ return true; } ; _.isInstance = function isInstance_3(object){ return instanceOf(object, 90); } ; _.isSet_0 = function isSet_8(){ return $isSetESuperTypes(this.this$01); } ; _.isUnique = function isUnique_5(){ return true; } ; _.useEquals = function useEquals_10(){ return true; } ; var Lorg_eclipse_emf_ecore_impl_EClassImpl$8_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EClassImpl/8', 1171); function EClassImpl$8$1(this$1){ this.this$11 = this$1; } defineClass(1172, 2062, $intern_38, EClassImpl$8$1); _.listIterator_1 = function listIterator_29(index_0){ return $basicListIterator(this.this$11, index_0); } ; _.size_1 = function size_76(){ return $getEGenericSuperTypes(this.this$11.this$01).size_0; } ; var Lorg_eclipse_emf_ecore_impl_EClassImpl$8$1_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EClassImpl/8/1', 1172); function EClassImpl$9(){ } defineClass(1173, 506, $intern_141, EClassImpl$9); _.newData = function newData_11(capacity){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EClassifier_2_classLit, $intern_2, 142, capacity, 0, 1); } ; _.useEquals = function useEquals_11(){ return false; } ; var Lorg_eclipse_emf_ecore_impl_EClassImpl$9_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EClassImpl/9', 1173); function EClassImpl$MyHashSet(){ HashSet.call(this); } defineClass(1160, 49, $intern_77, EClassImpl$MyHashSet); var Lorg_eclipse_emf_ecore_impl_EClassImpl$MyHashSet_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EClassImpl/MyHashSet', 1160); function $setSerializable(this$static, newSerializable){ var oldSerializable; oldSerializable = (this$static.eFlags & 256) != 0; newSerializable?(this$static.eFlags |= 256):(this$static.eFlags &= -257); (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_4(this$static, 1, 8, oldSerializable, newSerializable)); } function EDataTypeImpl(){ this.eFlags |= 256; } defineClass(577, 364, {110:1, 94:1, 93:1, 142:1, 156:1, 847:1, 155:1, 197:1, 58:1, 114:1, 54:1, 99:1, 364:1, 158:1, 119:1, 120:1, 691:1}, EDataTypeImpl); _.eGet = function eGet_23(featureID, resolve, coreType){ var eClass; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , this.eAnnotations; case 1: return this.name_0; case 2: return this.instanceClassName != null?this.instanceClassName:this.generatedInstanceClassName; case 3: return $getInstanceClass(this); case 4: return this.getDefaultValue(); case 5: return this.instanceTypeName; case 6: if (resolve) return $getEPackage(this); return $basicGetEPackage(this); case 7: return !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 7)) , this.eTypeParameters; case 8: return $clinit_Boolean() , (this.eFlags & 256) != 0?true:false; } return $eDynamicGet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID), resolve, coreType); } ; _.eIsSet = function eIsSet_22(featureID){ var eClass; switch (featureID) { case 0: return !!this.eAnnotations && this.eAnnotations.size_0 != 0; case 1: return this.name_0 != null; case 2: return this.instanceClassName != null && this.instanceClassName == this.instanceTypeName; case 3: return !!$getInstanceClass(this); case 4: return this.getDefaultValue() != null; case 5: return this.instanceTypeName != null && this.instanceTypeName != this.instanceClassName && this.instanceTypeName != this.generatedInstanceClassName; case 6: return !!$basicGetEPackage(this); case 7: return !!this.eTypeParameters && this.eTypeParameters.size_0 != 0; case 8: return (this.eFlags & 256) == 0; } return $eDynamicIsSet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID)); } ; _.eSet = function eSet_21(featureID, newValue){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $addAll_9(this.eAnnotations, castTo(newValue, 16)); return; case 1: $setName_1(this, castToString(newValue)); return; case 2: $setInstanceClassName(this, castToString(newValue)); return; case 5: $setInstanceTypeName(this, castToString(newValue)); return; case 7: !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 7)); $clear_13(this.eTypeParameters); !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 7)); $addAll_9(this.eTypeParameters, castTo(newValue, 16)); return; case 8: $setSerializable(this, $booleanValue(castToBoolean(newValue))); return; } $eDynamicSet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID), newValue); } ; _.eStaticClass = function eStaticClass_22(){ return $clinit_EcorePackage$Literals() , EDATA_TYPE; } ; _.eUnset = function eUnset_21(featureID){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); return; case 1: instanceOf(this.eContainer, 184) && (castTo(this.eContainer, 184).eNameToEClassifierMap = null); $setName(this, null); return; case 2: $basicSetInstanceClassName(this, null); $basicSetInstanceTypeName(this, this.instanceClassName); return; case 5: $setInstanceTypeName(this, null); return; case 7: !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 7)); $clear_13(this.eTypeParameters); return; case 8: $setSerializable(this, true); return; } $eDynamicUnset(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?this.eStaticClass():eClass), featureID)); } ; _.freeze = function freeze_5(){ $getExtendedMetaData(($clinit_ExtendedMetaData() , INSTANCE_11), this).getName(); this.eFlags |= 1; } ; _.getConversionDelegate = function getConversionDelegate(){ var conversionDelegates, eDataTypeDelegateURI, eDataTypeDelegateURI$iterator; if (!this.conversionDelegateIsSet) { conversionDelegates = getConversionDelegates($getEPackage(this)); if (!conversionDelegates.isEmpty()) { for (eDataTypeDelegateURI$iterator = conversionDelegates.iterator_0(); eDataTypeDelegateURI$iterator.hasNext_0();) { eDataTypeDelegateURI = castToString(eDataTypeDelegateURI$iterator.next_1()); !!$getEAnnotation(this, eDataTypeDelegateURI) && getConversionDelegateFactory(this); } } } return this.conversionDelegate; } ; _.getDefaultValue = function getDefaultValue_1(){ var instanceClass; if (!this.defaultValueIsSet) { instanceClass = null; try { instanceClass = $getInstanceClass(this); } catch ($e0) { $e0 = toJava($e0); if (!instanceOf($e0, 103)) throw toJs($e0); } this.defaultValue = null; !!instanceClass && (instanceClass.modifiers & 1) != 0 && (instanceClass == Z_classLit?(this.defaultValue = ($clinit_Boolean() , FALSE_0)):instanceClass == I_classLit?(this.defaultValue = valueOf_3(0)):instanceClass == F_classLit?(this.defaultValue = new Float(0)):instanceClass == D_classLit?(this.defaultValue = 0):instanceClass == J_classLit?(this.defaultValue = valueOf_4(0)):instanceClass == S_classLit?(this.defaultValue = valueOf_5(0)):instanceClass == B_classLit?(this.defaultValue = get_32(0)):(this.defaultValue = valueOf_2(0))); this.defaultValueIsSet = true; } return this.defaultValue; } ; _.isSerializable = function isSerializable_0(){ return (this.eFlags & 256) != 0; } ; _.setDataTypeGeneratedInstanceClass = function setDataTypeGeneratedInstanceClass(isGenerated){ isGenerated && (this.instanceClassName = 'org.eclipse.emf.common.util.AbstractEnumerator'); } ; _.setGeneratedInstanceClass = function setGeneratedInstanceClass_0(isGenerated){ $setGeneratedInstanceClass(this, isGenerated); this.setDataTypeGeneratedInstanceClass(isGenerated); } ; _.setInstanceClassGen = function setInstanceClassGen_0(instanceClass){ this.instanceClass = instanceClass; this.defaultValueIsSet = false; } ; _.toString_0 = function toString_151(){ var result; if ((this.eFlags_0 & 64) != 0) return $toString_30(this); result = new StringBuffer_1($toString_30(this)); result.string += ' (serializable: '; $append_4(result, (this.eFlags & 256) != 0); result.string += ')'; return result.string; } ; _.conversionDelegateIsSet = false; _.defaultValue = null; _.defaultValueIsSet = false; var Lorg_eclipse_emf_ecore_impl_EDataTypeImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EDataTypeImpl', 577); function $getDefaultValue_0(this$static){ var eLiterals; eLiterals = (!this$static.eLiterals && (this$static.eLiterals = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EEnumLiteral_2_classLit, this$static, 9, 5)) , this$static.eLiterals); if (eLiterals.size_0 != 0) { return $getInstance(castTo($get_20(eLiterals, 0), 694)); } return null; } function $getEEnumLiteralByLiteral(this$static, literal){ var eEnumLiteral, eEnumLiteral$iterator, result; if (literal == null) { for (eEnumLiteral$iterator = (!this$static.eLiterals && (this$static.eLiterals = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EEnumLiteral_2_classLit, this$static, 9, 5)) , new AbstractEList$EIterator(this$static.eLiterals)); eEnumLiteral$iterator.cursor != eEnumLiteral$iterator.this$01_2.size_1();) { eEnumLiteral = castTo($doNext(eEnumLiteral$iterator), 694); result = eEnumLiteral.literal; if ((result == null?eEnumLiteral.name_0:result) == null) { return eEnumLiteral; } } } else { for (eEnumLiteral$iterator = (!this$static.eLiterals && (this$static.eLiterals = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EEnumLiteral_2_classLit, this$static, 9, 5)) , new AbstractEList$EIterator(this$static.eLiterals)); eEnumLiteral$iterator.cursor != eEnumLiteral$iterator.this$01_2.size_1();) { eEnumLiteral = castTo($doNext(eEnumLiteral$iterator), 694); if ($equals_5(literal, (result = eEnumLiteral.literal , result == null?eEnumLiteral.name_0:result))) { return eEnumLiteral; } } } return null; } function EEnumImpl(){ EDataTypeImpl.call(this); } defineClass(469, 577, {110:1, 94:1, 93:1, 142:1, 156:1, 847:1, 685:1, 155:1, 197:1, 58:1, 114:1, 54:1, 99:1, 364:1, 469:1, 158:1, 119:1, 120:1, 691:1}, EEnumImpl); _.eGet = function eGet_24(featureID, resolve, coreType){ var eClass; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , this.eAnnotations; case 1: return this.name_0; case 2: return this.instanceClassName != null?this.instanceClassName:this.generatedInstanceClassName; case 3: return $getInstanceClass(this); case 4: return $getDefaultValue_0(this); case 5: return this.instanceTypeName; case 6: if (resolve) return $getEPackage(this); return $basicGetEPackage(this); case 7: return !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 7)) , this.eTypeParameters; case 8: return $clinit_Boolean() , (this.eFlags & 256) != 0?true:false; case 9: return !this.eLiterals && (this.eLiterals = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EEnumLiteral_2_classLit, this, 9, 5)) , this.eLiterals; } return $eDynamicGet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EENUM)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EENUM:eClass), featureID), resolve, coreType); } ; _.eInverseAdd_0 = function eInverseAdd_15(otherEnd, featureID, msgs){ var eClass, eContainerFeatureID, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicAdd_0(this.eAnnotations, otherEnd, msgs); case 6: !!this.eContainer && (msgs = (eContainerFeatureID = this.eFlags_0 >> 16 , eContainerFeatureID >= 0?$eBasicRemoveFromContainerFeature_7(this, msgs):this.eContainer.eInverseRemove(this, -1 - eContainerFeatureID, null, msgs))); return $eBasicSetContainer(this, otherEnd, 6, msgs); case 9: return !this.eLiterals && (this.eLiterals = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EEnumLiteral_2_classLit, this, 9, 5)) , $basicAdd_0(this.eLiterals, otherEnd, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , EENUM):eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseAdd(this, $eSettings_0(this), featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EENUM)), otherEnd, msgs); } ; _.eInverseRemove_0 = function eInverseRemove_17(otherEnd, featureID, msgs){ var eClass, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicRemove_0(this.eAnnotations, otherEnd, msgs); case 6: return $eBasicSetContainer(this, null, 6, msgs); case 7: return !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 7)) , $basicRemove_0(this.eTypeParameters, otherEnd, msgs); case 9: return !this.eLiterals && (this.eLiterals = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EEnumLiteral_2_classLit, this, 9, 5)) , $basicRemove_0(this.eLiterals, otherEnd, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , EENUM):eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseRemove(this, $eSettings_0(this), featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EENUM)), otherEnd, msgs); } ; _.eIsSet = function eIsSet_23(featureID){ var eClass; switch (featureID) { case 0: return !!this.eAnnotations && this.eAnnotations.size_0 != 0; case 1: return this.name_0 != null; case 2: return this.instanceClassName != null && this.instanceClassName == this.instanceTypeName; case 3: return !!$getInstanceClass(this); case 4: return !!$getDefaultValue_0(this); case 5: return this.instanceTypeName != null && this.instanceTypeName != this.instanceClassName && this.instanceTypeName != this.generatedInstanceClassName; case 6: return !!$basicGetEPackage(this); case 7: return !!this.eTypeParameters && this.eTypeParameters.size_0 != 0; case 8: return (this.eFlags & 256) == 0; case 9: return !!this.eLiterals && this.eLiterals.size_0 != 0; } return $eDynamicIsSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EENUM)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EENUM:eClass), featureID)); } ; _.eSet = function eSet_22(featureID, newValue){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $addAll_9(this.eAnnotations, castTo(newValue, 16)); return; case 1: $setName_1(this, castToString(newValue)); return; case 2: $setInstanceClassName(this, castToString(newValue)); return; case 5: $setInstanceTypeName(this, castToString(newValue)); return; case 7: !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 7)); $clear_13(this.eTypeParameters); !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 7)); $addAll_9(this.eTypeParameters, castTo(newValue, 16)); return; case 8: $setSerializable(this, $booleanValue(castToBoolean(newValue))); return; case 9: !this.eLiterals && (this.eLiterals = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EEnumLiteral_2_classLit, this, 9, 5)); $clear_13(this.eLiterals); !this.eLiterals && (this.eLiterals = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EEnumLiteral_2_classLit, this, 9, 5)); $addAll_9(this.eLiterals, castTo(newValue, 16)); return; } $eDynamicSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EENUM)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EENUM:eClass), featureID), newValue); } ; _.eStaticClass = function eStaticClass_23(){ return $clinit_EcorePackage$Literals() , EENUM; } ; _.eUnset = function eUnset_22(featureID){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); return; case 1: instanceOf(this.eContainer, 184) && (castTo(this.eContainer, 184).eNameToEClassifierMap = null); $setName(this, null); return; case 2: $basicSetInstanceClassName(this, null); $basicSetInstanceTypeName(this, this.instanceClassName); return; case 5: $setInstanceTypeName(this, null); return; case 7: !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 7)); $clear_13(this.eTypeParameters); return; case 8: $setSerializable(this, true); return; case 9: !this.eLiterals && (this.eLiterals = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EEnumLiteral_2_classLit, this, 9, 5)); $clear_13(this.eLiterals); return; } $eDynamicUnset(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EENUM)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EENUM:eClass), featureID)); } ; _.freeze = function freeze_6(){ var i, size_0; if (this.eLiterals) { for (i = 0 , size_0 = this.eLiterals.size_0; i < size_0; ++i) { $freeze($get_20(this.eLiterals, i)); } } $getExtendedMetaData(($clinit_ExtendedMetaData() , INSTANCE_11), this).getName(); this.eFlags |= 1; } ; _.getDefaultValue = function getDefaultValue_2(){ return $getDefaultValue_0(this); } ; _.isInstance = function isInstance_4(object){ if (object != null) { return true; } return false; } ; _.setDataTypeGeneratedInstanceClass = function setDataTypeGeneratedInstanceClass_0(isGenerated){ } ; var Lorg_eclipse_emf_ecore_impl_EEnumImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EEnumImpl', 469); function $eBasicRemoveFromContainerFeature_8(this$static, msgs){ var eClass, inverseFeature; if (this$static.eFlags_0 >> 16 == 5) { return this$static.eContainer.eInverseRemove(this$static, 9, Lorg_eclipse_emf_ecore_EEnum_2_classLit, msgs); } return inverseFeature = $getEOpposite(castTo($getEStructuralFeature((eClass = castTo($getField(this$static, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , EENUM_LITERAL):eClass), this$static.eFlags_0 >> 16), 19)) , this$static.eContainer.eInverseRemove(this$static, inverseFeature.featureID, inverseFeature.containerClass, msgs); } function $getInstance(this$static){ return this$static.instance?this$static.instance:this$static.generatedInstance; } function $setInstance(this$static, newInstance){ var literal, result, oldInstance; oldInstance = this$static.instance; this$static.instance = newInstance; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 3, oldInstance, this$static.instance)); if (!newInstance) { $setName(this$static, null); $setValue_1(this$static, 0); $setLiteral(this$static, null); } else if (newInstance != this$static) { $setName(this$static, newInstance.name_0); $setValue_1(this$static, newInstance.value_0); literal = (result = newInstance.literal , result == null?newInstance.name_0:result); $setLiteral(this$static, literal == null || $equals_5(literal, newInstance.name_0)?null:literal); } } function $setLiteral(this$static, newLiteral){ var oldLiteral; oldLiteral = this$static.literal; this$static.literal = newLiteral; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 4, oldLiteral, this$static.literal)); } function $setValue_1(this$static, newValue){ var oldValue; oldValue = this$static.value_0; this$static.value_0 = newValue; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_0(this$static, 2, oldValue, this$static.value_0)); } function EEnumLiteralImpl(){ this.generatedInstance = this; } defineClass(582, 448, {110:1, 94:1, 93:1, 2039:1, 694:1, 155:1, 197:1, 58:1, 114:1, 54:1, 99:1, 582:1, 158:1, 119:1, 120:1}, EEnumLiteralImpl); _.getName = function getName_6(){ return this.name_0; } ; _.eBasicRemoveFromContainerFeature = function eBasicRemoveFromContainerFeature_9(msgs){ return $eBasicRemoveFromContainerFeature_8(this, msgs); } ; _.eGet = function eGet_25(featureID, resolve, coreType){ var eClass, result; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , this.eAnnotations; case 1: return this.name_0; case 2: return valueOf_3(this.value_0); case 3: return this.instance?this.instance:this.generatedInstance; case 4: return result = this.literal , result == null?this.name_0:result; case 5: return this.eFlags_0 >> 16 == 5?castTo(this.eContainer, 685):null; } return $eDynamicGet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EENUM_LITERAL)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EENUM_LITERAL:eClass), featureID), resolve, coreType); } ; _.eInverseAdd_0 = function eInverseAdd_16(otherEnd, featureID, msgs){ var eClass, eContainerFeatureID, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicAdd_0(this.eAnnotations, otherEnd, msgs); case 5: !!this.eContainer && (msgs = (eContainerFeatureID = this.eFlags_0 >> 16 , eContainerFeatureID >= 0?$eBasicRemoveFromContainerFeature_8(this, msgs):this.eContainer.eInverseRemove(this, -1 - eContainerFeatureID, null, msgs))); return $eBasicSetContainer(this, otherEnd, 5, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , EENUM_LITERAL):eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseAdd(this, $eSettings_0(this), featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EENUM_LITERAL)), otherEnd, msgs); } ; _.eInverseRemove_0 = function eInverseRemove_18(otherEnd, featureID, msgs){ var eClass, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicRemove_0(this.eAnnotations, otherEnd, msgs); case 5: return $eBasicSetContainer(this, null, 5, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , EENUM_LITERAL):eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseRemove(this, $eSettings_0(this), featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EENUM_LITERAL)), otherEnd, msgs); } ; _.eIsSet = function eIsSet_24(featureID){ var eClass; switch (featureID) { case 0: return !!this.eAnnotations && this.eAnnotations.size_0 != 0; case 1: return this.name_0 != null; case 2: return this.value_0 != 0; case 3: return !!this.instance; case 4: return this.literal != null; case 5: return !!(this.eFlags_0 >> 16 == 5?castTo(this.eContainer, 685):null); } return $eDynamicIsSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EENUM_LITERAL)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EENUM_LITERAL:eClass), featureID)); } ; _.eSet = function eSet_23(featureID, newValue){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $addAll_9(this.eAnnotations, castTo(newValue, 16)); return; case 1: $setName(this, castToString(newValue)); return; case 2: $setValue_1(this, castTo(newValue, 17).value_0); return; case 3: $setInstance(this, castTo(newValue, 2039)); return; case 4: $setLiteral(this, castToString(newValue)); return; } $eDynamicSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EENUM_LITERAL)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EENUM_LITERAL:eClass), featureID), newValue); } ; _.eStaticClass = function eStaticClass_24(){ return $clinit_EcorePackage$Literals() , EENUM_LITERAL; } ; _.eUnset = function eUnset_23(featureID){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); return; case 1: $setName(this, null); return; case 2: $setValue_1(this, 0); return; case 3: $setInstance(this, null); return; case 4: $setLiteral(this, null); return; } $eDynamicUnset(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EENUM_LITERAL)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EENUM_LITERAL:eClass), featureID)); } ; _.toString_0 = function toString_152(){ var result; return result = this.literal , result == null?this.name_0:result; } ; _.instance = null; _.literal = null; _.value_0 = 0; var Lorg_eclipse_emf_ecore_impl_EEnumLiteralImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EEnumLiteralImpl', 582); var Lorg_eclipse_emf_ecore_impl_EFactoryImpl$InternalEDateTimeFormat_2_classLit = createForInterface('org.eclipse.emf.ecore.impl', 'EFactoryImpl/InternalEDateTimeFormat'); function $format_0(this$static, value_0){ return $format(this$static.dateTimeFormat, value_0, null); } function $parse_2(this$static, value_0){ return $parse_1(this$static.dateTimeFormat, value_0); } function EFactoryImpl$1ClientInternalEDateTimeFormat(dateTimeFormat){ this.dateTimeFormat = dateTimeFormat; } defineClass(499, 1, {2114:1}, EFactoryImpl$1ClientInternalEDateTimeFormat); var Lorg_eclipse_emf_ecore_impl_EFactoryImpl$1ClientInternalEDateTimeFormat_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EFactoryImpl/1ClientInternalEDateTimeFormat', 499); function $basicSetELowerBound(this$static, newELowerBound, msgs){ var notification, oldELowerBound; oldELowerBound = this$static.eLowerBound; this$static.eLowerBound = newELowerBound; if ((this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0) { notification = new ENotificationImpl_1(this$static, 1, 3, oldELowerBound, newELowerBound); !msgs?(msgs = notification):msgs.add_5(notification); } return msgs; } function $basicSetETypeParameter(this$static, newETypeParameter, msgs){ var notification, oldETypeParameter; oldETypeParameter = this$static.eTypeParameter; this$static.eTypeParameter = newETypeParameter; if ((this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0) { notification = new ENotificationImpl_1(this$static, 1, 4, oldETypeParameter, newETypeParameter); !msgs?(msgs = notification):msgs.add_5(notification); } oldETypeParameter != newETypeParameter && (newETypeParameter?(msgs = $setERawType(this$static, $getErasure(this$static, newETypeParameter), msgs)):(msgs = $setERawType(this$static, this$static.eClassifier, msgs))); return msgs; } function $basicSetEUpperBound(this$static, newEUpperBound, msgs){ var notification, oldEUpperBound; oldEUpperBound = this$static.eUpperBound; this$static.eUpperBound = newEUpperBound; if ((this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0) { notification = new ENotificationImpl_1(this$static, 1, 0, oldEUpperBound, newEUpperBound); !msgs?(msgs = notification):msgs.add_5(notification); } return msgs; } function $getEClassifier(this$static){ var oldEClassifier; if (!!this$static.eClassifier && this$static.eClassifier.eIsProxy()) { oldEClassifier = castTo(this$static.eClassifier, 54); this$static.eClassifier = castTo($eResolveProxy(this$static, oldEClassifier), 142); this$static.eClassifier != oldEClassifier && (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 9, 5, oldEClassifier, this$static.eClassifier)); } return this$static.eClassifier; } function $getERawType(this$static){ var newERawType, oldERawType; if (!!this$static.eRawType && this$static.eRawType.eIsProxy()) { oldERawType = castTo(this$static.eRawType, 54); this$static.eRawType = castTo($eResolveProxy(this$static, oldERawType), 142); if (this$static.eRawType != oldERawType) { (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 9, 2, oldERawType, this$static.eRawType)); if (instanceOf(this$static.eContainer, 411)) { this$static.eFlags_0 >> 16 == -15 && this$static.eContainer.eNotificationRequired() && $dispatch(new ENotificationImpl_2(this$static.eContainer, 9, 13, oldERawType, this$static.eRawType, $indexOf_6($getEGenericExceptions(castTo(this$static.eContainer, 62)), this$static))); } else if (instanceOf(this$static.eContainer, 90)) { if (this$static.eFlags_0 >> 16 == -23 && this$static.eContainer.eNotificationRequired()) { newERawType = this$static.eRawType; instanceOf(newERawType, 90) || (newERawType = ($clinit_EcorePackage$Literals() , EOBJECT)); instanceOf(oldERawType, 90) || (oldERawType = ($clinit_EcorePackage$Literals() , EOBJECT)); $dispatch(new ENotificationImpl_2(this$static.eContainer, 9, 10, oldERawType, newERawType, $indexOf_6($getEGenericSuperTypes(castTo(this$static.eContainer, 29)), this$static))); } } } } return this$static.eRawType; } function $getETypeArguments(this$static){ !this$static.eTypeArguments && (this$static.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, this$static, 1)); return this$static.eTypeArguments; } function $getErasure(this$static, eTypeParameter){ var eBound, eBound$iterator, eRawType, needEClass, needEDataType; if (!eTypeParameter) { return null; } else { needEClass = instanceOf(this$static.eContainer, 90) || instanceOf(this$static.eContainer, 102); needEDataType = !needEClass && instanceOf(this$static.eContainer, 331); for (eBound$iterator = new AbstractEList$EIterator((!eTypeParameter.eBounds && (eTypeParameter.eBounds = new ETypeParameterImpl$1(eTypeParameter, Lorg_eclipse_emf_ecore_EGenericType_2_classLit, eTypeParameter)) , eTypeParameter.eBounds)); eBound$iterator.cursor != eBound$iterator.this$01_2.size_1();) { eBound = castTo($doNext(eBound$iterator), 89); eRawType = $getERawType(eBound); if (needEClass?instanceOf(eRawType, 90):needEDataType?instanceOf(eRawType, 156):!!eRawType) { return eRawType; } } return needEClass?($clinit_EcorePackage$Literals() , EOBJECT):($clinit_EcorePackage$Literals() , EJAVA_OBJECT); } } function $setEClassifier(this$static, newEClassifier){ var msgs, oldEClassifier; oldEClassifier = this$static.eClassifier; msgs = $setEClassifier_0(this$static, newEClassifier, null); oldEClassifier != newEClassifier && !this$static.eTypeParameter && (msgs = $setERawType(this$static, newEClassifier, msgs)); !!msgs && msgs.dispatch_0(); } function $setEClassifier_0(this$static, newEClassifier, msgs){ var notification, oldEClassifier; oldEClassifier = this$static.eClassifier; this$static.eClassifier = newEClassifier; if ((this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0) { notification = new ENotificationImpl_1(this$static, 1, 5, oldEClassifier, this$static.eClassifier); !msgs?(msgs = notification):$add_22(msgs, notification); } return msgs; } function $setELowerBound(this$static, newELowerBound){ var msgs; if (newELowerBound != this$static.eLowerBound) { msgs = null; !!this$static.eLowerBound && (msgs = $eInverseRemove(this$static.eLowerBound, this$static, -4, msgs)); !!newELowerBound && (msgs = $eInverseAdd(newELowerBound, this$static, -4, msgs)); msgs = $basicSetELowerBound(this$static, newELowerBound, msgs); !!msgs && msgs.dispatch_0(); } else (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 3, newELowerBound, newELowerBound)); } function $setERawType(this$static, newERawType, msgs){ var delegateIterator, eGenericType, eGenericType$iterator, eGenericTypes, eTypeParameter, notification, oldERawType; oldERawType = this$static.eRawType; !newERawType && (newERawType = eJavaObject); this$static.eRawType = newERawType; if ((this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0) { notification = new ENotificationImpl_1(this$static, 1, 2, oldERawType, this$static.eRawType); !msgs?(msgs = notification):msgs.add_5(notification); } if (oldERawType != newERawType) { if (instanceOf(this$static.eContainer, 292)) { if (this$static.eFlags_0 >> 16 == -10) { msgs = castTo(this$static.eContainer, 292).setEType(newERawType, msgs); } else if (this$static.eFlags_0 >> 16 == -15) { !newERawType && (newERawType = ($clinit_EcorePackage$Literals() , EJAVA_OBJECT)); !oldERawType && (oldERawType = ($clinit_EcorePackage$Literals() , EJAVA_OBJECT)); if (this$static.eContainer.eNotificationRequired()) { notification = new ENotificationImpl_3(this$static.eContainer, 1, 13, oldERawType, newERawType, $indexOf_6($getEGenericExceptions(castTo(this$static.eContainer, 62)), this$static), false); !msgs?(msgs = notification):msgs.add_5(notification); } } } else if (instanceOf(this$static.eContainer, 90)) { if (this$static.eFlags_0 >> 16 == -23) { instanceOf(newERawType, 90) || (newERawType = ($clinit_EcorePackage$Literals() , EOBJECT)); instanceOf(oldERawType, 90) || (oldERawType = ($clinit_EcorePackage$Literals() , EOBJECT)); if (this$static.eContainer.eNotificationRequired()) { notification = new ENotificationImpl_3(this$static.eContainer, 1, 10, oldERawType, newERawType, $indexOf_6($getEGenericSuperTypes(castTo(this$static.eContainer, 29)), this$static), false); !msgs?(msgs = notification):msgs.add_5(notification); } } } else if (instanceOf(this$static.eContainer, 457)) { eTypeParameter = castTo(this$static.eContainer, 850); eGenericTypes = (!eTypeParameter.eGenericTypes && (eTypeParameter.eGenericTypes = new ETypeParameterImpl$2$1(new ETypeParameterImpl$2)) , eTypeParameter.eGenericTypes); for (eGenericType$iterator = (delegateIterator = new AbstractHashMap$EntrySetIterator((new AbstractHashMap$EntrySet(eGenericTypes.this$11)).this$01) , new ETypeParameterImpl$2$1$1(delegateIterator)); eGenericType$iterator.val$delegateIterator2.hasNext;) { eGenericType = castTo($next_3(eGenericType$iterator.val$delegateIterator2).getKey(), 89); msgs = $setERawType(eGenericType, $getErasure(eGenericType, eTypeParameter), msgs); } } } return msgs; } function $setETypeParameter(this$static, newETypeParameter){ var msgs; if (newETypeParameter != this$static.eTypeParameter) { !!this$static.eTypeParameter && $remove_42($getEGenericTypes(this$static.eTypeParameter), this$static); !!newETypeParameter && (!newETypeParameter.eGenericTypes && (newETypeParameter.eGenericTypes = new ETypeParameterImpl$2$1(new ETypeParameterImpl$2)) , $add_30(newETypeParameter.eGenericTypes, this$static)); msgs = $basicSetETypeParameter(this$static, newETypeParameter, null); !!msgs && msgs.dispatch_0(); } else (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 4, newETypeParameter, newETypeParameter)); } function $setEUpperBound(this$static, newEUpperBound){ var msgs; if (newEUpperBound != this$static.eUpperBound) { msgs = null; !!this$static.eUpperBound && (msgs = $eInverseRemove(this$static.eUpperBound, this$static, -1, msgs)); !!newEUpperBound && (msgs = $eInverseAdd(newEUpperBound, this$static, -1, msgs)); msgs = $basicSetEUpperBound(this$static, newEUpperBound, msgs); !!msgs && msgs.dispatch_0(); } else (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 0, newEUpperBound, newEUpperBound)); } function $toString_32(this$static, result){ var eTypeArgument, eTypeArgument$iterator, first, index_0, instanceTypeName, label_0, tail; if (this$static.eClassifier) { label_0 = this$static.eClassifier.getName(); tail = null; if (label_0 != null) { result.string += '' + label_0; } else { instanceTypeName = this$static.eClassifier.getInstanceTypeName(); if (instanceTypeName != null) { index_0 = $indexOf_1(instanceTypeName, fromCodePoint(91)); if (index_0 != -1) { tail = (checkCriticalStringElementIndex(index_0, instanceTypeName.length + 1) , instanceTypeName.substr(index_0)); result.string += '' + $substring_1(instanceTypeName == null?'null':(checkCriticalNotNull(instanceTypeName) , instanceTypeName), 0, index_0); } else { result.string += '' + instanceTypeName; } } } if (!!this$static.eTypeArguments && this$static.eTypeArguments.size_0 != 0) { first = true; result.string += '<'; for (eTypeArgument$iterator = new AbstractEList$EIterator(this$static.eTypeArguments); eTypeArgument$iterator.cursor != eTypeArgument$iterator.this$01_2.size_1();) { eTypeArgument = castTo($doNext(eTypeArgument$iterator), 89); first?(first = false):(result.string += ', ' , result); $toString_32(eTypeArgument, result); } result.string += '>'; } tail != null && (result.string += '' + tail , result); } else if (this$static.eTypeParameter) { label_0 = this$static.eTypeParameter.name_0; label_0 != null && (result.string += '' + label_0 , result); } else { result.string += '?'; if (this$static.eLowerBound) { result.string += ' super '; $toString_32(this$static.eLowerBound, result); } else { if (this$static.eUpperBound) { result.string += ' extends '; $toString_32(this$static.eUpperBound, result); } } } } function EGenericTypeImpl(){ this.eRawType = eJavaObject; } defineClass(248, 120, {110:1, 94:1, 93:1, 89:1, 58:1, 114:1, 54:1, 99:1, 248:1, 119:1, 120:1}, EGenericTypeImpl); _.eBasicSetContainer_0 = function eBasicSetContainer_6(newContainer, newContainerFeatureID, msgs){ var newERawType; msgs = $eBasicSetContainer(this, newContainer, newContainerFeatureID, msgs); if (!!this.eTypeParameter && instanceOf(newContainer, 179)) { newERawType = $getErasure(this, this.eTypeParameter); newERawType != this.eRawType && (msgs = $setERawType(this, newERawType, msgs)); } return msgs; } ; _.eGet = function eGet_26(featureID, resolve, coreType){ var eClass; switch (featureID) { case 0: return this.eUpperBound; case 1: return !this.eTypeArguments && (this.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, this, 1)) , this.eTypeArguments; case 2: if (resolve) return $getERawType(this); return this.eRawType; case 3: return this.eLowerBound; case 4: return this.eTypeParameter; case 5: if (resolve) return $getEClassifier(this); return this.eClassifier; } return $eDynamicGet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EGENERIC_TYPE)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EGENERIC_TYPE:eClass), featureID), resolve, coreType); } ; _.eInverseRemove_0 = function eInverseRemove_19(otherEnd, featureID, msgs){ var eClass, feature; switch (featureID) { case 0: return $basicSetEUpperBound(this, null, msgs); case 1: return !this.eTypeArguments && (this.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, this, 1)) , $basicRemove_0(this.eTypeArguments, otherEnd, msgs); case 3: return $basicSetELowerBound(this, null, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , EGENERIC_TYPE):eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseRemove(this, $eSettings_0(this), featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EGENERIC_TYPE)), otherEnd, msgs); } ; _.eIsSet = function eIsSet_25(featureID){ var eClass; switch (featureID) { case 0: return !!this.eUpperBound; case 1: return !!this.eTypeArguments && this.eTypeArguments.size_0 != 0; case 2: return !!this.eRawType; case 3: return !!this.eLowerBound; case 4: return !!this.eTypeParameter; case 5: return !!this.eClassifier; } return $eDynamicIsSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EGENERIC_TYPE)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EGENERIC_TYPE:eClass), featureID)); } ; _.eSet = function eSet_24(featureID, newValue){ var eClass; switch (featureID) { case 0: $setEUpperBound(this, castTo(newValue, 89)); return; case 1: !this.eTypeArguments && (this.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, this, 1)); $clear_13(this.eTypeArguments); !this.eTypeArguments && (this.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, this, 1)); $addAll_9(this.eTypeArguments, castTo(newValue, 16)); return; case 3: $setELowerBound(this, castTo(newValue, 89)); return; case 4: $setETypeParameter(this, castTo(newValue, 850)); return; case 5: $setEClassifier(this, castTo(newValue, 142)); return; } $eDynamicSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EGENERIC_TYPE)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EGENERIC_TYPE:eClass), featureID), newValue); } ; _.eStaticClass = function eStaticClass_25(){ return $clinit_EcorePackage$Literals() , EGENERIC_TYPE; } ; _.eUnset = function eUnset_24(featureID){ var eClass; switch (featureID) { case 0: $setEUpperBound(this, null); return; case 1: !this.eTypeArguments && (this.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, this, 1)); $clear_13(this.eTypeArguments); return; case 3: $setELowerBound(this, null); return; case 4: $setETypeParameter(this, null); return; case 5: $setEClassifier(this, null); return; } $eDynamicUnset(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EGENERIC_TYPE)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EGENERIC_TYPE:eClass), featureID)); } ; _.toString_0 = function toString_153(){ var result; result = new StringBuilder_1($toString_16(this)); result.string += ' (expression: '; $toString_32(this, result); result.string += ')'; return result.string; } ; var eJavaObject; var Lorg_eclipse_emf_ecore_impl_EGenericTypeImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EGenericTypeImpl', 248); function $addUnique_10(this$static, index_0, object){ var iter; iter = this$static.listIterator_1(index_0); iter.add_1(object); } defineClass(2067, 2062, $intern_160); _.addUnique = function addUnique_18(index_0, object){ $addUnique_10(this, index_0, object); } ; _.basicAdd = function basicAdd_3(object, notifications){ $addUnique_10(this, this.size_1(), object); return notifications; } ; _.basicGet = function basicGet_4(index_0){ return $get_7(this.basicList(), index_0); } ; _.basicIterator = function basicIterator_5(){ return this.basicListIterator(); } ; _.basicList = function basicList_1(){ return new AbstractSequentialInternalEList$1(this); } ; _.basicListIterator = function basicListIterator_11(){ return this.basicListIterator_0(0); } ; _.basicListIterator_0 = function basicListIterator_12(index_0){ return this.basicList().listIterator_1(index_0); } ; _.basicRemove = function basicRemove_3(object, notifications){ $advanceToFind(this, object, true); return notifications; } ; _.move = function move_15(newPosition, oldPosition){ var iter, movedObject; movedObject = $remove_4(this, oldPosition); iter = this.listIterator_1(newPosition); iter.add_1(movedObject); return movedObject; } ; _.move_0 = function move_16(newPosition, object){ var iter; $advanceToFind(this, object, true); iter = this.listIterator_1(newPosition); iter.add_1(object); } ; var Lorg_eclipse_emf_ecore_util_AbstractSequentialInternalEList_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'AbstractSequentialInternalEList', 2067); function $clinit_EContentsEList(){ $clinit_EContentsEList = emptyMethod; EMPTY_CONTENTS_ELIST = new EContentsEList$1; } function $isIncludedEntry(eStructuralFeature){ return instanceOf(eStructuralFeature, 102) && (castTo(eStructuralFeature, 19).eFlags & $intern_138) != 0; } function $iterator_1(this$static){ var result; if (this$static.eStructuralFeatures == null) { return $clinit_EContentsEList$FeatureIteratorImpl() , $clinit_EContentsEList$FeatureIteratorImpl() , EMPTY_ITERATOR; } result = this$static.resolve_0()?this$static.newResolvingListIterator():this$static.newNonResolvingListIterator(); return result; } function EContentsEList(eObject, eStructuralFeatures){ $clinit_EContentsEList(); this.eObject = eObject; this.eStructuralFeatures = eStructuralFeatures; } defineClass(496, 2067, $intern_160, EContentsEList); _.basicGet = function basicGet_5(index_0){ return $get_7(this.basicList(), index_0); } ; _.basicIterator = function basicIterator_6(){ if (this.eStructuralFeatures == null) { return $clinit_EContentsEList$FeatureIteratorImpl() , $clinit_EContentsEList$FeatureIteratorImpl() , EMPTY_ITERATOR; } return this.newNonResolvingListIterator(); } ; _.basicList = function basicList_2(){ return new EContentsEList$2(this.eObject, this.eStructuralFeatures); } ; _.basicListIterator = function basicListIterator_13(){ if (this.eStructuralFeatures == null) { return $clinit_EContentsEList$FeatureIteratorImpl() , $clinit_EContentsEList$FeatureIteratorImpl() , EMPTY_ITERATOR; } return this.newNonResolvingListIterator(); } ; _.basicListIterator_0 = function basicListIterator_14(index_0){ var i, result; if (this.eStructuralFeatures == null) { if (index_0 < 0 || index_0 > 1) { throw toJs(new IndexOutOfBoundsException_0('index=' + index_0 + ', size=0')); } return $clinit_EContentsEList$FeatureIteratorImpl() , $clinit_EContentsEList$FeatureIteratorImpl() , EMPTY_ITERATOR; } result = this.newNonResolvingListIterator(); for (i = 0; i < index_0; ++i) { $next_14(result); } return result; } ; _.isEmpty = function isEmpty_33(){ var feature, featureMap, i, j, size_0, value_0; if (this.eStructuralFeatures != null) { for (i = 0; i < this.eStructuralFeatures.length; ++i) { feature = this.eStructuralFeatures[i]; if (!this.useIsSet() || this.eObject.eIsSet_0(feature)) { value_0 = this.eObject.eGet_1(feature, false); $clinit_FeatureMapUtil(); if (castTo(feature, 69).isFeatureMap_0()) { featureMap = castTo(value_0, 160); for (j = 0 , size_0 = featureMap.size_1(); j < size_0; ++j) { if ($isIncludedEntry(featureMap.getEStructuralFeature_0(j)) && featureMap.getValue_1(j) != null) { return false; } } } else if (feature.isMany()) { if (!castTo(value_0, 16).isEmpty()) { return false; } } else if (value_0 != null) { return false; } } } } return true; } ; _.iterator_0 = function iterator_88(){ return $iterator_1(this); } ; _.listIterator_1 = function listIterator_30(index_0){ var i, result; if (this.eStructuralFeatures == null) { if (index_0 != 0) { throw toJs(new IndexOutOfBoundsException_0('index=' + index_0 + ', size=0')); } return $clinit_EContentsEList$FeatureIteratorImpl() , $clinit_EContentsEList$FeatureIteratorImpl() , EMPTY_ITERATOR; } result = this.resolve_0()?this.newResolvingListIterator():this.newNonResolvingListIterator(); for (i = 0; i < index_0; ++i) { $next_14(result); } return result; } ; _.move = function move_17(newPosition, oldPosition){ throw toJs(new UnsupportedOperationException); } ; _.move_0 = function move_18(newPosition, o){ throw toJs(new UnsupportedOperationException); } ; _.newNonResolvingListIterator = function newNonResolvingListIterator(){ return new EContentsEList$FeatureIteratorImpl(this.eObject, this.eStructuralFeatures); } ; _.newResolvingListIterator = function newResolvingListIterator(){ return new EContentsEList$ResolvingFeatureIteratorImpl(this.eObject, this.eStructuralFeatures); } ; _.resolve_0 = function resolve_4(){ return true; } ; _.size_1 = function size_77(){ var feature, featureMap, i, j, result, size_0, value_0; result = 0; if (this.eStructuralFeatures != null) { for (i = 0; i < this.eStructuralFeatures.length; ++i) { feature = this.eStructuralFeatures[i]; if (!this.useIsSet() || this.eObject.eIsSet_0(feature)) { value_0 = this.eObject.eGet_1(feature, false); $clinit_FeatureMapUtil(); if (castTo(feature, 69).isFeatureMap_0()) { featureMap = castTo(value_0, 160); for (j = 0 , size_0 = featureMap.size_1(); j < size_0; ++j) { $isIncludedEntry(featureMap.getEStructuralFeature_0(j)) && featureMap.getValue_1(j) != null && ++result; } } else feature.isMany()?(result += castTo(value_0, 16).size_1()):value_0 != null && ++result; } } } return result; } ; _.useIsSet = function useIsSet(){ return true; } ; var EMPTY_CONTENTS_ELIST; var Lorg_eclipse_emf_ecore_util_EContentsEList_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EContentsEList', 496); function ENamedElementImpl$1($anonymous0, $anonymous1){ $clinit_EContentsEList(); EContentsEList.call(this, $anonymous0, $anonymous1); } defineClass(1177, 496, $intern_160, ENamedElementImpl$1); _.newNonResolvingListIterator = function newNonResolvingListIterator_0(){ return new ENamedElementImpl$1$2(this.eObject, this.eStructuralFeatures); } ; _.newResolvingListIterator = function newResolvingListIterator_0(){ return new ENamedElementImpl$1$1(this.eObject, this.eStructuralFeatures); } ; _.useIsSet = function useIsSet_0(){ return false; } ; var Lorg_eclipse_emf_ecore_impl_ENamedElementImpl$1_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'ENamedElementImpl/1', 1177); function $clinit_EContentsEList$FeatureIteratorImpl(){ $clinit_EContentsEList$FeatureIteratorImpl = emptyMethod; EMPTY_ITERATOR = new EContentsEList$FeatureIteratorImpl$1; } function $next_14(this$static){ var result; if (this$static.prepared > 1 || this$static.hasNext_0()) { ++this$static.cursor; this$static.prepared = 0; result = this$static.preparedResult; this$static.hasNext_0(); return result; } else { throw toJs(new NoSuchElementException); } } function $scanNext(this$static){ var entry, entryFeature; if (this$static.isHandlingFeatureMap) { while (this$static.valueListIndex < this$static.valueListSize) { entry = castTo(!this$static.valueInternalEList?this$static.valueList.get_0(this$static.valueListIndex):this$static.valueInternalEList.basicGet(this$static.valueListIndex), 76); entryFeature = entry.getEStructuralFeature(); if (instanceOf(entryFeature, 102) && (castTo(entryFeature, 19).eFlags & $intern_138) != 0 && (!this$static.featureFilter || entryFeature.getContainerClass() != Lorg_eclipse_elk_graph_EMapPropertyHolder_2_classLit || entryFeature.getFeatureID_0() != 0) && entry.getValue() != null) { return true; } else { ++this$static.valueListIndex; } } return false; } else { return this$static.valueListIndex < this$static.valueListSize; } } function $scanNext_0(this$static, values){ var entry, entryFeature; if (this$static.isHandlingFeatureMap) { while (values.hasNext_0()) { entry = castTo(values.next_1(), 76); entryFeature = entry.getEStructuralFeature(); if (instanceOf(entryFeature, 102) && (castTo(entryFeature, 19).eFlags & $intern_138) != 0 && (!this$static.featureFilter || entryFeature.getContainerClass() != Lorg_eclipse_elk_graph_EMapPropertyHolder_2_classLit || entryFeature.getFeatureID_0() != 0) && entry.getValue() != null) { values.previous_0(); return true; } } return false; } else { return values.hasNext_0(); } } function $scanPrevious(this$static){ var entry, entryFeature; if (this$static.isHandlingFeatureMap) { while (this$static.valueListIndex > 0) { entry = castTo(this$static.valueList.get_0(this$static.valueListIndex - 1), 76); entryFeature = entry.getEStructuralFeature(); if (instanceOf(entryFeature, 102) && (castTo(entryFeature, 19).eFlags & $intern_138) != 0 && (!this$static.featureFilter || entryFeature.getContainerClass() != Lorg_eclipse_elk_graph_EMapPropertyHolder_2_classLit || entryFeature.getFeatureID_0() != 0) && entry.getValue() != null) { return true; } else { --this$static.valueListIndex; } } return false; } else { return this$static.valueListIndex > 0; } } function $scanPrevious_0(this$static, values){ var entry, entryFeature; if (this$static.isHandlingFeatureMap) { while (values.hasPrevious()) { entry = castTo(values.previous_0(), 76); entryFeature = entry.getEStructuralFeature(); if (instanceOf(entryFeature, 102) && (castTo(entryFeature, 19).eFlags & $intern_138) != 0 && (!this$static.featureFilter || entryFeature.getContainerClass() != Lorg_eclipse_elk_graph_EMapPropertyHolder_2_classLit || entryFeature.getFeatureID_0() != 0) && entry.getValue() != null) { values.next_1(); return true; } } return false; } else { return values.hasPrevious(); } } function EContentsEList$FeatureIteratorImpl(eObject, eStructuralFeatures){ $clinit_EContentsEList$FeatureIteratorImpl(); this.eObject = eObject; this.eStructuralFeatures = eStructuralFeatures; } defineClass(287, 1, $intern_161, EContentsEList$FeatureIteratorImpl); _.forEachRemaining = function forEachRemaining_57(consumer){ $forEachRemaining(this, consumer); } ; _.add_1 = function add_64(o){ throw toJs(new UnsupportedOperationException); } ; _.filter_0 = function filter_3(featureFilter){ if (this.prepared != 0 || !!this.featureFilter) { throw toJs(new IllegalStateException_0('Iterator already in use or already filtered')); } this.featureFilter = featureFilter; } ; _.hasNext_0 = function hasNext_46(){ var entry, feature, newPreparedResult, newValueList, result, value_0; switch (this.prepared) { case 3: case 2: { return true; } case 1: { return false; } case -3: { !this.values?++this.valueListIndex:this.values.next_1(); } default:{ if (!this.valueList || (!this.values?!$scanNext(this):!$scanNext_0(this, this.values))) { while (this.featureCursor < this.eStructuralFeatures.length) { feature = this.eStructuralFeatures[this.featureCursor++]; if ((!this.featureFilter || feature.getContainerClass() != Lorg_eclipse_elk_graph_EMapPropertyHolder_2_classLit || feature.getFeatureID_0() != 0) && (!this.useIsSet() || this.eObject.eIsSet_0(feature))) { value_0 = this.eObject.eGet_1(feature, this.resolve_0()); this.isHandlingFeatureMap = ($clinit_FeatureMapUtil() , castTo(feature, 69).isFeatureMap_0()); if (this.isHandlingFeatureMap || feature.isMany()) { if (this.resolve_0()) { newValueList = castTo(value_0, 15); this.valueList = newValueList; } else { newValueList = castTo(value_0, 71); this.valueList = this.valueInternalEList = newValueList; } if (instanceOf(this.valueList, 59)) { this.values = null; this.valueListSize = this.valueList.size_1(); this.valueListIndex = 0; } else { this.values = !this.valueInternalEList?this.valueList.listIterator_0():this.valueInternalEList.basicListIterator(); } if (!this.values?$scanNext(this):$scanNext_0(this, this.values)) { result = !this.values?!this.valueInternalEList?this.valueList.get_0(this.valueListIndex++):this.valueInternalEList.basicGet(this.valueListIndex++):this.values.next_1(); if (this.isHandlingFeatureMap) { entry = castTo(result, 76); entry.getEStructuralFeature(); newPreparedResult = entry.getValue(); this.preparedResult = newPreparedResult; } else { newPreparedResult = result; this.preparedResult = newPreparedResult; } this.prepared = 3; return true; } } else if (value_0 != null) { this.valueList = null; this.values = null; newPreparedResult = value_0; this.preparedResult = newPreparedResult; this.prepared = 2; return true; } } } this.valueList = null; this.values = null; this.isHandlingFeatureMap = false; this.prepared = 1; return false; } else { result = !this.values?!this.valueInternalEList?this.valueList.get_0(this.valueListIndex++):this.valueInternalEList.basicGet(this.valueListIndex++):this.values.next_1(); if (this.isHandlingFeatureMap) { entry = castTo(result, 76); entry.getEStructuralFeature(); newPreparedResult = entry.getValue(); this.preparedResult = newPreparedResult; } else { newPreparedResult = result; this.preparedResult = newPreparedResult; } this.prepared = 3; return true; } } } } ; _.hasPrevious = function hasPrevious_9(){ var entry, feature, newPreparedResult, newValueList, result, value_0; switch (this.prepared) { case -3: case -2: { return true; } case -1: { return false; } case 3: { !this.values?--this.valueListIndex:this.values.previous_0(); } default:{ if (!this.valueList || (!this.values?!$scanPrevious(this):!$scanPrevious_0(this, this.values))) { while (this.featureCursor > 0) { feature = this.eStructuralFeatures[--this.featureCursor]; if ((!this.featureFilter || feature.getContainerClass() != Lorg_eclipse_elk_graph_EMapPropertyHolder_2_classLit || feature.getFeatureID_0() != 0) && (!this.useIsSet() || this.eObject.eIsSet_0(feature))) { value_0 = this.eObject.eGet_1(feature, this.resolve_0()); this.isHandlingFeatureMap = ($clinit_FeatureMapUtil() , castTo(feature, 69).isFeatureMap_0()); if (this.isHandlingFeatureMap || feature.isMany()) { if (this.resolve_0()) { newValueList = castTo(value_0, 15); this.valueList = newValueList; } else { newValueList = castTo(value_0, 71); this.valueList = this.valueInternalEList = newValueList; } if (instanceOf(this.valueList, 59)) { this.valueListSize = this.valueList.size_1(); this.valueListIndex = this.valueListSize; } else { this.values = !this.valueInternalEList?this.valueList.listIterator_1(this.valueList.size_1()):this.valueInternalEList.basicListIterator_0(this.valueList.size_1()); } if (!this.values?$scanPrevious(this):$scanPrevious_0(this, this.values)) { result = !this.values?!this.valueInternalEList?this.valueList.get_0(--this.valueListIndex):this.valueInternalEList.basicGet(--this.valueListIndex):this.values.previous_0(); if (this.isHandlingFeatureMap) { entry = castTo(result, 76); entry.getEStructuralFeature(); newPreparedResult = entry.getValue(); this.preparedResult = newPreparedResult; } else { newPreparedResult = result; this.preparedResult = newPreparedResult; } this.prepared = -3; return true; } } else if (value_0 != null) { this.valueList = null; this.values = null; newPreparedResult = value_0; this.preparedResult = newPreparedResult; this.prepared = -2; return true; } } } this.valueList = null; this.values = null; this.prepared = -1; return false; } else { result = !this.values?!this.valueInternalEList?this.valueList.get_0(--this.valueListIndex):this.valueInternalEList.basicGet(--this.valueListIndex):this.values.previous_0(); if (this.isHandlingFeatureMap) { entry = castTo(result, 76); entry.getEStructuralFeature(); newPreparedResult = entry.getValue(); this.preparedResult = newPreparedResult; } else { newPreparedResult = result; this.preparedResult = newPreparedResult; } this.prepared = -3; return true; } } } } ; _.next_1 = function next_47(){ return $next_14(this); } ; _.nextIndex_0 = function nextIndex_10(){ return this.cursor; } ; _.previous_0 = function previous_10(){ var result; if (this.prepared < -1 || this.hasPrevious()) { --this.cursor; this.prepared = 0; result = this.preparedResult; this.hasPrevious(); return result; } else { throw toJs(new NoSuchElementException); } } ; _.previousIndex = function previousIndex_9(){ return this.cursor - 1; } ; _.remove = function remove_126(){ throw toJs(new UnsupportedOperationException); } ; _.resolve_0 = function resolve_5(){ return false; } ; _.set_1 = function set_34(o){ throw toJs(new UnsupportedOperationException); } ; _.useIsSet = function useIsSet_1(){ return true; } ; _.cursor = 0; _.featureCursor = 0; _.isHandlingFeatureMap = false; _.prepared = 0; _.valueListIndex = 0; _.valueListSize = 0; var EMPTY_ITERATOR; var Lorg_eclipse_emf_ecore_util_EContentsEList$FeatureIteratorImpl_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EContentsEList/FeatureIteratorImpl', 287); function EContentsEList$ResolvingFeatureIteratorImpl(eObject, eStructuralFeatures){ $clinit_EContentsEList$FeatureIteratorImpl(); EContentsEList$FeatureIteratorImpl.call(this, eObject, eStructuralFeatures); } defineClass(711, 287, $intern_161, EContentsEList$ResolvingFeatureIteratorImpl); _.resolve_0 = function resolve_6(){ return true; } ; var Lorg_eclipse_emf_ecore_util_EContentsEList$ResolvingFeatureIteratorImpl_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EContentsEList/ResolvingFeatureIteratorImpl', 711); function ENamedElementImpl$1$1($anonymous0, $anonymous1){ $clinit_EContentsEList$FeatureIteratorImpl(); EContentsEList$ResolvingFeatureIteratorImpl.call(this, $anonymous0, $anonymous1); } defineClass(1178, 711, $intern_161, ENamedElementImpl$1$1); _.useIsSet = function useIsSet_2(){ return false; } ; var Lorg_eclipse_emf_ecore_impl_ENamedElementImpl$1$1_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'ENamedElementImpl/1/1', 1178); function ENamedElementImpl$1$2($anonymous0, $anonymous1){ $clinit_EContentsEList$FeatureIteratorImpl(); EContentsEList$FeatureIteratorImpl.call(this, $anonymous0, $anonymous1); } defineClass(1179, 287, $intern_161, ENamedElementImpl$1$2); _.useIsSet = function useIsSet_3(){ return false; } ; var Lorg_eclipse_emf_ecore_impl_ENamedElementImpl$1$2_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'ENamedElementImpl/1/2', 1179); function $$init_11(this$static){ } function $getFeature(this$static){ var eClass; if (!this$static.feature && this$static.featureID != -1) { eClass = this$static.notifier.eClass_0(); this$static.feature = $getEStructuralFeature(eClass, this$static.featureID); } return this$static.feature; } function ENotificationImpl(notifier, featureID, oldDoubleValue, newDoubleValue){ NotificationImpl.call(this, 1, oldDoubleValue, newDoubleValue); $$init_11(this); this.notifier = notifier; this.featureID = featureID; } function ENotificationImpl_0(notifier, featureID, oldIntValue, newIntValue){ NotificationImpl_0.call(this, 1, oldIntValue, newIntValue); $$init_11(this); this.notifier = notifier; this.featureID = featureID; } function ENotificationImpl_1(notifier, eventType, featureID, oldValue, newValue){ ENotificationImpl_2.call(this, notifier, eventType, featureID, oldValue, newValue, -1); } function ENotificationImpl_2(notifier, eventType, featureID, oldValue, newValue, position){ NotificationImpl_1.call(this, eventType, oldValue, newValue, position); $$init_11(this); this.notifier = notifier; this.featureID = featureID; } function ENotificationImpl_3(notifier, eventType, featureID, oldValue, newValue, position, wasSet){ NotificationImpl_2.call(this, eventType, oldValue, newValue, position, wasSet); $$init_11(this); this.notifier = notifier; this.featureID = featureID; } function ENotificationImpl_4(notifier, eventType, featureID, oldBooleanValue, newBooleanValue){ NotificationImpl_3.call(this, eventType, oldBooleanValue, newBooleanValue); $$init_11(this); this.notifier = notifier; this.featureID = featureID; } function ENotificationImpl_5(notifier, eventType, feature, oldByteValue, newByteValue){ this.eventType = eventType; this.oldSimplePrimitiveValue = oldByteValue; this.newSimplePrimitiveValue = newByteValue; this.position = -1; this.primitiveType = 1; this.notifier = notifier; this.feature = feature; } function ENotificationImpl_6(notifier, eventType, feature, oldByteValue, newByteValue, isSetChange){ ENotificationImpl_5.call(this, notifier, eventType, feature, oldByteValue, newByteValue); isSetChange && (this.position = -2); } function ENotificationImpl_7(notifier, eventType, feature, oldCharValue, newCharValue){ this.eventType = eventType; this.oldSimplePrimitiveValue = oldCharValue; this.newSimplePrimitiveValue = newCharValue; this.position = -1; this.primitiveType = 2; this.notifier = notifier; this.feature = feature; } function ENotificationImpl_8(notifier, eventType, feature, oldCharValue, newCharValue, isSetChange){ ENotificationImpl_7.call(this, notifier, eventType, feature, oldCharValue, newCharValue); isSetChange && (this.position = -2); } function ENotificationImpl_9(notifier, eventType, feature, oldDoubleValue, newDoubleValue){ NotificationImpl.call(this, eventType, oldDoubleValue, newDoubleValue); $$init_11(this); this.notifier = notifier; this.feature = feature; } function ENotificationImpl_10(notifier, eventType, feature, oldDoubleValue, newDoubleValue, isSetChange){ ENotificationImpl_9.call(this, notifier, eventType, feature, oldDoubleValue, newDoubleValue); isSetChange && (this.position = -2); } function ENotificationImpl_11(notifier, eventType, feature, oldFloatValue, newFloatValue){ this.eventType = eventType; this.oldIEEEPrimitiveValue = oldFloatValue; this.newIEEEPrimitiveValue = newFloatValue; this.position = -1; this.primitiveType = 4; this.notifier = notifier; this.feature = feature; } function ENotificationImpl_12(notifier, eventType, feature, oldFloatValue, newFloatValue, isSetChange){ ENotificationImpl_11.call(this, notifier, eventType, feature, oldFloatValue, newFloatValue); isSetChange && (this.position = -2); } function ENotificationImpl_13(notifier, eventType, feature, oldIntValue, newIntValue){ NotificationImpl_0.call(this, eventType, oldIntValue, newIntValue); $$init_11(this); this.notifier = notifier; this.feature = feature; } function ENotificationImpl_14(notifier, eventType, feature, oldIntValue, newIntValue, isSetChange){ ENotificationImpl_13.call(this, notifier, eventType, feature, oldIntValue, newIntValue); isSetChange && (this.position = -2); } function ENotificationImpl_15(notifier, eventType, feature, oldLongValue, newLongValue){ this.eventType = eventType; this.oldSimplePrimitiveValue = oldLongValue; this.newSimplePrimitiveValue = newLongValue; this.position = -1; this.primitiveType = 6; this.notifier = notifier; this.feature = feature; } function ENotificationImpl_16(notifier, eventType, feature, oldLongValue, newLongValue, isSetChange){ ENotificationImpl_15.call(this, notifier, eventType, feature, oldLongValue, newLongValue); isSetChange && (this.position = -2); } function ENotificationImpl_17(notifier, eventType, feature, oldValue, newValue){ ENotificationImpl_18.call(this, notifier, eventType, feature, oldValue, newValue, -1); } function ENotificationImpl_18(notifier, eventType, feature, oldValue, newValue, position){ NotificationImpl_1.call(this, eventType, oldValue, newValue, position); $$init_11(this); this.notifier = notifier; this.feature = feature; } function ENotificationImpl_19(notifier, eventType, feature, oldValue, newValue, isSetChange){ ENotificationImpl_18.call(this, notifier, eventType, feature, oldValue, newValue, isSetChange?-2:-1); } function ENotificationImpl_20(notifier, eventType, feature, oldShortValue, newShortValue){ this.eventType = eventType; this.oldSimplePrimitiveValue = oldShortValue; this.newSimplePrimitiveValue = newShortValue; this.position = -1; this.primitiveType = 7; this.notifier = notifier; this.feature = feature; } function ENotificationImpl_21(notifier, eventType, feature, oldShortValue, newShortValue, isSetChange){ ENotificationImpl_20.call(this, notifier, eventType, feature, oldShortValue, newShortValue); isSetChange && (this.position = -2); } function ENotificationImpl_22(notifier, eventType, feature, oldBooleanValue, newBooleanValue){ NotificationImpl_3.call(this, eventType, oldBooleanValue, newBooleanValue); $$init_11(this); this.notifier = notifier; this.feature = feature; } function ENotificationImpl_23(notifier, eventType, feature, oldBooleanValue, newBooleanValue, isSetChange){ ENotificationImpl_22.call(this, notifier, eventType, feature, oldBooleanValue, newBooleanValue); isSetChange && (this.position = -2); } defineClass(39, 152, $intern_145, ENotificationImpl, ENotificationImpl_0, ENotificationImpl_1, ENotificationImpl_2, ENotificationImpl_3, ENotificationImpl_4, ENotificationImpl_5, ENotificationImpl_6, ENotificationImpl_7, ENotificationImpl_8, ENotificationImpl_9, ENotificationImpl_10, ENotificationImpl_11, ENotificationImpl_12, ENotificationImpl_13, ENotificationImpl_14, ENotificationImpl_15, ENotificationImpl_16, ENotificationImpl_17, ENotificationImpl_18, ENotificationImpl_19, ENotificationImpl_20, ENotificationImpl_21, ENotificationImpl_22, ENotificationImpl_23); _.getFeature = function getFeature_6(){ return $getFeature(this); } ; _.getFeatureDefaultValue = function getFeatureDefaultValue_0(){ var feature; feature = $getFeature(this); if (feature) { return feature.getDefaultValue(); } return null; } ; _.getFeatureID = function getFeatureID_10(expectedClass){ this.featureID == -1 && !!this.feature && (this.featureID = this.notifier.eDerivedStructuralFeatureID(this.feature.getFeatureID_0(), this.feature.getContainerClass())); return this.notifier.eBaseStructuralFeatureID(this.featureID, expectedClass); } ; _.getNotifier = function getNotifier_6(){ return this.notifier; } ; _.isFeatureUnsettable = function isFeatureUnsettable_0(){ var feature; feature = $getFeature(this); if (feature) { return feature.isUnsettable(); } return false; } ; _.featureID = -1; var Lorg_eclipse_emf_ecore_impl_ENotificationImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'ENotificationImpl', 39); function $eBasicRemoveFromContainerFeature_9(this$static, msgs){ var eClass, inverseFeature; if (this$static.eFlags_0 >> 16 == 10) { return this$static.eContainer.eInverseRemove(this$static, 11, Lorg_eclipse_emf_ecore_EClass_2_classLit, msgs); } return inverseFeature = $getEOpposite(castTo($getEStructuralFeature((eClass = castTo($getField(this$static, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , EOPERATION):eClass), this$static.eFlags_0 >> 16), 19)) , this$static.eContainer.eInverseRemove(this$static, inverseFeature.featureID, inverseFeature.containerClass, msgs); } function $getEGenericExceptions(this$static){ if (!this$static.eGenericExceptions) { this$static.eGenericExceptions = new EOperationImpl$2(this$static, Lorg_eclipse_emf_ecore_EGenericType_2_classLit, this$static); !this$static.eExceptions && (this$static.eExceptions = new EOperationImpl$1(this$static, this$static)); } return this$static.eGenericExceptions; } function $isSetEExceptions(this$static){ return !!this$static.eExceptions && $getEGenericExceptions(this$static.eExceptions.this$01).size_0 != 0 && !(!!this$static.eGenericExceptions && $isSet_0(this$static.eGenericExceptions)); } function EOperationImpl(){ ETypedElementImpl.call(this); } defineClass(411, 292, {110:1, 94:1, 93:1, 155:1, 197:1, 58:1, 62:1, 114:1, 481:1, 54:1, 99:1, 158:1, 411:1, 292:1, 119:1, 120:1}, EOperationImpl); _.eBasicRemoveFromContainerFeature = function eBasicRemoveFromContainerFeature_10(msgs){ return $eBasicRemoveFromContainerFeature_9(this, msgs); } ; _.eGet = function eGet_27(featureID, resolve, coreType){ var eClass, lower, upper; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , this.eAnnotations; case 1: return this.name_0; case 2: return $clinit_Boolean() , (this.eFlags & 256) != 0?true:false; case 3: return $clinit_Boolean() , (this.eFlags & 512) != 0?true:false; case 4: return valueOf_3(this.lowerBound); case 5: return valueOf_3(this.upperBound); case 6: return $clinit_Boolean() , upper = this.upperBound , upper > 1 || upper == -1?true:false; case 7: return $clinit_Boolean() , lower = this.lowerBound , lower >= 1?true:false; case 8: if (resolve) return $getEType(this); return this.eType; case 9: return this.eGenericType; case 10: return this.eFlags_0 >> 16 == 10?castTo(this.eContainer, 29):null; case 11: return !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 11)) , this.eTypeParameters; case 12: return !this.eParameters && (this.eParameters = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EParameter_2_classLit, this, 12, 10)) , this.eParameters; case 13: return !this.eExceptions && (this.eExceptions = new EOperationImpl$1(this, this)) , this.eExceptions; case 14: return $getEGenericExceptions(this); } return $eDynamicGet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EOPERATION)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EOPERATION:eClass), featureID), resolve, coreType); } ; _.eInverseAdd_0 = function eInverseAdd_17(otherEnd, featureID, msgs){ var eClass, eContainerFeatureID, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicAdd_0(this.eAnnotations, otherEnd, msgs); case 10: !!this.eContainer && (msgs = (eContainerFeatureID = this.eFlags_0 >> 16 , eContainerFeatureID >= 0?$eBasicRemoveFromContainerFeature_9(this, msgs):this.eContainer.eInverseRemove(this, -1 - eContainerFeatureID, null, msgs))); return $eBasicSetContainer(this, otherEnd, 10, msgs); case 12: return !this.eParameters && (this.eParameters = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EParameter_2_classLit, this, 12, 10)) , $basicAdd_0(this.eParameters, otherEnd, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , EOPERATION):eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseAdd(this, $eSettings_0(this), featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EOPERATION)), otherEnd, msgs); } ; _.eInverseRemove_0 = function eInverseRemove_20(otherEnd, featureID, msgs){ var eClass, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicRemove_0(this.eAnnotations, otherEnd, msgs); case 9: return $basicUnsetEGenericType(this, msgs); case 10: return $eBasicSetContainer(this, null, 10, msgs); case 11: return !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 11)) , $basicRemove_0(this.eTypeParameters, otherEnd, msgs); case 12: return !this.eParameters && (this.eParameters = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EParameter_2_classLit, this, 12, 10)) , $basicRemove_0(this.eParameters, otherEnd, msgs); case 14: return $basicRemove_0($getEGenericExceptions(this), otherEnd, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , EOPERATION):eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseRemove(this, $eSettings_0(this), featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EOPERATION)), otherEnd, msgs); } ; _.eIsSet = function eIsSet_26(featureID){ var eClass, lower, upper; switch (featureID) { case 0: return !!this.eAnnotations && this.eAnnotations.size_0 != 0; case 1: return this.name_0 != null; case 2: return (this.eFlags & 256) == 0; case 3: return (this.eFlags & 512) == 0; case 4: return this.lowerBound != 0; case 5: return this.upperBound != 1; case 6: return upper = this.upperBound , upper > 1 || upper == -1; case 7: return lower = this.lowerBound , lower >= 1; case 8: return !!this.eType && !this.eGenericType.eTypeParameter && $getETypeArguments(this.eGenericType).size_0 == 0; case 9: return !!this.eGenericType && !(!!this.eType && !this.eGenericType.eTypeParameter && $getETypeArguments(this.eGenericType).size_0 == 0); case 10: return !!(this.eFlags_0 >> 16 == 10?castTo(this.eContainer, 29):null); case 11: return !!this.eTypeParameters && this.eTypeParameters.size_0 != 0; case 12: return !!this.eParameters && this.eParameters.size_0 != 0; case 13: return !!this.eExceptions && $getEGenericExceptions(this.eExceptions.this$01).size_0 != 0 && !(!!this.eGenericExceptions && $isSet_0(this.eGenericExceptions)); case 14: return !!this.eGenericExceptions && $isSet_0(this.eGenericExceptions); } return $eDynamicIsSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EOPERATION)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EOPERATION:eClass), featureID)); } ; _.eSet = function eSet_25(featureID, newValue){ var eClass, msgs; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $addAll_9(this.eAnnotations, castTo(newValue, 16)); return; case 1: $setName(this, castToString(newValue)); return; case 2: $setOrdered(this, $booleanValue(castToBoolean(newValue))); return; case 3: $setUnique_2(this, $booleanValue(castToBoolean(newValue))); return; case 4: $setLowerBound(this, castTo(newValue, 17).value_0); return; case 5: $setUpperBound(this, castTo(newValue, 17).value_0); return; case 8: $setEType(this, castTo(newValue, 142)); return; case 9: msgs = $setEGenericType(this, castTo(newValue, 89), null); !!msgs && msgs.dispatch_0(); return; case 11: !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 11)); $clear_13(this.eTypeParameters); !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 11)); $addAll_9(this.eTypeParameters, castTo(newValue, 16)); return; case 12: !this.eParameters && (this.eParameters = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EParameter_2_classLit, this, 12, 10)); $clear_13(this.eParameters); !this.eParameters && (this.eParameters = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EParameter_2_classLit, this, 12, 10)); $addAll_9(this.eParameters, castTo(newValue, 16)); return; case 13: !this.eExceptions && (this.eExceptions = new EOperationImpl$1(this, this)); $clear_12(this.eExceptions); !this.eExceptions && (this.eExceptions = new EOperationImpl$1(this, this)); $addAll_9(this.eExceptions, castTo(newValue, 16)); return; case 14: $clear_13($getEGenericExceptions(this)); $addAll_9($getEGenericExceptions(this), castTo(newValue, 16)); return; } $eDynamicSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EOPERATION)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EOPERATION:eClass), featureID), newValue); } ; _.eStaticClass = function eStaticClass_26(){ return $clinit_EcorePackage$Literals() , EOPERATION; } ; _.eUnset = function eUnset_25(featureID){ var eClass, msgs; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); return; case 1: $setName(this, null); return; case 2: $setOrdered(this, true); return; case 3: $setUnique_2(this, true); return; case 4: $setLowerBound(this, 0); return; case 5: $setUpperBound(this, 1); return; case 8: $setEType(this, null); return; case 9: msgs = $setEGenericType(this, null, null); !!msgs && msgs.dispatch_0(); return; case 11: !this.eTypeParameters && (this.eTypeParameters = new EObjectContainmentEList$Resolving(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, this, 11)); $clear_13(this.eTypeParameters); return; case 12: !this.eParameters && (this.eParameters = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EParameter_2_classLit, this, 12, 10)); $clear_13(this.eParameters); return; case 13: !!this.eExceptions && $clear_12(this.eExceptions); return; case 14: !!this.eGenericExceptions && $clear_13(this.eGenericExceptions); return; } $eDynamicUnset(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EOPERATION)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EOPERATION:eClass), featureID)); } ; _.freeze = function freeze_7(){ var i, size_0; if (this.eParameters) { for (i = 0 , size_0 = this.eParameters.size_0; i < size_0; ++i) { $freeze($get_20(this.eParameters, i)); } } $getEType(this); this.eFlags |= 1; } ; var Lorg_eclipse_emf_ecore_impl_EOperationImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EOperationImpl', 411); function $delegateAdd_1(this$static, index_0, eClassifier){ $add_20($getEGenericExceptions(this$static.this$01), index_0, $wrap_1(eClassifier)); } function $delegateAdd_2(this$static, eClassifier){ $add_21($getEGenericExceptions(this$static.this$01), $wrap_1(eClassifier)); } function $delegateContains_0(this$static, object){ var eClassifier, eClassifier$iterator; for (eClassifier$iterator = new AbstractEList$EIterator(this$static); eClassifier$iterator.cursor != eClassifier$iterator.this$01_2.size_1();) { eClassifier = castTo($doNext(eClassifier$iterator), 142); if (maskUndefined(object) === maskUndefined(eClassifier)) { return true; } } return false; } function $delegateSet_0(this$static, index_0, eClassifier){ var eGenericType, result, result0; eGenericType = castTo($get_20($getEGenericExceptions(this$static.this$01), index_0), 89); result0 = (result = eGenericType.eRawType , result?result:($clinit_EcorePackage$Literals() , EJAVA_OBJECT)); (result0.eIsProxy()?$eResolveProxy(this$static.owner, castTo(result0, 54)):result0) == eClassifier?$getERawType(eGenericType):$setEClassifier(eGenericType, eClassifier); return result0; } function $wrap_1(eClassifier){ var eGenericType, eGenericType0; eGenericType0 = ($clinit_EcoreFactory() , eGenericType = new EGenericTypeImpl , eGenericType); $setEClassifier(eGenericType0, eClassifier); return eGenericType0; } function EOperationImpl$1(this$0, $anonymous0){ this.this$01 = this$0; DelegatingEcoreEList.call(this, $anonymous0); } defineClass(513, 756, $intern_159, EOperationImpl$1); _.delegateAdd = function delegateAdd_3(index_0, eClassifier){ $delegateAdd_1(this, index_0, castTo(eClassifier, 142)); } ; _.delegateAdd_0 = function delegateAdd_4(eClassifier){ $delegateAdd_2(this, castTo(eClassifier, 142)); } ; _.delegateGet = function delegateGet_1(index_0){ var eGenericType, result; return eGenericType = castTo($get_20($getEGenericExceptions(this.this$01), index_0), 89) , result = eGenericType.eRawType , result?result:($clinit_EcorePackage$Literals() , EJAVA_OBJECT); } ; _.delegateRemove = function delegateRemove_1(index_0){ var eGenericType, result; return eGenericType = castTo($remove_35($getEGenericExceptions(this.this$01), index_0), 89) , result = eGenericType.eRawType , result?result:($clinit_EcorePackage$Literals() , EJAVA_OBJECT); } ; _.delegateSet = function delegateSet_1(index_0, eClassifier){ return $delegateSet_0(this, index_0, castTo(eClassifier, 142)); } ; _.canContainNull = function canContainNull_5(){ return false; } ; _.createNotification = function createNotification_5(eventType, oldObject, newObject, index_0, wasSet){ return null; } ; _.delegateBasicList = function delegateBasicList_1(){ return new EOperationImpl$1$1(this); } ; _.delegateClear = function delegateClear_1(){ $clear_13($getEGenericExceptions(this.this$01)); } ; _.delegateContains = function delegateContains_1(object){ return $delegateContains_0(this, object); } ; _.delegateContainsAll = function delegateContainsAll_1(collection){ var object, object$iterator; for (object$iterator = collection.iterator_0(); object$iterator.hasNext_0();) { object = object$iterator.next_1(); if (!$delegateContains_0(this, object)) { return false; } } return true; } ; _.delegateEquals = function delegateEquals_1(object){ var i, j, list; if (instanceOf(object, 15)) { list = castTo(object, 15); if (list.size_1() == $getEGenericExceptions(this.this$01).size_0) { for (i = list.iterator_0() , j = new AbstractEList$EIterator(this); i.hasNext_0();) { if (maskUndefined(i.next_1()) !== maskUndefined($doNext(j))) { return false; } } return true; } } return false; } ; _.delegateHashCode = function delegateHashCode_1(){ var eGenericType, eGenericType$iterator, hashCode, object, result; hashCode = 1; for (eGenericType$iterator = new AbstractEList$EIterator($getEGenericExceptions(this.this$01)); eGenericType$iterator.cursor != eGenericType$iterator.this$01_2.size_1();) { eGenericType = castTo($doNext(eGenericType$iterator), 89); object = (result = eGenericType.eRawType , result?result:($clinit_EcorePackage$Literals() , EJAVA_OBJECT)); hashCode = 31 * hashCode + (!object?0:hashCode__I__devirtual$(object)); } return hashCode; } ; _.delegateIndexOf = function delegateIndexOf_1(object){ var eGenericType, eGenericType$iterator, index_0, result; index_0 = 0; for (eGenericType$iterator = new AbstractEList$EIterator($getEGenericExceptions(this.this$01)); eGenericType$iterator.cursor != eGenericType$iterator.this$01_2.size_1();) { eGenericType = castTo($doNext(eGenericType$iterator), 89); if (maskUndefined(object) === maskUndefined((result = eGenericType.eRawType , result?result:($clinit_EcorePackage$Literals() , EJAVA_OBJECT)))) { return index_0; } ++index_0; } return -1; } ; _.delegateIsEmpty = function delegateIsEmpty_1(){ return $getEGenericExceptions(this.this$01).size_0 == 0; } ; _.delegateList_1 = function delegateList_3(){ return null; } ; _.delegateSize = function delegateSize_1(){ return $getEGenericExceptions(this.this$01).size_0; } ; _.delegateToArray = function delegateToArray_3(){ var eGenericType, eGenericType$iterator, index_0, result, result0, size_0; size_0 = $getEGenericExceptions(this.this$01).size_0; result0 = initUnidimensionalArray(Ljava_lang_Object_2_classLit, $intern_2, 1, size_0, 5, 1); index_0 = 0; for (eGenericType$iterator = new AbstractEList$EIterator($getEGenericExceptions(this.this$01)); eGenericType$iterator.cursor != eGenericType$iterator.this$01_2.size_1();) { eGenericType = castTo($doNext(eGenericType$iterator), 89); result0[index_0++] = (result = eGenericType.eRawType , result?result:($clinit_EcorePackage$Literals() , EJAVA_OBJECT)); } return result0; } ; _.delegateToArray_0 = function delegateToArray_4(array){ var eGenericType, eGenericType$iterator, index_0, newArray, rawType, result, size_0; size_0 = $getEGenericExceptions(this.this$01).size_0; if (array.length < size_0) { newArray = newInstance_11(getClass__Ljava_lang_Class___devirtual$(array).componentType, size_0); array = newArray; } array.length > size_0 && setCheck(array, size_0, null); index_0 = 0; for (eGenericType$iterator = new AbstractEList$EIterator($getEGenericExceptions(this.this$01)); eGenericType$iterator.cursor != eGenericType$iterator.this$01_2.size_1();) { eGenericType = castTo($doNext(eGenericType$iterator), 89); rawType = (result = eGenericType.eRawType , result?result:($clinit_EcorePackage$Literals() , EJAVA_OBJECT)); setCheck(array, index_0++, rawType); } return array; } ; _.delegateToString = function delegateToString_1(){ var eGenericExceptions, i, result, size_0, stringBuffer; stringBuffer = new StringBuffer; stringBuffer.string += '['; eGenericExceptions = $getEGenericExceptions(this.this$01); for (i = 0 , size_0 = $getEGenericExceptions(this.this$01).size_0; i < size_0;) { $append_3(stringBuffer, valueOf_6((result = castTo($get_20(eGenericExceptions, i), 89).eRawType , result?result:($clinit_EcorePackage$Literals() , EJAVA_OBJECT)))); ++i < size_0 && (stringBuffer.string += ', ' , stringBuffer); } stringBuffer.string += ']'; return stringBuffer.string; } ; _.dispatchNotification = function dispatchNotification_4(notification){ } ; _.getFeatureID_0 = function getFeatureID_11(){ return 13; } ; _.hasInstanceClass = function hasInstanceClass_2(){ return true; } ; _.hasInverse = function hasInverse_5(){ return false; } ; _.hasManyInverse = function hasManyInverse_2(){ return false; } ; _.hasNavigableInverse = function hasNavigableInverse_3(){ return false; } ; _.hasProxies = function hasProxies_2(){ return true; } ; _.isContainment = function isContainment_5(){ return false; } ; _.isEObject = function isEObject_3(){ return true; } ; _.isInstance = function isInstance_5(object){ return instanceOf(object, 142); } ; _.isSet_0 = function isSet_9(){ return $isSetEExceptions(this.this$01); } ; _.isUnique = function isUnique_6(){ return true; } ; _.useEquals = function useEquals_12(){ return true; } ; var Lorg_eclipse_emf_ecore_impl_EOperationImpl$1_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EOperationImpl/1', 513); function EOperationImpl$1$1(this$1){ this.this$11 = this$1; } defineClass(1376, 2062, $intern_38, EOperationImpl$1$1); _.listIterator_1 = function listIterator_31(index_0){ return $basicListIterator(this.this$11, index_0); } ; _.size_1 = function size_78(){ return $getEGenericExceptions(this.this$11.this$01).size_0; } ; var Lorg_eclipse_emf_ecore_impl_EOperationImpl$1$1_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EOperationImpl/1/1', 1376); function $isSet_0(this$static){ var eGenericType, eGenericType$iterator; for (eGenericType$iterator = new AbstractEList$EIterator(this$static); eGenericType$iterator.cursor != eGenericType$iterator.this$01_2.size_1();) { eGenericType = castTo($doNext(eGenericType$iterator), 89); if (!!eGenericType.eTypeParameter || (!eGenericType.eTypeArguments && (eGenericType.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, eGenericType, 1)) , eGenericType.eTypeArguments).size_0 != 0) { return true; } } return false; } function $shadowAdd_0(this$static, eGenericType, notifications){ var notification, result; notification = new ENotificationImpl_3(this$static.owner, 3, 13, null, (result = eGenericType.eRawType , result?result:($clinit_EcorePackage$Literals() , EJAVA_OBJECT)), $indexOf_6(this$static, eGenericType), false); !notifications?(notifications = notification):notifications.add_5(notification); return notifications; } function $shadowRemove_0(this$static, eGenericType, notifications){ var notification, result; notification = new ENotificationImpl_3(this$static.owner, 4, 13, (result = eGenericType.eRawType , result?result:($clinit_EcorePackage$Literals() , EJAVA_OBJECT)), null, $indexOf_6(this$static, eGenericType), false); !notifications?(notifications = notification):notifications.add_5(notification); return notifications; } function $shadowSet_0(this$static, oldEGenericType, newEGenericType, notifications){ var notification, result, result0; notification = new ENotificationImpl_3(this$static.owner, 1, 13, (result0 = oldEGenericType.eRawType , result0?result0:($clinit_EcorePackage$Literals() , EJAVA_OBJECT)), (result = newEGenericType.eRawType , result?result:($clinit_EcorePackage$Literals() , EJAVA_OBJECT)), $indexOf_6(this$static, oldEGenericType), false); !notifications?(notifications = notification):notifications.add_5(notification); return notifications; } function EOperationImpl$2(this$0, $anonymous0, $anonymous1){ this.this$01 = this$0; EObjectContainmentEList$Unsettable.call(this, $anonymous0, $anonymous1, 14); } defineClass(1377, 555, $intern_157, EOperationImpl$2); _.move = function move_19(targetIndex, sourceIndex){ var result0, result; return result0 = castTo($move_1(this, targetIndex, sourceIndex), 89) , $eNotificationRequired(this.owner) && $dispatchNotification(this, new ENotificationImpl_18(this.this$01, 7, ($clinit_EcorePackage$Literals() , EOPERATION__EEXCEPTIONS), valueOf_3(sourceIndex), (result = result0.eRawType , result?result:EJAVA_OBJECT), targetIndex)) , result0; } ; _.shadowAdd = function shadowAdd_1(eGenericType, notifications){ return $shadowAdd_0(this, castTo(eGenericType, 89), notifications); } ; _.shadowRemove = function shadowRemove_1(eGenericType, notifications){ return $shadowRemove_0(this, castTo(eGenericType, 89), notifications); } ; _.shadowSet = function shadowSet_1(oldEGenericType, newEGenericType, notifications){ return $shadowSet_0(this, castTo(oldEGenericType, 89), castTo(newEGenericType, 89), notifications); } ; _.createNotification = function createNotification_6(eventType, oldObject, newObject, index_0, wasSet){ switch (eventType) { case 3: { return $createNotification(this, eventType, oldObject, newObject, index_0, this.size_0 > 1); } case 5: { return $createNotification(this, eventType, oldObject, newObject, index_0, this.size_0 - castTo(newObject, 15).size_1() > 0); } default:{ return new ENotificationImpl_3(this.owner, eventType, this.featureID, oldObject, newObject, index_0, true); } } } ; _.hasShadow = function hasShadow_1(){ return true; } ; _.isSet_0 = function isSet_10(){ return $isSet_0(this); } ; _.unset = function unset_6(){ $clear_13(this); } ; var Lorg_eclipse_emf_ecore_impl_EOperationImpl$2_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EOperationImpl/2', 1377); function EPackageImpl$1(this$0, val$factory){ this.this$01 = this$0; this.val$factory2 = val$factory; } defineClass(507, 1, {2037:1, 507:1}, EPackageImpl$1); var Lorg_eclipse_emf_ecore_impl_EPackageImpl$1_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EPackageImpl/1', 507); function EObjectContainmentWithInverseEList(dataClass, owner, featureID, inverseFeatureID){ EObjectContainmentEList.call(this, dataClass, owner, featureID); this.inverseFeatureID = inverseFeatureID; } defineClass(14, 83, $intern_157, EObjectContainmentWithInverseEList); _.getInverseFeatureClass = function getInverseFeatureClass_0(){ return this.dataClass; } ; _.getInverseFeatureID = function getInverseFeatureID_0(){ return this.inverseFeatureID; } ; _.hasNavigableInverse = function hasNavigableInverse_4(){ return true; } ; _.inverseFeatureID = 0; var Lorg_eclipse_emf_ecore_util_EObjectContainmentWithInverseEList_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectContainmentWithInverseEList', 14); function EObjectContainmentWithInverseEList$Resolving(dataClass, owner, featureID, inverseFeatureID){ EObjectContainmentWithInverseEList.call(this, dataClass, owner, featureID, inverseFeatureID); } defineClass(365, 14, $intern_157, EObjectContainmentWithInverseEList$Resolving); _.hasProxies = function hasProxies_3(){ return true; } ; _.resolve = function resolve_7(index_0, object){ return $resolve(this, index_0, castTo(object, 58)); } ; var Lorg_eclipse_emf_ecore_util_EObjectContainmentWithInverseEList$Resolving_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectContainmentWithInverseEList/Resolving', 365); function EPackageImpl$2(this$0, $anonymous0, $anonymous1){ this.this$01 = this$0; EObjectContainmentWithInverseEList$Resolving.call(this, $anonymous0, $anonymous1, 5, 6); } defineClass(308, 365, $intern_157, EPackageImpl$2); _.didChange = function didChange_1(){ this.this$01.eNameToEClassifierMap = null; } ; var Lorg_eclipse_emf_ecore_impl_EPackageImpl$2_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EPackageImpl/2', 308); function EPackageImpl$3(){ } defineClass(1278, 1, {}, EPackageImpl$3); var Lorg_eclipse_emf_ecore_impl_EPackageImpl$3_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EPackageImpl/3', 1278); function $getEFactory(this$static, nsURI){ var ePackage, ePackageDescriptor, result; ePackage = $get_15(this$static.stringMap, nsURI); if (instanceOf(ePackage, 241)) { result = castTo(ePackage, 241); result.getNsURI() == null && undefined; return result.getEFactoryInstance(); } else if (instanceOf(ePackage, 507)) { ePackageDescriptor = castTo(ePackage, 2037); result = ePackageDescriptor.val$factory2; return result; } else { return null; } } function $getEPackage_0(this$static, nsURI){ var ePackage, ePackageDescriptor, result; ePackage = nsURI == null?getEntryValueOrNull($getEntry_0(this$static.hashCodeMap, null)):$get_15(this$static.stringMap, nsURI); if (instanceOf(ePackage, 241)) { result = castTo(ePackage, 241); result.getNsURI() == null && undefined; return result; } else if (instanceOf(ePackage, 507)) { ePackageDescriptor = castTo(ePackage, 2037); result = ePackageDescriptor.this$01; !!result && (result.nsURI == null?undefined:nsURI == null?$put_9(this$static.hashCodeMap, null, result):$put_10(this$static.stringMap, nsURI, result)); return result; } else { return null; } } function EPackageRegistryImpl(){ HashMap.call(this); } defineClass(733, 45, $intern_76, EPackageRegistryImpl); _.containsKey = function containsKey_16(key){ return instanceOfString(key)?$hasStringValue(this, key):!!$getEntry_0(this.hashCodeMap, key); } ; var Lorg_eclipse_emf_ecore_impl_EPackageRegistryImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EPackageRegistryImpl', 733); function $eBasicRemoveFromContainerFeature_10(this$static, msgs){ var eClass, inverseFeature; if (this$static.eFlags_0 >> 16 == 10) { return this$static.eContainer.eInverseRemove(this$static, 12, Lorg_eclipse_emf_ecore_EOperation_2_classLit, msgs); } return inverseFeature = $getEOpposite(castTo($getEStructuralFeature((eClass = castTo($getField(this$static, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , EPARAMETER):eClass), this$static.eFlags_0 >> 16), 19)) , this$static.eContainer.eInverseRemove(this$static, inverseFeature.featureID, inverseFeature.containerClass, msgs); } function EParameterImpl(){ ETypedElementImpl.call(this); } defineClass(518, 292, {110:1, 94:1, 93:1, 155:1, 197:1, 58:1, 2116:1, 114:1, 481:1, 54:1, 99:1, 158:1, 518:1, 292:1, 119:1, 120:1}, EParameterImpl); _.eBasicRemoveFromContainerFeature = function eBasicRemoveFromContainerFeature_11(msgs){ return $eBasicRemoveFromContainerFeature_10(this, msgs); } ; _.eGet = function eGet_28(featureID, resolve, coreType){ var eClass, lower, upper; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , this.eAnnotations; case 1: return this.name_0; case 2: return $clinit_Boolean() , (this.eFlags & 256) != 0?true:false; case 3: return $clinit_Boolean() , (this.eFlags & 512) != 0?true:false; case 4: return valueOf_3(this.lowerBound); case 5: return valueOf_3(this.upperBound); case 6: return $clinit_Boolean() , upper = this.upperBound , upper > 1 || upper == -1?true:false; case 7: return $clinit_Boolean() , lower = this.lowerBound , lower >= 1?true:false; case 8: if (resolve) return $getEType(this); return this.eType; case 9: return this.eGenericType; case 10: return this.eFlags_0 >> 16 == 10?castTo(this.eContainer, 62):null; } return $eDynamicGet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EPARAMETER)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EPARAMETER:eClass), featureID), resolve, coreType); } ; _.eInverseAdd_0 = function eInverseAdd_18(otherEnd, featureID, msgs){ var eClass, eContainerFeatureID, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicAdd_0(this.eAnnotations, otherEnd, msgs); case 10: !!this.eContainer && (msgs = (eContainerFeatureID = this.eFlags_0 >> 16 , eContainerFeatureID >= 0?$eBasicRemoveFromContainerFeature_10(this, msgs):this.eContainer.eInverseRemove(this, -1 - eContainerFeatureID, null, msgs))); return $eBasicSetContainer(this, otherEnd, 10, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , EPARAMETER):eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseAdd(this, $eSettings_0(this), featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EPARAMETER)), otherEnd, msgs); } ; _.eInverseRemove_0 = function eInverseRemove_21(otherEnd, featureID, msgs){ var eClass, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicRemove_0(this.eAnnotations, otherEnd, msgs); case 9: return $basicUnsetEGenericType(this, msgs); case 10: return $eBasicSetContainer(this, null, 10, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , EPARAMETER):eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseRemove(this, $eSettings_0(this), featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EPARAMETER)), otherEnd, msgs); } ; _.eIsSet = function eIsSet_27(featureID){ var eClass, lower, upper; switch (featureID) { case 0: return !!this.eAnnotations && this.eAnnotations.size_0 != 0; case 1: return this.name_0 != null; case 2: return (this.eFlags & 256) == 0; case 3: return (this.eFlags & 512) == 0; case 4: return this.lowerBound != 0; case 5: return this.upperBound != 1; case 6: return upper = this.upperBound , upper > 1 || upper == -1; case 7: return lower = this.lowerBound , lower >= 1; case 8: return !!this.eType && !this.eGenericType.eTypeParameter && $getETypeArguments(this.eGenericType).size_0 == 0; case 9: return !!this.eGenericType && !(!!this.eType && !this.eGenericType.eTypeParameter && $getETypeArguments(this.eGenericType).size_0 == 0); case 10: return !!(this.eFlags_0 >> 16 == 10?castTo(this.eContainer, 62):null); } return $eDynamicIsSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EPARAMETER)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EPARAMETER:eClass), featureID)); } ; _.eStaticClass = function eStaticClass_27(){ return $clinit_EcorePackage$Literals() , EPARAMETER; } ; var Lorg_eclipse_emf_ecore_impl_EParameterImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EParameterImpl', 518); function $basicGetEReferenceType(this$static){ var eType; if (!this$static.eReferenceType) { eType = this$static.eType; instanceOf(eType, 90) && (this$static.eReferenceType = castTo(eType, 29)); } return this$static.eReferenceType; } function $getEOpposite(this$static){ var oldEOpposite; if (!!this$static.eOpposite && (this$static.eOpposite.eFlags_0 & 64) != 0) { oldEOpposite = this$static.eOpposite; this$static.eOpposite = castTo($eResolveProxy(this$static, oldEOpposite), 19); this$static.eOpposite != oldEOpposite && (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 9, 21, oldEOpposite, this$static.eOpposite)); } return this$static.eOpposite; } function $getEReferenceType(this$static){ var eType; if (!this$static.eReferenceType || (this$static.eFlags & 1) == 0 && (this$static.eReferenceType.eFlags_0 & 64) != 0) { eType = $getEType(this$static); instanceOf(eType, 90) && (this$static.eReferenceType = castTo(eType, 29)); } return this$static.eReferenceType; } function $setContainment(this$static, value_0){ $setContainmentGen(this$static, value_0); instanceOf(this$static.eContainer, 90) && $setFlags_0($getESuperAdapter(castTo(this$static.eContainer, 90)), 2); } function $setContainmentGen(this$static, newContainment){ var oldContainment; oldContainment = (this$static.eFlags & $intern_138) != 0; newContainment?(this$static.eFlags |= $intern_138):(this$static.eFlags &= -32769); (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_4(this$static, 1, 18, oldContainment, newContainment)); } function $setEOpposite(this$static, newEOpposite){ var oldEOpposite; oldEOpposite = this$static.eOpposite; this$static.eOpposite = newEOpposite; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 21, oldEOpposite, this$static.eOpposite)); } function $setResolveProxies(this$static, newResolveProxies){ var oldResolveProxies; oldResolveProxies = (this$static.eFlags & $intern_64) != 0; newResolveProxies?(this$static.eFlags |= $intern_64):(this$static.eFlags &= -65537); (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_4(this$static, 1, 20, oldResolveProxies, newResolveProxies)); } function EReferenceImpl(){ EStructuralFeatureImpl.call(this); this.eFlags |= $intern_64; } defineClass(102, 462, {110:1, 94:1, 93:1, 155:1, 197:1, 58:1, 19:1, 179:1, 69:1, 114:1, 481:1, 54:1, 99:1, 158:1, 102:1, 462:1, 292:1, 119:1, 120:1, 692:1}, EReferenceImpl); _.eGet = function eGet_29(featureID, resolve, coreType){ var eClass, lower, theOpposite, upper; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , this.eAnnotations; case 1: return this.name_0; case 2: return $clinit_Boolean() , (this.eFlags & 256) != 0?true:false; case 3: return $clinit_Boolean() , (this.eFlags & 512) != 0?true:false; case 4: return valueOf_3(this.lowerBound); case 5: return valueOf_3(this.upperBound); case 6: return $clinit_Boolean() , upper = this.upperBound , upper > 1 || upper == -1?true:false; case 7: return $clinit_Boolean() , lower = this.lowerBound , lower >= 1?true:false; case 8: if (resolve) return $getEType(this); return this.eType; case 9: return this.eGenericType; case 10: return $clinit_Boolean() , (this.eFlags & $intern_35) != 0?true:false; case 11: return $clinit_Boolean() , (this.eFlags & $intern_153) != 0?true:false; case 12: return $clinit_Boolean() , (this.eFlags & $intern_62) != 0?true:false; case 13: return this.defaultValueLiteral; case 14: return $getDefaultValue(this); case 15: return $clinit_Boolean() , (this.eFlags & $intern_152) != 0?true:false; case 16: return $clinit_Boolean() , (this.eFlags & $intern_17) != 0?true:false; case 17: return $getEContainingClass(this); case 18: return $clinit_Boolean() , (this.eFlags & $intern_138) != 0?true:false; case 19: return $clinit_Boolean() , theOpposite = $getEOpposite(this) , !!theOpposite && (theOpposite.eFlags & $intern_138) != 0?true:false; case 20: return $clinit_Boolean() , (this.eFlags & $intern_64) != 0?true:false; case 21: if (resolve) return $getEOpposite(this); return this.eOpposite; case 22: if (resolve) return $getEReferenceType(this); return $basicGetEReferenceType(this); case 23: return !this.eKeys && (this.eKeys = new EObjectResolvingEList(Lorg_eclipse_emf_ecore_EAttribute_2_classLit, this, 23)) , this.eKeys; } return $eDynamicGet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EREFERENCE)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EREFERENCE:eClass), featureID), resolve, coreType); } ; _.eIsSet = function eIsSet_28(featureID){ var eClass, lower, theOpposite, upper; switch (featureID) { case 0: return !!this.eAnnotations && this.eAnnotations.size_0 != 0; case 1: return this.name_0 != null; case 2: return (this.eFlags & 256) == 0; case 3: return (this.eFlags & 512) == 0; case 4: return this.lowerBound != 0; case 5: return this.upperBound != 1; case 6: return upper = this.upperBound , upper > 1 || upper == -1; case 7: return lower = this.lowerBound , lower >= 1; case 8: return !!this.eType && !this.eGenericType.eTypeParameter && $getETypeArguments(this.eGenericType).size_0 == 0; case 9: return !!this.eGenericType && !(!!this.eType && !this.eGenericType.eTypeParameter && $getETypeArguments(this.eGenericType).size_0 == 0); case 10: return (this.eFlags & $intern_35) == 0; case 11: return (this.eFlags & $intern_153) != 0; case 12: return (this.eFlags & $intern_62) != 0; case 13: return this.defaultValueLiteral != null; case 14: return $getDefaultValue(this) != null; case 15: return (this.eFlags & $intern_152) != 0; case 16: return (this.eFlags & $intern_17) != 0; case 17: return !!$getEContainingClass(this); case 18: return (this.eFlags & $intern_138) != 0; case 19: return theOpposite = $getEOpposite(this) , !!theOpposite && (theOpposite.eFlags & $intern_138) != 0; case 20: return (this.eFlags & $intern_64) == 0; case 21: return !!this.eOpposite; case 22: return !!$basicGetEReferenceType(this); case 23: return !!this.eKeys && this.eKeys.size_0 != 0; } return $eDynamicIsSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EREFERENCE)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EREFERENCE:eClass), featureID)); } ; _.eSet = function eSet_26(featureID, newValue){ var eClass, msgs; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $addAll_9(this.eAnnotations, castTo(newValue, 16)); return; case 1: $setName_0(this, castToString(newValue)); return; case 2: $setOrdered(this, $booleanValue(castToBoolean(newValue))); return; case 3: $setUnique_2(this, $booleanValue(castToBoolean(newValue))); return; case 4: $setLowerBound(this, castTo(newValue, 17).value_0); return; case 5: $setUpperBound(this, castTo(newValue, 17).value_0); return; case 8: $setEType(this, castTo(newValue, 142)); return; case 9: msgs = $setEGenericType(this, castTo(newValue, 89), null); !!msgs && msgs.dispatch_0(); return; case 10: $setChangeable(this, $booleanValue(castToBoolean(newValue))); return; case 11: $setVolatile(this, $booleanValue(castToBoolean(newValue))); return; case 12: $setTransient(this, $booleanValue(castToBoolean(newValue))); return; case 13: $setDefaultValueLiteral(this, castToString(newValue)); return; case 15: $setUnsettable(this, $booleanValue(castToBoolean(newValue))); return; case 16: $setDerived(this, $booleanValue(castToBoolean(newValue))); return; case 18: $setContainment(this, $booleanValue(castToBoolean(newValue))); return; case 20: $setResolveProxies(this, $booleanValue(castToBoolean(newValue))); return; case 21: $setEOpposite(this, castTo(newValue, 19)); return; case 23: !this.eKeys && (this.eKeys = new EObjectResolvingEList(Lorg_eclipse_emf_ecore_EAttribute_2_classLit, this, 23)); $clear_13(this.eKeys); !this.eKeys && (this.eKeys = new EObjectResolvingEList(Lorg_eclipse_emf_ecore_EAttribute_2_classLit, this, 23)); $addAll_9(this.eKeys, castTo(newValue, 16)); return; } $eDynamicSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EREFERENCE)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EREFERENCE:eClass), featureID), newValue); } ; _.eStaticClass = function eStaticClass_28(){ return $clinit_EcorePackage$Literals() , EREFERENCE; } ; _.eUnset = function eUnset_26(featureID){ var eClass, msgs; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); return; case 1: instanceOf(this.eContainer, 90) && $setFlags_0($getESuperAdapter(castTo(this.eContainer, 90)), 4); $setName(this, null); return; case 2: $setOrdered(this, true); return; case 3: $setUnique_2(this, true); return; case 4: $setLowerBound(this, 0); return; case 5: $setUpperBound(this, 1); return; case 8: $setEType(this, null); return; case 9: msgs = $setEGenericType(this, null, null); !!msgs && msgs.dispatch_0(); return; case 10: $setChangeable(this, true); return; case 11: $setVolatile(this, false); return; case 12: $setTransient(this, false); return; case 13: this.defaultValueFactory = null; $setDefaultValueLiteralGen(this, null); return; case 15: $setUnsettable(this, false); return; case 16: $setDerived(this, false); return; case 18: $setContainmentGen(this, false); instanceOf(this.eContainer, 90) && $setFlags_0($getESuperAdapter(castTo(this.eContainer, 90)), 2); return; case 20: $setResolveProxies(this, true); return; case 21: $setEOpposite(this, null); return; case 23: !this.eKeys && (this.eKeys = new EObjectResolvingEList(Lorg_eclipse_emf_ecore_EAttribute_2_classLit, this, 23)); $clear_13(this.eKeys); return; } $eDynamicUnset(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , EREFERENCE)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?EREFERENCE:eClass), featureID)); } ; _.freeze = function freeze_8(){ $getEReferenceType(this); $getName_0($getExtendedMetaData_1(($clinit_ExtendedMetaData() , INSTANCE_11), this)); $getEType(this); this.eFlags |= 1; } ; _.getEOpposite = function getEOpposite_0(){ return $getEOpposite(this); } ; _.isContainer = function isContainer_0(){ var theOpposite; return theOpposite = $getEOpposite(this) , !!theOpposite && (theOpposite.eFlags & $intern_138) != 0; } ; _.isContainment = function isContainment_6(){ return (this.eFlags & $intern_138) != 0; } ; _.isResolveProxies_0 = function isResolveProxies_1(){ return (this.eFlags & $intern_64) != 0; } ; _.setEType = function setEType_1(newEType, msgs){ this.eReferenceType = null; return $setEType_0(this, newEType, msgs); } ; _.toString_0 = function toString_154(){ var result; if ((this.eFlags_0 & 64) != 0) return $toString_29(this); result = new StringBuffer_1($toString_29(this)); result.string += ' (containment: '; $append_4(result, (this.eFlags & $intern_138) != 0); result.string += ', resolveProxies: '; $append_4(result, (this.eFlags & $intern_64) != 0); result.string += ')'; return result.string; } ; var Lorg_eclipse_emf_ecore_impl_EReferenceImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EReferenceImpl', 102); function $setKey(this$static, key){ $setTypedKeyGen(this$static, key == null?null:(checkCriticalNotNull(key) , key)); } function $setTypedKey_0(this$static, newKey){ $setTypedKeyGen(this$static, newKey == null?null:(checkCriticalNotNull(newKey) , newKey)); } function $setTypedKeyGen(this$static, newKey){ var oldKey; oldKey = this$static.key; this$static.key = newKey; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 0, oldKey, this$static.key)); } function $setTypedValue_0(this$static, newValue){ var oldValue; oldValue = this$static.value_0; this$static.value_0 = newValue; (this$static.eFlags_0 & 4) != 0 && (this$static.eFlags_0 & 1) == 0 && $eNotify(this$static, new ENotificationImpl_1(this$static, 1, 1, oldValue, this$static.value_0)); } function $setValue_2(this$static, value_0){ var oldValue; oldValue = this$static.value_0; $setTypedValue_0(this$static, value_0); return oldValue; } function EStringToStringMapEntryImpl(){ } defineClass(561, 120, {110:1, 44:1, 94:1, 93:1, 136:1, 58:1, 114:1, 54:1, 99:1, 561:1, 119:1, 120:1}, EStringToStringMapEntryImpl); _.equals_0 = function equals_224(other){ return this === other; } ; _.getKey = function getKey_11(){ return this.key; } ; _.getValue = function getValue_14(){ return this.value_0; } ; _.hashCode_1 = function hashCode_84(){ return getObjectIdentityHashCode(this); } ; _.setKey = function setKey_2(key){ $setKey(this, castToString(key)); } ; _.setValue = function setValue_14(value_0){ return $setValue_2(this, castToString(value_0)); } ; _.eGet = function eGet_30(featureID, resolve, coreType){ var eClass; switch (featureID) { case 0: return this.key; case 1: return this.value_0; } return $eDynamicGet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?ESTRING_TO_STRING_MAP_ENTRY:eClass), featureID), resolve, coreType); } ; _.eIsSet = function eIsSet_29(featureID){ var eClass; switch (featureID) { case 0: return this.key != null; case 1: return this.value_0 != null; } return $eDynamicIsSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?ESTRING_TO_STRING_MAP_ENTRY:eClass), featureID)); } ; _.eSet = function eSet_27(featureID, newValue){ var eClass; switch (featureID) { case 0: $setTypedKey_0(this, castToString(newValue)); return; case 1: $setTypedValue_0(this, castToString(newValue)); return; } $eDynamicSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?ESTRING_TO_STRING_MAP_ENTRY:eClass), featureID), newValue); } ; _.eStaticClass = function eStaticClass_29(){ return $clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY; } ; _.eUnset = function eUnset_27(featureID){ var eClass; switch (featureID) { case 0: $setTypedKeyGen(this, null); return; case 1: $setTypedValue_0(this, null); return; } $eDynamicUnset(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?ESTRING_TO_STRING_MAP_ENTRY:eClass), featureID)); } ; _.getHash = function getHash_2(){ var theKey; if (this.hash == -1) { theKey = this.key; this.hash = theKey == null?0:$hashCode_2(theKey); } return this.hash; } ; _.setHash = function setHash_2(hash){ this.hash = hash; } ; _.toString_0 = function toString_155(){ var result; if ((this.eFlags_0 & 64) != 0) return $toString_16(this); result = new StringBuffer_1($toString_16(this)); result.string += ' (key: '; $append_3(result, this.key); result.string += ', value: '; $append_3(result, this.value_0); result.string += ')'; return result.string; } ; _.hash = -1; _.key = null; _.value_0 = null; var Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStringToStringMapEntryImpl', 561); var Lorg_eclipse_emf_ecore_util_FeatureMap$Entry$Internal_2_classLit = createForInterface('org.eclipse.emf.ecore.util', 'FeatureMap/Entry/Internal'); function $validate_2(this$static, value_0){ var valueClass; if (value_0 != null && !this$static.eStructuralFeature.getEType().isInstance(value_0)) { valueClass = instanceOf(value_0, 58)?castTo(value_0, 58).eClass_0().name_0:$getName(getClass__Ljava_lang_Class___devirtual$(value_0)); throw toJs(new ClassCastException_0("The feature '" + this$static.eStructuralFeature.getName() + "'s type '" + this$static.eStructuralFeature.getEType().getName() + "' does not permit a value of type '" + valueClass + "'")); } } function EStructuralFeatureImpl$BasicFeatureMapEntry(eStructuralFeature){ this.eStructuralFeature = eStructuralFeature; } defineClass(576, 1, $intern_162); _.createEntry = function createEntry(value_0){ return this.createEntry_0(castTo(value_0, 54)); } ; _.createEntry_0 = function createEntry_0(value_0){ return this.createEntry(value_0); } ; _.equals_0 = function equals_225(that){ var entry, value_0; if (this === that) { return true; } else if (instanceOf(that, 76)) { entry = castTo(that, 76); if (entry.getEStructuralFeature() == this.eStructuralFeature) { value_0 = this.getValue(); return value_0 == null?entry.getValue() == null:equals_Ljava_lang_Object__Z__devirtual$(value_0, entry.getValue()); } else { return false; } } else { return false; } } ; _.getEStructuralFeature = function getEStructuralFeature_1(){ return this.eStructuralFeature; } ; _.hashCode_1 = function hashCode_85(){ var value_0; value_0 = this.getValue(); return hashCode__I__devirtual$(this.eStructuralFeature) ^ (value_0 == null?0:hashCode__I__devirtual$(value_0)); } ; _.toString_0 = function toString_156(){ var eStructuralFeature, prefix; eStructuralFeature = this.eStructuralFeature; prefix = $getEPackage(eStructuralFeature.getEContainingClass()).getNsPrefix(); eStructuralFeature.getName(); return (prefix != null && prefix.length != 0?prefix + ':' + eStructuralFeature.getName():eStructuralFeature.getName()) + '=' + this.getValue(); } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$BasicFeatureMapEntry_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/BasicFeatureMapEntry', 576); function $inverseAdd(this$static, owner, otherEnd, featureID, notifications){ var containmentFeatureID; if (otherEnd) { containmentFeatureID = $getFeatureID(owner.eClass_0(), this$static.eStructuralFeature); notifications = otherEnd.eInverseAdd(owner, -1 - (containmentFeatureID == -1?featureID:containmentFeatureID), null, notifications); } return notifications; } function $inverseRemove(this$static, owner, otherEnd, featureID, notifications){ var containmentFeatureID; if (otherEnd) { containmentFeatureID = $getFeatureID(owner.eClass_0(), this$static.eStructuralFeature); notifications = otherEnd.eInverseRemove(owner, -1 - (containmentFeatureID == -1?featureID:containmentFeatureID), null, notifications); } return notifications; } function EStructuralFeatureImpl$ContainmentUpdatingFeatureMapEntry(eStructuralFeature, value_0){ EStructuralFeatureImpl$BasicFeatureMapEntry.call(this, eStructuralFeature); this.value_0 = value_0; } defineClass(791, 576, $intern_162, EStructuralFeatureImpl$ContainmentUpdatingFeatureMapEntry); _.createEntry_0 = function createEntry_1(value_0){ return new EStructuralFeatureImpl$ContainmentUpdatingFeatureMapEntry(this.eStructuralFeature, value_0); } ; _.getValue = function getValue_15(){ return this.value_0; } ; _.inverseAdd_0 = function inverseAdd_3(owner, featureID, notifications){ return $inverseAdd(this, owner, this.value_0, featureID, notifications); } ; _.inverseRemove_0 = function inverseRemove_3(owner, featureID, notifications){ return $inverseRemove(this, owner, this.value_0, featureID, notifications); } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$ContainmentUpdatingFeatureMapEntry_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry', 791); function EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator(feature, featureMapFeature){ this.feature = feature; this.featureMapFeature = featureMapFeature; } defineClass(1350, 1, {}, EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator); _.dynamicGet_0 = function dynamicGet_3(owner, settings, index_0, resolve, coreType){ var featureMap; featureMap = castTo($eGet_0(owner, this.featureMapFeature), 220); return featureMap.setting(this.feature).get_6(resolve); } ; _.dynamicInverseAdd = function dynamicInverseAdd(owner, settings, index_0, otherEnd, notifications){ var featureMap; featureMap = castTo($eGet_0(owner, this.featureMapFeature), 220); return featureMap.basicAdd_0(this.feature, otherEnd, notifications); } ; _.dynamicInverseRemove = function dynamicInverseRemove(owner, settings, index_0, otherEnd, notifications){ var featureMap; featureMap = castTo($eGet_0(owner, this.featureMapFeature), 220); return featureMap.basicRemove_0(this.feature, otherEnd, notifications); } ; _.dynamicIsSet = function dynamicIsSet(owner, settings, index_0){ var featureMap; featureMap = castTo($eGet_0(owner, this.featureMapFeature), 220); return featureMap.setting(this.feature).isSet_0(); } ; _.dynamicSet_0 = function dynamicSet_3(owner, settings, index_0, newValue){ var featureMap; featureMap = castTo($eGet_0(owner, this.featureMapFeature), 220); featureMap.setting(this.feature).set_1(newValue); } ; _.dynamicSetting = function dynamicSetting(owner, settings, index_0){ return castTo($eGet_0(owner, this.featureMapFeature), 220).setting(this.feature); } ; _.dynamicUnset_0 = function dynamicUnset_3(owner, settings, index_0){ var featureMap; featureMap = castTo($eGet_0(owner, this.featureMapFeature), 220); featureMap.setting(this.feature).unset(); } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateFeatureMapDelegator_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator', 1350); function $createDynamicSetting(this$static, owner){ switch (this$static.style) { case 0: case 2: case 4: case 6: case 42: case 44: case 46: case 48: case 8: case 10: case 12: case 14: case 16: case 18: case 20: case 22: case 24: case 26: case 28: case 30: case 32: case 34: case 36: case 38: return new EcoreEList$Dynamic(this$static.dynamicKind, this$static.dataClass, owner, this$static.feature); case 1: return new EObjectContainmentEList$Unsettable(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature)); case 43: return new EObjectContainmentEList$Unsettable$Resolving(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature)); case 3: return new EObjectContainmentEList(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature)); case 45: return new EObjectContainmentEList$Resolving(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature)); case 41: return new EcoreEMap(castTo($getEType(this$static.feature), 29), this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature)); case 50: return new EcoreEMap$Unsettable(castTo($getEType(this$static.feature), 29), this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature)); case 5: return new EObjectContainmentWithInverseEList$Unsettable(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature), this$static.inverseFeature.featureID); case 47: return new EObjectContainmentWithInverseEList$Unsettable$Resolving(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature), this$static.inverseFeature.featureID); case 7: return new EObjectContainmentWithInverseEList(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature), this$static.inverseFeature.featureID); case 49: return new EObjectContainmentWithInverseEList$Resolving(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature), this$static.inverseFeature.featureID); case 9: return new EDataTypeUniqueEList$Unsettable(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature)); case 11: return new EDataTypeUniqueEList(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature)); case 13: return new EDataTypeEList$Unsettable(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature)); case 15: return new EDataTypeEList(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature)); case 17: return new EObjectResolvingEList$Unsettable(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature)); case 19: return new EObjectResolvingEList(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature)); case 21: return new EObjectEList$Unsettable(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature)); case 23: return new EObjectEList(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature)); case 25: return new EObjectWithInverseResolvingEList$Unsettable$ManyInverse(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature), this$static.inverseFeature.featureID); case 27: return new EObjectWithInverseResolvingEList$ManyInverse(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature), this$static.inverseFeature.featureID); case 29: return new EObjectWithInverseEList$Unsettable$ManyInverse(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature), this$static.inverseFeature.featureID); case 31: return new EObjectWithInverseEList$ManyInverse(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature), this$static.inverseFeature.featureID); case 33: return new EObjectWithInverseResolvingEList$Unsettable(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature), this$static.inverseFeature.featureID); case 35: return new EObjectWithInverseResolvingEList(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature), this$static.inverseFeature.featureID); case 37: return new EObjectWithInverseEList$Unsettable(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature), this$static.inverseFeature.featureID); case 39: return new EObjectWithInverseEList(this$static.dataClass, owner, $getFeatureID(owner.eClass_0(), this$static.feature), this$static.inverseFeature.featureID); case 40: return new BasicFeatureMap(owner, $getFeatureID(owner.eClass_0(), this$static.feature)); default:throw toJs(new RuntimeException_0('Unknown feature style: ' + this$static.style)); } } function EStructuralFeatureImpl$InternalSettingDelegateMany(style, dataClass, feature){ this.style = style; this.dataClass = dataClass; this.feature = feature; } function EStructuralFeatureImpl$InternalSettingDelegateMany_0(style, dataClass, feature, inverseFeature){ this.style = style; this.dataClass = dataClass; this.feature = feature; this.inverseFeature = inverseFeature; } function EStructuralFeatureImpl$InternalSettingDelegateMany_1(style, feature){ this.style = style; this.dataClass = Ljava_lang_Object_2_classLit; this.dynamicKind = kind_0(feature); this.feature = feature; } function EStructuralFeatureImpl$InternalSettingDelegateMany_2(style, feature, inverseFeature){ this.style = style; this.dataClass = Ljava_lang_Object_2_classLit; this.dynamicKind = kind_0(feature); this.feature = feature; this.inverseFeature = inverseFeature; } defineClass(91, 1, {}, EStructuralFeatureImpl$InternalSettingDelegateMany, EStructuralFeatureImpl$InternalSettingDelegateMany_0, EStructuralFeatureImpl$InternalSettingDelegateMany_1, EStructuralFeatureImpl$InternalSettingDelegateMany_2); _.dynamicGet_0 = function dynamicGet_4(owner, settings, index_0, resolve, coreType){ var result; result = settings.dynamicGet(index_0); result == null && settings.dynamicSet(index_0, result = $createDynamicSetting(this, owner)); if (!coreType) { switch (this.style) { case 50: case 41: return castTo(result, 597).map_2(); case 40: return castTo(result, 220).getWrapper(); } } return result; } ; _.dynamicInverseAdd = function dynamicInverseAdd_0(owner, settings, index_0, otherEnd, notifications){ var result, setting; setting = settings.dynamicGet(index_0); setting == null && settings.dynamicSet(index_0, setting = $createDynamicSetting(this, owner)); result = castTo(setting, 71).basicAdd(otherEnd, notifications); return result; } ; _.dynamicInverseRemove = function dynamicInverseRemove_0(owner, settings, index_0, otherEnd, notifications){ var setting; setting = settings.dynamicGet(index_0); setting != null && (notifications = castTo(setting, 71).basicRemove(otherEnd, notifications)); return notifications; } ; _.dynamicIsSet = function dynamicIsSet_0(owner, settings, index_0){ var setting; setting = settings.dynamicGet(index_0); return setting != null && castTo(setting, 79).isSet_0(); } ; _.dynamicSet_0 = function dynamicSet_4(owner, settings, index_0, newValue){ var setting; setting = castTo(settings.dynamicGet(index_0), 79); !setting && settings.dynamicSet(index_0, setting = $createDynamicSetting(this, owner)); setting.set_1(newValue); } ; _.dynamicSetting = function dynamicSetting_0(owner, settings, index_0){ var result, setting; setting = settings.dynamicGet(index_0); setting == null && settings.dynamicSet(index_0, setting = $createDynamicSetting(this, owner)); if (instanceOf(setting, 79)) { return castTo(setting, 79); } else { result = castTo(settings.dynamicGet(index_0), 15); return new EStructuralFeatureImpl$SettingMany(result); } } ; _.dynamicUnset_0 = function dynamicUnset_4(owner, settings, index_0){ var setting; setting = castTo(settings.dynamicGet(index_0), 79); !setting && settings.dynamicSet(index_0, setting = $createDynamicSetting(this, owner)); setting.unset(); } ; _.dynamicKind = 0; _.style = 0; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateMany_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateMany', 91); function $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle = emptyMethod; NIL_0 = ($clinit_EStructuralFeature$Internal$DynamicValueHolder() , NIL); } function EStructuralFeatureImpl$InternalSettingDelegateSingle(feature){ this.feature = feature; } defineClass(512, 1, {}); _.dynamicInverseAdd = function dynamicInverseAdd_1(owner, settings, index_0, otherEnd, notifications){ throw toJs(new UnsupportedOperationException); } ; _.dynamicInverseRemove = function dynamicInverseRemove_1(owner, settings, index_0, otherEnd, notifications){ throw toJs(new UnsupportedOperationException); } ; _.dynamicSetting = function dynamicSetting_1(owner, settings, index_0){ return new EStructuralFeatureImpl$InternalSettingDelegateSingle$1(this, owner, settings, index_0); } ; var NIL_0; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingle_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingle', 512); function EStructuralFeatureImpl$InternalSettingDelegateSingle$1(this$1, val$owner, val$settings, val$index){ this.this$11 = this$1; this.val$owner2 = val$owner; this.val$settings3 = val$settings; this.val$index4 = val$index; } defineClass(1367, 1, $intern_150, EStructuralFeatureImpl$InternalSettingDelegateSingle$1); _.get_6 = function get_66(resolve){ return this.this$11.dynamicGet_0(this.val$owner2, this.val$settings3, this.val$index4, resolve, true); } ; _.isSet_0 = function isSet_11(){ return this.this$11.dynamicIsSet(this.val$owner2, this.val$settings3, this.val$index4); } ; _.set_1 = function set_35(newValue){ this.this$11.dynamicSet_0(this.val$owner2, this.val$settings3, this.val$index4, newValue); } ; _.unset = function unset_7(){ this.this$11.dynamicUnset_0(this.val$owner2, this.val$settings3, this.val$index4); } ; _.val$index4 = 0; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingle$1_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingle/1', 1367); function EStructuralFeatureImpl$InternalSettingDelegateSingleContainer(eClass, feature, inverseFeature){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingle.call(this, feature); this.eClass = eClass; this.inverseFeature = inverseFeature; } defineClass(784, 512, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleContainer); _.dynamicGet_0 = function dynamicGet_5(owner, settings, index_0, resolve, coreType){ return eContainmentFeature(owner, owner.eInternalContainer(), owner.eContainerFeatureID_0()) == this.inverseFeature?this.isResolveProxies_0() && resolve?$eContainer(owner):owner.eInternalContainer():null; } ; _.dynamicInverseAdd = function dynamicInverseAdd_2(owner, settings, index_0, otherEnd, notifications){ var eContainerFeatureID, featureID; !!owner.eInternalContainer() && (notifications = (eContainerFeatureID = owner.eContainerFeatureID_0() , eContainerFeatureID >= 0?owner.eBasicRemoveFromContainerFeature(notifications):owner.eInternalContainer().eInverseRemove(owner, -1 - eContainerFeatureID, null, notifications))); featureID = $getFeatureID(owner.eClass_0(), this.feature); return owner.eBasicSetContainer_0(otherEnd, featureID, notifications); } ; _.dynamicInverseRemove = function dynamicInverseRemove_2(owner, settings, index_0, otherEnd, notifications){ var featureID; featureID = $getFeatureID(owner.eClass_0(), this.feature); return owner.eBasicSetContainer_0(null, featureID, notifications); } ; _.dynamicIsSet = function dynamicIsSet_1(owner, settings, index_0){ var featureID; featureID = $getFeatureID(owner.eClass_0(), this.feature); return !!owner.eInternalContainer() && owner.eContainerFeatureID_0() == featureID; } ; _.dynamicSet_0 = function dynamicSet_5(owner, settings, index_0, newValue){ var eContainer, eContainerFeatureID, featureID, internalEObject, notifications; if (newValue != null && !$isInstance(this.eClass, newValue)) { throw toJs(new ClassCastException_0("The value of type '" + (instanceOf(newValue, 58)?$toString_31(castTo(newValue, 58).eClass_0()):$toString_5(getClass__Ljava_lang_Class___devirtual$(newValue))) + "' must be of type '" + this.eClass + "'")); } eContainer = owner.eInternalContainer(); featureID = $getFeatureID(owner.eClass_0(), this.feature); if (maskUndefined(newValue) !== maskUndefined(eContainer) || owner.eContainerFeatureID_0() != featureID && newValue != null) { if (isAncestor(owner, castTo(newValue, 58))) throw toJs(new IllegalArgumentException_0('Recursive containment not allowed for ' + owner.toString_0())); notifications = null; !!eContainer && (notifications = (eContainerFeatureID = owner.eContainerFeatureID_0() , eContainerFeatureID >= 0?owner.eBasicRemoveFromContainerFeature(notifications):owner.eInternalContainer().eInverseRemove(owner, -1 - eContainerFeatureID, null, notifications))); internalEObject = castTo(newValue, 54); !!internalEObject && (notifications = internalEObject.eInverseAdd(owner, $getFeatureID(internalEObject.eClass_0(), this.inverseFeature), null, notifications)); notifications = owner.eBasicSetContainer_0(internalEObject, featureID, notifications); !!notifications && notifications.dispatch_0(); } else { owner.eBasicHasAdapters() && owner.eDeliver() && $eNotify(owner, new ENotificationImpl_1(owner, 1, featureID, newValue, newValue)); } } ; _.dynamicUnset_0 = function dynamicUnset_5(owner, settings, index_0){ var eContainer, eContainerFeatureID, featureID, notifications; eContainer = owner.eInternalContainer(); if (eContainer) { notifications = (eContainerFeatureID = owner.eContainerFeatureID_0() , eContainerFeatureID >= 0?owner.eBasicRemoveFromContainerFeature(null):owner.eInternalContainer().eInverseRemove(owner, -1 - eContainerFeatureID, null, null)); featureID = $getFeatureID(owner.eClass_0(), this.feature); notifications = owner.eBasicSetContainer_0(null, featureID, notifications); !!notifications && notifications.dispatch_0(); } else { owner.eBasicHasAdapters() && owner.eDeliver() && $eNotify(owner, new ENotificationImpl_17(owner, 1, this.feature, null, null)); } } ; _.isResolveProxies_0 = function isResolveProxies_2(){ return false; } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleContainer_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleContainer', 784); function EStructuralFeatureImpl$InternalSettingDelegateSingleContainerResolving(eClass, feature, inverseFeature){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingleContainer.call(this, eClass, feature, inverseFeature); } defineClass(1351, 784, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleContainerResolving); _.isResolveProxies_0 = function isResolveProxies_3(){ return true; } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleContainerResolving_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving', 1351); function EStructuralFeatureImpl$InternalSettingDelegateSingleData(defaultValue, intrinsicDefaultValue, feature){ EStructuralFeatureImpl$InternalSettingDelegateSingle.call(this, feature); this.defaultValue = defaultValue; this.intrinsicDefaultValue = intrinsicDefaultValue; this.notificationCreator = ($clinit_EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator() , OBJECT_NOTIFICATION_CREATOR); } function EStructuralFeatureImpl$InternalSettingDelegateSingleData_0(defaultValue, intrinsicDefaultValue, feature, notificationCreator){ EStructuralFeatureImpl$InternalSettingDelegateSingle.call(this, feature); this.defaultValue = defaultValue; this.intrinsicDefaultValue = intrinsicDefaultValue; this.notificationCreator = notificationCreator; } defineClass(574, 512, {}); _.dynamicGet_0 = function dynamicGet_6(owner, settings, index_0, resolve, coreType){ var result; return result = settings.dynamicGet(index_0) , result == null?this.defaultValue:maskUndefined(result) === maskUndefined(NIL_0)?null:result; } ; _.dynamicIsSet = function dynamicIsSet_2(owner, settings, index_0){ var setting; setting = settings.dynamicGet(index_0); return setting != null && (maskUndefined(setting) === maskUndefined(NIL_0) || !equals_Ljava_lang_Object__Z__devirtual$(setting, this.defaultValue)); } ; _.dynamicSet_0 = function dynamicSet_6(owner, settings, index_0, newValue){ var oldValue, result; if (owner.eBasicHasAdapters() && owner.eDeliver()) { oldValue = (result = settings.dynamicGet(index_0) , result == null?this.defaultValue:maskUndefined(result) === maskUndefined(NIL_0)?null:result); if (newValue == null) { if (this.intrinsicDefaultValue != null) { settings.dynamicSet(index_0, null); newValue = this.defaultValue; } else this.defaultValue != null?settings.dynamicSet(index_0, NIL_0):settings.dynamicSet(index_0, null); } else { this.validate_0(newValue); settings.dynamicSet(index_0, newValue); } $eNotify(owner, this.notificationCreator.createNotification_0(owner, 1, this.feature, oldValue, newValue)); } else { if (newValue == null) { this.intrinsicDefaultValue != null?settings.dynamicSet(index_0, null):this.defaultValue != null?settings.dynamicSet(index_0, NIL_0):settings.dynamicSet(index_0, null); } else { this.validate_0(newValue); settings.dynamicSet(index_0, newValue); } } } ; _.dynamicUnset_0 = function dynamicUnset_6(owner, settings, index_0){ var oldValue, result; if (owner.eBasicHasAdapters() && owner.eDeliver()) { oldValue = (result = settings.dynamicGet(index_0) , result == null?this.defaultValue:maskUndefined(result) === maskUndefined(NIL_0)?null:result); settings.dynamicUnset(index_0); $eNotify(owner, this.notificationCreator.createNotification_0(owner, 1, this.feature, oldValue, this.defaultValue)); } else { settings.dynamicUnset(index_0); } } ; _.validate_0 = function validate_2(object){ throw toJs(new ClassCastException); } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleData_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleData', 574); function $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator(){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator = emptyMethod; OBJECT_NOTIFICATION_CREATOR = new EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator; BOOLEAN_NOTIFICATION_CREATOR = new EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$1; BYTE_NOTIFICATION_CREATOR = new EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$2; CHAR_NOTIFICATION_CREATOR = new EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$3; DOUBLE_NOTIFICATION_CREATOR = new EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$4; FLOAT_NOTIFICATION_CREATOR = new EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$5; INT_NOTIFICATION_CREATOR = new EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$6; LONG_NOTIFICATION_CREATOR = new EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$7; SHORT_NOTIFICATION_CREATOR = new EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$8; } function EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator(){ } defineClass($intern_163, 1, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator); _.createNotification_0 = function createNotification_7(notifier, eventType, feature, oldValue, newValue){ return new ENotificationImpl_17(notifier, eventType, feature, oldValue, newValue); } ; _.createNotification_1 = function createNotification_8(notifier, eventType, feature, oldValue, newValue, wasSet){ return new ENotificationImpl_19(notifier, eventType, feature, oldValue, newValue, wasSet); } ; var BOOLEAN_NOTIFICATION_CREATOR, BYTE_NOTIFICATION_CREATOR, CHAR_NOTIFICATION_CREATOR, DOUBLE_NOTIFICATION_CREATOR, FLOAT_NOTIFICATION_CREATOR, INT_NOTIFICATION_CREATOR, LONG_NOTIFICATION_CREATOR, OBJECT_NOTIFICATION_CREATOR, SHORT_NOTIFICATION_CREATOR; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator', $intern_163); function EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$1(){ } defineClass(1368, $intern_163, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$1); _.createNotification_0 = function createNotification_9(notifier, eventType, feature, oldValue, newValue){ return new ENotificationImpl_22(notifier, eventType, feature, $booleanValue(castToBoolean(oldValue)), $booleanValue(castToBoolean(newValue))); } ; _.createNotification_1 = function createNotification_10(notifier, eventType, feature, oldValue, newValue, wasSet){ return new ENotificationImpl_23(notifier, eventType, feature, $booleanValue(castToBoolean(oldValue)), $booleanValue(castToBoolean(newValue)), wasSet); } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$1_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1', 1368); function EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$2(){ } defineClass(1369, $intern_163, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$2); _.createNotification_0 = function createNotification_11(notifier, eventType, feature, oldValue, newValue){ return new ENotificationImpl_5(notifier, eventType, feature, castTo(oldValue, 222).value_0, castTo(newValue, 222).value_0); } ; _.createNotification_1 = function createNotification_12(notifier, eventType, feature, oldValue, newValue, wasSet){ return new ENotificationImpl_6(notifier, eventType, feature, castTo(oldValue, 222).value_0, castTo(newValue, 222).value_0, wasSet); } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$2_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2', 1369); function EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$3(){ } defineClass(1370, $intern_163, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$3); _.createNotification_0 = function createNotification_13(notifier, eventType, feature, oldValue, newValue){ return new ENotificationImpl_7(notifier, eventType, feature, castTo(oldValue, 180).value_0, castTo(newValue, 180).value_0); } ; _.createNotification_1 = function createNotification_14(notifier, eventType, feature, oldValue, newValue, wasSet){ return new ENotificationImpl_8(notifier, eventType, feature, castTo(oldValue, 180).value_0, castTo(newValue, 180).value_0, wasSet); } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$3_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3', 1370); function EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$4(){ } defineClass(1371, $intern_163, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$4); _.createNotification_0 = function createNotification_15(notifier, eventType, feature, oldValue, newValue){ return new ENotificationImpl_9(notifier, eventType, feature, $doubleValue(castToDouble(oldValue)), $doubleValue(castToDouble(newValue))); } ; _.createNotification_1 = function createNotification_16(notifier, eventType, feature, oldValue, newValue, wasSet){ return new ENotificationImpl_10(notifier, eventType, feature, $doubleValue(castToDouble(oldValue)), $doubleValue(castToDouble(newValue)), wasSet); } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$4_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4', 1371); function EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$5(){ } defineClass(1372, $intern_163, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$5); _.createNotification_0 = function createNotification_17(notifier, eventType, feature, oldValue, newValue){ return new ENotificationImpl_11(notifier, eventType, feature, castTo(oldValue, 161).value_0, castTo(newValue, 161).value_0); } ; _.createNotification_1 = function createNotification_18(notifier, eventType, feature, oldValue, newValue, wasSet){ return new ENotificationImpl_12(notifier, eventType, feature, castTo(oldValue, 161).value_0, castTo(newValue, 161).value_0, wasSet); } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$5_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5', 1372); function EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$6(){ } defineClass(1373, $intern_163, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$6); _.createNotification_0 = function createNotification_19(notifier, eventType, feature, oldValue, newValue){ return new ENotificationImpl_13(notifier, eventType, feature, castTo(oldValue, 17).value_0, castTo(newValue, 17).value_0); } ; _.createNotification_1 = function createNotification_20(notifier, eventType, feature, oldValue, newValue, wasSet){ return new ENotificationImpl_14(notifier, eventType, feature, castTo(oldValue, 17).value_0, castTo(newValue, 17).value_0, wasSet); } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$6_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6', 1373); function EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$7(){ } defineClass(1374, $intern_163, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$7); _.createNotification_0 = function createNotification_21(notifier, eventType, feature, oldValue, newValue){ return new ENotificationImpl_15(notifier, eventType, feature, castTo(oldValue, 168).value_0, castTo(newValue, 168).value_0); } ; _.createNotification_1 = function createNotification_22(notifier, eventType, feature, oldValue, newValue, wasSet){ return new ENotificationImpl_16(notifier, eventType, feature, castTo(oldValue, 168).value_0, castTo(newValue, 168).value_0, wasSet); } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$7_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7', 1374); function EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$8(){ } defineClass(1375, $intern_163, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$8); _.createNotification_0 = function createNotification_23(notifier, eventType, feature, oldValue, newValue){ return new ENotificationImpl_20(notifier, eventType, feature, castTo(oldValue, 191).value_0, castTo(newValue, 191).value_0); } ; _.createNotification_1 = function createNotification_24(notifier, eventType, feature, oldValue, newValue, wasSet){ return new ENotificationImpl_21(notifier, eventType, feature, castTo(oldValue, 191).value_0, castTo(newValue, 191).value_0, wasSet); } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleData$NotificationCreator$8_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8', 1375); function EStructuralFeatureImpl$InternalSettingDelegateSingleDataDynamic(eDataType, defaultValue, intrinsicDefaultValue, feature){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingleData.call(this, defaultValue, intrinsicDefaultValue, feature); this.eDataType = eDataType; } defineClass(1353, 574, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleDataDynamic); _.validate_0 = function validate_3(object){ if (!this.eDataType.isInstance(object)) { throw toJs(new ClassCastException_0("The value of type '" + getClass__Ljava_lang_Class___devirtual$(object) + "' must be of type '" + this.eDataType + "'")); } } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleDataDynamic_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic', 1353); function EStructuralFeatureImpl$InternalSettingDelegateSingleDataStatic(defaultValue, intrinsicDefaultValue, feature, notificationCreator){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingleData_0.call(this, defaultValue, intrinsicDefaultValue, feature, notificationCreator); } defineClass(1354, 574, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleDataStatic); _.validate_0 = function validate_4(object){ } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleDataStatic_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic', 1354); defineClass(785, 574, {}); _.dynamicIsSet = function dynamicIsSet_3(owner, settings, index_0){ var setting; setting = settings.dynamicGet(index_0); return setting != null; } ; _.dynamicSet_0 = function dynamicSet_7(owner, settings, index_0, newValue){ var oldIsSet, oldValue; if (owner.eBasicHasAdapters() && owner.eDeliver()) { oldIsSet = true; oldValue = settings.dynamicGet(index_0); if (oldValue == null) { oldIsSet = false; oldValue = this.defaultValue; } else maskUndefined(oldValue) === maskUndefined(NIL_0) && (oldValue = null); if (newValue == null) { if (this.intrinsicDefaultValue != null) { settings.dynamicSet(index_0, null); newValue = this.defaultValue; } else { settings.dynamicSet(index_0, NIL_0); } } else { this.validate_0(newValue); settings.dynamicSet(index_0, newValue); } $eNotify(owner, this.notificationCreator.createNotification_1(owner, 1, this.feature, oldValue, newValue, !oldIsSet)); } else { if (newValue == null) { this.intrinsicDefaultValue != null?settings.dynamicSet(index_0, null):settings.dynamicSet(index_0, NIL_0); } else { this.validate_0(newValue); settings.dynamicSet(index_0, newValue); } } } ; _.dynamicUnset_0 = function dynamicUnset_7(owner, settings, index_0){ var oldIsSet, oldValue; if (owner.eBasicHasAdapters() && owner.eDeliver()) { oldIsSet = true; oldValue = settings.dynamicGet(index_0); if (oldValue == null) { oldIsSet = false; oldValue = this.defaultValue; } else maskUndefined(oldValue) === maskUndefined(NIL_0) && (oldValue = null); settings.dynamicUnset(index_0); $eNotify(owner, this.notificationCreator.createNotification_1(owner, 2, this.feature, oldValue, this.defaultValue, oldIsSet)); } else { settings.dynamicUnset(index_0); } } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleDataUnsettable_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable', 785); function EStructuralFeatureImpl$InternalSettingDelegateSingleDataUnsettableDynamic(eDataType, defaultValue, intrinsicDefaultValue, feature){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingleData.call(this, defaultValue, intrinsicDefaultValue, feature); this.eDataType = eDataType; } defineClass(1355, 785, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleDataUnsettableDynamic); _.validate_0 = function validate_5(object){ if (!this.eDataType.isInstance(object)) { throw toJs(new ClassCastException_0("The value of type '" + getClass__Ljava_lang_Class___devirtual$(object) + "' must be of type '" + this.eDataType + "'")); } } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleDataUnsettableDynamic_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic', 1355); function EStructuralFeatureImpl$InternalSettingDelegateSingleDataUnsettableStatic(defaultValue, intrinsicDefaultValue, feature, notificationCreator){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingleData_0.call(this, defaultValue, intrinsicDefaultValue, feature, notificationCreator); } defineClass(1356, 785, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleDataUnsettableStatic); _.validate_0 = function validate_6(object){ } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleDataUnsettableStatic_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic', 1356); function EStructuralFeatureImpl$InternalSettingDelegateSingleEObject(eClass, feature){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingle.call(this, feature); this.eClass = eClass; } function EStructuralFeatureImpl$InternalSettingDelegateSingleEObject_0(eClass, feature, inverseFeature){ EStructuralFeatureImpl$InternalSettingDelegateSingle.call(this, feature); this.eClass = eClass; this.inverseFeature = inverseFeature; } defineClass(410, 512, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleEObject); _.dynamicGet_0 = function dynamicGet_7(owner, settings, index_0, resolve, coreType){ var newEObject, notificationChain, oldEObject, resolvedEObject, result; result = settings.dynamicGet(index_0); if (this.isUnsettable() && maskUndefined(result) === maskUndefined(NIL_0)) { return null; } else if (this.isResolveProxies_0() && resolve && result != null) { oldEObject = castTo(result, 54); if (oldEObject.eIsProxy()) { resolvedEObject = $eResolveProxy(owner, oldEObject); if (oldEObject != resolvedEObject) { if (!$isInstance(this.eClass, resolvedEObject)) { throw toJs(new ClassCastException_0("The value of type '" + getClass__Ljava_lang_Class___devirtual$(resolvedEObject) + "' must be of type '" + this.eClass + "'")); } settings.dynamicSet(index_0, result = resolvedEObject); if (this.isContainment()) { newEObject = castTo(resolvedEObject, 54); notificationChain = oldEObject.eInverseRemove(owner, !this.inverseFeature?-1 - $getFeatureID(owner.eClass_0(), this.feature):$getFeatureID(oldEObject.eClass_0(), this.inverseFeature), null, null); !newEObject.eInternalContainer() && (notificationChain = newEObject.eInverseAdd(owner, !this.inverseFeature?-1 - $getFeatureID(owner.eClass_0(), this.feature):$getFeatureID(newEObject.eClass_0(), this.inverseFeature), null, notificationChain)); !!notificationChain && notificationChain.dispatch_0(); } owner.eBasicHasAdapters() && owner.eDeliver() && $eNotify(owner, new ENotificationImpl_17(owner, 9, this.feature, oldEObject, resolvedEObject)); } } return result; } else { return result; } } ; _.dynamicInverseAdd = function dynamicInverseAdd_3(owner, settings, index_0, otherEnd, notifications){ var internalEObject, oldValue; oldValue = settings.dynamicGet(index_0); maskUndefined(oldValue) === maskUndefined(NIL_0) && (oldValue = null); settings.dynamicSet(index_0, otherEnd); if (this.hasInverse()) { if (maskUndefined(oldValue) !== maskUndefined(otherEnd) && oldValue != null) { internalEObject = castTo(oldValue, 54); notifications = internalEObject.eInverseRemove(owner, $getFeatureID(internalEObject.eClass_0(), this.inverseFeature), null, notifications); } } else this.isContainment() && oldValue != null && (notifications = castTo(oldValue, 54).eInverseRemove(owner, -1 - $getFeatureID(owner.eClass_0(), this.feature), null, notifications)); if (owner.eBasicHasAdapters() && owner.eDeliver()) { !notifications && (notifications = new NotificationChainImpl_0(4)); notifications.add_5(new ENotificationImpl_17(owner, 1, this.feature, oldValue, otherEnd)); } return notifications; } ; _.dynamicInverseRemove = function dynamicInverseRemove_3(owner, settings, index_0, otherEnd, notifications){ var oldValue; oldValue = settings.dynamicGet(index_0); maskUndefined(oldValue) === maskUndefined(NIL_0) && (oldValue = null); settings.dynamicUnset(index_0); if (owner.eBasicHasAdapters() && owner.eDeliver()) { !notifications && (notifications = new NotificationChainImpl_0(4)); this.isUnsettable()?notifications.add_5(new ENotificationImpl_17(owner, 2, this.feature, oldValue, null)):notifications.add_5(new ENotificationImpl_17(owner, 1, this.feature, oldValue, null)); } return notifications; } ; _.dynamicIsSet = function dynamicIsSet_4(owner, settings, index_0){ var setting; setting = settings.dynamicGet(index_0); return setting != null; } ; _.dynamicSet_0 = function dynamicSet_8(owner, settings, index_0, newValue){ var internalEObject, notification, notifications, oldIsSet, oldValue; if (newValue != null && !$isInstance(this.eClass, newValue)) { throw toJs(new ClassCastException_0("The value of type '" + (instanceOf(newValue, 58)?$toString_31(castTo(newValue, 58).eClass_0()):$toString_5(getClass__Ljava_lang_Class___devirtual$(newValue))) + "' must be of type '" + this.eClass + "'")); } oldValue = settings.dynamicGet(index_0); oldIsSet = oldValue != null; this.isUnsettable() && maskUndefined(oldValue) === maskUndefined(NIL_0) && (oldValue = null); notifications = null; if (this.hasInverse()) { if (maskUndefined(oldValue) !== maskUndefined(newValue)) { if (oldValue != null) { internalEObject = castTo(oldValue, 54); notifications = internalEObject.eInverseRemove(owner, $getFeatureID(internalEObject.eClass_0(), this.inverseFeature), null, notifications); } if (newValue != null) { internalEObject = castTo(newValue, 54); notifications = internalEObject.eInverseAdd(owner, $getFeatureID(internalEObject.eClass_0(), this.inverseFeature), null, notifications); } } } else if (this.isContainment()) { if (maskUndefined(oldValue) !== maskUndefined(newValue)) { oldValue != null && (notifications = castTo(oldValue, 54).eInverseRemove(owner, -1 - $getFeatureID(owner.eClass_0(), this.feature), null, notifications)); newValue != null && (notifications = castTo(newValue, 54).eInverseAdd(owner, -1 - $getFeatureID(owner.eClass_0(), this.feature), null, notifications)); } } newValue == null && this.isUnsettable()?settings.dynamicSet(index_0, NIL_0):settings.dynamicSet(index_0, newValue); if (owner.eBasicHasAdapters() && owner.eDeliver()) { notification = new ENotificationImpl_19(owner, 1, this.feature, oldValue, newValue, this.isUnsettable() && !oldIsSet); if (!notifications) { $eNotify(owner, notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } else !!notifications && notifications.dispatch_0(); } ; _.dynamicUnset_0 = function dynamicUnset_8(owner, settings, index_0){ var internalEObject, notification, notifications, oldIsSet, oldValue; oldValue = settings.dynamicGet(index_0); oldIsSet = oldValue != null; this.isUnsettable() && maskUndefined(oldValue) === maskUndefined(NIL_0) && (oldValue = null); notifications = null; if (oldValue != null) { if (this.hasInverse()) { internalEObject = castTo(oldValue, 54); notifications = internalEObject.eInverseRemove(owner, $getFeatureID(internalEObject.eClass_0(), this.inverseFeature), null, notifications); } else this.isContainment() && (notifications = castTo(oldValue, 54).eInverseRemove(owner, -1 - $getFeatureID(owner.eClass_0(), this.feature), null, notifications)); } settings.dynamicUnset(index_0); if (owner.eBasicHasAdapters() && owner.eDeliver()) { notification = new ENotificationImpl_19(owner, this.isUnsettable()?2:1, this.feature, oldValue, null, oldIsSet); if (!notifications) { $eNotify(owner, notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } else !!notifications && notifications.dispatch_0(); } ; _.hasInverse = function hasInverse_6(){ return false; } ; _.isContainment = function isContainment_7(){ return false; } ; _.isResolveProxies_0 = function isResolveProxies_4(){ return false; } ; _.isUnsettable = function isUnsettable_1(){ return false; } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleEObject_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleEObject', 410); function EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainment(eClass, feature){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingleEObject.call(this, eClass, feature); } defineClass(575, 410, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainment); _.isContainment = function isContainment_8(){ return true; } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainment_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment', 575); function EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentResolving(eClass, feature){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainment.call(this, eClass, feature); } defineClass(1359, 575, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentResolving); _.isResolveProxies_0 = function isResolveProxies_5(){ return true; } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentResolving_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving', 1359); function EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentUnsettable(eClass, feature){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainment.call(this, eClass, feature); } defineClass(787, 575, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentUnsettable); _.isUnsettable = function isUnsettable_2(){ return true; } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentUnsettable_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable', 787); function EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentUnsettableResolving(eClass, feature){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentUnsettable.call(this, eClass, feature); } defineClass(1361, 787, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentUnsettableResolving); _.isResolveProxies_0 = function isResolveProxies_6(){ return true; } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentUnsettableResolving_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving', 1361); function EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentWithInverse(eClass, feature, inverseFeature){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingleEObject_0.call(this, eClass, feature, inverseFeature); } defineClass(650, 575, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentWithInverse); _.hasInverse = function hasInverse_7(){ return true; } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentWithInverse_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse', 650); function EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentWithInverseResolving(eClass, feature, inverseFeature){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentWithInverse.call(this, eClass, feature, inverseFeature); } defineClass(1360, 650, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentWithInverseResolving); _.isResolveProxies_0 = function isResolveProxies_7(){ return true; } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentWithInverseResolving_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving', 1360); function EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable(eClass, feature, inverseFeature){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentWithInverse.call(this, eClass, feature, inverseFeature); } defineClass(788, 650, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable); _.isUnsettable = function isUnsettable_3(){ return true; } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable', 788); function EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving(eClass, feature, inverseFeature){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable.call(this, eClass, feature, inverseFeature); } defineClass(1362, 788, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving); _.isResolveProxies_0 = function isResolveProxies_8(){ return true; } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving', 1362); function EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectResolving(eClass, feature){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingleEObject.call(this, eClass, feature); } defineClass(651, 410, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectResolving); _.isResolveProxies_0 = function isResolveProxies_9(){ return true; } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectResolving_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving', 651); function EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectResolvingUnsettable(eClass, feature){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectResolving.call(this, eClass, feature); } defineClass(1363, 651, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectResolvingUnsettable); _.isUnsettable = function isUnsettable_4(){ return true; } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectResolvingUnsettable_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable', 1363); function EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectResolvingWithInverse(eClass, feature, inverseFeature){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingleEObject_0.call(this, eClass, feature, inverseFeature); } defineClass(789, 651, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectResolvingWithInverse); _.hasInverse = function hasInverse_8(){ return true; } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectResolvingWithInverse_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse', 789); function EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable(eClass, feature, inverseFeature){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectResolvingWithInverse.call(this, eClass, feature, inverseFeature); } defineClass(1364, 789, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable); _.isUnsettable = function isUnsettable_5(){ return true; } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable', 1364); function EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectUnsettable(eClass, feature){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingleEObject.call(this, eClass, feature); } defineClass(1357, 410, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectUnsettable); _.isUnsettable = function isUnsettable_6(){ return true; } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectUnsettable_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable', 1357); function EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectWithInverse(eClass, feature, inverseFeature){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingleEObject_0.call(this, eClass, feature, inverseFeature); } defineClass(786, 410, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectWithInverse); _.hasInverse = function hasInverse_9(){ return true; } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectWithInverse_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse', 786); function EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectWithInverseUnsettable(eClass, feature, inverseFeature){ $clinit_EStructuralFeatureImpl$InternalSettingDelegateSingle(); EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectWithInverse.call(this, eClass, feature, inverseFeature); } defineClass(1358, 786, {}, EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectWithInverseUnsettable); _.isUnsettable = function isUnsettable_7(){ return true; } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InternalSettingDelegateSingleEObjectWithInverseUnsettable_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable', 1358); function $inverseAdd_0(this$static, owner, otherEnd, notifications){ !!otherEnd && (notifications = otherEnd.eInverseAdd(owner, $getFeatureID(otherEnd.eClass_0(), this$static.eStructuralFeature.getEOpposite()), null, notifications)); return notifications; } function $inverseRemove_0(this$static, owner, otherEnd, notifications){ !!otherEnd && (notifications = otherEnd.eInverseRemove(owner, $getFeatureID(otherEnd.eClass_0(), this$static.eStructuralFeature.getEOpposite()), null, notifications)); return notifications; } function EStructuralFeatureImpl$InverseUpdatingFeatureMapEntry(this$0, eStructuralFeature, value_0){ this.this$01 = this$0; EStructuralFeatureImpl$BasicFeatureMapEntry.call(this, eStructuralFeature); this.value_0 = value_0; } defineClass(790, 576, $intern_162, EStructuralFeatureImpl$InverseUpdatingFeatureMapEntry); _.createEntry_0 = function createEntry_2(value_0){ return new EStructuralFeatureImpl$InverseUpdatingFeatureMapEntry(this.this$01, this.eStructuralFeature, value_0); } ; _.getValue = function getValue_16(){ return this.value_0; } ; _.inverseAdd_0 = function inverseAdd_4(owner, featureID, notifications){ return $inverseAdd_0(this, owner, this.value_0, notifications); } ; _.inverseRemove_0 = function inverseRemove_4(owner, featureID, notifications){ return $inverseRemove_0(this, owner, this.value_0, notifications); } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$InverseUpdatingFeatureMapEntry_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry', 790); function EStructuralFeatureImpl$SettingMany(list){ this.list = list; } defineClass(1365, 1, $intern_150, EStructuralFeatureImpl$SettingMany); _.get_6 = function get_67(resolve){ return this.list; } ; _.isSet_0 = function isSet_12(){ return instanceOf(this.list, 97)?castTo(this.list, 97).isSet_0():!this.list.isEmpty(); } ; _.set_1 = function set_36(newValue){ this.list.clear_0(); this.list.addAll(castTo(newValue, 15)); } ; _.unset = function unset_8(){ instanceOf(this.list, 97)?castTo(this.list, 97).unset():this.list.clear_0(); } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$SettingMany_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/SettingMany', 1365); function EStructuralFeatureImpl$SimpleContentFeatureMapEntry(eStructuralFeature){ this.eStructuralFeature = eStructuralFeature; this.eDataType = castTo($getEType(eStructuralFeature), 156); this.eFactory = this.eDataType.getEPackage().getEFactoryInstance(); } defineClass(1366, 576, $intern_162, EStructuralFeatureImpl$SimpleContentFeatureMapEntry); _.createEntry = function createEntry_3(value_0){ return new EStructuralFeatureImpl$SimpleFeatureMapEntry(($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT__TEXT), this.eFactory.convertToString(this.eDataType, value_0)); } ; _.getValue = function getValue_17(){ return null; } ; _.inverseAdd_0 = function inverseAdd_5(owner, featureID, notifications){ return notifications; } ; _.inverseRemove_0 = function inverseRemove_5(owner, featureID, notifications){ return notifications; } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$SimpleContentFeatureMapEntry_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/SimpleContentFeatureMapEntry', 1366); function EStructuralFeatureImpl$SimpleFeatureMapEntry(eStructuralFeature, value_0){ EStructuralFeatureImpl$BasicFeatureMapEntry.call(this, eStructuralFeature); this.value_0 = value_0; } defineClass(652, 576, $intern_162, EStructuralFeatureImpl$SimpleFeatureMapEntry); _.createEntry = function createEntry_4(value_0){ return new EStructuralFeatureImpl$SimpleFeatureMapEntry(this.eStructuralFeature, value_0); } ; _.getValue = function getValue_18(){ return this.value_0; } ; _.inverseAdd_0 = function inverseAdd_6(owner, featureID, notifications){ return notifications; } ; _.inverseRemove_0 = function inverseRemove_6(owner, featureID, notifications){ return notifications; } ; var Lorg_eclipse_emf_ecore_impl_EStructuralFeatureImpl$SimpleFeatureMapEntry_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EStructuralFeatureImpl/SimpleFeatureMapEntry', 652); function ESuperAdapter$1(){ } defineClass(403, 506, $intern_141, ESuperAdapter$1); _.newData = function newData_12(capacity){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EClass_2_classLit, $intern_2, 29, capacity, 0, 1); } ; _.useEquals = function useEquals_13(){ return false; } ; var Lorg_eclipse_emf_ecore_impl_ESuperAdapter$1_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'ESuperAdapter/1', 403); function $getEGenericTypes(this$static){ !this$static.eGenericTypes && (this$static.eGenericTypes = new ETypeParameterImpl$2$1(new ETypeParameterImpl$2)); return this$static.eGenericTypes; } function ETypeParameterImpl(){ } defineClass(457, 448, {110:1, 94:1, 93:1, 155:1, 197:1, 58:1, 114:1, 850:1, 54:1, 99:1, 158:1, 457:1, 119:1, 120:1}, ETypeParameterImpl); _.eGet = function eGet_31(featureID, resolve, coreType){ var eClass; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , this.eAnnotations; case 1: return this.name_0; case 2: return !this.eBounds && (this.eBounds = new ETypeParameterImpl$1(this, Lorg_eclipse_emf_ecore_EGenericType_2_classLit, this)) , this.eBounds; } return $eDynamicGet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , ETYPE_PARAMETER)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?ETYPE_PARAMETER:eClass), featureID), resolve, coreType); } ; _.eInverseRemove_0 = function eInverseRemove_22(otherEnd, featureID, msgs){ var eClass, feature; switch (featureID) { case 0: return !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)) , $basicRemove_0(this.eAnnotations, otherEnd, msgs); case 2: return !this.eBounds && (this.eBounds = new ETypeParameterImpl$1(this, Lorg_eclipse_emf_ecore_EGenericType_2_classLit, this)) , $basicRemove_0(this.eBounds, otherEnd, msgs); } return feature = castTo($getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?($clinit_EcorePackage$Literals() , ETYPE_PARAMETER):eClass), featureID), 69) , feature.getSettingDelegate().dynamicInverseRemove(this, $eSettings_0(this), featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , ETYPE_PARAMETER)), otherEnd, msgs); } ; _.eIsSet = function eIsSet_30(featureID){ var eClass; switch (featureID) { case 0: return !!this.eAnnotations && this.eAnnotations.size_0 != 0; case 1: return this.name_0 != null; case 2: return !!this.eBounds && this.eBounds.size_0 != 0; } return $eDynamicIsSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , ETYPE_PARAMETER)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?ETYPE_PARAMETER:eClass), featureID)); } ; _.eSet = function eSet_28(featureID, newValue){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $addAll_9(this.eAnnotations, castTo(newValue, 16)); return; case 1: $setName(this, castToString(newValue)); return; case 2: !this.eBounds && (this.eBounds = new ETypeParameterImpl$1(this, Lorg_eclipse_emf_ecore_EGenericType_2_classLit, this)); $clear_13(this.eBounds); !this.eBounds && (this.eBounds = new ETypeParameterImpl$1(this, Lorg_eclipse_emf_ecore_EGenericType_2_classLit, this)); $addAll_9(this.eBounds, castTo(newValue, 16)); return; } $eDynamicSet(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , ETYPE_PARAMETER)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?ETYPE_PARAMETER:eClass), featureID), newValue); } ; _.eStaticClass = function eStaticClass_30(){ return $clinit_EcorePackage$Literals() , ETYPE_PARAMETER; } ; _.eUnset = function eUnset_28(featureID){ var eClass; switch (featureID) { case 0: !this.eAnnotations && (this.eAnnotations = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, this, 0, 3)); $clear_13(this.eAnnotations); return; case 1: $setName(this, null); return; case 2: !this.eBounds && (this.eBounds = new ETypeParameterImpl$1(this, Lorg_eclipse_emf_ecore_EGenericType_2_classLit, this)); $clear_13(this.eBounds); return; } $eDynamicUnset(this, featureID - $getFeatureCount(($clinit_EcorePackage$Literals() , ETYPE_PARAMETER)), $getEStructuralFeature((eClass = castTo($getField(this, 16), 29) , !eClass?ETYPE_PARAMETER:eClass), featureID)); } ; var Lorg_eclipse_emf_ecore_impl_ETypeParameterImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'ETypeParameterImpl', 457); function $inverseAdd_1(this$static, object, notifications){ var delegateIterator, eGenericType, eGenericType$iterator, eGenericTypes, internalEObject; notifications = (internalEObject = object , $eInverseAdd(internalEObject, this$static.owner, -1 - this$static.featureID, notifications)); eGenericTypes = $getEGenericTypes(this$static.this$01); for (eGenericType$iterator = (delegateIterator = new AbstractHashMap$EntrySetIterator((new AbstractHashMap$EntrySet(eGenericTypes.this$11)).this$01) , new ETypeParameterImpl$2$1$1(delegateIterator)); eGenericType$iterator.val$delegateIterator2.hasNext;) { eGenericType = castTo($next_3(eGenericType$iterator.val$delegateIterator2).getKey(), 89); notifications = $setERawType(eGenericType, $getErasure(eGenericType, this$static.this$01), notifications); } return notifications; } function $inverseRemove_1(this$static, object, notifications){ var delegateIterator, eGenericType, eGenericType$iterator, eGenericTypes, internalEObject; notifications = (internalEObject = object , $eInverseRemove(internalEObject, this$static.owner, -1 - this$static.featureID, notifications)); eGenericTypes = $getEGenericTypes(this$static.this$01); for (eGenericType$iterator = (delegateIterator = new AbstractHashMap$EntrySetIterator((new AbstractHashMap$EntrySet(eGenericTypes.this$11)).this$01) , new ETypeParameterImpl$2$1$1(delegateIterator)); eGenericType$iterator.val$delegateIterator2.hasNext;) { eGenericType = castTo($next_3(eGenericType$iterator.val$delegateIterator2).getKey(), 89); notifications = $setERawType(eGenericType, $getErasure(eGenericType, this$static.this$01), notifications); } return notifications; } function ETypeParameterImpl$1(this$0, $anonymous0, $anonymous1){ this.this$01 = this$0; EObjectContainmentEList.call(this, $anonymous0, $anonymous1, 2); } defineClass(458, 83, $intern_157, ETypeParameterImpl$1); _.inverseAdd = function inverseAdd_7(object, notifications){ return $inverseAdd_1(this, castTo(object, 89), notifications); } ; _.inverseRemove = function inverseRemove_7(object, notifications){ return $inverseRemove_1(this, castTo(object, 89), notifications); } ; var Lorg_eclipse_emf_ecore_impl_ETypeParameterImpl$1_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'ETypeParameterImpl/1', 458); function ETypeParameterImpl$2(){ HashMap.call(this); } defineClass(647, 45, $intern_76, ETypeParameterImpl$2); _.keySet_0 = function keySet_20(){ return new ETypeParameterImpl$2$1(this); } ; var Lorg_eclipse_emf_ecore_impl_ETypeParameterImpl$2_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'ETypeParameterImpl/2', 647); function $add_30(this$static, eGenericType){ return $put_6(this$static.this$11, eGenericType, '') == null; } function $remove_42(this$static, object){ if ($containsKey_3(this$static.this$11, object)) { $remove_6(this$static.this$11, object); return true; } else { return false; } } function ETypeParameterImpl$2$1(this$1){ this.this$11 = this$1; } defineClass(570, $intern_9, $intern_10, ETypeParameterImpl$2$1); _.add_2 = function add_65(eGenericType){ return $add_30(this, castTo(eGenericType, 89)); } ; _.addAll = function addAll_34(eGenericTypes){ var eGenericType, eGenericType$iterator, result; result = false; for (eGenericType$iterator = eGenericTypes.iterator_0(); eGenericType$iterator.hasNext_0();) { eGenericType = castTo(eGenericType$iterator.next_1(), 89); $put_6(this.this$11, eGenericType, '') == null && (result = true); } return result; } ; _.clear_0 = function clear_65(){ $reset(this.this$11); } ; _.contains = function contains_65(object){ return $containsKey_3(this.this$11, object); } ; _.iterator_0 = function iterator_89(){ var delegateIterator; return delegateIterator = new AbstractHashMap$EntrySetIterator((new AbstractHashMap$EntrySet(this.this$11)).this$01) , new ETypeParameterImpl$2$1$1(delegateIterator); } ; _.remove_1 = function remove_127(object){ return $remove_42(this, object); } ; _.size_1 = function size_79(){ return $size_2(this.this$11); } ; var Lorg_eclipse_emf_ecore_impl_ETypeParameterImpl$2$1_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'ETypeParameterImpl/2/1', 570); function ETypeParameterImpl$2$1$1(val$delegateIterator){ this.val$delegateIterator2 = val$delegateIterator; } defineClass(571, 1, $intern_6, ETypeParameterImpl$2$1$1); _.forEachRemaining = function forEachRemaining_58(consumer){ $forEachRemaining(this, consumer); } ; _.next_1 = function next_48(){ return castTo($next_3(this.val$delegateIterator2).getKey(), 89); } ; _.hasNext_0 = function hasNext_47(){ return this.val$delegateIterator2.hasNext; } ; _.remove = function remove_128(){ $remove_7(this.val$delegateIterator2); } ; var Lorg_eclipse_emf_ecore_impl_ETypeParameterImpl$2$1$1_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'ETypeParameterImpl/2/1/1', 571); function EValidatorRegistryImpl(){ HashMap.call(this); } defineClass(1329, 45, $intern_76, EValidatorRegistryImpl); _.containsKey = function containsKey_17(key){ return instanceOfString(key)?$hasStringValue(this, key):!!$getEntry_0(this.hashCodeMap, key); } ; _.get_3 = function get_68(key){ var eValidator, eValidatorDescriptor; eValidator = instanceOfString(key)?$getStringValue(this, key):getEntryValueOrNull($getEntry_0(this.hashCodeMap, key)); if (instanceOf(eValidator, 851)) { eValidatorDescriptor = castTo(eValidator, 851); eValidator = eValidatorDescriptor.getEValidator(); $put_6(this, castTo(key, 241), eValidator); return eValidator; } else return eValidator != null?eValidator:key == null?($clinit_EObjectValidator() , INSTANCE_9):null; } ; var Lorg_eclipse_emf_ecore_impl_EValidatorRegistryImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EValidatorRegistryImpl', 1329); function $booleanValueOf(initialValue){ if ($equalsIgnoreCase('true', initialValue)) { return $clinit_Boolean() , TRUE_0; } else if ($equalsIgnoreCase('false', initialValue)) { return $clinit_Boolean() , FALSE_0; } else { throw toJs(new IllegalArgumentException_0('Expecting true or false')); } } function $convertEByteArrayToString(instanceValue){ var bytes; if (instanceValue == null) { return null; } else { bytes = castTo(instanceValue, 195); return $bytesToHexString(bytes, bytes.length); } } function $convertECharToString(instanceValue){ if (instanceOf(instanceValue, 180)) { return '' + castTo(instanceValue, 180).value_0; } return instanceValue == null?null:toString_40(instanceValue); } function $convertECharacterObjectToString(instanceValue){ if (instanceOf(instanceValue, 180)) { return '' + castTo(instanceValue, 180).value_0; } return instanceValue == null?null:toString_40(instanceValue); } function $createECharFromString(initialValue){ var carray, charValue; if (initialValue == null) { return null; } charValue = 0; try { charValue = __parseAndValidateInt(initialValue, $intern_43, $intern_0) & $intern_47; } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 130)) { carray = $toCharArray(initialValue); charValue = carray[0]; } else throw toJs($e0); } return valueOf_2(charValue); } function $createECharacterObjectFromString(initialValue){ var carray, charValue; if (initialValue == null) { return null; } charValue = 0; try { charValue = __parseAndValidateInt(initialValue, $intern_43, $intern_0) & $intern_47; } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 130)) { carray = $toCharArray(initialValue); charValue = carray[0]; } else throw toJs($e0); } return valueOf_2(charValue); } function $createEDateFromString(initialValue){ var exception, i, parseException; if (initialValue == null) { return null; } exception = null; for (i = 0; i < EDATE_FORMATS.length; ++i) { try { return $parse_2(EDATE_FORMATS[i], initialValue); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 33)) { parseException = $e0; exception = parseException; } else throw toJs($e0); } } throw toJs(new WrappedException(exception)); } function EcoreFactoryImpl(){ } function init_3(){ $clinit_EFactoryImpl(); var exception, theEcoreFactory; try { theEcoreFactory = castTo($getEFactory(($clinit_EPackage$Registry() , INSTANCE_6), 'http://www.eclipse.org/emf/2002/Ecore'), 2040); if (theEcoreFactory) { return theEcoreFactory; } } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 103)) { exception = $e0; $log_2(($clinit_EcorePlugin() , exception)); } else throw toJs($e0); } return new EcoreFactoryImpl; } defineClass(1349, 720, {110:1, 94:1, 93:1, 480:1, 155:1, 58:1, 114:1, 2040:1, 54:1, 99:1, 158:1, 119:1, 120:1}, EcoreFactoryImpl); _.convertToString = function convertToString_1(eDataType, instanceValue){ switch (eDataType.getClassifierID()) { case 21: case 22: case 23: case 24: case 26: case 31: case 32: case 37: case 38: case 39: case 40: case 43: case 44: case 48: case 49: case 20: return instanceValue == null?null:toString_40(instanceValue); case 25: return $convertEByteArrayToString(instanceValue); case 27: return $convertECharToString(instanceValue); case 28: return $convertECharacterObjectToString(instanceValue); case 29: return instanceValue == null?null:$format_0(EDATE_FORMATS[0], castTo(instanceValue, 206)); case 41: return instanceValue == null?'':$getName(castTo(instanceValue, 297)); case 42: return toString_40(instanceValue); case 50: return castToString(instanceValue); default:throw toJs(new IllegalArgumentException_0("The datatype '" + eDataType.getName() + "' is not a valid classifier")); } } ; _.create_3 = function create_49(eClass0){ var eAnnotation, eAttribute, eClass, eDataType, eEnum, eEnumLiteral, eFactory, eGenericType, eObject, eOperation, ePackage, ePackage0, eParameter, eReference, eStringToStringMapEntry, eTypeParameter; switch (eClass0.metaObjectID == -1 && (eClass0.metaObjectID = (ePackage0 = $getEPackage(eClass0) , ePackage0?$indexOf_6(ePackage0.getEClassifiers(), eClass0):-1)) , eClass0.metaObjectID) { case 0: return eAttribute = new EAttributeImpl , eAttribute; case 1: return eAnnotation = new EAnnotationImpl , eAnnotation; case 2: return eClass = new EClassImpl , eClass; case 4: return eDataType = new EDataTypeImpl , eDataType; case 5: return eEnum = new EEnumImpl , eEnum; case 6: return eEnumLiteral = new EEnumLiteralImpl , eEnumLiteral; case 7: return eFactory = new EFactoryImpl , eFactory; case 10: return eObject = new EObjectImpl , eObject; case 11: return eOperation = new EOperationImpl , eOperation; case 12: return ePackage = new EPackageImpl , ePackage; case 13: return eParameter = new EParameterImpl , eParameter; case 14: return eReference = new EReferenceImpl , eReference; case 17: return eStringToStringMapEntry = new EStringToStringMapEntryImpl , eStringToStringMapEntry; case 18: return eGenericType = new EGenericTypeImpl , eGenericType; case 19: return eTypeParameter = new ETypeParameterImpl , eTypeParameter; default:throw toJs(new IllegalArgumentException_0("The class '" + eClass0.name_0 + "' is not a valid classifier")); } } ; _.createFromString = function createFromString_1(eDataType, initialValue){ switch (eDataType.getClassifierID()) { case 20: return initialValue == null?null:new BigDecimal_0(initialValue); case 21: return initialValue == null?null:new BigInteger_3(initialValue); case 23: case 22: return initialValue == null?null:$booleanValueOf(initialValue); case 26: case 24: return initialValue == null?null:get_32(__parseAndValidateInt(initialValue, -128, 127) << 24 >> 24); case 25: return $hexStringToBytes(initialValue); case 27: return $createECharFromString(initialValue); case 28: return $createECharacterObjectFromString(initialValue); case 29: return $createEDateFromString(initialValue); case 32: case 31: return initialValue == null?null:__parseAndValidateDouble(initialValue); case 38: case 37: return initialValue == null?null:new Float_0(initialValue); case 40: case 39: return initialValue == null?null:valueOf_3(__parseAndValidateInt(initialValue, $intern_43, $intern_0)); case 41: return null; case 42: return initialValue == null?null:null; case 44: case 43: return initialValue == null?null:valueOf_4(__parseAndValidateLong(initialValue)); case 49: case 48: return initialValue == null?null:valueOf_5(__parseAndValidateInt(initialValue, $intern_164, 32767) << 16 >> 16); case 50: return initialValue; default:throw toJs(new IllegalArgumentException_0("The datatype '" + eDataType.getName() + "' is not a valid classifier")); } } ; var Lorg_eclipse_emf_ecore_impl_EcoreFactoryImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcoreFactoryImpl', 1349); function $clinit_EcorePackageImpl(){ $clinit_EcorePackageImpl = emptyMethod; eGenericTypes_0 = new ArrayList; } function $$init_12(this$static){ this$static.eAttributeEClass = null; this$static.eAnnotationEClass = null; this$static.eClassEClass = null; this$static.eDataTypeEClass = null; this$static.eEnumEClass = null; this$static.eEnumLiteralEClass = null; this$static.eFactoryEClass = null; this$static.eClassifierEClass = null; this$static.eModelElementEClass = null; this$static.eNamedElementEClass = null; this$static.eObjectEClass = null; this$static.eOperationEClass = null; this$static.ePackageEClass = null; this$static.eParameterEClass = null; this$static.eReferenceEClass = null; this$static.eStructuralFeatureEClass = null; this$static.eTypedElementEClass = null; this$static.eStringToStringMapEntryEClass = null; this$static.eGenericTypeEClass = null; this$static.eTypeParameterEClass = null; this$static.eBigDecimalEDataType = null; this$static.eBigIntegerEDataType = null; this$static.eBooleanObjectEDataType = null; this$static.eCharacterObjectEDataType = null; this$static.eDateEDataType = null; this$static.eDiagnosticChainEDataType = null; this$static.eDoubleObjectEDataType = null; this$static.eFloatObjectEDataType = null; this$static.eIntegerObjectEDataType = null; this$static.eBooleanEDataType = null; this$static.eByteObjectEDataType = null; this$static.eByteEDataType = null; this$static.eByteArrayEDataType = null; this$static.eCharEDataType = null; this$static.eDoubleEDataType = null; this$static.eFloatEDataType = null; this$static.eIntEDataType = null; this$static.eJavaClassEDataType = null; this$static.eJavaObjectEDataType = null; this$static.eLongObjectEDataType = null; this$static.eMapEDataType = null; this$static.eShortObjectEDataType = null; this$static.eLongEDataType = null; this$static.eShortEDataType = null; this$static.eTreeIteratorEDataType = null; this$static.eInvocationTargetExceptionEDataType = null; this$static.eFeatureMapEntryEDataType = null; this$static.eEnumeratorEDataType = null; this$static.eFeatureMapEDataType = null; this$static.eStringEDataType = null; this$static.eeListEDataType = null; this$static.eResourceEDataType = null; this$static.eResourceSetEDataType = null; this$static.isCreated = false; this$static.isInitialized = false; } function $createEGenericType_1(){ var eGenericType, eGenericType0, eGenericType1; eGenericType0 = (eGenericType1 = (eGenericType = new EGenericTypeImpl , eGenericType) , eGenericType1); $add_3(eGenericTypes_0, eGenericType0); return eGenericType0; } function $createEcoreAnnotations(this$static){ $addAnnotation(this$static.eAttributeEClass, 'http://www.eclipse.org/emf/2002/Ecore', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['constraints', 'ConsistentTransient'])); $addAnnotation(this$static.eAnnotationEClass, 'http://www.eclipse.org/emf/2002/Ecore', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['constraints', 'WellFormedSourceURI'])); $addAnnotation(this$static.eClassEClass, 'http://www.eclipse.org/emf/2002/Ecore', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['constraints', 'InterfaceIsAbstract AtMostOneID UniqueFeatureNames UniqueOperationSignatures NoCircularSuperTypes WellFormedMapEntryClass ConsistentSuperTypes DisjointFeatureAndOperationSignatures'])); $addAnnotation(this$static.eClassifierEClass, 'http://www.eclipse.org/emf/2002/Ecore', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['constraints', 'WellFormedInstanceTypeName UniqueTypeParameterNames'])); $addAnnotation(this$static.eEnumEClass, 'http://www.eclipse.org/emf/2002/Ecore', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['constraints', 'UniqueEnumeratorNames UniqueEnumeratorLiterals'])); $addAnnotation(this$static.eNamedElementEClass, 'http://www.eclipse.org/emf/2002/Ecore', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['constraints', 'WellFormedName'])); $addAnnotation(this$static.eOperationEClass, 'http://www.eclipse.org/emf/2002/Ecore', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['constraints', 'UniqueParameterNames UniqueTypeParameterNames NoRepeatingVoid'])); $addAnnotation(this$static.ePackageEClass, 'http://www.eclipse.org/emf/2002/Ecore', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['constraints', 'WellFormedNsURI WellFormedNsPrefix UniqueSubpackageNames UniqueClassifierNames UniqueNsURIs'])); $addAnnotation(this$static.eReferenceEClass, 'http://www.eclipse.org/emf/2002/Ecore', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['constraints', 'ConsistentOpposite SingleContainer ConsistentKeys ConsistentUnique ConsistentContainer'])); $addAnnotation(this$static.eStructuralFeatureEClass, 'http://www.eclipse.org/emf/2002/Ecore', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['constraints', 'ValidDefaultValueLiteral'])); $addAnnotation(this$static.eTypedElementEClass, 'http://www.eclipse.org/emf/2002/Ecore', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['constraints', 'ValidLowerBound ValidUpperBound ConsistentBounds ValidType'])); $addAnnotation(this$static.eGenericTypeEClass, 'http://www.eclipse.org/emf/2002/Ecore', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['constraints', 'ConsistentType ConsistentBounds ConsistentArguments'])); } function $createExtendedMetaDataAnnotations(this$static){ $addAnnotation(this$static.eBigDecimalEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['baseType', 'http://www.w3.org/2001/XMLSchema#decimal'])); $addAnnotation(this$static.eBigIntegerEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['baseType', 'http://www.w3.org/2001/XMLSchema#integer'])); $addAnnotation(this$static.eBooleanEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['baseType', 'http://www.w3.org/2001/XMLSchema#boolean'])); $addAnnotation(this$static.eBooleanObjectEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['baseType', 'EBoolean', 'name', 'EBoolean:Object'])); $addAnnotation(this$static.eByteEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['baseType', 'http://www.w3.org/2001/XMLSchema#byte'])); $addAnnotation(this$static.eByteArrayEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['baseType', 'http://www.w3.org/2001/XMLSchema#hexBinary'])); $addAnnotation(this$static.eByteObjectEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['baseType', 'EByte', 'name', 'EByte:Object'])); $addAnnotation(this$static.eCharacterObjectEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['baseType', 'EChar', 'name', 'EChar:Object'])); $addAnnotation(this$static.eDoubleEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['baseType', 'http://www.w3.org/2001/XMLSchema#double'])); $addAnnotation(this$static.eDoubleObjectEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['baseType', 'EDouble', 'name', 'EDouble:Object'])); $addAnnotation(this$static.eFloatEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['baseType', 'http://www.w3.org/2001/XMLSchema#float'])); $addAnnotation(this$static.eFloatObjectEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['baseType', 'EFloat', 'name', 'EFloat:Object'])); $addAnnotation(this$static.eIntEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['baseType', 'http://www.w3.org/2001/XMLSchema#int'])); $addAnnotation(this$static.eIntegerObjectEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['baseType', 'EInt', 'name', 'EInt:Object'])); $addAnnotation(this$static.eLongEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['baseType', 'http://www.w3.org/2001/XMLSchema#long'])); $addAnnotation(this$static.eLongObjectEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['baseType', 'ELong', 'name', 'ELong:Object'])); $addAnnotation(this$static.eShortEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['baseType', 'http://www.w3.org/2001/XMLSchema#short'])); $addAnnotation(this$static.eShortObjectEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['baseType', 'EShort', 'name', 'EShort:Object'])); $addAnnotation(this$static.eStringEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['baseType', 'http://www.w3.org/2001/XMLSchema#string'])); } function $createPackageContents_0(this$static){ if (this$static.isCreated) return; this$static.isCreated = true; this$static.eAttributeEClass = $createEClass(this$static, 0); $createEAttribute(this$static.eAttributeEClass, 18); $createEReference(this$static.eAttributeEClass, 19); this$static.eAnnotationEClass = $createEClass(this$static, 1); $createEAttribute(this$static.eAnnotationEClass, 1); $createEReference(this$static.eAnnotationEClass, 2); $createEReference(this$static.eAnnotationEClass, 3); $createEReference(this$static.eAnnotationEClass, 4); $createEReference(this$static.eAnnotationEClass, 5); this$static.eClassEClass = $createEClass(this$static, 2); $createEAttribute(this$static.eClassEClass, 8); $createEAttribute(this$static.eClassEClass, 9); $createEReference(this$static.eClassEClass, 10); $createEReference(this$static.eClassEClass, 11); $createEReference(this$static.eClassEClass, 12); $createEReference(this$static.eClassEClass, 13); $createEReference(this$static.eClassEClass, 14); $createEReference(this$static.eClassEClass, 15); $createEReference(this$static.eClassEClass, 16); $createEReference(this$static.eClassEClass, 17); $createEReference(this$static.eClassEClass, 18); $createEReference(this$static.eClassEClass, 19); $createEReference(this$static.eClassEClass, 20); $createEReference(this$static.eClassEClass, 21); $createEReference(this$static.eClassEClass, 22); $createEReference(this$static.eClassEClass, 23); $createEOperation(this$static.eClassEClass); $createEOperation(this$static.eClassEClass); $createEOperation(this$static.eClassEClass); $createEOperation(this$static.eClassEClass); $createEOperation(this$static.eClassEClass); $createEOperation(this$static.eClassEClass); $createEOperation(this$static.eClassEClass); $createEOperation(this$static.eClassEClass); $createEOperation(this$static.eClassEClass); $createEOperation(this$static.eClassEClass); this$static.eClassifierEClass = $createEClass(this$static, 3); $createEAttribute(this$static.eClassifierEClass, 2); $createEAttribute(this$static.eClassifierEClass, 3); $createEAttribute(this$static.eClassifierEClass, 4); $createEAttribute(this$static.eClassifierEClass, 5); $createEReference(this$static.eClassifierEClass, 6); $createEReference(this$static.eClassifierEClass, 7); $createEOperation(this$static.eClassifierEClass); $createEOperation(this$static.eClassifierEClass); this$static.eDataTypeEClass = $createEClass(this$static, 4); $createEAttribute(this$static.eDataTypeEClass, 8); this$static.eEnumEClass = $createEClass(this$static, 5); $createEReference(this$static.eEnumEClass, 9); $createEOperation(this$static.eEnumEClass); $createEOperation(this$static.eEnumEClass); $createEOperation(this$static.eEnumEClass); this$static.eEnumLiteralEClass = $createEClass(this$static, 6); $createEAttribute(this$static.eEnumLiteralEClass, 2); $createEAttribute(this$static.eEnumLiteralEClass, 3); $createEAttribute(this$static.eEnumLiteralEClass, 4); $createEReference(this$static.eEnumLiteralEClass, 5); this$static.eFactoryEClass = $createEClass(this$static, 7); $createEReference(this$static.eFactoryEClass, 1); $createEOperation(this$static.eFactoryEClass); $createEOperation(this$static.eFactoryEClass); $createEOperation(this$static.eFactoryEClass); this$static.eModelElementEClass = $createEClass(this$static, 8); $createEReference(this$static.eModelElementEClass, 0); $createEOperation(this$static.eModelElementEClass); this$static.eNamedElementEClass = $createEClass(this$static, 9); $createEAttribute(this$static.eNamedElementEClass, 1); this$static.eObjectEClass = $createEClass(this$static, 10); $createEOperation(this$static.eObjectEClass); $createEOperation(this$static.eObjectEClass); $createEOperation(this$static.eObjectEClass); $createEOperation(this$static.eObjectEClass); $createEOperation(this$static.eObjectEClass); $createEOperation(this$static.eObjectEClass); $createEOperation(this$static.eObjectEClass); $createEOperation(this$static.eObjectEClass); $createEOperation(this$static.eObjectEClass); $createEOperation(this$static.eObjectEClass); $createEOperation(this$static.eObjectEClass); $createEOperation(this$static.eObjectEClass); $createEOperation(this$static.eObjectEClass); $createEOperation(this$static.eObjectEClass); $createEOperation(this$static.eObjectEClass); this$static.eOperationEClass = $createEClass(this$static, 11); $createEReference(this$static.eOperationEClass, 10); $createEReference(this$static.eOperationEClass, 11); $createEReference(this$static.eOperationEClass, 12); $createEReference(this$static.eOperationEClass, 13); $createEReference(this$static.eOperationEClass, 14); $createEOperation(this$static.eOperationEClass); $createEOperation(this$static.eOperationEClass); this$static.ePackageEClass = $createEClass(this$static, 12); $createEAttribute(this$static.ePackageEClass, 2); $createEAttribute(this$static.ePackageEClass, 3); $createEReference(this$static.ePackageEClass, 4); $createEReference(this$static.ePackageEClass, 5); $createEReference(this$static.ePackageEClass, 6); $createEReference(this$static.ePackageEClass, 7); $createEOperation(this$static.ePackageEClass); this$static.eParameterEClass = $createEClass(this$static, 13); $createEReference(this$static.eParameterEClass, 10); this$static.eReferenceEClass = $createEClass(this$static, 14); $createEAttribute(this$static.eReferenceEClass, 18); $createEAttribute(this$static.eReferenceEClass, 19); $createEAttribute(this$static.eReferenceEClass, 20); $createEReference(this$static.eReferenceEClass, 21); $createEReference(this$static.eReferenceEClass, 22); $createEReference(this$static.eReferenceEClass, 23); this$static.eStructuralFeatureEClass = $createEClass(this$static, 15); $createEAttribute(this$static.eStructuralFeatureEClass, 10); $createEAttribute(this$static.eStructuralFeatureEClass, 11); $createEAttribute(this$static.eStructuralFeatureEClass, 12); $createEAttribute(this$static.eStructuralFeatureEClass, 13); $createEAttribute(this$static.eStructuralFeatureEClass, 14); $createEAttribute(this$static.eStructuralFeatureEClass, 15); $createEAttribute(this$static.eStructuralFeatureEClass, 16); $createEReference(this$static.eStructuralFeatureEClass, 17); $createEOperation(this$static.eStructuralFeatureEClass); $createEOperation(this$static.eStructuralFeatureEClass); this$static.eTypedElementEClass = $createEClass(this$static, 16); $createEAttribute(this$static.eTypedElementEClass, 2); $createEAttribute(this$static.eTypedElementEClass, 3); $createEAttribute(this$static.eTypedElementEClass, 4); $createEAttribute(this$static.eTypedElementEClass, 5); $createEAttribute(this$static.eTypedElementEClass, 6); $createEAttribute(this$static.eTypedElementEClass, 7); $createEReference(this$static.eTypedElementEClass, 8); $createEReference(this$static.eTypedElementEClass, 9); this$static.eStringToStringMapEntryEClass = $createEClass(this$static, 17); $createEAttribute(this$static.eStringToStringMapEntryEClass, 0); $createEAttribute(this$static.eStringToStringMapEntryEClass, 1); this$static.eGenericTypeEClass = $createEClass(this$static, 18); $createEReference(this$static.eGenericTypeEClass, 0); $createEReference(this$static.eGenericTypeEClass, 1); $createEReference(this$static.eGenericTypeEClass, 2); $createEReference(this$static.eGenericTypeEClass, 3); $createEReference(this$static.eGenericTypeEClass, 4); $createEReference(this$static.eGenericTypeEClass, 5); $createEOperation(this$static.eGenericTypeEClass); this$static.eTypeParameterEClass = $createEClass(this$static, 19); $createEReference(this$static.eTypeParameterEClass, 2); this$static.eBigDecimalEDataType = $createEDataType(this$static, 20); this$static.eBigIntegerEDataType = $createEDataType(this$static, 21); this$static.eBooleanEDataType = $createEDataType(this$static, 22); this$static.eBooleanObjectEDataType = $createEDataType(this$static, 23); this$static.eByteEDataType = $createEDataType(this$static, 24); this$static.eByteArrayEDataType = $createEDataType(this$static, 25); this$static.eByteObjectEDataType = $createEDataType(this$static, 26); this$static.eCharEDataType = $createEDataType(this$static, 27); this$static.eCharacterObjectEDataType = $createEDataType(this$static, 28); this$static.eDateEDataType = $createEDataType(this$static, 29); this$static.eDiagnosticChainEDataType = $createEDataType(this$static, 30); this$static.eDoubleEDataType = $createEDataType(this$static, 31); this$static.eDoubleObjectEDataType = $createEDataType(this$static, 32); this$static.eeListEDataType = $createEDataType(this$static, 33); this$static.eEnumeratorEDataType = $createEDataType(this$static, 34); this$static.eFeatureMapEDataType = $createEDataType(this$static, 35); this$static.eFeatureMapEntryEDataType = $createEDataType(this$static, 36); this$static.eFloatEDataType = $createEDataType(this$static, 37); this$static.eFloatObjectEDataType = $createEDataType(this$static, 38); this$static.eIntEDataType = $createEDataType(this$static, 39); this$static.eIntegerObjectEDataType = $createEDataType(this$static, 40); this$static.eJavaClassEDataType = $createEDataType(this$static, 41); this$static.eJavaObjectEDataType = $createEDataType(this$static, 42); this$static.eLongEDataType = $createEDataType(this$static, 43); this$static.eLongObjectEDataType = $createEDataType(this$static, 44); this$static.eMapEDataType = $createEDataType(this$static, 45); this$static.eResourceEDataType = $createEDataType(this$static, 46); this$static.eResourceSetEDataType = $createEDataType(this$static, 47); this$static.eShortEDataType = $createEDataType(this$static, 48); this$static.eShortObjectEDataType = $createEDataType(this$static, 49); this$static.eStringEDataType = $createEDataType(this$static, 50); this$static.eTreeIteratorEDataType = $createEDataType(this$static, 51); this$static.eInvocationTargetExceptionEDataType = $createEDataType(this$static, 52); } function $initializePackageContents_0(this$static){ var g1, g2, msgs, msgs0, msgs1, msgs2, op; if (this$static.isInitialized) return; this$static.isInitialized = true; $setName(this$static, 'ecore'); $setNsPrefix(this$static, 'ecore'); $setNsURI(this$static, 'http://www.eclipse.org/emf/2002/Ecore'); $addETypeParameter(this$static.eeListEDataType, 'E'); $addETypeParameter(this$static.eJavaClassEDataType, 'T'); $addETypeParameter(this$static.eMapEDataType, 'K'); $addETypeParameter(this$static.eMapEDataType, 'V'); $addETypeParameter(this$static.eTreeIteratorEDataType, 'E'); $add_21($getESuperTypes(this$static.eAttributeEClass), this$static.eStructuralFeatureEClass); $add_21($getESuperTypes(this$static.eAnnotationEClass), this$static.eModelElementEClass); $add_21($getESuperTypes(this$static.eClassEClass), this$static.eClassifierEClass); $add_21($getESuperTypes(this$static.eClassifierEClass), this$static.eNamedElementEClass); $add_21($getESuperTypes(this$static.eDataTypeEClass), this$static.eClassifierEClass); $add_21($getESuperTypes(this$static.eEnumEClass), this$static.eDataTypeEClass); $add_21($getESuperTypes(this$static.eEnumLiteralEClass), this$static.eNamedElementEClass); $add_21($getESuperTypes(this$static.eFactoryEClass), this$static.eModelElementEClass); $add_21($getESuperTypes(this$static.eNamedElementEClass), this$static.eModelElementEClass); $add_21($getESuperTypes(this$static.eOperationEClass), this$static.eTypedElementEClass); $add_21($getESuperTypes(this$static.ePackageEClass), this$static.eNamedElementEClass); $add_21($getESuperTypes(this$static.eParameterEClass), this$static.eTypedElementEClass); $add_21($getESuperTypes(this$static.eReferenceEClass), this$static.eStructuralFeatureEClass); $add_21($getESuperTypes(this$static.eStructuralFeatureEClass), this$static.eTypedElementEClass); $add_21($getESuperTypes(this$static.eTypedElementEClass), this$static.eNamedElementEClass); $add_21($getESuperTypes(this$static.eTypeParameterEClass), this$static.eNamedElementEClass); $initEClass(this$static.eAttributeEClass, Lorg_eclipse_emf_ecore_EAttribute_2_classLit, 'EAttribute', false, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eAttributeEClass), 0), 35), this$static.eBooleanEDataType, 'iD', null, 0, 1, Lorg_eclipse_emf_ecore_EAttribute_2_classLit, false, false, true, false, true, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eAttributeEClass), 1), 19), this$static.eDataTypeEClass, null, 'eAttributeType', 1, 1, Lorg_eclipse_emf_ecore_EAttribute_2_classLit, true, true, false, false, true, false, true); $initEClass(this$static.eAnnotationEClass, Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, 'EAnnotation', false, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eAnnotationEClass), 0), 35), this$static.eStringEDataType, 'source', null, 0, 1, Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, false, false, true, false, true, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eAnnotationEClass), 1), 19), this$static.eStringToStringMapEntryEClass, null, 'details', 0, -1, Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, false, false, true, true, false, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eAnnotationEClass), 2), 19), this$static.eModelElementEClass, castTo($get_20($getEStructuralFeatures(this$static.eModelElementEClass), 0), 19), 'eModelElement', 0, 1, Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, true, false, true, false, false, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eAnnotationEClass), 3), 19), this$static.eObjectEClass, null, 'contents', 0, -1, Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, false, false, true, true, false, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eAnnotationEClass), 4), 19), this$static.eObjectEClass, null, 'references', 0, -1, Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, false, false, true, false, true, false, false); $initEClass(this$static.eClassEClass, Lorg_eclipse_emf_ecore_EClass_2_classLit, 'EClass', false, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eClassEClass), 0), 35), this$static.eBooleanEDataType, 'abstract', null, 0, 1, Lorg_eclipse_emf_ecore_EClass_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eClassEClass), 1), 35), this$static.eBooleanEDataType, 'interface', null, 0, 1, Lorg_eclipse_emf_ecore_EClass_2_classLit, false, false, true, false, true, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eClassEClass), 2), 19), this$static.eClassEClass, null, 'eSuperTypes', 0, -1, Lorg_eclipse_emf_ecore_EClass_2_classLit, false, false, true, false, true, true, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eClassEClass), 3), 19), this$static.eOperationEClass, castTo($get_20($getEStructuralFeatures(this$static.eOperationEClass), 0), 19), 'eOperations', 0, -1, Lorg_eclipse_emf_ecore_EClass_2_classLit, false, false, true, true, false, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eClassEClass), 4), 19), this$static.eAttributeEClass, null, 'eAllAttributes', 0, -1, Lorg_eclipse_emf_ecore_EClass_2_classLit, true, true, false, false, true, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eClassEClass), 5), 19), this$static.eReferenceEClass, null, 'eAllReferences', 0, -1, Lorg_eclipse_emf_ecore_EClass_2_classLit, true, true, false, false, true, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eClassEClass), 6), 19), this$static.eReferenceEClass, null, 'eReferences', 0, -1, Lorg_eclipse_emf_ecore_EClass_2_classLit, true, true, false, false, true, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eClassEClass), 7), 19), this$static.eAttributeEClass, null, 'eAttributes', 0, -1, Lorg_eclipse_emf_ecore_EClass_2_classLit, true, true, false, false, true, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eClassEClass), 8), 19), this$static.eReferenceEClass, null, 'eAllContainments', 0, -1, Lorg_eclipse_emf_ecore_EClass_2_classLit, true, true, false, false, true, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eClassEClass), 9), 19), this$static.eOperationEClass, null, 'eAllOperations', 0, -1, Lorg_eclipse_emf_ecore_EClass_2_classLit, true, true, false, false, true, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eClassEClass), 10), 19), this$static.eStructuralFeatureEClass, null, 'eAllStructuralFeatures', 0, -1, Lorg_eclipse_emf_ecore_EClass_2_classLit, true, true, false, false, true, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eClassEClass), 11), 19), this$static.eClassEClass, null, 'eAllSuperTypes', 0, -1, Lorg_eclipse_emf_ecore_EClass_2_classLit, true, true, false, false, true, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eClassEClass), 12), 19), this$static.eAttributeEClass, null, 'eIDAttribute', 0, 1, Lorg_eclipse_emf_ecore_EClass_2_classLit, true, true, false, false, false, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eClassEClass), 13), 19), this$static.eStructuralFeatureEClass, castTo($get_20($getEStructuralFeatures(this$static.eStructuralFeatureEClass), 7), 19), 'eStructuralFeatures', 0, -1, Lorg_eclipse_emf_ecore_EClass_2_classLit, false, false, true, true, false, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eClassEClass), 14), 19), this$static.eGenericTypeEClass, null, 'eGenericSuperTypes', 0, -1, Lorg_eclipse_emf_ecore_EClass_2_classLit, false, false, true, true, false, true, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eClassEClass), 15), 19), this$static.eGenericTypeEClass, null, 'eAllGenericSuperTypes', 0, -1, Lorg_eclipse_emf_ecore_EClass_2_classLit, true, true, false, false, true, false, true); op = $initEOperation(castTo($get_20($getEOperations(this$static.eClassEClass), 0), 62), this$static.eBooleanEDataType, 'isSuperTypeOf'); $addEParameter(op, this$static.eClassEClass, 'someClass'); $initEOperation(castTo($get_20($getEOperations(this$static.eClassEClass), 1), 62), this$static.eIntEDataType, 'getFeatureCount'); op = $initEOperation(castTo($get_20($getEOperations(this$static.eClassEClass), 2), 62), this$static.eStructuralFeatureEClass, 'getEStructuralFeature'); $addEParameter(op, this$static.eIntEDataType, 'featureID'); op = $initEOperation(castTo($get_20($getEOperations(this$static.eClassEClass), 3), 62), this$static.eIntEDataType, 'getFeatureID'); $addEParameter(op, this$static.eStructuralFeatureEClass, 'feature'); op = $initEOperation(castTo($get_20($getEOperations(this$static.eClassEClass), 4), 62), this$static.eStructuralFeatureEClass, 'getEStructuralFeature'); $addEParameter(op, this$static.eStringEDataType, 'featureName'); $initEOperation(castTo($get_20($getEOperations(this$static.eClassEClass), 5), 62), this$static.eIntEDataType, 'getOperationCount'); op = $initEOperation(castTo($get_20($getEOperations(this$static.eClassEClass), 6), 62), this$static.eOperationEClass, 'getEOperation'); $addEParameter(op, this$static.eIntEDataType, 'operationID'); op = $initEOperation(castTo($get_20($getEOperations(this$static.eClassEClass), 7), 62), this$static.eIntEDataType, 'getOperationID'); $addEParameter(op, this$static.eOperationEClass, 'operation'); op = $initEOperation(castTo($get_20($getEOperations(this$static.eClassEClass), 8), 62), this$static.eOperationEClass, 'getOverride'); $addEParameter(op, this$static.eOperationEClass, 'operation'); op = $initEOperation(castTo($get_20($getEOperations(this$static.eClassEClass), 9), 62), this$static.eGenericTypeEClass, 'getFeatureType'); $addEParameter(op, this$static.eStructuralFeatureEClass, 'feature'); $initEClass(this$static.eClassifierEClass, Lorg_eclipse_emf_ecore_EClassifier_2_classLit, 'EClassifier', true, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eClassifierEClass), 0), 35), this$static.eStringEDataType, 'instanceClassName', null, 0, 1, Lorg_eclipse_emf_ecore_EClassifier_2_classLit, false, true, true, true, true, false); g1 = $createEGenericType(this$static.eJavaClassEDataType); g2 = $createEGenericType_1(); $add_21((!g1.eTypeArguments && (g1.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, g1, 1)) , g1.eTypeArguments), g2); $initEAttribute_0(castTo($get_20($getEStructuralFeatures(this$static.eClassifierEClass), 1), 35), g1, 'instanceClass', Lorg_eclipse_emf_ecore_EClassifier_2_classLit, true, true, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eClassifierEClass), 2), 35), this$static.eJavaObjectEDataType, 'defaultValue', null, 0, 1, Lorg_eclipse_emf_ecore_EClassifier_2_classLit, true, true, false, false, true, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eClassifierEClass), 3), 35), this$static.eStringEDataType, 'instanceTypeName', null, 0, 1, Lorg_eclipse_emf_ecore_EClassifier_2_classLit, false, true, true, true, true, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eClassifierEClass), 4), 19), this$static.ePackageEClass, castTo($get_20($getEStructuralFeatures(this$static.ePackageEClass), 3), 19), 'ePackage', 0, 1, Lorg_eclipse_emf_ecore_EClassifier_2_classLit, true, false, false, false, true, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eClassifierEClass), 5), 19), this$static.eTypeParameterEClass, null, 'eTypeParameters', 0, -1, Lorg_eclipse_emf_ecore_EClassifier_2_classLit, false, false, true, true, true, false, false); op = $initEOperation(castTo($get_20($getEOperations(this$static.eClassifierEClass), 0), 62), this$static.eBooleanEDataType, 'isInstance'); $addEParameter(op, this$static.eJavaObjectEDataType, 'object'); $initEOperation(castTo($get_20($getEOperations(this$static.eClassifierEClass), 1), 62), this$static.eIntEDataType, 'getClassifierID'); $initEClass(this$static.eDataTypeEClass, Lorg_eclipse_emf_ecore_EDataType_2_classLit, 'EDataType', false, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eDataTypeEClass), 0), 35), this$static.eBooleanEDataType, 'serializable', 'true', 0, 1, Lorg_eclipse_emf_ecore_EDataType_2_classLit, false, false, true, false, true, false); $initEClass(this$static.eEnumEClass, Lorg_eclipse_emf_ecore_EEnum_2_classLit, 'EEnum', false, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eEnumEClass), 0), 19), this$static.eEnumLiteralEClass, castTo($get_20($getEStructuralFeatures(this$static.eEnumLiteralEClass), 3), 19), 'eLiterals', 0, -1, Lorg_eclipse_emf_ecore_EEnum_2_classLit, false, false, true, true, false, false, false); op = $initEOperation(castTo($get_20($getEOperations(this$static.eEnumEClass), 0), 62), this$static.eEnumLiteralEClass, 'getEEnumLiteral'); $addEParameter(op, this$static.eStringEDataType, 'name'); op = $initEOperation(castTo($get_20($getEOperations(this$static.eEnumEClass), 1), 62), this$static.eEnumLiteralEClass, 'getEEnumLiteral'); $addEParameter(op, this$static.eIntEDataType, 'value'); op = $initEOperation(castTo($get_20($getEOperations(this$static.eEnumEClass), 2), 62), this$static.eEnumLiteralEClass, 'getEEnumLiteralByLiteral'); $addEParameter(op, this$static.eStringEDataType, 'literal'); $initEClass(this$static.eEnumLiteralEClass, Lorg_eclipse_emf_ecore_EEnumLiteral_2_classLit, 'EEnumLiteral', false, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eEnumLiteralEClass), 0), 35), this$static.eIntEDataType, 'value', null, 0, 1, Lorg_eclipse_emf_ecore_EEnumLiteral_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eEnumLiteralEClass), 1), 35), this$static.eEnumeratorEDataType, 'instance', null, 0, 1, Lorg_eclipse_emf_ecore_EEnumLiteral_2_classLit, true, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eEnumLiteralEClass), 2), 35), this$static.eStringEDataType, 'literal', null, 0, 1, Lorg_eclipse_emf_ecore_EEnumLiteral_2_classLit, false, false, true, false, true, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eEnumLiteralEClass), 3), 19), this$static.eEnumEClass, castTo($get_20($getEStructuralFeatures(this$static.eEnumEClass), 0), 19), 'eEnum', 0, 1, Lorg_eclipse_emf_ecore_EEnumLiteral_2_classLit, true, false, false, false, false, false, false); $initEClass(this$static.eFactoryEClass, Lorg_eclipse_emf_ecore_EFactory_2_classLit, 'EFactory', false, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eFactoryEClass), 0), 19), this$static.ePackageEClass, castTo($get_20($getEStructuralFeatures(this$static.ePackageEClass), 2), 19), 'ePackage', 1, 1, Lorg_eclipse_emf_ecore_EFactory_2_classLit, true, false, true, false, false, false, false); op = $initEOperation(castTo($get_20($getEOperations(this$static.eFactoryEClass), 0), 62), this$static.eObjectEClass, 'create'); $addEParameter(op, this$static.eClassEClass, 'eClass'); op = $initEOperation(castTo($get_20($getEOperations(this$static.eFactoryEClass), 1), 62), this$static.eJavaObjectEDataType, 'createFromString'); $addEParameter(op, this$static.eDataTypeEClass, 'eDataType'); $addEParameter(op, this$static.eStringEDataType, 'literalValue'); op = $initEOperation(castTo($get_20($getEOperations(this$static.eFactoryEClass), 2), 62), this$static.eStringEDataType, 'convertToString'); $addEParameter(op, this$static.eDataTypeEClass, 'eDataType'); $addEParameter(op, this$static.eJavaObjectEDataType, 'instanceValue'); $initEClass(this$static.eModelElementEClass, Lorg_eclipse_emf_ecore_EModelElement_2_classLit, 'EModelElement', true, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eModelElementEClass), 0), 19), this$static.eAnnotationEClass, castTo($get_20($getEStructuralFeatures(this$static.eAnnotationEClass), 2), 19), 'eAnnotations', 0, -1, Lorg_eclipse_emf_ecore_EModelElement_2_classLit, false, false, true, true, false, false, false); op = $initEOperation(castTo($get_20($getEOperations(this$static.eModelElementEClass), 0), 62), this$static.eAnnotationEClass, 'getEAnnotation'); $addEParameter(op, this$static.eStringEDataType, 'source'); $initEClass(this$static.eNamedElementEClass, Lorg_eclipse_emf_ecore_ENamedElement_2_classLit, 'ENamedElement', true, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eNamedElementEClass), 0), 35), this$static.eStringEDataType, 'name', null, 0, 1, Lorg_eclipse_emf_ecore_ENamedElement_2_classLit, false, false, true, false, true, false); $initEClass(this$static.eObjectEClass, Lorg_eclipse_emf_ecore_EObject_2_classLit, 'EObject', false, false, true); $initEOperation(castTo($get_20($getEOperations(this$static.eObjectEClass), 0), 62), this$static.eClassEClass, 'eClass'); $initEOperation(castTo($get_20($getEOperations(this$static.eObjectEClass), 1), 62), this$static.eBooleanEDataType, 'eIsProxy'); $initEOperation(castTo($get_20($getEOperations(this$static.eObjectEClass), 2), 62), this$static.eResourceEDataType, 'eResource'); $initEOperation(castTo($get_20($getEOperations(this$static.eObjectEClass), 3), 62), this$static.eObjectEClass, 'eContainer'); $initEOperation(castTo($get_20($getEOperations(this$static.eObjectEClass), 4), 62), this$static.eStructuralFeatureEClass, 'eContainingFeature'); $initEOperation(castTo($get_20($getEOperations(this$static.eObjectEClass), 5), 62), this$static.eReferenceEClass, 'eContainmentFeature'); op = $initEOperation(castTo($get_20($getEOperations(this$static.eObjectEClass), 6), 62), null, 'eContents'); g1 = $createEGenericType(this$static.eeListEDataType); g2 = $createEGenericType(this$static.eObjectEClass); $add_21((!g1.eTypeArguments && (g1.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, g1, 1)) , g1.eTypeArguments), g2); msgs0 = $setEGenericType(op, g1, null); !!msgs0 && msgs0.dispatch_0(); op = $initEOperation(castTo($get_20($getEOperations(this$static.eObjectEClass), 7), 62), null, 'eAllContents'); g1 = $createEGenericType(this$static.eTreeIteratorEDataType); g2 = $createEGenericType(this$static.eObjectEClass); $add_21((!g1.eTypeArguments && (g1.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, g1, 1)) , g1.eTypeArguments), g2); msgs1 = $setEGenericType(op, g1, null); !!msgs1 && msgs1.dispatch_0(); op = $initEOperation(castTo($get_20($getEOperations(this$static.eObjectEClass), 8), 62), null, 'eCrossReferences'); g1 = $createEGenericType(this$static.eeListEDataType); g2 = $createEGenericType(this$static.eObjectEClass); $add_21((!g1.eTypeArguments && (g1.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, g1, 1)) , g1.eTypeArguments), g2); msgs2 = $setEGenericType(op, g1, null); !!msgs2 && msgs2.dispatch_0(); op = $initEOperation(castTo($get_20($getEOperations(this$static.eObjectEClass), 9), 62), this$static.eJavaObjectEDataType, 'eGet'); $addEParameter(op, this$static.eStructuralFeatureEClass, 'feature'); op = $initEOperation(castTo($get_20($getEOperations(this$static.eObjectEClass), 10), 62), this$static.eJavaObjectEDataType, 'eGet'); $addEParameter(op, this$static.eStructuralFeatureEClass, 'feature'); $addEParameter(op, this$static.eBooleanEDataType, 'resolve'); op = $initEOperation(castTo($get_20($getEOperations(this$static.eObjectEClass), 11), 62), null, 'eSet'); $addEParameter(op, this$static.eStructuralFeatureEClass, 'feature'); $addEParameter(op, this$static.eJavaObjectEDataType, 'newValue'); op = $initEOperation(castTo($get_20($getEOperations(this$static.eObjectEClass), 12), 62), this$static.eBooleanEDataType, 'eIsSet'); $addEParameter(op, this$static.eStructuralFeatureEClass, 'feature'); op = $initEOperation(castTo($get_20($getEOperations(this$static.eObjectEClass), 13), 62), null, 'eUnset'); $addEParameter(op, this$static.eStructuralFeatureEClass, 'feature'); op = $initEOperation(castTo($get_20($getEOperations(this$static.eObjectEClass), 14), 62), this$static.eJavaObjectEDataType, 'eInvoke'); $addEParameter(op, this$static.eOperationEClass, 'operation'); g1 = $createEGenericType(this$static.eeListEDataType); g2 = $createEGenericType_1(); $add_21((!g1.eTypeArguments && (g1.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, g1, 1)) , g1.eTypeArguments), g2); $addEParameter_0(op, g1, 'arguments'); $addEException(op, this$static.eInvocationTargetExceptionEDataType); $initEClass(this$static.eOperationEClass, Lorg_eclipse_emf_ecore_EOperation_2_classLit, 'EOperation', false, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eOperationEClass), 0), 19), this$static.eClassEClass, castTo($get_20($getEStructuralFeatures(this$static.eClassEClass), 3), 19), 'eContainingClass', 0, 1, Lorg_eclipse_emf_ecore_EOperation_2_classLit, true, false, false, false, false, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eOperationEClass), 1), 19), this$static.eTypeParameterEClass, null, 'eTypeParameters', 0, -1, Lorg_eclipse_emf_ecore_EOperation_2_classLit, false, false, true, true, true, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eOperationEClass), 2), 19), this$static.eParameterEClass, castTo($get_20($getEStructuralFeatures(this$static.eParameterEClass), 0), 19), 'eParameters', 0, -1, Lorg_eclipse_emf_ecore_EOperation_2_classLit, false, false, true, true, false, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eOperationEClass), 3), 19), this$static.eClassifierEClass, null, 'eExceptions', 0, -1, Lorg_eclipse_emf_ecore_EOperation_2_classLit, false, false, true, false, true, true, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eOperationEClass), 4), 19), this$static.eGenericTypeEClass, null, 'eGenericExceptions', 0, -1, Lorg_eclipse_emf_ecore_EOperation_2_classLit, false, false, true, true, false, true, false); $initEOperation(castTo($get_20($getEOperations(this$static.eOperationEClass), 0), 62), this$static.eIntEDataType, 'getOperationID'); op = $initEOperation(castTo($get_20($getEOperations(this$static.eOperationEClass), 1), 62), this$static.eBooleanEDataType, 'isOverrideOf'); $addEParameter(op, this$static.eOperationEClass, 'someOperation'); $initEClass(this$static.ePackageEClass, Lorg_eclipse_emf_ecore_EPackage_2_classLit, 'EPackage', false, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.ePackageEClass), 0), 35), this$static.eStringEDataType, 'nsURI', null, 0, 1, Lorg_eclipse_emf_ecore_EPackage_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.ePackageEClass), 1), 35), this$static.eStringEDataType, 'nsPrefix', null, 0, 1, Lorg_eclipse_emf_ecore_EPackage_2_classLit, false, false, true, false, true, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.ePackageEClass), 2), 19), this$static.eFactoryEClass, castTo($get_20($getEStructuralFeatures(this$static.eFactoryEClass), 0), 19), 'eFactoryInstance', 1, 1, Lorg_eclipse_emf_ecore_EPackage_2_classLit, true, false, true, false, false, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.ePackageEClass), 3), 19), this$static.eClassifierEClass, castTo($get_20($getEStructuralFeatures(this$static.eClassifierEClass), 4), 19), 'eClassifiers', 0, -1, Lorg_eclipse_emf_ecore_EPackage_2_classLit, false, false, true, true, true, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.ePackageEClass), 4), 19), this$static.ePackageEClass, castTo($get_20($getEStructuralFeatures(this$static.ePackageEClass), 5), 19), 'eSubpackages', 0, -1, Lorg_eclipse_emf_ecore_EPackage_2_classLit, false, false, true, true, true, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.ePackageEClass), 5), 19), this$static.ePackageEClass, castTo($get_20($getEStructuralFeatures(this$static.ePackageEClass), 4), 19), 'eSuperPackage', 0, 1, Lorg_eclipse_emf_ecore_EPackage_2_classLit, true, false, false, false, true, false, false); op = $initEOperation(castTo($get_20($getEOperations(this$static.ePackageEClass), 0), 62), this$static.eClassifierEClass, 'getEClassifier'); $addEParameter(op, this$static.eStringEDataType, 'name'); $initEClass(this$static.eParameterEClass, Lorg_eclipse_emf_ecore_EParameter_2_classLit, 'EParameter', false, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eParameterEClass), 0), 19), this$static.eOperationEClass, castTo($get_20($getEStructuralFeatures(this$static.eOperationEClass), 2), 19), 'eOperation', 0, 1, Lorg_eclipse_emf_ecore_EParameter_2_classLit, true, false, false, false, false, false, false); $initEClass(this$static.eReferenceEClass, Lorg_eclipse_emf_ecore_EReference_2_classLit, 'EReference', false, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eReferenceEClass), 0), 35), this$static.eBooleanEDataType, 'containment', null, 0, 1, Lorg_eclipse_emf_ecore_EReference_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eReferenceEClass), 1), 35), this$static.eBooleanEDataType, 'container', null, 0, 1, Lorg_eclipse_emf_ecore_EReference_2_classLit, true, true, false, false, true, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eReferenceEClass), 2), 35), this$static.eBooleanEDataType, 'resolveProxies', 'true', 0, 1, Lorg_eclipse_emf_ecore_EReference_2_classLit, false, false, true, false, true, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eReferenceEClass), 3), 19), this$static.eReferenceEClass, null, 'eOpposite', 0, 1, Lorg_eclipse_emf_ecore_EReference_2_classLit, false, false, true, false, true, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eReferenceEClass), 4), 19), this$static.eClassEClass, null, 'eReferenceType', 1, 1, Lorg_eclipse_emf_ecore_EReference_2_classLit, true, true, false, false, true, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eReferenceEClass), 5), 19), this$static.eAttributeEClass, null, 'eKeys', 0, -1, Lorg_eclipse_emf_ecore_EReference_2_classLit, false, false, true, false, true, false, false); $initEClass(this$static.eStructuralFeatureEClass, Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, 'EStructuralFeature', true, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eStructuralFeatureEClass), 0), 35), this$static.eBooleanEDataType, 'changeable', 'true', 0, 1, Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eStructuralFeatureEClass), 1), 35), this$static.eBooleanEDataType, 'volatile', null, 0, 1, Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eStructuralFeatureEClass), 2), 35), this$static.eBooleanEDataType, 'transient', null, 0, 1, Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eStructuralFeatureEClass), 3), 35), this$static.eStringEDataType, 'defaultValueLiteral', null, 0, 1, Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eStructuralFeatureEClass), 4), 35), this$static.eJavaObjectEDataType, 'defaultValue', null, 0, 1, Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, true, true, false, false, true, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eStructuralFeatureEClass), 5), 35), this$static.eBooleanEDataType, 'unsettable', null, 0, 1, Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eStructuralFeatureEClass), 6), 35), this$static.eBooleanEDataType, 'derived', null, 0, 1, Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, false, false, true, false, true, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eStructuralFeatureEClass), 7), 19), this$static.eClassEClass, castTo($get_20($getEStructuralFeatures(this$static.eClassEClass), 13), 19), 'eContainingClass', 0, 1, Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, true, false, false, false, false, false, false); $initEOperation(castTo($get_20($getEOperations(this$static.eStructuralFeatureEClass), 0), 62), this$static.eIntEDataType, 'getFeatureID'); op = $initEOperation(castTo($get_20($getEOperations(this$static.eStructuralFeatureEClass), 1), 62), null, 'getContainerClass'); g1 = $createEGenericType(this$static.eJavaClassEDataType); g2 = $createEGenericType_1(); $add_21((!g1.eTypeArguments && (g1.eTypeArguments = new EObjectContainmentEList(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, g1, 1)) , g1.eTypeArguments), g2); msgs = $setEGenericType(op, g1, null); !!msgs && msgs.dispatch_0(); $initEClass(this$static.eTypedElementEClass, Lorg_eclipse_emf_ecore_ETypedElement_2_classLit, 'ETypedElement', true, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eTypedElementEClass), 0), 35), this$static.eBooleanEDataType, 'ordered', 'true', 0, 1, Lorg_eclipse_emf_ecore_ETypedElement_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eTypedElementEClass), 1), 35), this$static.eBooleanEDataType, 'unique', 'true', 0, 1, Lorg_eclipse_emf_ecore_ETypedElement_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eTypedElementEClass), 2), 35), this$static.eIntEDataType, 'lowerBound', null, 0, 1, Lorg_eclipse_emf_ecore_ETypedElement_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eTypedElementEClass), 3), 35), this$static.eIntEDataType, 'upperBound', '1', 0, 1, Lorg_eclipse_emf_ecore_ETypedElement_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eTypedElementEClass), 4), 35), this$static.eBooleanEDataType, 'many', null, 0, 1, Lorg_eclipse_emf_ecore_ETypedElement_2_classLit, true, true, false, false, true, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eTypedElementEClass), 5), 35), this$static.eBooleanEDataType, 'required', null, 0, 1, Lorg_eclipse_emf_ecore_ETypedElement_2_classLit, true, true, false, false, true, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eTypedElementEClass), 6), 19), this$static.eClassifierEClass, null, 'eType', 0, 1, Lorg_eclipse_emf_ecore_ETypedElement_2_classLit, false, true, true, false, true, true, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eTypedElementEClass), 7), 19), this$static.eGenericTypeEClass, null, 'eGenericType', 0, 1, Lorg_eclipse_emf_ecore_ETypedElement_2_classLit, false, true, true, true, false, true, false); $initEClass(this$static.eStringToStringMapEntryEClass, Ljava_util_Map$Entry_2_classLit, 'EStringToStringMapEntry', false, false, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eStringToStringMapEntryEClass), 0), 35), this$static.eStringEDataType, 'key', null, 0, 1, Ljava_util_Map$Entry_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.eStringToStringMapEntryEClass), 1), 35), this$static.eStringEDataType, 'value', null, 0, 1, Ljava_util_Map$Entry_2_classLit, false, false, true, false, true, false); $initEClass(this$static.eGenericTypeEClass, Lorg_eclipse_emf_ecore_EGenericType_2_classLit, 'EGenericType', false, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eGenericTypeEClass), 0), 19), this$static.eGenericTypeEClass, null, 'eUpperBound', 0, 1, Lorg_eclipse_emf_ecore_EGenericType_2_classLit, false, false, true, true, false, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eGenericTypeEClass), 1), 19), this$static.eGenericTypeEClass, null, 'eTypeArguments', 0, -1, Lorg_eclipse_emf_ecore_EGenericType_2_classLit, false, false, true, true, false, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eGenericTypeEClass), 2), 19), this$static.eClassifierEClass, null, 'eRawType', 1, 1, Lorg_eclipse_emf_ecore_EGenericType_2_classLit, true, false, false, false, true, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eGenericTypeEClass), 3), 19), this$static.eGenericTypeEClass, null, 'eLowerBound', 0, 1, Lorg_eclipse_emf_ecore_EGenericType_2_classLit, false, false, true, true, false, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eGenericTypeEClass), 4), 19), this$static.eTypeParameterEClass, null, 'eTypeParameter', 0, 1, Lorg_eclipse_emf_ecore_EGenericType_2_classLit, false, false, true, false, false, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eGenericTypeEClass), 5), 19), this$static.eClassifierEClass, null, 'eClassifier', 0, 1, Lorg_eclipse_emf_ecore_EGenericType_2_classLit, false, false, true, false, true, false, false); op = $initEOperation(castTo($get_20($getEOperations(this$static.eGenericTypeEClass), 0), 62), this$static.eBooleanEDataType, 'isInstance'); $addEParameter(op, this$static.eJavaObjectEDataType, 'object'); $initEClass(this$static.eTypeParameterEClass, Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, 'ETypeParameter', false, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.eTypeParameterEClass), 0), 19), this$static.eGenericTypeEClass, null, 'eBounds', 0, -1, Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, false, false, true, true, false, false, false); $initEDataType(this$static.eBigDecimalEDataType, Ljava_math_BigDecimal_2_classLit, 'EBigDecimal', true); $initEDataType(this$static.eBigIntegerEDataType, Ljava_math_BigInteger_2_classLit, 'EBigInteger', true); $initEDataType(this$static.eBooleanEDataType, Z_classLit, 'EBoolean', true); $initEDataType(this$static.eBooleanObjectEDataType, Ljava_lang_Boolean_2_classLit, 'EBooleanObject', true); $initEDataType(this$static.eByteEDataType, B_classLit, 'EByte', true); $initEDataType(this$static.eByteArrayEDataType, getClassLiteralForArray(B_classLit, 1), 'EByteArray', true); $initEDataType(this$static.eByteObjectEDataType, Ljava_lang_Byte_2_classLit, 'EByteObject', true); $initEDataType(this$static.eCharEDataType, C_classLit, 'EChar', true); $initEDataType(this$static.eCharacterObjectEDataType, Ljava_lang_Character_2_classLit, 'ECharacterObject', true); $initEDataType(this$static.eDateEDataType, Ljava_util_Date_2_classLit, 'EDate', true); $initEDataType(this$static.eDiagnosticChainEDataType, Lorg_eclipse_emf_common_util_DiagnosticChain_2_classLit, 'EDiagnosticChain', false); $initEDataType(this$static.eDoubleEDataType, D_classLit, 'EDouble', true); $initEDataType(this$static.eDoubleObjectEDataType, Ljava_lang_Double_2_classLit, 'EDoubleObject', true); $initEDataType(this$static.eeListEDataType, Lorg_eclipse_emf_common_util_EList_2_classLit, 'EEList', false); $initEDataType(this$static.eEnumeratorEDataType, Lorg_eclipse_emf_common_util_Enumerator_2_classLit, 'EEnumerator', false); $initEDataType(this$static.eFeatureMapEDataType, Lorg_eclipse_emf_ecore_util_FeatureMap_2_classLit, 'EFeatureMap', false); $initEDataType(this$static.eFeatureMapEntryEDataType, Lorg_eclipse_emf_ecore_util_FeatureMap$Entry_2_classLit, 'EFeatureMapEntry', false); $initEDataType(this$static.eFloatEDataType, F_classLit, 'EFloat', true); $initEDataType(this$static.eFloatObjectEDataType, Ljava_lang_Float_2_classLit, 'EFloatObject', true); $initEDataType(this$static.eIntEDataType, I_classLit, 'EInt', true); $initEDataType(this$static.eIntegerObjectEDataType, Ljava_lang_Integer_2_classLit, 'EIntegerObject', true); $initEDataType(this$static.eJavaClassEDataType, Ljava_lang_Class_2_classLit, 'EJavaClass', true); $initEDataType(this$static.eJavaObjectEDataType, Ljava_lang_Object_2_classLit, 'EJavaObject', true); $initEDataType(this$static.eLongEDataType, J_classLit, 'ELong', true); $initEDataType(this$static.eLongObjectEDataType, Ljava_lang_Long_2_classLit, 'ELongObject', true); $initEDataType(this$static.eMapEDataType, Ljava_util_Map_2_classLit, 'EMap', false); $initEDataType(this$static.eResourceEDataType, Lorg_eclipse_emf_ecore_resource_Resource_2_classLit, 'EResource', false); $initEDataType(this$static.eResourceSetEDataType, Lorg_eclipse_emf_ecore_resource_ResourceSet_2_classLit, 'EResourceSet', false); $initEDataType(this$static.eShortEDataType, S_classLit, 'EShort', true); $initEDataType(this$static.eShortObjectEDataType, Ljava_lang_Short_2_classLit, 'EShortObject', true); $initEDataType(this$static.eStringEDataType, Ljava_lang_String_2_classLit, 'EString', true); $initEDataType(this$static.eTreeIteratorEDataType, Lorg_eclipse_emf_common_util_TreeIterator_2_classLit, 'ETreeIterator', false); $initEDataType(this$static.eInvocationTargetExceptionEDataType, Lorg_eclipse_emf_common_util_InvocationTargetException_2_classLit, 'EInvocationTargetException', false); $createResource(this$static, 'http://www.eclipse.org/emf/2002/Ecore'); } function EcorePackageImpl(){ EPackageImpl_0.call(this, 'http://www.eclipse.org/emf/2002/Ecore', ($clinit_EcoreFactory() , eINSTANCE_1)); $$init_12(this); } function init_4(){ $clinit_EcorePackageImpl(); var theEcorePackage; if (isInited_0) return castTo($getEPackage_0(($clinit_EPackage$Registry() , INSTANCE_6), 'http://www.eclipse.org/emf/2002/Ecore'), 2038); register_0(Ljava_util_Map$Entry_2_classLit, new EcorePackageImpl$44); initializeRegistryHelpersGen(); theEcorePackage = castTo(instanceOf($getStringValue(($clinit_EPackage$Registry() , INSTANCE_6), 'http://www.eclipse.org/emf/2002/Ecore'), 560)?$getStringValue(INSTANCE_6, 'http://www.eclipse.org/emf/2002/Ecore'):new EcorePackageImpl, 560); isInited_0 = true; $createPackageContents_0(theEcorePackage); $initializePackageContents_0(theEcorePackage); $put_6(($clinit_EValidator$Registry() , INSTANCE_8), theEcorePackage, new EcorePackageImpl$1); $putStringValue(INSTANCE_6, 'http://www.eclipse.org/emf/2002/Ecore', theEcorePackage); return theEcorePackage; } function initializeRegistryHelpersGen(){ register_0(Lorg_eclipse_emf_ecore_EAttribute_2_classLit, new EcorePackageImpl$2); register_0(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, new EcorePackageImpl$3); register_0(Lorg_eclipse_emf_ecore_EClass_2_classLit, new EcorePackageImpl$4); register_0(Lorg_eclipse_emf_ecore_EClassifier_2_classLit, new EcorePackageImpl$5); register_0(Lorg_eclipse_emf_ecore_EDataType_2_classLit, new EcorePackageImpl$6); register_0(Lorg_eclipse_emf_ecore_EEnum_2_classLit, new EcorePackageImpl$7); register_0(Lorg_eclipse_emf_ecore_EEnumLiteral_2_classLit, new EcorePackageImpl$8); register_0(Lorg_eclipse_emf_ecore_EFactory_2_classLit, new EcorePackageImpl$9); register_0(Lorg_eclipse_emf_ecore_EModelElement_2_classLit, new EcorePackageImpl$10); register_0(Lorg_eclipse_emf_ecore_ENamedElement_2_classLit, new EcorePackageImpl$11); register_0(Lorg_eclipse_emf_ecore_EObject_2_classLit, new EcorePackageImpl$12); register_0(Lorg_eclipse_emf_ecore_EOperation_2_classLit, new EcorePackageImpl$13); register_0(Lorg_eclipse_emf_ecore_EPackage_2_classLit, new EcorePackageImpl$14); register_0(Lorg_eclipse_emf_ecore_EParameter_2_classLit, new EcorePackageImpl$15); register_0(Lorg_eclipse_emf_ecore_EReference_2_classLit, new EcorePackageImpl$16); register_0(Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, new EcorePackageImpl$17); register_0(Lorg_eclipse_emf_ecore_ETypedElement_2_classLit, new EcorePackageImpl$18); register_0(Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, new EcorePackageImpl$19); register_0(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, new EcorePackageImpl$20); register_0(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, new EcorePackageImpl$21); register_0(Ljava_lang_Boolean_2_classLit, new EcorePackageImpl$22); register_0(getClassLiteralForArray(B_classLit, 1), new EcorePackageImpl$23); register_0(Ljava_lang_Byte_2_classLit, new EcorePackageImpl$24); register_0(Ljava_lang_Character_2_classLit, new EcorePackageImpl$25); register_0(Ljava_util_Date_2_classLit, new EcorePackageImpl$26); register_0(Lorg_eclipse_emf_common_util_DiagnosticChain_2_classLit, new EcorePackageImpl$27); register_0(Ljava_lang_Double_2_classLit, new EcorePackageImpl$28); register_0(Lorg_eclipse_emf_common_util_EList_2_classLit, new EcorePackageImpl$29); register_0(Lorg_eclipse_emf_common_util_Enumerator_2_classLit, new EcorePackageImpl$30); register_0(Lorg_eclipse_emf_ecore_util_FeatureMap_2_classLit, new EcorePackageImpl$31); register_0(Lorg_eclipse_emf_ecore_util_FeatureMap$Entry_2_classLit, new EcorePackageImpl$32); register_0(Ljava_lang_Float_2_classLit, new EcorePackageImpl$33); register_0(Ljava_lang_Integer_2_classLit, new EcorePackageImpl$34); register_0(Ljava_lang_Class_2_classLit, new EcorePackageImpl$35); register_0(Ljava_lang_Long_2_classLit, new EcorePackageImpl$36); register_0(Ljava_util_Map_2_classLit, new EcorePackageImpl$37); register_0(Lorg_eclipse_emf_ecore_resource_Resource_2_classLit, new EcorePackageImpl$38); register_0(Lorg_eclipse_emf_ecore_resource_ResourceSet_2_classLit, new EcorePackageImpl$39); register_0(Ljava_lang_Short_2_classLit, new EcorePackageImpl$40); register_0(Ljava_lang_String_2_classLit, new EcorePackageImpl$41); register_0(Lorg_eclipse_emf_common_util_TreeIterator_2_classLit, new EcorePackageImpl$42); register_0(Lorg_eclipse_emf_common_util_InvocationTargetException_2_classLit, new EcorePackageImpl$43); } function internalBootstrap(){ $clinit_EcorePackageImpl(); var eGenericType, eGenericType$iterator; $createExtendedMetaDataAnnotations(($clinit_EcorePackage() , eINSTANCE_2)); $createEcoreAnnotations(eINSTANCE_2); $freeze_0(eINSTANCE_2); eJavaObject = ($clinit_EcorePackage$Literals() , EJAVA_OBJECT); for (eGenericType$iterator = new ArrayList$1(eGenericTypes_0); eGenericType$iterator.i < eGenericType$iterator.this$01.array.length;) { eGenericType = castTo($next_6(eGenericType$iterator), 248); $setERawType(eGenericType, EJAVA_OBJECT, null); } return true; } defineClass(560, 184, {110:1, 94:1, 93:1, 155:1, 197:1, 58:1, 241:1, 114:1, 2038:1, 54:1, 99:1, 158:1, 184:1, 560:1, 119:1, 120:1, 690:1}, EcorePackageImpl); _.isCreated = false; _.isInitialized = false; var eGenericTypes_0, isInited_0 = false; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl', 560); function EcorePackageImpl$1(){ } defineClass(1234, 1, {851:1}, EcorePackageImpl$1); _.getEValidator = function getEValidator(){ return $clinit_EcoreValidator() , INSTANCE_10; } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$1_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/1', 1234); function EcorePackageImpl$10(){ } defineClass(1243, 1, $intern_165, EcorePackageImpl$10); _.isInstance = function isInstance_6(instance){ return instanceOf(instance, 155); } ; _.newArrayInstance = function newArrayInstance(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EModelElement_2_classLit, $intern_2, 155, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$10_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/10', 1243); function EcorePackageImpl$11(){ } defineClass(1244, 1, $intern_165, EcorePackageImpl$11); _.isInstance = function isInstance_7(instance){ return instanceOf(instance, 197); } ; _.newArrayInstance = function newArrayInstance_0(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_ENamedElement_2_classLit, $intern_2, 197, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$11_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/11', 1244); function EcorePackageImpl$12(){ } defineClass(1245, 1, $intern_165, EcorePackageImpl$12); _.isInstance = function isInstance_8(instance){ return instanceOf(instance, 58); } ; _.newArrayInstance = function newArrayInstance_1(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EObject_2_classLit, $intern_2, 58, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$12_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/12', 1245); function EcorePackageImpl$13(){ } defineClass(1246, 1, $intern_165, EcorePackageImpl$13); _.isInstance = function isInstance_9(instance){ return instanceOf(instance, 411); } ; _.newArrayInstance = function newArrayInstance_2(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EOperation_2_classLit, $intern_155, 62, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$13_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/13', 1246); function EcorePackageImpl$14(){ } defineClass(1247, 1, $intern_165, EcorePackageImpl$14); _.isInstance = function isInstance_10(instance){ return instanceOf(instance, 241); } ; _.newArrayInstance = function newArrayInstance_3(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EPackage_2_classLit, $intern_2, 241, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$14_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/14', 1247); function EcorePackageImpl$15(){ } defineClass(1248, 1, $intern_165, EcorePackageImpl$15); _.isInstance = function isInstance_11(instance){ return instanceOf(instance, 518); } ; _.newArrayInstance = function newArrayInstance_4(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EParameter_2_classLit, $intern_2, 2116, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$15_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/15', 1248); function EcorePackageImpl$16(){ } defineClass(1249, 1, $intern_165, EcorePackageImpl$16); _.isInstance = function isInstance_12(instance){ return instanceOf(instance, 102); } ; _.newArrayInstance = function newArrayInstance_5(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EReference_2_classLit, $intern_154, 19, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$16_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/16', 1249); function EcorePackageImpl$17(){ } defineClass(1250, 1, $intern_165, EcorePackageImpl$17); _.isInstance = function isInstance_13(instance){ return instanceOf(instance, 179); } ; _.newArrayInstance = function newArrayInstance_6(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, $intern_154, 179, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$17_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/17', 1250); function EcorePackageImpl$18(){ } defineClass(1251, 1, $intern_165, EcorePackageImpl$18); _.isInstance = function isInstance_14(instance){ return instanceOf(instance, 481); } ; _.newArrayInstance = function newArrayInstance_7(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_ETypedElement_2_classLit, $intern_2, 481, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$18_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/18', 1251); function EcorePackageImpl$19(){ } defineClass(1252, 1, $intern_165, EcorePackageImpl$19); _.isInstance = function isInstance_15(instance){ return instanceOf(instance, 561); } ; _.newArrayInstance = function newArrayInstance_8(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, $intern_149, 561, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$19_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/19', 1252); function EcorePackageImpl$2(){ } defineClass(1235, 1, $intern_165, EcorePackageImpl$2); _.isInstance = function isInstance_16(instance){ return instanceOf(instance, 331); } ; _.newArrayInstance = function newArrayInstance_9(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EAttribute_2_classLit, $intern_154, 35, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$2_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/2', 1235); function EcorePackageImpl$20(){ } defineClass(1253, 1, $intern_165, EcorePackageImpl$20); _.isInstance = function isInstance_17(instance){ return instanceOf(instance, 248); } ; _.newArrayInstance = function newArrayInstance_10(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EGenericType_2_classLit, $intern_158, 89, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$20_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/20', 1253); function EcorePackageImpl$21(){ } defineClass(1254, 1, $intern_165, EcorePackageImpl$21); _.isInstance = function isInstance_18(instance){ return instanceOf(instance, 457); } ; _.newArrayInstance = function newArrayInstance_11(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_ETypeParameter_2_classLit, $intern_2, 850, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$21_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/21', 1254); function EcorePackageImpl$22(){ } defineClass(1255, 1, $intern_165, EcorePackageImpl$22); _.isInstance = function isInstance_19(instance){ return instanceOfBoolean(instance); } ; _.newArrayInstance = function newArrayInstance_12(size_0){ return initUnidimensionalArray(Ljava_lang_Boolean_2_classLit, $intern_16, 485, size_0, 8, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$22_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/22', 1255); function EcorePackageImpl$23(){ } defineClass(1256, 1, $intern_165, EcorePackageImpl$23); _.isInstance = function isInstance_20(instance){ return instanceOf(instance, 195); } ; _.newArrayInstance = function newArrayInstance_13(size_0){ return initUnidimensionalArray(B_classLit, $intern_16, 195, size_0, 0, 2); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$23_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/23', 1256); function EcorePackageImpl$24(){ } defineClass(1257, 1, $intern_165, EcorePackageImpl$24); _.isInstance = function isInstance_21(instance){ return instanceOf(instance, 222); } ; _.newArrayInstance = function newArrayInstance_14(size_0){ return initUnidimensionalArray(Ljava_lang_Byte_2_classLit, $intern_16, 222, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$24_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/24', 1257); function EcorePackageImpl$25(){ } defineClass(1258, 1, $intern_165, EcorePackageImpl$25); _.isInstance = function isInstance_22(instance){ return instanceOf(instance, 180); } ; _.newArrayInstance = function newArrayInstance_15(size_0){ return initUnidimensionalArray(Ljava_lang_Character_2_classLit, $intern_16, 180, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$25_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/25', 1258); function EcorePackageImpl$26(){ } defineClass(1259, 1, $intern_165, EcorePackageImpl$26); _.isInstance = function isInstance_23(instance){ return instanceOf(instance, 206); } ; _.newArrayInstance = function newArrayInstance_16(size_0){ return initUnidimensionalArray(Ljava_util_Date_2_classLit, $intern_16, 206, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$26_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/26', 1259); function EcorePackageImpl$27(){ } defineClass(1260, 1, $intern_165, EcorePackageImpl$27); _.isInstance = function isInstance_24(instance){ return false; } ; _.newArrayInstance = function newArrayInstance_17(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_common_util_DiagnosticChain_2_classLit, $intern_2, 2215, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$27_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/27', 1260); function EcorePackageImpl$28(){ } defineClass(1261, 1, $intern_165, EcorePackageImpl$28); _.isInstance = function isInstance_25(instance){ return instanceOfDouble(instance); } ; _.newArrayInstance = function newArrayInstance_18(size_0){ return initUnidimensionalArray(Ljava_lang_Double_2_classLit, $intern_16, 345, size_0, 7, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$28_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/28', 1261); function EcorePackageImpl$29(){ } defineClass(1262, 1, $intern_165, EcorePackageImpl$29); _.isInstance = function isInstance_26(instance){ return instanceOf(instance, 61); } ; _.newArrayInstance = function newArrayInstance_19(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_common_util_EList_2_classLit, $intern_99, 61, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$29_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/29', 1262); function EcorePackageImpl$3(){ } defineClass(1236, 1, $intern_165, EcorePackageImpl$3); _.isInstance = function isInstance_27(instance){ return instanceOf(instance, 519); } ; _.newArrayInstance = function newArrayInstance_20(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EAnnotation_2_classLit, {3:1, 4:1, 5:1, 2033:1}, 598, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$3_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/3', 1236); function EcorePackageImpl$30(){ } defineClass(1263, 1, $intern_165, EcorePackageImpl$30); _.isInstance = function isInstance_28(instance){ return instanceOf(instance, 582); } ; _.newArrayInstance = function newArrayInstance_21(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_common_util_Enumerator_2_classLit, $intern_2, 2039, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$30_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/30', 1263); function EcorePackageImpl$31(){ } defineClass(1264, 1, $intern_165, EcorePackageImpl$31); _.isInstance = function isInstance_29(instance){ return instanceOf(instance, 160); } ; _.newArrayInstance = function newArrayInstance_22(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_util_FeatureMap_2_classLit, $intern_99, 160, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$31_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/31', 1264); function EcorePackageImpl$32(){ } defineClass(1265, 1, $intern_165, EcorePackageImpl$32); _.isInstance = function isInstance_30(instance){ return instanceOf(instance, 76); } ; _.newArrayInstance = function newArrayInstance_23(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_util_FeatureMap$Entry_2_classLit, $intern_166, 76, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$32_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/32', 1265); function EcorePackageImpl$33(){ } defineClass(1266, 1, $intern_165, EcorePackageImpl$33); _.isInstance = function isInstance_31(instance){ return instanceOf(instance, 161); } ; _.newArrayInstance = function newArrayInstance_24(size_0){ return initUnidimensionalArray(Ljava_lang_Float_2_classLit, $intern_16, 161, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$33_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/33', 1266); function EcorePackageImpl$34(){ } defineClass(1267, 1, $intern_165, EcorePackageImpl$34); _.isInstance = function isInstance_32(instance){ return instanceOf(instance, 17); } ; _.newArrayInstance = function newArrayInstance_25(size_0){ return initUnidimensionalArray(Ljava_lang_Integer_2_classLit, $intern_16, 17, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$34_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/34', 1267); function EcorePackageImpl$35(){ } defineClass(1268, 1, $intern_165, EcorePackageImpl$35); _.isInstance = function isInstance_33(instance){ return instanceOf(instance, 297); } ; _.newArrayInstance = function newArrayInstance_26(size_0){ return initUnidimensionalArray(Ljava_lang_Class_2_classLit, $intern_2, 297, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$35_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/35', 1268); function EcorePackageImpl$36(){ } defineClass(1269, 1, $intern_165, EcorePackageImpl$36); _.isInstance = function isInstance_34(instance){ return instanceOf(instance, 168); } ; _.newArrayInstance = function newArrayInstance_27(size_0){ return initUnidimensionalArray(Ljava_lang_Long_2_classLit, $intern_16, 168, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$36_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/36', 1269); function EcorePackageImpl$37(){ } defineClass(1270, 1, $intern_165, EcorePackageImpl$37); _.isInstance = function isInstance_35(instance){ return instanceOf(instance, 85); } ; _.newArrayInstance = function newArrayInstance_28(size_0){ return initUnidimensionalArray(Ljava_util_Map_2_classLit, $intern_2, 85, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$37_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/37', 1270); function EcorePackageImpl$38(){ } defineClass(1271, 1, $intern_165, EcorePackageImpl$38); _.isInstance = function isInstance_36(instance){ return instanceOf(instance, 599); } ; _.newArrayInstance = function newArrayInstance_29(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_resource_Resource_2_classLit, $intern_2, 599, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$38_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/38', 1271); function EcorePackageImpl$39(){ } defineClass(1272, 1, $intern_165, EcorePackageImpl$39); _.isInstance = function isInstance_37(instance){ return false; } ; _.newArrayInstance = function newArrayInstance_30(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_resource_ResourceSet_2_classLit, $intern_2, 2216, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$39_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/39', 1272); function EcorePackageImpl$4(){ } defineClass(1237, 1, $intern_165, EcorePackageImpl$4); _.isInstance = function isInstance_38(instance){ return instanceOf(instance, 90); } ; _.newArrayInstance = function newArrayInstance_31(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EClass_2_classLit, $intern_2, 29, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$4_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/4', 1237); function EcorePackageImpl$40(){ } defineClass(1273, 1, $intern_165, EcorePackageImpl$40); _.isInstance = function isInstance_39(instance){ return instanceOf(instance, 191); } ; _.newArrayInstance = function newArrayInstance_32(size_0){ return initUnidimensionalArray(Ljava_lang_Short_2_classLit, $intern_16, 191, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$40_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/40', 1273); function EcorePackageImpl$41(){ } defineClass(1274, 1, $intern_165, EcorePackageImpl$41); _.isInstance = function isInstance_40(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_33(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$41_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/41', 1274); function EcorePackageImpl$42(){ } defineClass(1275, 1, $intern_165, EcorePackageImpl$42); _.isInstance = function isInstance_41(instance){ return instanceOf(instance, 596); } ; _.newArrayInstance = function newArrayInstance_34(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_common_util_TreeIterator_2_classLit, $intern_2, 596, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$42_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/42', 1275); function EcorePackageImpl$43(){ } defineClass(1276, 1, $intern_165, EcorePackageImpl$43); _.isInstance = function isInstance_42(instance){ return false; } ; _.newArrayInstance = function newArrayInstance_35(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_common_util_InvocationTargetException_2_classLit, $intern_16, 2217, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$43_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/43', 1276); function EcorePackageImpl$44(){ } defineClass(1277, 1, $intern_165, EcorePackageImpl$44); _.isInstance = function isInstance_43(instance){ return instanceOf(instance, 44); } ; _.newArrayInstance = function newArrayInstance_36(size_0){ return initUnidimensionalArray(Ljava_util_Map$Entry_2_classLit, $intern_27, 44, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$44_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/44', 1277); function EcorePackageImpl$5(){ } defineClass(1238, 1, $intern_165, EcorePackageImpl$5); _.isInstance = function isInstance_44(instance){ return instanceOf(instance, 142); } ; _.newArrayInstance = function newArrayInstance_37(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EClassifier_2_classLit, $intern_2, 142, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$5_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/5', 1238); function EcorePackageImpl$6(){ } defineClass(1239, 1, $intern_165, EcorePackageImpl$6); _.isInstance = function isInstance_45(instance){ return instanceOf(instance, 156); } ; _.newArrayInstance = function newArrayInstance_38(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EDataType_2_classLit, $intern_2, 156, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$6_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/6', 1239); function EcorePackageImpl$7(){ } defineClass(1240, 1, $intern_165, EcorePackageImpl$7); _.isInstance = function isInstance_46(instance){ return instanceOf(instance, 469); } ; _.newArrayInstance = function newArrayInstance_39(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EEnum_2_classLit, $intern_2, 685, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$7_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/7', 1240); function EcorePackageImpl$8(){ } defineClass(1241, 1, $intern_165, EcorePackageImpl$8); _.isInstance = function isInstance_47(instance){ return instanceOf(instance, 582); } ; _.newArrayInstance = function newArrayInstance_40(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EEnumLiteral_2_classLit, $intern_2, 694, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$8_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/8', 1241); function EcorePackageImpl$9(){ } defineClass(1242, 1, $intern_165, EcorePackageImpl$9); _.isInstance = function isInstance_48(instance){ return instanceOf(instance, 480); } ; _.newArrayInstance = function newArrayInstance_41(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EFactory_2_classLit, $intern_2, 480, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_impl_EcorePackageImpl$9_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'EcorePackageImpl/9', 1242); function $didAdd_1(this$static, newAdapter){ var listener$array, listener$index, listener$max, listeners; newAdapter.setTarget(this$static.this$01); listeners = castTo($getField(this$static.this$01, 8), 2035); if (listeners != null) { for (listener$array = listeners , listener$index = 0 , listener$max = listener$array.length; listener$index < listener$max; ++listener$index) { null.$_nullMethod(); } } } function $didRemove_0(this$static, index_0, oldAdapter){ var adapter, listener$array, listener$index, listener$max, listeners, notification; listeners = castTo($getField(this$static.this$01, 8), 2035); if (listeners != null) { for (listener$array = listeners , listener$index = 0 , listener$max = listener$array.length; listener$index < listener$max; ++listener$index) { null.$_nullMethod(); } } adapter = oldAdapter; if ((this$static.this$01.eFlags_0 & 1) == 0) { notification = new MinimalEObjectImpl$1ArrayDelegatingAdapterList$1(this$static, oldAdapter, index_0); adapter.notifyChanged(notification); } instanceOf(adapter, 686)?castTo(adapter, 686).unsetTarget(this$static.this$01):adapter.getTarget() == this$static.this$01 && adapter.setTarget(null); } function $setData(this$static, data_0){ var eContainerAdapterArray, eInternalContainer; ++this$static.modCount; if (data_0 != null) { eContainerAdapterArray = (eInternalContainer = this$static.this$01.eContainer , instanceOf(eInternalContainer, 99)?castTo(eInternalContainer, 99).eBasicAdapterArray():null); if (equals_46(data_0, eContainerAdapterArray)) { $setField(this$static.this$01, 4, eContainerAdapterArray); return; } } $setField(this$static.this$01, 4, castTo(data_0, 129)); } function MinimalEObjectImpl$1ArrayDelegatingAdapterList(this$0){ $clinit_ArrayDelegatingEList(); this.this$01 = this$0; } defineClass(1038, 2080, $intern_147, MinimalEObjectImpl$1ArrayDelegatingAdapterList); _.didAdd = function didAdd_2(index_0, newAdapter){ $didAdd_1(this, castTo(newAdapter, 424)); } ; _.didRemove = function didRemove_1(index_0, oldAdapter){ $didRemove_0(this, index_0, castTo(oldAdapter, 424)); } ; var Lorg_eclipse_emf_ecore_impl_MinimalEObjectImpl$1ArrayDelegatingAdapterList_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'MinimalEObjectImpl/1ArrayDelegatingAdapterList', 1038); function MinimalEObjectImpl$1ArrayDelegatingAdapterList$1(this$1, $anonymous1, $anonymous3){ this.this$11 = this$1; NotificationImpl_1.call(this, 8, $anonymous1, null, $anonymous3); } defineClass(1039, 152, $intern_145, MinimalEObjectImpl$1ArrayDelegatingAdapterList$1); _.getNotifier = function getNotifier_7(){ return this.this$11.this$01; } ; var Lorg_eclipse_emf_ecore_impl_MinimalEObjectImpl$1ArrayDelegatingAdapterList$1_2_classLit = createForClass('org.eclipse.emf.ecore.impl', 'MinimalEObjectImpl/1ArrayDelegatingAdapterList/1', 1039); function $clinit_EcorePlugin(){ $clinit_EcorePlugin = emptyMethod; new EcorePlugin; new ArrayList; } function EcorePlugin(){ new HashMap; new HashMap; new HashMap; } defineClass(1067, 1066, {}, EcorePlugin); var Lorg_eclipse_emf_ecore_plugin_EcorePlugin_2_classLit = createForClass('org.eclipse.emf.ecore.plugin', 'EcorePlugin', 1067); var Lorg_eclipse_emf_ecore_resource_Resource_2_classLit = createForInterface('org.eclipse.emf.ecore.resource', 'Resource'); function $getEObject(this$static, uriFragmentPath){ var eObject, i, size_0; size_0 = uriFragmentPath.array.length; eObject = $getEObjectForURIFragmentRootSegment(this$static, size_0 == 0?'':(checkCriticalElementIndex(0, uriFragmentPath.array.length) , castToString(uriFragmentPath.array[0]))); for (i = 1; i < size_0 && !!eObject; ++i) { eObject = castTo(eObject, 54).eObjectForURIFragmentSegment((checkCriticalElementIndex(i, uriFragmentPath.array.length) , castToString(uriFragmentPath.array[i]))); } return eObject; } function $getEObjectByID(this$static, id_0){ var eObject, eObjectId, i, result, eClass, eIDAttribute; result = null; for (i = new ResourceImpl$5((!this$static.contents && (this$static.contents = new ResourceImpl$ContentsEList(this$static)) , this$static.contents)); $hasNext_7(i);) { eObject = castTo($next_13(i), 58); eObjectId = (eClass = eObject.eClass_0() , eIDAttribute = ($getEAllAttributes(eClass) , eClass.eIDAttribute) , !eIDAttribute || !eObject.eIsSet_0(eIDAttribute)?null:convertToString_2($getEAttributeType(eIDAttribute), eObject.eGet_0(eIDAttribute))); if (eObjectId != null) { if ($equals_5(eObjectId, id_0)) { result = eObject; break; } } } return result; } function $getEObjectForURIFragmentRootSegment(this$static, uriFragmentRootSegment){ var contents, exception, position; position = 0; if (uriFragmentRootSegment.length > 0) { try { position = __parseAndValidateInt(uriFragmentRootSegment, $intern_43, $intern_0); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 130)) { exception = $e0; throw toJs(new WrappedException(exception)); } else throw toJs($e0); } } contents = (!this$static.contents && (this$static.contents = new ResourceImpl$ContentsEList(this$static)) , this$static.contents); return position < contents.size_0 && position >= 0?castTo($get_20(contents, position), 58):null; } defineClass(799, 1524, $intern_167); _.attached = function attached(eObject){ } ; _.detached = function detached(eObject){ } ; _.getContents = function getContents(){ return !this.contents && (this.contents = new ResourceImpl$ContentsEList(this)) , this.contents; } ; _.getEObject = function getEObject(uriFragment){ var i, index_0, length_0, start_0, uriFragmentPath; length_0 = uriFragment.length; if (length_0 > 0) { checkCriticalStringElementIndex(0, uriFragment.length); if (uriFragment.charCodeAt(0) == 47) { uriFragmentPath = new ArrayList_0(4); start_0 = 1; for (i = 1; i < length_0; ++i) { checkCriticalStringElementIndex(i, uriFragment.length); if (uriFragment.charCodeAt(i) == 47) { $add_3(uriFragmentPath, start_0 == i?'':(checkCriticalStringBounds(start_0, i, uriFragment.length) , uriFragment.substr(start_0, i - start_0))); start_0 = i + 1; } } $add_3(uriFragmentPath, (checkCriticalStringElementIndex(start_0, uriFragment.length + 1) , uriFragment.substr(start_0))); return $getEObject(this, uriFragmentPath); } else { checkCriticalStringElementIndex(length_0 - 1, uriFragment.length); if (uriFragment.charCodeAt(length_0 - 1) == 63) { index_0 = $lastIndexOf_0(uriFragment, fromCodePoint(63), length_0 - 2); index_0 > 0 && (uriFragment = (checkCriticalStringBounds(0, index_0, uriFragment.length) , uriFragment.substr(0, index_0))); } } } return $getEObjectByID(this, uriFragment); } ; _.getResourceSet = function getResourceSet(){ return this.resourceSet; } ; _.toString_0 = function toString_157(){ var number; return $getName(this.___clazz) + '@' + (number = hashCode__I__devirtual$(this) >>> 0 , number.toString(16)) + " uri='" + this.uri_0 + "'"; } ; _.isLoaded = false; var Lorg_eclipse_emf_ecore_resource_impl_ResourceImpl_2_classLit = createForClass('org.eclipse.emf.ecore.resource.impl', 'ResourceImpl', 799); function BinaryResourceImpl(uri_0){ this.uri_0 = uri_0; } defineClass(1525, 799, $intern_167, BinaryResourceImpl); var Lorg_eclipse_emf_ecore_resource_impl_BinaryResourceImpl_2_classLit = createForClass('org.eclipse.emf.ecore.resource.impl', 'BinaryResourceImpl', 1525); function $getEObjectChildren(this$static, eObject){ return this$static.isResolveProxies?eObject.eContents_0().iterator_0():castTo(eObject.eContents_0(), 71).basicIterator(); } function $hasNext_7(this$static){ var iterator; if (!this$static.includeRoot && this$static.data_0 == null) { this$static.nextPruneIterator = this$static.getChildren(this$static.object); $add_21(this$static, this$static.nextPruneIterator); iterator = this$static.nextPruneIterator; } else { if (this$static.data_0 == null) { return true; } else if (this$static.size_0 == 0) { return false; } else { iterator = castTo(this$static.data_0[this$static.size_0 - 1], 51); } } if (iterator == this$static.resourceSetIterator && null.$_nullField >= null.$_nullMethod()) { $next_13(this$static); return $hasNext_7(this$static); } else { return iterator.hasNext_0(); } } defineClass(1190, 708, $intern_142); _.getChildren = function getChildren_0(object){ return instanceOf(object, 58)?$getEObjectChildren(this, castTo(object, 58)):instanceOf(object, 599)?new AbstractEList$EIterator(castTo(object, 599).getContents()):maskUndefined(object) === maskUndefined(this.object)?castTo(object, 16).iterator_0():($clinit_ECollections() , EMPTY_ELIST.listIterator); } ; _.hasNext_0 = function hasNext_48(){ return $hasNext_7(this); } ; _.isResolveProxies = false; var Lorg_eclipse_emf_ecore_util_EcoreUtil$ContentTreeIterator_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EcoreUtil/ContentTreeIterator', 1190); function ResourceImpl$5($anonymous0){ AbstractTreeIterator.call(this, $anonymous0, false); this.isResolveProxies = false; } defineClass(1526, 1190, $intern_142, ResourceImpl$5); _.getChildren = function getChildren_1(object){ return maskUndefined(object) === maskUndefined(this.object)?castTo(object, 15).iterator_0():new EcoreUtil$ProperContentIterator(castTo(object, 58)); } ; var Lorg_eclipse_emf_ecore_resource_impl_ResourceImpl$5_2_classLit = createForClass('org.eclipse.emf.ecore.resource.impl', 'ResourceImpl/5', 1526); function ResourceImpl$ContentsEList(this$0){ this.this$01 = this$0; } defineClass(658, 2092, $intern_156, ResourceImpl$ContentsEList); _.contains = function contains_66(object){ return this.size_0 <= 4?$contains_10(this, object):instanceOf(object, 54) && castTo(object, 54).eDirectResource() == this.this$01; } ; _.didAdd = function didAdd_3(index_0, object){ index_0 == this.size_0 - 1 && (this.this$01.isLoaded || (this.this$01.isLoaded = true , null)); } ; _.didClear = function didClear_1(oldSize, oldData){ oldSize == 0?this.this$01.isLoaded || (this.this$01.isLoaded = true , null):$didClear(this, oldSize, oldData); } ; _.didRemove = function didRemove_2(index_0, object){ } ; _.didSet = function didSet_1(index_0, newObject, oldObject){ } ; _.getFeatureID_0 = function getFeatureID_12(){ return 2; } ; _.getNotifier = function getNotifier_8(){ return this.this$01; } ; _.hasInverse = function hasInverse_10(){ return true; } ; _.inverseAdd = function inverseAdd_8(object, notifications){ var eObject; eObject = castTo(object, 54); notifications = eObject.eSetResource(this.this$01, notifications); return notifications; } ; _.inverseRemove = function inverseRemove_8(object, notifications){ var eObject; eObject = castTo(object, 54); return eObject.eSetResource(null, notifications); } ; _.isNotificationRequired = function isNotificationRequired_3(){ return false; } ; _.isUnique = function isUnique_7(){ return true; } ; _.newData = function newData_13(capacity){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_EObject_2_classLit, $intern_2, 58, capacity, 0, 1); } ; _.useEquals = function useEquals_14(){ return false; } ; var Lorg_eclipse_emf_ecore_resource_impl_ResourceImpl$ContentsEList_2_classLit = createForClass('org.eclipse.emf.ecore.resource.impl', 'ResourceImpl/ContentsEList', 658); function AbstractSequentialInternalEList$1(this$0){ this.this$01 = this$0; } defineClass(970, 2062, $intern_38, AbstractSequentialInternalEList$1); _.listIterator_1 = function listIterator_32(index_0){ return this.this$01.basicListIterator_0(index_0); } ; _.size_1 = function size_80(){ return this.this$01.size_1(); } ; var Lorg_eclipse_emf_ecore_util_AbstractSequentialInternalEList$1_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'AbstractSequentialInternalEList/1', 970); function $clinit_ExtendedMetaData(){ $clinit_ExtendedMetaData = emptyMethod; FEATURE_KINDS = stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['unspecified', 'simple', 'attribute', 'attributeWildcard', 'element', 'elementWildcard', 'group']); CONTENT_KINDS = stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['unspecified', 'empty', 'simple', 'mixed', 'elementOnly']); WHITE_SPACE_KINDS = stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['unspecified', 'preserve', 'replace', 'collapse']); INSTANCE_11 = new BasicExtendedMetaData; } var CONTENT_KINDS, FEATURE_KINDS, INSTANCE_11, WHITE_SPACE_KINDS; function $clinit_BasicExtendedMetaData(){ $clinit_BasicExtendedMetaData = emptyMethod; var eAttribute, eDataType; UNINITIALIZED_EDATA_TYPE = ($clinit_EcoreFactory() , eDataType = new EDataTypeImpl , eDataType); UNINITIALIZED_ESTRUCTURAL_FEATURE = (eAttribute = new EAttributeImpl , eAttribute); } function $basicGetAffiliation(this$static, eStructuralFeature){ var eAnnotation, fragmentIndex, qualifiedName; eAnnotation = eStructuralFeature.getEAnnotation(this$static.annotationURI); if (eAnnotation) { qualifiedName = castToString($get_21((!eAnnotation.details && (eAnnotation.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, eAnnotation)) , eAnnotation.details), 'affiliation')); if (qualifiedName != null) { fragmentIndex = $lastIndexOf(qualifiedName, fromCodePoint(35)); return fragmentIndex == -1?$getElement(this$static, $getNamespace(this$static, $getEPackage(eStructuralFeature.getEContainingClass())), qualifiedName):fragmentIndex == 0?$getElement(this$static, null, (checkCriticalStringElementIndex(1, qualifiedName.length + 1) , qualifiedName.substr(1))):$getElement(this$static, (checkCriticalStringBounds(0, fragmentIndex, qualifiedName.length) , qualifiedName.substr(0, fragmentIndex)), (checkCriticalStringElementIndex(fragmentIndex + 1, qualifiedName.length + 1) , qualifiedName.substr(fragmentIndex + 1))); } } return null; } function $basicGetBaseType(this$static, eDataType){ var baseType, details, eAnnotation, index_0, type_0; eAnnotation = eDataType.getEAnnotation(this$static.annotationURI); if (eAnnotation) { details = (!eAnnotation.details && (eAnnotation.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, eAnnotation)) , eAnnotation.details); baseType = castToString($get_21(details, 'baseType')); if (baseType != null) { index_0 = baseType.lastIndexOf('#'); type_0 = index_0 == -1?$getType_0(this$static, eDataType.getEPackage(), baseType):index_0 == 0?$getType(this$static, null, (checkCriticalStringElementIndex(1, baseType.length + 1) , baseType.substr(1))):$getType(this$static, (checkCriticalStringBounds(0, index_0, baseType.length) , baseType.substr(0, index_0)), (checkCriticalStringElementIndex(index_0 + 1, baseType.length + 1) , baseType.substr(index_0 + 1))); if (instanceOf(type_0, 156)) { return castTo(type_0, 156); } } } return null; } function $basicGetContentKind(this$static, eClass){ var eAnnotation, i, kind; eAnnotation = eClass.getEAnnotation(this$static.annotationURI); if (eAnnotation) { kind = $get_21((!eAnnotation.details && (eAnnotation.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, eAnnotation)) , eAnnotation.details), 'kind'); if (kind != null) { for (i = 1; i < ($clinit_ExtendedMetaData() , CONTENT_KINDS).length; ++i) { if ($equals_5(CONTENT_KINDS[i], kind)) { return i; } } } } return 0; } function $basicGetFeatureKind(this$static, eStructuralFeature){ var eAnnotation, i, kind; eAnnotation = eStructuralFeature.getEAnnotation(this$static.annotationURI); if (eAnnotation) { kind = $get_21((!eAnnotation.details && (eAnnotation.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, eAnnotation)) , eAnnotation.details), 'kind'); if (kind != null) { for (i = 1; i < ($clinit_ExtendedMetaData() , FEATURE_KINDS).length; ++i) { if ($equals_5(FEATURE_KINDS[i], kind)) { return i; } } } } return 0; } function $basicGetGroup(this$static, eStructuralFeature){ var eAnnotation, eContainingClass, fragmentIndex, name_0, namespace, qualifiedName; eAnnotation = eStructuralFeature.getEAnnotation(this$static.annotationURI); if (eAnnotation) { qualifiedName = castToString($get_21((!eAnnotation.details && (eAnnotation.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, eAnnotation)) , eAnnotation.details), 'group')); if (qualifiedName != null) { fragmentIndex = $lastIndexOf(qualifiedName, fromCodePoint(35)); eContainingClass = eStructuralFeature.getEContainingClass(); if (fragmentIndex == -1) { namespace = $getNamespace(this$static, $getEPackage(eContainingClass)); name_0 = qualifiedName; } else if (fragmentIndex == 0) { namespace = null; name_0 = (checkCriticalStringElementIndex(1, qualifiedName.length + 1) , qualifiedName.substr(1)); } else { namespace = (checkCriticalStringBounds(0, fragmentIndex, qualifiedName.length) , qualifiedName.substr(0, fragmentIndex)); name_0 = (checkCriticalStringElementIndex(fragmentIndex + 1, qualifiedName.length + 1) , qualifiedName.substr(fragmentIndex + 1)); } switch ($getFeatureKind($getExtendedMetaData_1(this$static, eStructuralFeature))) { case 2: case 3: { return $getAttribute_0(this$static, eContainingClass, namespace, name_0); } case 0: case 4: case 5: case 6: { return $getElement_0(this$static, eContainingClass, namespace, name_0); } } } } return null; } function $basicGetItemType(this$static, eDataType){ var details, eAnnotation, index_0, itemType, type_0; eAnnotation = eDataType.getEAnnotation(this$static.annotationURI); if (eAnnotation) { details = (!eAnnotation.details && (eAnnotation.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, eAnnotation)) , eAnnotation.details); itemType = castToString($get_21(details, 'itemType')); if (itemType != null) { index_0 = itemType.lastIndexOf('#'); type_0 = index_0 == -1?$getType_0(this$static, eDataType.getEPackage(), itemType):index_0 == 0?$getType(this$static, null, (checkCriticalStringElementIndex(1, itemType.length + 1) , itemType.substr(1))):$getType(this$static, (checkCriticalStringBounds(0, index_0, itemType.length) , itemType.substr(0, index_0)), (checkCriticalStringElementIndex(index_0 + 1, itemType.length + 1) , itemType.substr(index_0 + 1))); if (instanceOf(type_0, 156)) { return castTo(type_0, 156); } } } return null; } function $basicGetMemberTypes(this$static, eDataType){ var eAnnotation, index_0, member, member$array, member$index, member$max, memberTypes, result, type_0; eAnnotation = eDataType.getEAnnotation(this$static.annotationURI); if (eAnnotation) { memberTypes = castToString($get_21((!eAnnotation.details && (eAnnotation.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, eAnnotation)) , eAnnotation.details), 'memberTypes')); if (memberTypes != null) { result = new ArrayList; for (member$array = $split_0(memberTypes, '\\w') , member$index = 0 , member$max = member$array.length; member$index < member$max; ++member$index) { member = member$array[member$index]; index_0 = member.lastIndexOf('#'); type_0 = index_0 == -1?$getType_0(this$static, eDataType.getEPackage(), member):index_0 == 0?$getType(this$static, null, (checkCriticalStringElementIndex(1, member.length + 1) , member.substr(1))):$getType(this$static, (checkCriticalStringBounds(0, index_0, member.length) , member.substr(0, index_0)), (checkCriticalStringElementIndex(index_0 + 1, member.length + 1) , member.substr(index_0 + 1))); instanceOf(type_0, 156) && $add_3(result, castTo(type_0, 156)); } return result; } } return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } function $basicGetName(this$static, eClassifier){ var eAnnotation, result; eAnnotation = eClassifier.getEAnnotation(this$static.annotationURI); if (eAnnotation) { result = castToString($get_21((!eAnnotation.details && (eAnnotation.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, eAnnotation)) , eAnnotation.details), 'name')); if (result != null) { return result; } } return eClassifier.getName(); } function $basicGetName_0(this$static, eStructuralFeature){ var eAnnotation, result; eAnnotation = eStructuralFeature.getEAnnotation(this$static.annotationURI); if (eAnnotation) { result = castToString($get_21((!eAnnotation.details && (eAnnotation.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, eAnnotation)) , eAnnotation.details), 'name')); if (result != null) { return result; } } return eStructuralFeature.getName(); } function $basicGetNamespace(this$static, eStructuralFeature){ var eAnnotation, result; eAnnotation = eStructuralFeature.getEAnnotation(this$static.annotationURI); if (!eAnnotation) { return null; } else { result = castToString($get_21((!eAnnotation.details && (eAnnotation.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, eAnnotation)) , eAnnotation.details), 'namespace')); return $equals_5('##targetNamespace', result)?$getNamespace(this$static, $getEPackage(eStructuralFeature.getEContainingClass())):result; } } function $basicGetWhiteSpaceFacet(this$static, eDataType){ var eAnnotation, i, whiteSpaceLiteral; eAnnotation = eDataType.getEAnnotation(this$static.annotationURI); if (eAnnotation) { whiteSpaceLiteral = castToString($get_21((!eAnnotation.details && (eAnnotation.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, eAnnotation)) , eAnnotation.details), 'whiteSpace')); for (i = 1; i < ($clinit_ExtendedMetaData() , WHITE_SPACE_KINDS).length; ++i) { if ($equals_5(WHITE_SPACE_KINDS[i], whiteSpaceLiteral)) { return i; } } } return 0; } function $basicGetWildcards(this$static, eStructuralFeature){ var eAnnotation, result, wildcard, wildcard$array, wildcard$index, wildcard$max, wildcards; eAnnotation = eStructuralFeature.getEAnnotation(this$static.annotationURI); if (eAnnotation) { wildcards = castToString($get_21((!eAnnotation.details && (eAnnotation.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, eAnnotation)) , eAnnotation.details), 'wildcards')); if (wildcards != null) { result = new ArrayList; for (wildcard$array = $split_0(wildcards, '\\w') , wildcard$index = 0 , wildcard$max = wildcard$array.length; wildcard$index < wildcard$max; ++wildcard$index) { wildcard = wildcard$array[wildcard$index]; $equals_5(wildcard, '##other')?$add_3(result, '!##' + $getNamespace(this$static, $getEPackage(eStructuralFeature.getEContainingClass()))):$equals_5(wildcard, '##local')?(result.array.push(null) , undefined , true):$equals_5(wildcard, '##targetNamespace')?$add_3(result, $getNamespace(this$static, $getEPackage(eStructuralFeature.getEContainingClass()))):(push_1(result.array, wildcard) , true); } return result; } } return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } function $getAffiliation(this$static, eClass, eStructuralFeature){ var affiliation, allAttributes, allElements, i, name_0, namespace, namespace0, result, size_0; if ($getFeatureID(eClass, eStructuralFeature) >= 0) { return eStructuralFeature; } switch ($getFeatureKind($getExtendedMetaData_1(this$static, eStructuralFeature))) { case 2: { if ($equals_5('', $getExtendedMetaData(this$static, eStructuralFeature.getEContainingClass()).getName())) { namespace = $getNamespace_0($getExtendedMetaData_1(this$static, eStructuralFeature)); name_0 = $getName_0($getExtendedMetaData_1(this$static, eStructuralFeature)); result = $getLocalAttribute(this$static, eClass, namespace, name_0); if (result) { return result; } allAttributes = $getAllAttributes(this$static, eClass); for (i = 0 , size_0 = allAttributes.size_1(); i < size_0; ++i) { result = castTo(allAttributes.get_0(i), 179); if ($matches($getWildcards($getExtendedMetaData_1(this$static, result)), namespace)) { return result; } } } return null; } case 4: { if ($equals_5('', $getExtendedMetaData(this$static, eStructuralFeature.getEContainingClass()).getName())) { for (affiliation = eStructuralFeature; affiliation; affiliation = $getAffiliation_0($getExtendedMetaData_1(this$static, affiliation))) { namespace0 = $getNamespace_0($getExtendedMetaData_1(this$static, affiliation)); name_0 = $getName_0($getExtendedMetaData_1(this$static, affiliation)); result = $getLocalElement(this$static, eClass, namespace0, name_0); if (result) { return result; } } namespace = $getNamespace_0($getExtendedMetaData_1(this$static, eStructuralFeature)); if ($equals_5('http://www.eclipse.org/emf/2003/XMLType', namespace)) { return $getMixedFeature(this$static, eClass); } else { allElements = $getAllElements(this$static, eClass); for (i = 0 , size_0 = allElements.size_1(); i < size_0; ++i) { result = castTo(allElements.get_0(i), 179); if ($matches($getWildcards($getExtendedMetaData_1(this$static, result)), namespace)) { return result; } } } } return null; } default:{ return null; } } } function $getAllAttributes(this$static, eClass){ var allAttributes, attributes, changeable, eGenericType, eSuperType, i, result, result0, size_0, superTypes; superTypes = $getESuperTypes(eClass); result0 = null; changeable = false; for (i = 0 , size_0 = $getEGenericSuperTypes(superTypes.this$01).size_0; i < size_0; ++i) { eSuperType = castTo($resolve_1(superTypes, i, (eGenericType = castTo($get_20($getEGenericSuperTypes(superTypes.this$01), i), 89) , result = eGenericType.eRawType , instanceOf(result, 90)?castTo(result, 29):($clinit_EcorePackage$Literals() , EOBJECT))), 29); allAttributes = $getAllAttributes(this$static, eSuperType); if (!allAttributes.isEmpty()) { if (!result0) { result0 = allAttributes; } else { if (!changeable) { changeable = true; result0 = new UniqueEList_0(result0); } result0.addAll(allAttributes); } } } attributes = $getAttributes(this$static, eClass); if (attributes.isEmpty()) { return !result0?($clinit_Collections() , $clinit_Collections() , EMPTY_LIST):result0; } else { if (!result0) { return attributes; } else { changeable || (result0 = new UniqueEList_0(result0)); result0.addAll(attributes); return result0; } } } function $getAllElements(this$static, eClass){ var allElements, changeable, eGenericType, eSuperType, elements, i, result, result0, size_0, superTypes; superTypes = $getESuperTypes(eClass); result0 = null; changeable = false; for (i = 0 , size_0 = $getEGenericSuperTypes(superTypes.this$01).size_0; i < size_0; ++i) { eSuperType = castTo($resolve_1(superTypes, i, (eGenericType = castTo($get_20($getEGenericSuperTypes(superTypes.this$01), i), 89) , result = eGenericType.eRawType , instanceOf(result, 90)?castTo(result, 29):($clinit_EcorePackage$Literals() , EOBJECT))), 29); allElements = $getAllElements(this$static, eSuperType); if (!allElements.isEmpty()) { if (!result0) { result0 = allElements; } else { if (!changeable) { changeable = true; result0 = new UniqueEList_0(result0); } result0.addAll(allElements); } } } elements = $getElements(this$static, eClass); if (elements.isEmpty()) { return !result0?($clinit_Collections() , $clinit_Collections() , EMPTY_LIST):result0; } else { if (!result0) { return elements; } else { changeable || (result0 = new UniqueEList_0(result0)); result0.addAll(elements); return result0; } } } function $getAnnotation(this$static, eModelElement){ var result; result = eModelElement.getEAnnotation(this$static.annotationURI); return result; } function $getAttribute(this$static, namespace, name_0){ var documentRoot, ePackage, ePackage0; ePackage0 = (ePackage = $getEPackage_0(this$static.registry, namespace) , ePackage); if (ePackage0) { documentRoot = castTo($getType_1($getExtendedMetaData_0(this$static, ePackage0), ''), 29); if (documentRoot) { return $getLocalAttribute(this$static, documentRoot, namespace, name_0); } } return null; } function $getAttribute_0(this$static, eClass, namespace, name_0){ var result; result = $getLocalAttribute(this$static, eClass, namespace, name_0); if (!result) { result = $getAttribute(this$static, namespace, name_0); if (!!result && !$getAffiliation(this$static, eClass, result)) { return null; } } return result; } function $getAttributes(this$static, eClass){ var eStructuralFeature, eStructuralFeatures, i, result, size_0; eStructuralFeatures = (!eClass.eStructuralFeatures && (eClass.eStructuralFeatures = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, eClass, 21, 17)) , eClass.eStructuralFeatures); result = null; for (i = 0 , size_0 = eStructuralFeatures.size_0; i < size_0; ++i) { eStructuralFeature = castTo($get_20(eStructuralFeatures, i), 179); switch ($getFeatureKind($getExtendedMetaData_1(this$static, eStructuralFeature))) { case 2: case 3: { !result && (result = new ArrayList); push_1(result.array, eStructuralFeature); } } } return !result?($clinit_Collections() , $clinit_Collections() , EMPTY_LIST):result; } function $getElement(this$static, namespace, name_0){ var documentRoot, ePackage, ePackage0; ePackage0 = (ePackage = $getEPackage_0(this$static.registry, namespace) , ePackage); if (ePackage0) { documentRoot = castTo($getType_1($getExtendedMetaData_0(this$static, ePackage0), ''), 29); if (documentRoot) { return $getLocalElement(this$static, documentRoot, namespace, name_0); } } return null; } function $getElement_0(this$static, eClass, namespace, name_0){ var result; result = $getLocalElement(this$static, eClass, namespace, name_0); if (!result) { result = $getElement(this$static, namespace, name_0); if (!!result && !$getAffiliation(this$static, eClass, result)) { return null; } } return result; } function $getElements(this$static, eClass){ var eStructuralFeature, eStructuralFeatures, i, result, size_0; eStructuralFeatures = (!eClass.eStructuralFeatures && (eClass.eStructuralFeatures = new EObjectContainmentWithInverseEList(Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, eClass, 21, 17)) , eClass.eStructuralFeatures); result = null; for (i = 0 , size_0 = eStructuralFeatures.size_0; i < size_0; ++i) { eStructuralFeature = castTo($get_20(eStructuralFeatures, i), 179); switch ($getFeatureKind($getExtendedMetaData_1(this$static, eStructuralFeature))) { case 4: case 5: case 6: { !result && (result = new ArrayList); push_1(result.array, eStructuralFeature); break; } } } return !result?($clinit_Collections() , $clinit_Collections() , EMPTY_LIST):result; } function $getExtendedMetaData(this$static, eClassifier){ var holder, result; holder = castTo(eClassifier, 691); result = holder.getExtendedMetaData_1(); !result && holder.setExtendedMetaData_1(result = instanceOf(eClassifier, 90)?new BasicExtendedMetaData$EClassExtendedMetaDataImpl(this$static, castTo(eClassifier, 29)):new BasicExtendedMetaData$EDataTypeExtendedMetaDataImpl(this$static, castTo(eClassifier, 156))); return result; } function $getExtendedMetaData_0(this$static, ePackage){ var holder, result; holder = castTo(ePackage, 690); result = holder.getExtendedMetaData(); !result && holder.setExtendedMetaData(result = new BasicExtendedMetaData$EPackageExtendedMetaDataImpl(this$static, ePackage)); return result; } function $getExtendedMetaData_1(this$static, eStructuralFeature){ var holder, result; holder = castTo(eStructuralFeature, 692); result = holder.getExtendedMetaData_0(); !result && holder.setExtendedMetaData_0(result = new BasicExtendedMetaData$EStructuralFeatureExtendedMetaDataImpl(this$static, eStructuralFeature)); return result; } function $getLocalAttribute(this$static, eClass, namespace, name_0){ var allAttributes, eStructuralFeature, featureNamespace, i, result, size_0; result = null; allAttributes = $getAllAttributes(this$static, eClass); for (i = 0 , size_0 = allAttributes.size_1(); i < size_0; ++i) { eStructuralFeature = castTo(allAttributes.get_0(i), 179); if ($equals_5(name_0, $getName_0($getExtendedMetaData_1(this$static, eStructuralFeature)))) { featureNamespace = $getNamespace_0($getExtendedMetaData_1(this$static, eStructuralFeature)); if (namespace == null) { if (featureNamespace == null) { return eStructuralFeature; } else !result && (result = eStructuralFeature); } else if ($equals_5(namespace, featureNamespace)) { return eStructuralFeature; } else featureNamespace == null && !result && (result = eStructuralFeature); } } return null; } function $getLocalElement(this$static, eClass, namespace, name_0){ var allElements, eStructuralFeature, featureNamespace, i, result, size_0; result = null; allElements = $getAllElements(this$static, eClass); for (i = 0 , size_0 = allElements.size_1(); i < size_0; ++i) { eStructuralFeature = castTo(allElements.get_0(i), 179); if ($equals_5(name_0, $getName_0($getExtendedMetaData_1(this$static, eStructuralFeature)))) { featureNamespace = $getNamespace_0($getExtendedMetaData_1(this$static, eStructuralFeature)); if (namespace == null) { if (featureNamespace == null) { return eStructuralFeature; } else !result && (result = eStructuralFeature); } else if ($equals_5(namespace, featureNamespace)) { return eStructuralFeature; } else featureNamespace == null && !result && (result = eStructuralFeature); } } return null; } function $getMixedFeature(this$static, eClass){ var eAllAttributes, eAttribute, i, size_0; switch ($getExtendedMetaData(this$static, eClass).getContentKind()) { case 3: case 2: { eAllAttributes = $getEAllAttributes(eClass); for (i = 0 , size_0 = eAllAttributes.size_0; i < size_0; ++i) { eAttribute = castTo($get_20(eAllAttributes, i), 35); if ($getFeatureKind($getExtendedMetaData_1(this$static, eAttribute)) == 5) { return eAttribute; } } break; } } return null; } function $getNamespace(this$static, ePackage){ return $isQualified($getExtendedMetaData_0(this$static, ePackage))?ePackage.getNsURI():null; } function $getType(this$static, namespace, name_0){ var ePackage, ePackage0; ePackage0 = (ePackage = $getEPackage_0(this$static.registry, namespace) , ePackage); return !ePackage0?null:$getType_1($getExtendedMetaData_0(this$static, ePackage0), name_0); } function $getType_0(this$static, ePackage, name_0){ return $getType_1($getExtendedMetaData_0(this$static, ePackage), name_0); } function $matches(wildcards, namespace){ var i, size_0, suffixlength, wildcard; if (!wildcards.isEmpty()) { for (i = 0 , size_0 = wildcards.size_1(); i < size_0; ++i) { wildcard = castToString(wildcards.get_0(i)); if (wildcard == null?namespace == null:$equals_5(wildcard.substr(0, 3), '!##')?namespace != null && (suffixlength = namespace.length , !$equals_5(wildcard.substr(wildcard.length - suffixlength, suffixlength), namespace) || wildcard.length != namespace.length + 3) && !$equals_5('http://www.eclipse.org/emf/2003/XMLType', namespace):$equals_5(wildcard, '##any') && !$equals_5('http://www.eclipse.org/emf/2003/XMLType', namespace) || $equals_5(wildcard, namespace)) { return true; } } } return false; } function BasicExtendedMetaData(){ $clinit_BasicExtendedMetaData(); BasicExtendedMetaData_0.call(this, ($clinit_EPackage$Registry() , INSTANCE_6)); } function BasicExtendedMetaData_0(registry){ this.annotationURI = (checkCriticalNotNull('http:///org/eclipse/emf/ecore/util/ExtendedMetaData') , 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData'); this.registry = registry; new EPackageRegistryImpl; } defineClass(634, 1, {}, BasicExtendedMetaData); var UNINITIALIZED_EDATA_TYPE, UNINITIALIZED_ESTRUCTURAL_FEATURE; var Lorg_eclipse_emf_ecore_util_BasicExtendedMetaData_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'BasicExtendedMetaData', 634); function $setContentKind(this$static, kind){ this$static.contentKind = kind; } function $setName_2(this$static, name_0){ this$static.name_0 = name_0; } function BasicExtendedMetaData$EClassExtendedMetaDataImpl(this$0, eClass){ this.this$01 = this$0; this.eClass = eClass; } defineClass(1181, 1, {}, BasicExtendedMetaData$EClassExtendedMetaDataImpl); _.getBaseType = function getBaseType(){ return null; } ; _.getContentKind = function getContentKind(){ this.contentKind == -2 && $setContentKind(this, $basicGetContentKind(this.this$01, this.eClass)); return this.contentKind; } ; _.getItemType = function getItemType(){ return null; } ; _.getMemberTypes = function getMemberTypes(){ return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } ; _.getName = function getName_7(){ this.name_0 == 'uninitialized' && $setName_2(this, $basicGetName(this.this$01, this.eClass)); return this.name_0; } ; _.getWhiteSpaceFacet = function getWhiteSpaceFacet(){ return 0; } ; _.contentKind = -2; _.name_0 = 'uninitialized'; var Lorg_eclipse_emf_ecore_util_BasicExtendedMetaData$EClassExtendedMetaDataImpl_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'BasicExtendedMetaData/EClassExtendedMetaDataImpl', 1181); function $setBaseType(this$static, baseType){ this$static.baseType = baseType; } function $setItemType(this$static, itemType){ this$static.itemType = itemType; } function $setMemberTypes(this$static, memberTypes){ this$static.memberTypes = memberTypes; } function $setName_3(this$static, name_0){ this$static.name_0 = name_0; } function $setWhiteSpaceFacet(this$static, whiteSpace){ this$static.whiteSpace = whiteSpace; } function BasicExtendedMetaData$EDataTypeExtendedMetaDataImpl(this$0, eDataType){ this.this$01 = this$0; this.baseType = ($clinit_BasicExtendedMetaData() , UNINITIALIZED_EDATA_TYPE); this.itemType = UNINITIALIZED_EDATA_TYPE; this.eDataType = eDataType; } defineClass(1182, 1, {}, BasicExtendedMetaData$EDataTypeExtendedMetaDataImpl); _.getBaseType = function getBaseType_0(){ this.baseType == ($clinit_BasicExtendedMetaData() , UNINITIALIZED_EDATA_TYPE) && $setBaseType(this, $basicGetBaseType(this.this$01, this.eDataType)); return this.baseType; } ; _.getContentKind = function getContentKind_0(){ return 0; } ; _.getItemType = function getItemType_0(){ this.itemType == ($clinit_BasicExtendedMetaData() , UNINITIALIZED_EDATA_TYPE) && $setItemType(this, $basicGetItemType(this.this$01, this.eDataType)); return this.itemType; } ; _.getMemberTypes = function getMemberTypes_0(){ !this.memberTypes && $setMemberTypes(this, $basicGetMemberTypes(this.this$01, this.eDataType)); return this.memberTypes; } ; _.getName = function getName_8(){ this.name_0 == 'uninitialized' && $setName_3(this, $basicGetName(this.this$01, this.eDataType)); return this.name_0; } ; _.getWhiteSpaceFacet = function getWhiteSpaceFacet_0(){ this.whiteSpace == -2 && $setWhiteSpaceFacet(this, $basicGetWhiteSpaceFacet(this.this$01, this.eDataType)); return this.whiteSpace; } ; _.name_0 = 'uninitialized'; _.whiteSpace = -2; var Lorg_eclipse_emf_ecore_util_BasicExtendedMetaData$EDataTypeExtendedMetaDataImpl_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl', 1182); function $getType_1(this$static, name_0){ var conflictingEClassifier, eClassifier, eClassifierName, eClassifiers, i, i0, nameToClassifierMap, originalMapSize, result, size_0; result = null; !!this$static.nameToClassifierMap && (result = castTo($getStringValue(this$static.nameToClassifierMap, name_0), 142)); if (!result) { eClassifiers = this$static.ePackage.getEClassifiers(); size_0 = eClassifiers.size_0; if (!this$static.nameToClassifierMap || $size_2(this$static.nameToClassifierMap) != size_0) { nameToClassifierMap = new HashMap; !!this$static.nameToClassifierMap && $putAll(nameToClassifierMap, this$static.nameToClassifierMap); originalMapSize = nameToClassifierMap.hashCodeMap.size_0 + nameToClassifierMap.stringMap.size_0; for (i0 = originalMapSize; i0 < size_0; ++i0) { eClassifier = castTo($get_20(eClassifiers, i0), 142); eClassifierName = $getExtendedMetaData(this$static.this$01, eClassifier).getName(); conflictingEClassifier = castTo(eClassifierName == null?$put_9(nameToClassifierMap.hashCodeMap, null, eClassifier):$put_10(nameToClassifierMap.stringMap, eClassifierName, eClassifier), 142); !!conflictingEClassifier && conflictingEClassifier != eClassifier && (eClassifierName == null?$put_9(nameToClassifierMap.hashCodeMap, null, conflictingEClassifier):$put_10(nameToClassifierMap.stringMap, eClassifierName, conflictingEClassifier)); } if (nameToClassifierMap.hashCodeMap.size_0 + nameToClassifierMap.stringMap.size_0 != size_0) { for (i = 0; i < originalMapSize; ++i) { eClassifier = castTo($get_20(eClassifiers, i), 142); eClassifierName = $getExtendedMetaData(this$static.this$01, eClassifier).getName(); conflictingEClassifier = castTo(eClassifierName == null?$put_9(nameToClassifierMap.hashCodeMap, null, eClassifier):$put_10(nameToClassifierMap.stringMap, eClassifierName, eClassifier), 142); !!conflictingEClassifier && conflictingEClassifier != eClassifier && (eClassifierName == null?$put_9(nameToClassifierMap.hashCodeMap, null, conflictingEClassifier):$put_10(nameToClassifierMap.stringMap, eClassifierName, conflictingEClassifier)); } } this$static.nameToClassifierMap = nameToClassifierMap; } result = castTo($getStringValue(this$static.nameToClassifierMap, name_0), 142); } return result; } function $isQualified(this$static){ var eAnnotation; this$static.isInitialized || $setQualified(this$static, (eAnnotation = $getAnnotation(this$static.this$01, this$static.ePackage) , !eAnnotation || !$equals_5('false', $get_21((!eAnnotation.details && (eAnnotation.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, eAnnotation)) , eAnnotation.details), 'qualified')))); return this$static.isQualified; } function $setQualified(this$static, isQualified){ this$static.isQualified = isQualified; this$static.isInitialized = true; } function BasicExtendedMetaData$EPackageExtendedMetaDataImpl(this$0, ePackage){ this.this$01 = this$0; this.ePackage = ePackage; } defineClass(1180, 1, {}, BasicExtendedMetaData$EPackageExtendedMetaDataImpl); _.isInitialized = false; _.isQualified = false; var Lorg_eclipse_emf_ecore_util_BasicExtendedMetaData$EPackageExtendedMetaDataImpl_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'BasicExtendedMetaData/EPackageExtendedMetaDataImpl', 1180); function $getAffiliation_0(this$static){ this$static.affiliation == ($clinit_BasicExtendedMetaData() , UNINITIALIZED_ESTRUCTURAL_FEATURE) && $setAffiliation(this$static, $basicGetAffiliation(this$static.this$01, this$static.eStructuralFeature)); return this$static.affiliation; } function $getFeatureKind(this$static){ this$static.featureKind == -2 && $setFeatureKind(this$static, $basicGetFeatureKind(this$static.this$01, this$static.eStructuralFeature)); return this$static.featureKind; } function $getGroup(this$static){ this$static.group_0 == ($clinit_BasicExtendedMetaData() , UNINITIALIZED_ESTRUCTURAL_FEATURE) && $setGroup(this$static, $basicGetGroup(this$static.this$01, this$static.eStructuralFeature)); return this$static.group_0; } function $getName_0(this$static){ this$static.name_0 == 'uninitialized' && $setName_4(this$static, $basicGetName_0(this$static.this$01, this$static.eStructuralFeature)); return this$static.name_0; } function $getNamespace_0(this$static){ this$static.namespace == 'uninitialized' && $setNamespace(this$static, $basicGetNamespace(this$static.this$01, this$static.eStructuralFeature)); return this$static.namespace; } function $getWildcards(this$static){ !this$static.wildcards && $setWildcards(this$static, $basicGetWildcards(this$static.this$01, this$static.eStructuralFeature)); return this$static.wildcards; } function $setAffiliation(this$static, affiliation){ this$static.affiliation = affiliation; } function $setFeatureKind(this$static, kind){ this$static.featureKind = kind; } function $setGroup(this$static, group){ this$static.group_0 = group; } function $setName_4(this$static, name_0){ this$static.name_0 = name_0; } function $setNamespace(this$static, namespace){ this$static.namespace = namespace; } function $setWildcards(this$static, wildcards){ this$static.wildcards = wildcards; } function BasicExtendedMetaData$EStructuralFeatureExtendedMetaDataImpl(this$0, eStructuralFeature){ this.this$01 = this$0; this.group_0 = ($clinit_BasicExtendedMetaData() , UNINITIALIZED_ESTRUCTURAL_FEATURE); this.affiliation = UNINITIALIZED_ESTRUCTURAL_FEATURE; this.eStructuralFeature = eStructuralFeature; } defineClass(1183, 1, {}, BasicExtendedMetaData$EStructuralFeatureExtendedMetaDataImpl); _.featureKind = -2; _.name_0 = 'uninitialized'; _.namespace = 'uninitialized'; var Lorg_eclipse_emf_ecore_util_BasicExtendedMetaData$EStructuralFeatureExtendedMetaDataImpl_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl', 1183); function EDataTypeEList(dataClass, owner, featureID){ EcoreEList.call(this, dataClass, owner); this.featureID = featureID; } defineClass(593, 632, $intern_157, EDataTypeEList); _.getFeatureID_0 = function getFeatureID_13(){ return this.featureID; } ; _.isEObject = function isEObject_4(){ return false; } ; _.resolve = function resolve_8(index_0, object){ return object; } ; _.featureID = 0; var Lorg_eclipse_emf_ecore_util_EDataTypeEList_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EDataTypeEList', 593); var Lorg_eclipse_emf_ecore_util_FeatureMap_2_classLit = createForInterface('org.eclipse.emf.ecore.util', 'FeatureMap'); function $add_31(this$static, index_0, object){ var entries, entry, entryFeature, i, otherEntry, validator; entry = object; entryFeature = entry.getEStructuralFeature(); if (isMany_1(this$static.owner, entryFeature)) { if (entryFeature.isUnique()) { entries = castTo(this$static.data_0, 124); for (i = 0; i < this$static.size_0; ++i) { otherEntry = entries[i]; if (equals_Ljava_lang_Object__Z__devirtual$(otherEntry, entry) && i != index_0) { throw toJs(new IllegalArgumentException_0("The 'no duplicates' constraint is violated")); } } } } else { validator = getValidator(this$static.owner.eClass_0(), entryFeature); entries = castTo(this$static.data_0, 124); for (i = 0; i < this$static.size_0; ++i) { otherEntry = entries[i]; if (validator.isValid(otherEntry.getEStructuralFeature())) { throw toJs(new IllegalArgumentException_0('The multiplicity constraint is violated')); } } } $add_20(this$static, index_0, object); } function $add_32(this$static, feature, index_0, object){ var entries, entry, i, isFeatureMap, validator; isFeatureMap = ($clinit_FeatureMapUtil() , castTo(feature, 69).isFeatureMap_0()); if (isMany_1(this$static.owner, feature)) { if (feature.isUnique() && $contains_13(this$static, feature, object, instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0)) { throw toJs(new IllegalArgumentException_0("The 'no duplicates' constraint is violated")); } } else { validator = getValidator(this$static.owner.eClass_0(), feature); entries = castTo(this$static.data_0, 124); for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { throw toJs(new IllegalArgumentException_0('The multiplicity constraint is violated')); } } } $add_20(this$static, $entryIndex(this$static, feature, index_0), isFeatureMap?castTo(object, 76):createEntry_5(feature, object)); } function $add_33(this$static, feature, object){ var entries, entry, i, isFeatureMap, validator; isFeatureMap = ($clinit_FeatureMapUtil() , castTo(feature, 69).isFeatureMap_0()); if (isMany_1(this$static.owner, feature)) { if (feature.isUnique() && $contains_13(this$static, feature, object, instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0)) { return false; } } else { validator = getValidator(this$static.owner.eClass_0(), feature); entries = castTo(this$static.data_0, 124); for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (isFeatureMap?equals_Ljava_lang_Object__Z__devirtual$(entry, object):object == null?entry.getValue() == null:equals_Ljava_lang_Object__Z__devirtual$(object, entry.getValue())) { return false; } else { castTo($set_10(this$static, i, isFeatureMap?castTo(object, 76):createEntry_5(feature, object)), 76); return true; } } } } return $add_21(this$static, isFeatureMap?castTo(object, 76):createEntry_5(feature, object)); } function $add_34(this$static, object){ var entries, entry, entryFeature, i, otherEntry, validator; entry = object; entryFeature = entry.getEStructuralFeature(); if (isMany_1(this$static.owner, entryFeature)) { if (entryFeature.isUnique() && $contains_12(this$static, entryFeature, entry.getValue())) { return false; } } else { validator = getValidator(this$static.owner.eClass_0(), entryFeature); entries = castTo(this$static.data_0, 124); for (i = 0; i < this$static.size_0; ++i) { otherEntry = entries[i]; if (validator.isValid(otherEntry.getEStructuralFeature())) { if (equals_Ljava_lang_Object__Z__devirtual$(otherEntry, entry)) { return false; } else { castTo($set_10(this$static, i, object), 76); return true; } } } } return $add_21(this$static, object); } function $addAll_12(this$static, feature, index_0, collection){ var entries, entry, entryCollection, i, isFeatureMap, object, object$iterator, validator; if (collection.size_1() == 0) { return false; } isFeatureMap = ($clinit_FeatureMapUtil() , castTo(feature, 69).isFeatureMap_0()); entryCollection = isFeatureMap?collection:new BasicEList_0(collection.size_1()); if (isMany_1(this$static.owner, feature)) { if (feature.isUnique()) { for (object$iterator = collection.iterator_0(); object$iterator.hasNext_0();) { object = object$iterator.next_1(); if (!$contains_13(this$static, feature, object, instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0)) { entry = createEntry_5(feature, object); entryCollection.add_2(entry); } } } else if (!isFeatureMap) { for (object$iterator = collection.iterator_0(); object$iterator.hasNext_0();) { object = object$iterator.next_1(); entry = createEntry_5(feature, object); entryCollection.add_2(entry); } } } else { validator = getValidator(this$static.owner.eClass_0(), feature); entries = castTo(this$static.data_0, 124); for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { throw toJs(new IllegalArgumentException_0('The multiplicity constraint is violated')); } } if (collection.size_1() > 1) { throw toJs(new IllegalArgumentException_0('The multiplicity constraint is violated')); } if (!isFeatureMap) { entry = createEntry_5(feature, collection.iterator_0().next_1()); entryCollection.add_2(entry); } } return $addAll_8(this$static, $entryIndex(this$static, feature, index_0), entryCollection); } function $addAll_13(this$static, feature, collection){ var entries, entry, entryCollection, i, isFeatureMap, object, object$iterator, validator; if (collection.size_1() == 0) { return false; } isFeatureMap = ($clinit_FeatureMapUtil() , castTo(feature, 69).isFeatureMap_0()); entryCollection = isFeatureMap?collection:new BasicEList_0(collection.size_1()); if (isMany_1(this$static.owner, feature)) { if (feature.isUnique()) { for (object$iterator = collection.iterator_0(); object$iterator.hasNext_0();) { object = object$iterator.next_1(); if (!$contains_13(this$static, feature, object, instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0)) { entry = createEntry_5(feature, object); entryCollection.contains(entry) || entryCollection.add_2(entry); } } } else if (!isFeatureMap) { for (object$iterator = collection.iterator_0(); object$iterator.hasNext_0();) { object = object$iterator.next_1(); entry = createEntry_5(feature, object); entryCollection.add_2(entry); } } } else { if (collection.size_1() > 1) { throw toJs(new IllegalArgumentException_0('The multiplicity constraint is violated')); } validator = getValidator(this$static.owner.eClass_0(), feature); entries = castTo(this$static.data_0, 124); for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (collection.contains(isFeatureMap?entry:entry.getValue())) { return false; } else { for (object$iterator = collection.iterator_0(); object$iterator.hasNext_0();) { object = object$iterator.next_1(); castTo($set_10(this$static, i, isFeatureMap?castTo(object, 76):createEntry_5(feature, object)), 76); } return true; } } } if (!isFeatureMap) { entry = createEntry_5(feature, collection.iterator_0().next_1()); entryCollection.add_2(entry); } } return $addAll_9(this$static, entryCollection); } function $addUnique_11(this$static, feature, index_0, object){ var prototype_0; this$static.modCount = -1; $addUnique_5(this$static, $entryIndex(this$static, feature, index_0), ($clinit_FeatureMapUtil() , prototype_0 = castTo(feature, 69).getFeatureMapEntryPrototype() , prototype_0.createEntry(object))); } function $addUnique_12(this$static, entry){ var index_0, notification, notifications, oldIsSet; this$static.modCount = -1; if ($eNotificationRequired(this$static.owner)) { index_0 = this$static.size_0; oldIsSet = this$static.size_0 != 0; $addUnique_0(this$static, entry); notification = new ENotificationImpl_3(this$static.owner, 3, this$static.featureID, null, entry, index_0, oldIsSet); notifications = entry.inverseAdd_0(this$static.owner, this$static.featureID, null); notifications = $shadowAdd_1(this$static, entry, notifications); if (!notifications) { $eNotify(this$static.owner, notification); } else { notifications.add_5(notification); notifications.dispatch_0(); } } else { $addUnique_0(this$static, entry); notifications = entry.inverseAdd_0(this$static.owner, this$static.featureID, null); !!notifications && notifications.dispatch_0(); } } function $addUnique_13(this$static, object){ ++this$static.modCount; $validate_3(this$static, this$static.size_0, object); $addUnique_12(this$static, castTo(object, 343)); } function $basicAdd_2(this$static, feature, object, notifications){ var entries, entry, entry0, i, notification, oldIsSet; if (object == null) { entries = castTo(this$static.data_0, 124); for (i = 0; i < this$static.size_0; ++i) { entry0 = entries[i]; if (entry0.getEStructuralFeature() == feature) { return $basicRemove_0(this$static, entry0, notifications); } } } entry = ($clinit_FeatureMapUtil() , castTo(feature, 69).isFeatureMap_0()?castTo(object, 76):createEntry_5(feature, object)); if ($eNotificationRequired(this$static.owner)) { oldIsSet = !$isEmpty_1(this$static, feature); notifications = $basicAdd_0(this$static, entry, notifications); notification = feature.isMany()?$createNotification_0(this$static, 3, feature, null, object, $indexOf_8(this$static, feature, object, instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0), oldIsSet):$createNotification_0(this$static, 1, feature, feature.getDefaultValue(), object, -1, oldIsSet); notifications?notifications.add_5(notification):(notifications = notification); } else { notifications = $basicAdd_0(this$static, entry, notifications); } return notifications; } function $basicIterator(this$static, feature){ return new BasicFeatureMap$FeatureEIterator(feature, this$static); } function $basicListIterator_0(this$static, feature){ return new BasicFeatureMap$FeatureEIterator(feature, this$static); } function $basicListIterator_1(this$static, feature, index_0){ var i, result; result = new BasicFeatureMap$FeatureEIterator(feature, this$static); for (i = 0; i < index_0; ++i) { $next_15(result); } return result; } function $basicRemove_2(this$static, object, notifications){ var entries, entry, feature, i, match_0, notification; if (instanceOf(object, 76)) { return $basicRemove_0(this$static, object, notifications); } else { match_0 = null; feature = null; entries = castTo(this$static.data_0, 124); for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (equals_Ljava_lang_Object__Z__devirtual$(object, entry.getValue())) { feature = entry.getEStructuralFeature(); if (instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_138) != 0) { match_0 = entry; break; } } } if (match_0) { if ($eNotificationRequired(this$static.owner)) { notification = feature.isMany()?$createNotification_0(this$static, 4, feature, object, null, $indexOf_8(this$static, feature, object, instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0), true):$createNotification_0(this$static, feature.isUnsettable()?2:1, feature, object, feature.getDefaultValue(), -1, true); notifications?notifications.add_5(notification):(notifications = notification); } notifications = $basicRemove_2(this$static, match_0, notifications); } return notifications; } } function $basicRemove_3(this$static, feature, object, notifications){ var count, entries, entry, i, match_0, notification, validator; validator = getValidator(this$static.owner.eClass_0(), feature); count = 0; entries = castTo(this$static.data_0, 124); match_0 = null; $clinit_FeatureMapUtil(); if (castTo(feature, 69).isFeatureMap_0()) { for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (equals_Ljava_lang_Object__Z__devirtual$(entry, object)) { match_0 = entry; break; } ++count; } } } else if (object != null) { for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (equals_Ljava_lang_Object__Z__devirtual$(object, entry.getValue())) { match_0 = entry; break; } ++count; } } } else { for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (entry.getValue() == null) { match_0 = entry; break; } ++count; } } } if (match_0) { if ($eNotificationRequired(this$static.owner)) { notification = feature.isMany()?new FeatureMapUtil$FeatureENotificationImpl(this$static.owner, 4, feature, object, null, count, true):$createNotification_0(this$static, feature.isUnsettable()?2:1, feature, object, feature.getDefaultValue(), -1, true); notifications?notifications.add_5(notification):(notifications = notification); } notifications = $basicRemove_2(this$static, match_0, notifications); } return notifications; } function $clear_15(this$static, feature){ var entries, entry, entryCollection, i, validator; validator = getValidator(this$static.owner.eClass_0(), feature); entryCollection = new BasicEList; entries = castTo(this$static.data_0, 124); for (i = this$static.size_0; --i >= 0;) { entry = entries[i]; validator.isValid(entry.getEStructuralFeature()) && $add_21(entryCollection, entry); } !$removeAll_4(this$static, entryCollection) && $eNotificationRequired(this$static.owner) && $dispatchNotification(this$static, feature.isMany()?$createNotification_0(this$static, 6, feature, ($clinit_Collections() , EMPTY_LIST), null, -1, false):$createNotification_0(this$static, feature.isUnsettable()?2:1, feature, null, null, -1, false)); } function $contains_12(this$static, feature, object){ return $contains_13(this$static, feature, object, instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0); } function $contains_13(this$static, feature, object, resolve){ var entries, entry, i, i0, validator; validator = getValidator(this$static.owner.eClass_0(), feature); entries = castTo(this$static.data_0, 124); $clinit_FeatureMapUtil(); if (castTo(feature, 69).isFeatureMap_0()) { for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature()) && equals_Ljava_lang_Object__Z__devirtual$(entry, object)) { return true; } } } else if (object != null) { for (i0 = 0; i0 < this$static.size_0; ++i0) { entry = entries[i0]; if (validator.isValid(entry.getEStructuralFeature()) && equals_Ljava_lang_Object__Z__devirtual$(object, entry.getValue())) { return true; } } if (resolve) { for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature()) && maskUndefined(object) === maskUndefined($resolveProxy_0(this$static, castTo(entry.getValue(), 58)))) { return true; } } } } else { for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature()) && entry.getValue() == null) { return false; } } } return false; } function $containsAll_1(this$static, feature, collection){ var i; for (i = collection.iterator_0(); i.hasNext_0();) { if (!$contains_12(this$static, feature, i.next_1())) { return false; } } return true; } function $createNotification_0(this$static, eventType, feature, oldObject, newObject, index_0, wasSet){ return new FeatureMapUtil$FeatureENotificationImpl(this$static.owner, eventType, feature, oldObject, newObject, index_0, wasSet); } function $entryIndex(this$static, feature, index_0){ var count, entries, entry, i, result, validator; validator = getValidator(this$static.owner.eClass_0(), feature); count = 0; result = this$static.size_0; entries = castTo(this$static.data_0, 124); for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (index_0 == count) { return i; } ++count; result = i + 1; } } if (index_0 == count) { return result; } else { throw toJs(new IndexOutOfBoundsException_0('index=' + index_0 + ', size=' + count)); } } function $get_23(this$static, feature, index_0, resolve){ var count, entries, entry, i, validator, value_0; validator = getValidator(this$static.owner.eClass_0(), feature); entries = castTo(this$static.data_0, 124); if (isMany_1(this$static.owner, feature)) { count = 0; for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (count == index_0) { $clinit_FeatureMapUtil(); if (castTo(feature, 69).isFeatureMap_0()) { return entry; } else { value_0 = entry.getValue(); value_0 != null && resolve && instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0 && (value_0 = $resolveProxy_1(this$static, feature, i, count, value_0)); return value_0; } } ++count; } } throw toJs(new IndexOutOfBoundsException_0('index=' + index_0 + ', size=' + count)); } else { count = 0; for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { $clinit_FeatureMapUtil(); if (castTo(feature, 69).isFeatureMap_0()) { return entry; } else { value_0 = entry.getValue(); value_0 != null && resolve && instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0 && (value_0 = $resolveProxy_1(this$static, feature, i, count, value_0)); return value_0; } } ++count; } return feature.getDefaultValue(); } } function $get_24(this$static, feature, resolve){ var count, entries, entry, entryFeature, i, result, validator, value_0; entries = castTo(this$static.data_0, 124); if (isMany_1(this$static.owner, feature)) { return $clinit_FeatureMapUtil() , castTo(feature, 69).isFeatureMap_0()?new FeatureMapUtil$FeatureFeatureMap(feature, this$static):new FeatureMapUtil$FeatureEList(feature, this$static); } else { validator = getValidator(this$static.owner.eClass_0(), feature); count = 0; for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; entryFeature = entry.getEStructuralFeature(); if (validator.isValid(entryFeature)) { $clinit_FeatureMapUtil(); if (castTo(feature, 69).isFeatureMap_0()) { return entry; } else if (entryFeature == ($clinit_XMLTypeFeatures() , TEXT) || entryFeature == CDATA) { result = new StringBuilder_1(toString_40(entry.getValue())); while (++i < this$static.size_0) { entry = entries[i]; entryFeature = entry.getEStructuralFeature(); (entryFeature == TEXT || entryFeature == CDATA) && $append_11(result, toString_40(entry.getValue())); } return createFromString_2(castTo(feature.getEType(), 156), result.string); } else { value_0 = entry.getValue(); value_0 != null && resolve && instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0 && (value_0 = $resolveProxy_1(this$static, feature, i, count, value_0)); return value_0; } } ++count; } return feature.getDefaultValue(); } } function $indexOf_7(this$static, feature, object){ return $indexOf_8(this$static, feature, object, instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0); } function $indexOf_8(this$static, feature, object, resolve){ var entries, entry, i, i0, result, validator; validator = getValidator(this$static.owner.eClass_0(), feature); result = 0; entries = castTo(this$static.data_0, 124); $clinit_FeatureMapUtil(); if (castTo(feature, 69).isFeatureMap_0()) { for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (equals_Ljava_lang_Object__Z__devirtual$(entry, object)) { return result; } ++result; } } } else if (object != null) { for (i0 = 0; i0 < this$static.size_0; ++i0) { entry = entries[i0]; if (validator.isValid(entry.getEStructuralFeature())) { if (equals_Ljava_lang_Object__Z__devirtual$(object, entry.getValue())) { return result; } ++result; } } if (resolve) { result = 0; for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (maskUndefined(object) === maskUndefined($resolveProxy_0(this$static, castTo(entry.getValue(), 58)))) { return result; } ++result; } } } } else { for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (entry.getValue() == null) { return result; } ++result; } } } return -1; } function $inverseAdd_2(this$static, entry, notifications){ return entry.inverseAdd_0(this$static.owner, this$static.featureID, notifications); } function $inverseAdd_3(this$static, object, notifications){ return $inverseAdd_2(this$static, castTo(object, 343), notifications); } function $inverseRemove_2(this$static, entry, notifications){ return entry.inverseRemove_0(this$static.owner, this$static.featureID, notifications); } function $inverseRemove_3(this$static, object, notifications){ return $inverseRemove_2(this$static, castTo(object, 343), notifications); } function $isEmpty_1(this$static, feature){ var entries, entry, i, validator; validator = getValidator(this$static.owner.eClass_0(), feature); entries = castTo(this$static.data_0, 124); for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { return false; } } return true; } function $iterator_2(this$static, feature){ return instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0?new BasicFeatureMap$ResolvingFeatureEIterator(feature, this$static):new BasicFeatureMap$FeatureEIterator(feature, this$static); } function $list(this$static, feature){ return $clinit_FeatureMapUtil() , $isFeatureMap(feature)?new FeatureMapUtil$FeatureFeatureMap(feature, this$static):new FeatureMapUtil$FeatureEList(feature, this$static); } function $listIterator_3(this$static, feature){ return instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0?new BasicFeatureMap$ResolvingFeatureEIterator(feature, this$static):new BasicFeatureMap$FeatureEIterator(feature, this$static); } function $listIterator_4(this$static, feature, index_0){ var i, result; result = instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0?new BasicFeatureMap$ResolvingFeatureEIterator(feature, this$static):new BasicFeatureMap$FeatureEIterator(feature, this$static); for (i = 0; i < index_0; ++i) { $next_15(result); } return result; } function $move_5(this$static, targetIndex, sourceIndex){ var count, entries, entry, feature, featureSourceIndex, featureTargetIndex, i, isValid, maxIndex, result, sourceEntry, validator; if ($eNotificationRequired(this$static.owner)) { if (targetIndex != sourceIndex) { entries = castTo(this$static.data_0, 124); sourceEntry = entries[sourceIndex]; feature = sourceEntry.getEStructuralFeature(); if (isMany_1(this$static.owner, feature)) { validator = getValidator(this$static.owner.eClass_0(), feature); featureTargetIndex = -1; featureSourceIndex = -1; count = 0; for (i = 0 , maxIndex = targetIndex > sourceIndex?targetIndex:sourceIndex; i <= maxIndex; ++i) { if (i == sourceIndex) { featureSourceIndex = count++; } else { entry = entries[i]; isValid = validator.isValid(entry.getEStructuralFeature()); i == targetIndex && (featureTargetIndex = i == maxIndex && !isValid?count - 1:count); isValid && ++count; } } result = castTo($move_1(this$static, targetIndex, sourceIndex), 76); featureSourceIndex != featureTargetIndex && $dispatchNotification(this$static, new ENotificationImpl_18(this$static.owner, 7, feature, valueOf_3(featureSourceIndex), sourceEntry.getValue(), featureTargetIndex)); return result; } } } else { return castTo($move(this$static, targetIndex, sourceIndex), 76); } return castTo($move_1(this$static, targetIndex, sourceIndex), 76); } function $move_6(this$static, feature, targetIndex, sourceIndex){ var count, entries, entry, entrySourceIndex, entryTargetIndex, i, result, validator; if (isMany_1(this$static.owner, feature)) { validator = getValidator(this$static.owner.eClass_0(), feature); entries = castTo(this$static.data_0, 124); result = null; entryTargetIndex = -1; entrySourceIndex = -1; count = 0; for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { count == targetIndex && (entryTargetIndex = i); if (count == sourceIndex) { entrySourceIndex = i; result = entry.getValue(); } ++count; } } if (entryTargetIndex == -1) { throw toJs(new IndexOutOfBoundsException_0('targetIndex=' + targetIndex + ', size=' + count)); } if (entrySourceIndex == -1) { throw toJs(new IndexOutOfBoundsException_0('sourceIndex=' + sourceIndex + ', size=' + count)); } $move_1(this$static, entryTargetIndex, entrySourceIndex); $eNotificationRequired(this$static.owner) && $dispatchNotification(this$static, $createNotification_0(this$static, 7, feature, valueOf_3(sourceIndex), result, targetIndex, true)); return result; } else { throw toJs(new IllegalArgumentException_0('The feature must be many-valued to support move')); } } function $move_7(this$static, feature, index_0, object){ $move_6(this$static, feature, index_0, $indexOf_8(this$static, feature, object, instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0)); } function $remove_43(this$static, feature, index_0){ var count, entries, entry, i, validator; validator = getValidator(this$static.owner.eClass_0(), feature); entries = castTo(this$static.data_0, 124); count = 0; for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (count == index_0) { $remove_35(this$static, i); return $clinit_FeatureMapUtil() , castTo(feature, 69).isFeatureMap_0()?entry:entry.getValue(); } ++count; } } throw toJs(new IndexOutOfBoundsException_0('index=' + index_0 + ', size=' + count)); } function $remove_44(this$static, feature, object){ var entries, entry, i, validator; validator = getValidator(this$static.owner.eClass_0(), feature); entries = castTo(this$static.data_0, 124); $clinit_FeatureMapUtil(); if (castTo(feature, 69).isFeatureMap_0()) { for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (equals_Ljava_lang_Object__Z__devirtual$(entry, object)) { $remove_35(this$static, i); return true; } } } } else if (object != null) { for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (equals_Ljava_lang_Object__Z__devirtual$(object, entry.getValue())) { $remove_35(this$static, i); return true; } } } } else { for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (entry.getValue() == null) { $remove_35(this$static, i); return true; } } } } return false; } function $resolve_2(this$static, index_0, entry){ var affiliatedFeature, affliatedEntry, entries, feature, featureIndex, i, inverseFeatureID, newEntry, notifications, object, opposite, reference, resolved, validator; feature = entry.getEStructuralFeature(); if (instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0) { object = castTo(entry.getValue(), 54); resolved = $eResolveProxy(this$static.owner, object); if (resolved != object) { newEntry = createEntry_5(feature, resolved); $assign(this$static, index_0, $validate_3(this$static, index_0, newEntry)); notifications = null; if ($eNotificationRequired(this$static.owner)) { affiliatedFeature = $getAffiliation(($clinit_ExtendedMetaData() , INSTANCE_11), this$static.owner.eClass_0(), feature); if (affiliatedFeature != $getEStructuralFeature(this$static.owner.eClass_0(), this$static.featureID)) { validator = getValidator(this$static.owner.eClass_0(), feature); featureIndex = 0; entries = castTo(this$static.data_0, 124); for (i = 0; i < index_0; ++i) { affliatedEntry = entries[i]; validator.isValid(affliatedEntry.getEStructuralFeature()) && ++featureIndex; } notifications = new FeatureMapUtil$FeatureENotificationImpl(this$static.owner, 9, affiliatedFeature, object, resolved, featureIndex, false); notifications.add_5(new ENotificationImpl_3(this$static.owner, 9, this$static.featureID, entry, newEntry, index_0, false)); } } reference = castTo(feature, 19); opposite = $getEOpposite(reference); if (opposite) { notifications = object.eInverseRemove(this$static.owner, $getFeatureID(object.eClass_0(), opposite), null, notifications); notifications = castTo(resolved, 54).eInverseAdd(this$static.owner, $getFeatureID(resolved.eClass_0(), opposite), null, notifications); } else if ((reference.eFlags & $intern_138) != 0) { inverseFeatureID = -1 - $getFeatureID(this$static.owner.eClass_0(), reference); notifications = object.eInverseRemove(this$static.owner, inverseFeatureID, null, null); !castTo(resolved, 54).eInternalContainer() && (notifications = castTo(resolved, 54).eInverseAdd(this$static.owner, inverseFeatureID, null, notifications)); } !!notifications && notifications.dispatch_0(); return newEntry; } } return entry; } function $resolveProxy_0(this$static, eObject){ return $eResolveProxy(this$static.owner, castTo(eObject, 54)); } function $resolveProxy_1(this$static, feature, entryIndex, index_0, object){ var entry, notifications, oldObject, resolved; resolved = $resolveProxy_0(this$static, castTo(object, 58)); if (maskUndefined(resolved) !== maskUndefined(object)) { oldObject = castTo(this$static.data_0[entryIndex], 76); entry = createEntry_5(feature, resolved); $assign(this$static, entryIndex, $validate_3(this$static, entryIndex, entry)); if ($eNotificationRequired(this$static.owner)) { notifications = $createNotification_0(this$static, 9, entry.getEStructuralFeature(), object, resolved, index_0, false); $add_22(notifications, new ENotificationImpl_3(this$static.owner, 9, this$static.featureID, oldObject, entry, index_0, false)); $dispatch(notifications); } return resolved; } return object; } function $set_15(this$static, index_0, object){ var entries, entry, entryFeature, i, otherEntry, validator; entry = object; entryFeature = entry.getEStructuralFeature(); if (isMany_1(this$static.owner, entryFeature)) { if (entryFeature.isUnique()) { entries = castTo(this$static.data_0, 124); for (i = 0; i < this$static.size_0; ++i) { otherEntry = entries[i]; if (equals_Ljava_lang_Object__Z__devirtual$(otherEntry, entry) && i != index_0) { throw toJs(new IllegalArgumentException_0("The 'no duplicates' constraint is violated")); } } } } else { validator = getValidator(this$static.owner.eClass_0(), entryFeature); entries = castTo(this$static.data_0, 124); for (i = 0; i < this$static.size_0; ++i) { otherEntry = entries[i]; if (validator.isValid(otherEntry.getEStructuralFeature()) && i != index_0) { throw toJs(new IllegalArgumentException_0('The multiplicity constraint is violated')); } } } return castTo($set_10(this$static, index_0, object), 76); } function $set_16(this$static, newValue){ $set_14(this$static, instanceOf(newValue, 160)?newValue:castTo(newValue, 2036).featureMap_0()); } function $set_17(this$static, feature, index_0, object){ var count, currentIndex, entries, entry, i, validator; validator = getValidator(this$static.owner.eClass_0(), feature); entries = castTo(this$static.data_0, 124); if (isMany_1(this$static.owner, feature)) { if (feature.isUnique()) { currentIndex = $indexOf_8(this$static, feature, object, instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0); if (currentIndex >= 0 && currentIndex != index_0) { throw toJs(new IllegalArgumentException_0("The 'no duplicates' constraint is violated")); } } count = 0; for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (count == index_0) { return castTo($set_10(this$static, i, ($clinit_FeatureMapUtil() , castTo(feature, 69).isFeatureMap_0()?castTo(object, 76):createEntry_5(feature, object))), 76); } ++count; } } throw toJs(new IndexOutOfBoundsException_0('index=' + index_0 + ', size=' + count)); } else { for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { return $clinit_FeatureMapUtil() , castTo(feature, 69).isFeatureMap_0()?entry:entry.getValue(); } } return null; } } function $set_18(this$static, feature, object){ var entries, entry, entryFeature, i, index_0, list, shouldUnset, validator; if (isMany_1(this$static.owner, feature)) { list = ($clinit_FeatureMapUtil() , castTo(feature, 69).isFeatureMap_0()?new FeatureMapUtil$FeatureFeatureMap(feature, this$static):new FeatureMapUtil$FeatureEList(feature, this$static)); $clear_15(list.featureMap, list.feature); $addAll_14(list, castTo(object, 16)); } else { validator = getValidator(this$static.owner.eClass_0(), feature); entries = castTo(this$static.data_0, 124); for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; entryFeature = entry.getEStructuralFeature(); if (validator.isValid(entryFeature)) { if (entryFeature == ($clinit_XMLTypeFeatures() , TEXT) || entryFeature == CDATA) { shouldUnset = $shouldUnset(this$static, feature, object); index_0 = i; shouldUnset?$remove_35(this$static, i):++i; while (i < this$static.size_0) { entry = entries[i]; entryFeature = entry.getEStructuralFeature(); entryFeature == TEXT || entryFeature == CDATA?$remove_35(this$static, i):++i; } shouldUnset || castTo($set_10(this$static, index_0, createEntry_5(feature, object)), 76); } else $shouldUnset(this$static, feature, object)?$remove_35(this$static, i):castTo($set_10(this$static, i, ($clinit_FeatureMapUtil() , castTo(feature, 69).isFeatureMap_0()?castTo(object, 76):createEntry_5(feature, object))), 76); return; } } $shouldUnset(this$static, feature, object) || $add_21(this$static, ($clinit_FeatureMapUtil() , castTo(feature, 69).isFeatureMap_0()?castTo(object, 76):createEntry_5(feature, object))); } } function $setting(this$static, feature){ return isMany_1(this$static.owner, feature)?($clinit_FeatureMapUtil() , $isFeatureMap(feature)?new FeatureMapUtil$FeatureFeatureMap(feature, this$static):new FeatureMapUtil$FeatureEList(feature, this$static)):new FeatureMapUtil$FeatureValue(feature, this$static); } function $shadowAdd_1(this$static, entry, notifications){ var feature, notification, value_0; feature = entry.getEStructuralFeature(); value_0 = entry.getValue(); notification = feature.isMany()?$createNotification_0(this$static, 3, feature, null, value_0, $indexOf_8(this$static, feature, value_0, instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0), true):$createNotification_0(this$static, 1, feature, feature.getDefaultValue(), value_0, -1, true); notifications?notifications.add_5(notification):(notifications = notification); return notifications; } function $shadowAdd_2(this$static, object, notifications){ return $shadowAdd_1(this$static, castTo(object, 343), notifications); } function $shadowRemove_1(this$static, entry, notifications){ var feature, notification, value_0; feature = entry.getEStructuralFeature(); value_0 = entry.getValue(); notification = feature.isMany()?$createNotification_0(this$static, 4, feature, value_0, null, $indexOf_8(this$static, feature, value_0, instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0), true):$createNotification_0(this$static, feature.isUnsettable()?2:1, feature, value_0, feature.getDefaultValue(), -1, true); notifications?notifications.add_5(notification):(notifications = notification); return notifications; } function $shadowRemove_2(this$static, object, notifications){ return $shadowRemove_1(this$static, castTo(object, 343), notifications); } function $shadowSet_1(this$static, oldObject, newObject, notifications){ var feature, newValue, notification, oldValue; if ($eNotificationRequired(this$static.owner)) { feature = oldObject.getEStructuralFeature(); oldValue = oldObject.getValue(); newValue = newObject.getValue(); notification = $createNotification_0(this$static, 1, feature, oldValue, newValue, feature.isMany()?$indexOf_8(this$static, feature, newValue, instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0):-1, true); notifications?notifications.add_5(notification):(notifications = notification); } return notifications; } function $shouldUnset(this$static, feature, value_0){ var defaultValue; if (feature.isUnsettable()) { return false; } else if (feature.getUpperBound() != -2) { defaultValue = feature.getDefaultValue(); return defaultValue == null?value_0 == null:equals_Ljava_lang_Object__Z__devirtual$(defaultValue, value_0); } else return feature.getEContainingClass() == this$static.owner.eClass_0() && value_0 == null; } function $size_3(this$static, feature){ var entries, entry, i, result, validator; validator = getValidator(this$static.owner.eClass_0(), feature); result = 0; entries = castTo(this$static.data_0, 124); for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; validator.isValid(entry.getEStructuralFeature()) && ++result; } return result; } function $toArray_11(this$static, feature){ return $toArray_12(this$static, feature, instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0); } function $toArray_12(this$static, feature, resolve){ var entries, entry, i, result, validator, value_0; result = new BasicEList; validator = getValidator(this$static.owner.eClass_0(), feature); entries = castTo(this$static.data_0, 124); $clinit_FeatureMapUtil(); if (castTo(feature, 69).isFeatureMap_0()) { for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; validator.isValid(entry.getEStructuralFeature()) && $add_21(result, entry); } } else { for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { value_0 = entry.getValue(); $add_21(result, resolve?$resolveProxy_1(this$static, feature, i, result.size_0, value_0):value_0); } } } return $toArray_8(result); } function $toArray_13(this$static, feature, array){ return $toArray_14(this$static, feature, array, instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_64) != 0); } function $toArray_14(this$static, feature, array, resolve){ var entries, entry, i, result, validator, value_0; result = new BasicEList; validator = getValidator(this$static.owner.eClass_0(), feature); entries = castTo(this$static.data_0, 124); $clinit_FeatureMapUtil(); if (castTo(feature, 69).isFeatureMap_0()) { for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; validator.isValid(entry.getEStructuralFeature()) && $add_21(result, entry); } } else { for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { value_0 = entry.getValue(); $add_21(result, resolve?$resolveProxy_1(this$static, feature, i, result.size_0, value_0):value_0); } } } return $toArray_9(result, array); } function $unset(this$static, feature){ var entries, entry, i, removals, validator; validator = getValidator(this$static.owner.eClass_0(), feature); removals = null; entries = castTo(this$static.data_0, 124); for (i = 0; i < this$static.size_0; ++i) { entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { !removals && (removals = new BasicEList); $add_21(removals, entry); } } !!removals && $removeAll_4(this$static, removals); } function $validate_3(this$static, index_0, object){ var eStructuralFeature, result; if (this$static.modCount == 0) return object; result = castTo($validate_0(this$static, index_0, object), 76); eStructuralFeature = object.getEStructuralFeature(); if (!eStructuralFeature.isChangeable() || !this$static.featureMapValidator.isValid(eStructuralFeature)) { throw toJs(new RuntimeException_0("Invalid entry feature '" + eStructuralFeature.getEContainingClass().name_0 + '.' + eStructuralFeature.getName() + "'")); } return result; } function BasicFeatureMap(owner, featureID){ EDataTypeEList.call(this, Lorg_eclipse_emf_ecore_util_FeatureMap$Entry$Internal_2_classLit, owner, featureID); this.wrapper = this; this.featureMapValidator = getValidator(owner.eClass_0(), $getEStructuralFeature(this.owner.eClass_0(), this.featureID)); } defineClass(78, 593, {3:1, 4:1, 20:1, 31:1, 56:1, 16:1, 15:1, 59:1, 70:1, 66:1, 61:1, 79:1, 160:1, 220:1, 2036:1, 71:1, 97:1}, BasicFeatureMap); _.add_3 = function add_66(index_0, object){ $add_31(this, index_0, castTo(object, 76)); } ; _.add_2 = function add_67(object){ return $add_34(this, castTo(object, 76)); } ; _.addUnique_0 = function addUnique_19(object){ $addUnique_13(this, castTo(object, 76)); } ; _.inverseAdd = function inverseAdd_9(object, notifications){ return $inverseAdd_3(this, castTo(object, 76), notifications); } ; _.inverseRemove = function inverseRemove_9(object, notifications){ return $inverseRemove_3(this, castTo(object, 76), notifications); } ; _.move = function move_20(targetIndex, sourceIndex){ return $move_5(this, targetIndex, sourceIndex); } ; _.resolve = function resolve_9(index_0, entry){ return $resolve_2(this, index_0, castTo(entry, 76)); } ; _.set_2 = function set_37(index_0, object){ return $set_15(this, index_0, castTo(object, 76)); } ; _.shadowAdd = function shadowAdd_2(object, notifications){ return $shadowAdd_2(this, castTo(object, 76), notifications); } ; _.shadowRemove = function shadowRemove_2(object, notifications){ return $shadowRemove_2(this, castTo(object, 76), notifications); } ; _.shadowSet = function shadowSet_2(oldObject, newObject, notifications){ return $shadowSet_1(this, castTo(oldObject, 76), castTo(newObject, 76), notifications); } ; _.validate = function validate_7(index_0, object){ return $validate_3(this, index_0, castTo(object, 76)); } ; _.add_6 = function add_68(feature, object){ return $add_33(this, feature, object); } ; _.addAll_0 = function addAll_35(index_0, collection){ var entries, entry, entry$iterator, entryFeature, include, j, otherEntry, uniqueCollection, validator; uniqueCollection = new BasicEList_0(collection.size_1()); for (entry$iterator = collection.iterator_0(); entry$iterator.hasNext_0();) { entry = castTo(entry$iterator.next_1(), 76); entryFeature = entry.getEStructuralFeature(); if (isMany_1(this.owner, entryFeature)) { (!entryFeature.isUnique() || !$contains_12(this, entryFeature, entry.getValue()) && !$contains_10(uniqueCollection, entry)) && $add_21(uniqueCollection, entry); } else { validator = getValidator(this.owner.eClass_0(), entryFeature); entries = castTo(this.data_0, 124); include = true; for (j = 0; j < this.size_0; ++j) { otherEntry = entries[j]; if (validator.isValid(otherEntry.getEStructuralFeature())) { castTo($set_10(this, j, entry), 76); include = false; break; } } include && $add_21(uniqueCollection, entry); } } return $addAll_8(this, index_0, uniqueCollection); } ; _.addAll = function addAll_36(collection){ var entries, entry, entry$iterator, entryFeature, include, j, otherEntry, uniqueCollection, validator; uniqueCollection = new BasicEList_0(collection.size_1()); for (entry$iterator = collection.iterator_0(); entry$iterator.hasNext_0();) { entry = castTo(entry$iterator.next_1(), 76); entryFeature = entry.getEStructuralFeature(); if (isMany_1(this.owner, entryFeature)) { (!entryFeature.isUnique() || !$contains_12(this, entryFeature, entry.getValue()) && !$contains_10(uniqueCollection, entry)) && $add_21(uniqueCollection, entry); } else { validator = getValidator(this.owner.eClass_0(), entryFeature); entries = castTo(this.data_0, 124); include = true; for (j = 0; j < this.size_0; ++j) { otherEntry = entries[j]; if (validator.isValid(otherEntry.getEStructuralFeature())) { castTo($set_10(this, j, entry), 76); include = false; break; } } include && $add_21(uniqueCollection, entry); } } return $addAll_9(this, uniqueCollection); } ; _.addAllUnique_0 = function addAllUnique_15(collection){ this.modCount = -1; return $addAllUnique_3(this, this.size_0, collection); } ; _.basicAdd_0 = function basicAdd_4(feature, object, notifications){ return $basicAdd_2(this, feature, object, notifications); } ; _.basicRemove = function basicRemove_4(object, notifications){ return $basicRemove_2(this, object, notifications); } ; _.basicRemove_0 = function basicRemove_5(feature, object, notifications){ return $basicRemove_3(this, feature, object, notifications); } ; _.featureMap_0 = function featureMap_0(){ return this; } ; _.get_7 = function get_69(feature, resolve){ return $get_24(this, feature, resolve); } ; _.getEStructuralFeature_0 = function getEStructuralFeature_2(index_0){ return castTo($get_20(this, index_0), 76).getEStructuralFeature(); } ; _.getValue_1 = function getValue_19(index_0){ return castTo($get_20(this, index_0), 76).getValue(); } ; _.getWrapper = function getWrapper(){ return this.wrapper; } ; _.hasInverse = function hasInverse_11(){ return true; } ; _.hasShadow = function hasShadow_2(){ return true; } ; _.isSet_1 = function isSet_13(feature){ return !$isEmpty_1(this, feature); } ; _.newData = function newData_14(capacity){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_util_FeatureMap$Entry$Internal_2_classLit, $intern_166, 343, capacity, 0, 1); } ; _.resolveProxy = function resolveProxy_0(eObject){ return $resolveProxy_0(this, eObject); } ; _.set_1 = function set_38(newValue){ $set_16(this, newValue); } ; _.set_3 = function set_39(feature, object){ $set_18(this, feature, object); } ; _.setting = function setting_0(feature){ return $setting(this, feature); } ; _.unset_0 = function unset_9(feature){ $unset(this, feature); } ; var Lorg_eclipse_emf_ecore_util_BasicFeatureMap_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'BasicFeatureMap', 78); function $checkModCount(this$static){ if (this$static.featureMap.modCount != this$static.expectedModCount) { throw toJs(new ConcurrentModificationException); } } function $hasNext_8(this$static){ switch (this$static.prepared) { case 2: { return true; } case 1: { return false; } case -1: { ++this$static.entryCursor; } default:{ return this$static.scanNext(); } } } function $hasPrevious(this$static){ switch (this$static.prepared) { case -2: { return true; } case -1: { return false; } case 1: { --this$static.entryCursor; } default:{ return this$static.scanPrevious(); } } } function $next_15(this$static){ var newPreparedResult; if ($hasNext_8(this$static)) { $checkModCount(this$static); if (this$static.resolve_0()) { newPreparedResult = $resolveProxy_1(this$static.featureMap, this$static.eStructuralFeature, this$static.entryCursor, this$static.cursor, this$static.preparedResult); this$static.preparedResult = newPreparedResult; } this$static.lastCursor = this$static.cursor; ++this$static.cursor; ++this$static.entryCursor; this$static.prepared = 0; return this$static.preparedResult; } else { throw toJs(new NoSuchElementException); } } defineClass(1960, 1, $intern_14); _.forEachRemaining = function forEachRemaining_59(consumer){ $forEachRemaining(this, consumer); } ; _.add_1 = function add_69(o){ if (this.lastCursor == -1) { throw toJs(new IllegalStateException); } $checkModCount(this); try { $add_32(this.featureMap, this.eStructuralFeature, this.cursor, o); this.expectedModCount = this.featureMap.modCount; $next_15(this); } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 77)) { throw toJs(new ConcurrentModificationException); } else throw toJs($e0); } } ; _.hasNext_0 = function hasNext_49(){ return $hasNext_8(this); } ; _.hasPrevious = function hasPrevious_10(){ return $hasPrevious(this); } ; _.next_1 = function next_49(){ return $next_15(this); } ; _.nextIndex_0 = function nextIndex_11(){ return this.cursor; } ; _.previous_0 = function previous_11(){ var newPreparedResult; if ($hasPrevious(this)) { $checkModCount(this); this.lastCursor = --this.cursor; if (this.resolve_0()) { newPreparedResult = $resolveProxy_1(this.featureMap, this.eStructuralFeature, this.entryCursor, this.cursor, this.preparedResult); this.preparedResult = newPreparedResult; } this.prepared = 0; return this.preparedResult; } else { throw toJs(new NoSuchElementException); } } ; _.previousIndex = function previousIndex_10(){ return this.cursor - 1; } ; _.remove = function remove_129(){ if (this.lastCursor == -1) { throw toJs(new IllegalStateException); } $checkModCount(this); try { $remove_43(this.featureMap, this.eStructuralFeature, this.lastCursor); this.expectedModCount = this.featureMap.modCount; if (this.lastCursor < this.cursor) { --this.cursor; --this.entryCursor; } --this.lastCursor; } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 77)) { throw toJs(new ConcurrentModificationException); } else throw toJs($e0); } } ; _.resolve_0 = function resolve_10(){ return false; } ; _.set_1 = function set_40(o){ if (this.lastCursor == -1) { throw toJs(new IllegalStateException); } $checkModCount(this); try { $set_17(this.featureMap, this.eStructuralFeature, this.lastCursor, o); this.expectedModCount = this.featureMap.modCount; } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 77)) { throw toJs(new ConcurrentModificationException); } else throw toJs($e0); } } ; _.cursor = 0; _.entryCursor = 0; _.expectedModCount = 0; _.isFeatureMap = false; _.lastCursor = 0; _.prepared = 0; var Lorg_eclipse_emf_ecore_util_FeatureMapUtil$BasicFeatureEIterator_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'FeatureMapUtil/BasicFeatureEIterator', 1960); function BasicFeatureMap$FeatureEIterator(eStructuralFeature, featureMap){ this.eStructuralFeature = eStructuralFeature; this.featureMap = featureMap; this.expectedModCount = featureMap.modCount; this.isFeatureMap = ($clinit_FeatureMapUtil() , castTo(eStructuralFeature, 69).isFeatureMap_0()); this.validator = getValidator(featureMap.owner.eClass_0(), eStructuralFeature); } defineClass(420, 1960, $intern_14, BasicFeatureMap$FeatureEIterator); _.scanNext = function scanNext(){ var entries, entry, size_0; size_0 = this.featureMap.size_0; entries = castTo(this.featureMap.data_0, 124); while (this.entryCursor < size_0) { entry = entries[this.entryCursor]; if (this.validator.isValid(entry.getEStructuralFeature())) { this.preparedResult = this.isFeatureMap?entry:entry.getValue(); this.prepared = 2; return true; } ++this.entryCursor; } this.prepared = 1; this.lastCursor = -1; return false; } ; _.scanPrevious = function scanPrevious(){ var entries, entry; entries = castTo(this.featureMap.data_0, 124); while (--this.entryCursor >= 0) { entry = entries[this.entryCursor]; if (this.validator.isValid(entry.getEStructuralFeature())) { this.preparedResult = this.isFeatureMap?entry:entry.getValue(); this.prepared = -2; return true; } } this.prepared = -1; this.lastCursor = -1; return false; } ; var Lorg_eclipse_emf_ecore_util_BasicFeatureMap$FeatureEIterator_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'BasicFeatureMap/FeatureEIterator', 420); function BasicFeatureMap$ResolvingFeatureEIterator(eStructuralFeature, featureMap){ BasicFeatureMap$FeatureEIterator.call(this, eStructuralFeature, featureMap); } defineClass(676, 420, $intern_14, BasicFeatureMap$ResolvingFeatureEIterator); _.resolve_0 = function resolve_11(){ return true; } ; var Lorg_eclipse_emf_ecore_util_BasicFeatureMap$ResolvingFeatureEIterator_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'BasicFeatureMap/ResolvingFeatureEIterator', 676); function EContentsEList$1(){ EContentsEList.call(this, null, null); } defineClass(968, 496, $intern_160, EContentsEList$1); _.basicList = function basicList_3(){ return this; } ; var Lorg_eclipse_emf_ecore_util_EContentsEList$1_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EContentsEList/1', 968); function EContentsEList$2($anonymous0, $anonymous1){ EContentsEList.call(this, $anonymous0, $anonymous1); } defineClass(969, 496, $intern_160, EContentsEList$2); _.resolve_0 = function resolve_12(){ return false; } ; var Lorg_eclipse_emf_ecore_util_EContentsEList$2_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EContentsEList/2', 969); function EContentsEList$FeatureIteratorImpl$1(){ EContentsEList$FeatureIteratorImpl.call(this, null, null); } defineClass(967, 287, $intern_161, EContentsEList$FeatureIteratorImpl$1); _.filter_0 = function filter_4(featureFilter){ } ; _.hasNext_0 = function hasNext_50(){ return false; } ; _.hasPrevious = function hasPrevious_11(){ return false; } ; var Lorg_eclipse_emf_ecore_util_EContentsEList$FeatureIteratorImpl$1_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EContentsEList/FeatureIteratorImpl/1', 967); function EDataTypeEList$Unsettable(dataClass, owner, featureID){ EDataTypeEList.call(this, dataClass, owner, featureID); } defineClass(840, 593, $intern_157, EDataTypeEList$Unsettable); _.didChange = function didChange_2(){ this.isSet = true; } ; _.isSet_0 = function isSet_14(){ return this.isSet; } ; _.unset = function unset_10(){ var oldIsSet; $clear_13(this); if ($eNotificationRequired(this.owner)) { oldIsSet = this.isSet; this.isSet = false; $eNotify(this.owner, new ENotificationImpl_4(this.owner, 2, this.featureID, oldIsSet, false)); } else { this.isSet = false; } } ; _.isSet = false; var Lorg_eclipse_emf_ecore_util_EDataTypeEList$Unsettable_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EDataTypeEList/Unsettable', 840); function EDataTypeUniqueEList(dataClass, owner, featureID){ EDataTypeEList.call(this, dataClass, owner, featureID); } defineClass(1958, 593, $intern_157, EDataTypeUniqueEList); _.isUnique = function isUnique_8(){ return true; } ; var Lorg_eclipse_emf_ecore_util_EDataTypeUniqueEList_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EDataTypeUniqueEList', 1958); function EDataTypeUniqueEList$Unsettable(dataClass, owner, featureID){ EDataTypeEList$Unsettable.call(this, dataClass, owner, featureID); } defineClass(1959, 840, $intern_157, EDataTypeUniqueEList$Unsettable); _.isUnique = function isUnique_9(){ return true; } ; var Lorg_eclipse_emf_ecore_util_EDataTypeUniqueEList$Unsettable_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EDataTypeUniqueEList/Unsettable', 1959); function EObjectContainmentEList$Resolving(dataClass, owner, featureID){ EObjectContainmentEList.call(this, dataClass, owner, featureID); } defineClass(147, 83, $intern_157, EObjectContainmentEList$Resolving); _.hasProxies = function hasProxies_4(){ return true; } ; _.resolve = function resolve_13(index_0, object){ return $resolve(this, index_0, castTo(object, 58)); } ; var Lorg_eclipse_emf_ecore_util_EObjectContainmentEList$Resolving_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectContainmentEList/Resolving', 147); function EObjectContainmentEList$Unsettable$Resolving(dataClass, owner, featureID){ EObjectContainmentEList$Unsettable.call(this, dataClass, owner, featureID); } defineClass(1184, 555, $intern_157, EObjectContainmentEList$Unsettable$Resolving); _.hasProxies = function hasProxies_5(){ return true; } ; _.resolve = function resolve_14(index_0, object){ return $resolve(this, index_0, castTo(object, 58)); } ; var Lorg_eclipse_emf_ecore_util_EObjectContainmentEList$Unsettable$Resolving_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectContainmentEList/Unsettable/Resolving', 1184); function EObjectContainmentWithInverseEList$Unsettable(dataClass, owner, featureID, inverseFeatureID){ EObjectContainmentWithInverseEList.call(this, dataClass, owner, featureID, inverseFeatureID); } defineClass(766, 14, $intern_157, EObjectContainmentWithInverseEList$Unsettable); _.didChange = function didChange_3(){ this.isSet = true; } ; _.isSet_0 = function isSet_15(){ return this.isSet; } ; _.unset = function unset_11(){ var oldIsSet; $clear_13(this); if ($eNotificationRequired(this.owner)) { oldIsSet = this.isSet; this.isSet = false; $eNotify(this.owner, new ENotificationImpl_4(this.owner, 2, this.featureID, oldIsSet, false)); } else { this.isSet = false; } } ; _.isSet = false; var Lorg_eclipse_emf_ecore_util_EObjectContainmentWithInverseEList$Unsettable_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectContainmentWithInverseEList/Unsettable', 766); function EObjectContainmentWithInverseEList$Unsettable$Resolving(dataClass, owner, featureID, inverseFeatureID){ EObjectContainmentWithInverseEList$Unsettable.call(this, dataClass, owner, featureID, inverseFeatureID); } defineClass(1222, 766, $intern_157, EObjectContainmentWithInverseEList$Unsettable$Resolving); _.hasProxies = function hasProxies_6(){ return true; } ; _.resolve = function resolve_15(index_0, object){ return $resolve(this, index_0, castTo(object, 58)); } ; var Lorg_eclipse_emf_ecore_util_EObjectContainmentWithInverseEList$Unsettable$Resolving_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectContainmentWithInverseEList/Unsettable/Resolving', 1222); function EObjectEList$Unsettable(dataClass, owner, featureID){ EObjectEList.call(this, dataClass, owner, featureID); } defineClass(757, 505, $intern_157, EObjectEList$Unsettable); _.didChange = function didChange_4(){ this.isSet = true; } ; _.isSet_0 = function isSet_16(){ return this.isSet; } ; _.unset = function unset_12(){ var oldIsSet; $clear_13(this); if ($eNotificationRequired(this.owner)) { oldIsSet = this.isSet; this.isSet = false; $eNotify(this.owner, new ENotificationImpl_4(this.owner, 2, this.featureID, oldIsSet, false)); } else { this.isSet = false; } } ; _.isSet = false; var Lorg_eclipse_emf_ecore_util_EObjectEList$Unsettable_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectEList/Unsettable', 757); function EObjectResolvingEList(dataClass, owner, featureID){ EObjectEList.call(this, dataClass, owner, featureID); } defineClass(338, 505, $intern_157, EObjectResolvingEList); _.hasProxies = function hasProxies_7(){ return true; } ; _.resolve = function resolve_16(index_0, object){ return $resolve(this, index_0, castTo(object, 58)); } ; var Lorg_eclipse_emf_ecore_util_EObjectResolvingEList_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectResolvingEList', 338); function EObjectResolvingEList$Unsettable(dataClass, owner, featureID){ EObjectEList$Unsettable.call(this, dataClass, owner, featureID); } defineClass(1844, 757, $intern_157, EObjectResolvingEList$Unsettable); _.hasProxies = function hasProxies_8(){ return true; } ; _.resolve = function resolve_17(index_0, object){ return $resolve(this, index_0, castTo(object, 58)); } ; var Lorg_eclipse_emf_ecore_util_EObjectResolvingEList$Unsettable_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectResolvingEList/Unsettable', 1844); function $clinit_EObjectValidator(){ $clinit_EObjectValidator = emptyMethod; INSTANCE_9 = new EObjectValidator; } function EObjectValidator(){ } defineClass(1527, 1, {}, EObjectValidator); var INSTANCE_9; var Lorg_eclipse_emf_ecore_util_EObjectValidator_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectValidator', 1527); function EObjectWithInverseEList(dataClass, owner, featureID, inverseFeatureID){ EObjectEList.call(this, dataClass, owner, featureID); this.inverseFeatureID = inverseFeatureID; } defineClass(559, 505, $intern_157, EObjectWithInverseEList); _.getInverseFeatureClass = function getInverseFeatureClass_1(){ return this.dataClass; } ; _.getInverseFeatureID = function getInverseFeatureID_1(){ return this.inverseFeatureID; } ; _.hasInverse = function hasInverse_12(){ return true; } ; _.hasNavigableInverse = function hasNavigableInverse_5(){ return true; } ; _.inverseFeatureID = 0; var Lorg_eclipse_emf_ecore_util_EObjectWithInverseEList_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectWithInverseEList', 559); function EObjectWithInverseEList$ManyInverse(dataClass, owner, featureID, inverseFeatureID){ EObjectWithInverseEList.call(this, dataClass, owner, featureID, inverseFeatureID); } defineClass(1225, 559, $intern_157, EObjectWithInverseEList$ManyInverse); _.hasManyInverse = function hasManyInverse_3(){ return true; } ; var Lorg_eclipse_emf_ecore_util_EObjectWithInverseEList$ManyInverse_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectWithInverseEList/ManyInverse', 1225); function EObjectWithInverseEList$Unsettable(dataClass, owner, featureID, inverseFeatureID){ EObjectWithInverseEList.call(this, dataClass, owner, featureID, inverseFeatureID); } defineClass(635, 559, $intern_157, EObjectWithInverseEList$Unsettable); _.didChange = function didChange_5(){ this.isSet = true; } ; _.isSet_0 = function isSet_17(){ return this.isSet; } ; _.unset = function unset_13(){ var oldIsSet; $clear_13(this); if ($eNotificationRequired(this.owner)) { oldIsSet = this.isSet; this.isSet = false; $eNotify(this.owner, new ENotificationImpl_4(this.owner, 2, this.featureID, oldIsSet, false)); } else { this.isSet = false; } } ; _.isSet = false; var Lorg_eclipse_emf_ecore_util_EObjectWithInverseEList$Unsettable_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectWithInverseEList/Unsettable', 635); function EObjectWithInverseEList$Unsettable$ManyInverse(dataClass, owner, featureID, inverseFeatureID){ EObjectWithInverseEList$Unsettable.call(this, dataClass, owner, featureID, inverseFeatureID); } defineClass(1224, 635, $intern_157, EObjectWithInverseEList$Unsettable$ManyInverse); _.hasManyInverse = function hasManyInverse_4(){ return true; } ; var Lorg_eclipse_emf_ecore_util_EObjectWithInverseEList$Unsettable$ManyInverse_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectWithInverseEList/Unsettable/ManyInverse', 1224); function EObjectWithInverseResolvingEList(dataClass, owner, featureID, inverseFeatureID){ EObjectWithInverseEList.call(this, dataClass, owner, featureID, inverseFeatureID); } defineClass(767, 559, $intern_157, EObjectWithInverseResolvingEList); _.hasProxies = function hasProxies_9(){ return true; } ; _.resolve = function resolve_18(index_0, object){ return $resolve(this, index_0, castTo(object, 58)); } ; var Lorg_eclipse_emf_ecore_util_EObjectWithInverseResolvingEList_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectWithInverseResolvingEList', 767); function EObjectWithInverseResolvingEList$ManyInverse(dataClass, owner, featureID, inverseFeatureID){ EObjectWithInverseResolvingEList.call(this, dataClass, owner, featureID, inverseFeatureID); } defineClass(32, 767, $intern_157, EObjectWithInverseResolvingEList$ManyInverse); _.hasManyInverse = function hasManyInverse_5(){ return true; } ; var Lorg_eclipse_emf_ecore_util_EObjectWithInverseResolvingEList$ManyInverse_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectWithInverseResolvingEList/ManyInverse', 32); function EObjectWithInverseResolvingEList$Unsettable(dataClass, owner, featureID, inverseFeatureID){ EObjectWithInverseEList$Unsettable.call(this, dataClass, owner, featureID, inverseFeatureID); } defineClass(768, 635, $intern_157, EObjectWithInverseResolvingEList$Unsettable); _.hasProxies = function hasProxies_10(){ return true; } ; _.resolve = function resolve_19(index_0, object){ return $resolve(this, index_0, castTo(object, 58)); } ; var Lorg_eclipse_emf_ecore_util_EObjectWithInverseResolvingEList$Unsettable_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectWithInverseResolvingEList/Unsettable', 768); function EObjectWithInverseResolvingEList$Unsettable$ManyInverse(dataClass, owner, featureID, inverseFeatureID){ EObjectWithInverseResolvingEList$Unsettable.call(this, dataClass, owner, featureID, inverseFeatureID); } defineClass(1223, 768, $intern_157, EObjectWithInverseResolvingEList$Unsettable$ManyInverse); _.hasManyInverse = function hasManyInverse_6(){ return true; } ; var Lorg_eclipse_emf_ecore_util_EObjectWithInverseResolvingEList$Unsettable$ManyInverse_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EObjectWithInverseResolvingEList/Unsettable/ManyInverse', 1223); function kind_0(eStructuralFeature){ var eClassifier, eReference, instanceClass, inverseEReference, result, upper; result = 0; eClassifier = $getEType(eStructuralFeature); !!eClassifier.getInstanceClass() && (result |= 4); (eStructuralFeature.eFlags & $intern_152) != 0 && (result |= 2); if (instanceOf(eStructuralFeature, 102)) { eReference = castTo(eStructuralFeature, 19); inverseEReference = $getEOpposite(eReference); (eReference.eFlags & $intern_138) != 0 && (result |= 32); if (inverseEReference) { $getFeatureCount($getEContainingClass(inverseEReference)); result |= 8; upper = inverseEReference.upperBound; (upper > 1 || upper == -1) && (result |= 16); (inverseEReference.eFlags & $intern_138) != 0 && (result |= 64); } (eReference.eFlags & $intern_64) != 0 && (result |= $intern_153); result |= $intern_35; } else { if (instanceOf(eClassifier, 469)) { result |= 512; } else { instanceClass = eClassifier.getInstanceClass(); !!instanceClass && (instanceClass.modifiers & 1) != 0 && (result |= 256); } } (eStructuralFeature.eFlags & 512) != 0 && (result |= 128); return result; } defineClass(1185, 632, $intern_157); _.canContainNull = function canContainNull_6(){ return (this.kind & 1792) == 0; } ; _.didChange = function didChange_6(){ this.kind |= 1; } ; _.hasInstanceClass = function hasInstanceClass_3(){ return (this.kind & 4) != 0; } ; _.hasInverse = function hasInverse_13(){ return (this.kind & 40) != 0; } ; _.hasManyInverse = function hasManyInverse_7(){ return (this.kind & 16) != 0; } ; _.hasNavigableInverse = function hasNavigableInverse_6(){ return (this.kind & 8) != 0; } ; _.hasProxies = function hasProxies_11(){ return (this.kind & $intern_153) != 0; } ; _.isContainment = function isContainment_9(){ return (this.kind & 32) != 0; } ; _.isEObject = function isEObject_5(){ return (this.kind & $intern_35) != 0; } ; _.isInstance = function isInstance_49(object){ return !this.dataClass?this.getEStructuralFeature().getEType().isInstance(object):isInstance(this.dataClass, object); } ; _.isSet_0 = function isSet_18(){ return (this.kind & 2) != 0?(this.kind & 1) != 0:this.size_0 != 0; } ; _.isUnique = function isUnique_10(){ return (this.kind & 128) != 0; } ; _.unset = function unset_14(){ var oldIsSet; $clear_13(this); if ((this.kind & 2) != 0) { if ($eNotificationRequired(this.owner)) { oldIsSet = (this.kind & 1) != 0; this.kind &= -2; $dispatchNotification(this, new ENotificationImpl_4(this.owner, 2, $getFeatureID(this.owner.eClass_0(), this.getEStructuralFeature()), oldIsSet, false)); } else { this.kind &= -2; } } } ; _.useEquals = function useEquals_15(){ return (this.kind & 1536) == 0; } ; _.kind = 0; var Lorg_eclipse_emf_ecore_util_EcoreEList$Generic_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EcoreEList/Generic', 1185); function EcoreEList$Dynamic(kind, dataClass, owner, eStructuralFeature){ EcoreEList.call(this, dataClass, owner); this.kind = kind; this.eStructuralFeature = eStructuralFeature; } defineClass(1186, 1185, $intern_157, EcoreEList$Dynamic); _.getEStructuralFeature = function getEStructuralFeature_3(){ return this.eStructuralFeature; } ; var Lorg_eclipse_emf_ecore_util_EcoreEList$Dynamic_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EcoreEList/Dynamic', 1186); function EcoreEMap$1(this$0){ this.this$01 = this$0; } defineClass(765, 66, $intern_141, EcoreEMap$1); _.newData = function newData_15(listCapacity){ return newInstance_11(this.this$01.entryClass, listCapacity); } ; var Lorg_eclipse_emf_ecore_util_EcoreEMap$1_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EcoreEMap/1', 765); function EcoreEMap$DelegateEObjectContainmentEList(this$0, entryClass, owner, featureID){ this.this$01 = this$0; EObjectContainmentEList.call(this, entryClass, owner, featureID); } defineClass(764, 83, $intern_157, EcoreEMap$DelegateEObjectContainmentEList); _.didAdd = function didAdd_4(index_0, newObject){ $doPut(this.this$01, castTo(newObject, 136)); } ; _.didClear = function didClear_2(size_0, oldObjects){ $doClear_0(this.this$01); } ; _.didMove = function didMove_1(index_0, movedObject, oldIndex){ var lastArg; ++(lastArg = this.this$01 , castTo(movedObject, 136) , lastArg).modCount; } ; _.didRemove = function didRemove_3(index_0, oldObject){ $doRemove(this.this$01, castTo(oldObject, 136)); } ; _.didSet = function didSet_2(index_0, newObject, oldObject){ $doRemove(this.this$01, castTo(oldObject, 136)); maskUndefined(oldObject) === maskUndefined(newObject) && castTo(oldObject, 136).setHash($hashOf(castTo(newObject, 136).getKey())); $doPut(this.this$01, castTo(newObject, 136)); } ; var Lorg_eclipse_emf_ecore_util_EcoreEMap$DelegateEObjectContainmentEList_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EcoreEMap/DelegateEObjectContainmentEList', 764); function EcoreEMap$Unsettable(entryEClass, entryClass, owner, featureID){ this.initializeDelegateEList(); this.entryClass = entryClass; this.entryEClass = entryEClass; this.delegateEList = null; this.delegateEList = new EcoreEMap$Unsettable$UnsettableDelegateEObjectContainmentEList(this, entryClass, owner, featureID); } defineClass(1220, 141, $intern_151, EcoreEMap$Unsettable); var Lorg_eclipse_emf_ecore_util_EcoreEMap$Unsettable_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EcoreEMap/Unsettable', 1220); function EcoreEMap$Unsettable$UnsettableDelegateEObjectContainmentEList(this$1, dataClass, owner, featureID){ EcoreEMap$DelegateEObjectContainmentEList.call(this, this$1, dataClass, owner, featureID); } defineClass(1221, 764, $intern_157, EcoreEMap$Unsettable$UnsettableDelegateEObjectContainmentEList); _.didChange = function didChange_7(){ this.isSet = true; } ; _.isSet_0 = function isSet_19(){ return this.isSet; } ; _.unset = function unset_15(){ var oldIsSet; $clear_13(this); if ($eNotificationRequired(this.owner)) { oldIsSet = this.isSet; this.isSet = false; $eNotify(this.owner, new ENotificationImpl_4(this.owner, 2, this.featureID, oldIsSet, false)); } else { this.isSet = false; } } ; _.isSet = false; var Lorg_eclipse_emf_ecore_util_EcoreEMap$Unsettable$UnsettableDelegateEObjectContainmentEList_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList', 1221); function convertToString_2(eDataType, value_0){ return eDataType.getEPackage().getEFactoryInstance().convertToString(eDataType, value_0); } function createFromString_2(eDataType, literal){ return eDataType.getEPackage().getEFactoryInstance().createFromString(eDataType, literal); } function getConversionDelegateFactory(eDataType){ var eDataTypeDelegate, eDataTypeDelegate$iterator; for (eDataTypeDelegate$iterator = getConversionDelegates($getEPackage(eDataType)).iterator_0(); eDataTypeDelegate$iterator.hasNext_0();) { eDataTypeDelegate = castToString(eDataTypeDelegate$iterator.next_1()); if ($getEAnnotation(eDataType, eDataTypeDelegate)) { return $getFactory(($clinit_EDataType$Internal$ConversionDelegate$Factory$Registry() , INSTANCE_5), eDataTypeDelegate); } } return null; } function getConversionDelegates(ePackage){ var eAnnotation, eDataTypeDelegate, eDataTypeDelegate$array, eDataTypeDelegate$index, eDataTypeDelegate$max, eDataTypeDelegates, result; if (ePackage) { eAnnotation = ePackage.getEAnnotation('http://www.eclipse.org/emf/2002/Ecore'); if (eAnnotation) { eDataTypeDelegates = castToString($get_21((!eAnnotation.details && (eAnnotation.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, eAnnotation)) , eAnnotation.details), 'conversionDelegates')); if (eDataTypeDelegates != null) { result = new ArrayList; for (eDataTypeDelegate$array = $split_0(eDataTypeDelegates, '\\w+') , eDataTypeDelegate$index = 0 , eDataTypeDelegate$max = eDataTypeDelegate$array.length; eDataTypeDelegate$index < eDataTypeDelegate$max; ++eDataTypeDelegate$index) { eDataTypeDelegate = eDataTypeDelegate$array[eDataTypeDelegate$index]; push_1(result.array, eDataTypeDelegate); } return result; } } } return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } function getRootContainer(eObject){ var count, parent_0, result; result = eObject; if (eObject) { count = 0; for (parent_0 = eObject.eContainer_0(); parent_0; parent_0 = parent_0.eContainer_0()) { if (++count > $intern_67) { return getRootContainer(parent_0); } result = parent_0; if (parent_0 == eObject) { throw toJs(new IllegalStateException_0('There is a cycle in the containment hierarchy of ' + eObject)); } } } return result; } function getSettingDelegateFactory(eStructuralFeature){ var settingDelegate, settingDelegate$iterator; for (settingDelegate$iterator = getSettingDelegates($getEPackage($getEContainingClass(eStructuralFeature))).iterator_0(); settingDelegate$iterator.hasNext_0();) { settingDelegate = castToString(settingDelegate$iterator.next_1()); if ($getEAnnotation(eStructuralFeature, settingDelegate)) return $getFactory_0(($clinit_EStructuralFeature$Internal$SettingDelegate$Factory$Registry() , INSTANCE_7), settingDelegate); } return null; } function getSettingDelegates(ePackage){ var eAnnotation, result, settingDelegate, settingDelegate$array, settingDelegate$index, settingDelegate$max, settingDelegates; eAnnotation = ePackage.getEAnnotation('http://www.eclipse.org/emf/2002/Ecore'); if (eAnnotation) { settingDelegates = castToString($get_21((!eAnnotation.details && (eAnnotation.details = new EAnnotationImpl$1(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, eAnnotation)) , eAnnotation.details), 'settingDelegates')); if (settingDelegates != null) { result = new ArrayList; for (settingDelegate$array = $split_0(settingDelegates, '\\w+') , settingDelegate$index = 0 , settingDelegate$max = settingDelegate$array.length; settingDelegate$index < settingDelegate$max; ++settingDelegate$index) { settingDelegate = settingDelegate$array[settingDelegate$index]; push_1(result.array, settingDelegate); } return result; } } return $clinit_Collections() , $clinit_Collections() , EMPTY_LIST; } function isAncestor(ancestorEObject, eObject){ var count, eContainer; if (eObject) { if (eObject == ancestorEObject) { return true; } count = 0; for (eContainer = castTo(eObject, 54).eInternalContainer(); !!eContainer && eContainer != eObject; eContainer = eContainer.eInternalContainer()) { if (++count > $intern_67) { return isAncestor(ancestorEObject, eContainer); } if (eContainer == ancestorEObject) { return true; } } } return false; } function resolve_20(proxy){ var ePackage, proxyURI, resolvedObject, resource; proxyURI = castTo(proxy, 54).eProxyURI_0(); if (proxyURI) { try { resolvedObject = null; ePackage = $getEPackage_0(($clinit_EPackage$Registry() , INSTANCE_6), $toString_26($trimFragment(proxyURI))); if (ePackage) { resource = ePackage.eResource_0(); !!resource && (resolvedObject = resource.getEObject($toString_7(proxyURI.fragment))); } if (!!resolvedObject && resolvedObject != proxy) { return resolve_20(resolvedObject); } } catch ($e0) { $e0 = toJava($e0); if (!instanceOf($e0, 63)) throw toJs($e0); } } return proxy; } function wrapperClassFor(javaClass){ return !javaClass?null:(javaClass.modifiers & 1) != 0?javaClass == Z_classLit?Ljava_lang_Boolean_2_classLit:javaClass == I_classLit?Ljava_lang_Integer_2_classLit:javaClass == F_classLit?Ljava_lang_Float_2_classLit:javaClass == D_classLit?Ljava_lang_Double_2_classLit:javaClass == J_classLit?Ljava_lang_Long_2_classLit:javaClass == S_classLit?Ljava_lang_Short_2_classLit:javaClass == B_classLit?Ljava_lang_Byte_2_classLit:Ljava_lang_Character_2_classLit:javaClass; } function $copy_1(this$static, eObject){ var copyEObject, eAllStructuralFeaturesData, eClass, eClass0, eReference, eStructuralFeature, i, size_0; if (!eObject) { return null; } else { copyEObject = (eClass0 = eObject.eClass_0() , !eClass0?null:$getEPackage(eClass0).getEFactoryInstance().create_3(eClass0)); if (copyEObject) { $put_11(this$static, eObject, copyEObject); eClass = eObject.eClass_0(); for (i = 0 , size_0 = (eClass.eAllStructuralFeaturesData == null && $getEAllStructuralFeatures(eClass) , eClass.eAllStructuralFeaturesData).length; i < size_0; ++i) { eStructuralFeature = (eAllStructuralFeaturesData = (eClass.eAllStructuralFeaturesData == null && $getEAllStructuralFeatures(eClass) , eClass.eAllStructuralFeaturesData) , i >= 0 && i < eAllStructuralFeaturesData.length?eAllStructuralFeaturesData[i]:null); if (eStructuralFeature.isChangeable() && !eStructuralFeature.isDerived()) { if (instanceOf(eStructuralFeature, 331)) { $copyAttribute(this$static, castTo(eStructuralFeature, 35), eObject, copyEObject); } else { eReference = castTo(eStructuralFeature, 19); (eReference.eFlags & $intern_138) != 0 && $copyContainment(this$static, eReference, eObject, copyEObject); } } } eObject.eIsProxy() && castTo(copyEObject, 54).eSetProxyURI(castTo(eObject, 54).eProxyURI_0()); } return copyEObject; } } function $copyAll(this$static, eObjects){ var object, object$iterator, result, t; result = new ArrayList_0(eObjects.size_1()); for (object$iterator = eObjects.iterator_0(); object$iterator.hasNext_0();) { object = object$iterator.next_1(); t = $copy_1(this$static, castTo(object, 58)); !!t && (push_1(result.array, t) , true); } return result; } function $copyAttribute(this$static, eAttribute, eObject, copyEObject){ var featureMap, setting, targetEStructuralFeature; if (eObject.eIsSet_0(eAttribute)) { $clinit_FeatureMapUtil(); if ($isFeatureMap(eAttribute)) { featureMap = castTo(eObject.eGet_0(eAttribute), 160); $copyFeatureMap(this$static, featureMap); } else { setting = (targetEStructuralFeature = eAttribute , !targetEStructuralFeature?null:castTo(copyEObject, 54).eSetting(targetEStructuralFeature)); !!setting && $copyAttributeValue(eObject.eGet_0(eAttribute), setting); } } } function $copyAttributeValue(value_0, setting){ setting.set_1(value_0); } function $copyContainment(this$static, eReference, eObject, copyEObject){ var setting, target, targetEStructuralFeature, upper, value_0; if (eObject.eIsSet_0(eReference)) { setting = (targetEStructuralFeature = eReference , !targetEStructuralFeature?null:castTo(copyEObject, 54).eSetting(targetEStructuralFeature)); if (setting) { value_0 = eObject.eGet_0(eReference); upper = eReference.upperBound; if (upper > 1 || upper == -1) { target = castTo(value_0, 15); setting.set_1($copyAll(this$static, target)); } else { setting.set_1($copy_1(this$static, castTo(value_0, 58))); } } } } function $copyFeatureMap(this$static, featureMap){ var feature, i, size_0, value_0; for (i = 0 , size_0 = featureMap.size_1(); i < size_0; ++i) { feature = featureMap.getEStructuralFeature_0(i); if (instanceOf(feature, 102) && (castTo(feature, 19).eFlags & $intern_138) != 0) { value_0 = featureMap.getValue_1(i); value_0 != null && $copy_1(this$static, castTo(value_0, 58)); } } } function $copyReference(this$static, eReference, eObject, copyEObject){ var copyReferencedEObject, index_0, isBidirectional, k, position, referencedEObject, setting, source, target, targetEStructuralFeature, upper, value_0; if (eObject.eIsSet_0(eReference)) { setting = (targetEStructuralFeature = eReference , !targetEStructuralFeature?null:castTo(copyEObject, 54).eSetting(targetEStructuralFeature)); if (setting) { value_0 = eObject.eGet_1(eReference, this$static.resolveProxies); upper = eReference.upperBound; if (upper > 1 || upper == -1) { source = castTo(value_0, 71); target = castTo(setting, 71); if (source.isEmpty()) { target.clear_0(); } else { isBidirectional = !!$getEOpposite(eReference); index_0 = 0; for (k = this$static.resolveProxies?source.iterator_0():source.basicIterator(); k.hasNext_0();) { referencedEObject = castTo(k.next_1(), 58); copyReferencedEObject = castTo($get_16(this$static, referencedEObject), 58); if (!copyReferencedEObject) { if (this$static.useOriginalReferences && !isBidirectional) { target.addUnique(index_0, referencedEObject); ++index_0; } } else { if (isBidirectional) { position = target.indexOf_0(copyReferencedEObject); position == -1?target.addUnique(index_0, copyReferencedEObject):index_0 != position && target.move_0(index_0, copyReferencedEObject); } else { target.addUnique(index_0, copyReferencedEObject); } ++index_0; } } } } else { if (value_0 == null) { setting.set_1(null); } else { copyReferencedEObject = $get_16(this$static, value_0); copyReferencedEObject == null?this$static.useOriginalReferences && !$getEOpposite(eReference) && setting.set_1(value_0):setting.set_1(copyReferencedEObject); } } } } } function $copyReferences(this$static){ var copyEObject, copyFeatureMap, copyFeatureMapSize, copyReferencedEObject, eAllStructuralFeaturesData, eClass, eObject, eReference, eStructuralFeature, entry, entry$iterator, feature, featureMap, featureMapSize, j, k, l, reference, referencedEObject, size_0, targetEStructuralFeature, theOpposite; for (entry$iterator = new LinkedHashMap$EntrySet$EntryIterator(new LinkedHashMap$EntrySet(this$static)); entry$iterator.next_0 != entry$iterator.this$11.this$01.head;) { entry = $next_8(entry$iterator); eObject = castTo(entry.key, 58); copyEObject = castTo(entry.value_0, 58); eClass = eObject.eClass_0(); for (j = 0 , size_0 = (eClass.eAllStructuralFeaturesData == null && $getEAllStructuralFeatures(eClass) , eClass.eAllStructuralFeaturesData).length; j < size_0; ++j) { eStructuralFeature = (eAllStructuralFeaturesData = (eClass.eAllStructuralFeaturesData == null && $getEAllStructuralFeatures(eClass) , eClass.eAllStructuralFeaturesData) , j >= 0 && j < eAllStructuralFeaturesData.length?eAllStructuralFeaturesData[j]:null); if (eStructuralFeature.isChangeable() && !eStructuralFeature.isDerived()) { if (instanceOf(eStructuralFeature, 102)) { eReference = castTo(eStructuralFeature, 19); (eReference.eFlags & $intern_138) == 0 && (theOpposite = $getEOpposite(eReference) , !(!!theOpposite && (theOpposite.eFlags & $intern_138) != 0)) && $copyReference(this$static, eReference, eObject, copyEObject); } else { $clinit_FeatureMapUtil(); if (castTo(eStructuralFeature, 69).isFeatureMap_0()) { copyFeatureMap = (targetEStructuralFeature = eStructuralFeature , castTo(!targetEStructuralFeature?null:castTo(copyEObject, 54).eSetting(targetEStructuralFeature), 160)); if (copyFeatureMap) { featureMap = castTo(eObject.eGet_0(eStructuralFeature), 160); copyFeatureMapSize = copyFeatureMap.size_1(); for (k = 0 , featureMapSize = featureMap.size_1(); k < featureMapSize; ++k) { feature = featureMap.getEStructuralFeature_0(k); if (instanceOf(feature, 102)) { referencedEObject = featureMap.getValue_1(k); copyReferencedEObject = $get_16(this$static, referencedEObject); if (copyReferencedEObject == null && referencedEObject != null) { reference = castTo(feature, 19); if (!this$static.useOriginalReferences || (reference.eFlags & $intern_138) != 0 || !!$getEOpposite(reference)) { continue; } copyReferencedEObject = referencedEObject; } if (!copyFeatureMap.add_6(feature, copyReferencedEObject)) { for (l = 0; l < copyFeatureMapSize; ++l) { if (copyFeatureMap.getEStructuralFeature_0(l) == feature && maskUndefined(copyFeatureMap.getValue_1(l)) === maskUndefined(copyReferencedEObject)) { copyFeatureMap.move(copyFeatureMap.size_1() - 1, l); --copyFeatureMapSize; break; } } } } else { copyFeatureMap.add_6(featureMap.getEStructuralFeature_0(k), featureMap.getValue_1(k)); } } } } } } } } } function EcoreUtil$Copier(){ LinkedHashMap.call(this); this.resolveProxies = true; this.useOriginalReferences = true; } defineClass(1189, 215, $intern_76, EcoreUtil$Copier); _.resolveProxies = false; _.useOriginalReferences = false; var Lorg_eclipse_emf_ecore_util_EcoreUtil$Copier_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EcoreUtil/Copier', 1189); function $hasNext_9(this$static){ if (this$static.preparedResult == null) { while (this$static.iterator.hasNext_0()) { this$static.preparedResult = this$static.iterator.next_1(); if (!castTo(this$static.preparedResult, 54).eDirectResource()) { return true; } } this$static.preparedResult = null; return false; } else { return true; } } function EcoreUtil$ProperContentIterator(eObject){ var contents; contents = eObject.eContents_0(); this.iterator = instanceOf(contents, 71)?castTo(contents, 71).basicIterator():contents.iterator_0(); } defineClass(759, 1, $intern_6, EcoreUtil$ProperContentIterator); _.forEachRemaining = function forEachRemaining_60(consumer){ $forEachRemaining(this, consumer); } ; _.hasNext_0 = function hasNext_51(){ return $hasNext_9(this); } ; _.next_1 = function next_50(){ var result; $hasNext_9(this); result = this.preparedResult; this.preparedResult = null; return result; } ; _.remove = function remove_130(){ this.iterator.remove(); } ; var Lorg_eclipse_emf_ecore_util_EcoreUtil$ProperContentIterator_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EcoreUtil/ProperContentIterator', 759); function $clinit_EcoreValidator(){ $clinit_EcoreValidator = emptyMethod; $clinit_EObjectValidator(); INSTANCE_10 = new EcoreValidator; } function EcoreValidator(){ $clinit_XMLTypeValidator(); } defineClass(1528, 1527, {}, EcoreValidator); var INSTANCE_10; var Lorg_eclipse_emf_ecore_util_EcoreValidator_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'EcoreValidator', 1528); function $clinit_FeatureMapUtil(){ $clinit_FeatureMapUtil = emptyMethod; NULL_VALIDATOR = new FeatureMapUtil$1; } function createEntry_5(eStructuralFeature, value_0){ $clinit_FeatureMapUtil(); var prototype_0; prototype_0 = castTo(eStructuralFeature, 69).getFeatureMapEntryPrototype(); $validate_2(prototype_0, value_0); return prototype_0.createEntry(value_0); } function getValidator(containingClass, eStructuralFeature){ $clinit_FeatureMapUtil(); var extendedMetaData, holder, result, validatorMap; if (!eStructuralFeature) { return NULL_VALIDATOR; } else if (eStructuralFeature == ($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT__MIXED) || (eStructuralFeature == ANY_TYPE__MIXED || eStructuralFeature == ANY_TYPE__ANY || eStructuralFeature == ANY_TYPE__ANY_ATTRIBUTE) && containingClass != ANY_TYPE) { return new FeatureMapUtil$BasicValidator(containingClass, eStructuralFeature); } else { holder = castTo(eStructuralFeature, 692); extendedMetaData = holder.getExtendedMetaData_0(); if (!extendedMetaData) { $getName_0($getExtendedMetaData_1(($clinit_ExtendedMetaData() , INSTANCE_11), eStructuralFeature)); extendedMetaData = holder.getExtendedMetaData_0(); } validatorMap = (!extendedMetaData.validatorMap && (extendedMetaData.validatorMap = new HashMap) , extendedMetaData.validatorMap); result = castTo(getEntryValueOrNull($getEntry_0(validatorMap.hashCodeMap, containingClass)), 2041); !result && $put_6(validatorMap, containingClass, result = new FeatureMapUtil$BasicValidator(containingClass, eStructuralFeature)); return result; } } function isMany_1(owner, feature){ $clinit_FeatureMapUtil(); var affiliation, affiliationUpperBound, eClass; if (feature.isMany()) { return true; } else if (feature.getUpperBound() == -2) { if (feature == ($clinit_XMLTypeFeatures() , TEXT) || feature == CDATA || feature == COMMENT || feature == PROCESSING_INSTRUCTION) { return true; } else { eClass = owner.eClass_0(); if ($getFeatureID(eClass, feature) >= 0) { return false; } else { affiliation = $getAffiliation(($clinit_ExtendedMetaData() , INSTANCE_11), eClass, feature); if (!affiliation) { return true; } else { affiliationUpperBound = affiliation.getUpperBound(); return (affiliationUpperBound > 1 || affiliationUpperBound == -1) && $getFeatureKind($getExtendedMetaData_1(INSTANCE_11, affiliation)) != 3; } } } } else { return false; } } var NULL_VALIDATOR; var Lorg_eclipse_emf_ecore_util_FeatureMapUtil$Validator_2_classLit = createForInterface('org.eclipse.emf.ecore.util', 'FeatureMapUtil/Validator'); function FeatureMapUtil$1(){ } defineClass(1295, 1, {2041:1}, FeatureMapUtil$1); _.isValid = function isValid_2(eStructuralFeature){ return true; } ; var Lorg_eclipse_emf_ecore_util_FeatureMapUtil$1_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'FeatureMapUtil/1', 1295); function $clinit_FeatureMapUtil$BasicValidator(){ $clinit_FeatureMapUtil$BasicValidator = emptyMethod; ANY_WILDCARD = ($clinit_Collections() , new Collections$SingletonList('##any')); } function $isIncluded(this$static, feature){ var featureKind; if (this$static.wildcards == ANY_WILDCARD) { featureKind = $getFeatureKind($getExtendedMetaData_1(($clinit_ExtendedMetaData() , INSTANCE_11), feature)); return this$static.isElement?featureKind == 4 && feature != ($clinit_XMLTypeFeatures() , TEXT) && feature != ($clinit_XMLTypeFeatures() , CDATA) && feature != ($clinit_XMLTypeFeatures() , COMMENT) && feature != ($clinit_XMLTypeFeatures() , PROCESSING_INSTRUCTION):featureKind == 2; } if (!!this$static.groupMembers && (this$static.groupMembers.contains(feature) || this$static.groupMembers.contains($getGroup($getExtendedMetaData_1(($clinit_ExtendedMetaData() , INSTANCE_11), feature))) || this$static.groupMembers.contains($getAffiliation(($clinit_ExtendedMetaData() , INSTANCE_11), this$static.containingClass, feature)))) { return true; } if (this$static.wildcards) { if ($matches(($clinit_ExtendedMetaData() , this$static.wildcards), $getNamespace_0($getExtendedMetaData_1(INSTANCE_11, feature)))) { featureKind = $getFeatureKind($getExtendedMetaData_1(INSTANCE_11, feature)); return this$static.isElement?featureKind == 4:featureKind == 2; } } return false; } function FeatureMapUtil$BasicValidator(containingClass, eStructuralFeature){ $clinit_FeatureMapUtil$BasicValidator(); var eAllStructuralFeaturesData, feature, feature$iterator, group, i, mixedFeature, size_0; this.cache = new FeatureMapUtil$BasicValidator$Cache(this); this.containingClass = containingClass; this.eStructuralFeature = eStructuralFeature; this.wildcards = $getWildcards($getExtendedMetaData_1(($clinit_ExtendedMetaData() , INSTANCE_11), eStructuralFeature)); if (this.wildcards.isEmpty()) { if ((mixedFeature = $getMixedFeature(INSTANCE_11, containingClass)) == eStructuralFeature) { this.isElement = true; this.groupMembers = new ArrayList; this.wildcards = new UniqueEList; this.wildcards.add_2('http://www.eclipse.org/emf/2003/XMLType'); castTo($getType_1($getExtendedMetaData_0(INSTANCE_11, $getEPackage(containingClass)), ''), 29) == containingClass && this.wildcards.add_2($getNamespace(INSTANCE_11, $getEPackage(containingClass))); for (feature$iterator = $getAllElements(INSTANCE_11, containingClass).iterator_0(); feature$iterator.hasNext_0();) { feature = castTo(feature$iterator.next_1(), 179); switch ($getFeatureKind($getExtendedMetaData_1(INSTANCE_11, feature))) { case 4: { this.groupMembers.add_2(feature); break; } case 5: { this.wildcards.addAll($getWildcards($getExtendedMetaData_1(INSTANCE_11, feature))); break; } } } } else { $clinit_FeatureMapUtil(); if (castTo(eStructuralFeature, 69).isFeatureMap_0()) { this.isElement = true; this.wildcards = null; this.groupMembers = new ArrayList; for (i = 0 , size_0 = (containingClass.eAllStructuralFeaturesData == null && $getEAllStructuralFeatures(containingClass) , containingClass.eAllStructuralFeaturesData).length; i < size_0; ++i) { feature = (eAllStructuralFeaturesData = (containingClass.eAllStructuralFeaturesData == null && $getEAllStructuralFeatures(containingClass) , containingClass.eAllStructuralFeaturesData) , i >= 0 && i < eAllStructuralFeaturesData.length?eAllStructuralFeaturesData[i]:null); for (group = $getGroup($getExtendedMetaData_1(INSTANCE_11, feature)); group; group = $getGroup($getExtendedMetaData_1(INSTANCE_11, group))) { group == eStructuralFeature && this.groupMembers.add_2(feature); } } } else if ($getFeatureKind($getExtendedMetaData_1(INSTANCE_11, eStructuralFeature)) == 1 && !!mixedFeature) { this.wildcards = null; this.groupMembers = ($clinit_XMLTypeFeatures() , TEXTUAL_FEATURES); } else { this.wildcards = null; this.isElement = true; this.groupMembers = ($clinit_Collections() , new Collections$SingletonList(eStructuralFeature)); } } } else { this.isElement = $getFeatureKind($getExtendedMetaData_1(INSTANCE_11, eStructuralFeature)) == 5; this.wildcards.equals_0(ANY_WILDCARD) && (this.wildcards = ANY_WILDCARD); } } defineClass(773, 1, {2041:1}, FeatureMapUtil$BasicValidator); _.isValid = function isValid_3(feature){ var result; if (this.eStructuralFeature == feature) return true; result = castToBoolean($get_10(this.cache, feature)); if (result == null) { if ($isIncluded(this, feature)) { $put_16(this.cache, feature, ($clinit_Boolean() , TRUE_0)); return true; } else { $put_16(this.cache, feature, ($clinit_Boolean() , FALSE_0)); return false; } } else { return result == ($clinit_Boolean() , TRUE_0); } } ; _.isElement = false; var ANY_WILDCARD; var Lorg_eclipse_emf_ecore_util_FeatureMapUtil$BasicValidator_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'FeatureMapUtil/BasicValidator', 773); function $put_16(this$static, eStructuralFeature, isValid){ var newCache; newCache = new FeatureMapUtil$BasicValidator$Cache(this$static.this$11); $putAll(newCache, this$static.this$11.cache); $put_9(newCache.hashCodeMap, eStructuralFeature, isValid); this$static.this$11.cache = newCache; } function FeatureMapUtil$BasicValidator$Cache(this$1){ this.this$11 = this$1; HashMap.call(this); } defineClass(774, 45, $intern_76, FeatureMapUtil$BasicValidator$Cache); var Lorg_eclipse_emf_ecore_util_FeatureMapUtil$BasicValidator$Cache_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'FeatureMapUtil/BasicValidator/Cache', 774); function $addAll_14(this$static, collection){ return $addAll_13(this$static.featureMap, this$static.feature, collection); } function $basicRemove_4(this$static, object, notifications){ return $basicRemove_3(this$static.featureMap, this$static.feature, object, notifications); } function $clear_16(this$static){ $clear_15(this$static.featureMap, this$static.feature); } function $isEmpty_2(this$static){ return $isEmpty_1(this$static.featureMap, this$static.feature); } function FeatureMapUtil$FeatureEList(feature, featureMap){ this.feature = feature; this.featureMap = featureMap; } defineClass(509, 56, {20:1, 31:1, 56:1, 16:1, 15:1, 61:1, 79:1, 71:1, 97:1}, FeatureMapUtil$FeatureEList); _.add_3 = function add_70(index_0, object){ $add_32(this.featureMap, this.feature, index_0, object); } ; _.add_2 = function add_71(object){ return $add_33(this.featureMap, this.feature, object); } ; _.addAll_0 = function addAll_37(index_0, collection){ return $addAll_12(this.featureMap, this.feature, index_0, collection); } ; _.addAll = function addAll_38(collection){ return $addAll_14(this, collection); } ; _.addUnique = function addUnique_20(index_0, object){ $addUnique_11(this.featureMap, this.feature, index_0, object); } ; _.basicAdd = function basicAdd_5(object, notifications){ return $basicAdd_2(this.featureMap, this.feature, object, notifications); } ; _.basicGet = function basicGet_6(index_0){ return $get_23(this.featureMap, this.feature, index_0, false); } ; _.basicIterator = function basicIterator_7(){ return $basicIterator(this.featureMap, this.feature); } ; _.basicListIterator = function basicListIterator_15(){ return $basicListIterator_0(this.featureMap, this.feature); } ; _.basicListIterator_0 = function basicListIterator_16(index_0){ return $basicListIterator_1(this.featureMap, this.feature, index_0); } ; _.basicRemove = function basicRemove_6(object, notifications){ return $basicRemove_4(this, object, notifications); } ; _.clear_0 = function clear_66(){ $clear_16(this); } ; _.contains = function contains_67(object){ return $contains_12(this.featureMap, this.feature, object); } ; _.containsAll = function containsAll_15(collection){ return $containsAll_1(this.featureMap, this.feature, collection); } ; _.get_0 = function get_70(index_0){ return $get_23(this.featureMap, this.feature, index_0, true); } ; _.get_6 = function get_71(resolve){ return this; } ; _.indexOf_0 = function indexOf_18(object){ return $indexOf_7(this.featureMap, this.feature, object); } ; _.isEmpty = function isEmpty_34(){ return $isEmpty_2(this); } ; _.isSet_0 = function isSet_20(){ return !$isEmpty_1(this.featureMap, this.feature); } ; _.iterator_0 = function iterator_90(){ return $iterator_2(this.featureMap, this.feature); } ; _.listIterator_0 = function listIterator_33(){ return $listIterator_3(this.featureMap, this.feature); } ; _.listIterator_1 = function listIterator_34(index_0){ return $listIterator_4(this.featureMap, this.feature, index_0); } ; _.move = function move_21(targetIndex, sourceIndex){ return $move_6(this.featureMap, this.feature, targetIndex, sourceIndex); } ; _.move_0 = function move_22(index_0, object){ $move_7(this.featureMap, this.feature, index_0, object); } ; _.remove_2 = function remove_131(index_0){ return $remove_43(this.featureMap, this.feature, index_0); } ; _.remove_1 = function remove_132(object){ return $remove_44(this.featureMap, this.feature, object); } ; _.set_2 = function set_41(index_0, object){ return $set_17(this.featureMap, this.feature, index_0, object); } ; _.set_1 = function set_42(newValue){ $clear_15(this.featureMap, this.feature); $addAll_14(this, castTo(newValue, 15)); } ; _.size_1 = function size_81(){ return $size_3(this.featureMap, this.feature); } ; _.toArray = function toArray_42(){ return $toArray_11(this.featureMap, this.feature); } ; _.toArray_0 = function toArray_43(array){ return $toArray_13(this.featureMap, this.feature, array); } ; _.toString_0 = function toString_158(){ var i, stringBuffer; stringBuffer = new StringBuffer; stringBuffer.string += '['; for (i = $basicIterator(this.featureMap, this.feature); $hasNext_8(i);) { $append_3(stringBuffer, valueOf_6($next_15(i))); $hasNext_8(i) && (stringBuffer.string += ', ' , stringBuffer); } stringBuffer.string += ']'; return stringBuffer.string; } ; _.unset = function unset_16(){ $clear_15(this.featureMap, this.feature); } ; var Lorg_eclipse_emf_ecore_util_FeatureMapUtil$FeatureEList_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'FeatureMapUtil/FeatureEList', 509); function $getFeatureID_0(this$static, expectedClass){ var containerClass; if (this$static.featureID == -1 && !!this$static.feature) { containerClass = this$static.feature.getContainerClass(); this$static.featureID = !containerClass?$getFeatureID(this$static.notifier.eClass_0(), this$static.feature):this$static.notifier.eDerivedStructuralFeatureID(this$static.feature.getFeatureID_0(), containerClass); } return this$static.notifier.eBaseStructuralFeatureID(this$static.featureID, expectedClass); } function FeatureMapUtil$FeatureENotificationImpl(owner, eventType, feature, oldObject, newObject, index_0, wasSet){ NotificationImpl_2.call(this, eventType, oldObject, newObject, index_0, wasSet); this.notifier = owner; this.feature = feature; } defineClass(644, 39, $intern_145, FeatureMapUtil$FeatureENotificationImpl); _.getFeatureID = function getFeatureID_14(expectedClass){ return $getFeatureID_0(this, expectedClass); } ; _.merge_0 = function merge_5(notification){ var addedValues, collection, newPositions, notificationEventType, notificationNotifier, positions, removedValues; switch (this.eventType) { case 1: case 2: { notificationNotifier = notification.getNotifier(); if (maskUndefined(notificationNotifier) === maskUndefined(this.notifier) && $getFeatureID_0(this, null) == notification.getFeatureID(null)) { this.newValue = notification.getNewValue(); notification.getEventType() == 1 && (this.eventType = 1); return true; } break; } case 3: { notificationEventType = notification.getEventType(); switch (notificationEventType) { case 3: { notificationNotifier = notification.getNotifier(); if (maskUndefined(notificationNotifier) === maskUndefined(this.notifier) && $getFeatureID_0(this, null) == notification.getFeatureID(null)) { this.eventType = 5; addedValues = new BasicEList_0(2); $add_21(addedValues, this.newValue); $add_21(addedValues, notification.getNewValue()); this.newValue = addedValues; return true; } break; } } break; } case 5: { notificationEventType = notification.getEventType(); switch (notificationEventType) { case 3: { notificationNotifier = notification.getNotifier(); if (maskUndefined(notificationNotifier) === maskUndefined(this.notifier) && $getFeatureID_0(this, null) == notification.getFeatureID(null)) { collection = castTo(this.newValue, 16); collection.add_2(notification.getNewValue()); return true; } break; } } break; } case 4: { notificationEventType = notification.getEventType(); switch (notificationEventType) { case 3: { notificationNotifier = notification.getNotifier(); if (maskUndefined(notificationNotifier) === maskUndefined(this.notifier) && $getFeatureID_0(this, null) == notification.getFeatureID(null)) { this.eventType = 1; this.newValue = notification.getNewValue(); return true; } break; } case 4: { notificationNotifier = notification.getNotifier(); if (maskUndefined(notificationNotifier) === maskUndefined(this.notifier) && $getFeatureID_0(this, null) == notification.getFeatureID(null)) { this.eventType = 6; removedValues = new BasicEList_0(2); $add_21(removedValues, this.oldValue); $add_21(removedValues, notification.getOldValue()); this.oldValue = removedValues; positions = stampJavaTypeInfo(getClassLiteralForArray(I_classLit, 1), $intern_49, 28, 15, [this.position, notification.getPosition_0()]); this.newValue = positions; return true; } break; } } break; } case 6: { notificationEventType = notification.getEventType(); switch (notificationEventType) { case 4: { notificationNotifier = notification.getNotifier(); if (maskUndefined(notificationNotifier) === maskUndefined(this.notifier) && $getFeatureID_0(this, null) == notification.getFeatureID(null)) { collection = castTo(this.oldValue, 16); collection.add_2(notification.getOldValue()); positions = castTo(this.newValue, 53); newPositions = initUnidimensionalArray(I_classLit, $intern_49, 28, positions.length + 1, 15, 1); arraycopy(positions, 0, newPositions, 0, positions.length); newPositions[positions.length] = notification.getPosition_0(); this.newValue = newPositions; return true; } break; } } break; } } return false; } ; var Lorg_eclipse_emf_ecore_util_FeatureMapUtil$FeatureENotificationImpl_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'FeatureMapUtil/FeatureENotificationImpl', 644); function FeatureMapUtil$FeatureFeatureMap(feature, featureMap){ FeatureMapUtil$FeatureEList.call(this, feature, featureMap); this.wrapper = this; } defineClass(564, 509, {20:1, 31:1, 56:1, 16:1, 15:1, 61:1, 79:1, 160:1, 220:1, 2036:1, 71:1, 97:1}, FeatureMapUtil$FeatureFeatureMap); _.add_6 = function add_72(feature, value_0){ return $add_33(this.featureMap, feature, value_0); } ; _.basicAdd_0 = function basicAdd_6(feature, object, notifications){ return $basicAdd_2(this.featureMap, feature, object, notifications); } ; _.basicRemove_0 = function basicRemove_7(feature, object, notifications){ return $basicRemove_3(this.featureMap, feature, object, notifications); } ; _.featureMap_0 = function featureMap_1(){ return this; } ; _.get_7 = function get_72(feature, resolve){ return $get_24(this.featureMap, feature, resolve); } ; _.getEStructuralFeature_0 = function getEStructuralFeature_4(index_0){ return castTo($get_23(this.featureMap, this.feature, index_0, false), 76).getEStructuralFeature(); } ; _.getValue_1 = function getValue_20(index_0){ return castTo($get_23(this.featureMap, this.feature, index_0, false), 76).getValue(); } ; _.getWrapper = function getWrapper_0(){ return this.wrapper; } ; _.isSet_1 = function isSet_21(feature){ return !$isEmpty_1(this.featureMap, feature); } ; _.set_3 = function set_43(feature, object){ $set_18(this.featureMap, feature, object); } ; _.setting = function setting_1(feature){ return $setting(this.featureMap, feature); } ; _.unset_0 = function unset_17(feature){ $unset(this.featureMap, feature); } ; var Lorg_eclipse_emf_ecore_util_FeatureMapUtil$FeatureFeatureMap_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'FeatureMapUtil/FeatureFeatureMap', 564); function FeatureMapUtil$FeatureValue(feature, featureMap){ this.feature = feature; this.featureMap = featureMap; } defineClass(1294, 1, $intern_150, FeatureMapUtil$FeatureValue); _.get_6 = function get_73(resolve){ return $get_23(this.featureMap, this.feature, -1, resolve); } ; _.isSet_0 = function isSet_22(){ return !$isEmpty_1(this.featureMap, this.feature); } ; _.set_1 = function set_44(newValue){ $set_18(this.featureMap, this.feature, newValue); } ; _.unset = function unset_18(){ $clear_15(this.featureMap, this.feature); } ; var Lorg_eclipse_emf_ecore_util_FeatureMapUtil$FeatureValue_2_classLit = createForClass('org.eclipse.emf.ecore.util', 'FeatureMapUtil/FeatureValue', 1294); function $clinit_XMLTypeFeatures(){ $clinit_XMLTypeFeatures = emptyMethod; TEXT = castTo($get_20($getEStructuralFeatures(($clinit_XMLTypePackage() , eINSTANCE_4).xmlTypeDocumentRootEClass), 6), 35); CDATA = castTo($get_20($getEStructuralFeatures(eINSTANCE_4.xmlTypeDocumentRootEClass), 3), 35); COMMENT = castTo($get_20($getEStructuralFeatures(eINSTANCE_4.xmlTypeDocumentRootEClass), 4), 35); PROCESSING_INSTRUCTION = castTo($get_20($getEStructuralFeatures(eINSTANCE_4.xmlTypeDocumentRootEClass), 5), 19); $getFeatureMapEntryPrototype(TEXT); $getFeatureMapEntryPrototype(CDATA); $getFeatureMapEntryPrototype(COMMENT); $getFeatureMapEntryPrototype(PROCESSING_INSTRUCTION); TEXTUAL_FEATURES = new Arrays$ArrayList(stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_emf_ecore_EStructuralFeature_2_classLit, 1), $intern_154, 179, 0, [TEXT, CDATA])); } var CDATA, COMMENT, PROCESSING_INSTRUCTION, TEXT, TEXTUAL_FEATURES; var Lorg_eclipse_emf_ecore_xml_type_AnyType_2_classLit = createForInterface('org.eclipse.emf.ecore.xml.type', 'AnyType'); function InvalidDatatypeValueException(reason){ RuntimeException_0.call(this, reason); } defineClass(680, 63, $intern_44, InvalidDatatypeValueException); var Lorg_eclipse_emf_ecore_xml_type_InvalidDatatypeValueException_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type', 'InvalidDatatypeValueException', 680); var Lorg_eclipse_emf_ecore_xml_type_ProcessingInstruction_2_classLit = createForInterface('org.eclipse.emf.ecore.xml.type', 'ProcessingInstruction'); var Lorg_eclipse_emf_ecore_xml_type_SimpleAnyType_2_classLit = createForInterface('org.eclipse.emf.ecore.xml.type', 'SimpleAnyType'); var Lorg_eclipse_emf_ecore_xml_type_XMLTypeDocumentRoot_2_classLit = createForInterface('org.eclipse.emf.ecore.xml.type', 'XMLTypeDocumentRoot'); function $clinit_XMLTypeFactory(){ $clinit_XMLTypeFactory = emptyMethod; eINSTANCE_3 = init_5(); } var eINSTANCE_3; function $clinit_XMLTypePackage(){ $clinit_XMLTypePackage = emptyMethod; eINSTANCE_4 = init_6(); } var eINSTANCE_4; function $clinit_XMLTypePackage$Literals(){ $clinit_XMLTypePackage$Literals = emptyMethod; ANY_TYPE = ($clinit_XMLTypePackage() , eINSTANCE_4).anyTypeEClass; ANY_TYPE__MIXED = castTo($get_20($getEStructuralFeatures(eINSTANCE_4.anyTypeEClass), 0), 35); ANY_TYPE__ANY = castTo($get_20($getEStructuralFeatures(eINSTANCE_4.anyTypeEClass), 1), 35); ANY_TYPE__ANY_ATTRIBUTE = castTo($get_20($getEStructuralFeatures(eINSTANCE_4.anyTypeEClass), 2), 35); PROCESSING_INSTRUCTION_0 = eINSTANCE_4.processingInstructionEClass; castTo($get_20($getEStructuralFeatures(eINSTANCE_4.processingInstructionEClass), 0), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_4.processingInstructionEClass), 1), 35); SIMPLE_ANY_TYPE = eINSTANCE_4.simpleAnyTypeEClass; SIMPLE_ANY_TYPE__RAW_VALUE = castTo($get_20($getEStructuralFeatures(eINSTANCE_4.simpleAnyTypeEClass), 0), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_4.simpleAnyTypeEClass), 1), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_4.simpleAnyTypeEClass), 2), 19); XML_TYPE_DOCUMENT_ROOT = eINSTANCE_4.xmlTypeDocumentRootEClass; XML_TYPE_DOCUMENT_ROOT__MIXED = castTo($get_20($getEStructuralFeatures(eINSTANCE_4.xmlTypeDocumentRootEClass), 0), 35); castTo($get_20($getEStructuralFeatures(eINSTANCE_4.xmlTypeDocumentRootEClass), 1), 19); castTo($get_20($getEStructuralFeatures(eINSTANCE_4.xmlTypeDocumentRootEClass), 2), 19); XML_TYPE_DOCUMENT_ROOT__CDATA = castTo($get_20($getEStructuralFeatures(eINSTANCE_4.xmlTypeDocumentRootEClass), 3), 35); XML_TYPE_DOCUMENT_ROOT__COMMENT = castTo($get_20($getEStructuralFeatures(eINSTANCE_4.xmlTypeDocumentRootEClass), 4), 35); XML_TYPE_DOCUMENT_ROOT__TEXT = castTo($get_20($getEStructuralFeatures(eINSTANCE_4.xmlTypeDocumentRootEClass), 6), 35); XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION = castTo($get_20($getEStructuralFeatures(eINSTANCE_4.xmlTypeDocumentRootEClass), 5), 19); DATE = eINSTANCE_4.dateEDataType; DATE_TIME = eINSTANCE_4.dateTimeEDataType; DURATION = eINSTANCE_4.durationEDataType; GDAY = eINSTANCE_4.gDayEDataType; GMONTH = eINSTANCE_4.gMonthEDataType; GMONTH_DAY = eINSTANCE_4.gMonthDayEDataType; GYEAR = eINSTANCE_4.gYearEDataType; GYEAR_MONTH = eINSTANCE_4.gYearMonthEDataType; NOTATION = eINSTANCE_4.notationEDataType; QNAME = eINSTANCE_4.qNameEDataType; TIME = eINSTANCE_4.timeEDataType; } var ANY_TYPE, ANY_TYPE__ANY, ANY_TYPE__ANY_ATTRIBUTE, ANY_TYPE__MIXED, DATE, DATE_TIME, DURATION, GDAY, GMONTH, GMONTH_DAY, GYEAR, GYEAR_MONTH, NOTATION, PROCESSING_INSTRUCTION_0, QNAME, SIMPLE_ANY_TYPE, SIMPLE_ANY_TYPE__RAW_VALUE, TIME, XML_TYPE_DOCUMENT_ROOT, XML_TYPE_DOCUMENT_ROOT__CDATA, XML_TYPE_DOCUMENT_ROOT__COMMENT, XML_TYPE_DOCUMENT_ROOT__MIXED, XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION, XML_TYPE_DOCUMENT_ROOT__TEXT; function AnyTypeImpl(){ EObjectImpl.call(this); } defineClass(844, 516, {110:1, 94:1, 93:1, 58:1, 54:1, 99:1, 857:1}, AnyTypeImpl); _.eGet = function eGet_32(featureID, resolve, coreType){ switch (featureID) { case 0: if (coreType) return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , this.mixed; return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , this.mixed.wrapper; case 1: if (coreType) return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , castTo($list(this.mixed, ($clinit_XMLTypePackage$Literals() , ANY_TYPE__ANY)), 160); return (!this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , castTo(castTo($list(this.mixed, ($clinit_XMLTypePackage$Literals() , ANY_TYPE__ANY)), 160), 220)).getWrapper(); case 2: if (coreType) return !this.anyAttribute && (this.anyAttribute = new BasicFeatureMap(this, 2)) , this.anyAttribute; return !this.anyAttribute && (this.anyAttribute = new BasicFeatureMap(this, 2)) , this.anyAttribute.wrapper; } return $eDynamicGet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((this.eFlags & 2) == 0?this.eStaticClass():(!this.eProperties && (this.eProperties = new BasicEObjectImpl$EPropertiesHolderImpl) , this.eProperties).getEClass(), featureID), resolve, coreType); } ; _.eInverseRemove_0 = function eInverseRemove_23(otherEnd, featureID, msgs){ var feature; switch (featureID) { case 0: return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , $basicRemove_2(this.mixed, otherEnd, msgs); case 1: return (!this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , castTo(castTo($list(this.mixed, ($clinit_XMLTypePackage$Literals() , ANY_TYPE__ANY)), 160), 71)).basicRemove(otherEnd, msgs); case 2: return !this.anyAttribute && (this.anyAttribute = new BasicFeatureMap(this, 2)) , $basicRemove_2(this.anyAttribute, otherEnd, msgs); } return feature = castTo($getEStructuralFeature((this.eFlags & 2) == 0?this.eStaticClass():(!this.eProperties && (this.eProperties = new BasicEObjectImpl$EPropertiesHolderImpl) , this.eProperties).getEClass(), featureID), 69) , feature.getSettingDelegate().dynamicInverseRemove(this, $eSettings(this), featureID - $getFeatureCount(this.eStaticClass()), otherEnd, msgs); } ; _.eIsSet = function eIsSet_31(featureID){ switch (featureID) { case 0: return !!this.mixed && this.mixed.size_0 != 0; case 1: return !(!this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , castTo($list(this.mixed, ($clinit_XMLTypePackage$Literals() , ANY_TYPE__ANY)), 160)).isEmpty(); case 2: return !!this.anyAttribute && this.anyAttribute.size_0 != 0; } return $eDynamicIsSet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((this.eFlags & 2) == 0?this.eStaticClass():(!this.eProperties && (this.eProperties = new BasicEObjectImpl$EPropertiesHolderImpl) , this.eProperties).getEClass(), featureID)); } ; _.eSet = function eSet_29(featureID, newValue){ switch (featureID) { case 0: !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)); $set_16(this.mixed, newValue); return; case 1: (!this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , castTo(castTo($list(this.mixed, ($clinit_XMLTypePackage$Literals() , ANY_TYPE__ANY)), 160), 220)).set_1(newValue); return; case 2: !this.anyAttribute && (this.anyAttribute = new BasicFeatureMap(this, 2)); $set_16(this.anyAttribute, newValue); return; } $eDynamicSet(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((this.eFlags & 2) == 0?this.eStaticClass():(!this.eProperties && (this.eProperties = new BasicEObjectImpl$EPropertiesHolderImpl) , this.eProperties).getEClass(), featureID), newValue); } ; _.eStaticClass = function eStaticClass_31(){ return $clinit_XMLTypePackage$Literals() , ANY_TYPE; } ; _.eUnset = function eUnset_29(featureID){ switch (featureID) { case 0: !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)); $clear_13(this.mixed); return; case 1: (!this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , castTo($list(this.mixed, ($clinit_XMLTypePackage$Literals() , ANY_TYPE__ANY)), 160)).clear_0(); return; case 2: !this.anyAttribute && (this.anyAttribute = new BasicFeatureMap(this, 2)); $clear_13(this.anyAttribute); return; } $eDynamicUnset(this, featureID - $getFeatureCount(this.eStaticClass()), $getEStructuralFeature((this.eFlags & 2) == 0?this.eStaticClass():(!this.eProperties && (this.eProperties = new BasicEObjectImpl$EPropertiesHolderImpl) , this.eProperties).getEClass(), featureID)); } ; _.toString_0 = function toString_159(){ var result; if ((this.eFlags & 4) != 0) return $toString_16(this); result = new StringBuffer_1($toString_16(this)); result.string += ' (mixed: '; $append_2(result, this.mixed); result.string += ', anyAttribute: '; $append_2(result, this.anyAttribute); result.string += ')'; return result.string; } ; var Lorg_eclipse_emf_ecore_xml_type_impl_AnyTypeImpl_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'AnyTypeImpl', 844); function $setData_0(this$static, newData){ this$static.data_0 = newData; } function $setTarget_2(this$static, newTarget){ this$static.target = newTarget; } function ProcessingInstructionImpl(){ } defineClass(681, 516, {110:1, 94:1, 93:1, 58:1, 54:1, 99:1, 2119:1, 681:1}, ProcessingInstructionImpl); _.eGet = function eGet_33(featureID, resolve, coreType){ switch (featureID) { case 0: return this.data_0; case 1: return this.target; } return $eDynamicGet(this, featureID - $getFeatureCount(($clinit_XMLTypePackage$Literals() , PROCESSING_INSTRUCTION_0)), $getEStructuralFeature((this.eFlags & 2) == 0?PROCESSING_INSTRUCTION_0:(!this.eProperties && (this.eProperties = new BasicEObjectImpl$EPropertiesHolderImpl) , this.eProperties).getEClass(), featureID), resolve, coreType); } ; _.eIsSet = function eIsSet_32(featureID){ switch (featureID) { case 0: return this.data_0 != null; case 1: return this.target != null; } return $eDynamicIsSet(this, featureID - $getFeatureCount(($clinit_XMLTypePackage$Literals() , PROCESSING_INSTRUCTION_0)), $getEStructuralFeature((this.eFlags & 2) == 0?PROCESSING_INSTRUCTION_0:(!this.eProperties && (this.eProperties = new BasicEObjectImpl$EPropertiesHolderImpl) , this.eProperties).getEClass(), featureID)); } ; _.eSet = function eSet_30(featureID, newValue){ switch (featureID) { case 0: $setData_0(this, castToString(newValue)); return; case 1: $setTarget_2(this, castToString(newValue)); return; } $eDynamicSet(this, featureID - $getFeatureCount(($clinit_XMLTypePackage$Literals() , PROCESSING_INSTRUCTION_0)), $getEStructuralFeature((this.eFlags & 2) == 0?PROCESSING_INSTRUCTION_0:(!this.eProperties && (this.eProperties = new BasicEObjectImpl$EPropertiesHolderImpl) , this.eProperties).getEClass(), featureID), newValue); } ; _.eStaticClass = function eStaticClass_32(){ return $clinit_XMLTypePackage$Literals() , PROCESSING_INSTRUCTION_0; } ; _.eUnset = function eUnset_30(featureID){ switch (featureID) { case 0: this.data_0 = null; return; case 1: this.target = null; return; } $eDynamicUnset(this, featureID - $getFeatureCount(($clinit_XMLTypePackage$Literals() , PROCESSING_INSTRUCTION_0)), $getEStructuralFeature((this.eFlags & 2) == 0?PROCESSING_INSTRUCTION_0:(!this.eProperties && (this.eProperties = new BasicEObjectImpl$EPropertiesHolderImpl) , this.eProperties).getEClass(), featureID)); } ; _.toString_0 = function toString_160(){ var result; if ((this.eFlags & 4) != 0) return $toString_16(this); result = new StringBuffer_1($toString_16(this)); result.string += ' (data: '; $append_3(result, this.data_0); result.string += ', target: '; $append_3(result, this.target); result.string += ')'; return result.string; } ; _.data_0 = null; _.target = null; var Lorg_eclipse_emf_ecore_xml_type_impl_ProcessingInstructionImpl_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'ProcessingInstructionImpl', 681); function $setInstanceType(this$static, newInstanceType){ this$static.instanceType = newInstanceType; } function $setRawValue(this$static, newRawValue){ !this$static.mixed && (this$static.mixed = new BasicFeatureMap(this$static, 0)); $set_18(this$static.mixed, ($clinit_XMLTypePackage$Literals() , SIMPLE_ANY_TYPE__RAW_VALUE), newRawValue); } function SimpleAnyTypeImpl(){ AnyTypeImpl.call(this); } defineClass(682, 844, {110:1, 94:1, 93:1, 58:1, 54:1, 99:1, 857:1, 2120:1, 682:1}, SimpleAnyTypeImpl); _.eGet = function eGet_34(featureID, resolve, coreType){ switch (featureID) { case 0: if (coreType) return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , this.mixed; return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , this.mixed.wrapper; case 1: if (coreType) return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , castTo($list(this.mixed, ($clinit_XMLTypePackage$Literals() , ANY_TYPE__ANY)), 160); return (!this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , castTo(castTo($list(this.mixed, ($clinit_XMLTypePackage$Literals() , ANY_TYPE__ANY)), 160), 220)).getWrapper(); case 2: if (coreType) return !this.anyAttribute && (this.anyAttribute = new BasicFeatureMap(this, 2)) , this.anyAttribute; return !this.anyAttribute && (this.anyAttribute = new BasicFeatureMap(this, 2)) , this.anyAttribute.wrapper; case 3: return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , castToString($get_24(this.mixed, ($clinit_XMLTypePackage$Literals() , SIMPLE_ANY_TYPE__RAW_VALUE), true)); case 4: return createFromString_2(this.instanceType, (!this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , castToString($get_24(this.mixed, ($clinit_XMLTypePackage$Literals() , SIMPLE_ANY_TYPE__RAW_VALUE), true)))); case 5: return this.instanceType; } return $eDynamicGet(this, featureID - $getFeatureCount(($clinit_XMLTypePackage$Literals() , SIMPLE_ANY_TYPE)), $getEStructuralFeature((this.eFlags & 2) == 0?SIMPLE_ANY_TYPE:(!this.eProperties && (this.eProperties = new BasicEObjectImpl$EPropertiesHolderImpl) , this.eProperties).getEClass(), featureID), resolve, coreType); } ; _.eIsSet = function eIsSet_33(featureID){ switch (featureID) { case 0: return !!this.mixed && this.mixed.size_0 != 0; case 1: return !(!this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , castTo($list(this.mixed, ($clinit_XMLTypePackage$Literals() , ANY_TYPE__ANY)), 160)).isEmpty(); case 2: return !!this.anyAttribute && this.anyAttribute.size_0 != 0; case 3: return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , castToString($get_24(this.mixed, ($clinit_XMLTypePackage$Literals() , SIMPLE_ANY_TYPE__RAW_VALUE), true)) != null; case 4: return createFromString_2(this.instanceType, (!this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , castToString($get_24(this.mixed, ($clinit_XMLTypePackage$Literals() , SIMPLE_ANY_TYPE__RAW_VALUE), true)))) != null; case 5: return !!this.instanceType; } return $eDynamicIsSet(this, featureID - $getFeatureCount(($clinit_XMLTypePackage$Literals() , SIMPLE_ANY_TYPE)), $getEStructuralFeature((this.eFlags & 2) == 0?SIMPLE_ANY_TYPE:(!this.eProperties && (this.eProperties = new BasicEObjectImpl$EPropertiesHolderImpl) , this.eProperties).getEClass(), featureID)); } ; _.eSet = function eSet_31(featureID, newValue){ switch (featureID) { case 0: !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)); $set_16(this.mixed, newValue); return; case 1: (!this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , castTo(castTo($list(this.mixed, ($clinit_XMLTypePackage$Literals() , ANY_TYPE__ANY)), 160), 220)).set_1(newValue); return; case 2: !this.anyAttribute && (this.anyAttribute = new BasicFeatureMap(this, 2)); $set_16(this.anyAttribute, newValue); return; case 3: $setRawValue(this, castToString(newValue)); return; case 4: $setRawValue(this, convertToString_2(this.instanceType, newValue)); return; case 5: $setInstanceType(this, castTo(newValue, 156)); return; } $eDynamicSet(this, featureID - $getFeatureCount(($clinit_XMLTypePackage$Literals() , SIMPLE_ANY_TYPE)), $getEStructuralFeature((this.eFlags & 2) == 0?SIMPLE_ANY_TYPE:(!this.eProperties && (this.eProperties = new BasicEObjectImpl$EPropertiesHolderImpl) , this.eProperties).getEClass(), featureID), newValue); } ; _.eStaticClass = function eStaticClass_33(){ return $clinit_XMLTypePackage$Literals() , SIMPLE_ANY_TYPE; } ; _.eUnset = function eUnset_31(featureID){ switch (featureID) { case 0: !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)); $clear_13(this.mixed); return; case 1: (!this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , castTo($list(this.mixed, ($clinit_XMLTypePackage$Literals() , ANY_TYPE__ANY)), 160)).clear_0(); return; case 2: !this.anyAttribute && (this.anyAttribute = new BasicFeatureMap(this, 2)); $clear_13(this.anyAttribute); return; case 3: !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)); $set_18(this.mixed, ($clinit_XMLTypePackage$Literals() , SIMPLE_ANY_TYPE__RAW_VALUE), null); return; case 4: $setRawValue(this, convertToString_2(this.instanceType, null)); return; case 5: this.instanceType = null; return; } $eDynamicUnset(this, featureID - $getFeatureCount(($clinit_XMLTypePackage$Literals() , SIMPLE_ANY_TYPE)), $getEStructuralFeature((this.eFlags & 2) == 0?SIMPLE_ANY_TYPE:(!this.eProperties && (this.eProperties = new BasicEObjectImpl$EPropertiesHolderImpl) , this.eProperties).getEClass(), featureID)); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_SimpleAnyTypeImpl_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'SimpleAnyTypeImpl', 682); function XMLTypeDocumentRootImpl(){ EObjectImpl.call(this); } defineClass(683, 516, {110:1, 94:1, 93:1, 58:1, 54:1, 99:1, 2121:1, 683:1}, XMLTypeDocumentRootImpl); _.eGet = function eGet_35(featureID, resolve, coreType){ switch (featureID) { case 0: if (coreType) return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , this.mixed; return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , this.mixed.wrapper; case 1: return coreType?(!this.xMLNSPrefixMap && (this.xMLNSPrefixMap = new EcoreEMap(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, this, 1)) , this.xMLNSPrefixMap):(!this.xMLNSPrefixMap && (this.xMLNSPrefixMap = new EcoreEMap(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, this, 1)) , $map_0(this.xMLNSPrefixMap)); case 2: return coreType?(!this.xSISchemaLocation && (this.xSISchemaLocation = new EcoreEMap(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, this, 2)) , this.xSISchemaLocation):(!this.xSISchemaLocation && (this.xSISchemaLocation = new EcoreEMap(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, this, 2)) , $map_0(this.xSISchemaLocation)); case 3: return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , $list(this.mixed, ($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT__CDATA)); case 4: return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , $list(this.mixed, ($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT__COMMENT)); case 5: return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , $list(this.mixed, ($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION)); case 6: return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , $list(this.mixed, ($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT__TEXT)); } return $eDynamicGet(this, featureID - $getFeatureCount(($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT)), $getEStructuralFeature((this.eFlags & 2) == 0?XML_TYPE_DOCUMENT_ROOT:(!this.eProperties && (this.eProperties = new BasicEObjectImpl$EPropertiesHolderImpl) , this.eProperties).getEClass(), featureID), resolve, coreType); } ; _.eInverseRemove_0 = function eInverseRemove_24(otherEnd, featureID, msgs){ var feature; switch (featureID) { case 0: return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , $basicRemove_2(this.mixed, otherEnd, msgs); case 1: return !this.xMLNSPrefixMap && (this.xMLNSPrefixMap = new EcoreEMap(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, this, 1)) , $basicRemove_1(this.xMLNSPrefixMap, otherEnd, msgs); case 2: return !this.xSISchemaLocation && (this.xSISchemaLocation = new EcoreEMap(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, this, 2)) , $basicRemove_1(this.xSISchemaLocation, otherEnd, msgs); case 5: return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , $basicRemove_4($list(this.mixed, ($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION)), otherEnd, msgs); } return feature = castTo($getEStructuralFeature((this.eFlags & 2) == 0?($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT):(!this.eProperties && (this.eProperties = new BasicEObjectImpl$EPropertiesHolderImpl) , this.eProperties).getEClass(), featureID), 69) , feature.getSettingDelegate().dynamicInverseRemove(this, $eSettings(this), featureID - $getFeatureCount(($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT)), otherEnd, msgs); } ; _.eIsSet = function eIsSet_34(featureID){ switch (featureID) { case 0: return !!this.mixed && this.mixed.size_0 != 0; case 1: return !!this.xMLNSPrefixMap && this.xMLNSPrefixMap.size_0 != 0; case 2: return !!this.xSISchemaLocation && this.xSISchemaLocation.size_0 != 0; case 3: return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , !$isEmpty_2($list(this.mixed, ($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT__CDATA))); case 4: return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , !$isEmpty_2($list(this.mixed, ($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT__COMMENT))); case 5: return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , !$isEmpty_2($list(this.mixed, ($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION))); case 6: return !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)) , !$isEmpty_2($list(this.mixed, ($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT__TEXT))); } return $eDynamicIsSet(this, featureID - $getFeatureCount(($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT)), $getEStructuralFeature((this.eFlags & 2) == 0?XML_TYPE_DOCUMENT_ROOT:(!this.eProperties && (this.eProperties = new BasicEObjectImpl$EPropertiesHolderImpl) , this.eProperties).getEClass(), featureID)); } ; _.eSet = function eSet_32(featureID, newValue){ switch (featureID) { case 0: !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)); $set_16(this.mixed, newValue); return; case 1: !this.xMLNSPrefixMap && (this.xMLNSPrefixMap = new EcoreEMap(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, this, 1)); $set_13(this.xMLNSPrefixMap, newValue); return; case 2: !this.xSISchemaLocation && (this.xSISchemaLocation = new EcoreEMap(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, this, 2)); $set_13(this.xSISchemaLocation, newValue); return; case 3: !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)); $clear_16($list(this.mixed, ($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT__CDATA))); !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)); $addAll_14($list(this.mixed, XML_TYPE_DOCUMENT_ROOT__CDATA), castTo(newValue, 16)); return; case 4: !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)); $clear_16($list(this.mixed, ($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT__COMMENT))); !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)); $addAll_14($list(this.mixed, XML_TYPE_DOCUMENT_ROOT__COMMENT), castTo(newValue, 16)); return; case 5: !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)); $clear_16($list(this.mixed, ($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION))); !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)); $addAll_14($list(this.mixed, XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION), castTo(newValue, 16)); return; case 6: !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)); $clear_16($list(this.mixed, ($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT__TEXT))); !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)); $addAll_14($list(this.mixed, XML_TYPE_DOCUMENT_ROOT__TEXT), castTo(newValue, 16)); return; } $eDynamicSet(this, featureID - $getFeatureCount(($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT)), $getEStructuralFeature((this.eFlags & 2) == 0?XML_TYPE_DOCUMENT_ROOT:(!this.eProperties && (this.eProperties = new BasicEObjectImpl$EPropertiesHolderImpl) , this.eProperties).getEClass(), featureID), newValue); } ; _.eStaticClass = function eStaticClass_34(){ return $clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT; } ; _.eUnset = function eUnset_32(featureID){ switch (featureID) { case 0: !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)); $clear_13(this.mixed); return; case 1: !this.xMLNSPrefixMap && (this.xMLNSPrefixMap = new EcoreEMap(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, this, 1)); this.xMLNSPrefixMap.delegateEList.clear_0(); return; case 2: !this.xSISchemaLocation && (this.xSISchemaLocation = new EcoreEMap(($clinit_EcorePackage$Literals() , ESTRING_TO_STRING_MAP_ENTRY), Lorg_eclipse_emf_ecore_impl_EStringToStringMapEntryImpl_2_classLit, this, 2)); this.xSISchemaLocation.delegateEList.clear_0(); return; case 3: !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)); $clear_16($list(this.mixed, ($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT__CDATA))); return; case 4: !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)); $clear_16($list(this.mixed, ($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT__COMMENT))); return; case 5: !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)); $clear_16($list(this.mixed, ($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION))); return; case 6: !this.mixed && (this.mixed = new BasicFeatureMap(this, 0)); $clear_16($list(this.mixed, ($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT__TEXT))); return; } $eDynamicUnset(this, featureID - $getFeatureCount(($clinit_XMLTypePackage$Literals() , XML_TYPE_DOCUMENT_ROOT)), $getEStructuralFeature((this.eFlags & 2) == 0?XML_TYPE_DOCUMENT_ROOT:(!this.eProperties && (this.eProperties = new BasicEObjectImpl$EPropertiesHolderImpl) , this.eProperties).getEClass(), featureID)); } ; _.toString_0 = function toString_161(){ var result; if ((this.eFlags & 4) != 0) return $toString_16(this); result = new StringBuffer_1($toString_16(this)); result.string += ' (mixed: '; $append_2(result, this.mixed); result.string += ')'; return result.string; } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypeDocumentRootImpl_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypeDocumentRootImpl', 683); function $clinit_XMLTypeFactoryImpl(){ $clinit_XMLTypeFactoryImpl = emptyMethod; $clinit_EFactoryImpl(); DOUBLE_POSITIVE_INFINITY = $intern_60; DOUBLE_NEGATIVE_INFINITY = $intern_61; FLOAT_POSITIVE_INFINITY = new Float($intern_60); FLOAT_NEGATIVE_INFINITY = new Float($intern_61); } function $booleanValueOf_0(initialValue){ initialValue = normalize(initialValue, true); if ($equals_5('true', initialValue) || $equals_5('1', initialValue)) { return $clinit_Boolean() , TRUE_0; } else if ($equals_5('false', initialValue) || $equals_5('0', initialValue)) { return $clinit_Boolean() , FALSE_0; } throw toJs(new InvalidDatatypeValueException("Invalid boolean value: '" + initialValue + "'")); } function $convertBase64Binary(instanceValue){ return instanceValue == null?null:encode(instanceValue); } function $convertDouble(instanceValue){ return instanceValue == $intern_60?'INF':instanceValue == $intern_61?'-INF':'' + instanceValue; } function $convertENTITIESBaseToString(instanceValue){ var i, list, result; if (instanceValue == null) return null; list = castTo(instanceValue, 15); if (list.isEmpty()) return ''; result = new StringBuffer; for (i = list.iterator_0(); i.hasNext_0();) { $append_3(result, ($clinit_XMLTypePackage$Literals() , castToString(i.next_1()))); result.string += ' '; } return $substring(result, result.string.length - 1); } function $convertFloat(instanceValue){ return instanceValue == $intern_60?'INF':instanceValue == $intern_61?'-INF':'' + instanceValue; } function $convertHexBinary(instanceValue){ return instanceValue == null?null:encode_0(instanceValue); } function $convertIDREFSBase(instanceValue){ var item_0, item$iterator, result; if (!instanceValue) return null; if (instanceValue.isEmpty()) return ''; result = new StringBuffer; for (item$iterator = instanceValue.iterator_0(); item$iterator.hasNext_0();) { item_0 = item$iterator.next_1(); $append_3(result, castToString(item_0)); result.string += ' '; } return $substring(result, result.string.length - 1); } function $convertNMTOKENSBaseToString(instanceValue){ var i, list, result; if (instanceValue == null) return null; list = castTo(instanceValue, 15); if (list.isEmpty()) return ''; result = new StringBuffer; for (i = list.iterator_0(); i.hasNext_0();) { $append_3(result, ($clinit_XMLTypePackage$Literals() , castToString(i.next_1()))); result.string += ' '; } return $substring(result, result.string.length - 1); } function $convertNonNegativeIntegerToString(instanceValue){ return instanceValue == null?null:toString_40(instanceValue); } function $convertNonPositiveIntegerToString(instanceValue){ return instanceValue == null?null:toString_40(instanceValue); } function $createBase64Binary(literal){ var value_0; if (literal == null) return null; value_0 = decode_0(normalize(literal, true)); if (value_0 == null) { throw toJs(new InvalidDatatypeValueException("Invalid base64Binary value: '" + literal + "'")); } return value_0; } function $createDoubleObject(literal){ var ch_0, length_0, normalizedLiteral, suffixlength; if (literal == null) { return null; } else { normalizedLiteral = normalize(literal, true); suffixlength = 'INF'.length; if ($equals_5(normalizedLiteral.substr(normalizedLiteral.length - suffixlength, suffixlength), 'INF')) { length_0 = normalizedLiteral.length; if (length_0 == 4) { ch_0 = (checkCriticalStringElementIndex(0, normalizedLiteral.length) , normalizedLiteral.charCodeAt(0)); if (ch_0 == 43) { return DOUBLE_POSITIVE_INFINITY; } else if (ch_0 == 45) { return DOUBLE_NEGATIVE_INFINITY; } } else if (length_0 == 3) { return DOUBLE_POSITIVE_INFINITY; } } return __parseAndValidateDouble(normalizedLiteral); } } function $createENTITIESBase(literal){ var item_0, item$array, item$index, item$max, result; if (literal == null) return null; result = new ArrayList; for (item$array = $split_5(literal) , item$index = 0 , item$max = item$array.length; item$index < item$max; ++item$index) { item_0 = item$array[item$index]; $add_3(result, normalize(item_0, true)); } return result; } function $createFloatObject(literal){ var ch_0, length_0, normalizedLiteral, suffixlength; if (literal == null) { return null; } else { normalizedLiteral = normalize(literal, true); suffixlength = 'INF'.length; if ($equals_5(normalizedLiteral.substr(normalizedLiteral.length - suffixlength, suffixlength), 'INF')) { length_0 = normalizedLiteral.length; if (length_0 == 4) { ch_0 = (checkCriticalStringElementIndex(0, normalizedLiteral.length) , normalizedLiteral.charCodeAt(0)); if (ch_0 == 43) { return FLOAT_POSITIVE_INFINITY; } else if (ch_0 == 45) { return FLOAT_NEGATIVE_INFINITY; } } else if (length_0 == 3) { return FLOAT_POSITIVE_INFINITY; } } return new Float_0(normalizedLiteral); } } function $createHexBinary(literal){ var value_0; if (literal == null) return null; value_0 = decode_1(normalize(literal, true)); if (value_0 == null) { throw toJs(new InvalidDatatypeValueException("Invalid hexBinary value: '" + literal + "'")); } return value_0; } function $createIDREFSBase(literal){ var item_0, item$array, item$index, item$max, result; if (literal == null) return null; result = new ArrayList; for (item$array = $split_5(literal) , item$index = 0 , item$max = item$array.length; item$index < item$max; ++item$index) { item_0 = item$array[item$index]; $add_3(result, normalize(item_0, true)); } return result; } function $createNMTOKENSBase(literal){ var item_0, item$array, item$index, item$max, result; if (literal == null) return null; result = new ArrayList; for (item$array = $split_5(literal) , item$index = 0 , item$max = item$array.length; item$index < item$max; ++item$index) { item_0 = item$array[item$index]; $add_3(result, normalize(item_0, true)); } return result; } function $createNonNegativeIntegerFromString(initialValue){ var result; return initialValue == null?null:new BigInteger_3((result = normalize(initialValue, true) , result.length > 0 && (checkCriticalStringElementIndex(0, result.length) , result.charCodeAt(0) == 43)?(checkCriticalStringElementIndex(1, result.length + 1) , result.substr(1)):result)); } function $createNonPositiveIntegerFromString(initialValue){ var result; return initialValue == null?null:new BigInteger_3((result = normalize(initialValue, true) , result.length > 0 && (checkCriticalStringElementIndex(0, result.length) , result.charCodeAt(0) == 43)?(checkCriticalStringElementIndex(1, result.length + 1) , result.substr(1)):result)); } function XMLTypeFactoryImpl(){ } function init_5(){ $clinit_XMLTypeFactoryImpl(); var exception, theXMLTypeFactory; try { theXMLTypeFactory = castTo($getEFactory(($clinit_EPackage$Registry() , INSTANCE_6), 'http://www.eclipse.org/emf/2003/XMLType'), 2122); if (theXMLTypeFactory) { return theXMLTypeFactory; } } catch ($e0) { $e0 = toJava($e0); if (instanceOf($e0, 103)) { exception = $e0; $log_2(($clinit_EcorePlugin() , exception)); } else throw toJs($e0); } return new XMLTypeFactoryImpl; } defineClass(2028, 720, {110:1, 94:1, 93:1, 480:1, 155:1, 58:1, 114:1, 54:1, 99:1, 158:1, 119:1, 120:1, 2122:1}, XMLTypeFactoryImpl); _.convertToString = function convertToString_3(eDataType, instanceValue){ switch (eDataType.getClassifierID()) { case 7: case 8: case 9: case 10: case 16: case 22: case 23: case 24: case 25: case 26: case 32: case 33: case 34: case 36: case 37: case 44: case 45: case 50: case 51: case 53: case 55: case 56: case 57: case 58: case 60: case 61: case 4: return instanceValue == null?null:toString_40(instanceValue); case 19: case 28: case 29: case 35: case 38: case 39: case 41: case 46: case 52: case 54: case 5: return castToString(instanceValue); case 6: return $convertBase64Binary(castTo(instanceValue, 195)); case 12: case 47: case 49: case 11: return $convertToString(this, eDataType, instanceValue); case 13: return instanceValue == null?null:$toPlainString(castTo(instanceValue, 247)); case 15: case 14: return instanceValue == null?null:$convertDouble($doubleValue(castToDouble(instanceValue))); case 17: return $convertENTITIESBaseToString(($clinit_XMLTypePackage$Literals() , instanceValue)); case 18: return $convertENTITIESBaseToString(instanceValue); case 21: case 20: return instanceValue == null?null:$convertFloat(castTo(instanceValue, 161).value_0); case 27: return $convertHexBinary(castTo(instanceValue, 195)); case 30: return $convertIDREFSBase(($clinit_XMLTypePackage$Literals() , castTo(instanceValue, 15))); case 31: return $convertIDREFSBase(castTo(instanceValue, 15)); case 40: return $convertNonPositiveIntegerToString(($clinit_XMLTypePackage$Literals() , instanceValue)); case 42: return $convertNMTOKENSBaseToString(($clinit_XMLTypePackage$Literals() , instanceValue)); case 43: return $convertNMTOKENSBaseToString(instanceValue); case 59: case 48: return $convertNonNegativeIntegerToString(($clinit_XMLTypePackage$Literals() , instanceValue)); default:throw toJs(new IllegalArgumentException_0("The datatype '" + eDataType.getName() + "' is not a valid classifier")); } } ; _.create_3 = function create_50(eClass){ var anyType, ePackage, processingInstruction, simpleAnyType, xmlTypeDocumentRoot; switch (eClass.metaObjectID == -1 && (eClass.metaObjectID = (ePackage = $getEPackage(eClass) , ePackage?$indexOf_6(ePackage.getEClassifiers(), eClass):-1)) , eClass.metaObjectID) { case 0: return anyType = new AnyTypeImpl , anyType; case 1: return processingInstruction = new ProcessingInstructionImpl , processingInstruction; case 2: return simpleAnyType = new SimpleAnyTypeImpl , simpleAnyType; case 3: return xmlTypeDocumentRoot = new XMLTypeDocumentRootImpl , xmlTypeDocumentRoot; default:throw toJs(new IllegalArgumentException_0("The class '" + eClass.name_0 + "' is not a valid classifier")); } } ; _.createFromString = function createFromString_3(eDataType, initialValue){ var result, result0, result1, result10, result11, result12, result13, result14, result2, result3, result4, result5, result6, result7, result8, result9; switch (eDataType.getClassifierID()) { case 5: case 52: case 4: return initialValue; case 6: return $createBase64Binary(initialValue); case 8: case 7: return initialValue == null?null:$booleanValueOf_0(initialValue); case 9: return initialValue == null?null:get_32(__parseAndValidateInt((result0 = normalize(initialValue, true) , result0.length > 0 && (checkCriticalStringElementIndex(0, result0.length) , result0.charCodeAt(0) == 43)?(checkCriticalStringElementIndex(1, result0.length + 1) , result0.substr(1)):result0), -128, 127) << 24 >> 24); case 10: return initialValue == null?null:get_32(__parseAndValidateInt((result1 = normalize(initialValue, true) , result1.length > 0 && (checkCriticalStringElementIndex(0, result1.length) , result1.charCodeAt(0) == 43)?(checkCriticalStringElementIndex(1, result1.length + 1) , result1.substr(1)):result1), -128, 127) << 24 >> 24); case 11: return castToString($createFromString(this, ($clinit_XMLTypePackage$Literals() , DATE), initialValue)); case 12: return castToString($createFromString(this, ($clinit_XMLTypePackage$Literals() , DATE_TIME), initialValue)); case 13: return initialValue == null?null:new BigDecimal_0(normalize(initialValue, true)); case 15: case 14: return $createDoubleObject(initialValue); case 16: return castToString($createFromString(this, ($clinit_XMLTypePackage$Literals() , DURATION), initialValue)); case 17: return $createENTITIESBase(($clinit_XMLTypePackage$Literals() , initialValue)); case 18: return $createENTITIESBase(initialValue); case 28: case 29: case 35: case 38: case 39: case 41: case 54: case 19: return normalize(initialValue, true); case 21: case 20: return $createFloatObject(initialValue); case 22: return castToString($createFromString(this, ($clinit_XMLTypePackage$Literals() , GDAY), initialValue)); case 23: return castToString($createFromString(this, ($clinit_XMLTypePackage$Literals() , GMONTH), initialValue)); case 24: return castToString($createFromString(this, ($clinit_XMLTypePackage$Literals() , GMONTH_DAY), initialValue)); case 25: return castToString($createFromString(this, ($clinit_XMLTypePackage$Literals() , GYEAR), initialValue)); case 26: return castToString($createFromString(this, ($clinit_XMLTypePackage$Literals() , GYEAR_MONTH), initialValue)); case 27: return $createHexBinary(initialValue); case 30: return $createIDREFSBase(($clinit_XMLTypePackage$Literals() , initialValue)); case 31: return $createIDREFSBase(initialValue); case 32: return initialValue == null?null:valueOf_3(__parseAndValidateInt((result2 = normalize(initialValue, true) , result2.length > 0 && (checkCriticalStringElementIndex(0, result2.length) , result2.charCodeAt(0) == 43)?(checkCriticalStringElementIndex(1, result2.length + 1) , result2.substr(1)):result2), $intern_43, $intern_0)); case 33: return initialValue == null?null:new BigInteger_3((result3 = normalize(initialValue, true) , result3.length > 0 && (checkCriticalStringElementIndex(0, result3.length) , result3.charCodeAt(0) == 43)?(checkCriticalStringElementIndex(1, result3.length + 1) , result3.substr(1)):result3)); case 34: return initialValue == null?null:valueOf_3(__parseAndValidateInt((result4 = normalize(initialValue, true) , result4.length > 0 && (checkCriticalStringElementIndex(0, result4.length) , result4.charCodeAt(0) == 43)?(checkCriticalStringElementIndex(1, result4.length + 1) , result4.substr(1)):result4), $intern_43, $intern_0)); case 36: return initialValue == null?null:valueOf_4(__parseAndValidateLong((result5 = normalize(initialValue, true) , result5.length > 0 && (checkCriticalStringElementIndex(0, result5.length) , result5.charCodeAt(0) == 43)?(checkCriticalStringElementIndex(1, result5.length + 1) , result5.substr(1)):result5))); case 37: return initialValue == null?null:valueOf_4(__parseAndValidateLong((result6 = normalize(initialValue, true) , result6.length > 0 && (checkCriticalStringElementIndex(0, result6.length) , result6.charCodeAt(0) == 43)?(checkCriticalStringElementIndex(1, result6.length + 1) , result6.substr(1)):result6))); case 40: return $createNonPositiveIntegerFromString(($clinit_XMLTypePackage$Literals() , initialValue)); case 42: return $createNMTOKENSBase(($clinit_XMLTypePackage$Literals() , initialValue)); case 43: return $createNMTOKENSBase(initialValue); case 44: return initialValue == null?null:new BigInteger_3((result7 = normalize(initialValue, true) , result7.length > 0 && (checkCriticalStringElementIndex(0, result7.length) , result7.charCodeAt(0) == 43)?(checkCriticalStringElementIndex(1, result7.length + 1) , result7.substr(1)):result7)); case 45: return initialValue == null?null:new BigInteger_3((result8 = normalize(initialValue, true) , result8.length > 0 && (checkCriticalStringElementIndex(0, result8.length) , result8.charCodeAt(0) == 43)?(checkCriticalStringElementIndex(1, result8.length + 1) , result8.substr(1)):result8)); case 46: return normalize(initialValue, false); case 47: return castToString($createFromString(this, ($clinit_XMLTypePackage$Literals() , NOTATION), initialValue)); case 59: case 48: return $createNonNegativeIntegerFromString(($clinit_XMLTypePackage$Literals() , initialValue)); case 49: return castToString($createFromString(this, ($clinit_XMLTypePackage$Literals() , QNAME), initialValue)); case 50: return initialValue == null?null:valueOf_5(__parseAndValidateInt((result9 = normalize(initialValue, true) , result9.length > 0 && (checkCriticalStringElementIndex(0, result9.length) , result9.charCodeAt(0) == 43)?(checkCriticalStringElementIndex(1, result9.length + 1) , result9.substr(1)):result9), $intern_164, 32767) << 16 >> 16); case 51: return initialValue == null?null:valueOf_5(__parseAndValidateInt((result10 = normalize(initialValue, true) , result10.length > 0 && (checkCriticalStringElementIndex(0, result10.length) , result10.charCodeAt(0) == 43)?(checkCriticalStringElementIndex(1, result10.length + 1) , result10.substr(1)):result10), $intern_164, 32767) << 16 >> 16); case 53: return castToString($createFromString(this, ($clinit_XMLTypePackage$Literals() , TIME), initialValue)); case 55: return initialValue == null?null:valueOf_5(__parseAndValidateInt((result11 = normalize(initialValue, true) , result11.length > 0 && (checkCriticalStringElementIndex(0, result11.length) , result11.charCodeAt(0) == 43)?(checkCriticalStringElementIndex(1, result11.length + 1) , result11.substr(1)):result11), $intern_164, 32767) << 16 >> 16); case 56: return initialValue == null?null:valueOf_5(__parseAndValidateInt((result12 = normalize(initialValue, true) , result12.length > 0 && (checkCriticalStringElementIndex(0, result12.length) , result12.charCodeAt(0) == 43)?(checkCriticalStringElementIndex(1, result12.length + 1) , result12.substr(1)):result12), $intern_164, 32767) << 16 >> 16); case 57: return initialValue == null?null:valueOf_4(__parseAndValidateLong((result13 = normalize(initialValue, true) , result13.length > 0 && (checkCriticalStringElementIndex(0, result13.length) , result13.charCodeAt(0) == 43)?(checkCriticalStringElementIndex(1, result13.length + 1) , result13.substr(1)):result13))); case 58: return initialValue == null?null:valueOf_4(__parseAndValidateLong((result14 = normalize(initialValue, true) , result14.length > 0 && (checkCriticalStringElementIndex(0, result14.length) , result14.charCodeAt(0) == 43)?(checkCriticalStringElementIndex(1, result14.length + 1) , result14.substr(1)):result14))); case 60: return initialValue == null?null:valueOf_3(__parseAndValidateInt((result = normalize(initialValue, true) , result.length > 0 && (checkCriticalStringElementIndex(0, result.length) , result.charCodeAt(0) == 43)?(checkCriticalStringElementIndex(1, result.length + 1) , result.substr(1)):result), $intern_43, $intern_0)); case 61: return initialValue == null?null:valueOf_3(__parseAndValidateInt(normalize(initialValue, true), $intern_43, $intern_0)); default:throw toJs(new IllegalArgumentException_0("The datatype '" + eDataType.getName() + "' is not a valid classifier")); } } ; var DOUBLE_NEGATIVE_INFINITY, DOUBLE_POSITIVE_INFINITY, FLOAT_NEGATIVE_INFINITY, FLOAT_POSITIVE_INFINITY; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypeFactoryImpl_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypeFactoryImpl', 2028); function $$init_13(this$static){ this$static.anyTypeEClass = null; this$static.processingInstructionEClass = null; this$static.simpleAnyTypeEClass = null; this$static.xmlTypeDocumentRootEClass = null; this$static.anySimpleTypeEDataType = null; this$static.anyURIEDataType = null; this$static.base64BinaryEDataType = null; this$static.booleanEDataType = null; this$static.booleanObjectEDataType = null; this$static.decimalEDataType = null; this$static.integerEDataType = null; this$static.intObjectEDataType = null; this$static.longEDataType = null; this$static.longObjectEDataType = null; this$static.intEDataType = null; this$static.shortEDataType = null; this$static.shortObjectEDataType = null; this$static.byteEDataType = null; this$static.byteObjectEDataType = null; this$static.dateEDataType = null; this$static.dateTimeEDataType = null; this$static.stringEDataType = null; this$static.doubleEDataType = null; this$static.doubleObjectEDataType = null; this$static.durationEDataType = null; this$static.entitiesBaseEDataType = null; this$static.normalizedStringEDataType = null; this$static.tokenEDataType = null; this$static.nameEDataType = null; this$static.ncNameEDataType = null; this$static.entityEDataType = null; this$static.entitiesEDataType = null; this$static.floatEDataType = null; this$static.floatObjectEDataType = null; this$static.gDayEDataType = null; this$static.gMonthEDataType = null; this$static.gMonthDayEDataType = null; this$static.gYearEDataType = null; this$static.gYearMonthEDataType = null; this$static.hexBinaryEDataType = null; this$static.idEDataType = null; this$static.idrefEDataType = null; this$static.idrefsBaseEDataType = null; this$static.idrefsEDataType = null; this$static.languageEDataType = null; this$static.nonPositiveIntegerEDataType = null; this$static.negativeIntegerEDataType = null; this$static.nmtokenEDataType = null; this$static.nmtokensBaseEDataType = null; this$static.nmtokensEDataType = null; this$static.nonNegativeIntegerEDataType = null; this$static.notationEDataType = null; this$static.positiveIntegerEDataType = null; this$static.qNameEDataType = null; this$static.timeEDataType = null; this$static.unsignedLongEDataType = null; this$static.unsignedIntEDataType = null; this$static.unsignedIntObjectEDataType = null; this$static.unsignedShortEDataType = null; this$static.unsignedShortObjectEDataType = null; this$static.unsignedByteEDataType = null; this$static.unsignedByteObjectEDataType = null; this$static.isCreated = false; this$static.isInitialized = false; } function $createExtendedMetaDataAnnotations_0(this$static){ $addAnnotation(this$static.anySimpleTypeEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'anySimpleType'])); $addAnnotation(this$static.anyTypeEClass, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'anyType', 'kind', 'mixed'])); $addAnnotation(castTo($get_20($getEStructuralFeatures(this$static.anyTypeEClass), 0), 35), 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['kind', 'elementWildcard', 'name', ':mixed'])); $addAnnotation(castTo($get_20($getEStructuralFeatures(this$static.anyTypeEClass), 1), 35), 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['kind', 'elementWildcard', 'wildcards', '##any', 'name', ':1', 'processing', 'lax'])); $addAnnotation(castTo($get_20($getEStructuralFeatures(this$static.anyTypeEClass), 2), 35), 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['kind', 'attributeWildcard', 'wildcards', '##any', 'name', ':2', 'processing', 'lax'])); $addAnnotation(this$static.anyURIEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'anyURI', 'whiteSpace', 'collapse'])); $addAnnotation(this$static.base64BinaryEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'base64Binary', 'whiteSpace', 'collapse'])); $addAnnotation(this$static.booleanEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'boolean', 'whiteSpace', 'collapse'])); $addAnnotation(this$static.booleanObjectEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'boolean:Object', 'baseType', 'boolean'])); $addAnnotation(this$static.byteEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'byte'])); $addAnnotation(this$static.byteObjectEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'byte:Object', 'baseType', 'byte'])); $addAnnotation(this$static.dateEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'date', 'whiteSpace', 'collapse'])); $addAnnotation(this$static.dateTimeEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'dateTime', 'whiteSpace', 'collapse'])); $addAnnotation(this$static.decimalEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'decimal', 'whiteSpace', 'collapse'])); $addAnnotation(this$static.doubleEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'double', 'whiteSpace', 'collapse'])); $addAnnotation(this$static.doubleObjectEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'double:Object', 'baseType', 'double'])); $addAnnotation(this$static.durationEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'duration', 'whiteSpace', 'collapse'])); $addAnnotation(this$static.entitiesEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'ENTITIES', 'baseType', 'ENTITIES_._base', 'minLength', '1'])); $addAnnotation(this$static.entitiesBaseEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'ENTITIES_._base', 'itemType', 'ENTITY'])); $addAnnotation(this$static.entityEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'ENTITY', 'baseType', 'NCName'])); $addAnnotation(this$static.floatEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'float', 'whiteSpace', 'collapse'])); $addAnnotation(this$static.floatObjectEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'float:Object', 'baseType', 'float'])); $addAnnotation(this$static.gDayEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'gDay', 'whiteSpace', 'collapse'])); $addAnnotation(this$static.gMonthEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'gMonth', 'whiteSpace', 'collapse'])); $addAnnotation(this$static.gMonthDayEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'gMonthDay', 'whiteSpace', 'collapse'])); $addAnnotation(this$static.gYearEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'gYear', 'whiteSpace', 'collapse'])); $addAnnotation(this$static.gYearMonthEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'gYearMonth', 'whiteSpace', 'collapse'])); $addAnnotation(this$static.hexBinaryEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'hexBinary', 'whiteSpace', 'collapse'])); $addAnnotation(this$static.idEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'ID', 'baseType', 'NCName'])); $addAnnotation(this$static.idrefEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'IDREF', 'baseType', 'NCName'])); $addAnnotation(this$static.idrefsEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'IDREFS', 'baseType', 'IDREFS_._base', 'minLength', '1'])); $addAnnotation(this$static.idrefsBaseEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'IDREFS_._base', 'itemType', 'IDREF'])); $addAnnotation(this$static.intEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'int'])); $addAnnotation(this$static.integerEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'integer'])); $addAnnotation(this$static.intObjectEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'int:Object', 'baseType', 'int'])); $addAnnotation(this$static.languageEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'language', 'baseType', 'token', 'pattern', '[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*'])); $addAnnotation(this$static.longEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'long'])); $addAnnotation(this$static.longObjectEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'long:Object', 'baseType', 'long'])); $addAnnotation(this$static.nameEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'Name', 'baseType', 'token', 'pattern', '\\i\\c*'])); $addAnnotation(this$static.ncNameEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'NCName', 'baseType', 'Name', 'pattern', '[\\i-[:]][\\c-[:]]*'])); $addAnnotation(this$static.negativeIntegerEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'negativeInteger', 'baseType', 'nonPositiveInteger', 'maxInclusive', '-1'])); $addAnnotation(this$static.nmtokenEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'NMTOKEN', 'baseType', 'token', 'pattern', '\\c+'])); $addAnnotation(this$static.nmtokensEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'NMTOKENS', 'baseType', 'NMTOKENS_._base', 'minLength', '1'])); $addAnnotation(this$static.nmtokensBaseEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'NMTOKENS_._base', 'itemType', 'NMTOKEN'])); $addAnnotation(this$static.nonNegativeIntegerEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'nonNegativeInteger', 'baseType', 'integer', 'minInclusive', '0'])); $addAnnotation(this$static.nonPositiveIntegerEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'nonPositiveInteger', 'baseType', 'integer', 'maxInclusive', '0'])); $addAnnotation(this$static.normalizedStringEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'normalizedString', 'baseType', 'string', 'whiteSpace', 'replace'])); $addAnnotation(this$static.notationEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'NOTATION', 'whiteSpace', 'collapse'])); $addAnnotation(this$static.positiveIntegerEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'positiveInteger', 'baseType', 'nonNegativeInteger', 'minInclusive', '1'])); $addAnnotation(this$static.processingInstructionEClass, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'processingInstruction_._type', 'kind', 'empty'])); $addAnnotation(castTo($get_20($getEStructuralFeatures(this$static.processingInstructionEClass), 0), 35), 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['kind', 'attribute', 'name', 'data'])); $addAnnotation(castTo($get_20($getEStructuralFeatures(this$static.processingInstructionEClass), 1), 35), 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['kind', 'attribute', 'name', 'target'])); $addAnnotation(this$static.qNameEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'QName', 'whiteSpace', 'collapse'])); $addAnnotation(this$static.shortEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'short'])); $addAnnotation(this$static.shortObjectEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'short:Object', 'baseType', 'short'])); $addAnnotation(this$static.simpleAnyTypeEClass, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'simpleAnyType', 'kind', 'simple'])); $addAnnotation(castTo($get_20($getEStructuralFeatures(this$static.simpleAnyTypeEClass), 0), 35), 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', ':3', 'kind', 'simple'])); $addAnnotation(castTo($get_20($getEStructuralFeatures(this$static.simpleAnyTypeEClass), 1), 35), 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', ':4', 'kind', 'simple'])); $addAnnotation(castTo($get_20($getEStructuralFeatures(this$static.simpleAnyTypeEClass), 2), 19), 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', ':5', 'kind', 'simple'])); $addAnnotation(this$static.stringEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'string', 'whiteSpace', 'preserve'])); $addAnnotation(this$static.timeEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'time', 'whiteSpace', 'collapse'])); $addAnnotation(this$static.tokenEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'token', 'baseType', 'normalizedString', 'whiteSpace', 'collapse'])); $addAnnotation(this$static.unsignedByteEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'unsignedByte', 'maxInclusive', '255', 'minInclusive', '0'])); $addAnnotation(this$static.unsignedByteObjectEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'unsignedByte:Object', 'baseType', 'unsignedByte'])); $addAnnotation(this$static.unsignedIntEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'unsignedInt', 'maxInclusive', '4294967295', 'minInclusive', '0'])); $addAnnotation(this$static.unsignedIntObjectEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'unsignedInt:Object', 'baseType', 'unsignedInt'])); $addAnnotation(this$static.unsignedLongEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'unsignedLong', 'baseType', 'nonNegativeInteger', 'maxInclusive', '18446744073709551615', 'minInclusive', '0'])); $addAnnotation(this$static.unsignedShortEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'unsignedShort', 'maxInclusive', '65535', 'minInclusive', '0'])); $addAnnotation(this$static.unsignedShortObjectEDataType, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', 'unsignedShort:Object', 'baseType', 'unsignedShort'])); $addAnnotation(this$static.xmlTypeDocumentRootEClass, 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['name', '', 'kind', 'mixed'])); $addAnnotation(castTo($get_20($getEStructuralFeatures(this$static.xmlTypeDocumentRootEClass), 0), 35), 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['kind', 'elementWildcard', 'name', ':mixed'])); $addAnnotation(castTo($get_20($getEStructuralFeatures(this$static.xmlTypeDocumentRootEClass), 1), 19), 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['kind', 'attribute', 'name', 'xmlns:prefix'])); $addAnnotation(castTo($get_20($getEStructuralFeatures(this$static.xmlTypeDocumentRootEClass), 2), 19), 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['kind', 'attribute', 'name', 'xsi:schemaLocation'])); $addAnnotation(castTo($get_20($getEStructuralFeatures(this$static.xmlTypeDocumentRootEClass), 3), 35), 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['kind', 'element', 'name', 'cDATA', 'namespace', '##targetNamespace'])); $addAnnotation(castTo($get_20($getEStructuralFeatures(this$static.xmlTypeDocumentRootEClass), 4), 35), 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['kind', 'element', 'name', 'comment', 'namespace', '##targetNamespace'])); $addAnnotation(castTo($get_20($getEStructuralFeatures(this$static.xmlTypeDocumentRootEClass), 5), 19), 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['kind', 'element', 'name', 'processingInstruction', 'namespace', '##targetNamespace'])); $addAnnotation(castTo($get_20($getEStructuralFeatures(this$static.xmlTypeDocumentRootEClass), 6), 35), 'http:///org/eclipse/emf/ecore/util/ExtendedMetaData', stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['kind', 'element', 'name', 'text', 'namespace', '##targetNamespace'])); } function $createPackageContents_1(this$static){ if (this$static.isCreated) return; this$static.isCreated = true; this$static.anyTypeEClass = $createEClass(this$static, 0); $createEAttribute(this$static.anyTypeEClass, 0); $createEAttribute(this$static.anyTypeEClass, 1); $createEAttribute(this$static.anyTypeEClass, 2); this$static.processingInstructionEClass = $createEClass(this$static, 1); $createEAttribute(this$static.processingInstructionEClass, 0); $createEAttribute(this$static.processingInstructionEClass, 1); this$static.simpleAnyTypeEClass = $createEClass(this$static, 2); $createEAttribute(this$static.simpleAnyTypeEClass, 3); $createEAttribute(this$static.simpleAnyTypeEClass, 4); $createEReference(this$static.simpleAnyTypeEClass, 5); this$static.xmlTypeDocumentRootEClass = $createEClass(this$static, 3); $createEAttribute(this$static.xmlTypeDocumentRootEClass, 0); $createEReference(this$static.xmlTypeDocumentRootEClass, 1); $createEReference(this$static.xmlTypeDocumentRootEClass, 2); $createEAttribute(this$static.xmlTypeDocumentRootEClass, 3); $createEAttribute(this$static.xmlTypeDocumentRootEClass, 4); $createEReference(this$static.xmlTypeDocumentRootEClass, 5); $createEAttribute(this$static.xmlTypeDocumentRootEClass, 6); this$static.anySimpleTypeEDataType = $createEDataType(this$static, 4); this$static.anyURIEDataType = $createEDataType(this$static, 5); this$static.base64BinaryEDataType = $createEDataType(this$static, 6); this$static.booleanEDataType = $createEDataType(this$static, 7); this$static.booleanObjectEDataType = $createEDataType(this$static, 8); this$static.byteEDataType = $createEDataType(this$static, 9); this$static.byteObjectEDataType = $createEDataType(this$static, 10); this$static.dateEDataType = $createEDataType(this$static, 11); this$static.dateTimeEDataType = $createEDataType(this$static, 12); this$static.decimalEDataType = $createEDataType(this$static, 13); this$static.doubleEDataType = $createEDataType(this$static, 14); this$static.doubleObjectEDataType = $createEDataType(this$static, 15); this$static.durationEDataType = $createEDataType(this$static, 16); this$static.entitiesEDataType = $createEDataType(this$static, 17); this$static.entitiesBaseEDataType = $createEDataType(this$static, 18); this$static.entityEDataType = $createEDataType(this$static, 19); this$static.floatEDataType = $createEDataType(this$static, 20); this$static.floatObjectEDataType = $createEDataType(this$static, 21); this$static.gDayEDataType = $createEDataType(this$static, 22); this$static.gMonthEDataType = $createEDataType(this$static, 23); this$static.gMonthDayEDataType = $createEDataType(this$static, 24); this$static.gYearEDataType = $createEDataType(this$static, 25); this$static.gYearMonthEDataType = $createEDataType(this$static, 26); this$static.hexBinaryEDataType = $createEDataType(this$static, 27); this$static.idEDataType = $createEDataType(this$static, 28); this$static.idrefEDataType = $createEDataType(this$static, 29); this$static.idrefsEDataType = $createEDataType(this$static, 30); this$static.idrefsBaseEDataType = $createEDataType(this$static, 31); this$static.intEDataType = $createEDataType(this$static, 32); this$static.integerEDataType = $createEDataType(this$static, 33); this$static.intObjectEDataType = $createEDataType(this$static, 34); this$static.languageEDataType = $createEDataType(this$static, 35); this$static.longEDataType = $createEDataType(this$static, 36); this$static.longObjectEDataType = $createEDataType(this$static, 37); this$static.nameEDataType = $createEDataType(this$static, 38); this$static.ncNameEDataType = $createEDataType(this$static, 39); this$static.negativeIntegerEDataType = $createEDataType(this$static, 40); this$static.nmtokenEDataType = $createEDataType(this$static, 41); this$static.nmtokensEDataType = $createEDataType(this$static, 42); this$static.nmtokensBaseEDataType = $createEDataType(this$static, 43); this$static.nonNegativeIntegerEDataType = $createEDataType(this$static, 44); this$static.nonPositiveIntegerEDataType = $createEDataType(this$static, 45); this$static.normalizedStringEDataType = $createEDataType(this$static, 46); this$static.notationEDataType = $createEDataType(this$static, 47); this$static.positiveIntegerEDataType = $createEDataType(this$static, 48); this$static.qNameEDataType = $createEDataType(this$static, 49); this$static.shortEDataType = $createEDataType(this$static, 50); this$static.shortObjectEDataType = $createEDataType(this$static, 51); this$static.stringEDataType = $createEDataType(this$static, 52); this$static.timeEDataType = $createEDataType(this$static, 53); this$static.tokenEDataType = $createEDataType(this$static, 54); this$static.unsignedByteEDataType = $createEDataType(this$static, 55); this$static.unsignedByteObjectEDataType = $createEDataType(this$static, 56); this$static.unsignedIntEDataType = $createEDataType(this$static, 57); this$static.unsignedIntObjectEDataType = $createEDataType(this$static, 58); this$static.unsignedLongEDataType = $createEDataType(this$static, 59); this$static.unsignedShortEDataType = $createEDataType(this$static, 60); this$static.unsignedShortObjectEDataType = $createEDataType(this$static, 61); } function $initializePackageContents_1(this$static){ var theXMLTypePackage_1; if (this$static.isInitialized) return; this$static.isInitialized = true; $setName(this$static, 'type'); $setNsPrefix(this$static, 'ecore.xml.type'); $setNsURI(this$static, 'http://www.eclipse.org/emf/2003/XMLType'); theXMLTypePackage_1 = castTo($getEPackage_0(($clinit_EPackage$Registry() , INSTANCE_6), 'http://www.eclipse.org/emf/2003/XMLType'), 2044); $add_21($getESuperTypes(this$static.simpleAnyTypeEClass), this$static.anyTypeEClass); $initEClass(this$static.anyTypeEClass, Lorg_eclipse_emf_ecore_xml_type_AnyType_2_classLit, 'AnyType', false, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.anyTypeEClass), 0), 35), this$static.ecorePackage.eFeatureMapEntryEDataType, 'mixed', null, 0, -1, Lorg_eclipse_emf_ecore_xml_type_AnyType_2_classLit, false, false, true, false, false, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.anyTypeEClass), 1), 35), this$static.ecorePackage.eFeatureMapEntryEDataType, 'any', null, 0, -1, Lorg_eclipse_emf_ecore_xml_type_AnyType_2_classLit, true, true, true, false, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.anyTypeEClass), 2), 35), this$static.ecorePackage.eFeatureMapEntryEDataType, 'anyAttribute', null, 0, -1, Lorg_eclipse_emf_ecore_xml_type_AnyType_2_classLit, false, false, true, false, false, false); $initEClass(this$static.processingInstructionEClass, Lorg_eclipse_emf_ecore_xml_type_ProcessingInstruction_2_classLit, 'ProcessingInstruction', false, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.processingInstructionEClass), 0), 35), this$static.stringEDataType, 'data', null, 0, 1, Lorg_eclipse_emf_ecore_xml_type_ProcessingInstruction_2_classLit, false, false, true, false, true, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.processingInstructionEClass), 1), 35), this$static.stringEDataType, 'target', null, 1, 1, Lorg_eclipse_emf_ecore_xml_type_ProcessingInstruction_2_classLit, false, false, true, false, true, false); $initEClass(this$static.simpleAnyTypeEClass, Lorg_eclipse_emf_ecore_xml_type_SimpleAnyType_2_classLit, 'SimpleAnyType', false, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.simpleAnyTypeEClass), 0), 35), theXMLTypePackage_1.stringEDataType, 'rawValue', null, 0, 1, Lorg_eclipse_emf_ecore_xml_type_SimpleAnyType_2_classLit, true, true, true, false, true, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.simpleAnyTypeEClass), 1), 35), theXMLTypePackage_1.anySimpleTypeEDataType, 'value', null, 0, 1, Lorg_eclipse_emf_ecore_xml_type_SimpleAnyType_2_classLit, true, true, true, false, true, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.simpleAnyTypeEClass), 2), 19), this$static.ecorePackage.eDataTypeEClass, null, 'instanceType', 1, 1, Lorg_eclipse_emf_ecore_xml_type_SimpleAnyType_2_classLit, false, false, true, false, false, false, false); $initEClass(this$static.xmlTypeDocumentRootEClass, Lorg_eclipse_emf_ecore_xml_type_XMLTypeDocumentRoot_2_classLit, 'XMLTypeDocumentRoot', false, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.xmlTypeDocumentRootEClass), 0), 35), this$static.ecorePackage.eFeatureMapEntryEDataType, 'mixed', null, 0, -1, null, false, false, true, false, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.xmlTypeDocumentRootEClass), 1), 19), this$static.ecorePackage.eStringToStringMapEntryEClass, null, 'xMLNSPrefixMap', 0, -1, null, true, false, true, true, false, false, false); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.xmlTypeDocumentRootEClass), 2), 19), this$static.ecorePackage.eStringToStringMapEntryEClass, null, 'xSISchemaLocation', 0, -1, null, true, false, true, true, false, false, false); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.xmlTypeDocumentRootEClass), 3), 35), this$static.stringEDataType, 'cDATA', null, 0, -2, null, true, true, true, false, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.xmlTypeDocumentRootEClass), 4), 35), this$static.stringEDataType, 'comment', null, 0, -2, null, true, true, true, false, false, true); $initEReference(castTo($get_20($getEStructuralFeatures(this$static.xmlTypeDocumentRootEClass), 5), 19), this$static.processingInstructionEClass, null, 'processingInstruction', 0, -2, null, true, true, true, true, false, false, true); $initEAttribute(castTo($get_20($getEStructuralFeatures(this$static.xmlTypeDocumentRootEClass), 6), 35), this$static.stringEDataType, 'text', null, 0, -2, null, true, true, true, false, false, true); $initEDataType(this$static.anySimpleTypeEDataType, Ljava_lang_Object_2_classLit, 'AnySimpleType', true); $initEDataType(this$static.anyURIEDataType, Ljava_lang_String_2_classLit, 'AnyURI', true); $initEDataType(this$static.base64BinaryEDataType, getClassLiteralForArray(B_classLit, 1), 'Base64Binary', true); $initEDataType(this$static.booleanEDataType, Z_classLit, 'Boolean', true); $initEDataType(this$static.booleanObjectEDataType, Ljava_lang_Boolean_2_classLit, 'BooleanObject', true); $initEDataType(this$static.byteEDataType, B_classLit, 'Byte', true); $initEDataType(this$static.byteObjectEDataType, Ljava_lang_Byte_2_classLit, 'ByteObject', true); $initEDataType(this$static.dateEDataType, Ljava_lang_String_2_classLit, 'Date', true); $initEDataType(this$static.dateTimeEDataType, Ljava_lang_String_2_classLit, 'DateTime', true); $initEDataType(this$static.decimalEDataType, Ljava_math_BigDecimal_2_classLit, 'Decimal', true); $initEDataType(this$static.doubleEDataType, D_classLit, 'Double', true); $initEDataType(this$static.doubleObjectEDataType, Ljava_lang_Double_2_classLit, 'DoubleObject', true); $initEDataType(this$static.durationEDataType, Ljava_lang_String_2_classLit, 'Duration', true); $initEDataType(this$static.entitiesEDataType, Ljava_util_List_2_classLit, 'ENTITIES', true); $initEDataType(this$static.entitiesBaseEDataType, Ljava_util_List_2_classLit, 'ENTITIESBase', true); $initEDataType(this$static.entityEDataType, Ljava_lang_String_2_classLit, 'ENTITY', true); $initEDataType(this$static.floatEDataType, F_classLit, 'Float', true); $initEDataType(this$static.floatObjectEDataType, Ljava_lang_Float_2_classLit, 'FloatObject', true); $initEDataType(this$static.gDayEDataType, Ljava_lang_String_2_classLit, 'GDay', true); $initEDataType(this$static.gMonthEDataType, Ljava_lang_String_2_classLit, 'GMonth', true); $initEDataType(this$static.gMonthDayEDataType, Ljava_lang_String_2_classLit, 'GMonthDay', true); $initEDataType(this$static.gYearEDataType, Ljava_lang_String_2_classLit, 'GYear', true); $initEDataType(this$static.gYearMonthEDataType, Ljava_lang_String_2_classLit, 'GYearMonth', true); $initEDataType(this$static.hexBinaryEDataType, getClassLiteralForArray(B_classLit, 1), 'HexBinary', true); $initEDataType(this$static.idEDataType, Ljava_lang_String_2_classLit, 'ID', true); $initEDataType(this$static.idrefEDataType, Ljava_lang_String_2_classLit, 'IDREF', true); $initEDataType(this$static.idrefsEDataType, Ljava_util_List_2_classLit, 'IDREFS', true); $initEDataType(this$static.idrefsBaseEDataType, Ljava_util_List_2_classLit, 'IDREFSBase', true); $initEDataType(this$static.intEDataType, I_classLit, 'Int', true); $initEDataType(this$static.integerEDataType, Ljava_math_BigInteger_2_classLit, 'Integer', true); $initEDataType(this$static.intObjectEDataType, Ljava_lang_Integer_2_classLit, 'IntObject', true); $initEDataType(this$static.languageEDataType, Ljava_lang_String_2_classLit, 'Language', true); $initEDataType(this$static.longEDataType, J_classLit, 'Long', true); $initEDataType(this$static.longObjectEDataType, Ljava_lang_Long_2_classLit, 'LongObject', true); $initEDataType(this$static.nameEDataType, Ljava_lang_String_2_classLit, 'Name', true); $initEDataType(this$static.ncNameEDataType, Ljava_lang_String_2_classLit, 'NCName', true); $initEDataType(this$static.negativeIntegerEDataType, Ljava_math_BigInteger_2_classLit, 'NegativeInteger', true); $initEDataType(this$static.nmtokenEDataType, Ljava_lang_String_2_classLit, 'NMTOKEN', true); $initEDataType(this$static.nmtokensEDataType, Ljava_util_List_2_classLit, 'NMTOKENS', true); $initEDataType(this$static.nmtokensBaseEDataType, Ljava_util_List_2_classLit, 'NMTOKENSBase', true); $initEDataType(this$static.nonNegativeIntegerEDataType, Ljava_math_BigInteger_2_classLit, 'NonNegativeInteger', true); $initEDataType(this$static.nonPositiveIntegerEDataType, Ljava_math_BigInteger_2_classLit, 'NonPositiveInteger', true); $initEDataType(this$static.normalizedStringEDataType, Ljava_lang_String_2_classLit, 'NormalizedString', true); $initEDataType(this$static.notationEDataType, Ljava_lang_String_2_classLit, 'NOTATION', true); $initEDataType(this$static.positiveIntegerEDataType, Ljava_lang_String_2_classLit, 'PositiveInteger', true); $initEDataType(this$static.qNameEDataType, Ljava_lang_String_2_classLit, 'QName', true); $initEDataType(this$static.shortEDataType, S_classLit, 'Short', true); $initEDataType(this$static.shortObjectEDataType, Ljava_lang_Short_2_classLit, 'ShortObject', true); $initEDataType(this$static.stringEDataType, Ljava_lang_String_2_classLit, 'String', true); $initEDataType(this$static.timeEDataType, Ljava_lang_String_2_classLit, 'Time', true); $initEDataType(this$static.tokenEDataType, Ljava_lang_String_2_classLit, 'Token', true); $initEDataType(this$static.unsignedByteEDataType, S_classLit, 'UnsignedByte', true); $initEDataType(this$static.unsignedByteObjectEDataType, Ljava_lang_Short_2_classLit, 'UnsignedByteObject', true); $initEDataType(this$static.unsignedIntEDataType, J_classLit, 'UnsignedInt', true); $initEDataType(this$static.unsignedIntObjectEDataType, Ljava_lang_Long_2_classLit, 'UnsignedIntObject', true); $initEDataType(this$static.unsignedLongEDataType, Ljava_math_BigInteger_2_classLit, 'UnsignedLong', true); $initEDataType(this$static.unsignedShortEDataType, I_classLit, 'UnsignedShort', true); $initEDataType(this$static.unsignedShortObjectEDataType, Ljava_lang_Integer_2_classLit, 'UnsignedShortObject', true); $createResource(this$static, 'http://www.eclipse.org/emf/2003/XMLType'); $createExtendedMetaDataAnnotations_0(this$static); } function XMLTypePackageImpl(){ EPackageImpl_0.call(this, 'http://www.eclipse.org/emf/2003/XMLType', ($clinit_XMLTypeFactory() , eINSTANCE_3)); $$init_13(this); } function init_6(){ var theXMLTypePackage; if (isInited_1) return castTo($getEPackage_0(($clinit_EPackage$Registry() , INSTANCE_6), 'http://www.eclipse.org/emf/2003/XMLType'), 2044); initializeRegistryHelpers(); theXMLTypePackage = castTo(instanceOf($getStringValue(($clinit_EPackage$Registry() , INSTANCE_6), 'http://www.eclipse.org/emf/2003/XMLType'), 594)?$getStringValue(INSTANCE_6, 'http://www.eclipse.org/emf/2003/XMLType'):new XMLTypePackageImpl, 594); isInited_1 = true; $createPackageContents_1(theXMLTypePackage); $initializePackageContents_1(theXMLTypePackage); $put_6(($clinit_EValidator$Registry() , INSTANCE_8), theXMLTypePackage, new XMLTypePackageImpl$1); $freeze_0(theXMLTypePackage); $putStringValue(INSTANCE_6, 'http://www.eclipse.org/emf/2003/XMLType', theXMLTypePackage); return theXMLTypePackage; } function initializeRegistryHelpers(){ register_0(Lorg_eclipse_emf_ecore_xml_type_AnyType_2_classLit, new XMLTypePackageImpl$2); register_0(Lorg_eclipse_emf_ecore_xml_type_ProcessingInstruction_2_classLit, new XMLTypePackageImpl$3); register_0(Lorg_eclipse_emf_ecore_xml_type_SimpleAnyType_2_classLit, new XMLTypePackageImpl$4); register_0(Lorg_eclipse_emf_ecore_xml_type_XMLTypeDocumentRoot_2_classLit, new XMLTypePackageImpl$5); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$6); register_0(getClassLiteralForArray(B_classLit, 1), new XMLTypePackageImpl$7); register_0(Ljava_lang_Boolean_2_classLit, new XMLTypePackageImpl$8); register_0(Ljava_lang_Byte_2_classLit, new XMLTypePackageImpl$9); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$10); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$11); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$12); register_0(Ljava_lang_Double_2_classLit, new XMLTypePackageImpl$13); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$14); register_0(Ljava_util_List_2_classLit, new XMLTypePackageImpl$15); register_0(Ljava_util_List_2_classLit, new XMLTypePackageImpl$16); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$17); register_0(Ljava_lang_Float_2_classLit, new XMLTypePackageImpl$18); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$19); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$20); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$21); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$22); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$23); register_0(getClassLiteralForArray(B_classLit, 1), new XMLTypePackageImpl$24); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$25); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$26); register_0(Ljava_util_List_2_classLit, new XMLTypePackageImpl$27); register_0(Ljava_util_List_2_classLit, new XMLTypePackageImpl$28); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$29); register_0(Ljava_lang_Integer_2_classLit, new XMLTypePackageImpl$30); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$31); register_0(Ljava_lang_Long_2_classLit, new XMLTypePackageImpl$32); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$33); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$34); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$35); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$36); register_0(Ljava_util_List_2_classLit, new XMLTypePackageImpl$37); register_0(Ljava_util_List_2_classLit, new XMLTypePackageImpl$38); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$39); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$40); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$41); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$42); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$43); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$44); register_0(Ljava_lang_Short_2_classLit, new XMLTypePackageImpl$45); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$46); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$47); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$48); register_0(Ljava_lang_Short_2_classLit, new XMLTypePackageImpl$49); register_0(Ljava_lang_Long_2_classLit, new XMLTypePackageImpl$50); register_0(Ljava_lang_String_2_classLit, new XMLTypePackageImpl$51); register_0(Ljava_lang_Integer_2_classLit, new XMLTypePackageImpl$52); } defineClass(594, 184, {110:1, 94:1, 93:1, 155:1, 197:1, 58:1, 241:1, 114:1, 54:1, 99:1, 158:1, 184:1, 119:1, 120:1, 690:1, 2044:1, 594:1}, XMLTypePackageImpl); _.isCreated = false; _.isInitialized = false; var isInited_1 = false; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl', 594); function XMLTypePackageImpl$1(){ } defineClass(1961, 1, {851:1}, XMLTypePackageImpl$1); _.getEValidator = function getEValidator_0(){ return $clinit_XMLTypeValidator() , INSTANCE_12; } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$1_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/1', 1961); function XMLTypePackageImpl$10(){ } defineClass(1970, 1, $intern_165, XMLTypePackageImpl$10); _.isInstance = function isInstance_50(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_42(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$10_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/10', 1970); function XMLTypePackageImpl$11(){ } defineClass(1971, 1, $intern_165, XMLTypePackageImpl$11); _.isInstance = function isInstance_51(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_43(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$11_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/11', 1971); function XMLTypePackageImpl$12(){ } defineClass(1972, 1, $intern_165, XMLTypePackageImpl$12); _.isInstance = function isInstance_52(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_44(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$12_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/12', 1972); function XMLTypePackageImpl$13(){ } defineClass(1973, 1, $intern_165, XMLTypePackageImpl$13); _.isInstance = function isInstance_53(instance){ return instanceOfDouble(instance); } ; _.newArrayInstance = function newArrayInstance_45(size_0){ return initUnidimensionalArray(Ljava_lang_Double_2_classLit, $intern_16, 345, size_0, 7, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$13_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/13', 1973); function XMLTypePackageImpl$14(){ } defineClass(1974, 1, $intern_165, XMLTypePackageImpl$14); _.isInstance = function isInstance_54(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_46(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$14_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/14', 1974); function XMLTypePackageImpl$15(){ } defineClass(1975, 1, $intern_165, XMLTypePackageImpl$15); _.isInstance = function isInstance_55(instance){ return instanceOf(instance, 15); } ; _.newArrayInstance = function newArrayInstance_47(size_0){ return initUnidimensionalArray(Ljava_util_List_2_classLit, $intern_99, 15, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$15_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/15', 1975); function XMLTypePackageImpl$16(){ } defineClass(1976, 1, $intern_165, XMLTypePackageImpl$16); _.isInstance = function isInstance_56(instance){ return instanceOf(instance, 15); } ; _.newArrayInstance = function newArrayInstance_48(size_0){ return initUnidimensionalArray(Ljava_util_List_2_classLit, $intern_99, 15, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$16_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/16', 1976); function XMLTypePackageImpl$17(){ } defineClass(1977, 1, $intern_165, XMLTypePackageImpl$17); _.isInstance = function isInstance_57(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_49(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$17_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/17', 1977); function XMLTypePackageImpl$18(){ } defineClass(1978, 1, $intern_165, XMLTypePackageImpl$18); _.isInstance = function isInstance_58(instance){ return instanceOf(instance, 161); } ; _.newArrayInstance = function newArrayInstance_50(size_0){ return initUnidimensionalArray(Ljava_lang_Float_2_classLit, $intern_16, 161, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$18_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/18', 1978); function XMLTypePackageImpl$19(){ } defineClass(1979, 1, $intern_165, XMLTypePackageImpl$19); _.isInstance = function isInstance_59(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_51(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$19_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/19', 1979); function XMLTypePackageImpl$2(){ } defineClass(1962, 1, $intern_165, XMLTypePackageImpl$2); _.isInstance = function isInstance_60(instance){ return instanceOf(instance, 857); } ; _.newArrayInstance = function newArrayInstance_52(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_xml_type_AnyType_2_classLit, $intern_2, 857, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$2_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/2', 1962); function XMLTypePackageImpl$20(){ } defineClass(1980, 1, $intern_165, XMLTypePackageImpl$20); _.isInstance = function isInstance_61(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_53(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$20_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/20', 1980); function XMLTypePackageImpl$21(){ } defineClass(1981, 1, $intern_165, XMLTypePackageImpl$21); _.isInstance = function isInstance_62(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_54(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$21_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/21', 1981); function XMLTypePackageImpl$22(){ } defineClass(1982, 1, $intern_165, XMLTypePackageImpl$22); _.isInstance = function isInstance_63(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_55(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$22_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/22', 1982); function XMLTypePackageImpl$23(){ } defineClass(1983, 1, $intern_165, XMLTypePackageImpl$23); _.isInstance = function isInstance_64(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_56(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$23_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/23', 1983); function XMLTypePackageImpl$24(){ } defineClass(1984, 1, $intern_165, XMLTypePackageImpl$24); _.isInstance = function isInstance_65(instance){ return instanceOf(instance, 195); } ; _.newArrayInstance = function newArrayInstance_57(size_0){ return initUnidimensionalArray(B_classLit, $intern_16, 195, size_0, 0, 2); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$24_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/24', 1984); function XMLTypePackageImpl$25(){ } defineClass(1985, 1, $intern_165, XMLTypePackageImpl$25); _.isInstance = function isInstance_66(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_58(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$25_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/25', 1985); function XMLTypePackageImpl$26(){ } defineClass(1986, 1, $intern_165, XMLTypePackageImpl$26); _.isInstance = function isInstance_67(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_59(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$26_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/26', 1986); function XMLTypePackageImpl$27(){ } defineClass(1987, 1, $intern_165, XMLTypePackageImpl$27); _.isInstance = function isInstance_68(instance){ return instanceOf(instance, 15); } ; _.newArrayInstance = function newArrayInstance_60(size_0){ return initUnidimensionalArray(Ljava_util_List_2_classLit, $intern_99, 15, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$27_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/27', 1987); function XMLTypePackageImpl$28(){ } defineClass(1988, 1, $intern_165, XMLTypePackageImpl$28); _.isInstance = function isInstance_69(instance){ return instanceOf(instance, 15); } ; _.newArrayInstance = function newArrayInstance_61(size_0){ return initUnidimensionalArray(Ljava_util_List_2_classLit, $intern_99, 15, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$28_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/28', 1988); function XMLTypePackageImpl$29(){ } defineClass(1989, 1, $intern_165, XMLTypePackageImpl$29); _.isInstance = function isInstance_70(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_62(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$29_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/29', 1989); function XMLTypePackageImpl$3(){ } defineClass(1963, 1, $intern_165, XMLTypePackageImpl$3); _.isInstance = function isInstance_71(instance){ return instanceOf(instance, 681); } ; _.newArrayInstance = function newArrayInstance_63(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_xml_type_ProcessingInstruction_2_classLit, $intern_2, 2119, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$3_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/3', 1963); function XMLTypePackageImpl$30(){ } defineClass(1990, 1, $intern_165, XMLTypePackageImpl$30); _.isInstance = function isInstance_72(instance){ return instanceOf(instance, 17); } ; _.newArrayInstance = function newArrayInstance_64(size_0){ return initUnidimensionalArray(Ljava_lang_Integer_2_classLit, $intern_16, 17, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$30_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/30', 1990); function XMLTypePackageImpl$31(){ } defineClass(1991, 1, $intern_165, XMLTypePackageImpl$31); _.isInstance = function isInstance_73(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_65(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$31_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/31', 1991); function XMLTypePackageImpl$32(){ } defineClass(1992, 1, $intern_165, XMLTypePackageImpl$32); _.isInstance = function isInstance_74(instance){ return instanceOf(instance, 168); } ; _.newArrayInstance = function newArrayInstance_66(size_0){ return initUnidimensionalArray(Ljava_lang_Long_2_classLit, $intern_16, 168, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$32_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/32', 1992); function XMLTypePackageImpl$33(){ } defineClass(1993, 1, $intern_165, XMLTypePackageImpl$33); _.isInstance = function isInstance_75(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_67(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$33_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/33', 1993); function XMLTypePackageImpl$34(){ } defineClass(1994, 1, $intern_165, XMLTypePackageImpl$34); _.isInstance = function isInstance_76(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_68(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$34_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/34', 1994); function XMLTypePackageImpl$35(){ } defineClass(1995, 1, $intern_165, XMLTypePackageImpl$35); _.isInstance = function isInstance_77(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_69(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$35_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/35', 1995); function XMLTypePackageImpl$36(){ } defineClass(1996, 1, $intern_165, XMLTypePackageImpl$36); _.isInstance = function isInstance_78(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_70(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$36_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/36', 1996); function XMLTypePackageImpl$37(){ } defineClass(1997, 1, $intern_165, XMLTypePackageImpl$37); _.isInstance = function isInstance_79(instance){ return instanceOf(instance, 15); } ; _.newArrayInstance = function newArrayInstance_71(size_0){ return initUnidimensionalArray(Ljava_util_List_2_classLit, $intern_99, 15, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$37_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/37', 1997); function XMLTypePackageImpl$38(){ } defineClass(1998, 1, $intern_165, XMLTypePackageImpl$38); _.isInstance = function isInstance_80(instance){ return instanceOf(instance, 15); } ; _.newArrayInstance = function newArrayInstance_72(size_0){ return initUnidimensionalArray(Ljava_util_List_2_classLit, $intern_99, 15, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$38_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/38', 1998); function XMLTypePackageImpl$39(){ } defineClass(1999, 1, $intern_165, XMLTypePackageImpl$39); _.isInstance = function isInstance_81(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_73(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$39_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/39', 1999); function XMLTypePackageImpl$4(){ } defineClass(1964, 1, $intern_165, XMLTypePackageImpl$4); _.isInstance = function isInstance_82(instance){ return instanceOf(instance, 682); } ; _.newArrayInstance = function newArrayInstance_74(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_xml_type_SimpleAnyType_2_classLit, $intern_2, 2120, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$4_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/4', 1964); function XMLTypePackageImpl$40(){ } defineClass(2000, 1, $intern_165, XMLTypePackageImpl$40); _.isInstance = function isInstance_83(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_75(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$40_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/40', 2000); function XMLTypePackageImpl$41(){ } defineClass(2001, 1, $intern_165, XMLTypePackageImpl$41); _.isInstance = function isInstance_84(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_76(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$41_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/41', 2001); function XMLTypePackageImpl$42(){ } defineClass(2002, 1, $intern_165, XMLTypePackageImpl$42); _.isInstance = function isInstance_85(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_77(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$42_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/42', 2002); function XMLTypePackageImpl$43(){ } defineClass(2003, 1, $intern_165, XMLTypePackageImpl$43); _.isInstance = function isInstance_86(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_78(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$43_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/43', 2003); function XMLTypePackageImpl$44(){ } defineClass(2004, 1, $intern_165, XMLTypePackageImpl$44); _.isInstance = function isInstance_87(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_79(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$44_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/44', 2004); function XMLTypePackageImpl$45(){ } defineClass(2005, 1, $intern_165, XMLTypePackageImpl$45); _.isInstance = function isInstance_88(instance){ return instanceOf(instance, 191); } ; _.newArrayInstance = function newArrayInstance_80(size_0){ return initUnidimensionalArray(Ljava_lang_Short_2_classLit, $intern_16, 191, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$45_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/45', 2005); function XMLTypePackageImpl$46(){ } defineClass(2006, 1, $intern_165, XMLTypePackageImpl$46); _.isInstance = function isInstance_89(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_81(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$46_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/46', 2006); function XMLTypePackageImpl$47(){ } defineClass(2007, 1, $intern_165, XMLTypePackageImpl$47); _.isInstance = function isInstance_90(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_82(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$47_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/47', 2007); function XMLTypePackageImpl$48(){ } defineClass(2008, 1, $intern_165, XMLTypePackageImpl$48); _.isInstance = function isInstance_91(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_83(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$48_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/48', 2008); function XMLTypePackageImpl$49(){ } defineClass(2009, 1, $intern_165, XMLTypePackageImpl$49); _.isInstance = function isInstance_92(instance){ return instanceOf(instance, 191); } ; _.newArrayInstance = function newArrayInstance_84(size_0){ return initUnidimensionalArray(Ljava_lang_Short_2_classLit, $intern_16, 191, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$49_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/49', 2009); function XMLTypePackageImpl$5(){ } defineClass(1965, 1, $intern_165, XMLTypePackageImpl$5); _.isInstance = function isInstance_93(instance){ return instanceOf(instance, 683); } ; _.newArrayInstance = function newArrayInstance_85(size_0){ return initUnidimensionalArray(Lorg_eclipse_emf_ecore_xml_type_XMLTypeDocumentRoot_2_classLit, $intern_2, 2121, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$5_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/5', 1965); function XMLTypePackageImpl$50(){ } defineClass(2010, 1, $intern_165, XMLTypePackageImpl$50); _.isInstance = function isInstance_94(instance){ return instanceOf(instance, 168); } ; _.newArrayInstance = function newArrayInstance_86(size_0){ return initUnidimensionalArray(Ljava_lang_Long_2_classLit, $intern_16, 168, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$50_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/50', 2010); function XMLTypePackageImpl$51(){ } defineClass(2011, 1, $intern_165, XMLTypePackageImpl$51); _.isInstance = function isInstance_95(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_87(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$51_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/51', 2011); function XMLTypePackageImpl$52(){ } defineClass(2012, 1, $intern_165, XMLTypePackageImpl$52); _.isInstance = function isInstance_96(instance){ return instanceOf(instance, 17); } ; _.newArrayInstance = function newArrayInstance_88(size_0){ return initUnidimensionalArray(Ljava_lang_Integer_2_classLit, $intern_16, 17, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$52_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/52', 2012); function XMLTypePackageImpl$6(){ } defineClass(1966, 1, $intern_165, XMLTypePackageImpl$6); _.isInstance = function isInstance_97(instance){ return instanceOfString(instance); } ; _.newArrayInstance = function newArrayInstance_89(size_0){ return initUnidimensionalArray(Ljava_lang_String_2_classLit, $intern_16, 2, size_0, 6, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$6_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/6', 1966); function XMLTypePackageImpl$7(){ } defineClass(1967, 1, $intern_165, XMLTypePackageImpl$7); _.isInstance = function isInstance_98(instance){ return instanceOf(instance, 195); } ; _.newArrayInstance = function newArrayInstance_90(size_0){ return initUnidimensionalArray(B_classLit, $intern_16, 195, size_0, 0, 2); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$7_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/7', 1967); function XMLTypePackageImpl$8(){ } defineClass(1968, 1, $intern_165, XMLTypePackageImpl$8); _.isInstance = function isInstance_99(instance){ return instanceOfBoolean(instance); } ; _.newArrayInstance = function newArrayInstance_91(size_0){ return initUnidimensionalArray(Ljava_lang_Boolean_2_classLit, $intern_16, 485, size_0, 8, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$8_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/8', 1968); function XMLTypePackageImpl$9(){ } defineClass(1969, 1, $intern_165, XMLTypePackageImpl$9); _.isInstance = function isInstance_100(instance){ return instanceOf(instance, 222); } ; _.newArrayInstance = function newArrayInstance_92(size_0){ return initUnidimensionalArray(Ljava_lang_Byte_2_classLit, $intern_16, 222, size_0, 0, 1); } ; var Lorg_eclipse_emf_ecore_xml_type_impl_XMLTypePackageImpl$9_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.impl', 'XMLTypePackageImpl/9', 1969); function $clinit_DataValue$Base64(){ $clinit_DataValue$Base64 = emptyMethod; var i, i0, i1, i2, i3, i4, i5, j, j0; base64Alphabet = initUnidimensionalArray(B_classLit, $intern_140, 28, 255, 15, 1); lookUpBase64Alphabet = initUnidimensionalArray(C_classLit, $intern_45, 28, 64, 15, 1); for (i0 = 0; i0 < 255; i0++) { base64Alphabet[i0] = -1; } for (i1 = 90; i1 >= 65; i1--) { base64Alphabet[i1] = i1 - 65 << 24 >> 24; } for (i2 = 122; i2 >= 97; i2--) { base64Alphabet[i2] = i2 - 97 + 26 << 24 >> 24; } for (i3 = 57; i3 >= 48; i3--) { base64Alphabet[i3] = i3 - 48 + 52 << 24 >> 24; } base64Alphabet[43] = 62; base64Alphabet[47] = 63; for (i4 = 0; i4 <= 25; i4++) lookUpBase64Alphabet[i4] = 65 + i4 & $intern_47; for (i5 = 26 , j0 = 0; i5 <= 51; ++i5 , j0++) lookUpBase64Alphabet[i5] = 97 + j0 & $intern_47; for (i = 52 , j = 0; i <= 61; ++i , j++) lookUpBase64Alphabet[i] = 48 + j & $intern_47; lookUpBase64Alphabet[62] = 43; lookUpBase64Alphabet[63] = 47; } function decode_0(encoded){ $clinit_DataValue$Base64(); var b1, b2, b3, b4, base64Data, d1, d2, d3, d4, dataIndex, decodedData, encodedIndex, i, len, numberQuadruple, tmp; if (encoded == null) return null; base64Data = $toCharArray(encoded); len = removeWhiteSpace(base64Data); if (len % 4 != 0) { return null; } numberQuadruple = len / 4 | 0; if (numberQuadruple == 0) return initUnidimensionalArray(B_classLit, $intern_140, 28, 0, 15, 1); decodedData = null; b1 = 0; b2 = 0; b3 = 0; b4 = 0; d1 = 0; d2 = 0; d3 = 0; d4 = 0; i = 0; encodedIndex = 0; dataIndex = 0; decodedData = initUnidimensionalArray(B_classLit, $intern_140, 28, numberQuadruple * 3, 15, 1); for (; i < numberQuadruple - 1; i++) { if (!isData(d1 = base64Data[dataIndex++]) || !isData(d2 = base64Data[dataIndex++]) || !isData(d3 = base64Data[dataIndex++]) || !isData(d4 = base64Data[dataIndex++])) return null; b1 = base64Alphabet[d1]; b2 = base64Alphabet[d2]; b3 = base64Alphabet[d3]; b4 = base64Alphabet[d4]; decodedData[encodedIndex++] = (b1 << 2 | b2 >> 4) << 24 >> 24; decodedData[encodedIndex++] = ((b2 & 15) << 4 | b3 >> 2 & 15) << 24 >> 24; decodedData[encodedIndex++] = (b3 << 6 | b4) << 24 >> 24; } if (!isData(d1 = base64Data[dataIndex++]) || !isData(d2 = base64Data[dataIndex++])) { return null; } b1 = base64Alphabet[d1]; b2 = base64Alphabet[d2]; d3 = base64Data[dataIndex++]; d4 = base64Data[dataIndex++]; if (base64Alphabet[d3] == -1 || base64Alphabet[d4] == -1) { if (d3 == 61 && d4 == 61) { if ((b2 & 15) != 0) return null; tmp = initUnidimensionalArray(B_classLit, $intern_140, 28, i * 3 + 1, 15, 1); arraycopy(decodedData, 0, tmp, 0, i * 3); tmp[encodedIndex] = (b1 << 2 | b2 >> 4) << 24 >> 24; return tmp; } else if (d3 != 61 && d4 == 61) { b3 = base64Alphabet[d3]; if ((b3 & 3) != 0) return null; tmp = initUnidimensionalArray(B_classLit, $intern_140, 28, i * 3 + 2, 15, 1); arraycopy(decodedData, 0, tmp, 0, i * 3); tmp[encodedIndex++] = (b1 << 2 | b2 >> 4) << 24 >> 24; tmp[encodedIndex] = ((b2 & 15) << 4 | b3 >> 2 & 15) << 24 >> 24; return tmp; } else { return null; } } else { b3 = base64Alphabet[d3]; b4 = base64Alphabet[d4]; decodedData[encodedIndex++] = (b1 << 2 | b2 >> 4) << 24 >> 24; decodedData[encodedIndex++] = ((b2 & 15) << 4 | b3 >> 2 & 15) << 24 >> 24; decodedData[encodedIndex++] = (b3 << 6 | b4) << 24 >> 24; } return decodedData; } function encode(binaryData){ $clinit_DataValue$Base64(); var b1, b2, b3, dataIndex, encodedData, encodedIndex, fewerThan24bits, i, k, l, lengthDataBits, numberQuartet, numberTriplets, val1, val2, val3; if (binaryData == null) return null; lengthDataBits = binaryData.length * 8; if (lengthDataBits == 0) { return ''; } fewerThan24bits = lengthDataBits % 24; numberTriplets = lengthDataBits / 24 | 0; numberQuartet = fewerThan24bits != 0?numberTriplets + 1:numberTriplets; encodedData = null; encodedData = initUnidimensionalArray(C_classLit, $intern_45, 28, numberQuartet * 4, 15, 1); k = 0; l = 0; b1 = 0; b2 = 0; b3 = 0; encodedIndex = 0; dataIndex = 0; for (i = 0; i < numberTriplets; i++) { b1 = binaryData[dataIndex++]; b2 = binaryData[dataIndex++]; b3 = binaryData[dataIndex++]; l = (b2 & 15) << 24 >> 24; k = (b1 & 3) << 24 >> 24; val1 = (b1 & -128) == 0?b1 >> 2 << 24 >> 24:(b1 >> 2 ^ 192) << 24 >> 24; val2 = (b2 & -128) == 0?b2 >> 4 << 24 >> 24:(b2 >> 4 ^ 240) << 24 >> 24; val3 = (b3 & -128) == 0?b3 >> 6 << 24 >> 24:(b3 >> 6 ^ 252) << 24 >> 24; encodedData[encodedIndex++] = lookUpBase64Alphabet[val1]; encodedData[encodedIndex++] = lookUpBase64Alphabet[val2 | k << 4]; encodedData[encodedIndex++] = lookUpBase64Alphabet[l << 2 | val3]; encodedData[encodedIndex++] = lookUpBase64Alphabet[b3 & 63]; } if (fewerThan24bits == 8) { b1 = binaryData[dataIndex]; k = (b1 & 3) << 24 >> 24; val1 = (b1 & -128) == 0?b1 >> 2 << 24 >> 24:(b1 >> 2 ^ 192) << 24 >> 24; encodedData[encodedIndex++] = lookUpBase64Alphabet[val1]; encodedData[encodedIndex++] = lookUpBase64Alphabet[k << 4]; encodedData[encodedIndex++] = 61; encodedData[encodedIndex++] = 61; } else if (fewerThan24bits == 16) { b1 = binaryData[dataIndex]; b2 = binaryData[dataIndex + 1]; l = (b2 & 15) << 24 >> 24; k = (b1 & 3) << 24 >> 24; val1 = (b1 & -128) == 0?b1 >> 2 << 24 >> 24:(b1 >> 2 ^ 192) << 24 >> 24; val2 = (b2 & -128) == 0?b2 >> 4 << 24 >> 24:(b2 >> 4 ^ 240) << 24 >> 24; encodedData[encodedIndex++] = lookUpBase64Alphabet[val1]; encodedData[encodedIndex++] = lookUpBase64Alphabet[val2 | k << 4]; encodedData[encodedIndex++] = lookUpBase64Alphabet[l << 2]; encodedData[encodedIndex++] = 61; } return valueOf_8(encodedData, 0, encodedData.length); } function isData(octect){ return base64Alphabet[octect] != -1; } function removeWhiteSpace(data_0){ var i, len, newSize; newSize = 0; len = data_0.length; for (i = 0; i < len; i++) { data_0[i] == 32 || data_0[i] == 13 || data_0[i] == 10 || data_0[i] == 9 || (data_0[newSize++] = data_0[i]); } return newSize; } var base64Alphabet, lookUpBase64Alphabet; function $clinit_DataValue$HexBin(){ $clinit_DataValue$HexBin = emptyMethod; var i, i0, i1, i2, i3, i4; hexNumberTable = initUnidimensionalArray(B_classLit, $intern_140, 28, 255, 15, 1); lookUpHexAlphabet = initUnidimensionalArray(C_classLit, $intern_45, 28, 16, 15, 1); for (i0 = 0; i0 < 255; i0++) { hexNumberTable[i0] = -1; } for (i1 = 57; i1 >= 48; i1--) { hexNumberTable[i1] = i1 - 48 << 24 >> 24; } for (i2 = 70; i2 >= 65; i2--) { hexNumberTable[i2] = i2 - 65 + 10 << 24 >> 24; } for (i3 = 102; i3 >= 97; i3--) { hexNumberTable[i3] = i3 - 97 + 10 << 24 >> 24; } for (i4 = 0; i4 < 10; i4++) lookUpHexAlphabet[i4] = 48 + i4 & $intern_47; for (i = 10; i <= 15; i++) lookUpHexAlphabet[i] = 65 + i - 10 & $intern_47; } function decode_1(encoded){ $clinit_DataValue$HexBin(); var binaryData, decodedData, i, lengthData, lengthDecode, temp1, temp2; if (encoded == null) return null; lengthData = encoded.length; if (lengthData % 2 != 0) return null; binaryData = $toCharArray(encoded); lengthDecode = lengthData / 2 | 0; decodedData = initUnidimensionalArray(B_classLit, $intern_140, 28, lengthDecode, 15, 1); for (i = 0; i < lengthDecode; i++) { temp1 = hexNumberTable[binaryData[i * 2]]; if (temp1 == -1) return null; temp2 = hexNumberTable[binaryData[i * 2 + 1]]; if (temp2 == -1) return null; decodedData[i] = (temp1 << 4 | temp2) << 24 >> 24; } return decodedData; } function encode_0(binaryData){ $clinit_DataValue$HexBin(); var encodedData, i, lengthData, lengthEncode, temp; if (binaryData == null) return null; lengthData = binaryData.length; lengthEncode = lengthData * 2; encodedData = initUnidimensionalArray(C_classLit, $intern_45, 28, lengthEncode, 15, 1); for (i = 0; i < lengthData; i++) { temp = binaryData[i]; temp < 0 && (temp += 256); encodedData[i * 2] = lookUpHexAlphabet[temp >> 4]; encodedData[i * 2 + 1] = lookUpHexAlphabet[temp & 15]; } return valueOf_8(encodedData, 0, encodedData.length); } var hexNumberTable, lookUpHexAlphabet; function $clinit_DataValue$XMLChar(){ $clinit_DataValue$XMLChar = emptyMethod; CHARS = initUnidimensionalArray(B_classLit, $intern_140, 28, $intern_64, 15, 1); CHARS[9] = 35; CHARS[10] = 19; CHARS[13] = 19; CHARS[32] = 51; CHARS[33] = 49; CHARS[34] = 33; fill_0(CHARS, 35, 38, 49); CHARS[38] = 1; fill_0(CHARS, 39, 45, 49); fill_0(CHARS, 45, 47, -71); CHARS[47] = 49; fill_0(CHARS, 48, 58, -71); CHARS[58] = 61; CHARS[59] = 49; CHARS[60] = 1; CHARS[61] = 49; CHARS[62] = 33; fill_0(CHARS, 63, 65, 49); fill_0(CHARS, 65, 91, -3); fill_0(CHARS, 91, 93, 33); CHARS[93] = 1; CHARS[94] = 33; CHARS[95] = -3; CHARS[96] = 33; fill_0(CHARS, 97, 123, -3); fill_0(CHARS, 123, 183, 33); CHARS[183] = -87; fill_0(CHARS, 184, 192, 33); fill_0(CHARS, 192, 215, -19); CHARS[215] = 33; fill_0(CHARS, 216, 247, -19); CHARS[247] = 33; fill_0(CHARS, 248, 306, -19); fill_0(CHARS, 306, 308, 33); fill_0(CHARS, 308, 319, -19); fill_0(CHARS, 319, 321, 33); fill_0(CHARS, 321, 329, -19); CHARS[329] = 33; fill_0(CHARS, 330, 383, -19); CHARS[383] = 33; fill_0(CHARS, 384, 452, -19); fill_0(CHARS, 452, 461, 33); fill_0(CHARS, 461, 497, -19); fill_0(CHARS, 497, 500, 33); fill_0(CHARS, 500, 502, -19); fill_0(CHARS, 502, 506, 33); fill_0(CHARS, 506, 536, -19); fill_0(CHARS, 536, 592, 33); fill_0(CHARS, 592, 681, -19); fill_0(CHARS, 681, 699, 33); fill_0(CHARS, 699, 706, -19); fill_0(CHARS, 706, 720, 33); fill_0(CHARS, 720, 722, -87); fill_0(CHARS, 722, 768, 33); fill_0(CHARS, 768, 838, -87); fill_0(CHARS, 838, 864, 33); fill_0(CHARS, 864, 866, -87); fill_0(CHARS, 866, 902, 33); CHARS[902] = -19; CHARS[903] = -87; fill_0(CHARS, 904, 907, -19); CHARS[907] = 33; CHARS[908] = -19; CHARS[909] = 33; fill_0(CHARS, 910, 930, -19); CHARS[930] = 33; fill_0(CHARS, 931, 975, -19); CHARS[975] = 33; fill_0(CHARS, 976, 983, -19); fill_0(CHARS, 983, 986, 33); CHARS[986] = -19; CHARS[987] = 33; CHARS[988] = -19; CHARS[989] = 33; CHARS[990] = -19; CHARS[991] = 33; CHARS[992] = -19; CHARS[993] = 33; fill_0(CHARS, 994, 1012, -19); fill_0(CHARS, 1012, 1025, 33); fill_0(CHARS, 1025, 1037, -19); CHARS[1037] = 33; fill_0(CHARS, 1038, 1104, -19); CHARS[1104] = 33; fill_0(CHARS, 1105, 1117, -19); CHARS[1117] = 33; fill_0(CHARS, 1118, 1154, -19); CHARS[1154] = 33; fill_0(CHARS, 1155, 1159, -87); fill_0(CHARS, 1159, 1168, 33); fill_0(CHARS, 1168, 1221, -19); fill_0(CHARS, 1221, 1223, 33); fill_0(CHARS, 1223, 1225, -19); fill_0(CHARS, 1225, 1227, 33); fill_0(CHARS, 1227, 1229, -19); fill_0(CHARS, 1229, 1232, 33); fill_0(CHARS, 1232, 1260, -19); fill_0(CHARS, 1260, 1262, 33); fill_0(CHARS, 1262, 1270, -19); fill_0(CHARS, 1270, 1272, 33); fill_0(CHARS, 1272, 1274, -19); fill_0(CHARS, 1274, 1329, 33); fill_0(CHARS, 1329, 1367, -19); fill_0(CHARS, 1367, 1369, 33); CHARS[1369] = -19; fill_0(CHARS, 1370, 1377, 33); fill_0(CHARS, 1377, 1415, -19); fill_0(CHARS, 1415, 1425, 33); fill_0(CHARS, 1425, 1442, -87); CHARS[1442] = 33; fill_0(CHARS, 1443, 1466, -87); CHARS[1466] = 33; fill_0(CHARS, 1467, 1470, -87); CHARS[1470] = 33; CHARS[1471] = -87; CHARS[1472] = 33; fill_0(CHARS, 1473, 1475, -87); CHARS[1475] = 33; CHARS[1476] = -87; fill_0(CHARS, 1477, 1488, 33); fill_0(CHARS, 1488, 1515, -19); fill_0(CHARS, 1515, 1520, 33); fill_0(CHARS, 1520, 1523, -19); fill_0(CHARS, 1523, 1569, 33); fill_0(CHARS, 1569, 1595, -19); fill_0(CHARS, 1595, 1600, 33); CHARS[1600] = -87; fill_0(CHARS, 1601, 1611, -19); fill_0(CHARS, 1611, 1619, -87); fill_0(CHARS, 1619, 1632, 33); fill_0(CHARS, 1632, 1642, -87); fill_0(CHARS, 1642, 1648, 33); CHARS[1648] = -87; fill_0(CHARS, 1649, 1720, -19); fill_0(CHARS, 1720, 1722, 33); fill_0(CHARS, 1722, 1727, -19); CHARS[1727] = 33; fill_0(CHARS, 1728, 1743, -19); CHARS[1743] = 33; fill_0(CHARS, 1744, 1748, -19); CHARS[1748] = 33; CHARS[1749] = -19; fill_0(CHARS, 1750, 1765, -87); fill_0(CHARS, 1765, 1767, -19); fill_0(CHARS, 1767, 1769, -87); CHARS[1769] = 33; fill_0(CHARS, 1770, 1774, -87); fill_0(CHARS, 1774, 1776, 33); fill_0(CHARS, 1776, 1786, -87); fill_0(CHARS, 1786, 2305, 33); fill_0(CHARS, 2305, 2308, -87); CHARS[2308] = 33; fill_0(CHARS, 2309, 2362, -19); fill_0(CHARS, 2362, 2364, 33); CHARS[2364] = -87; CHARS[2365] = -19; fill_0(CHARS, 2366, 2382, -87); fill_0(CHARS, 2382, 2385, 33); fill_0(CHARS, 2385, 2389, -87); fill_0(CHARS, 2389, 2392, 33); fill_0(CHARS, 2392, 2402, -19); fill_0(CHARS, 2402, 2404, -87); fill_0(CHARS, 2404, 2406, 33); fill_0(CHARS, 2406, 2416, -87); fill_0(CHARS, 2416, 2433, 33); fill_0(CHARS, 2433, 2436, -87); CHARS[2436] = 33; fill_0(CHARS, 2437, 2445, -19); fill_0(CHARS, 2445, 2447, 33); fill_0(CHARS, 2447, 2449, -19); fill_0(CHARS, 2449, 2451, 33); fill_0(CHARS, 2451, 2473, -19); CHARS[2473] = 33; fill_0(CHARS, 2474, 2481, -19); CHARS[2481] = 33; CHARS[2482] = -19; fill_0(CHARS, 2483, 2486, 33); fill_0(CHARS, 2486, 2490, -19); fill_0(CHARS, 2490, 2492, 33); CHARS[2492] = -87; CHARS[2493] = 33; fill_0(CHARS, 2494, 2501, -87); fill_0(CHARS, 2501, 2503, 33); fill_0(CHARS, 2503, 2505, -87); fill_0(CHARS, 2505, 2507, 33); fill_0(CHARS, 2507, 2510, -87); fill_0(CHARS, 2510, 2519, 33); CHARS[2519] = -87; fill_0(CHARS, 2520, 2524, 33); fill_0(CHARS, 2524, 2526, -19); CHARS[2526] = 33; fill_0(CHARS, 2527, 2530, -19); fill_0(CHARS, 2530, 2532, -87); fill_0(CHARS, 2532, 2534, 33); fill_0(CHARS, 2534, 2544, -87); fill_0(CHARS, 2544, 2546, -19); fill_0(CHARS, 2546, 2562, 33); CHARS[2562] = -87; fill_0(CHARS, 2563, 2565, 33); fill_0(CHARS, 2565, 2571, -19); fill_0(CHARS, 2571, 2575, 33); fill_0(CHARS, 2575, 2577, -19); fill_0(CHARS, 2577, 2579, 33); fill_0(CHARS, 2579, 2601, -19); CHARS[2601] = 33; fill_0(CHARS, 2602, 2609, -19); CHARS[2609] = 33; fill_0(CHARS, 2610, 2612, -19); CHARS[2612] = 33; fill_0(CHARS, 2613, 2615, -19); CHARS[2615] = 33; fill_0(CHARS, 2616, 2618, -19); fill_0(CHARS, 2618, 2620, 33); CHARS[2620] = -87; CHARS[2621] = 33; fill_0(CHARS, 2622, 2627, -87); fill_0(CHARS, 2627, 2631, 33); fill_0(CHARS, 2631, 2633, -87); fill_0(CHARS, 2633, 2635, 33); fill_0(CHARS, 2635, 2638, -87); fill_0(CHARS, 2638, 2649, 33); fill_0(CHARS, 2649, 2653, -19); CHARS[2653] = 33; CHARS[2654] = -19; fill_0(CHARS, 2655, 2662, 33); fill_0(CHARS, 2662, 2674, -87); fill_0(CHARS, 2674, 2677, -19); fill_0(CHARS, 2677, 2689, 33); fill_0(CHARS, 2689, 2692, -87); CHARS[2692] = 33; fill_0(CHARS, 2693, 2700, -19); CHARS[2700] = 33; CHARS[2701] = -19; CHARS[2702] = 33; fill_0(CHARS, 2703, 2706, -19); CHARS[2706] = 33; fill_0(CHARS, 2707, 2729, -19); CHARS[2729] = 33; fill_0(CHARS, 2730, 2737, -19); CHARS[2737] = 33; fill_0(CHARS, 2738, 2740, -19); CHARS[2740] = 33; fill_0(CHARS, 2741, 2746, -19); fill_0(CHARS, 2746, 2748, 33); CHARS[2748] = -87; CHARS[2749] = -19; fill_0(CHARS, 2750, 2758, -87); CHARS[2758] = 33; fill_0(CHARS, 2759, 2762, -87); CHARS[2762] = 33; fill_0(CHARS, 2763, 2766, -87); fill_0(CHARS, 2766, 2784, 33); CHARS[2784] = -19; fill_0(CHARS, 2785, 2790, 33); fill_0(CHARS, 2790, 2800, -87); fill_0(CHARS, 2800, 2817, 33); fill_0(CHARS, 2817, 2820, -87); CHARS[2820] = 33; fill_0(CHARS, 2821, 2829, -19); fill_0(CHARS, 2829, 2831, 33); fill_0(CHARS, 2831, 2833, -19); fill_0(CHARS, 2833, 2835, 33); fill_0(CHARS, 2835, 2857, -19); CHARS[2857] = 33; fill_0(CHARS, 2858, 2865, -19); CHARS[2865] = 33; fill_0(CHARS, 2866, 2868, -19); fill_0(CHARS, 2868, 2870, 33); fill_0(CHARS, 2870, 2874, -19); fill_0(CHARS, 2874, 2876, 33); CHARS[2876] = -87; CHARS[2877] = -19; fill_0(CHARS, 2878, 2884, -87); fill_0(CHARS, 2884, 2887, 33); fill_0(CHARS, 2887, 2889, -87); fill_0(CHARS, 2889, 2891, 33); fill_0(CHARS, 2891, 2894, -87); fill_0(CHARS, 2894, 2902, 33); fill_0(CHARS, 2902, 2904, -87); fill_0(CHARS, 2904, 2908, 33); fill_0(CHARS, 2908, 2910, -19); CHARS[2910] = 33; fill_0(CHARS, 2911, 2914, -19); fill_0(CHARS, 2914, 2918, 33); fill_0(CHARS, 2918, 2928, -87); fill_0(CHARS, 2928, 2946, 33); fill_0(CHARS, 2946, 2948, -87); CHARS[2948] = 33; fill_0(CHARS, 2949, 2955, -19); fill_0(CHARS, 2955, 2958, 33); fill_0(CHARS, 2958, 2961, -19); CHARS[2961] = 33; fill_0(CHARS, 2962, 2966, -19); fill_0(CHARS, 2966, 2969, 33); fill_0(CHARS, 2969, 2971, -19); CHARS[2971] = 33; CHARS[2972] = -19; CHARS[2973] = 33; fill_0(CHARS, 2974, 2976, -19); fill_0(CHARS, 2976, 2979, 33); fill_0(CHARS, 2979, 2981, -19); fill_0(CHARS, 2981, 2984, 33); fill_0(CHARS, 2984, 2987, -19); fill_0(CHARS, 2987, 2990, 33); fill_0(CHARS, 2990, 2998, -19); CHARS[2998] = 33; fill_0(CHARS, 2999, 3002, -19); fill_0(CHARS, 3002, 3006, 33); fill_0(CHARS, 3006, 3011, -87); fill_0(CHARS, 3011, 3014, 33); fill_0(CHARS, 3014, 3017, -87); CHARS[3017] = 33; fill_0(CHARS, 3018, 3022, -87); fill_0(CHARS, 3022, 3031, 33); CHARS[3031] = -87; fill_0(CHARS, 3032, 3047, 33); fill_0(CHARS, 3047, 3056, -87); fill_0(CHARS, 3056, 3073, 33); fill_0(CHARS, 3073, 3076, -87); CHARS[3076] = 33; fill_0(CHARS, 3077, 3085, -19); CHARS[3085] = 33; fill_0(CHARS, 3086, 3089, -19); CHARS[3089] = 33; fill_0(CHARS, 3090, 3113, -19); CHARS[3113] = 33; fill_0(CHARS, 3114, 3124, -19); CHARS[3124] = 33; fill_0(CHARS, 3125, 3130, -19); fill_0(CHARS, 3130, 3134, 33); fill_0(CHARS, 3134, 3141, -87); CHARS[3141] = 33; fill_0(CHARS, 3142, 3145, -87); CHARS[3145] = 33; fill_0(CHARS, 3146, 3150, -87); fill_0(CHARS, 3150, 3157, 33); fill_0(CHARS, 3157, 3159, -87); fill_0(CHARS, 3159, 3168, 33); fill_0(CHARS, 3168, 3170, -19); fill_0(CHARS, 3170, 3174, 33); fill_0(CHARS, 3174, 3184, -87); fill_0(CHARS, 3184, 3202, 33); fill_0(CHARS, 3202, 3204, -87); CHARS[3204] = 33; fill_0(CHARS, 3205, 3213, -19); CHARS[3213] = 33; fill_0(CHARS, 3214, 3217, -19); CHARS[3217] = 33; fill_0(CHARS, 3218, 3241, -19); CHARS[3241] = 33; fill_0(CHARS, 3242, 3252, -19); CHARS[3252] = 33; fill_0(CHARS, 3253, 3258, -19); fill_0(CHARS, 3258, 3262, 33); fill_0(CHARS, 3262, 3269, -87); CHARS[3269] = 33; fill_0(CHARS, 3270, 3273, -87); CHARS[3273] = 33; fill_0(CHARS, 3274, 3278, -87); fill_0(CHARS, 3278, 3285, 33); fill_0(CHARS, 3285, 3287, -87); fill_0(CHARS, 3287, 3294, 33); CHARS[3294] = -19; CHARS[3295] = 33; fill_0(CHARS, 3296, 3298, -19); fill_0(CHARS, 3298, 3302, 33); fill_0(CHARS, 3302, 3312, -87); fill_0(CHARS, 3312, 3330, 33); fill_0(CHARS, 3330, 3332, -87); CHARS[3332] = 33; fill_0(CHARS, 3333, 3341, -19); CHARS[3341] = 33; fill_0(CHARS, 3342, 3345, -19); CHARS[3345] = 33; fill_0(CHARS, 3346, 3369, -19); CHARS[3369] = 33; fill_0(CHARS, 3370, 3386, -19); fill_0(CHARS, 3386, 3390, 33); fill_0(CHARS, 3390, 3396, -87); fill_0(CHARS, 3396, 3398, 33); fill_0(CHARS, 3398, 3401, -87); CHARS[3401] = 33; fill_0(CHARS, 3402, 3406, -87); fill_0(CHARS, 3406, 3415, 33); CHARS[3415] = -87; fill_0(CHARS, 3416, 3424, 33); fill_0(CHARS, 3424, 3426, -19); fill_0(CHARS, 3426, 3430, 33); fill_0(CHARS, 3430, 3440, -87); fill_0(CHARS, 3440, 3585, 33); fill_0(CHARS, 3585, 3631, -19); CHARS[3631] = 33; CHARS[3632] = -19; CHARS[3633] = -87; fill_0(CHARS, 3634, 3636, -19); fill_0(CHARS, 3636, 3643, -87); fill_0(CHARS, 3643, 3648, 33); fill_0(CHARS, 3648, 3654, -19); fill_0(CHARS, 3654, 3663, -87); CHARS[3663] = 33; fill_0(CHARS, 3664, 3674, -87); fill_0(CHARS, 3674, 3713, 33); fill_0(CHARS, 3713, 3715, -19); CHARS[3715] = 33; CHARS[3716] = -19; fill_0(CHARS, 3717, 3719, 33); fill_0(CHARS, 3719, 3721, -19); CHARS[3721] = 33; CHARS[3722] = -19; fill_0(CHARS, 3723, 3725, 33); CHARS[3725] = -19; fill_0(CHARS, 3726, 3732, 33); fill_0(CHARS, 3732, 3736, -19); CHARS[3736] = 33; fill_0(CHARS, 3737, 3744, -19); CHARS[3744] = 33; fill_0(CHARS, 3745, 3748, -19); CHARS[3748] = 33; CHARS[3749] = -19; CHARS[3750] = 33; CHARS[3751] = -19; fill_0(CHARS, 3752, 3754, 33); fill_0(CHARS, 3754, 3756, -19); CHARS[3756] = 33; fill_0(CHARS, 3757, 3759, -19); CHARS[3759] = 33; CHARS[3760] = -19; CHARS[3761] = -87; fill_0(CHARS, 3762, 3764, -19); fill_0(CHARS, 3764, 3770, -87); CHARS[3770] = 33; fill_0(CHARS, 3771, 3773, -87); CHARS[3773] = -19; fill_0(CHARS, 3774, 3776, 33); fill_0(CHARS, 3776, 3781, -19); CHARS[3781] = 33; CHARS[3782] = -87; CHARS[3783] = 33; fill_0(CHARS, 3784, 3790, -87); fill_0(CHARS, 3790, 3792, 33); fill_0(CHARS, 3792, 3802, -87); fill_0(CHARS, 3802, 3864, 33); fill_0(CHARS, 3864, 3866, -87); fill_0(CHARS, 3866, 3872, 33); fill_0(CHARS, 3872, 3882, -87); fill_0(CHARS, 3882, 3893, 33); CHARS[3893] = -87; CHARS[3894] = 33; CHARS[3895] = -87; CHARS[3896] = 33; CHARS[3897] = -87; fill_0(CHARS, 3898, 3902, 33); fill_0(CHARS, 3902, 3904, -87); fill_0(CHARS, 3904, 3912, -19); CHARS[3912] = 33; fill_0(CHARS, 3913, 3946, -19); fill_0(CHARS, 3946, 3953, 33); fill_0(CHARS, 3953, 3973, -87); CHARS[3973] = 33; fill_0(CHARS, 3974, 3980, -87); fill_0(CHARS, 3980, 3984, 33); fill_0(CHARS, 3984, 3990, -87); CHARS[3990] = 33; CHARS[3991] = -87; CHARS[3992] = 33; fill_0(CHARS, 3993, 4014, -87); fill_0(CHARS, 4014, 4017, 33); fill_0(CHARS, 4017, 4024, -87); CHARS[4024] = 33; CHARS[4025] = -87; fill_0(CHARS, 4026, 4256, 33); fill_0(CHARS, 4256, 4294, -19); fill_0(CHARS, 4294, 4304, 33); fill_0(CHARS, 4304, 4343, -19); fill_0(CHARS, 4343, 4352, 33); CHARS[4352] = -19; CHARS[4353] = 33; fill_0(CHARS, 4354, 4356, -19); CHARS[4356] = 33; fill_0(CHARS, 4357, 4360, -19); CHARS[4360] = 33; CHARS[4361] = -19; CHARS[4362] = 33; fill_0(CHARS, 4363, 4365, -19); CHARS[4365] = 33; fill_0(CHARS, 4366, 4371, -19); fill_0(CHARS, 4371, 4412, 33); CHARS[4412] = -19; CHARS[4413] = 33; CHARS[4414] = -19; CHARS[4415] = 33; CHARS[4416] = -19; fill_0(CHARS, 4417, 4428, 33); CHARS[4428] = -19; CHARS[4429] = 33; CHARS[4430] = -19; CHARS[4431] = 33; CHARS[4432] = -19; fill_0(CHARS, 4433, 4436, 33); fill_0(CHARS, 4436, 4438, -19); fill_0(CHARS, 4438, 4441, 33); CHARS[4441] = -19; fill_0(CHARS, 4442, 4447, 33); fill_0(CHARS, 4447, 4450, -19); CHARS[4450] = 33; CHARS[4451] = -19; CHARS[4452] = 33; CHARS[4453] = -19; CHARS[4454] = 33; CHARS[4455] = -19; CHARS[4456] = 33; CHARS[4457] = -19; fill_0(CHARS, 4458, 4461, 33); fill_0(CHARS, 4461, 4463, -19); fill_0(CHARS, 4463, 4466, 33); fill_0(CHARS, 4466, 4468, -19); CHARS[4468] = 33; CHARS[4469] = -19; fill_0(CHARS, 4470, 4510, 33); CHARS[4510] = -19; fill_0(CHARS, 4511, 4520, 33); CHARS[4520] = -19; fill_0(CHARS, 4521, 4523, 33); CHARS[4523] = -19; fill_0(CHARS, 4524, 4526, 33); fill_0(CHARS, 4526, 4528, -19); fill_0(CHARS, 4528, 4535, 33); fill_0(CHARS, 4535, 4537, -19); CHARS[4537] = 33; CHARS[4538] = -19; CHARS[4539] = 33; fill_0(CHARS, 4540, 4547, -19); fill_0(CHARS, 4547, 4587, 33); CHARS[4587] = -19; fill_0(CHARS, 4588, 4592, 33); CHARS[4592] = -19; fill_0(CHARS, 4593, 4601, 33); CHARS[4601] = -19; fill_0(CHARS, 4602, 7680, 33); fill_0(CHARS, 7680, 7836, -19); fill_0(CHARS, 7836, 7840, 33); fill_0(CHARS, 7840, 7930, -19); fill_0(CHARS, 7930, 7936, 33); fill_0(CHARS, 7936, 7958, -19); fill_0(CHARS, 7958, 7960, 33); fill_0(CHARS, 7960, 7966, -19); fill_0(CHARS, 7966, 7968, 33); fill_0(CHARS, 7968, 8006, -19); fill_0(CHARS, 8006, 8008, 33); fill_0(CHARS, 8008, 8014, -19); fill_0(CHARS, 8014, 8016, 33); fill_0(CHARS, 8016, 8024, -19); CHARS[8024] = 33; CHARS[8025] = -19; CHARS[8026] = 33; CHARS[8027] = -19; CHARS[8028] = 33; CHARS[8029] = -19; CHARS[8030] = 33; fill_0(CHARS, 8031, 8062, -19); fill_0(CHARS, 8062, 8064, 33); fill_0(CHARS, 8064, 8117, -19); CHARS[8117] = 33; fill_0(CHARS, 8118, 8125, -19); CHARS[8125] = 33; CHARS[8126] = -19; fill_0(CHARS, 8127, 8130, 33); fill_0(CHARS, 8130, 8133, -19); CHARS[8133] = 33; fill_0(CHARS, 8134, 8141, -19); fill_0(CHARS, 8141, 8144, 33); fill_0(CHARS, 8144, 8148, -19); fill_0(CHARS, 8148, 8150, 33); fill_0(CHARS, 8150, 8156, -19); fill_0(CHARS, 8156, 8160, 33); fill_0(CHARS, 8160, 8173, -19); fill_0(CHARS, 8173, 8178, 33); fill_0(CHARS, 8178, 8181, -19); CHARS[8181] = 33; fill_0(CHARS, 8182, 8189, -19); fill_0(CHARS, 8189, 8400, 33); fill_0(CHARS, 8400, 8413, -87); fill_0(CHARS, 8413, 8417, 33); CHARS[8417] = -87; fill_0(CHARS, 8418, 8486, 33); CHARS[8486] = -19; fill_0(CHARS, 8487, 8490, 33); fill_0(CHARS, 8490, 8492, -19); fill_0(CHARS, 8492, 8494, 33); CHARS[8494] = -19; fill_0(CHARS, 8495, 8576, 33); fill_0(CHARS, 8576, 8579, -19); fill_0(CHARS, 8579, 12293, 33); CHARS[12293] = -87; CHARS[12294] = 33; CHARS[12295] = -19; fill_0(CHARS, 12296, 12321, 33); fill_0(CHARS, 12321, 12330, -19); fill_0(CHARS, 12330, 12336, -87); CHARS[12336] = 33; fill_0(CHARS, 12337, 12342, -87); fill_0(CHARS, 12342, 12353, 33); fill_0(CHARS, 12353, 12437, -19); fill_0(CHARS, 12437, 12441, 33); fill_0(CHARS, 12441, 12443, -87); fill_0(CHARS, 12443, 12445, 33); fill_0(CHARS, 12445, 12447, -87); fill_0(CHARS, 12447, 12449, 33); fill_0(CHARS, 12449, 12539, -19); CHARS[12539] = 33; fill_0(CHARS, 12540, 12543, -87); fill_0(CHARS, 12543, 12549, 33); fill_0(CHARS, 12549, 12589, -19); fill_0(CHARS, 12589, 19968, 33); fill_0(CHARS, 19968, 40870, -19); fill_0(CHARS, 40870, 44032, 33); fill_0(CHARS, 44032, 55204, -19); fill_0(CHARS, 55204, $intern_65, 33); fill_0(CHARS, 57344, 65534, 33); } var CHARS; function RegEx$ParseException(mes){ RuntimeException_0.call(this, mes); } defineClass(55, 63, $intern_44, RegEx$ParseException); var Lorg_eclipse_emf_ecore_xml_type_internal_RegEx$ParseException_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.internal', 'RegEx/ParseException', 55); function $next_16(this$static){ var ch_0, low, ret; if (this$static.offset >= this$static.regexlen) { this$static.chardata = -1; this$static.nexttoken = 1; return; } ch_0 = $charAt(this$static.regex, this$static.offset++); this$static.chardata = ch_0; if (this$static.context == 1) { switch (ch_0) { case 92: ret = 10; if (this$static.offset >= this$static.regexlen) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.next.1')))); this$static.chardata = $charAt(this$static.regex, this$static.offset++); break; case 45: if ((this$static.options_0 & 512) == 512 && this$static.offset < this$static.regexlen && $charAt(this$static.regex, this$static.offset) == 91) { ++this$static.offset; ret = 24; } else ret = 0; break; case 91: if ((this$static.options_0 & 512) != 512 && this$static.offset < this$static.regexlen && $charAt(this$static.regex, this$static.offset) == 58) { ++this$static.offset; ret = 20; break; } default:if ((ch_0 & 64512) == $intern_65 && this$static.offset < this$static.regexlen) { low = $charAt(this$static.regex, this$static.offset); if ((low & 64512) == 56320) { this$static.chardata = $intern_64 + (ch_0 - $intern_65 << 10) + low - 56320; ++this$static.offset; } } ret = 0; } this$static.nexttoken = ret; return; } switch (ch_0) { case 124: ret = 2; break; case 42: ret = 3; break; case 43: ret = 4; break; case 63: ret = 5; break; case 41: ret = 7; break; case 46: ret = 8; break; case 91: ret = 9; break; case 94: ret = 11; break; case 36: ret = 12; break; case 40: ret = 6; if (this$static.offset >= this$static.regexlen) break; if ($charAt(this$static.regex, this$static.offset) != 63) break; if (++this$static.offset >= this$static.regexlen) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.next.2')))); ch_0 = $charAt(this$static.regex, this$static.offset++); switch (ch_0) { case 58: ret = 13; break; case 61: ret = 14; break; case 33: ret = 15; break; case 91: ret = 19; break; case 62: ret = 18; break; case 60: if (this$static.offset >= this$static.regexlen) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.next.2')))); ch_0 = $charAt(this$static.regex, this$static.offset++); if (ch_0 == 61) { ret = 16; } else if (ch_0 == 33) { ret = 17; } else throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.next.3')))); break; case 35: while (this$static.offset < this$static.regexlen) { ch_0 = $charAt(this$static.regex, this$static.offset++); if (ch_0 == 41) break; } if (ch_0 != 41) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.next.4')))); ret = 21; break; default:if (ch_0 == 45 || 97 <= ch_0 && ch_0 <= 122 || 65 <= ch_0 && ch_0 <= 90) { --this$static.offset; ret = 22; break; } else if (ch_0 == 40) { ret = 23; break; } throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.next.2')))); } break; case 92: ret = 10; if (this$static.offset >= this$static.regexlen) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.next.1')))); this$static.chardata = $charAt(this$static.regex, this$static.offset++); break; default:ret = 0; } this$static.nexttoken = ret; } function $parse_3(this$static, regex, options){ var i, position, ret; this$static.options_0 = options; this$static.offset = 0; this$static.context = 0; this$static.parennumber = 1; this$static.regex = regex; (this$static.options_0 & 16) == 16 && (this$static.regex = stripExtendedComment(this$static.regex)); this$static.regexlen = this$static.regex.length; $next_16(this$static); ret = $parseRegex(this$static); if (this$static.offset != this$static.regexlen) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.parse.1')))); if (this$static.references) { for (i = 0; i < this$static.references.arrayList.array.length; i++) { position = castTo($elementAt(this$static.references, i), 592); if (this$static.parennumber <= position.refNumber) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.parse.2')))); } this$static.references.arrayList.array.length = 0; } return ret; } function $parseAtom(this$static){ var ch_0, ch2, high, sur, tok; ch_0 = this$static.nexttoken; tok = null; switch (ch_0) { case 6: return this$static.processParen(); case 13: return this$static.processParen2(); case 23: return this$static.processCondition(); case 22: return this$static.processModifiers(); case 18: return this$static.processIndependent(); case 8: $next_16(this$static); tok = ($clinit_RegEx$Token() , token_dot); break; case 9: return this$static.parseCharacterClass(true); case 19: return this$static.parseSetOperations(); case 10: switch (this$static.chardata) { case 100: case 68: case 119: case 87: case 115: case 83: tok = this$static.getTokenForShorthand(this$static.chardata); $next_16(this$static); return tok; case 101: case 102: case 110: case 114: case 116: case 117: case 118: case 120: { ch2 = this$static.decodeEscaped(); ch2 < $intern_64?(tok = ($clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$Token$CharToken(0, ch2))):(tok = createString_0(decomposeToSurrogates(ch2))); } break; case 99: return this$static.processBacksolidus_c(); case 67: return this$static.processBacksolidus_C(); case 105: return this$static.processBacksolidus_i(); case 73: return this$static.processBacksolidus_I(); case 103: return this$static.processBacksolidus_g(); case 88: return this$static.processBacksolidus_X(); case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: return this$static.processBackreference(); case 80: case 112: tok = $processBacksolidus_pP(this$static, this$static.chardata); if (!tok) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.atom.5')))); break; default:tok = createChar(this$static.chardata); } $next_16(this$static); break; case 0: if (this$static.chardata == 93 || this$static.chardata == 123 || this$static.chardata == 125) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.atom.4')))); tok = createChar(this$static.chardata); high = this$static.chardata; $next_16(this$static); if ((high & 64512) == $intern_65 && this$static.nexttoken == 0 && (this$static.chardata & 64512) == 56320) { sur = initUnidimensionalArray(C_classLit, $intern_45, 28, 2, 15, 1); sur[0] = high & $intern_47; sur[1] = this$static.chardata & $intern_47; tok = createParen(createString_0(valueOf_8(sur, 0, sur.length)), 0); $next_16(this$static); } break; default:throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.atom.4')))); } return tok; } function $parseFactor(this$static){ var ch_0, max_0, min_0, off, tok; ch_0 = this$static.nexttoken; switch (ch_0) { case 11: return this$static.processCaret(); case 12: return this$static.processDollar(); case 14: return this$static.processLookahead(); case 15: return this$static.processNegativelookahead(); case 16: return this$static.processLookbehind(); case 17: return this$static.processNegativelookbehind(); case 21: $next_16(this$static); return $clinit_RegEx$Token() , $clinit_RegEx$Token() , token_empty; case 10: switch (this$static.chardata) { case 65: return this$static.processBacksolidus_A(); case 90: return this$static.processBacksolidus_Z(); case 122: return this$static.processBacksolidus_z(); case 98: return this$static.processBacksolidus_b(); case 66: return this$static.processBacksolidus_B(); case 60: return this$static.processBacksolidus_lt(); case 62: return this$static.processBacksolidus_gt(); } } tok = $parseAtom(this$static); ch_0 = this$static.nexttoken; switch (ch_0) { case 3: return this$static.processStar(tok); case 4: return this$static.processPlus(tok); case 5: return this$static.processQuestion(tok); case 0: if (this$static.chardata == 123 && this$static.offset < this$static.regexlen) { off = this$static.offset; min_0 = 0; max_0 = -1; if ((ch_0 = $charAt(this$static.regex, off++)) >= 48 && ch_0 <= 57) { min_0 = ch_0 - 48; while (off < this$static.regexlen && (ch_0 = $charAt(this$static.regex, off++)) >= 48 && ch_0 <= 57) { min_0 = min_0 * 10 + ch_0 - 48; if (min_0 < 0) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.quantifier.5')))); } } else { throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.quantifier.1')))); } max_0 = min_0; if (ch_0 == 44) { if (off >= this$static.regexlen) { throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.quantifier.3')))); } else if ((ch_0 = $charAt(this$static.regex, off++)) >= 48 && ch_0 <= 57) { max_0 = ch_0 - 48; while (off < this$static.regexlen && (ch_0 = $charAt(this$static.regex, off++)) >= 48 && ch_0 <= 57) { max_0 = max_0 * 10 + ch_0 - 48; if (max_0 < 0) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.quantifier.5')))); } if (min_0 > max_0) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.quantifier.4')))); } else { max_0 = -1; } } if (ch_0 != 125) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.quantifier.2')))); if (this$static.checkQuestion(off)) { tok = ($clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$Token$ClosureToken(9, tok)); this$static.offset = off + 1; } else { tok = ($clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$Token$ClosureToken(3, tok)); this$static.offset = off; } tok.setMin(min_0); tok.setMax(max_0); $next_16(this$static); } } return tok; } function $parseRegex(this$static){ var parent_0, tok; tok = $parseTerm(this$static); parent_0 = null; while (this$static.nexttoken == 2) { $next_16(this$static); if (!parent_0) { parent_0 = ($clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$Token$UnionToken(2)); $addChild_0(parent_0, tok); tok = parent_0; } tok.addChild($parseTerm(this$static)); } return tok; } function $parseTerm(this$static){ var ch_0, concat, tok; ch_0 = this$static.nexttoken; if (ch_0 == 2 || ch_0 == 7 || ch_0 == 1) { return $clinit_RegEx$Token() , $clinit_RegEx$Token() , token_empty; } else { tok = $parseFactor(this$static); concat = null; while ((ch_0 = this$static.nexttoken) != 2 && ch_0 != 7 && ch_0 != 1) { if (!concat) { concat = ($clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$Token$UnionToken(1)); $addChild_0(concat, tok); tok = concat; } $addChild_0(concat, $parseFactor(this$static)); } return tok; } } function $processBacksolidus_pP(this$static, c){ var nameend, namestart, pname, positive; $next_16(this$static); if (this$static.nexttoken != 0 || this$static.chardata != 123) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.atom.2')))); positive = c == 112; namestart = this$static.offset; nameend = $indexOf_0(this$static.regex, 125, namestart); if (nameend < 0) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.atom.3')))); pname = $substring_1(this$static.regex, namestart, nameend); this$static.offset = nameend + 1; return getRange_1(pname, positive, (this$static.options_0 & 512) == 512); } function RegEx$RegexParser(){ } function hexChar(ch_0){ if (ch_0 < 48) return -1; if (ch_0 > 102) return -1; if (ch_0 <= 57) return ch_0 - 48; if (ch_0 < 65) return -1; if (ch_0 <= 70) return ch_0 - 65 + 10; if (ch_0 < 97) return -1; return ch_0 - 97 + 10; } defineClass(836, 1, {}, RegEx$RegexParser); _.checkQuestion = function checkQuestion(off){ return off < this.regexlen && $charAt(this.regex, off) == 63; } ; _.decodeEscaped = function decodeEscaped(){ var c, uv, uv0, v1, v10; if (this.nexttoken != 10) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.next.1')))); c = this.chardata; switch (c) { case 101: c = 27; break; case 102: c = 12; break; case 110: c = 10; break; case 114: c = 13; break; case 116: c = 9; break; case 120: $next_16(this); if (this.nexttoken != 0) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.descape.1')))); if (this.chardata == 123) { v10 = 0; uv0 = 0; do { $next_16(this); if (this.nexttoken != 0) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.descape.1')))); if ((v10 = hexChar(this.chardata)) < 0) break; if (uv0 > uv0 * 16) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.descape.2')))); uv0 = uv0 * 16 + v10; } while (true); if (this.chardata != 125) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.descape.3')))); if (uv0 > $intern_168) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.descape.4')))); c = uv0; } else { v10 = 0; if (this.nexttoken != 0 || (v10 = hexChar(this.chardata)) < 0) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.descape.1')))); uv0 = v10; $next_16(this); if (this.nexttoken != 0 || (v10 = hexChar(this.chardata)) < 0) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.descape.1')))); uv0 = uv0 * 16 + v10; c = uv0; } break; case 117: v1 = 0; $next_16(this); if (this.nexttoken != 0 || (v1 = hexChar(this.chardata)) < 0) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.descape.1')))); uv = v1; $next_16(this); if (this.nexttoken != 0 || (v1 = hexChar(this.chardata)) < 0) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.descape.1')))); uv = uv * 16 + v1; $next_16(this); if (this.nexttoken != 0 || (v1 = hexChar(this.chardata)) < 0) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.descape.1')))); uv = uv * 16 + v1; $next_16(this); if (this.nexttoken != 0 || (v1 = hexChar(this.chardata)) < 0) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.descape.1')))); uv = uv * 16 + v1; c = uv; break; case 118: $next_16(this); if (this.nexttoken != 0 || (v1 = hexChar(this.chardata)) < 0) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.descape.1')))); uv = v1; $next_16(this); if (this.nexttoken != 0 || (v1 = hexChar(this.chardata)) < 0) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.descape.1')))); uv = uv * 16 + v1; $next_16(this); if (this.nexttoken != 0 || (v1 = hexChar(this.chardata)) < 0) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.descape.1')))); uv = uv * 16 + v1; $next_16(this); if (this.nexttoken != 0 || (v1 = hexChar(this.chardata)) < 0) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.descape.1')))); uv = uv * 16 + v1; $next_16(this); if (this.nexttoken != 0 || (v1 = hexChar(this.chardata)) < 0) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.descape.1')))); uv = uv * 16 + v1; $next_16(this); if (this.nexttoken != 0 || (v1 = hexChar(this.chardata)) < 0) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.descape.1')))); uv = uv * 16 + v1; if (uv > $intern_168) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.descappe.4')))); c = uv; break; case 65: case 90: case 122: throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.descape.5')))); } return c; } ; _.getTokenForShorthand = function getTokenForShorthand(ch_0){ var number, tok; switch (ch_0) { case 100: tok = (this.options_0 & 32) == 32?getRange_0('Nd', true):($clinit_RegEx$Token() , token_0to9); break; case 68: tok = (this.options_0 & 32) == 32?getRange_0('Nd', false):($clinit_RegEx$Token() , token_not_0to9); break; case 119: tok = (this.options_0 & 32) == 32?getRange_0('IsWord', true):($clinit_RegEx$Token() , token_wordchars); break; case 87: tok = (this.options_0 & 32) == 32?getRange_0('IsWord', false):($clinit_RegEx$Token() , token_not_wordchars); break; case 115: tok = (this.options_0 & 32) == 32?getRange_0('IsSpace', true):($clinit_RegEx$Token() , token_spaces); break; case 83: tok = (this.options_0 & 32) == 32?getRange_0('IsSpace', false):($clinit_RegEx$Token() , token_not_spaces); break; default:throw toJs(new RuntimeException_0((number = ch_0 , 'Internal Error: shorthands: \\u' + number.toString(16)))); } return tok; } ; _.parseCharacterClass = function parseCharacterClass(useNrange){ var base, c, end, firstloop, name_0, nameend, positive, range, rangeend, tok, tok2, type_0; this.context = 1; $next_16(this); base = null; if (this.nexttoken == 0 && this.chardata == 94) { $next_16(this); if (useNrange) { tok = ($clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$RangeToken(5)); } else { base = ($clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$RangeToken(4)); $addRange(base, 0, $intern_168); tok = (null , ++tokens_0 , new RegEx$RangeToken(4)); } } else { tok = ($clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$RangeToken(4)); } firstloop = true; while ((type_0 = this.nexttoken) != 1) { if (type_0 == 0 && this.chardata == 93 && !firstloop) break; firstloop = false; c = this.chardata; end = false; if (type_0 == 10) { switch (c) { case 100: case 68: case 119: case 87: case 115: case 83: $mergeRanges(tok, this.getTokenForShorthand(c)); end = true; break; case 105: case 73: case 99: case 67: c = this.processCIinCharacterClass(tok, c); c < 0 && (end = true); break; case 112: case 80: tok2 = $processBacksolidus_pP(this, c); if (!tok2) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.atom.5')))); $mergeRanges(tok, tok2); end = true; break; default:c = this.decodeEscaped(); } } else if (type_0 == 20) { nameend = $indexOf_0(this.regex, 58, this.offset); if (nameend < 0) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.cc.1')))); positive = true; if ($charAt(this.regex, this.offset) == 94) { ++this.offset; positive = false; } name_0 = $substring_1(this.regex, this.offset, nameend); range = getRange_1(name_0, positive, (this.options_0 & 512) == 512); if (!range) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.cc.3')))); $mergeRanges(tok, range); end = true; if (nameend + 1 >= this.regexlen || $charAt(this.regex, nameend + 1) != 93) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.cc.1')))); this.offset = nameend + 2; } $next_16(this); if (!end) { if (this.nexttoken != 0 || this.chardata != 45) { $addRange(tok, c, c); } else { $next_16(this); if ((type_0 = this.nexttoken) == 1) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.cc.2')))); if (type_0 == 0 && this.chardata == 93) { $addRange(tok, c, c); $addRange(tok, 45, 45); } else { rangeend = this.chardata; type_0 == 10 && (rangeend = this.decodeEscaped()); $next_16(this); $addRange(tok, c, rangeend); } } } (this.options_0 & $intern_35) == $intern_35 && this.nexttoken == 0 && this.chardata == 44 && $next_16(this); } if (this.nexttoken == 1) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.cc.2')))); if (base) { $subtractRanges(base, tok); tok = base; } $sortRanges(tok); $compactRanges(tok); this.context = 0; $next_16(this); return tok; } ; _.parseSetOperations = function parseSetOperations(){ var ch_0, t2, tok, type_0; tok = this.parseCharacterClass(false); while ((type_0 = this.nexttoken) != 7) { ch_0 = this.chardata; if (type_0 == 0 && (ch_0 == 45 || ch_0 == 38) || type_0 == 4) { $next_16(this); if (this.nexttoken != 9) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.ope.1')))); t2 = this.parseCharacterClass(false); if (type_0 == 4) $mergeRanges(tok, t2); else if (ch_0 == 45) $subtractRanges(tok, t2); else if (ch_0 == 38) $intersectRanges(tok, t2); else throw toJs(new RuntimeException_0('ASSERT')); } else { throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.ope.2')))); } } $next_16(this); return tok; } ; _.processBackreference = function processBackreference(){ var refnum, tok; refnum = this.chardata - 48; tok = ($clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$Token$StringToken(12, null, refnum)); !this.references && (this.references = new Vector); $addElement(this.references, new RegEx$RegexParser$ReferencePosition(refnum)); $next_16(this); return tok; } ; _.processBacksolidus_A = function processBacksolidus_A(){ $next_16(this); return $clinit_RegEx$Token() , token_stringbeginning; } ; _.processBacksolidus_B = function processBacksolidus_B(){ $next_16(this); return $clinit_RegEx$Token() , token_not_wordedge; } ; _.processBacksolidus_C = function processBacksolidus_C(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processBacksolidus_I = function processBacksolidus_I(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processBacksolidus_X = function processBacksolidus_X(){ $next_16(this); return getCombiningCharacterSequence(); } ; _.processBacksolidus_Z = function processBacksolidus_Z(){ $next_16(this); return $clinit_RegEx$Token() , token_stringend2; } ; _.processBacksolidus_b = function processBacksolidus_b(){ $next_16(this); return $clinit_RegEx$Token() , token_wordedge; } ; _.processBacksolidus_c = function processBacksolidus_c(){ var ch2; if (this.offset >= this.regexlen || ((ch2 = $charAt(this.regex, this.offset++)) & 65504) != 64) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.atom.1')))); $next_16(this); return $clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$Token$CharToken(0, ch2 - 64); } ; _.processBacksolidus_g = function processBacksolidus_g(){ $next_16(this); return getGraphemePattern(); } ; _.processBacksolidus_gt = function processBacksolidus_gt(){ $next_16(this); return $clinit_RegEx$Token() , token_wordend; } ; _.processBacksolidus_i = function processBacksolidus_i(){ var tok; tok = ($clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$Token$CharToken(0, 105)); $next_16(this); return tok; } ; _.processBacksolidus_lt = function processBacksolidus_lt(){ $next_16(this); return $clinit_RegEx$Token() , token_wordbeginning; } ; _.processBacksolidus_z = function processBacksolidus_z(){ $next_16(this); return $clinit_RegEx$Token() , token_stringend; } ; _.processCIinCharacterClass = function processCIinCharacterClass(tok, c){ return this.decodeEscaped(); } ; _.processCaret = function processCaret(){ $next_16(this); return $clinit_RegEx$Token() , token_linebeginning; } ; _.processCondition = function processCondition(){ var ch_0, condition, noPattern, refno, yesPattern; if (this.offset + 1 >= this.regexlen) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.factor.4')))); refno = -1; condition = null; ch_0 = $charAt(this.regex, this.offset); if (49 <= ch_0 && ch_0 <= 57) { refno = ch_0 - 48; !this.references && (this.references = new Vector); $addElement(this.references, new RegEx$RegexParser$ReferencePosition(refno)); ++this.offset; if ($charAt(this.regex, this.offset) != 41) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.factor.1')))); ++this.offset; } else { ch_0 == 63 && --this.offset; $next_16(this); condition = $parseFactor(this); switch (condition.type_0) { case 20: case 21: case 22: case 23: break; case 8: if (this.nexttoken != 7) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.factor.1')))); break; default:throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.factor.5')))); } } $next_16(this); yesPattern = $parseRegex(this); noPattern = null; if (yesPattern.type_0 == 2) { if (yesPattern.size_2() != 2) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.factor.6')))); noPattern = yesPattern.getChild(1); yesPattern = yesPattern.getChild(0); } if (this.nexttoken != 7) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.factor.1')))); $next_16(this); return $clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$Token$ConditionToken(refno, condition, yesPattern, noPattern); } ; _.processDollar = function processDollar(){ $next_16(this); return $clinit_RegEx$Token() , token_lineend; } ; _.processIndependent = function processIndependent(){ var tok; $next_16(this); tok = createLook(24, $parseRegex(this)); if (this.nexttoken != 7) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.factor.1')))); $next_16(this); return tok; } ; _.processLookahead = function processLookahead(){ var tok; $next_16(this); tok = createLook(20, $parseRegex(this)); if (this.nexttoken != 7) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.factor.1')))); $next_16(this); return tok; } ; _.processLookbehind = function processLookbehind(){ var tok; $next_16(this); tok = createLook(22, $parseRegex(this)); if (this.nexttoken != 7) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.factor.1')))); $next_16(this); return tok; } ; _.processModifiers = function processModifiers(){ var add_0, ch_0, mask, tok, v; add_0 = 0; mask = 0; ch_0 = -1; while (this.offset < this.regexlen) { ch_0 = $charAt(this.regex, this.offset); v = getOptionValue(ch_0); if (v == 0) break; add_0 |= v; ++this.offset; } if (this.offset >= this.regexlen) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.factor.2')))); if (ch_0 == 45) { ++this.offset; while (this.offset < this.regexlen) { ch_0 = $charAt(this.regex, this.offset); v = getOptionValue(ch_0); if (v == 0) break; mask |= v; ++this.offset; } if (this.offset >= this.regexlen) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.factor.2')))); } if (ch_0 == 58) { ++this.offset; $next_16(this); tok = createModifierGroup($parseRegex(this), add_0, mask); if (this.nexttoken != 7) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.factor.1')))); $next_16(this); } else if (ch_0 == 41) { ++this.offset; $next_16(this); tok = createModifierGroup($parseRegex(this), add_0, mask); } else throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.factor.3')))); return tok; } ; _.processNegativelookahead = function processNegativelookahead(){ var tok; $next_16(this); tok = createLook(21, $parseRegex(this)); if (this.nexttoken != 7) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.factor.1')))); $next_16(this); return tok; } ; _.processNegativelookbehind = function processNegativelookbehind(){ var tok; $next_16(this); tok = createLook(23, $parseRegex(this)); if (this.nexttoken != 7) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.factor.1')))); $next_16(this); return tok; } ; _.processParen = function processParen(){ var p, tok; $next_16(this); p = this.parennumber++; tok = createParen($parseRegex(this), p); if (this.nexttoken != 7) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.factor.1')))); $next_16(this); return tok; } ; _.processParen2 = function processParen2(){ var tok; $next_16(this); tok = createParen($parseRegex(this), 0); if (this.nexttoken != 7) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.factor.1')))); $next_16(this); return tok; } ; _.processPlus = function processPlus(tok){ $next_16(this); if (this.nexttoken == 5) { $next_16(this); return createConcat(tok, ($clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$Token$ClosureToken(9, tok))); } else return createConcat(tok, ($clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$Token$ClosureToken(3, tok))); } ; _.processQuestion = function processQuestion(tok){ var par; $next_16(this); par = ($clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$Token$UnionToken(2)); if (this.nexttoken == 5) { $next_16(this); $addChild_0(par, (null , token_empty)); $addChild_0(par, tok); } else { $addChild_0(par, tok); $addChild_0(par, (null , token_empty)); } return par; } ; _.processStar = function processStar(tok){ $next_16(this); if (this.nexttoken == 5) { $next_16(this); return $clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$Token$ClosureToken(9, tok); } else return $clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$Token$ClosureToken(3, tok); } ; _.chardata = 0; _.context = 0; _.nexttoken = 0; _.offset = 0; _.options_0 = 0; _.parennumber = 1; _.references = null; _.regexlen = 0; var Lorg_eclipse_emf_ecore_xml_type_internal_RegEx$RegexParser_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.internal', 'RegEx/RegexParser', 836); function $decodeEscaped(this$static){ var c; if (this$static.nexttoken != 10) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.next.1')))); c = this$static.chardata; switch (c) { case 110: c = 10; break; case 114: c = 13; break; case 116: c = 9; break; case 92: case 124: case 46: case 94: case 45: case 63: case 42: case 43: case 123: case 125: case 40: case 41: case 91: case 93: break; default:throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } return c; } function $getTokenForShorthand(ch_0){ var number; switch (ch_0) { case 100: return getRange('xml:isDigit', true); case 68: return getRange('xml:isDigit', false); case 119: return getRange('xml:isWord', true); case 87: return getRange('xml:isWord', false); case 115: return getRange('xml:isSpace', true); case 83: return getRange('xml:isSpace', false); case 99: return getRange('xml:isNameChar', true); case 67: return getRange('xml:isNameChar', false); case 105: return getRange('xml:isInitialNameChar', true); case 73: return getRange('xml:isInitialNameChar', false); default:throw toJs(new RuntimeException_0((number = ch_0 , 'Internal Error: shorthands: \\u' + number.toString(16)))); } } function $parseCharacterClass(this$static){ var base, c, end, firstloop, range2, rangeend, tok, tok2, type_0; this$static.context = 1; $next_16(this$static); base = null; if (this$static.nexttoken == 0 && this$static.chardata == 94) { $next_16(this$static); base = ($clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$RangeToken(4)); $addRange(base, 0, $intern_168); tok = (null , ++tokens_0 , new RegEx$RangeToken(4)); } else { tok = ($clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$RangeToken(4)); } firstloop = true; while ((type_0 = this$static.nexttoken) != 1) { if (type_0 == 0 && this$static.chardata == 93 && !firstloop) { if (base) { $subtractRanges(base, tok); tok = base; } break; } c = this$static.chardata; end = false; if (type_0 == 10) { switch (c) { case 100: case 68: case 119: case 87: case 115: case 83: $mergeRanges(tok, $getTokenForShorthand(c)); end = true; break; case 105: case 73: case 99: case 67: c = ($mergeRanges(tok, $getTokenForShorthand(c)) , -1); c < 0 && (end = true); break; case 112: case 80: tok2 = $processBacksolidus_pP(this$static, c); if (!tok2) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.atom.5')))); $mergeRanges(tok, tok2); end = true; break; default:c = $decodeEscaped(this$static); } } else if (type_0 == 24 && !firstloop) { if (base) { $subtractRanges(base, tok); tok = base; } range2 = $parseCharacterClass(this$static); $subtractRanges(tok, range2); if (this$static.nexttoken != 0 || this$static.chardata != 93) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.cc.5')))); break; } $next_16(this$static); if (!end) { if (type_0 == 0) { if (c == 91) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.cc.6')))); if (c == 93) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.cc.7')))); if (c == 45 && !firstloop && this$static.chardata != 93) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.cc.8')))); } if (this$static.nexttoken != 0 || this$static.chardata != 45 || c == 45 && firstloop) { $addRange(tok, c, c); } else { $next_16(this$static); if ((type_0 = this$static.nexttoken) == 1) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.cc.2')))); if (type_0 == 0 && this$static.chardata == 93) { $addRange(tok, c, c); $addRange(tok, 45, 45); } else if (type_0 == 0 && this$static.chardata == 93 || type_0 == 24) { throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.cc.8')))); } else { rangeend = this$static.chardata; if (type_0 == 0) { if (rangeend == 91) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.cc.6')))); if (rangeend == 93) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.cc.7')))); if (rangeend == 45) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.cc.8')))); } else type_0 == 10 && (rangeend = $decodeEscaped(this$static)); $next_16(this$static); if (c > rangeend) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.ope.3')))); $addRange(tok, c, rangeend); } } } firstloop = false; } if (this$static.nexttoken == 1) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.cc.2')))); $sortRanges(tok); $compactRanges(tok); this$static.context = 0; $next_16(this$static); return tok; } function RegEx$ParserForXMLSchema(){ RegEx$RegexParser.call(this); } function getRange(name_0, positive){ var tok, tok0; if (!ranges_0) { ranges_0 = new HashMap; ranges2 = new HashMap; tok0 = ($clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$RangeToken(4)); setupRange(tok0, '\t\n\r\r '); $putStringValue(ranges_0, 'xml:isSpace', tok0); $putStringValue(ranges2, 'xml:isSpace', complementRanges(tok0)); tok0 = (null , ++tokens_0 , new RegEx$RangeToken(4)); setupRange(tok0, '09\u0660\u0669\u06F0\u06F9\u0966\u096F\u09E6\u09EF\u0A66\u0A6F\u0AE6\u0AEF\u0B66\u0B6F\u0BE7\u0BEF\u0C66\u0C6F\u0CE6\u0CEF\u0D66\u0D6F\u0E50\u0E59\u0ED0\u0ED9\u0F20\u0F29'); $putStringValue(ranges_0, 'xml:isDigit', tok0); $putStringValue(ranges2, 'xml:isDigit', complementRanges(tok0)); tok0 = (null , ++tokens_0 , new RegEx$RangeToken(4)); setupRange(tok0, '09\u0660\u0669\u06F0\u06F9\u0966\u096F\u09E6\u09EF\u0A66\u0A6F\u0AE6\u0AEF\u0B66\u0B6F\u0BE7\u0BEF\u0C66\u0C6F\u0CE6\u0CEF\u0D66\u0D6F\u0E50\u0E59\u0ED0\u0ED9\u0F20\u0F29'); $putStringValue(ranges_0, 'xml:isDigit', tok0); $putStringValue(ranges2, 'xml:isDigit', complementRanges(tok0)); tok0 = (null , ++tokens_0 , new RegEx$RangeToken(4)); setupRange(tok0, 'AZaz\xC0\xD6\xD8\xF6\xF8\u0131\u0134\u013E\u0141\u0148\u014A\u017E\u0180\u01C3\u01CD\u01F0\u01F4\u01F5\u01FA\u0217\u0250\u02A8\u02BB\u02C1\u0386\u0386\u0388\u038A\u038C\u038C\u038E\u03A1\u03A3\u03CE\u03D0\u03D6\u03DA\u03DA\u03DC\u03DC\u03DE\u03DE\u03E0\u03E0\u03E2\u03F3\u0401\u040C\u040E\u044F\u0451\u045C\u045E\u0481\u0490\u04C4\u04C7\u04C8\u04CB\u04CC\u04D0\u04EB\u04EE\u04F5\u04F8\u04F9\u0531\u0556\u0559\u0559\u0561\u0586\u05D0\u05EA\u05F0\u05F2\u0621\u063A\u0641\u064A\u0671\u06B7\u06BA\u06BE\u06C0\u06CE\u06D0\u06D3\u06D5\u06D5\u06E5\u06E6\u0905\u0939\u093D\u093D\u0958\u0961\u0985\u098C\u098F\u0990\u0993\u09A8\u09AA\u09B0\u09B2\u09B2\u09B6\u09B9\u09DC\u09DD\u09DF\u09E1\u09F0\u09F1\u0A05\u0A0A\u0A0F\u0A10\u0A13\u0A28\u0A2A\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59\u0A5C\u0A5E\u0A5E\u0A72\u0A74\u0A85\u0A8B\u0A8D\u0A8D\u0A8F\u0A91\u0A93\u0AA8\u0AAA\u0AB0\u0AB2\u0AB3\u0AB5\u0AB9\u0ABD\u0ABD\u0AE0\u0AE0\u0B05\u0B0C\u0B0F\u0B10\u0B13\u0B28\u0B2A\u0B30\u0B32\u0B33\u0B36\u0B39\u0B3D\u0B3D\u0B5C\u0B5D\u0B5F\u0B61\u0B85\u0B8A\u0B8E\u0B90\u0B92\u0B95\u0B99\u0B9A\u0B9C\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8\u0BAA\u0BAE\u0BB5\u0BB7\u0BB9\u0C05\u0C0C\u0C0E\u0C10\u0C12\u0C28\u0C2A\u0C33\u0C35\u0C39\u0C60\u0C61\u0C85\u0C8C\u0C8E\u0C90\u0C92\u0CA8\u0CAA\u0CB3\u0CB5\u0CB9\u0CDE\u0CDE\u0CE0\u0CE1\u0D05\u0D0C\u0D0E\u0D10\u0D12\u0D28\u0D2A\u0D39\u0D60\u0D61\u0E01\u0E2E\u0E30\u0E30\u0E32\u0E33\u0E40\u0E45\u0E81\u0E82\u0E84\u0E84\u0E87\u0E88\u0E8A\u0E8A\u0E8D\u0E8D\u0E94\u0E97\u0E99\u0E9F\u0EA1\u0EA3\u0EA5\u0EA5\u0EA7\u0EA7\u0EAA\u0EAB\u0EAD\u0EAE\u0EB0\u0EB0\u0EB2\u0EB3\u0EBD\u0EBD\u0EC0\u0EC4\u0F40\u0F47\u0F49\u0F69\u10A0\u10C5\u10D0\u10F6\u1100\u1100\u1102\u1103\u1105\u1107\u1109\u1109\u110B\u110C\u110E\u1112\u113C\u113C\u113E\u113E\u1140\u1140\u114C\u114C\u114E\u114E\u1150\u1150\u1154\u1155\u1159\u1159\u115F\u1161\u1163\u1163\u1165\u1165\u1167\u1167\u1169\u1169\u116D\u116E\u1172\u1173\u1175\u1175\u119E\u119E\u11A8\u11A8\u11AB\u11AB\u11AE\u11AF\u11B7\u11B8\u11BA\u11BA\u11BC\u11C2\u11EB\u11EB\u11F0\u11F0\u11F9\u11F9\u1E00\u1E9B\u1EA0\u1EF9\u1F00\u1F15\u1F18\u1F1D\u1F20\u1F45\u1F48\u1F4D\u1F50\u1F57\u1F59\u1F59\u1F5B\u1F5B\u1F5D\u1F5D\u1F5F\u1F7D\u1F80\u1FB4\u1FB6\u1FBC\u1FBE\u1FBE\u1FC2\u1FC4\u1FC6\u1FCC\u1FD0\u1FD3\u1FD6\u1FDB\u1FE0\u1FEC\u1FF2\u1FF4\u1FF6\u1FFC\u2126\u2126\u212A\u212B\u212E\u212E\u2180\u2182\u3007\u3007\u3021\u3029\u3041\u3094\u30A1\u30FA\u3105\u312C\u4E00\u9FA5\uAC00\uD7A3'); $mergeRanges(tok0, castTo($getStringValue(ranges_0, 'xml:isDigit'), 122)); $putStringValue(ranges_0, 'xml:isWord', tok0); $putStringValue(ranges2, 'xml:isWord', complementRanges(tok0)); tok0 = (null , ++tokens_0 , new RegEx$RangeToken(4)); setupRange(tok0, '-.0:AZ__az\xB7\xB7\xC0\xD6\xD8\xF6\xF8\u0131\u0134\u013E\u0141\u0148\u014A\u017E\u0180\u01C3\u01CD\u01F0\u01F4\u01F5\u01FA\u0217\u0250\u02A8\u02BB\u02C1\u02D0\u02D1\u0300\u0345\u0360\u0361\u0386\u038A\u038C\u038C\u038E\u03A1\u03A3\u03CE\u03D0\u03D6\u03DA\u03DA\u03DC\u03DC\u03DE\u03DE\u03E0\u03E0\u03E2\u03F3\u0401\u040C\u040E\u044F\u0451\u045C\u045E\u0481\u0483\u0486\u0490\u04C4\u04C7\u04C8\u04CB\u04CC\u04D0\u04EB\u04EE\u04F5\u04F8\u04F9\u0531\u0556\u0559\u0559\u0561\u0586\u0591\u05A1\u05A3\u05B9\u05BB\u05BD\u05BF\u05BF\u05C1\u05C2\u05C4\u05C4\u05D0\u05EA\u05F0\u05F2\u0621\u063A\u0640\u0652\u0660\u0669\u0670\u06B7\u06BA\u06BE\u06C0\u06CE\u06D0\u06D3\u06D5\u06E8\u06EA\u06ED\u06F0\u06F9\u0901\u0903\u0905\u0939\u093C\u094D\u0951\u0954\u0958\u0963\u0966\u096F\u0981\u0983\u0985\u098C\u098F\u0990\u0993\u09A8\u09AA\u09B0\u09B2\u09B2\u09B6\u09B9\u09BC\u09BC\u09BE\u09C4\u09C7\u09C8\u09CB\u09CD\u09D7\u09D7\u09DC\u09DD\u09DF\u09E3\u09E6\u09F1\u0A02\u0A02\u0A05\u0A0A\u0A0F\u0A10\u0A13\u0A28\u0A2A\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3C\u0A3E\u0A42\u0A47\u0A48\u0A4B\u0A4D\u0A59\u0A5C\u0A5E\u0A5E\u0A66\u0A74\u0A81\u0A83\u0A85\u0A8B\u0A8D\u0A8D\u0A8F\u0A91\u0A93\u0AA8\u0AAA\u0AB0\u0AB2\u0AB3\u0AB5\u0AB9\u0ABC\u0AC5\u0AC7\u0AC9\u0ACB\u0ACD\u0AE0\u0AE0\u0AE6\u0AEF\u0B01\u0B03\u0B05\u0B0C\u0B0F\u0B10\u0B13\u0B28\u0B2A\u0B30\u0B32\u0B33\u0B36\u0B39\u0B3C\u0B43\u0B47\u0B48\u0B4B\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F\u0B61\u0B66\u0B6F\u0B82\u0B83\u0B85\u0B8A\u0B8E\u0B90\u0B92\u0B95\u0B99\u0B9A\u0B9C\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8\u0BAA\u0BAE\u0BB5\u0BB7\u0BB9\u0BBE\u0BC2\u0BC6\u0BC8\u0BCA\u0BCD\u0BD7\u0BD7\u0BE7\u0BEF\u0C01\u0C03\u0C05\u0C0C\u0C0E\u0C10\u0C12\u0C28\u0C2A\u0C33\u0C35\u0C39\u0C3E\u0C44\u0C46\u0C48\u0C4A\u0C4D\u0C55\u0C56\u0C60\u0C61\u0C66\u0C6F\u0C82\u0C83\u0C85\u0C8C\u0C8E\u0C90\u0C92\u0CA8\u0CAA\u0CB3\u0CB5\u0CB9\u0CBE\u0CC4\u0CC6\u0CC8\u0CCA\u0CCD\u0CD5\u0CD6\u0CDE\u0CDE\u0CE0\u0CE1\u0CE6\u0CEF\u0D02\u0D03\u0D05\u0D0C\u0D0E\u0D10\u0D12\u0D28\u0D2A\u0D39\u0D3E\u0D43\u0D46\u0D48\u0D4A\u0D4D\u0D57\u0D57\u0D60\u0D61\u0D66\u0D6F\u0E01\u0E2E\u0E30\u0E3A\u0E40\u0E4E\u0E50\u0E59\u0E81\u0E82\u0E84\u0E84\u0E87\u0E88\u0E8A\u0E8A\u0E8D\u0E8D\u0E94\u0E97\u0E99\u0E9F\u0EA1\u0EA3\u0EA5\u0EA5\u0EA7\u0EA7\u0EAA\u0EAB\u0EAD\u0EAE\u0EB0\u0EB9\u0EBB\u0EBD\u0EC0\u0EC4\u0EC6\u0EC6\u0EC8\u0ECD\u0ED0\u0ED9\u0F18\u0F19\u0F20\u0F29\u0F35\u0F35\u0F37\u0F37\u0F39\u0F39\u0F3E\u0F47\u0F49\u0F69\u0F71\u0F84\u0F86\u0F8B\u0F90\u0F95\u0F97\u0F97\u0F99\u0FAD\u0FB1\u0FB7\u0FB9\u0FB9\u10A0\u10C5\u10D0\u10F6\u1100\u1100\u1102\u1103\u1105\u1107\u1109\u1109\u110B\u110C\u110E\u1112\u113C\u113C\u113E\u113E\u1140\u1140\u114C\u114C\u114E\u114E\u1150\u1150\u1154\u1155\u1159\u1159\u115F\u1161\u1163\u1163\u1165\u1165\u1167\u1167\u1169\u1169\u116D\u116E\u1172\u1173\u1175\u1175\u119E\u119E\u11A8\u11A8\u11AB\u11AB\u11AE\u11AF\u11B7\u11B8\u11BA\u11BA\u11BC\u11C2\u11EB\u11EB\u11F0\u11F0\u11F9\u11F9\u1E00\u1E9B\u1EA0\u1EF9\u1F00\u1F15\u1F18\u1F1D\u1F20\u1F45\u1F48\u1F4D\u1F50\u1F57\u1F59\u1F59\u1F5B\u1F5B\u1F5D\u1F5D\u1F5F\u1F7D\u1F80\u1FB4\u1FB6\u1FBC\u1FBE\u1FBE\u1FC2\u1FC4\u1FC6\u1FCC\u1FD0\u1FD3\u1FD6\u1FDB\u1FE0\u1FEC\u1FF2\u1FF4\u1FF6\u1FFC\u20D0\u20DC\u20E1\u20E1\u2126\u2126\u212A\u212B\u212E\u212E\u2180\u2182\u3005\u3005\u3007\u3007\u3021\u302F\u3031\u3035\u3041\u3094\u3099\u309A\u309D\u309E\u30A1\u30FA\u30FC\u30FE\u3105\u312C\u4E00\u9FA5\uAC00\uD7A3'); $putStringValue(ranges_0, 'xml:isNameChar', tok0); $putStringValue(ranges2, 'xml:isNameChar', complementRanges(tok0)); tok0 = (null , ++tokens_0 , new RegEx$RangeToken(4)); setupRange(tok0, 'AZaz\xC0\xD6\xD8\xF6\xF8\u0131\u0134\u013E\u0141\u0148\u014A\u017E\u0180\u01C3\u01CD\u01F0\u01F4\u01F5\u01FA\u0217\u0250\u02A8\u02BB\u02C1\u0386\u0386\u0388\u038A\u038C\u038C\u038E\u03A1\u03A3\u03CE\u03D0\u03D6\u03DA\u03DA\u03DC\u03DC\u03DE\u03DE\u03E0\u03E0\u03E2\u03F3\u0401\u040C\u040E\u044F\u0451\u045C\u045E\u0481\u0490\u04C4\u04C7\u04C8\u04CB\u04CC\u04D0\u04EB\u04EE\u04F5\u04F8\u04F9\u0531\u0556\u0559\u0559\u0561\u0586\u05D0\u05EA\u05F0\u05F2\u0621\u063A\u0641\u064A\u0671\u06B7\u06BA\u06BE\u06C0\u06CE\u06D0\u06D3\u06D5\u06D5\u06E5\u06E6\u0905\u0939\u093D\u093D\u0958\u0961\u0985\u098C\u098F\u0990\u0993\u09A8\u09AA\u09B0\u09B2\u09B2\u09B6\u09B9\u09DC\u09DD\u09DF\u09E1\u09F0\u09F1\u0A05\u0A0A\u0A0F\u0A10\u0A13\u0A28\u0A2A\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59\u0A5C\u0A5E\u0A5E\u0A72\u0A74\u0A85\u0A8B\u0A8D\u0A8D\u0A8F\u0A91\u0A93\u0AA8\u0AAA\u0AB0\u0AB2\u0AB3\u0AB5\u0AB9\u0ABD\u0ABD\u0AE0\u0AE0\u0B05\u0B0C\u0B0F\u0B10\u0B13\u0B28\u0B2A\u0B30\u0B32\u0B33\u0B36\u0B39\u0B3D\u0B3D\u0B5C\u0B5D\u0B5F\u0B61\u0B85\u0B8A\u0B8E\u0B90\u0B92\u0B95\u0B99\u0B9A\u0B9C\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8\u0BAA\u0BAE\u0BB5\u0BB7\u0BB9\u0C05\u0C0C\u0C0E\u0C10\u0C12\u0C28\u0C2A\u0C33\u0C35\u0C39\u0C60\u0C61\u0C85\u0C8C\u0C8E\u0C90\u0C92\u0CA8\u0CAA\u0CB3\u0CB5\u0CB9\u0CDE\u0CDE\u0CE0\u0CE1\u0D05\u0D0C\u0D0E\u0D10\u0D12\u0D28\u0D2A\u0D39\u0D60\u0D61\u0E01\u0E2E\u0E30\u0E30\u0E32\u0E33\u0E40\u0E45\u0E81\u0E82\u0E84\u0E84\u0E87\u0E88\u0E8A\u0E8A\u0E8D\u0E8D\u0E94\u0E97\u0E99\u0E9F\u0EA1\u0EA3\u0EA5\u0EA5\u0EA7\u0EA7\u0EAA\u0EAB\u0EAD\u0EAE\u0EB0\u0EB0\u0EB2\u0EB3\u0EBD\u0EBD\u0EC0\u0EC4\u0F40\u0F47\u0F49\u0F69\u10A0\u10C5\u10D0\u10F6\u1100\u1100\u1102\u1103\u1105\u1107\u1109\u1109\u110B\u110C\u110E\u1112\u113C\u113C\u113E\u113E\u1140\u1140\u114C\u114C\u114E\u114E\u1150\u1150\u1154\u1155\u1159\u1159\u115F\u1161\u1163\u1163\u1165\u1165\u1167\u1167\u1169\u1169\u116D\u116E\u1172\u1173\u1175\u1175\u119E\u119E\u11A8\u11A8\u11AB\u11AB\u11AE\u11AF\u11B7\u11B8\u11BA\u11BA\u11BC\u11C2\u11EB\u11EB\u11F0\u11F0\u11F9\u11F9\u1E00\u1E9B\u1EA0\u1EF9\u1F00\u1F15\u1F18\u1F1D\u1F20\u1F45\u1F48\u1F4D\u1F50\u1F57\u1F59\u1F59\u1F5B\u1F5B\u1F5D\u1F5D\u1F5F\u1F7D\u1F80\u1FB4\u1FB6\u1FBC\u1FBE\u1FBE\u1FC2\u1FC4\u1FC6\u1FCC\u1FD0\u1FD3\u1FD6\u1FDB\u1FE0\u1FEC\u1FF2\u1FF4\u1FF6\u1FFC\u2126\u2126\u212A\u212B\u212E\u212E\u2180\u2182\u3007\u3007\u3021\u3029\u3041\u3094\u30A1\u30FA\u3105\u312C\u4E00\u9FA5\uAC00\uD7A3'); $addRange(tok0, 95, 95); $addRange(tok0, 58, 58); $putStringValue(ranges_0, 'xml:isInitialNameChar', tok0); $putStringValue(ranges2, 'xml:isInitialNameChar', complementRanges(tok0)); } tok = positive?castTo($getStringValue(ranges_0, name_0), 138):castTo($getStringValue(ranges2, name_0), 138); return tok; } function setupRange(range, src_0){ var i, len; len = src_0.length; for (i = 0; i < len; i += 2) $addRange(range, (checkCriticalStringElementIndex(i, src_0.length) , src_0.charCodeAt(i)), (checkCriticalStringElementIndex(i + 1, src_0.length) , src_0.charCodeAt(i + 1))); } defineClass(1947, 836, {}, RegEx$ParserForXMLSchema); _.checkQuestion = function checkQuestion_0(off){ return false; } ; _.decodeEscaped = function decodeEscaped_0(){ return $decodeEscaped(this); } ; _.getTokenForShorthand = function getTokenForShorthand_0(ch_0){ return $getTokenForShorthand(ch_0); } ; _.parseCharacterClass = function parseCharacterClass_0(useNrange){ return $parseCharacterClass(this); } ; _.parseSetOperations = function parseSetOperations_0(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processBackreference = function processBackreference_0(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processBacksolidus_A = function processBacksolidus_A_0(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processBacksolidus_B = function processBacksolidus_B_0(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processBacksolidus_C = function processBacksolidus_C_0(){ $next_16(this); return $getTokenForShorthand(67); } ; _.processBacksolidus_I = function processBacksolidus_I_0(){ $next_16(this); return $getTokenForShorthand(73); } ; _.processBacksolidus_X = function processBacksolidus_X_0(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processBacksolidus_Z = function processBacksolidus_Z_0(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processBacksolidus_b = function processBacksolidus_b_0(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processBacksolidus_c = function processBacksolidus_c_0(){ $next_16(this); return $getTokenForShorthand(99); } ; _.processBacksolidus_g = function processBacksolidus_g_0(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processBacksolidus_gt = function processBacksolidus_gt_0(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processBacksolidus_i = function processBacksolidus_i_0(){ $next_16(this); return $getTokenForShorthand(105); } ; _.processBacksolidus_lt = function processBacksolidus_lt_0(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processBacksolidus_z = function processBacksolidus_z_0(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processCIinCharacterClass = function processCIinCharacterClass_0(tok, c){ return $mergeRanges(tok, $getTokenForShorthand(c)) , -1; } ; _.processCaret = function processCaret_0(){ $next_16(this); return $clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$Token$CharToken(0, 94); } ; _.processCondition = function processCondition_0(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processDollar = function processDollar_0(){ $next_16(this); return $clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$Token$CharToken(0, 36); } ; _.processIndependent = function processIndependent_0(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processLookahead = function processLookahead_0(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processLookbehind = function processLookbehind_0(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processModifiers = function processModifiers_0(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processNegativelookahead = function processNegativelookahead_0(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processNegativelookbehind = function processNegativelookbehind_0(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processParen = function processParen_0(){ var tok; $next_16(this); tok = createParen($parseRegex(this), 0); if (this.nexttoken != 7) throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.factor.1')))); $next_16(this); return tok; } ; _.processParen2 = function processParen2_0(){ throw toJs(new RegEx$ParseException($getString(($clinit_EcorePlugin() , 'parser.process.1')))); } ; _.processPlus = function processPlus_0(tok){ $next_16(this); return createConcat(tok, ($clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$Token$ClosureToken(3, tok))); } ; _.processQuestion = function processQuestion_0(tok){ var par; $next_16(this); par = ($clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$Token$UnionToken(2)); $addChild_0(par, tok); $addChild_0(par, (null , token_empty)); return par; } ; _.processStar = function processStar_0(tok){ $next_16(this); return $clinit_RegEx$Token() , $clinit_RegEx$Token() , ++tokens_0 , new RegEx$Token$ClosureToken(3, tok); } ; var ranges_0 = null, ranges2 = null; var Lorg_eclipse_emf_ecore_xml_type_internal_RegEx$ParserForXMLSchema_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.internal', 'RegEx/ParserForXMLSchema', 1947); function createOptionString(options){ var sb; sb = new StringBuffer_0; (options & 256) != 0 && (sb.string += 'F' , sb); (options & 128) != 0 && (sb.string += 'H' , sb); (options & 512) != 0 && (sb.string += 'X' , sb); (options & 2) != 0 && (sb.string += 'i' , sb); (options & 8) != 0 && (sb.string += 'm' , sb); (options & 4) != 0 && (sb.string += 's' , sb); (options & 32) != 0 && (sb.string += 'u' , sb); (options & 64) != 0 && (sb.string += 'w' , sb); (options & 16) != 0 && (sb.string += 'x' , sb); (options & $intern_35) != 0 && (sb.string += ',' , sb); return $intern(sb.string); } function decomposeToSurrogates(ch_0){ var chs; chs = initUnidimensionalArray(C_classLit, $intern_45, 28, 2, 15, 1); ch_0 -= $intern_64; chs[0] = (ch_0 >> 10) + $intern_65 & $intern_47; chs[1] = (ch_0 & 1023) + 56320 & $intern_47; return valueOf_8(chs, 0, chs.length); } function getOptionValue(ch_0){ var ret; ret = 0; switch (ch_0) { case 105: ret = 2; break; case 109: ret = 8; break; case 115: ret = 4; break; case 120: ret = 16; break; case 117: ret = 32; break; case 119: ret = 64; break; case 70: ret = 256; break; case 72: ret = 128; break; case 88: ret = 512; break; case 44: ret = $intern_35; } return ret; } function parseOptions(){ var i, options, v; options = 0; for (i = 0; i < 'X'.length; i++) { v = getOptionValue((checkCriticalStringElementIndex(i, 'X'.length) , 'X'.charCodeAt(i))); if (v == 0) throw toJs(new RegEx$ParseException((checkCriticalStringElementIndex(i, 'X'.length + 1) , 'Unknown Option: ' + 'X'.substr(i)))); options |= v; } return options; } function quoteMeta(literal){ var buffer, ch_0, i, len; len = literal.length; buffer = null; for (i = 0; i < len; i++) { ch_0 = (checkCriticalStringElementIndex(i, literal.length) , literal.charCodeAt(i)); if ($indexOf_1('.*+?{[()|\\^$', fromCodePoint(ch_0)) >= 0) { if (!buffer) { buffer = new StringBuffer_0; i > 0 && $append_3(buffer, (checkCriticalStringBounds(0, i, literal.length) , literal.substr(0, i))); } buffer.string += '\\'; $append(buffer, ch_0 & $intern_47); } else !!buffer && $append(buffer, ch_0 & $intern_47); } return buffer?buffer.string:literal; } function stripExtendedComment(regex){ var buffer, ch_0, len, next, offset; len = regex.length; buffer = new StringBuffer_0; offset = 0; while (offset < len) { ch_0 = $charAt(regex, offset++); if (ch_0 == 9 || ch_0 == 10 || ch_0 == 12 || ch_0 == 13 || ch_0 == 32) continue; if (ch_0 == 35) { while (offset < len) { ch_0 = $charAt(regex, offset++); if (ch_0 == 13 || ch_0 == 10) break; } continue; } if (ch_0 == 92 && offset < len) { if ((next = (checkCriticalStringElementIndex(offset, regex.length) , regex.charCodeAt(offset))) == 35 || next == 9 || next == 10 || next == 12 || next == 13 || next == 32) { $append(buffer, next & $intern_47); ++offset; } else { buffer.string += '\\'; $append(buffer, next & $intern_47); ++offset; } } else $append(buffer, ch_0 & $intern_47); } return buffer.string; } function $clinit_RegEx$Token(){ $clinit_RegEx$Token = emptyMethod; token_empty = new RegEx$Token(7); token_linebeginning = (++tokens_0 , new RegEx$Token$CharToken(8, 94)); ++tokens_0; new RegEx$Token$CharToken(8, 64); token_lineend = (++tokens_0 , new RegEx$Token$CharToken(8, 36)); token_stringbeginning = (++tokens_0 , new RegEx$Token$CharToken(8, 65)); token_stringend = (++tokens_0 , new RegEx$Token$CharToken(8, 122)); token_stringend2 = (++tokens_0 , new RegEx$Token$CharToken(8, 90)); token_wordedge = (++tokens_0 , new RegEx$Token$CharToken(8, 98)); token_not_wordedge = (++tokens_0 , new RegEx$Token$CharToken(8, 66)); token_wordbeginning = (++tokens_0 , new RegEx$Token$CharToken(8, 60)); token_wordend = (++tokens_0 , new RegEx$Token$CharToken(8, 62)); token_dot = new RegEx$Token(11); token_0to9 = (++tokens_0 , new RegEx$RangeToken(4)); $addRange(token_0to9, 48, 57); token_wordchars = (++tokens_0 , new RegEx$RangeToken(4)); $addRange(token_wordchars, 48, 57); $addRange(token_wordchars, 65, 90); $addRange(token_wordchars, 95, 95); $addRange(token_wordchars, 97, 122); token_spaces = (++tokens_0 , new RegEx$RangeToken(4)); $addRange(token_spaces, 9, 9); $addRange(token_spaces, 10, 10); $addRange(token_spaces, 12, 12); $addRange(token_spaces, 13, 13); $addRange(token_spaces, 32, 32); token_not_0to9 = complementRanges(token_0to9); token_not_wordchars = complementRanges(token_wordchars); token_not_spaces = complementRanges(token_spaces); categories = new HashMap; categories2 = new HashMap; categoryNames = stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['Cn', 'Lu', 'Ll', 'Lt', 'Lm', 'Lo', 'Mn', 'Me', 'Mc', 'Nd', 'Nl', 'No', 'Zs', 'Zl', 'Zp', 'Cc', 'Cf', null, 'Co', 'Cs', 'Pd', 'Ps', 'Pe', 'Pc', 'Po', 'Sm', 'Sc', 'Sk', 'So', 'Pi', 'Pf', 'L', 'M', 'N', 'Z', 'C', 'P', 'S']); blockNames = stampJavaTypeInfo(getClassLiteralForArray(Ljava_lang_String_2_classLit, 1), $intern_16, 2, 6, ['Basic Latin', 'Latin-1 Supplement', 'Latin Extended-A', 'Latin Extended-B', 'IPA Extensions', 'Spacing Modifier Letters', 'Combining Diacritical Marks', 'Greek', 'Cyrillic', 'Armenian', 'Hebrew', 'Arabic', 'Syriac', 'Thaana', 'Devanagari', 'Bengali', 'Gurmukhi', 'Gujarati', 'Oriya', 'Tamil', 'Telugu', 'Kannada', 'Malayalam', 'Sinhala', 'Thai', 'Lao', 'Tibetan', 'Myanmar', 'Georgian', 'Hangul Jamo', 'Ethiopic', 'Cherokee', 'Unified Canadian Aboriginal Syllabics', 'Ogham', 'Runic', 'Khmer', 'Mongolian', 'Latin Extended Additional', 'Greek Extended', 'General Punctuation', 'Superscripts and Subscripts', 'Currency Symbols', 'Combining Marks for Symbols', 'Letterlike Symbols', 'Number Forms', 'Arrows', 'Mathematical Operators', 'Miscellaneous Technical', 'Control Pictures', 'Optical Character Recognition', 'Enclosed Alphanumerics', 'Box Drawing', 'Block Elements', 'Geometric Shapes', 'Miscellaneous Symbols', 'Dingbats', 'Braille Patterns', 'CJK Radicals Supplement', 'Kangxi Radicals', 'Ideographic Description Characters', 'CJK Symbols and Punctuation', 'Hiragana', 'Katakana', 'Bopomofo', 'Hangul Compatibility Jamo', 'Kanbun', 'Bopomofo Extended', 'Enclosed CJK Letters and Months', 'CJK Compatibility', 'CJK Unified Ideographs Extension A', 'CJK Unified Ideographs', 'Yi Syllables', 'Yi Radicals', 'Hangul Syllables', 'Private Use', 'CJK Compatibility Ideographs', 'Alphabetic Presentation Forms', 'Arabic Presentation Forms-A', 'Combining Half Marks', 'CJK Compatibility Forms', 'Small Form Variants', 'Arabic Presentation Forms-B', 'Specials', 'Halfwidth and Fullwidth Forms', 'Old Italic', 'Gothic', 'Deseret', 'Byzantine Musical Symbols', 'Musical Symbols', 'Mathematical Alphanumeric Symbols', 'CJK Unified Ideographs Extension B', 'CJK Compatibility Ideographs Supplement', 'Tags']); nonBMPBlockRanges = stampJavaTypeInfo(getClassLiteralForArray(I_classLit, 1), $intern_49, 28, 15, [66304, 66351, 66352, 66383, 66560, 66639, 118784, 119039, 119040, 119295, 119808, 120831, 131072, 173782, 194560, 195103, 917504, 917631]); } function RegEx$Token(type_0){ this.type_0 = type_0; } function createChar(ch_0){ $clinit_RegEx$Token(); ++tokens_0; return new RegEx$Token$CharToken(0, ch_0); } function createClosure(tok){ ++tokens_0; return new RegEx$Token$ClosureToken(3, tok); } function createConcat(tok1, tok2){ $clinit_RegEx$Token(); ++tokens_0; return new RegEx$Token$ConcatToken(tok1, tok2); } function createLook(type_0, child){ $clinit_RegEx$Token(); ++tokens_0; return new RegEx$Token$ParenToken(type_0, child, 0); } function createModifierGroup(child, add_0, mask){ $clinit_RegEx$Token(); ++tokens_0; return new RegEx$Token$ModifierToken(child, add_0, mask); } function createParen(child, pnumber){ $clinit_RegEx$Token(); ++tokens_0; return new RegEx$Token$ParenToken(6, child, pnumber); } function createString_0(str){ $clinit_RegEx$Token(); ++tokens_0; return new RegEx$Token$StringToken(10, str, 0); } function getCombiningCharacterSequence(){ $clinit_RegEx$Token(); var foo; if (token_ccs) return token_ccs; foo = createClosure(getRange_0('M', true)); foo = createConcat(getRange_0('M', false), foo); token_ccs = foo; return token_ccs; } function getGraphemePattern(){ $clinit_RegEx$Token(); var base_char, combiner_wo_virama, foo, i, left, virama; if (token_grapheme) return token_grapheme; base_char = (++tokens_0 , new RegEx$RangeToken(4)); $mergeRanges(base_char, getRange_0('ASSIGNED', true)); $subtractRanges(base_char, getRange_0('M', true)); $subtractRanges(base_char, getRange_0('C', true)); virama = (++tokens_0 , new RegEx$RangeToken(4)); for (i = 0; i < 11; i++) { $addRange(virama, i, i); } combiner_wo_virama = (++tokens_0 , new RegEx$RangeToken(4)); $mergeRanges(combiner_wo_virama, getRange_0('M', true)); $addRange(combiner_wo_virama, 4448, 4607); $addRange(combiner_wo_virama, 65438, 65439); left = (++tokens_0 , new RegEx$Token$UnionToken(2)); $addChild_0(left, base_char); $addChild_0(left, token_empty); foo = (++tokens_0 , new RegEx$Token$UnionToken(2)); foo.addChild(createConcat(virama, getRange_0('L', true))); foo.addChild(combiner_wo_virama); foo = (++tokens_0 , new RegEx$Token$ClosureToken(3, foo)); foo = (++tokens_0 , new RegEx$Token$ConcatToken(left, foo)); token_grapheme = foo; return token_grapheme; } function getRange_0(name_0, positive){ $clinit_RegEx$Token(); var all, buffer, ci, i, i0, location_0, n, oldLength, r1, ranges, rend, rstart, tok; if ($size_2(categories) == 0) { ranges = initUnidimensionalArray(Lorg_eclipse_emf_ecore_xml_type_internal_RegEx$Token_2_classLit, $intern_16, 122, categoryNames.length, 0, 1); for (i0 = 0; i0 < ranges.length; i0++) { ranges[i0] = (++tokens_0 , new RegEx$RangeToken(4)); } buffer = new StringBuffer_0; for (i = 0; i < blockNames.length; i++) { r1 = (++tokens_0 , new RegEx$RangeToken(4)); if (i < 84) { location_0 = i * 2; rstart = (checkCriticalStringElementIndex(location_0, '\x00\x7F\x80\xFF\u0100\u017F\u0180\u024F\u0250\u02AF\u02B0\u02FF\u0300\u036F\u0370\u03FF\u0400\u04FF\u0530\u058F\u0590\u05FF\u0600\u06FF\u0700\u074F\u0780\u07BF\u0900\u097F\u0980\u09FF\u0A00\u0A7F\u0A80\u0AFF\u0B00\u0B7F\u0B80\u0BFF\u0C00\u0C7F\u0C80\u0CFF\u0D00\u0D7F\u0D80\u0DFF\u0E00\u0E7F\u0E80\u0EFF\u0F00\u0FFF\u1000\u109F\u10A0\u10FF\u1100\u11FF\u1200\u137F\u13A0\u13FF\u1400\u167F\u1680\u169F\u16A0\u16FF\u1780\u17FF\u1800\u18AF\u1E00\u1EFF\u1F00\u1FFF\u2000\u206F\u2070\u209F\u20A0\u20CF\u20D0\u20FF\u2100\u214F\u2150\u218F\u2190\u21FF\u2200\u22FF\u2300\u23FF\u2400\u243F\u2440\u245F\u2460\u24FF\u2500\u257F\u2580\u259F\u25A0\u25FF\u2600\u26FF\u2700\u27BF\u2800\u28FF\u2E80\u2EFF\u2F00\u2FDF\u2FF0\u2FFF\u3000\u303F\u3040\u309F\u30A0\u30FF\u3100\u312F\u3130\u318F\u3190\u319F\u31A0\u31BF\u3200\u32FF\u3300\u33FF\u3400\u4DB5\u4E00\u9FFF\uA000\uA48F\uA490\uA4CF\uAC00\uD7A3\uE000\uF8FF\uF900\uFAFF\uFB00\uFB4F\uFB50\uFDFF\uFE20\uFE2F\uFE30\uFE4F\uFE50\uFE6F\uFE70\uFEFE\uFEFF\uFEFF\uFF00\uFFEF'.length) , '\x00\x7F\x80\xFF\u0100\u017F\u0180\u024F\u0250\u02AF\u02B0\u02FF\u0300\u036F\u0370\u03FF\u0400\u04FF\u0530\u058F\u0590\u05FF\u0600\u06FF\u0700\u074F\u0780\u07BF\u0900\u097F\u0980\u09FF\u0A00\u0A7F\u0A80\u0AFF\u0B00\u0B7F\u0B80\u0BFF\u0C00\u0C7F\u0C80\u0CFF\u0D00\u0D7F\u0D80\u0DFF\u0E00\u0E7F\u0E80\u0EFF\u0F00\u0FFF\u1000\u109F\u10A0\u10FF\u1100\u11FF\u1200\u137F\u13A0\u13FF\u1400\u167F\u1680\u169F\u16A0\u16FF\u1780\u17FF\u1800\u18AF\u1E00\u1EFF\u1F00\u1FFF\u2000\u206F\u2070\u209F\u20A0\u20CF\u20D0\u20FF\u2100\u214F\u2150\u218F\u2190\u21FF\u2200\u22FF\u2300\u23FF\u2400\u243F\u2440\u245F\u2460\u24FF\u2500\u257F\u2580\u259F\u25A0\u25FF\u2600\u26FF\u2700\u27BF\u2800\u28FF\u2E80\u2EFF\u2F00\u2FDF\u2FF0\u2FFF\u3000\u303F\u3040\u309F\u30A0\u30FF\u3100\u312F\u3130\u318F\u3190\u319F\u31A0\u31BF\u3200\u32FF\u3300\u33FF\u3400\u4DB5\u4E00\u9FFF\uA000\uA48F\uA490\uA4CF\uAC00\uD7A3\uE000\uF8FF\uF900\uFAFF\uFB00\uFB4F\uFB50\uFDFF\uFE20\uFE2F\uFE30\uFE4F\uFE50\uFE6F\uFE70\uFEFE\uFEFF\uFEFF\uFF00\uFFEF'.charCodeAt(location_0)); rend = (checkCriticalStringElementIndex(location_0 + 1, '\x00\x7F\x80\xFF\u0100\u017F\u0180\u024F\u0250\u02AF\u02B0\u02FF\u0300\u036F\u0370\u03FF\u0400\u04FF\u0530\u058F\u0590\u05FF\u0600\u06FF\u0700\u074F\u0780\u07BF\u0900\u097F\u0980\u09FF\u0A00\u0A7F\u0A80\u0AFF\u0B00\u0B7F\u0B80\u0BFF\u0C00\u0C7F\u0C80\u0CFF\u0D00\u0D7F\u0D80\u0DFF\u0E00\u0E7F\u0E80\u0EFF\u0F00\u0FFF\u1000\u109F\u10A0\u10FF\u1100\u11FF\u1200\u137F\u13A0\u13FF\u1400\u167F\u1680\u169F\u16A0\u16FF\u1780\u17FF\u1800\u18AF\u1E00\u1EFF\u1F00\u1FFF\u2000\u206F\u2070\u209F\u20A0\u20CF\u20D0\u20FF\u2100\u214F\u2150\u218F\u2190\u21FF\u2200\u22FF\u2300\u23FF\u2400\u243F\u2440\u245F\u2460\u24FF\u2500\u257F\u2580\u259F\u25A0\u25FF\u2600\u26FF\u2700\u27BF\u2800\u28FF\u2E80\u2EFF\u2F00\u2FDF\u2FF0\u2FFF\u3000\u303F\u3040\u309F\u30A0\u30FF\u3100\u312F\u3130\u318F\u3190\u319F\u31A0\u31BF\u3200\u32FF\u3300\u33FF\u3400\u4DB5\u4E00\u9FFF\uA000\uA48F\uA490\uA4CF\uAC00\uD7A3\uE000\uF8FF\uF900\uFAFF\uFB00\uFB4F\uFB50\uFDFF\uFE20\uFE2F\uFE30\uFE4F\uFE50\uFE6F\uFE70\uFEFE\uFEFF\uFEFF\uFF00\uFFEF'.length) , '\x00\x7F\x80\xFF\u0100\u017F\u0180\u024F\u0250\u02AF\u02B0\u02FF\u0300\u036F\u0370\u03FF\u0400\u04FF\u0530\u058F\u0590\u05FF\u0600\u06FF\u0700\u074F\u0780\u07BF\u0900\u097F\u0980\u09FF\u0A00\u0A7F\u0A80\u0AFF\u0B00\u0B7F\u0B80\u0BFF\u0C00\u0C7F\u0C80\u0CFF\u0D00\u0D7F\u0D80\u0DFF\u0E00\u0E7F\u0E80\u0EFF\u0F00\u0FFF\u1000\u109F\u10A0\u10FF\u1100\u11FF\u1200\u137F\u13A0\u13FF\u1400\u167F\u1680\u169F\u16A0\u16FF\u1780\u17FF\u1800\u18AF\u1E00\u1EFF\u1F00\u1FFF\u2000\u206F\u2070\u209F\u20A0\u20CF\u20D0\u20FF\u2100\u214F\u2150\u218F\u2190\u21FF\u2200\u22FF\u2300\u23FF\u2400\u243F\u2440\u245F\u2460\u24FF\u2500\u257F\u2580\u259F\u25A0\u25FF\u2600\u26FF\u2700\u27BF\u2800\u28FF\u2E80\u2EFF\u2F00\u2FDF\u2FF0\u2FFF\u3000\u303F\u3040\u309F\u30A0\u30FF\u3100\u312F\u3130\u318F\u3190\u319F\u31A0\u31BF\u3200\u32FF\u3300\u33FF\u3400\u4DB5\u4E00\u9FFF\uA000\uA48F\uA490\uA4CF\uAC00\uD7A3\uE000\uF8FF\uF900\uFAFF\uFB00\uFB4F\uFB50\uFDFF\uFE20\uFE2F\uFE30\uFE4F\uFE50\uFE6F\uFE70\uFEFE\uFEFF\uFEFF\uFF00\uFFEF'.charCodeAt(location_0 + 1)); $addRange(r1, rstart, rend); } else { location_0 = (i - 84) * 2; $addRange(r1, nonBMPBlockRanges[location_0], nonBMPBlockRanges[location_0 + 1]); } n = blockNames[i]; $equals_5(n, 'Specials') && $addRange(r1, 65520, 65533); if ($equals_5(n, 'Private Use')) { $addRange(r1, 983040, 1048573); $addRange(r1, 1048576, 1114109); } $putStringValue(categories, n, r1); $putStringValue(categories2, n, complementRanges(r1)); oldLength = buffer.string.length; 0 < oldLength?(buffer.string = $substring_1(buffer.string, 0, 0)):0 > oldLength && (buffer.string += valueOf_7(initUnidimensionalArray(C_classLit, $intern_45, 28, -oldLength, 15, 1))); buffer.string += 'Is'; if ($indexOf_1(n, fromCodePoint(32)) >= 0) { for (ci = 0; ci < n.length; ci++) { checkCriticalStringElementIndex(ci, n.length); n.charCodeAt(ci) != 32 && $append(buffer, (checkCriticalStringElementIndex(ci, n.length) , n.charCodeAt(ci))); } } else { buffer.string += '' + n; } setAlias(buffer.string, n, true); } setAlias('ASSIGNED', 'Cn', false); setAlias('UNASSIGNED', 'Cn', true); all = (++tokens_0 , new RegEx$RangeToken(4)); $addRange(all, 0, $intern_168); $putStringValue(categories, 'ALL', all); $putStringValue(categories2, 'ALL', complementRanges(all)); !nonxs && (nonxs = new HashMap); $putStringValue(nonxs, 'ASSIGNED', 'ASSIGNED'); !nonxs && (nonxs = new HashMap); $putStringValue(nonxs, 'UNASSIGNED', 'UNASSIGNED'); !nonxs && (nonxs = new HashMap); $putStringValue(nonxs, 'ALL', 'ALL'); } tok = positive?castTo($getStringValue(categories, name_0), 138):castTo($getStringValue(categories2, name_0), 138); return tok; } function getRange_1(name_0, positive, xs){ $clinit_RegEx$Token(); var range; range = getRange_0(name_0, positive); xs && !!range && isRegisterNonXS(name_0) && (range = null); return range; } function isRegisterNonXS(name_0){ if (!nonxs) return false; return $hasStringValue(nonxs, name_0); } function setAlias(newName, name_0, positive){ var t1, t2; t1 = castTo($getStringValue(categories, name_0), 122); t2 = castTo($getStringValue(categories2, name_0), 122); if (positive) { $putStringValue(categories, newName, t1); $putStringValue(categories2, newName, t2); } else { $putStringValue(categories2, newName, t1); $putStringValue(categories, newName, t2); } } defineClass(122, 1, $intern_169, RegEx$Token); _.addChild = function addChild(tok){ throw toJs(new RuntimeException_0('Not supported.')); } ; _.getChar = function getChar(){ return -1; } ; _.getChild = function getChild(index_0){ return null; } ; _.getString = function getString(){ return null; } ; _.setMax = function setMax(max_0){ } ; _.setMin = function setMin(min_0){ } ; _.size_2 = function size_82(){ return 0; } ; _.toString_0 = function toString_162(){ return this.toString_1(0); } ; _.toString_1 = function toString_163(options){ return this.type_0 == 11?'.':''; } ; _.type_0 = 0; var blockNames, categories, categories2, categoryNames, nonBMPBlockRanges, nonxs = null, token_0to9, token_ccs = null, token_dot, token_empty, token_grapheme = null, token_linebeginning, token_lineend, token_not_0to9, token_not_spaces, token_not_wordchars, token_not_wordedge, token_spaces, token_stringbeginning, token_stringend, token_stringend2, token_wordbeginning, token_wordchars, token_wordedge, token_wordend, tokens_0 = 0; var Lorg_eclipse_emf_ecore_xml_type_internal_RegEx$Token_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.internal', 'RegEx/Token', 122); function $addRange(this$static, start_0, end){ var pos, r1, r2, temp; if (start_0 <= end) { r1 = start_0; r2 = end; } else { r1 = end; r2 = start_0; } pos = 0; if (this$static.ranges == null) { this$static.ranges = initUnidimensionalArray(I_classLit, $intern_49, 28, 2, 15, 1); this$static.ranges[0] = r1; this$static.ranges[1] = r2; this$static.sorted = true; } else { pos = this$static.ranges.length; if (this$static.ranges[pos - 1] + 1 == r1) { this$static.ranges[pos - 1] = r2; return; } temp = initUnidimensionalArray(I_classLit, $intern_49, 28, pos + 2, 15, 1); arraycopy(this$static.ranges, 0, temp, 0, pos); this$static.ranges = temp; this$static.ranges[pos - 1] >= r1 && (this$static.sorted = false , this$static.compacted = false); this$static.ranges[pos++] = r1; this$static.ranges[pos] = r2; this$static.sorted || $sortRanges(this$static); } } function $compactRanges(this$static){ var base, baseend, result, target; if (this$static.ranges == null || this$static.ranges.length <= 2) return; if (this$static.compacted) return; base = 0; target = 0; while (target < this$static.ranges.length) { if (base != target) { this$static.ranges[base] = this$static.ranges[target++]; this$static.ranges[base + 1] = this$static.ranges[target++]; } else target += 2; baseend = this$static.ranges[base + 1]; while (target < this$static.ranges.length) { if (baseend + 1 < this$static.ranges[target]) break; if (baseend + 1 == this$static.ranges[target]) { this$static.ranges[base + 1] = this$static.ranges[target + 1]; baseend = this$static.ranges[base + 1]; target += 2; } else if (baseend >= this$static.ranges[target + 1]) { target += 2; } else if (baseend < this$static.ranges[target + 1]) { this$static.ranges[base + 1] = this$static.ranges[target + 1]; baseend = this$static.ranges[base + 1]; target += 2; } else { throw toJs(new RuntimeException_0('Token#compactRanges(): Internel Error: [' + this$static.ranges[base] + ',' + this$static.ranges[base + 1] + '] [' + this$static.ranges[target] + ',' + this$static.ranges[target + 1] + ']')); } } base += 2; } if (base != this$static.ranges.length) { result = initUnidimensionalArray(I_classLit, $intern_49, 28, base, 15, 1); arraycopy(this$static.ranges, 0, result, 0, base); this$static.ranges = result; } this$static.compacted = true; } function $intersectRanges(this$static, token){ var result, src1, src1begin, src1end, src2, src2begin, src2end, tok, wp; tok = token; if (tok.ranges == null || this$static.ranges == null) return; $sortRanges(this$static); $compactRanges(this$static); $sortRanges(tok); $compactRanges(tok); result = initUnidimensionalArray(I_classLit, $intern_49, 28, this$static.ranges.length + tok.ranges.length, 15, 1); wp = 0; src1 = 0; src2 = 0; while (src1 < this$static.ranges.length && src2 < tok.ranges.length) { src1begin = this$static.ranges[src1]; src1end = this$static.ranges[src1 + 1]; src2begin = tok.ranges[src2]; src2end = tok.ranges[src2 + 1]; if (src1end < src2begin) { src1 += 2; } else if (src1end >= src2begin && src1begin <= src2end) { if (src2begin <= src1begin && src1end <= src2end) { result[wp++] = src1begin; result[wp++] = src1end; src1 += 2; } else if (src2begin <= src1begin) { result[wp++] = src1begin; result[wp++] = src2end; this$static.ranges[src1] = src2end + 1; src2 += 2; } else if (src1end <= src2end) { result[wp++] = src2begin; result[wp++] = src1end; src1 += 2; } else { result[wp++] = src2begin; result[wp++] = src2end; this$static.ranges[src1] = src2end + 1; } } else if (src2end < src1begin) { src2 += 2; } else { throw toJs(new RuntimeException_0('Token#intersectRanges(): Internal Error: [' + this$static.ranges[src1] + ',' + this$static.ranges[src1 + 1] + '] & [' + tok.ranges[src2] + ',' + tok.ranges[src2 + 1] + ']')); } } while (src1 < this$static.ranges.length) { result[wp++] = this$static.ranges[src1++]; result[wp++] = this$static.ranges[src1++]; } this$static.ranges = initUnidimensionalArray(I_classLit, $intern_49, 28, wp, 15, 1); arraycopy(result, 0, this$static.ranges, 0, wp); } function $mergeRanges(this$static, token){ var i, j, k, result, tok; tok = castTo(token, 138); $sortRanges(this$static); $sortRanges(tok); if (tok.ranges == null) return; this$static.sorted = true; if (this$static.ranges == null) { this$static.ranges = initUnidimensionalArray(I_classLit, $intern_49, 28, tok.ranges.length, 15, 1); arraycopy(tok.ranges, 0, this$static.ranges, 0, tok.ranges.length); return; } result = initUnidimensionalArray(I_classLit, $intern_49, 28, this$static.ranges.length + tok.ranges.length, 15, 1); for (i = 0 , j = 0 , k = 0; i < this$static.ranges.length || j < tok.ranges.length;) { if (i >= this$static.ranges.length) { result[k++] = tok.ranges[j++]; result[k++] = tok.ranges[j++]; } else if (j >= tok.ranges.length) { result[k++] = this$static.ranges[i++]; result[k++] = this$static.ranges[i++]; } else if (tok.ranges[j] < this$static.ranges[i] || tok.ranges[j] === this$static.ranges[i] && tok.ranges[j + 1] < this$static.ranges[i + 1]) { result[k++] = tok.ranges[j++]; result[k++] = tok.ranges[j++]; } else { result[k++] = this$static.ranges[i++]; result[k++] = this$static.ranges[i++]; } } this$static.ranges = result; } function $sortRanges(this$static){ var i, j, tmp; if (this$static.sorted) return; if (this$static.ranges == null) return; for (i = this$static.ranges.length - 4; i >= 0; i -= 2) { for (j = 0; j <= i; j += 2) { if (this$static.ranges[j] > this$static.ranges[j + 2] || this$static.ranges[j] === this$static.ranges[j + 2] && this$static.ranges[j + 1] > this$static.ranges[j + 3]) { tmp = this$static.ranges[j + 2]; this$static.ranges[j + 2] = this$static.ranges[j]; this$static.ranges[j] = tmp; tmp = this$static.ranges[j + 3]; this$static.ranges[j + 3] = this$static.ranges[j + 1]; this$static.ranges[j + 1] = tmp; } } } this$static.sorted = true; } function $subtractRanges(this$static, token){ var result, src_0, srcbegin, srcend, sub_0, subbegin, subend, tok, wp; if (token.type_0 == 5) { $intersectRanges(this$static, token); return; } tok = token; if (tok.ranges == null || this$static.ranges == null) return; $sortRanges(this$static); $compactRanges(this$static); $sortRanges(tok); $compactRanges(tok); result = initUnidimensionalArray(I_classLit, $intern_49, 28, this$static.ranges.length + tok.ranges.length, 15, 1); wp = 0; src_0 = 0; sub_0 = 0; while (src_0 < this$static.ranges.length && sub_0 < tok.ranges.length) { srcbegin = this$static.ranges[src_0]; srcend = this$static.ranges[src_0 + 1]; subbegin = tok.ranges[sub_0]; subend = tok.ranges[sub_0 + 1]; if (srcend < subbegin) { result[wp++] = this$static.ranges[src_0++]; result[wp++] = this$static.ranges[src_0++]; } else if (srcend >= subbegin && srcbegin <= subend) { if (subbegin <= srcbegin && srcend <= subend) { src_0 += 2; } else if (subbegin <= srcbegin) { this$static.ranges[src_0] = subend + 1; sub_0 += 2; } else if (srcend <= subend) { result[wp++] = srcbegin; result[wp++] = subbegin - 1; src_0 += 2; } else { result[wp++] = srcbegin; result[wp++] = subbegin - 1; this$static.ranges[src_0] = subend + 1; sub_0 += 2; } } else if (subend < srcbegin) { sub_0 += 2; } else { throw toJs(new RuntimeException_0('Token#subtractRanges(): Internal Error: [' + this$static.ranges[src_0] + ',' + this$static.ranges[src_0 + 1] + '] - [' + tok.ranges[sub_0] + ',' + tok.ranges[sub_0 + 1] + ']')); } } while (src_0 < this$static.ranges.length) { result[wp++] = this$static.ranges[src_0++]; result[wp++] = this$static.ranges[src_0++]; } this$static.ranges = initUnidimensionalArray(I_classLit, $intern_49, 28, wp, 15, 1); arraycopy(result, 0, this$static.ranges, 0, wp); } function RegEx$RangeToken(type_0){ $clinit_RegEx$Token(); RegEx$Token.call(this, type_0); this.sorted = false; this.compacted = false; } function complementRanges(token){ $clinit_RegEx$Token(); var i, last, len, ret, tok, wp; if (token.type_0 != 4 && token.type_0 != 5) throw toJs(new IllegalArgumentException_0('Token#complementRanges(): must be RANGE: ' + token.type_0)); tok = token; $sortRanges(tok); $compactRanges(tok); len = tok.ranges.length + 2; tok.ranges[0] == 0 && (len -= 2); last = tok.ranges[tok.ranges.length - 1]; last == $intern_168 && (len -= 2); ret = (++tokens_0 , new RegEx$RangeToken(4)); ret.ranges = initUnidimensionalArray(I_classLit, $intern_49, 28, len, 15, 1); wp = 0; if (tok.ranges[0] > 0) { ret.ranges[wp++] = 0; ret.ranges[wp++] = tok.ranges[0] - 1; } for (i = 1; i < tok.ranges.length - 2; i += 2) { ret.ranges[wp++] = tok.ranges[i] + 1; ret.ranges[wp++] = tok.ranges[i + 1] - 1; } if (last != $intern_168) { ret.ranges[wp++] = last + 1; ret.ranges[wp] = $intern_168; } ret.compacted = true; return ret; } function escapeCharInCharClass(ch_0){ var number, pre, ret; switch (ch_0) { case 91: case 93: case 45: case 94: case 44: case 92: ret = '\\' + String.fromCharCode(ch_0 & $intern_47); break; case 12: ret = '\\f'; break; case 10: ret = '\\n'; break; case 13: ret = '\\r'; break; case 9: ret = '\\t'; break; case 27: ret = '\\e'; break; default:if (ch_0 < 32) { pre = (number = ch_0 >>> 0 , '0' + number.toString(16)); ret = '\\x' + $substring_1(pre, pre.length - 2, pre.length); } else if (ch_0 >= $intern_64) { pre = (number = ch_0 >>> 0 , '0' + number.toString(16)); ret = '\\v' + $substring_1(pre, pre.length - 6, pre.length); } else ret = '' + String.fromCharCode(ch_0 & $intern_47); } return ret; } defineClass(138, 122, {3:1, 138:1, 122:1}, RegEx$RangeToken); _.toString_1 = function toString_164(options){ var i, ret, sb; if (this.type_0 == 4) { if (this == token_dot) ret = '.'; else if (this == token_0to9) ret = '\\d'; else if (this == token_wordchars) ret = '\\w'; else if (this == token_spaces) ret = '\\s'; else { sb = new StringBuffer; sb.string += '['; for (i = 0; i < this.ranges.length; i += 2) { (options & $intern_35) != 0 && i > 0 && (sb.string += ',' , sb); if (this.ranges[i] === this.ranges[i + 1]) { $append_3(sb, escapeCharInCharClass(this.ranges[i])); } else { $append_3(sb, escapeCharInCharClass(this.ranges[i])); sb.string += '-'; $append_3(sb, escapeCharInCharClass(this.ranges[i + 1])); } } sb.string += ']'; ret = sb.string; } } else { if (this == token_not_0to9) ret = '\\D'; else if (this == token_not_wordchars) ret = '\\W'; else if (this == token_not_spaces) ret = '\\S'; else { sb = new StringBuffer; sb.string += '[^'; for (i = 0; i < this.ranges.length; i += 2) { (options & $intern_35) != 0 && i > 0 && (sb.string += ',' , sb); if (this.ranges[i] === this.ranges[i + 1]) { $append_3(sb, escapeCharInCharClass(this.ranges[i])); } else { $append_3(sb, escapeCharInCharClass(this.ranges[i])); sb.string += '-'; $append_3(sb, escapeCharInCharClass(this.ranges[i + 1])); } } sb.string += ']'; ret = sb.string; } } return ret; } ; _.compacted = false; _.sorted = false; var Lorg_eclipse_emf_ecore_xml_type_internal_RegEx$RangeToken_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.internal', 'RegEx/RangeToken', 138); function RegEx$RegexParser$ReferencePosition(n){ this.refNumber = n; } defineClass(592, 1, {592:1}, RegEx$RegexParser$ReferencePosition); _.refNumber = 0; var Lorg_eclipse_emf_ecore_xml_type_internal_RegEx$RegexParser$ReferencePosition_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.internal', 'RegEx/RegexParser/ReferencePosition', 592); function $setPattern(this$static, newPattern, options){ var rp; this$static.regex = newPattern; this$static.options_0 = options; rp = (this$static.options_0 & 512) == 512?new RegEx$ParserForXMLSchema:new RegEx$RegexParser; this$static.tokentree = $parse_3(rp, this$static.regex, this$static.options_0); } function RegEx$RegularExpression(regex){ $setPattern(this, regex, parseOptions()); } defineClass(591, 1, {3:1, 591:1}, RegEx$RegularExpression); _.equals_0 = function equals_226(obj){ var r; if (obj == null) return false; if (!instanceOf(obj, 591)) return false; r = castTo(obj, 591); return $equals_5(this.regex, r.regex) && this.options_0 == r.options_0; } ; _.hashCode_1 = function hashCode_86(){ return $hashCode_2(this.regex + '/' + createOptionString(this.options_0)); } ; _.toString_0 = function toString_165(){ return this.tokentree.toString_1(this.options_0); } ; _.options_0 = 0; var Lorg_eclipse_emf_ecore_xml_type_internal_RegEx$RegularExpression_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.internal', 'RegEx/RegularExpression', 591); function RegEx$Token$CharToken(type_0, ch_0){ $clinit_RegEx$Token(); RegEx$Token.call(this, type_0); this.chardata = ch_0; } defineClass(228, 122, $intern_169, RegEx$Token$CharToken); _.getChar = function getChar_0(){ return this.chardata; } ; _.toString_1 = function toString_166(options){ var number, pre, ret; switch (this.type_0) { case 0: switch (this.chardata) { case 124: case 42: case 43: case 63: case 40: case 41: case 46: case 91: case 123: case 92: ret = '\\' + charToString(this.chardata & $intern_47); break; case 12: ret = '\\f'; break; case 10: ret = '\\n'; break; case 13: ret = '\\r'; break; case 9: ret = '\\t'; break; case 27: ret = '\\e'; break; default:if (this.chardata >= $intern_64) { pre = (number = this.chardata >>> 0 , '0' + number.toString(16)); ret = '\\v' + $substring_1(pre, pre.length - 6, pre.length); } else ret = '' + charToString(this.chardata & $intern_47); } break; case 8: this == token_linebeginning || this == token_lineend?(ret = '' + charToString(this.chardata & $intern_47)):(ret = '\\' + charToString(this.chardata & $intern_47)); break; default:ret = null; } return ret; } ; _.chardata = 0; var Lorg_eclipse_emf_ecore_xml_type_internal_RegEx$Token$CharToken_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.internal', 'RegEx/Token/CharToken', 228); function RegEx$Token$ClosureToken(type_0, tok){ $clinit_RegEx$Token(); RegEx$Token.call(this, type_0); this.child = tok; this.min_0 = -1; this.max_0 = -1; } defineClass(318, 122, $intern_169, RegEx$Token$ClosureToken); _.getChild = function getChild_0(index_0){ return this.child; } ; _.setMax = function setMax_0(max_0){ this.max_0 = max_0; } ; _.setMin = function setMin_0(min_0){ this.min_0 = min_0; } ; _.size_2 = function size_83(){ return 1; } ; _.toString_1 = function toString_167(options){ var ret; if (this.type_0 == 3) { if (this.min_0 < 0 && this.max_0 < 0) { ret = this.child.toString_1(options) + '*'; } else if (this.min_0 == this.max_0) { ret = this.child.toString_1(options) + '{' + this.min_0 + '}'; } else if (this.min_0 >= 0 && this.max_0 >= 0) { ret = this.child.toString_1(options) + '{' + this.min_0 + ',' + this.max_0 + '}'; } else if (this.min_0 >= 0 && this.max_0 < 0) { ret = this.child.toString_1(options) + '{' + this.min_0 + ',}'; } else throw toJs(new RuntimeException_0('Token#toString(): CLOSURE ' + this.min_0 + ', ' + this.max_0)); } else { if (this.min_0 < 0 && this.max_0 < 0) { ret = this.child.toString_1(options) + '*?'; } else if (this.min_0 == this.max_0) { ret = this.child.toString_1(options) + '{' + this.min_0 + '}?'; } else if (this.min_0 >= 0 && this.max_0 >= 0) { ret = this.child.toString_1(options) + '{' + this.min_0 + ',' + this.max_0 + '}?'; } else if (this.min_0 >= 0 && this.max_0 < 0) { ret = this.child.toString_1(options) + '{' + this.min_0 + ',}?'; } else throw toJs(new RuntimeException_0('Token#toString(): NONGREEDYCLOSURE ' + this.min_0 + ', ' + this.max_0)); } return ret; } ; _.max_0 = 0; _.min_0 = 0; var Lorg_eclipse_emf_ecore_xml_type_internal_RegEx$Token$ClosureToken_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.internal', 'RegEx/Token/ClosureToken', 318); function RegEx$Token$ConcatToken(t1, t2){ RegEx$Token.call(this, 1); this.child = t1; this.child2 = t2; } defineClass(837, 122, $intern_169, RegEx$Token$ConcatToken); _.getChild = function getChild_1(index_0){ return index_0 == 0?this.child:this.child2; } ; _.size_2 = function size_84(){ return 2; } ; _.toString_1 = function toString_168(options){ var ret; this.child2.type_0 == 3 && this.child2.getChild(0) == this.child?(ret = this.child.toString_1(options) + '+'):this.child2.type_0 == 9 && this.child2.getChild(0) == this.child?(ret = this.child.toString_1(options) + '+?'):(ret = this.child.toString_1(options) + ('' + this.child2.toString_1(options))); return ret; } ; var Lorg_eclipse_emf_ecore_xml_type_internal_RegEx$Token$ConcatToken_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.internal', 'RegEx/Token/ConcatToken', 837); function RegEx$Token$ConditionToken(refno, cond, yespat, nopat){ $clinit_RegEx$Token(); RegEx$Token.call(this, 26); this.refNumber = refno; this.condition = cond; this.yes = yespat; this.no = nopat; } defineClass(1945, 122, $intern_169, RegEx$Token$ConditionToken); _.getChild = function getChild_2(index_0){ if (index_0 == 0) return this.yes; if (index_0 == 1) return this.no; throw toJs(new RuntimeException_0('Internal Error: ' + index_0)); } ; _.size_2 = function size_85(){ return !this.no?1:2; } ; _.toString_1 = function toString_169(options){ var ret; this.refNumber > 0?(ret = '(?(' + this.refNumber + ')'):this.condition.type_0 == 8?(ret = '(?(' + this.condition + ')'):(ret = '(?' + this.condition); !this.no?(ret += this.yes + ')'):(ret += this.yes + '|' + this.no + ')'); return ret; } ; _.refNumber = 0; var Lorg_eclipse_emf_ecore_xml_type_internal_RegEx$Token$ConditionToken_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.internal', 'RegEx/Token/ConditionToken', 1945); function RegEx$Token$ModifierToken(tok, add_0, mask){ RegEx$Token.call(this, 25); this.child = tok; this.add_0 = add_0; this.mask = mask; } defineClass(1946, 122, $intern_169, RegEx$Token$ModifierToken); _.getChild = function getChild_3(index_0){ return this.child; } ; _.size_2 = function size_86(){ return 1; } ; _.toString_1 = function toString_170(options){ return '(?' + (this.add_0 == 0?'':createOptionString(this.add_0)) + (this.mask == 0?'':createOptionString(this.mask)) + ':' + this.child.toString_1(options) + ')'; } ; _.add_0 = 0; _.mask = 0; var Lorg_eclipse_emf_ecore_xml_type_internal_RegEx$Token$ModifierToken_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.internal', 'RegEx/Token/ModifierToken', 1946); function RegEx$Token$ParenToken(type_0, tok, paren){ RegEx$Token.call(this, type_0); this.child = tok; this.parennumber = paren; } defineClass(838, 122, $intern_169, RegEx$Token$ParenToken); _.getChild = function getChild_4(index_0){ return this.child; } ; _.size_2 = function size_87(){ return 1; } ; _.toString_1 = function toString_171(options){ var ret; ret = null; switch (this.type_0) { case 6: this.parennumber == 0?(ret = '(?:' + this.child.toString_1(options) + ')'):(ret = '(' + this.child.toString_1(options) + ')'); break; case 20: ret = '(?=' + this.child.toString_1(options) + ')'; break; case 21: ret = '(?!' + this.child.toString_1(options) + ')'; break; case 22: ret = '(?<=' + this.child.toString_1(options) + ')'; break; case 23: ret = '(?' + this.child.toString_1(options) + ')'; } return ret; } ; _.parennumber = 0; var Lorg_eclipse_emf_ecore_xml_type_internal_RegEx$Token$ParenToken_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.internal', 'RegEx/Token/ParenToken', 838); function RegEx$Token$StringToken(type_0, str, n){ $clinit_RegEx$Token(); RegEx$Token.call(this, type_0); this.string = str; this.refNumber = n; } defineClass(530, 122, {3:1, 122:1, 530:1}, RegEx$Token$StringToken); _.getString = function getString_0(){ return this.string; } ; _.toString_1 = function toString_172(options){ return this.type_0 == 12?'\\' + this.refNumber:quoteMeta(this.string); } ; _.refNumber = 0; var Lorg_eclipse_emf_ecore_xml_type_internal_RegEx$Token$StringToken_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.internal', 'RegEx/Token/StringToken', 530); function $addChild_0(this$static, tok){ var buffer, ch_0, i, nextMaxLength, previous, size_0; if (!tok) return; !this$static.children && (this$static.children = new Vector); if (this$static.type_0 == 2) { $addElement(this$static.children, tok); return; } if (tok.type_0 == 1) { for (i = 0; i < tok.size_2(); i++) $addChild_0(this$static, tok.getChild(i)); return; } size_0 = this$static.children.arrayList.array.length; if (size_0 == 0) { $addElement(this$static.children, tok); return; } previous = castTo($elementAt(this$static.children, size_0 - 1), 122); if (!((previous.type_0 == 0 || previous.type_0 == 10) && (tok.type_0 == 0 || tok.type_0 == 10))) { $addElement(this$static.children, tok); return; } nextMaxLength = tok.type_0 == 0?2:tok.getString().length; if (previous.type_0 == 0) { buffer = new StringBuffer_0; ch_0 = previous.getChar(); ch_0 >= $intern_64?$append_3(buffer, decomposeToSurrogates(ch_0)):$append(buffer, ch_0 & $intern_47); previous = (++tokens_0 , new RegEx$Token$StringToken(10, null, 0)); $setElementAt(this$static.children, previous, size_0 - 1); } else { buffer = (previous.getString().length + nextMaxLength , new StringBuffer_0); $append_3(buffer, previous.getString()); } if (tok.type_0 == 0) { ch_0 = tok.getChar(); ch_0 >= $intern_64?$append_3(buffer, decomposeToSurrogates(ch_0)):$append(buffer, ch_0 & $intern_47); } else { $append_3(buffer, tok.getString()); } castTo(previous, 530).string = buffer.string; } function RegEx$Token$UnionToken(type_0){ $clinit_RegEx$Token(); RegEx$Token.call(this, type_0); } defineClass(477, 122, $intern_169, RegEx$Token$UnionToken); _.addChild = function addChild_0(tok){ $addChild_0(this, tok); } ; _.getChild = function getChild_5(index_0){ return castTo($elementAt(this.children, index_0), 122); } ; _.size_2 = function size_88(){ return !this.children?0:this.children.arrayList.array.length; } ; _.toString_1 = function toString_173(options){ var ch_0, ch2, i, ret, sb; if (this.type_0 == 1) { if (this.children.arrayList.array.length == 2) { ch_0 = castTo($elementAt(this.children, 0), 122); ch2 = castTo($elementAt(this.children, 1), 122); ch2.type_0 == 3 && ch2.getChild(0) == ch_0?(ret = ch_0.toString_1(options) + '+'):ch2.type_0 == 9 && ch2.getChild(0) == ch_0?(ret = ch_0.toString_1(options) + '+?'):(ret = ch_0.toString_1(options) + ('' + ch2.toString_1(options))); } else { sb = new StringBuffer; for (i = 0; i < this.children.arrayList.array.length; i++) { $append_3(sb, castTo($elementAt(this.children, i), 122).toString_1(options)); } ret = sb.string; } return ret; } if (this.children.arrayList.array.length == 2 && castTo($elementAt(this.children, 1), 122).type_0 == 7) { ret = castTo($elementAt(this.children, 0), 122).toString_1(options) + '?'; } else if (this.children.arrayList.array.length == 2 && castTo($elementAt(this.children, 0), 122).type_0 == 7) { ret = castTo($elementAt(this.children, 1), 122).toString_1(options) + '??'; } else { sb = new StringBuffer; $append_3(sb, castTo($elementAt(this.children, 0), 122).toString_1(options)); for (i = 1; i < this.children.arrayList.array.length; i++) { sb.string += '|'; $append_3(sb, castTo($elementAt(this.children, i), 122).toString_1(options)); } ret = sb.string; } return ret; } ; var Lorg_eclipse_emf_ecore_xml_type_internal_RegEx$Token$UnionToken_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.internal', 'RegEx/Token/UnionToken', 477); function normalize(value_0, collapse){ var buffer, c, i, length_0, offset, skipSpace, valueArray; if (value_0 == null) { return null; } length_0 = value_0.length; if (length_0 == 0) { return ''; } valueArray = initUnidimensionalArray(C_classLit, $intern_45, 28, length_0, 15, 1); checkCriticalStringBounds(0, length_0, value_0.length); checkCriticalStringBounds(0, length_0, valueArray.length); $getChars0(value_0, 0, length_0, valueArray, 0); buffer = null; skipSpace = collapse; for (i = 0 , offset = 0; i < length_0; i++) { c = valueArray[i]; $clinit_DataValue$XMLChar(); if (c <= 32 && (CHARS[c] & 2) != 0) { if (skipSpace) { !buffer && (buffer = new StringBuffer_1(value_0)); $deleteCharAt(buffer, i - offset++); } else { skipSpace = collapse; if (c != 32) { !buffer && (buffer = new StringBuffer_1(value_0)); $replace0(buffer, i - offset, i - offset + 1, String.fromCharCode(32)); } } } else { skipSpace = false; } } if (skipSpace) { if (!buffer) { return checkCriticalStringBounds(0, length_0 - 1, value_0.length) , value_0.substr(0, length_0 - 1); } else { length_0 = buffer.string.length; return length_0 > 0?$substring_1(buffer.string, 0, length_0 - 1):''; } } else { return !buffer?value_0:buffer.string; } } function XMLTypeUtil$PatternMatcherImpl(pattern){ this.regularExpression = new RegEx$RegularExpression(pattern); } defineClass(527, 1, {600:1}, XMLTypeUtil$PatternMatcherImpl); _.toString_0 = function toString_174(){ return this.regularExpression.regex; } ; var Lorg_eclipse_emf_ecore_xml_type_util_XMLTypeUtil$PatternMatcherImpl_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.util', 'XMLTypeUtil/PatternMatcherImpl', 527); function $clinit_XMLTypeValidator(){ $clinit_XMLTypeValidator = emptyMethod; $clinit_EObjectValidator(); INSTANCE_12 = new XMLTypeValidator; stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_emf_ecore_EValidator$PatternMatcher_2_classLit, 2), $intern_16, 381, 0, [stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_emf_ecore_EValidator$PatternMatcher_2_classLit, 1), $intern_170, 600, 0, [new XMLTypeUtil$PatternMatcherImpl('[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*')])]); stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_emf_ecore_EValidator$PatternMatcher_2_classLit, 2), $intern_16, 381, 0, [stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_emf_ecore_EValidator$PatternMatcher_2_classLit, 1), $intern_170, 600, 0, [new XMLTypeUtil$PatternMatcherImpl('\\i\\c*')])]); stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_emf_ecore_EValidator$PatternMatcher_2_classLit, 2), $intern_16, 381, 0, [stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_emf_ecore_EValidator$PatternMatcher_2_classLit, 1), $intern_170, 600, 0, [new XMLTypeUtil$PatternMatcherImpl('[\\i-[:]][\\c-[:]]*')]), stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_emf_ecore_EValidator$PatternMatcher_2_classLit, 1), $intern_170, 600, 0, [new XMLTypeUtil$PatternMatcherImpl('\\i\\c*')])]); new BigInteger_3('-1'); stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_emf_ecore_EValidator$PatternMatcher_2_classLit, 2), $intern_16, 381, 0, [stampJavaTypeInfo(getClassLiteralForArray(Lorg_eclipse_emf_ecore_EValidator$PatternMatcher_2_classLit, 1), $intern_170, 600, 0, [new XMLTypeUtil$PatternMatcherImpl('\\c+')])]); new BigInteger_3('0'); new BigInteger_3('0'); new BigInteger_3('1'); new BigInteger_3('0'); new BigInteger_3('18446744073709551615'); } function XMLTypeValidator(){ } defineClass(1707, 1527, {}, XMLTypeValidator); var INSTANCE_12; var Lorg_eclipse_emf_ecore_xml_type_util_XMLTypeValidator_2_classLit = createForClass('org.eclipse.emf.ecore.xml.type.util', 'XMLTypeValidator', 1707); function $clinit_ExclusiveRange(){ $clinit_ExclusiveRange = emptyMethod; EMPTY_LIST_ITERATOR = new ExclusiveRange$1; } function ExclusiveRange(end){ $clinit_ExclusiveRange(); this.first = 0; this.last = end - 1; this.step = 1; } defineClass(270, 1, $intern_23, ExclusiveRange); _.forEach_0 = function forEach_41(action){ $forEach_0(this, action); } ; _.iterator_0 = function iterator_91(){ return (this.last - this.first) * this.step < 0?EMPTY_LIST_ITERATOR:new ExclusiveRange$RangeIterator(this); } ; _.first = 0; _.last = 0; _.step = 0; var EMPTY_LIST_ITERATOR; var Lorg_eclipse_xtext_xbase_lib_ExclusiveRange_2_classLit = createForClass('org.eclipse.xtext.xbase.lib', 'ExclusiveRange', 270); function $add_35(){ throw toJs(new UnsupportedOperationException_0('Cannot add elements to a Range')); } function $next_17(){ throw toJs(new NoSuchElementException); } function $previous_1(){ throw toJs(new NoSuchElementException); } function $set_19(){ throw toJs(new UnsupportedOperationException_0('Cannot set elements in a Range')); } function ExclusiveRange$1(){ } defineClass(1084, 1, $intern_14, ExclusiveRange$1); _.add_1 = function add_73(e){ castTo(e, 17); $add_35(); } ; _.forEachRemaining = function forEachRemaining_61(consumer){ $forEachRemaining(this, consumer); } ; _.next_1 = function next_51(){ return $next_17(); } ; _.previous_0 = function previous_12(){ return $previous_1(); } ; _.set_1 = function set_45(e){ castTo(e, 17); $set_19(); } ; _.hasNext_0 = function hasNext_52(){ return false; } ; _.hasPrevious = function hasPrevious_12(){ return false; } ; _.nextIndex_0 = function nextIndex_12(){ return -1; } ; _.previousIndex = function previousIndex_11(){ return -1; } ; _.remove = function remove_133(){ throw toJs(new UnsupportedOperationException_0('Cannot remove elements from a Range')); } ; var Lorg_eclipse_xtext_xbase_lib_ExclusiveRange$1_2_classLit = createForClass('org.eclipse.xtext.xbase.lib', 'ExclusiveRange/1', 1084); function $add_36(){ throw toJs(new UnsupportedOperationException_0('Cannot add elements to a Range')); } function $next_18(this$static){ var value_0; if (!(this$static.this$01.step < 0?this$static.next_0 >= this$static.this$01.last:this$static.next_0 <= this$static.this$01.last)) { throw toJs(new NoSuchElementException); } value_0 = this$static.next_0; this$static.next_0 += this$static.this$01.step; ++this$static.nextIndex; return valueOf_3(value_0); } function $previous_2(this$static){ if (this$static.nextIndex <= 0) throw toJs(new NoSuchElementException); --this$static.nextIndex; this$static.next_0 -= this$static.this$01.step; return valueOf_3(this$static.next_0); } function $set_20(){ throw toJs(new UnsupportedOperationException_0('Cannot set elements in a Range')); } function ExclusiveRange$RangeIterator(this$0){ this.this$01 = this$0; this.next_0 = this.this$01.first; } defineClass(258, 1, $intern_14, ExclusiveRange$RangeIterator); _.add_1 = function add_74(e){ castTo(e, 17); $add_36(); } ; _.forEachRemaining = function forEachRemaining_62(consumer){ $forEachRemaining(this, consumer); } ; _.next_1 = function next_52(){ return $next_18(this); } ; _.previous_0 = function previous_13(){ return $previous_2(this); } ; _.set_1 = function set_46(e){ castTo(e, 17); $set_20(); } ; _.hasNext_0 = function hasNext_53(){ return this.this$01.step < 0?this.next_0 >= this.this$01.last:this.next_0 <= this.this$01.last; } ; _.hasPrevious = function hasPrevious_13(){ return this.nextIndex > 0; } ; _.nextIndex_0 = function nextIndex_13(){ return this.nextIndex; } ; _.previousIndex = function previousIndex_12(){ return this.nextIndex - 1; } ; _.remove = function remove_134(){ throw toJs(new UnsupportedOperationException_0('Cannot remove elements from a Range')); } ; _.next_0 = 0; _.nextIndex = 0; var Lorg_eclipse_xtext_xbase_lib_ExclusiveRange$RangeIterator_2_classLit = createForClass('org.eclipse.xtext.xbase.lib', 'ExclusiveRange/RangeIterator', 258); function forEach_42(iterable, procedure){ forEach_44(new AbstractEList$EIterator(iterable), procedure); } function isEmpty_35(iterable){ if (iterable) return iterable.isEmpty(); return !iterable.iterator_0().hasNext_0(); } function isNullOrEmpty(iterable){ return !iterable || isEmpty_35(iterable); } function forEach_43(iterator, procedure){ while (iterator.data_0 == null && !iterator.includeRoot?$hasAnyChildren(iterator):iterator.data_0 == null || iterator.size_0 != 0 && castTo(iterator.data_0[iterator.size_0 - 1], 51).hasNext_0()) { $apply_28(procedure, $next_13(iterator)); } } function forEach_44(iterator, procedure){ var i; i = 0; while (iterator.cursor != iterator.this$01_2.size_1()) { $apply_29(procedure, $doNext(iterator), valueOf_3(i)); i != $intern_0 && ++i; } } var C_classLit = createForPrimitive('char', 'C'); var I_classLit = createForPrimitive('int', 'I'); var Z_classLit = createForPrimitive('boolean', 'Z'); var J_classLit = createForPrimitive('long', 'J'); var B_classLit = createForPrimitive('byte', 'B'); var D_classLit = createForPrimitive('double', 'D'); var F_classLit = createForPrimitive('float', 'F'); var S_classLit = createForPrimitive('short', 'S'); var Lorg_eclipse_elk_core_labels_ILabelManager_2_classLit = createForInterface('org.eclipse.elk.core.labels', 'ILabelManager'); var Lorg_eclipse_emf_common_util_DiagnosticChain_2_classLit = createForInterface('org.eclipse.emf.common.util', 'DiagnosticChain'); var Lorg_eclipse_emf_ecore_resource_ResourceSet_2_classLit = createForInterface('org.eclipse.emf.ecore.resource', 'ResourceSet'); var Lorg_eclipse_emf_common_util_InvocationTargetException_2_classLit = createForClass('org.eclipse.emf.common.util', 'InvocationTargetException', null); var $entry = ($clinit_Impl() , entry_2); var gwtOnLoad = gwtOnLoad = gwtOnLoad_0; addInitFunctions(init); setGwtProperty('permProps', [[['locale', 'default'], ['user.agent', 'gecko1_8']], [['locale', 'default'], ['user.agent', 'safari']]]); // -------------- RUN GWT INITIALIZATION CODE -------------- gwtOnLoad(null, 'elk', null);