(function (root, factory) {
if (typeof define === 'function' && define.amd)
define(['exports', './kotlin-kotlin-stdlib-js-ir.js', './kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js', './korlibs-korma.js', './korlibs-klock.js', './korlibs-korgw.js', './korlibs-klogger.js', './korlibs-korio.js', './korlibs-korim.js', './korlibs-korinject.js', './korlibs-kmem.js', './korlibs-kds.js', './korlibs-korte.js', './korlibs-krypto.js'], factory);
else if (typeof exports === 'object')
factory(module.exports, require('./kotlin-kotlin-stdlib-js-ir.js'), require('./kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js'), require('./korlibs-korma.js'), require('./korlibs-klock.js'), require('./korlibs-korgw.js'), require('./korlibs-klogger.js'), require('./korlibs-korio.js'), require('./korlibs-korim.js'), require('./korlibs-korinject.js'), require('./korlibs-kmem.js'), require('./korlibs-kds.js'), require('./korlibs-korte.js'), require('./korlibs-krypto.js'));
else {
if (typeof this['kotlin-kotlin-stdlib-js-ir'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korge'. Its dependency 'kotlin-kotlin-stdlib-js-ir' was not found. Please, check whether 'kotlin-kotlin-stdlib-js-ir' is loaded prior to 'korlibs-korge'.");
}
if (typeof this['kotlinx.coroutines-kotlinx-coroutines-core-js-ir'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korge'. Its dependency 'kotlinx.coroutines-kotlinx-coroutines-core-js-ir' was not found. Please, check whether 'kotlinx.coroutines-kotlinx-coroutines-core-js-ir' is loaded prior to 'korlibs-korge'.");
}
if (typeof this['korlibs-korma'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korge'. Its dependency 'korlibs-korma' was not found. Please, check whether 'korlibs-korma' is loaded prior to 'korlibs-korge'.");
}
if (typeof this['korlibs-klock'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korge'. Its dependency 'korlibs-klock' was not found. Please, check whether 'korlibs-klock' is loaded prior to 'korlibs-korge'.");
}
if (typeof this['korlibs-korgw'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korge'. Its dependency 'korlibs-korgw' was not found. Please, check whether 'korlibs-korgw' is loaded prior to 'korlibs-korge'.");
}
if (typeof this['korlibs-klogger'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korge'. Its dependency 'korlibs-klogger' was not found. Please, check whether 'korlibs-klogger' is loaded prior to 'korlibs-korge'.");
}
if (typeof this['korlibs-korio'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korge'. Its dependency 'korlibs-korio' was not found. Please, check whether 'korlibs-korio' is loaded prior to 'korlibs-korge'.");
}
if (typeof this['korlibs-korim'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korge'. Its dependency 'korlibs-korim' was not found. Please, check whether 'korlibs-korim' is loaded prior to 'korlibs-korge'.");
}
if (typeof this['korlibs-korinject'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korge'. Its dependency 'korlibs-korinject' was not found. Please, check whether 'korlibs-korinject' is loaded prior to 'korlibs-korge'.");
}
if (typeof this['korlibs-kmem'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korge'. Its dependency 'korlibs-kmem' was not found. Please, check whether 'korlibs-kmem' is loaded prior to 'korlibs-korge'.");
}
if (typeof this['korlibs-kds'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korge'. Its dependency 'korlibs-kds' was not found. Please, check whether 'korlibs-kds' is loaded prior to 'korlibs-korge'.");
}
if (typeof this['korlibs-korte'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korge'. Its dependency 'korlibs-korte' was not found. Please, check whether 'korlibs-korte' is loaded prior to 'korlibs-korge'.");
}
if (typeof this['korlibs-krypto'] === 'undefined') {
throw new Error("Error loading module 'korlibs-korge'. Its dependency 'korlibs-krypto' was not found. Please, check whether 'korlibs-krypto' is loaded prior to 'korlibs-korge'.");
}
root['korlibs-korge'] = factory(typeof this['korlibs-korge'] === 'undefined' ? {} : this['korlibs-korge'], this['kotlin-kotlin-stdlib-js-ir'], this['kotlinx.coroutines-kotlinx-coroutines-core-js-ir'], this['korlibs-korma'], this['korlibs-klock'], this['korlibs-korgw'], this['korlibs-klogger'], this['korlibs-korio'], this['korlibs-korim'], this['korlibs-korinject'], this['korlibs-kmem'], this['korlibs-kds'], this['korlibs-korte'], this['korlibs-krypto']);
}
}(this, function (_, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core, kotlin_com_soywiz_korlibs_korma_korma, kotlin_com_soywiz_korlibs_klock_klock, kotlin_com_soywiz_korlibs_korgw_korgw, kotlin_com_soywiz_korlibs_klogger_klogger, kotlin_com_soywiz_korlibs_korio_korio, kotlin_com_soywiz_korlibs_korim_korim, kotlin_com_soywiz_korlibs_korinject_korinject, kotlin_com_soywiz_korlibs_kmem_kmem, kotlin_com_soywiz_korlibs_kds_kds, kotlin_com_soywiz_korlibs_korte_korte, kotlin_com_soywiz_korlibs_krypto_krypto) {
'use strict';
//region block: imports
var imul = Math.imul;
var CoroutineImpl = kotlin_kotlin.$_$.yb;
var Unit_getInstance = kotlin_kotlin.$_$.k5;
var THROW_CCE = kotlin_kotlin.$_$.di;
var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.p1;
var isInterface = kotlin_kotlin.$_$.id;
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.gb;
var classMeta = kotlin_kotlin.$_$.pc;
var Companion_getInstance = kotlin_com_soywiz_korlibs_korma_korma.$_$.u5;
var coroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.d;
var toString = kotlin_kotlin.$_$.ae;
var hashCode = kotlin_kotlin.$_$.xc;
var equals = kotlin_kotlin.$_$.rc;
var Companion_getInstance_0 = kotlin_com_soywiz_korlibs_klock_klock.$_$.b1;
var DateTime = kotlin_com_soywiz_korlibs_klock_klock.$_$.a;
var Kind_MOUSE_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.f4;
var TouchEvent = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.i1;
var getKClass = kotlin_kotlin.$_$.d;
var Console_getInstance = kotlin_com_soywiz_korlibs_klogger_klogger.$_$.e;
var printStackTrace = kotlin_kotlin.$_$.bj;
var GameWindow = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.m1;
var println = kotlin_kotlin.$_$.fc;
var OS_getInstance = kotlin_com_soywiz_korlibs_korio_korio.$_$.q4;
var PerformanceCounter_getInstance = kotlin_com_soywiz_korlibs_klock_klock.$_$.c1;
var Colors_getInstance = kotlin_com_soywiz_korlibs_korim_korim.$_$.t3;
var RGBA = kotlin_com_soywiz_korlibs_korim_korim.$_$.c1;
var configure = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.o1;
var Companion_getInstance_1 = kotlin_com_soywiz_korlibs_klock_klock.$_$.e1;
var get_resourcesVfs = kotlin_com_soywiz_korlibs_korio_korio.$_$.p;
var ensureNotNull = kotlin_kotlin.$_$.ri;
var readBitmap = kotlin_com_soywiz_korlibs_korim_korim.$_$.y1;
var Level_ERROR_getInstance = kotlin_com_soywiz_korlibs_klogger_klogger.$_$.b;
var AsyncInjectorContext = kotlin_com_soywiz_korlibs_korinject_korinject.$_$.c;
var SupervisorJob$default = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.n;
var PrintAG_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.y4;
var Companion_getInstance_2 = kotlin_com_soywiz_korlibs_korio_korio.$_$.j4;
var Dyn__set_impl_2ozvx8 = kotlin_com_soywiz_korlibs_korio_korio.$_$.g4;
var Companion_getInstance_3 = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.w3;
var get_isJsBrowser = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.u1;
var launchImmediately = kotlin_com_soywiz_korlibs_korio_korio.$_$.d;
var AsyncInjector = kotlin_com_soywiz_korlibs_korinject_korinject.$_$.d;
var Level_TRACE_getInstance = kotlin_com_soywiz_korlibs_klogger_klogger.$_$.c;
var Type_START_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.l4;
var Status_ADD_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.g4;
var Type_END_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.j4;
var Status_REMOVE_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.i4;
var Type_MOVE_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.k4;
var Status_KEEP_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.h4;
var MouseEvent = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.c1;
var KeyEvent = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.b1;
var GestureEvent = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.z;
var DropFileEvent = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.s;
var ResumeEvent = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.g1;
var PauseEvent = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.d1;
var StopEvent = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.h1;
var DestroyEvent = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.r;
var first = kotlin_kotlin.$_$.g8;
var MouseButton_LEFT_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.a4;
var numberToInt = kotlin_kotlin.$_$.ud;
var Type_DRAG_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.d4;
var Type_UP_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.e4;
var Type_DOWN_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.c4;
var GamePadConnectionEvent = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.x;
var GamePadUpdateEvent = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.y;
var get_localCurrentDirVfs = kotlin_com_soywiz_korlibs_korio_korio.$_$.o;
var CoroutineKey_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.e6;
var GameWindowCreationConfig_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.q5;
var CreateDefaultGameWindow = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.k1;
var Companion_getInstance_4 = kotlin_com_soywiz_korlibs_klogger_klogger.$_$.f;
var ImageFormats_init_$Create$ = kotlin_com_soywiz_korlibs_korim_korim.$_$.l2;
var Quality_AUTOMATIC_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.p4;
var Companion_getInstance_5 = kotlin_com_soywiz_korlibs_korma_korma.$_$.i5;
var Companion_getInstance_6 = kotlin_com_soywiz_korlibs_korma_korma.$_$.s5;
var Companion_getInstance_7 = kotlin_com_soywiz_korlibs_klock_klock.$_$.d1;
var AsyncInjector_init_$Create$ = kotlin_com_soywiz_korlibs_korinject_korinject.$_$.f;
var AG = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.i;
var Resources = kotlin_com_soywiz_korlibs_korio_korio.$_$.w1;
var CoroutineContext = kotlin_kotlin.$_$.xb;
var TimeProvider = kotlin_com_soywiz_korlibs_klock_klock.$_$.b;
var Companion_getInstance_8 = kotlin_com_soywiz_korlibs_korma_korma.$_$.o5;
var TouchEvent_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.p5;
var MouseEvent_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.m5;
var ReshapeEvent = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.f1;
var CompletableDeferred$default = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.j;
var objectMeta = kotlin_kotlin.$_$.wd;
var SuspendFunction1 = kotlin_kotlin.$_$.ac;
var SuspendFunction0 = kotlin_kotlin.$_$.zb;
var Companion_getInstance_9 = kotlin_com_soywiz_korlibs_korio_korio.$_$.n4;
var Event = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.w;
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.v1;
var EventListenerFastMap = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.v;
var FastArrayList = kotlin_com_soywiz_korlibs_kds_kds.$_$.h;
var FastArrayList_init_$Create$ = kotlin_com_soywiz_korlibs_kds_kds.$_$.d2;
var Matrix_init_$Create$ = kotlin_com_soywiz_korlibs_korma_korma.$_$.c4;
var Companion_getInstance_10 = kotlin_com_soywiz_korlibs_korim_korim.$_$.s3;
var get_ColorAdd_NEUTRAL = kotlin_com_soywiz_korlibs_korim_korim.$_$.x;
var charSequenceLength = kotlin_kotlin.$_$.nc;
var charSequenceGet = kotlin_kotlin.$_$.mc;
var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.x3;
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.p3;
var get_lastIndex = kotlin_kotlin.$_$.ag;
var Companion_getInstance_11 = kotlin_com_soywiz_korlibs_korim_korim.$_$.v3;
var interfaceMeta = kotlin_kotlin.$_$.yc;
var CloseableCancellable = kotlin_com_soywiz_korlibs_korio_korio.$_$.v;
var CloseableCancellable_0 = kotlin_com_soywiz_korlibs_korio_korio.$_$.u;
var getExtra = kotlin_com_soywiz_korlibs_kds_kds.$_$.k1;
var setExtra = kotlin_com_soywiz_korlibs_kds_kds.$_$.q1;
var LinkedHashSet_init_$Create$ = kotlin_kotlin.$_$.x1;
var addAll = kotlin_kotlin.$_$.j6;
var Signal_init_$Create$ = kotlin_com_soywiz_korlibs_korio_korio.$_$.z3;
var NativeImage$default = kotlin_com_soywiz_korlibs_korim_korim.$_$.z1;
var get_degrees = kotlin_com_soywiz_korlibs_korma_korma.$_$.f2;
var emptyList = kotlin_kotlin.$_$.w7;
var throwUninitializedPropertyAccessException = kotlin_kotlin.$_$.ej;
var UiContainer = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.t1;
var UiContainer_init_$Init$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.t5;
var UiButton_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.s5;
var UiContainer_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.u5;
var Template$default = kotlin_com_soywiz_korlibs_korte_korte.$_$.a;
var Companion_getInstance_12 = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.c6;
var convertRange = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.g1;
var withSign = kotlin_kotlin.$_$.he;
var UiLabel_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.v5;
var UiTextField_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.w5;
var DoubleCompanionObject_getInstance = kotlin_kotlin.$_$.u4;
var UiFillLayout_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.g6;
var UiStandardCursor_RESIZE_EAST_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.r4;
var runBlockingNoSuspensions = kotlin_com_soywiz_korlibs_korio_korio.$_$.h;
var toDoubleOrNull = kotlin_kotlin.$_$.ng;
var coerceAtLeast = kotlin_kotlin.$_$.le;
var coerceAtMost = kotlin_kotlin.$_$.ne;
var toStringDecimal$default = kotlin_com_soywiz_korlibs_korio_korio.$_$.s3;
var set_preferredWidth = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.s1;
var HorizontalUiLayout_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.f6;
var preferredSize = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.r1;
var get_pt = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.q1;
var get_percent = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.p1;
var booleanArray = kotlin_kotlin.$_$.ic;
var Key_RIGHT_SHIFT_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.v3;
var Key_LEFT_SHIFT_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.p3;
var Key_RIGHT_CONTROL_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.u3;
var Key_LEFT_CONTROL_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.o3;
var Key_RIGHT_ALT_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.t3;
var Key_LEFT_ALT_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.n3;
var Key_META_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.q3;
var arraycopy = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.t;
var _TimeSpan___get_nanoseconds__impl__gaf49o = kotlin_com_soywiz_korlibs_klock_klock.$_$.w;
var _TimeSpan___get_milliseconds__impl__pb0we5 = kotlin_com_soywiz_korlibs_klock_klock.$_$.t;
var TimeSpan__minus_impl_5w5v8s = kotlin_com_soywiz_korlibs_klock_klock.$_$.v;
var TimeSpan__compareTo_impl_zidry4 = kotlin_com_soywiz_korlibs_klock_klock.$_$.m;
var AGOpenglFactory_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.y5;
var Mixin_init_$Create$ = kotlin_com_soywiz_korlibs_kds_kds.$_$.k2;
var Companion_getInstance_13 = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.d6;
var Point = kotlin_com_soywiz_korlibs_korma_korma.$_$.p1;
var until = kotlin_kotlin.$_$.ye;
var collectionSizeOrDefault = kotlin_kotlin.$_$.p6;
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.l1;
var GamepadInfo_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.l5;
var copyToArray = kotlin_kotlin.$_$.q7;
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.m1;
var setBits = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.z2;
var Extra = kotlin_com_soywiz_korlibs_kds_kds.$_$.g;
var getExtraTyped = kotlin_com_soywiz_korlibs_kds_kds.$_$.j1;
var AsyncSignal_init_$Create$ = kotlin_com_soywiz_korlibs_korio_korio.$_$.y3;
var launchImmediately_0 = kotlin_com_soywiz_korlibs_korio_korio.$_$.c;
var Closeable = kotlin_com_soywiz_korlibs_korio_korio.$_$.w;
var KProperty1 = kotlin_kotlin.$_$.ef;
var getPropertyCallableRef = kotlin_kotlin.$_$.vc;
var PropertyThis_init_$Create$ = kotlin_com_soywiz_korlibs_kds_kds.$_$.m2;
var DateTime__minus_impl_10njw8 = kotlin_com_soywiz_korlibs_klock_klock.$_$.j;
var isNaN_0 = kotlin_kotlin.$_$.wi;
var to = kotlin_kotlin.$_$.ij;
var Enum = kotlin_kotlin.$_$.sh;
var hasExtra = kotlin_com_soywiz_korlibs_kds_kds.$_$.m1;
var Cursor_DEFAULT_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.m4;
var Once = kotlin_com_soywiz_korlibs_korio_korio.$_$.k2;
var Bitmaps_getInstance = kotlin_com_soywiz_korlibs_korim_korim.$_$.q3;
var get_Bitmaps_white = kotlin_com_soywiz_korlibs_korim_korim.$_$.c;
var Companion_getInstance_14 = kotlin_com_soywiz_korlibs_korim_korim.$_$.u3;
var Property_init_$Create$ = kotlin_com_soywiz_korlibs_kds_kds.$_$.l2;
var ScrollDeltaMode_PIXEL_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.b4;
var preventDefault = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.j1;
var KMutableProperty1 = kotlin_kotlin.$_$.bf;
var KMutableProperty2 = kotlin_kotlin.$_$.cf;
var Property = kotlin_com_soywiz_korlibs_kds_kds.$_$.f;
var DateTime__hashCode_impl_yf0bc9 = kotlin_com_soywiz_korlibs_klock_klock.$_$.i;
var Pool_init_$Create$ = kotlin_com_soywiz_korlibs_kds_kds.$_$.s2;
var FastIntMap = kotlin_com_soywiz_korlibs_kds_kds.$_$.j;
var valueOf = kotlin_com_soywiz_korlibs_klogger_klogger.$_$.a;
var split$default = kotlin_kotlin.$_$.c1;
var startsWith$default = kotlin_kotlin.$_$.e1;
var isBlank = kotlin_kotlin.$_$.tf;
var charArrayOf = kotlin_kotlin.$_$.kc;
var split$default_0 = kotlin_kotlin.$_$.b1;
var isCharSequence = kotlin_kotlin.$_$.dd;
var trim = kotlin_kotlin.$_$.kh;
var get_lastIndex_0 = kotlin_kotlin.$_$.w8;
var MutableMap = kotlin_kotlin.$_$.e6;
var FastIdentityMap = kotlin_com_soywiz_korlibs_kds_kds.$_$.i;
var clear = kotlin_com_soywiz_korlibs_kds_kds.$_$.y;
var get = kotlin_com_soywiz_korlibs_kds_kds.$_$.l1;
var TextureTargetKind_TEXTURE_2D_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.f3;
var TextureTargetKind_TEXTURE_CUBE_MAP_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.g3;
var MultiBitmap = kotlin_com_soywiz_korlibs_korim_korim.$_$.s;
var set = kotlin_com_soywiz_korlibs_kds_kds.$_$.r1;
var toLong = kotlin_kotlin.$_$.yd;
var BmpCoordsWithInstance_init_$Create$ = kotlin_com_soywiz_korlibs_korim_korim.$_$.o2;
var Companion_getInstance_15 = kotlin_com_soywiz_korlibs_korma_korma.$_$.q5;
var BmpSlice = kotlin_com_soywiz_korlibs_korim_korim.$_$.p;
var Long = kotlin_kotlin.$_$.xh;
var Pool_init_$Create$_0 = kotlin_com_soywiz_korlibs_kds_kds.$_$.t2;
var getAndRemove = kotlin_com_soywiz_korlibs_kds_kds.$_$.f1;
var get_keys = kotlin_com_soywiz_korlibs_kds_kds.$_$.o1;
var toList = kotlin_kotlin.$_$.na;
var Companion_getInstance_16 = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.v3;
var AbstractMutableSet = kotlin_kotlin.$_$.m5;
var isObject = kotlin_kotlin.$_$.ld;
var insert = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.s1;
var noWhenBranchMatchedException = kotlin_kotlin.$_$.zi;
var Program = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.b;
var toShort = kotlin_kotlin.$_$.zd;
var Companion_getInstance_17 = kotlin_com_soywiz_korlibs_korma_korma.$_$.m5;
var VarType_Byte4_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.z1;
var Attribute_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.z4;
var VarType_Float4_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.d2;
var Varying_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.d5;
var VarType_UByte1_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.g2;
var Precision_LOW_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.u1;
var Attribute_init_$Create$_0 = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.s4;
var VarType_Float1_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.a2;
var Varying_init_$Create$_0 = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.v4;
var VarType_Bool1_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.y1;
var Uniform_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.c5;
var fillArrayVal = kotlin_kotlin.$_$.tc;
var VarType_Sampler2D_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.f2;
var DefaultShaders_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.b6;
var ProgramLayout_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.u4;
var ProgramBuilderDefault = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.j;
var VertexShader = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.c;
var If_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.b5;
var FragmentShader = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.a;
var StencilState_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.i5;
var ColorMaskState_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.g5;
var TextureUnit_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.j5;
var UniformValues_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.x4;
var VertexData = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.g;
var fastArrayListOf = kotlin_com_soywiz_korlibs_kds_kds.$_$.b1;
var toByte = kotlin_kotlin.$_$.xd;
var _RGBA___get_value__impl__hhco8v = kotlin_com_soywiz_korlibs_korim_korim.$_$.k3;
var _ColorAdd___get_value__impl__up0ct3 = kotlin_com_soywiz_korlibs_korim_korim.$_$.a3;
var arraycopy_0 = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.j;
var arrayadd = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.h;
var arraycopy_1 = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.l;
var arrayfill = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.w;
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.x2;
var DrawType_TRIANGLES_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.z2;
var copyFrom = kotlin_com_soywiz_korlibs_korma_korma.$_$.d2;
var IntCompanionObject_getInstance = kotlin_kotlin.$_$.w4;
var Matrix3D = kotlin_com_soywiz_korlibs_korma_korma.$_$.m1;
var ShaderType_VERTEX_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.x1;
var Builder_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.t4;
var ShaderType_FRAGMENT_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.w1;
var Program_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.a5;
var Command_getInstance = kotlin_com_soywiz_korlibs_korma_korma.$_$.h5;
var Companion_getInstance_18 = kotlin_com_soywiz_korlibs_korma_korma.$_$.e5;
var VectorPath_init_$Create$ = kotlin_com_soywiz_korlibs_korma_korma.$_$.b4;
var DrawType_LINES_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.x2;
var UniformValues = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.f;
var Scissor_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.h5;
var lazy = kotlin_kotlin.$_$.yi;
var Pool = kotlin_com_soywiz_korlibs_kds_kds.$_$.s;
var MutableMarginInt_init_$Create$ = kotlin_com_soywiz_korlibs_korma_korma.$_$.e4;
var toMatrix3D = kotlin_com_soywiz_korlibs_korma_korma.$_$.s2;
var AGFeatures = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.h;
var Pool_init_$Create$_1 = kotlin_com_soywiz_korlibs_kds_kds.$_$.f2;
var clamp = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.d1;
var getOrNull = kotlin_com_soywiz_korlibs_korim_korim.$_$.k;
var get_baseWidth = kotlin_com_soywiz_korlibs_korim_korim.$_$.f;
var get_baseHeight = kotlin_com_soywiz_korlibs_korim_korim.$_$.e;
var get_name = kotlin_com_soywiz_korlibs_korim_korim.$_$.m;
var get_virtFrame = kotlin_com_soywiz_korlibs_korim_korim.$_$.n;
var get_frameOffsetX = kotlin_com_soywiz_korlibs_korim_korim.$_$.h;
var get_frameOffsetY = kotlin_com_soywiz_korlibs_korim_korim.$_$.i;
var get_frameWidth = kotlin_com_soywiz_korlibs_korim_korim.$_$.j;
var get_frameHeight = kotlin_com_soywiz_korlibs_korim_korim.$_$.g;
var get_isRotatedInBaseDeg90 = kotlin_com_soywiz_korlibs_korim_korim.$_$.l;
var BmpCoordsWithT = kotlin_com_soywiz_korlibs_korim_korim.$_$.o;
var ISizeInt = kotlin_com_soywiz_korlibs_korma_korma.$_$.l1;
var BoundsBuilder = kotlin_com_soywiz_korlibs_korma_korma.$_$.k1;
var arraycopy_2 = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.p;
var Mountable = kotlin_com_soywiz_korlibs_korio_korio.$_$.m;
var MountableVfs$default = kotlin_com_soywiz_korlibs_korio_korio.$_$.t3;
var AsyncDependency = kotlin_com_soywiz_korlibs_korinject_korinject.$_$.a;
var mapCapacity = kotlin_kotlin.$_$.e9;
var coerceAtLeast_0 = kotlin_kotlin.$_$.me;
var LinkedHashMap_init_$Create$_0 = kotlin_kotlin.$_$.u1;
var Glyph = kotlin_com_soywiz_korlibs_korim_korim.$_$.e1;
var toIntMap = kotlin_com_soywiz_korlibs_kds_kds.$_$.x1;
var IntMap_init_$Create$ = kotlin_com_soywiz_korlibs_kds_kds.$_$.r2;
var BitmapFont_init_$Create$ = kotlin_com_soywiz_korlibs_korim_korim.$_$.p2;
var fromBase64$default = kotlin_com_soywiz_korlibs_krypto_krypto.$_$.e;
var openAsync$default = kotlin_com_soywiz_korlibs_korio_korio.$_$.m3;
var readBitmap$default = kotlin_com_soywiz_korlibs_korim_korim.$_$.i2;
var slice$default = kotlin_com_soywiz_korlibs_korim_korim.$_$.b2;
var Quality_PERFORMANCE_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.q4;
var Key_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.z;
var Job = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.u1;
var RequestContext = kotlin_com_soywiz_korlibs_korinject_korinject.$_$.b;
var cancel$default = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.r;
var CancellationException = kotlin_kotlin.$_$.fb;
var cancel = kotlin_com_soywiz_korlibs_korio_korio.$_$.f1;
var InjectorAsyncDependency = kotlin_com_soywiz_korlibs_korinject_korinject.$_$.e;
var ResourcesContainer = kotlin_com_soywiz_korlibs_korio_korio.$_$.v1;
var getKClassFromExpression = kotlin_kotlin.$_$.c;
var KClass = kotlin_kotlin.$_$.ze;
var launchUnscopedAndWait = kotlin_com_soywiz_korlibs_korio_korio.$_$.t2;
var launchUnscoped = kotlin_com_soywiz_korlibs_korio_korio.$_$.e;
var launchUnscoped_0 = kotlin_com_soywiz_korlibs_korio_korio.$_$.f;
var arrayListOf = kotlin_kotlin.$_$.l6;
var KMutableProperty0 = kotlin_kotlin.$_$.af;
var TimeSpan = kotlin_com_soywiz_korlibs_klock_klock.$_$.c;
var Companion_getInstance_19 = kotlin_com_soywiz_korlibs_korio_korio.$_$.m4;
var TimeSpan__plus_impl_qdd6zo = kotlin_com_soywiz_korlibs_klock_klock.$_$.x;
var IntArrayList_init_$Create$ = kotlin_com_soywiz_korlibs_kds_kds.$_$.p2;
var maxOrNull = kotlin_kotlin.$_$.h9;
var Companion_getInstance_20 = kotlin_kotlin.$_$.f5;
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.z3;
var TimeSpan__div_impl_l42f2r = kotlin_com_soywiz_korlibs_klock_klock.$_$.o;
var clamp_0 = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.e1;
var clamp_1 = kotlin_com_soywiz_korlibs_klock_klock.$_$.e;
var intercepted = kotlin_kotlin.$_$.ib;
var get_MODE_CANCELLABLE = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.w1;
var CancellableContinuationImpl = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g1;
var toList_0 = kotlin_kotlin.$_$.oa;
var returnIfSuspended = kotlin_kotlin.$_$.h;
var TimeSpan__times_impl_86ofia = kotlin_com_soywiz_korlibs_klock_klock.$_$.z;
var withTimeout = kotlin_com_soywiz_korlibs_korio_korio.$_$.u2;
var TimeoutCancellationException = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.z1;
var Companion_getInstance_21 = kotlin_com_soywiz_korlibs_korma_korma.$_$.w5;
var TimeSpan__hashCode_impl_izs3k5 = kotlin_com_soywiz_korlibs_klock_klock.$_$.p;
var interpolate = kotlin_com_soywiz_korlibs_korma_korma.$_$.b3;
var get_DefaultTtfFont = kotlin_com_soywiz_korlibs_korim_korim.$_$.g1;
var Companion_getInstance_22 = kotlin_com_soywiz_korlibs_korim_korim.$_$.w3;
var get_DefaultStringTextRenderer = kotlin_com_soywiz_korlibs_korim_korim.$_$.p1;
var get_Bitmaps_transparent = kotlin_com_soywiz_korlibs_korim_korim.$_$.b;
var Rectangle = kotlin_com_soywiz_korlibs_korma_korma.$_$.r1;
var Comparator = kotlin_kotlin.$_$.ph;
var compareValues = kotlin_kotlin.$_$.db;
var ISoftKeyboardConfig = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.a1;
var sortedWith = kotlin_kotlin.$_$.x9;
var indexOf = kotlin_kotlin.$_$.p8;
var getCyclicOrNull = kotlin_com_soywiz_korlibs_kds_kds.$_$.g1;
var Key_TAB_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.w3;
var Type_DOWN_getInstance_0 = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.y3;
var _TimeSpan___get_seconds__impl__cx2k1c = kotlin_com_soywiz_korlibs_klock_klock.$_$.y;
var RGBA__times_impl_wehs9n = kotlin_com_soywiz_korlibs_korim_korim.$_$.j3;
var listOf = kotlin_kotlin.$_$.d9;
var numberToDouble = kotlin_kotlin.$_$.td;
var mipmaps = kotlin_com_soywiz_korlibs_korim_korim.$_$.w;
var NotImplementedError_init_$Create$ = kotlin_kotlin.$_$.k1;
var roundRect = kotlin_com_soywiz_korlibs_korma_korma.$_$.c1;
var circle = kotlin_com_soywiz_korlibs_korma_korma.$_$.n;
var LineCap_SQUARE_getInstance = kotlin_com_soywiz_korlibs_korma_korma.$_$.j3;
var line = kotlin_com_soywiz_korlibs_korma_korma.$_$.u;
var LineCap_BUTT_getInstance = kotlin_com_soywiz_korlibs_korma_korma.$_$.i3;
var moveTo = kotlin_com_soywiz_korlibs_korma_korma.$_$.w;
var lineTo = kotlin_com_soywiz_korlibs_korma_korma.$_$.s;
var FastStringMap = kotlin_com_soywiz_korlibs_kds_kds.$_$.k;
var mix = kotlin_com_soywiz_korlibs_korim_korim.$_$.d1;
var _RGBA___get_ad__impl__pt5rdj = kotlin_com_soywiz_korlibs_korim_korim.$_$.c3;
var sliceWithSize$default = kotlin_com_soywiz_korlibs_korim_korim.$_$.a2;
var asNinePatchSimple = kotlin_com_soywiz_korlibs_korim_korim.$_$.v;
var _RGBA___get_a__impl__6msvu7 = kotlin_com_soywiz_korlibs_korim_korim.$_$.b3;
var extraCache = kotlin_com_soywiz_korlibs_kds_kds.$_$.a1;
var cancellable = kotlin_com_soywiz_korlibs_korio_korio.$_$.d1;
var CancellationException_init_$Create$ = kotlin_kotlin.$_$.z1;
var cancel_0 = kotlin_com_soywiz_korlibs_korio_korio.$_$.e1;
var toIntCeil = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.a3;
var NativeImageOrBitmap32 = kotlin_com_soywiz_korlibs_korim_korim.$_$.t;
var Companion_getInstance_23 = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.a6;
var BlendFactor_ONE_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.o2;
var BlendFactor_ZERO_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.q2;
var Blending_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.e5;
var BlendFactor_DESTINATION_COLOR_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.j2;
var BlendFactor_ONE_MINUS_SOURCE_ALPHA_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.m2;
var BlendFactor_ONE_MINUS_SOURCE_COLOR_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.n2;
var BlendFactor_SOURCE_ALPHA_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.p2;
var BlendFactor_ONE_MINUS_DESTINATION_ALPHA_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.k2;
var BlendFactor_DESTINATION_ALPHA_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.i2;
var BlendEquation_REVERSE_SUBTRACT_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.h2;
var Blending_init_$Create$_0 = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.f5;
var BlendFactor_ONE_MINUS_DESTINATION_COLOR_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.l2;
var get_indices = kotlin_kotlin.$_$.t8;
var anyToString = kotlin_kotlin.$_$.gc;
var compareTo = kotlin_kotlin.$_$.qc;
var getOrNull_0 = kotlin_kotlin.$_$.k8;
var sortWith = kotlin_kotlin.$_$.v9;
var MutableIterator = kotlin_kotlin.$_$.b6;
var Collection = kotlin_kotlin.$_$.o5;
var MutableCollection = kotlin_kotlin.$_$.a6;
var List = kotlin_kotlin.$_$.x5;
var ShapeBuilder = kotlin_com_soywiz_korlibs_korim_korim.$_$.v1;
var listOf_0 = kotlin_kotlin.$_$.c9;
var firstOrNull = kotlin_kotlin.$_$.e8;
var get_niceStr = kotlin_com_soywiz_korlibs_korio_korio.$_$.m2;
var applyTransform = kotlin_com_soywiz_korlibs_korma_korma.$_$.x1;
var IntDeque = kotlin_com_soywiz_korlibs_kds_kds.$_$.q;
var _TimeSpan___get_microsecondsInt__impl__sej7yz = kotlin_com_soywiz_korlibs_klock_klock.$_$.s;
var roundDecimalPlaces = kotlin_com_soywiz_korlibs_korma_korma.$_$.e3;
var convertRange_0 = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.h1;
var coerceAtMost_0 = kotlin_kotlin.$_$.pe;
var TimeSpan__div_impl_l42f2r_0 = kotlin_com_soywiz_korlibs_klock_klock.$_$.n;
var toFrequency = kotlin_com_soywiz_korlibs_klock_klock.$_$.h;
var _Frequency___get_hertz__impl__9m7k6x = kotlin_com_soywiz_korlibs_klock_klock.$_$.l;
var EmptyShape_getInstance = kotlin_com_soywiz_korlibs_korim_korim.$_$.x3;
var readBitmapSlice$default = kotlin_com_soywiz_korlibs_korim_korim.$_$.h2;
var _RectangleInt___get_rect__impl__gu7bbg = kotlin_com_soywiz_korlibs_korma_korma.$_$.s4;
var readNinePatch$default = kotlin_com_soywiz_korlibs_korim_korim.$_$.f2;
var Companion_getInstance_24 = kotlin_com_soywiz_korlibs_korim_korim.$_$.r3;
var Bitmap32_init_$Create$ = kotlin_com_soywiz_korlibs_korim_korim.$_$.k2;
var Companion_getInstance_25 = kotlin_com_soywiz_korlibs_korma_korma.$_$.r5;
var setTo = kotlin_com_soywiz_korlibs_korma_korma.$_$.p2;
var roundRect_0 = kotlin_com_soywiz_korlibs_korma_korma.$_$.d1;
var StrokeInfo_init_$Create$ = kotlin_com_soywiz_korlibs_korma_korma.$_$.a4;
var isNotEmpty = kotlin_com_soywiz_korlibs_korma_korma.$_$.q;
var Mixin = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.t;
var EventDispatcher = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.u;
var Char = kotlin_kotlin.$_$.nh;
var HorizontalAlign__getOffsetX_impl_urzzxf = kotlin_com_soywiz_korlibs_korim_korim.$_$.n3;
var VerticalAlign__getOffsetY_impl_iso0y6 = kotlin_com_soywiz_korlibs_korim_korim.$_$.p3;
var readFont$default = kotlin_com_soywiz_korlibs_korim_korim.$_$.g2;
var Text2TextRendererActions = kotlin_com_soywiz_korlibs_korim_korim.$_$.q1;
var Entry_init_$Create$ = kotlin_com_soywiz_korlibs_korim_korim.$_$.t2;
var FontMetrics_init_$Create$ = kotlin_com_soywiz_korlibs_korim_korim.$_$.q2;
var TextMetrics_init_$Create$ = kotlin_com_soywiz_korlibs_korim_korim.$_$.r2;
var BitmapFont = kotlin_com_soywiz_korlibs_korim_korim.$_$.f1;
var getTextBoundsWithGlyphs$default = kotlin_com_soywiz_korlibs_korim_korim.$_$.e2;
var Font = kotlin_com_soywiz_korlibs_korim_korim.$_$.h1;
var getTextBounds = kotlin_com_soywiz_korlibs_korim_korim.$_$.i1;
var TextMetricsResult_init_$Create$ = kotlin_com_soywiz_korlibs_korim_korim.$_$.s2;
var invoke = kotlin_com_soywiz_korlibs_korim_korim.$_$.r1;
var _HorizontalAlign___get_ratio__impl__x9wlea = kotlin_com_soywiz_korlibs_korim_korim.$_$.o3;
var Companion_getInstance_26 = kotlin_com_soywiz_korlibs_korma_korma.$_$.j5;
var Transform_init_$Create$ = kotlin_com_soywiz_korlibs_korma_korma.$_$.d4;
var ColorAdd_pack = kotlin_com_soywiz_korlibs_korim_korim.$_$.y;
var _ColorAdd___init__impl__q78um5 = kotlin_com_soywiz_korlibs_korim_korim.$_$.u2;
var _RGBA___get_rf__impl__kvz75k = kotlin_com_soywiz_korlibs_korim_korim.$_$.h3;
var _RGBA___get_gf__impl__5gcu1f = kotlin_com_soywiz_korlibs_korim_korim.$_$.f3;
var _RGBA___get_bf__impl__1xz5yg = kotlin_com_soywiz_korlibs_korim_korim.$_$.e3;
var _RGBA___get_af__impl__vu36qv = kotlin_com_soywiz_korlibs_korim_korim.$_$.d3;
var _ColorAdd___get_r__impl__j9xkne = kotlin_com_soywiz_korlibs_korim_korim.$_$.y2;
var _ColorAdd___get_g__impl__itrhk1 = kotlin_com_soywiz_korlibs_korim_korim.$_$.x2;
var _ColorAdd___get_b__impl__grv87a = kotlin_com_soywiz_korlibs_korim_korim.$_$.w2;
var _ColorAdd___get_a__impl__c1r8ux = kotlin_com_soywiz_korlibs_korim_korim.$_$.v2;
var ColorTransform = kotlin_com_soywiz_korlibs_korim_korim.$_$.a1;
var rect = kotlin_com_soywiz_korlibs_korma_korma.$_$.b1;
var moveTo_0 = kotlin_com_soywiz_korlibs_korma_korma.$_$.v;
var lineTo_0 = kotlin_com_soywiz_korlibs_korma_korma.$_$.r;
var get_topLeft = kotlin_com_soywiz_korlibs_korma_korma.$_$.u2;
var circle_0 = kotlin_com_soywiz_korlibs_korma_korma.$_$.m;
var get_topRight = kotlin_com_soywiz_korlibs_korma_korma.$_$.v2;
var get_bottomRight = kotlin_com_soywiz_korlibs_korma_korma.$_$.a2;
var get_bottomLeft = kotlin_com_soywiz_korlibs_korma_korma.$_$.z1;
var line_0 = kotlin_com_soywiz_korlibs_korma_korma.$_$.t;
var get_portableSimpleName = kotlin_com_soywiz_korlibs_korio_korio.$_$.k1;
var _Angle___get_degrees__impl__qg56vw = kotlin_com_soywiz_korlibs_korma_korma.$_$.g4;
var _Angle___get_radians__impl__n00yt5 = kotlin_com_soywiz_korlibs_korma_korma.$_$.i4;
var get_absoluteValue = kotlin_com_soywiz_korlibs_korma_korma.$_$.w1;
var get_radians = kotlin_com_soywiz_korlibs_korma_korma.$_$.l2;
var _RGBA___get_hexString__impl__kocngm = kotlin_com_soywiz_korlibs_korim_korim.$_$.g3;
var _RGBA___get_rgb__impl__tijaqt = kotlin_com_soywiz_korlibs_korim_korim.$_$.i3;
var ColorAdd = kotlin_com_soywiz_korlibs_korim_korim.$_$.z;
var _ColorAdd___get_shex__impl__x5alyq = kotlin_com_soywiz_korlibs_korim_korim.$_$.z2;
var toStringDecimal = kotlin_com_soywiz_korlibs_korio_korio.$_$.p2;
var HitTestDirection_ANY_getInstance = kotlin_com_soywiz_korlibs_korma_korma.$_$.h3;
var contains = kotlin_com_soywiz_korlibs_korma_korma.$_$.c2;
var Companion_getInstance_27 = kotlin_com_soywiz_korlibs_korma_korma.$_$.k5;
var XY = kotlin_com_soywiz_korlibs_korma_korma.$_$.v1;
var HitTestable = kotlin_com_soywiz_korlibs_korma_korma.$_$.c;
var WithHitShape2d = kotlin_com_soywiz_korlibs_korma_korma.$_$.d;
var TimeSpan__times_impl_86ofia_0 = kotlin_com_soywiz_korlibs_klock_klock.$_$.a1;
var NotImplementedError = kotlin_kotlin.$_$.zh;
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.h2;
var getStringHashCode = kotlin_kotlin.$_$.wc;
var get_RegisteredImageFormats = kotlin_com_soywiz_korlibs_korim_korim.$_$.k1;
var HashMap_init_$Create$ = kotlin_kotlin.$_$.p1;
var Resources_init_$Create$ = kotlin_com_soywiz_korlibs_korio_korio.$_$.b4;
var ReshapeEvent_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.n5;
var EventResult_init_$Create$ = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.k5;
var replace$default = kotlin_kotlin.$_$.z;
var Key_F7_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.m3;
var Key_F12_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.l3;
var Type_UP_getInstance_0 = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.z3;
var PreventDefaultException = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.e1;
var setTo_0 = kotlin_com_soywiz_korlibs_korma_korma.$_$.o2;
var _SizeInt___get_width__impl__swntg6 = kotlin_com_soywiz_korlibs_korma_korma.$_$.d5;
var _SizeInt___get_height__impl__d3sy61 = kotlin_com_soywiz_korlibs_korma_korma.$_$.c5;
var DialogInterfaceProvider = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.l1;
var toIntRound = kotlin_com_soywiz_korlibs_kmem_kmem.$_$.d3;
var SizeInt = kotlin_com_soywiz_korlibs_korma_korma.$_$.s1;
var VarType_Mat4_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.e2;
var toMatrix3D$default = kotlin_com_soywiz_korlibs_korma_korma.$_$.x3;
var VarType_Float2_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.b2;
var get_lastIndex_1 = kotlin_kotlin.$_$.u8;
var Companion_getInstance_28 = kotlin_com_soywiz_korlibs_korma_korma.$_$.n5;
var expand = kotlin_com_soywiz_korlibs_korma_korma.$_$.i2;
var Disposable = kotlin_com_soywiz_korlibs_korio_korio.$_$.x;
var PropertyThis = kotlin_com_soywiz_korlibs_kds_kds.$_$.e;
var getBounds = kotlin_com_soywiz_korlibs_korim_korim.$_$.x1;
var PolylineShape = kotlin_com_soywiz_korlibs_korim_korim.$_$.u1;
var FillShape = kotlin_com_soywiz_korlibs_korim_korim.$_$.t1;
var TextShape = kotlin_com_soywiz_korlibs_korim_korim.$_$.w1;
var CompoundShape = kotlin_com_soywiz_korlibs_korim_korim.$_$.s1;
var toCurvesList = kotlin_com_soywiz_korlibs_korma_korma.$_$.f1;
var StrokePointsMode_SCALABLE_POS_NORMAL_WIDTH_getInstance = kotlin_com_soywiz_korlibs_korma_korma.$_$.g3;
var toStrokePointsList$default = kotlin_com_soywiz_korlibs_korma_korma.$_$.r3;
var DrawType_TRIANGLE_STRIP_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.b3;
var getPoints2$default = kotlin_com_soywiz_korlibs_korma_korma.$_$.s3;
var getPoints2List = kotlin_com_soywiz_korlibs_korma_korma.$_$.e;
var DrawType_TRIANGLE_FAN_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.a3;
var expand_0 = kotlin_com_soywiz_korlibs_korma_korma.$_$.h2;
var ColorMaskState_init_$Create$_0 = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.w4;
var CompareMode_EQUAL_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.s2;
var CompareMode_NOT_EQUAL_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.t2;
var CompareMode_ALWAYS_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.r2;
var StencilOp_INVERT_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.e3;
var StencilOp_INCREMENT_WRAP_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.d3;
var CullFace_FRONT_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.w2;
var StencilOp_DECREMENT_WRAP_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.c3;
var CullFace_BACK_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.u2;
var CullFace_BOTH_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.v2;
var Winding_NON_ZERO_getInstance = kotlin_com_soywiz_korlibs_korma_korma.$_$.o3;
var LineScaleMode_NONE_getInstance = kotlin_com_soywiz_korlibs_korma_korma.$_$.l3;
var LineJoin_MITER_getInstance = kotlin_com_soywiz_korlibs_korma_korma.$_$.k3;
var ColorMaskState = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.d;
var PointPool_init_$Create$ = kotlin_com_soywiz_korlibs_korma_korma.$_$.f4;
var DrawType_LINE_STRIP_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.y2;
var Bitmap = kotlin_com_soywiz_korlibs_korim_korim.$_$.d;
var floatArrayListOf = kotlin_com_soywiz_korlibs_kds_kds.$_$.d1;
var writeFloat$default = kotlin_com_soywiz_korlibs_korim_korim.$_$.d2;
var disableScissor = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.l;
var _VertexArrayObject___init__impl__y6yvd1 = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.x5;
var TextureUnit = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.e;
var setStencilState = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.q;
var setColorMaskState = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.o;
var setBlendingState = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.n;
var disableCullFace = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.k;
var enableCullFace = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.m;
var setScissorState = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.p;
var get_PI = kotlin_kotlin.$_$.be;
var VarType_Float3_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.c2;
var Precision_MEDIUM_getInstance = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.v1;
var Companion_getInstance_29 = kotlin_com_soywiz_korlibs_korgw_korgw.$_$.z5;
var Bitmap32_init_$Create$_0 = kotlin_com_soywiz_korlibs_korim_korim.$_$.m2;
var _RgbaPremultipliedArray___init__impl__lx83hy = kotlin_com_soywiz_korlibs_korim_korim.$_$.m3;
var Companion_getInstance_30 = kotlin_com_soywiz_korlibs_korma_korma.$_$.v5;
var GradientPaint = kotlin_com_soywiz_korlibs_korim_korim.$_$.n1;
var BitmapPaint = kotlin_com_soywiz_korlibs_korim_korim.$_$.m1;
var toVector3D$default = kotlin_com_soywiz_korlibs_korim_korim.$_$.c2;
var NonePaint = kotlin_com_soywiz_korlibs_korim_korim.$_$.o1;
//endregion
//region block: pre-declaration
Korge$invoke$slambda$slambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
Korge$invoke$slambda$slambda$slambda.prototype.constructor = Korge$invoke$slambda$slambda$slambda;
Korge$invoke$4$3.prototype = Object.create(Module.prototype);
Korge$invoke$4$3.prototype.constructor = Korge$invoke$4$3;
Korge$invoke$slambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
Korge$invoke$slambda$slambda.prototype.constructor = Korge$invoke$slambda$slambda;
Korge$invoke$slambda.prototype = Object.create(CoroutineImpl.prototype);
Korge$invoke$slambda.prototype.constructor = Korge$invoke$slambda;
Korge$prepareViewsBase$slambda.prototype = Object.create(CoroutineImpl.prototype);
Korge$prepareViewsBase$slambda.prototype.constructor = Korge$prepareViewsBase$slambda;
Korge$prepareViewsBase$slambda_1.prototype = Object.create(CoroutineImpl.prototype);
Korge$prepareViewsBase$slambda_1.prototype.constructor = Korge$prepareViewsBase$slambda_1;
Korge$prepareViewsBase$lambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
Korge$prepareViewsBase$lambda$slambda.prototype.constructor = Korge$prepareViewsBase$lambda$slambda;
$invokeCOROUTINE$1.prototype = Object.create(CoroutineImpl.prototype);
$invokeCOROUTINE$1.prototype.constructor = $invokeCOROUTINE$1;
$prepareViewsCOROUTINE$3.prototype = Object.create(CoroutineImpl.prototype);
$prepareViewsCOROUTINE$3.prototype.constructor = $prepareViewsCOROUTINE$3;
ReloadEvent.prototype = Object.create(Event.prototype);
ReloadEvent.prototype.constructor = ReloadEvent;
function close() {
this.n2u().mg8(this);
}
function cancel_1(e) {
this.n2u().mg8(this);
}
function get_type() {
return Companion_getInstance_31();
}
function get_type_0() {
return Companion_getInstance_34();
}
function get_type_1() {
return Companion_getInstance_35();
}
function get_type_2() {
return Companion_getInstance_36();
}
function get_type_3() {
return Companion_getInstance_37();
}
function get_type_4() {
return Companion_getInstance_38();
}
function get_type_5() {
return Companion_getInstance_39();
}
function get_type_6() {
return Companion_getInstance_40();
}
UiCollapsibleSection.prototype = Object.create(UiContainer.prototype);
UiCollapsibleSection.prototype.constructor = UiCollapsibleSection;
UiEditableValue.prototype = Object.create(UiContainer.prototype);
UiEditableValue.prototype.constructor = UiEditableValue;
UiNumberEditableValue$hideEditor$slambda.prototype = Object.create(CoroutineImpl.prototype);
UiNumberEditableValue$hideEditor$slambda.prototype.constructor = UiNumberEditableValue$hideEditor$slambda;
UiNumberEditableValue.prototype = Object.create(UiEditableValue.prototype);
UiNumberEditableValue.prototype.constructor = UiNumberEditableValue;
UiRowEditableValue.prototype = Object.create(UiContainer.prototype);
UiRowEditableValue.prototype.constructor = UiRowEditableValue;
KeysEvents$down$slambda.prototype = Object.create(CoroutineImpl.prototype);
KeysEvents$down$slambda.prototype.constructor = KeysEvents$down$slambda;
KeysEvents$up$slambda.prototype = Object.create(CoroutineImpl.prototype);
KeysEvents$up$slambda.prototype.constructor = KeysEvents$up$slambda;
KeysEvents$typed$slambda.prototype = Object.create(CoroutineImpl.prototype);
KeysEvents$typed$slambda.prototype.constructor = KeysEvents$typed$slambda;
KeysEvents$onKeyEvent$slambda.prototype = Object.create(CoroutineImpl.prototype);
KeysEvents$onKeyEvent$slambda.prototype.constructor = KeysEvents$onKeyEvent$slambda;
KeysEvents$onKeyEvent$slambda_1.prototype = Object.create(CoroutineImpl.prototype);
KeysEvents$onKeyEvent$slambda_1.prototype.constructor = KeysEvents$onKeyEvent$slambda_1;
KeysEvents$onKeyEvent$slambda_3.prototype = Object.create(CoroutineImpl.prototype);
KeysEvents$onKeyEvent$slambda_3.prototype.constructor = KeysEvents$onKeyEvent$slambda_3;
MouseDragState.prototype = Object.create(Enum.prototype);
MouseDragState.prototype.constructor = MouseDragState;
onMouseDragInternal$slambda.prototype = Object.create(CoroutineImpl.prototype);
onMouseDragInternal$slambda.prototype.constructor = onMouseDragInternal$slambda;
onMouseDragInternal$lambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
onMouseDragInternal$lambda$slambda.prototype.constructor = onMouseDragInternal$lambda$slambda;
onMouseDragInternal$slambda_1.prototype = Object.create(CoroutineImpl.prototype);
onMouseDragInternal$slambda_1.prototype.constructor = onMouseDragInternal$slambda_1;
onMouseDragInternal$lambda$slambda_1.prototype = Object.create(CoroutineImpl.prototype);
onMouseDragInternal$lambda$slambda_1.prototype.constructor = onMouseDragInternal$lambda$slambda_1;
onMouseDragInternal$slambda_3.prototype = Object.create(CoroutineImpl.prototype);
onMouseDragInternal$slambda_3.prototype.constructor = onMouseDragInternal$slambda_3;
onMouseDragInternal$lambda$slambda_3.prototype = Object.create(CoroutineImpl.prototype);
onMouseDragInternal$lambda$slambda_3.prototype.constructor = onMouseDragInternal$lambda$slambda_3;
MouseEvents$_mouseEvent$lambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
MouseEvents$_mouseEvent$lambda$slambda.prototype.constructor = MouseEvents$_mouseEvent$lambda$slambda;
MouseEvents$onOver$lambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
MouseEvents$onOver$lambda$slambda.prototype.constructor = MouseEvents$onOver$lambda$slambda;
MouseEvents$onOut$lambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
MouseEvents$onOut$lambda$slambda.prototype.constructor = MouseEvents$onOut$lambda$slambda;
MouseEvents$onDown$lambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
MouseEvents$onDown$lambda$slambda.prototype.constructor = MouseEvents$onDown$lambda$slambda;
MouseEvents$onUpAnywhere$lambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
MouseEvents$onUpAnywhere$lambda$slambda.prototype.constructor = MouseEvents$onUpAnywhere$lambda$slambda;
MouseEvents$_mouseEventCloseable$lambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
MouseEvents$_mouseEventCloseable$lambda$slambda.prototype.constructor = MouseEvents$_mouseEventCloseable$lambda$slambda;
MouseEvents$onDownCloseable$lambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
MouseEvents$onDownCloseable$lambda$slambda.prototype.constructor = MouseEvents$onDownCloseable$lambda$slambda;
MouseEvents$onUpAnywhereCloseable$lambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
MouseEvents$onUpAnywhereCloseable$lambda$slambda.prototype.constructor = MouseEvents$onUpAnywhereCloseable$lambda$slambda;
MouseEvents$onMoveAnywhereCloseable$lambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
MouseEvents$onMoveAnywhereCloseable$lambda$slambda.prototype.constructor = MouseEvents$onMoveAnywhereCloseable$lambda$slambda;
onClick$lambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
onClick$lambda$slambda.prototype.constructor = onClick$lambda$slambda;
doMouseEvent$lambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
doMouseEvent$lambda$slambda.prototype.constructor = doMouseEvent$lambda$slambda;
$configureLoggerFromPropertiesCOROUTINE$4.prototype = Object.create(CoroutineImpl.prototype);
$configureLoggerFromPropertiesCOROUTINE$4.prototype.constructor = $configureLoggerFromPropertiesCOROUTINE$4;
AgFastSet.prototype = Object.create(AbstractMutableSet.prototype);
AgFastSet.prototype.constructor = AgFastSet;
AddType.prototype = Object.create(Enum.prototype);
AddType.prototype.constructor = AddType;
function get_actualVirtualWidth() {
return toIntRound(this.pha().x71_1);
}
function get_actualVirtualHeight() {
return toIntRound(this.pha().y71_1);
}
function get_actualVirtualRight() {
return this.pha().z73();
}
function get_windowToGlobalScaleAvg() {
return this.vha().f75();
}
function get_globalToWindowScaleAvg() {
return this.tha().f75();
}
function windowToGlobalCoords(x, y, out) {
return this.ngw().g77(x, y, out);
}
function windowToGlobalCoords$default(x, y, out, $mask0, $handler) {
if (!(($mask0 & 4) === 0))
out = Companion_getInstance_8().zp();
return $handler == null ? this.ofz(x, y, out) : $handler(x, y, out);
}
ResourcesRoot$init$slambda.prototype = Object.create(CoroutineImpl.prototype);
ResourcesRoot$init$slambda.prototype.constructor = ResourcesRoot$init$slambda;
$initCOROUTINE$5.prototype = Object.create(CoroutineImpl.prototype);
$initCOROUTINE$5.prototype.constructor = $initCOROUTINE$5;
$debugBmpFontCOROUTINE$8.prototype = Object.create(CoroutineImpl.prototype);
$debugBmpFontCOROUTINE$8.prototype.constructor = $debugBmpFontCOROUTINE$8;
$initCOROUTINE$9.prototype = Object.create(CoroutineImpl.prototype);
$initCOROUTINE$9.prototype.constructor = $initCOROUTINE$9;
$sceneAfterDestroyInternalCOROUTINE$10.prototype = Object.create(CoroutineImpl.prototype);
$sceneAfterDestroyInternalCOROUTINE$10.prototype.constructor = $sceneAfterDestroyInternalCOROUTINE$10;
EmptyScene.prototype = Object.create(Scene.prototype);
EmptyScene.prototype.constructor = EmptyScene;
SceneContainer$lambda$slambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
SceneContainer$lambda$slambda$slambda.prototype.constructor = SceneContainer$lambda$slambda$slambda;
SceneContainer$lambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
SceneContainer$lambda$slambda.prototype.constructor = SceneContainer$lambda$slambda;
SceneContainer$_changeTo$slambda.prototype = Object.create(CoroutineImpl.prototype);
SceneContainer$_changeTo$slambda.prototype.constructor = SceneContainer$_changeTo$slambda;
SceneContainer$_changeTo$slambda_1.prototype = Object.create(CoroutineImpl.prototype);
SceneContainer$_changeTo$slambda_1.prototype.constructor = SceneContainer$_changeTo$slambda_1;
SceneContainer$_changeTo$slambda_3.prototype = Object.create(CoroutineImpl.prototype);
SceneContainer$_changeTo$slambda_3.prototype.constructor = SceneContainer$_changeTo$slambda_3;
SceneContainer$_changeTo$slambda_5.prototype = Object.create(CoroutineImpl.prototype);
SceneContainer$_changeTo$slambda_5.prototype.constructor = SceneContainer$_changeTo$slambda_5;
SceneContainer$_changeTo$slambda_7.prototype = Object.create(CoroutineImpl.prototype);
SceneContainer$_changeTo$slambda_7.prototype.constructor = SceneContainer$_changeTo$slambda_7;
SceneContainer$_changeTo$slambda_9.prototype = Object.create(CoroutineImpl.prototype);
SceneContainer$_changeTo$slambda_9.prototype.constructor = SceneContainer$_changeTo$slambda_9;
$_changeToCOROUTINE$14.prototype = Object.create(CoroutineImpl.prototype);
$_changeToCOROUTINE$14.prototype.constructor = $_changeToCOROUTINE$14;
View.prototype = Object.create(BaseView.prototype);
View.prototype.constructor = View;
Container.prototype = Object.create(View.prototype);
Container.prototype.constructor = Container;
FixedSizeContainer.prototype = Object.create(Container.prototype);
FixedSizeContainer.prototype.constructor = FixedSizeContainer;
UIView.prototype = Object.create(FixedSizeContainer.prototype);
UIView.prototype.constructor = UIView;
SceneContainer.prototype = Object.create(UIView.prototype);
SceneContainer.prototype.constructor = SceneContainer;
function start(prev, next) {
return Unit_getInstance();
}
function end(prev, next) {
return Unit_getInstance();
}
function render(ctx, prev, next, ratio) {
return Unit_getInstance();
}
TransitionView.prototype = Object.create(Container.prototype);
TransitionView.prototype.constructor = TransitionView;
tween$slambda.prototype = Object.create(CoroutineImpl.prototype);
tween$slambda.prototype.constructor = tween$slambda;
$tweenCOROUTINE$16.prototype = Object.create(CoroutineImpl.prototype);
$tweenCOROUTINE$16.prototype.constructor = $tweenCOROUTINE$16;
UIButton$slambda.prototype = Object.create(CoroutineImpl.prototype);
UIButton$slambda.prototype.constructor = UIButton$slambda;
UIButton$lambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
UIButton$lambda$slambda.prototype.constructor = UIButton$lambda$slambda;
UIButton$slambda_1.prototype = Object.create(CoroutineImpl.prototype);
UIButton$slambda_1.prototype.constructor = UIButton$slambda_1;
UIButton$lambda$slambda_1.prototype = Object.create(CoroutineImpl.prototype);
UIButton$lambda$slambda_1.prototype.constructor = UIButton$lambda$slambda_1;
UIButton.prototype = Object.create(UIView.prototype);
UIButton.prototype.constructor = UIButton;
UIDirection.prototype = Object.create(Enum.prototype);
UIDirection.prototype.constructor = UIDirection;
UIScrollable.prototype = Object.create(UIView.prototype);
UIScrollable.prototype.constructor = UIScrollable;
UiSkinKind.prototype = Object.create(Enum.prototype);
UiSkinKind.prototype.constructor = UiSkinKind;
UIText$slambda.prototype = Object.create(CoroutineImpl.prototype);
UIText$slambda.prototype.constructor = UIText$slambda;
UIText$lambda$slambda.prototype = Object.create(CoroutineImpl.prototype);
UIText$lambda$slambda.prototype.constructor = UIText$lambda$slambda;
UIText$slambda_1.prototype = Object.create(CoroutineImpl.prototype);
UIText$slambda_1.prototype.constructor = UIText$slambda_1;
UIText$lambda$slambda_1.prototype = Object.create(CoroutineImpl.prototype);
UIText$lambda$slambda_1.prototype.constructor = UIText$lambda$slambda_1;
UIText$slambda_3.prototype = Object.create(CoroutineImpl.prototype);
UIText$slambda_3.prototype.constructor = UIText$slambda_3;
UIText$lambda$slambda_3.prototype = Object.create(CoroutineImpl.prototype);
UIText$lambda$slambda_3.prototype.constructor = UIText$lambda$slambda_3;
UIText$slambda_5.prototype = Object.create(CoroutineImpl.prototype);
UIText$slambda_5.prototype.constructor = UIText$slambda_5;
UIText$lambda$slambda_5.prototype = Object.create(CoroutineImpl.prototype);
UIText$lambda$slambda_5.prototype.constructor = UIText$lambda$slambda_5;
UIText.prototype = Object.create(UIView.prototype);
UIText.prototype.constructor = UIText;
RectBase.prototype = Object.create(View.prototype);
RectBase.prototype.constructor = RectBase;
BaseImage.prototype = Object.create(RectBase.prototype);
BaseImage.prototype.constructor = BaseImage;
BaseGraphics.prototype = Object.create(BaseImage.prototype);
BaseGraphics.prototype.constructor = BaseGraphics;
ClipContainer.prototype = Object.create(FixedSizeContainer.prototype);
ClipContainer.prototype.constructor = ClipContainer;
CpuGraphics.prototype = Object.create(BaseGraphics.prototype);
CpuGraphics.prototype.constructor = CpuGraphics;
CustomContextRenderizableView.prototype = Object.create(RectBase.prototype);
CustomContextRenderizableView.prototype.constructor = CustomContextRenderizableView;
DummyView.prototype = Object.create(View.prototype);
DummyView.prototype.constructor = DummyView;
SContainer.prototype = Object.create(FixedSizeContainer.prototype);
SContainer.prototype.constructor = SContainer;
GraphicsRenderer.prototype = Object.create(Enum.prototype);
GraphicsRenderer.prototype.constructor = GraphicsRenderer;
Graphics.prototype = Object.create(Container.prototype);
Graphics.prototype.constructor = Graphics;
$forceLoadSourceFileCOROUTINE$17.prototype = Object.create(CoroutineImpl.prototype);
$forceLoadSourceFileCOROUTINE$17.prototype.constructor = $forceLoadSourceFileCOROUTINE$17;
function forceLoadSourceFile$default(views, currentVfs, sourceFile, $cont, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
currentVfs = views.vfw_1;
if (!(($mask0 & 4) === 0))
sourceFile = null;
return $handler == null ? this.bjp(views, currentVfs, sourceFile, $cont) : $handler(views, currentVfs, sourceFile, $cont);
}
Image.prototype = Object.create(BaseImage.prototype);
Image.prototype.constructor = Image;
$forceLoadSourceFileCOROUTINE$18.prototype = Object.create(CoroutineImpl.prototype);
$forceLoadSourceFileCOROUTINE$18.prototype.constructor = $forceLoadSourceFileCOROUTINE$18;
NinePatchEx.prototype = Object.create(View.prototype);
NinePatchEx.prototype.constructor = NinePatchEx;
RenderableView.prototype = Object.create(CustomContextRenderizableView.prototype);
RenderableView.prototype.constructor = RenderableView;
ShapeView.prototype = Object.create(Container.prototype);
ShapeView.prototype.constructor = ShapeView;
RoundRect.prototype = Object.create(ShapeView.prototype);
RoundRect.prototype.constructor = RoundRect;
SolidRect.prototype = Object.create(RectBase.prototype);
SolidRect.prototype.constructor = SolidRect;
Stage.prototype = Object.create(FixedSizeContainer.prototype);
Stage.prototype.constructor = Stage;
Text$_renderInternal$slambda.prototype = Object.create(CoroutineImpl.prototype);
Text$_renderInternal$slambda.prototype.constructor = Text$_renderInternal$slambda;
$forceLoadFontSourceCOROUTINE$19.prototype = Object.create(CoroutineImpl.prototype);
$forceLoadFontSourceCOROUTINE$19.prototype.constructor = $forceLoadFontSourceCOROUTINE$19;
Text.prototype = Object.create(Container.prototype);
Text.prototype.constructor = Text;
function render_0(view, ctx) {
return view.qi1(ctx);
}
function beforeRender(view, ctx) {
return Unit_getInstance();
}
function afterRender(view, ctx) {
return Unit_getInstance();
}
ViewFileRef$Mixin$lazyLoadRenderInternalActually$slambda.prototype = Object.create(CoroutineImpl.prototype);
ViewFileRef$Mixin$lazyLoadRenderInternalActually$slambda.prototype.constructor = ViewFileRef$Mixin$lazyLoadRenderInternalActually$slambda;
Views$close$slambda.prototype = Object.create(CoroutineImpl.prototype);
Views$close$slambda.prototype.constructor = Views$close$slambda;
$initCOROUTINE$20.prototype = Object.create(CoroutineImpl.prototype);
$initCOROUTINE$20.prototype.constructor = $initCOROUTINE$20;
$closeSuspendCOROUTINE$21.prototype = Object.create(CoroutineImpl.prototype);
$closeSuspendCOROUTINE$21.prototype.constructor = $closeSuspendCOROUTINE$21;
DebugVertexView.prototype = Object.create(View.prototype);
DebugVertexView.prototype.constructor = DebugVertexView;
function get_allFilters() {
return listOf_0(this);
}
function get_border() {
return 0;
}
function get_recommendedFilterScale() {
return 1.0;
}
function computeBorder(out, texWidth, texHeight) {
out.w73(this.pk5());
}
function buildDebugComponent(views, container) {
}
Companion_27.prototype = Object.create(IdentityFilter.prototype);
Companion_27.prototype.constructor = Companion_27;
GpuShapeView.prototype = Object.create(View.prototype);
GpuShapeView.prototype.constructor = GpuShapeView;
KorgeReloadInternal$1.prototype = Object.create(KorgeReloadInternalImpl.prototype);
KorgeReloadInternal$1.prototype.constructor = KorgeReloadInternal$1;
//endregion
function Korge$invoke$slambda$slambda$slambda($entry, $views, $blocking, $gameWindow, resultContinuation) {
this.wfv_1 = $entry;
this.xfv_1 = $views;
this.yfv_1 = $blocking;
this.zfv_1 = $gameWindow;
CoroutineImpl.call(this, resultContinuation);
}
Korge$invoke$slambda$slambda$slambda.prototype.h2n = function ($this$coroutineScope, $cont) {
var tmp = this.i2n($this$coroutineScope, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
Korge$invoke$slambda$slambda$slambda.prototype.w7 = function (p1, $cont) {
return this.h2n((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $cont);
};
Korge$invoke$slambda$slambda$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 4;
this.o7_1 = 1;
suspendResult = this.wfv_1(this.xfv_1.lfx_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
if (this.yfv_1) {
this.o7_1 = 2;
suspendResult = this.zfv_1.kci(this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
this.o7_1 = 3;
continue $sm;
}
break;
case 2:
this.o7_1 = 3;
continue $sm;
case 3:
return Unit_getInstance();
case 4:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 4) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
Korge$invoke$slambda$slambda$slambda.prototype.i2n = function ($this$coroutineScope, completion) {
var i = new Korge$invoke$slambda$slambda$slambda(this.wfv_1, this.xfv_1, this.yfv_1, this.zfv_1, completion);
i.afw_1 = $this$coroutineScope;
return i;
};
Korge$invoke$slambda$slambda$slambda.$metadata$ = classMeta('Korge$invoke$slambda$slambda$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
function Korge$invoke$slambda$slambda$slambda_0($entry, $views, $blocking, $gameWindow, resultContinuation) {
var i = new Korge$invoke$slambda$slambda$slambda($entry, $views, $blocking, $gameWindow, resultContinuation);
var l = function ($this$coroutineScope, $cont) {
return i.h2n($this$coroutineScope, $cont);
};
l.$arity = 1;
return l;
}
function Korge$invoke$4$3($title, $fullscreen, $width, $height, $virtualWidth, $virtualHeight) {
Module.call(this);
this.xfy_1 = $title;
this.yfy_1 = $fullscreen;
this.zfy_1 = Companion_getInstance().y7d($width, $height);
this.afz_1 = Companion_getInstance().y7d($virtualWidth, $virtualHeight);
}
Korge$invoke$4$3.$metadata$ = classMeta(undefined, undefined, undefined, undefined, undefined, Module.prototype);
function Korge$invoke$slambda$slambda($entry, $views, $blocking, $gameWindow, resultContinuation) {
this.jfz_1 = $entry;
this.kfz_1 = $views;
this.lfz_1 = $blocking;
this.mfz_1 = $gameWindow;
CoroutineImpl.call(this, resultContinuation);
}
Korge$invoke$slambda$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
Korge$invoke$slambda$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
Korge$invoke$slambda$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = coroutineScope(Korge$invoke$slambda$slambda$slambda_0(this.jfz_1, this.kfz_1, this.lfz_1, this.mfz_1, null), this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
Korge$invoke$slambda$slambda.prototype.k53 = function (completion) {
var i = new Korge$invoke$slambda$slambda(this.jfz_1, this.kfz_1, this.lfz_1, this.mfz_1, completion);
return i;
};
Korge$invoke$slambda$slambda.$metadata$ = classMeta('Korge$invoke$slambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function Korge$invoke$slambda$slambda_0($entry, $views, $blocking, $gameWindow, resultContinuation) {
var i = new Korge$invoke$slambda$slambda($entry, $views, $blocking, $gameWindow, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function ModuleArgs(args) {
this.nfz_1 = args;
}
ModuleArgs.prototype.toString = function () {
return 'ModuleArgs(args=' + toString(this.nfz_1) + ')';
};
ModuleArgs.prototype.hashCode = function () {
return hashCode(this.nfz_1);
};
ModuleArgs.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof ModuleArgs))
return false;
var tmp0_other_with_cast = other instanceof ModuleArgs ? other : THROW_CCE();
if (!equals(this.nfz_1, tmp0_other_with_cast.nfz_1))
return false;
return true;
};
ModuleArgs.$metadata$ = classMeta('ModuleArgs');
function prepareViewsBase$getRealXY(tempXY, $views, x, y, scaleCoords, out) {
return $views.ofz(x, y, out);
}
function prepareViewsBase$getRealXY$default(tempXY, $views, x, y, scaleCoords, out, $mask0, $handler) {
if (!(($mask0 & 32) === 0))
out = tempXY;
return prepareViewsBase$getRealXY(tempXY, $views, x, y, scaleCoords, out);
}
function prepareViewsBase$mouseDown(input, $views, downPos, downTime, type, x, y, button) {
input.lg0(button, true);
input.mg0(x, y, false);
input.mg0(x, y, true);
$views.ng0();
downPos.u7a(input.og0());
downTime._v = new DateTime(Companion_getInstance_0().d1h());
input.zfz_1 = true;
}
function prepareViewsBase$mouseUp(input, $views, upPos, type, x, y, button) {
input.lg0(button, false);
input.mg0(x, y, false);
$views.ng0();
upPos.u7a($views.efw_1.og0());
}
function prepareViewsBase$mouseMove($views, moveMouseOutsideInNextFrame, moveTime, type, x, y, inside) {
$views.efw_1.mg0(x, y, false);
$views.efw_1.zfz_1 = inside;
if (!inside) {
moveMouseOutsideInNextFrame._v = true;
}
$views.ng0();
moveTime._v = new DateTime(Companion_getInstance_0().d1h());
}
function prepareViewsBase$mouseDrag($views, moveTime, type, x, y) {
$views.efw_1.mg0(x, y, false);
$views.ng0();
moveTime._v = new DateTime(Companion_getInstance_0().d1h());
}
function prepareViewsBase$dispatchSimulatedTouchEvent(mouseTouchEvent, $views, x, y, button, type, status) {
mouseTouchEvent.ic8_1 = 0;
mouseTouchEvent.lc8_1 = true;
mouseTouchEvent.jc8_1 = Companion_getInstance_0().d1h();
mouseTouchEvent.kc8_1 = false;
mouseTouchEvent.xc8(type);
mouseTouchEvent.lc9(button.jcc_1, x, y, status, 0.0, Kind_MOUSE_getInstance(), button, 16, null);
mouseTouchEvent.yc8();
var tmp$ret$0;
// Inline function 'com.soywiz.korev.dispatch' call
$views.oc3(getKClass(TouchEvent), mouseTouchEvent);
tmp$ret$0 = Unit_getInstance();
}
function prepareViewsBase$gamepadUpdated(input, e) {
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = e.ec7_1;
var n = 0;
while (n < tmp0_fastForEach.length) {
// Inline function 'com.soywiz.korge.Korge.prepareViewsBase.gamepadUpdated.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach[tmp0];
input.jg0_1[tmp1__anonymous__uwfjfc.fc7_1].ecc(tmp1__anonymous__uwfjfc);
}
input.pg0();
}
function prepareViewsBase$renderBlock($views, $fixedSizeStep, moveMouseOutsideInNextFrame, event) {
try {
$views.rg0($fixedSizeStep, $views.qg0(), event.aca_1, event.bca_1);
$views.efw_1.yfz_1 = false;
if (moveMouseOutsideInNextFrame._v) {
moveMouseOutsideInNextFrame._v = false;
$views.efw_1.yfz_1 = true;
$views.efw_1.zfz_1 = false;
$views.ng0();
}
} catch ($p) {
if ($p instanceof Error) {
Console_getInstance().r50(['views.gameWindow.onRenderEvent:']);
printStackTrace($p);
if ($views.pfw_1)
throw $p;
} else {
throw $p;
}
}
}
function Korge$invoke$slambda($realGameWindow, $width, $height, $title, $icon, $fullscreen, $bgcolor, $iconPath, $imageFormats, $quality, $injector, $debugAg, $timeProvider, $gameId, $settingsFolder, $batchMaxQuads, $args, $virtualWidth, $virtualHeight, $debug, $debugFontExtraScale, $debugFontColor, $scaleAnchor, $scaleMode, $clipBorders, $targetFps, $forceRenderEveryFrame, $blocking, $entry, resultContinuation) {
this.ag1_1 = $realGameWindow;
this.bg1_1 = $width;
this.cg1_1 = $height;
this.dg1_1 = $title;
this.eg1_1 = $icon;
this.fg1_1 = $fullscreen;
this.gg1_1 = $bgcolor;
this.hg1_1 = $iconPath;
this.ig1_1 = $imageFormats;
this.jg1_1 = $quality;
this.kg1_1 = $injector;
this.lg1_1 = $debugAg;
this.mg1_1 = $timeProvider;
this.ng1_1 = $gameId;
this.og1_1 = $settingsFolder;
this.pg1_1 = $batchMaxQuads;
this.qg1_1 = $args;
this.rg1_1 = $virtualWidth;
this.sg1_1 = $virtualHeight;
this.tg1_1 = $debug;
this.ug1_1 = $debugFontExtraScale;
this.vg1_1 = $debugFontColor;
this.wg1_1 = $scaleAnchor;
this.xg1_1 = $scaleMode;
this.yg1_1 = $clipBorders;
this.zg1_1 = $targetFps;
this.ag2_1 = $forceRenderEveryFrame;
this.bg2_1 = $blocking;
this.cg2_1 = $entry;
CoroutineImpl.call(this, resultContinuation);
}
Korge$invoke$slambda.prototype.ug2 = function ($this$loop, $cont) {
var tmp = this.vg2($this$loop, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
Korge$invoke$slambda.prototype.w7 = function (p1, $cont) {
return this.ug2(p1 instanceof GameWindow ? p1 : THROW_CCE(), $cont);
};
Korge$invoke$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 23;
this.eg2_1 = this.dg2_1;
if (OS_getInstance().f4z()) {
println('Korui[0]');
}
l$ret$5: do {
var start = PerformanceCounter_getInstance().u1h();
var tmp$ret$2;
l$ret$3: do {
var tmp_0 = this;
var tmp$ret$0;
l$ret$1: do {
try {
var tmp0_elvis_lhs = this.gg1_1;
var tmp_1;
var tmp_2 = tmp0_elvis_lhs;
if ((tmp_2 == null ? null : new RGBA(tmp_2)) == null) {
tmp_1 = Colors_getInstance().t7z_1;
} else {
tmp_1 = tmp0_elvis_lhs;
}
configure(this.ag1_1, this.bg1_1, this.cg1_1, this.dg1_1, this.eg1_1, this.fg1_1, tmp_1);
tmp$ret$0 = Unit_getInstance();
break l$ret$1;
} catch ($p) {
var end = PerformanceCounter_getInstance().u1h();
var tmp0__get_microseconds__mq1imi = end - start;
this.eg2_1.pch('configureGameWindow', Companion_getInstance_1().v1h(tmp0__get_microseconds__mq1imi));
throw $p;
}
}
while (false);
var end_0 = PerformanceCounter_getInstance().u1h();
var tmp0__get_microseconds__mq1imi_0 = end_0 - start;
this.eg2_1.pch('configureGameWindow', Companion_getInstance_1().v1h(tmp0__get_microseconds__mq1imi_0));
tmp_0.fg2_1 = Unit_getInstance();
break l$ret$5;
}
while (false);
var end_1 = PerformanceCounter_getInstance().u1h();
var tmp0__get_microseconds__mq1imi_1 = end_1 - start;
this.eg2_1.pch('configureGameWindow', Companion_getInstance_1().v1h(tmp0__get_microseconds__mq1imi_1));
}
while (false);
this.o7_1 = 1;
continue $sm;
case 1:
this.hg2_1 = PerformanceCounter_getInstance().u1h();
this.o7_1 = 2;
continue $sm;
case 2:
this.o7_1 = 3;
continue $sm;
case 3:
this.p7_1 = 8;
this.p7_1 = 6;
if (!(this.hg1_1 == null)) {
this.o7_1 = 4;
suspendResult = readBitmap(get_resourcesVfs().c19(ensureNotNull(this.hg1_1)), this.ig1_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
this.o7_1 = 5;
continue $sm;
}
break;
case 4:
this.jg2_1 = suspendResult;
this.dg2_1.rch(this.jg2_1);
this.o7_1 = 5;
continue $sm;
case 5:
this.p7_1 = 8;
this.o7_1 = 7;
continue $sm;
case 6:
this.p7_1 = 8;
var tmp_3 = this.r7_1;
if (tmp_3 instanceof Error) {
this.kg2_1 = this.r7_1;
var tmp0_error = Korge_getInstance().wg2_1;
var tmp0_log = Level_ERROR_getInstance();
if (tmp0_error.s51(tmp0_log)) {
tmp0_error.u51(tmp0_log, "Couldn't get the application icon");
}
printStackTrace(this.kg2_1);
this.o7_1 = 7;
continue $sm;
} else {
throw this.r7_1;
}
break;
case 7:
var tmp_4 = this;
this.p7_1 = 8;
tmp_4.ig2_1 = Unit_getInstance();
this.p7_1 = 23;
this.o7_1 = 9;
var tmp_5 = this;
continue $sm;
case 8:
this.p7_1 = 23;
this.lg2_1 = this.r7_1;
var end_2 = PerformanceCounter_getInstance().u1h();
var tmp0__get_microseconds__mq1imi_2 = end_2 - this.hg2_1;
this.eg2_1.pch('setIcon', Companion_getInstance_1().v1h(tmp0__get_microseconds__mq1imi_2));
;
throw this.lg2_1;
case 9:
var tmp_6 = this;
var end_3 = PerformanceCounter_getInstance().u1h();
var tmp0__get_microseconds__mq1imi_3 = end_3 - this.hg2_1;
this.eg2_1.pch('setIcon', Companion_getInstance_1().v1h(tmp0__get_microseconds__mq1imi_3));
tmp_6.gg2_1 = Unit_getInstance();
this.o7_1 = 11;
continue $sm;
case 10:
var end_4 = PerformanceCounter_getInstance().u1h();
var tmp0__get_microseconds__mq1imi_4 = end_4 - this.hg2_1;
this.eg2_1.pch('setIcon', Companion_getInstance_1().v1h(tmp0__get_microseconds__mq1imi_4));
;
if (false) {
this.o7_1 = 1;
continue $sm;
}
this.o7_1 = 11;
continue $sm;
case 11:
this.dg2_1.vch(this.jg1_1);
if (OS_getInstance().f4z()) {
println('CanvasApplicationEx.IN[0]');
}
this.mg2_1 = new Input();
this.ng2_1 = new Stats();
var tmp_7 = this;
var tmp_8 = this.p5().p8(this.eg2_1.lch()).p8(new AsyncInjectorContext(this.kg1_1));
var tmp_9 = tmp_8.p8(SupervisorJob$default(null, 1, null));
var tmp_10;
if (this.lg1_1) {
tmp_10 = PrintAG_init_$Create$(0, 0, 3, null);
} else {
tmp_10 = this.dg2_1.kch();
}
var tmp_11 = tmp_10;
tmp_7.og2_1 = Views_init_$Create$(tmp_9, tmp_11, this.kg1_1, this.mg2_1, this.mg1_1, this.ng2_1, this.eg2_1, this.ng1_1, this.og1_1, this.pg1_1, null, 1024, null);
this.o7_1 = 12;
suspendResult = this.og2_1.k5g(this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 12:
this.pg2_1 = this.og2_1;
if (get_isJsBrowser(Companion_getInstance_3())) {
Dyn__set_impl_2ozvx8(Companion_getInstance_2().t5f(), 'views', this.pg2_1);
}
var tmp1_mapInstance = new ModuleArgs(this.qg1_1);
var tmp2_mapInstance = this.kg1_1.te0(getKClass(ModuleArgs), tmp1_mapInstance).te0(getKClass(GameWindow), this.eg2_1);
var tmp3_mapInstance = new Korge$invoke$4$3(this.dg1_1, this.fg1_1, this.bg1_1, this.cg1_1, this.rg1_1, this.sg1_1);
tmp2_mapInstance.te0(getKClass(Module), tmp3_mapInstance);
;
this.pg2_1.ofx_1 = this.tg1_1;
this.pg2_1.yg2(this.ug1_1);
this.pg2_1.zg2(this.vg1_1);
this.pg2_1.efx_1 = this.rg1_1;
this.pg2_1.ffx_1 = this.sg1_1;
this.pg2_1.ifx_1 = this.wg1_1;
this.pg2_1.hfx_1 = this.xg1_1;
this.pg2_1.jfx_1 = this.yg1_1;
this.pg2_1.afy_1 = this.zg1_1;
this.o7_1 = 13;
continue $sm;
case 13:
this.rg2_1 = PerformanceCounter_getInstance().u1h();
this.o7_1 = 14;
continue $sm;
case 14:
this.o7_1 = 15;
continue $sm;
case 15:
this.p7_1 = 22;
this.o7_1 = 16;
var tmp_12 = Korge_getInstance();
var tmp_13 = this.gg1_1;
var tmp_14 = !((tmp_13 == null ? null : new RGBA(tmp_13)) == null);
var tmp0_elvis_lhs_0 = this.gg1_1;
var tmp_15;
var tmp_16 = tmp0_elvis_lhs_0;
if ((tmp_16 == null ? null : new RGBA(tmp_16)) == null) {
tmp_15 = Colors_getInstance().x7z_1;
} else {
tmp_15 = tmp0_elvis_lhs_0;
}
var tmp_17 = tmp_15;
suspendResult = tmp_12.ag3(this.pg2_1, this.eg2_1, tmp_14, tmp_17, null, true, this.ag2_1, this, 16, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 16:
this.sg2_1 = suspendResult;
this.p7_1 = 23;
this.o7_1 = 17;
var tmp_18 = this;
continue $sm;
case 17:
var tmp_19 = this;
var end_5 = PerformanceCounter_getInstance().u1h();
var tmp0__get_microseconds__mq1imi_5 = end_5 - this.rg2_1;
this.eg2_1.pch('prepareViews', Companion_getInstance_1().v1h(tmp0__get_microseconds__mq1imi_5));
tmp_19.qg2_1 = Unit_getInstance();
this.o7_1 = 19;
continue $sm;
case 18:
var end_6 = PerformanceCounter_getInstance().u1h();
var tmp0__get_microseconds__mq1imi_6 = end_6 - this.rg2_1;
this.eg2_1.pch('prepareViews', Companion_getInstance_1().v1h(tmp0__get_microseconds__mq1imi_6));
;
if (false) {
this.o7_1 = 13;
continue $sm;
}
this.o7_1 = 19;
continue $sm;
case 19:
l$ret$23: do {
var start_0 = PerformanceCounter_getInstance().u1h();
var tmp$ret$20;
l$ret$21: do {
var tmp_20 = this;
var tmp$ret$18;
l$ret$19: do {
try {
completeViews(this.pg2_1);
tmp$ret$18 = Unit_getInstance();
break l$ret$19;
} catch ($p) {
var end_7 = PerformanceCounter_getInstance().u1h();
var tmp0__get_microseconds__mq1imi_7 = end_7 - start_0;
this.eg2_1.pch('completeViews', Companion_getInstance_1().v1h(tmp0__get_microseconds__mq1imi_7));
throw $p;
}
}
while (false);
var end_8 = PerformanceCounter_getInstance().u1h();
var tmp0__get_microseconds__mq1imi_8 = end_8 - start_0;
this.eg2_1.pch('completeViews', Companion_getInstance_1().v1h(tmp0__get_microseconds__mq1imi_8));
tmp_20.tg2_1 = Unit_getInstance();
break l$ret$23;
}
while (false);
var end_9 = PerformanceCounter_getInstance().u1h();
var tmp0__get_microseconds__mq1imi_9 = end_9 - start_0;
this.eg2_1.pch('completeViews', Companion_getInstance_1().v1h(tmp0__get_microseconds__mq1imi_9));
}
while (false);
launchImmediately(this.pg2_1, Korge$invoke$slambda$slambda_0(this.cg2_1, this.pg2_1, this.bg2_1, this.eg2_1, null));
;
if (OS_getInstance().f4z()) {
println('CanvasApplicationEx.IN[1]');
}
if (OS_getInstance().f4z()) {
println('Korui[1]');
}
if (this.bg2_1) {
this.o7_1 = 20;
suspendResult = this.eg2_1.kci(this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
this.o7_1 = 21;
continue $sm;
}
break;
case 20:
this.eg2_1.aci(0, 1, null);
this.o7_1 = 21;
continue $sm;
case 21:
return Unit_getInstance();
case 22:
this.p7_1 = 23;
var t = this.r7_1;
var end_10 = PerformanceCounter_getInstance().u1h();
var tmp0__get_microseconds__mq1imi_10 = end_10 - this.rg2_1;
this.eg2_1.pch('prepareViews', Companion_getInstance_1().v1h(tmp0__get_microseconds__mq1imi_10));
;
throw t;
case 23:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 23) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
Korge$invoke$slambda.prototype.vg2 = function ($this$loop, completion) {
var i = new Korge$invoke$slambda(this.ag1_1, this.bg1_1, this.cg1_1, this.dg1_1, this.eg1_1, this.fg1_1, this.gg1_1, this.hg1_1, this.ig1_1, this.jg1_1, this.kg1_1, this.lg1_1, this.mg1_1, this.ng1_1, this.og1_1, this.pg1_1, this.qg1_1, this.rg1_1, this.sg1_1, this.tg1_1, this.ug1_1, this.vg1_1, this.wg1_1, this.xg1_1, this.yg1_1, this.zg1_1, this.ag2_1, this.bg2_1, this.cg2_1, completion);
i.dg2_1 = $this$loop;
return i;
};
Korge$invoke$slambda.$metadata$ = classMeta('Korge$invoke$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
function Korge$invoke$slambda_0($realGameWindow, $width, $height, $title, $icon, $fullscreen, $bgcolor, $iconPath, $imageFormats, $quality, $injector, $debugAg, $timeProvider, $gameId, $settingsFolder, $batchMaxQuads, $args, $virtualWidth, $virtualHeight, $debug, $debugFontExtraScale, $debugFontColor, $scaleAnchor, $scaleMode, $clipBorders, $targetFps, $forceRenderEveryFrame, $blocking, $entry, resultContinuation) {
var i = new Korge$invoke$slambda($realGameWindow, $width, $height, $title, $icon, $fullscreen, $bgcolor, $iconPath, $imageFormats, $quality, $injector, $debugAg, $timeProvider, $gameId, $settingsFolder, $batchMaxQuads, $args, $virtualWidth, $virtualHeight, $debug, $debugFontExtraScale, $debugFontColor, $scaleAnchor, $scaleMode, $clipBorders, $targetFps, $forceRenderEveryFrame, $blocking, $entry, resultContinuation);
var l = function ($this$loop, $cont) {
return i.ug2($this$loop, $cont);
};
l.$arity = 1;
return l;
}
function Korge$prepareViewsBase$slambda(resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
}
Korge$prepareViewsBase$slambda.prototype.kg3 = function ($this$mapSingleton, $cont) {
var tmp = this.lg3($this$mapSingleton, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
Korge$prepareViewsBase$slambda.prototype.w7 = function (p1, $cont) {
return this.kg3(p1 instanceof AsyncInjector ? p1 : THROW_CCE(), $cont);
};
Korge$prepareViewsBase$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
if (tmp === 0) {
this.p7_1 = 1;
return new ResourcesRoot();
} else if (tmp === 1) {
throw this.r7_1;
}
} catch ($p) {
throw $p;
}
while (true);
};
Korge$prepareViewsBase$slambda.prototype.lg3 = function ($this$mapSingleton, completion) {
var i = new Korge$prepareViewsBase$slambda(completion);
i.jg3_1 = $this$mapSingleton;
return i;
};
Korge$prepareViewsBase$slambda.$metadata$ = classMeta('Korge$prepareViewsBase$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
function Korge$prepareViewsBase$slambda_0(resultContinuation) {
var i = new Korge$prepareViewsBase$slambda(resultContinuation);
var l = function ($this$mapSingleton, $cont) {
return i.kg3($this$mapSingleton, $cont);
};
l.$arity = 1;
return l;
}
function Korge$prepareViewsBase$slambda_1(resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
}
Korge$prepareViewsBase$slambda_1.prototype.vg3 = function ($this$mapPrototype, $cont) {
var tmp = this.lg3($this$mapPrototype, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
Korge$prepareViewsBase$slambda_1.prototype.w7 = function (p1, $cont) {
return this.vg3(p1 instanceof AsyncInjector ? p1 : THROW_CCE(), $cont);
};
Korge$prepareViewsBase$slambda_1.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
if (tmp === 0) {
this.p7_1 = 1;
return new EmptyScene();
} else if (tmp === 1) {
throw this.r7_1;
}
} catch ($p) {
throw $p;
}
while (true);
};
Korge$prepareViewsBase$slambda_1.prototype.lg3 = function ($this$mapPrototype, completion) {
var i = new Korge$prepareViewsBase$slambda_1(completion);
i.ug3_1 = $this$mapPrototype;
return i;
};
Korge$prepareViewsBase$slambda_1.$metadata$ = classMeta('Korge$prepareViewsBase$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
function Korge$prepareViewsBase$slambda_2(resultContinuation) {
var i = new Korge$prepareViewsBase$slambda_1(resultContinuation);
var l = function ($this$mapPrototype, $cont) {
return i.vg3($this$mapPrototype, $cont);
};
l.$arity = 1;
return l;
}
function Korge$prepareViewsBase$lambda($views, $tempXY, $input, $downPos, $downTime, $mouseTouchEvent, $upPos, $moveTime, $moveMouseOutsideInNextFrame) {
return function (e) {
var tmp$ret$1;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace = Korge_getInstance().wg2_1;
var tmp0_log = Level_TRACE_getInstance();
var tmp;
if (tmp0_trace.s51(tmp0_log)) {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.Korge.prepareViewsBase.<anonymous>.<anonymous>' call
tmp$ret$0 = 'eventDispatcher.addEventListener<MouseEvent>:' + e;
tmp0_trace.u51(tmp0_log, tmp$ret$0);
tmp = Unit_getInstance();
}
tmp$ret$1 = tmp;
var tmp_0 = e.lc4_1;
var tmp_1 = e.mc4_1;
var tmp_2 = e.wc4_1;
var tmp0_container = prepareViewsBase$getRealXY$default($tempXY, $views, tmp_0, tmp_1, tmp_2, null, 32, null);
var x = tmp0_container.n4();
var y = tmp0_container.o4();
var tmp1_subject = e.jc4_1;
var tmp0 = tmp1_subject.q2_1;
var tmp_3;
switch (tmp0) {
case 3:
prepareViewsBase$mouseDown($input, $views, $downPos, $downTime, 'mouseDown', x, y, e.nc4_1);
prepareViewsBase$dispatchSimulatedTouchEvent($mouseTouchEvent, $views, x, y, e.nc4_1, Type_START_getInstance(), Status_ADD_getInstance());
tmp_3 = Unit_getInstance();
break;
case 2:
prepareViewsBase$mouseUp($input, $views, $upPos, 'mouseUp', x, y, e.nc4_1);
prepareViewsBase$dispatchSimulatedTouchEvent($mouseTouchEvent, $views, x, y, e.nc4_1, Type_END_getInstance(), Status_REMOVE_getInstance());
tmp_3 = Unit_getInstance();
break;
case 1:
prepareViewsBase$mouseDrag($views, $moveTime, 'onMouseDrag', x, y);
prepareViewsBase$dispatchSimulatedTouchEvent($mouseTouchEvent, $views, x, y, e.nc4_1, Type_MOVE_getInstance(), Status_KEEP_getInstance());
tmp_3 = Unit_getInstance();
break;
case 0:
prepareViewsBase$mouseMove($views, $moveMouseOutsideInNextFrame, $moveTime, 'mouseMove', x, y, true);
tmp_3 = Unit_getInstance();
break;
case 4:
tmp_3 = Unit_getInstance();
break;
case 5:
prepareViewsBase$mouseMove($views, $moveMouseOutsideInNextFrame, $moveTime, 'mouseEnter', x, y, true);
tmp_3 = Unit_getInstance();
break;
case 6:
prepareViewsBase$mouseMove($views, $moveMouseOutsideInNextFrame, $moveTime, 'mouseExit', x, y, false);
tmp_3 = Unit_getInstance();
break;
case 7:
tmp_3 = Unit_getInstance();
break;
}
var tmp$ret$2;
// Inline function 'com.soywiz.korev.dispatch' call
$views.oc3(getKClass(MouseEvent), e);
tmp$ret$2 = Unit_getInstance();
return Unit_getInstance();
};
}
function Korge$prepareViewsBase$lambda_0($views) {
return function (e) {
var tmp$ret$1;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace = Korge_getInstance().wg2_1;
var tmp0_log = Level_TRACE_getInstance();
var tmp;
if (tmp0_trace.s51(tmp0_log)) {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.Korge.prepareViewsBase.<anonymous>.<anonymous>' call
tmp$ret$0 = 'eventDispatcher.addEventListener<KeyEvent>:' + e;
tmp0_trace.u51(tmp0_log, tmp$ret$0);
tmp = Unit_getInstance();
}
tmp$ret$1 = tmp;
var tmp$ret$2;
// Inline function 'com.soywiz.korev.dispatch' call
$views.oc3(getKClass(KeyEvent), e);
tmp$ret$2 = Unit_getInstance();
return Unit_getInstance();
};
}
function Korge$prepareViewsBase$lambda_1($views) {
return function (e) {
var tmp$ret$1;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace = Korge_getInstance().wg2_1;
var tmp0_log = Level_TRACE_getInstance();
var tmp;
if (tmp0_trace.s51(tmp0_log)) {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.Korge.prepareViewsBase.<anonymous>.<anonymous>' call
tmp$ret$0 = 'eventDispatcher.addEventListener<GestureEvent>:' + e;
tmp0_trace.u51(tmp0_log, tmp$ret$0);
tmp = Unit_getInstance();
}
tmp$ret$1 = tmp;
var tmp$ret$2;
// Inline function 'com.soywiz.korev.dispatch' call
$views.oc3(getKClass(GestureEvent), e);
tmp$ret$2 = Unit_getInstance();
return Unit_getInstance();
};
}
function Korge$prepareViewsBase$lambda_2($views) {
return function (e) {
var tmp$ret$0;
// Inline function 'com.soywiz.korev.dispatch' call
$views.oc3(getKClass(DropFileEvent), e);
tmp$ret$0 = Unit_getInstance();
return Unit_getInstance();
};
}
function Korge$prepareViewsBase$lambda_3($views) {
return function (e) {
var tmp$ret$0;
// Inline function 'com.soywiz.korev.dispatch' call
$views.oc3(getKClass(ResumeEvent), e);
tmp$ret$0 = Unit_getInstance();
return Unit_getInstance();
};
}
function Korge$prepareViewsBase$lambda_4($views) {
return function (e) {
var tmp$ret$0;
// Inline function 'com.soywiz.korev.dispatch' call
$views.oc3(getKClass(PauseEvent), e);
tmp$ret$0 = Unit_getInstance();
return Unit_getInstance();
};
}
function Korge$prepareViewsBase$lambda_5($views) {
return function (e) {
var tmp$ret$0;
// Inline function 'com.soywiz.korev.dispatch' call
$views.oc3(getKClass(StopEvent), e);
tmp$ret$0 = Unit_getInstance();
return Unit_getInstance();
};
}
function Korge$prepareViewsBase$lambda$slambda($views, resultContinuation) {
this.eg4_1 = $views;
CoroutineImpl.call(this, resultContinuation);
}
Korge$prepareViewsBase$lambda$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
Korge$prepareViewsBase$lambda$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
Korge$prepareViewsBase$lambda$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
if (tmp === 0) {
this.p7_1 = 1;
this.eg4_1.x2c();
return Unit_getInstance();
} else if (tmp === 1) {
throw this.r7_1;
}
} catch ($p) {
throw $p;
}
while (true);
};
Korge$prepareViewsBase$lambda$slambda.prototype.k53 = function (completion) {
var i = new Korge$prepareViewsBase$lambda$slambda(this.eg4_1, completion);
return i;
};
Korge$prepareViewsBase$lambda$slambda.$metadata$ = classMeta('Korge$prepareViewsBase$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function Korge$prepareViewsBase$lambda$slambda_0($views, resultContinuation) {
var i = new Korge$prepareViewsBase$lambda$slambda($views, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function Korge$prepareViewsBase$lambda_6($views) {
return function (e) {
var tmp;
try {
var tmp$ret$0;
// Inline function 'com.soywiz.korev.dispatch' call
$views.oc3(getKClass(DestroyEvent), e);
tmp$ret$0 = Unit_getInstance();
tmp = tmp$ret$0;
}finally {
launchImmediately($views, Korge$prepareViewsBase$lambda$slambda_0($views, null));
}
return Unit_getInstance();
};
}
function Korge$prepareViewsBase$lambda_7($input, $views, $touchMouseEvent, $moveMouseOutsideInNextFrame, $tempXY, $downPos, $downTime, $upPos, $moveTime) {
return function (e) {
var tmp$ret$1;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace = Korge_getInstance().wg2_1;
var tmp0_log = Level_TRACE_getInstance();
var tmp;
if (tmp0_trace.s51(tmp0_log)) {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.Korge.prepareViewsBase.<anonymous>.<anonymous>' call
tmp$ret$0 = 'eventDispatcher.addEventListener<TouchEvent>:' + e;
tmp0_trace.u51(tmp0_log, tmp$ret$0);
tmp = Unit_getInstance();
}
tmp$ret$1 = tmp;
$input.fg4(e);
var ee = $input.rfz_1;
var tmp0_iterator = ee.tc8().j();
while (tmp0_iterator.k()) {
var t = tmp0_iterator.l();
var tmp_0 = t.bc9_1;
var tmp_1 = t.cc9_1;
var tmp_2 = e.kc8_1;
var tmp1_container = prepareViewsBase$getRealXY$default($tempXY, $views, tmp_0, tmp_1, tmp_2, null, 32, null);
var x = tmp1_container.n4();
var y = tmp1_container.o4();
t.bc9_1 = x;
t.cc9_1 = y;
}
var tmp$ret$2;
// Inline function 'com.soywiz.korev.dispatch' call
$views.oc3(getKClass(TouchEvent), ee);
tmp$ret$2 = Unit_getInstance();
var tmp_3;
if (ee.vc8() === 1) {
var start = ee.pc9();
var end = ee.qc9();
var t_0 = first(ee.tc8());
var x_0 = t_0.bc9_1;
var y_0 = t_0.cc9_1;
var button = MouseButton_LEFT_getInstance();
if (start) {
prepareViewsBase$mouseDown($input, $views, $downPos, $downTime, 'onTouchStart', x_0, y_0, button);
} else if (end) {
prepareViewsBase$mouseUp($input, $views, $upPos, 'onTouchEnd', x_0, y_0, button);
} else {
prepareViewsBase$mouseMove($views, $moveMouseOutsideInNextFrame, $moveTime, 'onTouchMove', x_0, y_0, true);
}
var tmp$ret$4;
// Inline function 'com.soywiz.korev.dispatch' call
var tmp$ret$3;
// Inline function 'kotlin.also' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.Korge.prepareViewsBase.<anonymous>.<anonymous>' call
$touchMouseEvent.kc4_1 = 0;
$touchMouseEvent.nc4_1 = button;
$touchMouseEvent.oc4_1 = end ? 0 : 1 << button.jcc_1;
$touchMouseEvent.lc4_1 = numberToInt(x_0);
$touchMouseEvent.mc4_1 = numberToInt(y_0);
$touchMouseEvent.wc4_1 = false;
$touchMouseEvent.xc4_1 = true;
$touchMouseEvent.jc4_1 = start ? Type_DOWN_getInstance() : end ? Type_UP_getInstance() : Type_DRAG_getInstance();
tmp$ret$3 = $touchMouseEvent;
var tmp1_dispatch = tmp$ret$3;
$views.oc3(getKClass(MouseEvent), tmp1_dispatch);
tmp$ret$4 = Unit_getInstance();
var tmp_4;
if (end) {
$moveMouseOutsideInNextFrame._v = true;
tmp_4 = Unit_getInstance();
}
tmp_3 = tmp_4;
}
return Unit_getInstance();
};
}
function Korge$prepareViewsBase$lambda_8($views) {
return function (e) {
var tmp$ret$1;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace = Korge_getInstance().wg2_1;
var tmp0_log = Level_TRACE_getInstance();
var tmp;
if (tmp0_trace.s51(tmp0_log)) {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.Korge.prepareViewsBase.<anonymous>.<anonymous>' call
tmp$ret$0 = 'eventDispatcher.addEventListener<GamePadConnectionEvent>:' + e;
tmp0_trace.u51(tmp0_log, tmp$ret$0);
tmp = Unit_getInstance();
}
tmp$ret$1 = tmp;
var tmp$ret$2;
// Inline function 'com.soywiz.korev.dispatch' call
$views.oc3(getKClass(GamePadConnectionEvent), e);
tmp$ret$2 = Unit_getInstance();
return Unit_getInstance();
};
}
function Korge$prepareViewsBase$lambda_9($views, $input) {
return function (e) {
prepareViewsBase$gamepadUpdated($input, e);
var tmp$ret$0;
// Inline function 'com.soywiz.korev.dispatch' call
$views.oc3(getKClass(GamePadUpdateEvent), e);
tmp$ret$0 = Unit_getInstance();
return Unit_getInstance();
};
}
function Korge$prepareViewsBase$lambda_10($views, $ag) {
return function (e) {
$views.gg4($ag.db9(), $ag.eb9());
return Unit_getInstance();
};
}
function Korge$prepareViewsBase$lambda_11($views) {
return function (it) {
var tmp$ret$0;
// Inline function 'com.soywiz.korev.dispatch' call
$views.oc3(getKClass(ReloadEvent), it);
tmp$ret$0 = Unit_getInstance();
return Unit_getInstance();
};
}
function Korge$prepareViewsBase$lambda_12($views, $renderShown, $firstRenderDeferred, $fixedSizeStep, $moveMouseOutsideInNextFrame) {
return function (event) {
var tmp;
if (!event.bca_1) {
prepareViewsBase$renderBlock($views, $fixedSizeStep, $moveMouseOutsideInNextFrame, event);
tmp = Unit_getInstance();
} else {
var tmp0_doRender = $views.cfw_1;
tmp0_doRender.ab9();
tmp0_doRender.cb9().ab2();
var tmp0_setRenderBufferTemporally = tmp0_doRender.cb9();
tmp0_doRender.qba(tmp0_setRenderBufferTemporally);
var tmp_0;
try {
if (!$renderShown._v) {
$renderShown._v = true;
$firstRenderDeferred.x1z(Unit_getInstance());
}
prepareViewsBase$renderBlock($views, $fixedSizeStep, $moveMouseOutsideInNextFrame, event);
tmp_0 = Unit_getInstance();
}finally {
tmp0_doRender.rba();
}
tmp = tmp_0;
}
return Unit_getInstance();
};
}
function $invokeCOROUTINE$1(_this__u8e3s4, title, width, height, virtualWidth, virtualHeight, icon, iconPath, imageFormats, quality, targetFps, scaleAnchor, scaleMode, clipBorders, bgcolor, debug, debugFontExtraScale, debugFontColor, fullscreen, args, gameWindow, timeProvider, injector, debugAg, blocking, gameId, settingsFolder, batchMaxQuads, multithreaded, forceRenderEveryFrame, entry, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.pg4_1 = _this__u8e3s4;
this.qg4_1 = title;
this.rg4_1 = width;
this.sg4_1 = height;
this.tg4_1 = virtualWidth;
this.ug4_1 = virtualHeight;
this.vg4_1 = icon;
this.wg4_1 = iconPath;
this.xg4_1 = imageFormats;
this.yg4_1 = quality;
this.zg4_1 = targetFps;
this.ag5_1 = scaleAnchor;
this.bg5_1 = scaleMode;
this.cg5_1 = clipBorders;
this.dg5_1 = bgcolor;
this.eg5_1 = debug;
this.fg5_1 = debugFontExtraScale;
this.gg5_1 = debugFontColor;
this.hg5_1 = fullscreen;
this.ig5_1 = args;
this.jg5_1 = gameWindow;
this.kg5_1 = timeProvider;
this.lg5_1 = injector;
this.mg5_1 = debugAg;
this.ng5_1 = blocking;
this.og5_1 = gameId;
this.pg5_1 = settingsFolder;
this.qg5_1 = batchMaxQuads;
this.rg5_1 = multithreaded;
this.sg5_1 = forceRenderEveryFrame;
this.tg5_1 = entry;
}
$invokeCOROUTINE$1.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 4;
if (!OS_getInstance().p6u()) {
this.o7_1 = 1;
suspendResult = configureLoggerFromProperties(get_localCurrentDirVfs().c19('klogger.properties'), this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
this.o7_1 = 2;
continue $sm;
}
break;
case 1:
this.o7_1 = 2;
continue $sm;
case 2:
var tmp_0 = this;
var tmp0_elvis_lhs = this.jg5_1;
var tmp_1;
if (tmp0_elvis_lhs == null) {
tmp_1 = this.p5().i8(CoroutineKey_getInstance());
} else {
tmp_1 = tmp0_elvis_lhs;
}
var tmp1_elvis_lhs = tmp_1;
var tmp_2;
if (tmp1_elvis_lhs == null) {
tmp_2 = CreateDefaultGameWindow(GameWindowCreationConfig_init_$Create$(this.rg5_1, null, 2, null));
} else {
tmp_2 = tmp1_elvis_lhs;
}
tmp_0.ug5_1 = tmp_2;
var tmp2_elvis_lhs = this.dg5_1;
var tmp_3;
var tmp_4 = tmp2_elvis_lhs;
if ((tmp_4 == null ? null : new RGBA(tmp_4)) == null) {
tmp_3 = Colors_getInstance().t7z_1;
} else {
tmp_3 = tmp2_elvis_lhs;
}
this.ug5_1.uch(tmp_3);
this.o7_1 = 3;
suspendResult = this.ug5_1.lci(Korge$invoke$slambda_0(this.ug5_1, this.rg4_1, this.sg4_1, this.qg4_1, this.vg4_1, this.hg5_1, this.dg5_1, this.wg4_1, this.xg4_1, this.yg4_1, this.lg5_1, this.mg5_1, this.kg5_1, this.og5_1, this.pg5_1, this.qg5_1, this.ig5_1, this.tg4_1, this.ug4_1, this.eg5_1, this.fg5_1, this.gg5_1, this.ag5_1, this.bg5_1, this.cg5_1, this.zg4_1, this.sg5_1, this.ng5_1, this.tg5_1, null), this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 3:
return Unit_getInstance();
case 4:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 4) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$invokeCOROUTINE$1.$metadata$ = classMeta('$invokeCOROUTINE$1', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function $prepareViewsCOROUTINE$3(_this__u8e3s4, views, eventDispatcher, clearEachFrame, bgcolor, fixedSizeStep, waitForFirstRender, forceRenderEveryFrame, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.dg6_1 = _this__u8e3s4;
this.eg6_1 = views;
this.fg6_1 = eventDispatcher;
this.gg6_1 = clearEachFrame;
this.hg6_1 = bgcolor;
this.ig6_1 = fixedSizeStep;
this.jg6_1 = waitForFirstRender;
this.kg6_1 = forceRenderEveryFrame;
}
$prepareViewsCOROUTINE$3.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 3;
this.lg6_1 = this.dg6_1.mg6(this.eg6_1, this.fg6_1, this.gg6_1, this.hg6_1, this.ig6_1, this.kg6_1);
if (this.jg6_1) {
this.o7_1 = 1;
suspendResult = this.lg6_1.y1w(this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
this.o7_1 = 2;
continue $sm;
}
break;
case 1:
this.o7_1 = 2;
continue $sm;
case 2:
return Unit_getInstance();
case 3:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 3) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$prepareViewsCOROUTINE$3.$metadata$ = classMeta('$prepareViewsCOROUTINE$3', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function Korge() {
Korge_instance = this;
this.wg2_1 = Companion_getInstance_4().h51('Korge');
this.xg2_1 = 'com.soywiz.korge.unknown';
}
Korge.prototype.ng6 = function (title, width, height, virtualWidth, virtualHeight, icon, iconPath, imageFormats, quality, targetFps, scaleAnchor, scaleMode, clipBorders, bgcolor, debug, debugFontExtraScale, debugFontColor, fullscreen, args, gameWindow, timeProvider, injector, debugAg, blocking, gameId, settingsFolder, batchMaxQuads, multithreaded, forceRenderEveryFrame, entry, $cont) {
var tmp = new $invokeCOROUTINE$1(this, title, width, height, virtualWidth, virtualHeight, icon, iconPath, imageFormats, quality, targetFps, scaleAnchor, scaleMode, clipBorders, bgcolor, debug, debugFontExtraScale, debugFontColor, fullscreen, args, gameWindow, timeProvider, injector, debugAg, blocking, gameId, settingsFolder, batchMaxQuads, multithreaded, forceRenderEveryFrame, entry, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
Korge.prototype.og6 = function (title, width, height, virtualWidth, virtualHeight, icon, iconPath, imageFormats, quality, targetFps, scaleAnchor, scaleMode, clipBorders, bgcolor, debug, debugFontExtraScale, debugFontColor, fullscreen, args, gameWindow, timeProvider, injector, debugAg, blocking, gameId, settingsFolder, batchMaxQuads, multithreaded, forceRenderEveryFrame, entry, $cont, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
title = 'Korge';
if (!(($mask0 & 2) === 0)) {
DefaultViewport_getInstance();
width = 1280;
}
if (!(($mask0 & 4) === 0)) {
DefaultViewport_getInstance();
height = 720;
}
if (!(($mask0 & 8) === 0))
virtualWidth = width;
if (!(($mask0 & 16) === 0))
virtualHeight = height;
if (!(($mask0 & 32) === 0))
icon = null;
if (!(($mask0 & 64) === 0))
iconPath = null;
if (!(($mask0 & 128) === 0))
imageFormats = ImageFormats_init_$Create$([]);
if (!(($mask0 & 256) === 0))
quality = Quality_AUTOMATIC_getInstance();
if (!(($mask0 & 512) === 0))
targetFps = 0.0;
if (!(($mask0 & 1024) === 0))
scaleAnchor = Companion_getInstance_5().v6z_1;
if (!(($mask0 & 2048) === 0))
scaleMode = Companion_getInstance_6().m7d_1;
if (!(($mask0 & 4096) === 0))
clipBorders = true;
if (!(($mask0 & 8192) === 0))
bgcolor = Colors_getInstance().t7z_1;
if (!(($mask0 & 16384) === 0))
debug = false;
if (!(($mask0 & 32768) === 0))
debugFontExtraScale = 1.0;
if (!(($mask0 & 65536) === 0))
debugFontColor = Colors_getInstance().s7z_1;
if (!(($mask0 & 131072) === 0))
fullscreen = null;
if (!(($mask0 & 262144) === 0)) {
args = [];
}
if (!(($mask0 & 524288) === 0))
gameWindow = null;
if (!(($mask0 & 1048576) === 0))
timeProvider = Companion_getInstance_7();
if (!(($mask0 & 2097152) === 0)) {
injector = AsyncInjector_init_$Create$(null, 0, 3, null);
}
if (!(($mask0 & 4194304) === 0))
debugAg = false;
if (!(($mask0 & 8388608) === 0))
blocking = true;
if (!(($mask0 & 16777216) === 0))
gameId = this.xg2_1;
if (!(($mask0 & 33554432) === 0))
settingsFolder = null;
if (!(($mask0 & 67108864) === 0))
batchMaxQuads = Companion_getInstance_46().qg6_1;
if (!(($mask0 & 134217728) === 0))
multithreaded = null;
if (!(($mask0 & 268435456) === 0))
forceRenderEveryFrame = true;
return this.ng6(title, width, height, virtualWidth, virtualHeight, icon, iconPath, imageFormats, quality, targetFps, scaleAnchor, scaleMode, clipBorders, bgcolor, debug, debugFontExtraScale, debugFontColor, fullscreen, args, gameWindow, timeProvider, injector, debugAg, blocking, gameId, settingsFolder, batchMaxQuads, multithreaded, forceRenderEveryFrame, entry, $cont);
};
Korge.prototype.mg6 = function (views, eventDispatcher, clearEachFrame, bgcolor, fixedSizeStep, forceRenderEveryFrame) {
KorgeReload_getInstance().fg7(eventDispatcher);
var injector = views.dfw_1;
var tmp$ret$0;
// Inline function 'com.soywiz.korinject.AsyncInjector.mapInstance' call
tmp$ret$0 = injector.te0(getKClass(Views), views);
var tmp$ret$1;
// Inline function 'com.soywiz.korinject.AsyncInjector.mapInstance' call
var tmp0_mapInstance = views.cfw_1;
tmp$ret$1 = injector.te0(getKClass(AG), tmp0_mapInstance);
injector.te0(getKClass(Resources), views.gg7());
var tmp = getKClass(ResourcesRoot);
injector.we0(tmp, Korge$prepareViewsBase$slambda_0(null));
var tmp$ret$2;
// Inline function 'com.soywiz.korinject.AsyncInjector.mapInstance' call
var tmp1_mapInstance = views.efw_1;
tmp$ret$2 = injector.te0(getKClass(Input), tmp1_mapInstance);
var tmp$ret$3;
// Inline function 'com.soywiz.korinject.AsyncInjector.mapInstance' call
var tmp2_mapInstance = views.gfw_1;
tmp$ret$3 = injector.te0(getKClass(Stats), tmp2_mapInstance);
injector.te0(getKClass(CoroutineContext), views.bfw_1);
var tmp_0 = getKClass(EmptyScene);
injector.xe0(tmp_0, Korge$prepareViewsBase$slambda_2(null));
injector.te0(getKClass(TimeProvider), views.ffw_1);
var input = views.efw_1;
var ag = views.cfw_1;
var downPos = Companion_getInstance_8().zp();
var upPos = Companion_getInstance_8().zp();
var downTime = {_v: new DateTime(Companion_getInstance_0().z1g_1)};
var moveTime = {_v: new DateTime(Companion_getInstance_0().z1g_1)};
var upTime = Companion_getInstance_0().z1g_1;
var moveMouseOutsideInNextFrame = {_v: false};
var mouseTouchId = -1;
views.hg7(forceRenderEveryFrame);
var tempXY = Companion_getInstance_8().zp();
var mouseTouchEvent = TouchEvent_init_$Create$(null, 0, null, false, false, 31, null);
var tmp$ret$4;
// Inline function 'com.soywiz.korev.addEventListener' call
var tmp3_addEventListener = Korge$prepareViewsBase$lambda(views, tempXY, input, downPos, downTime, mouseTouchEvent, upPos, moveTime, moveMouseOutsideInNextFrame);
tmp$ret$4 = eventDispatcher.nc3(getKClass(MouseEvent), tmp3_addEventListener);
var tmp$ret$5;
// Inline function 'com.soywiz.korev.addEventListener' call
var tmp4_addEventListener = Korge$prepareViewsBase$lambda_0(views);
tmp$ret$5 = eventDispatcher.nc3(getKClass(KeyEvent), tmp4_addEventListener);
var tmp$ret$6;
// Inline function 'com.soywiz.korev.addEventListener' call
var tmp5_addEventListener = Korge$prepareViewsBase$lambda_1(views);
tmp$ret$6 = eventDispatcher.nc3(getKClass(GestureEvent), tmp5_addEventListener);
var tmp$ret$7;
// Inline function 'com.soywiz.korev.addEventListener' call
var tmp6_addEventListener = Korge$prepareViewsBase$lambda_2(views);
tmp$ret$7 = eventDispatcher.nc3(getKClass(DropFileEvent), tmp6_addEventListener);
var tmp$ret$8;
// Inline function 'com.soywiz.korev.addEventListener' call
var tmp7_addEventListener = Korge$prepareViewsBase$lambda_3(views);
tmp$ret$8 = eventDispatcher.nc3(getKClass(ResumeEvent), tmp7_addEventListener);
var tmp$ret$9;
// Inline function 'com.soywiz.korev.addEventListener' call
var tmp8_addEventListener = Korge$prepareViewsBase$lambda_4(views);
tmp$ret$9 = eventDispatcher.nc3(getKClass(PauseEvent), tmp8_addEventListener);
var tmp$ret$10;
// Inline function 'com.soywiz.korev.addEventListener' call
var tmp9_addEventListener = Korge$prepareViewsBase$lambda_5(views);
tmp$ret$10 = eventDispatcher.nc3(getKClass(StopEvent), tmp9_addEventListener);
var tmp$ret$11;
// Inline function 'com.soywiz.korev.addEventListener' call
var tmp10_addEventListener = Korge$prepareViewsBase$lambda_6(views);
tmp$ret$11 = eventDispatcher.nc3(getKClass(DestroyEvent), tmp10_addEventListener);
var touchMouseEvent = MouseEvent_init_$Create$(null, 0, 0, 0, null, 0, 0.0, 0.0, 0.0, false, false, false, false, false, false, null, 65535, null);
var tmp$ret$12;
// Inline function 'com.soywiz.korev.addEventListener' call
var tmp11_addEventListener = Korge$prepareViewsBase$lambda_7(input, views, touchMouseEvent, moveMouseOutsideInNextFrame, tempXY, downPos, downTime, upPos, moveTime);
tmp$ret$12 = eventDispatcher.nc3(getKClass(TouchEvent), tmp11_addEventListener);
var tmp$ret$13;
// Inline function 'com.soywiz.korev.addEventListener' call
var tmp12_addEventListener = Korge$prepareViewsBase$lambda_8(views);
tmp$ret$13 = eventDispatcher.nc3(getKClass(GamePadConnectionEvent), tmp12_addEventListener);
var tmp$ret$14;
// Inline function 'com.soywiz.korev.addEventListener' call
var tmp13_addEventListener = Korge$prepareViewsBase$lambda_9(views, input);
tmp$ret$14 = eventDispatcher.nc3(getKClass(GamePadUpdateEvent), tmp13_addEventListener);
var tmp$ret$15;
// Inline function 'com.soywiz.korev.addEventListener' call
var tmp14_addEventListener = Korge$prepareViewsBase$lambda_10(views, ag);
tmp$ret$15 = eventDispatcher.nc3(getKClass(ReshapeEvent), tmp14_addEventListener);
var tmp$ret$16;
// Inline function 'com.soywiz.korev.dispatch' call
var tmp15_dispatch = new ReshapeEvent(0, 0, views.ig7(), views.jg7());
eventDispatcher.oc3(getKClass(ReshapeEvent), tmp15_dispatch);
tmp$ret$16 = Unit_getInstance();
var tmp$ret$17;
// Inline function 'com.soywiz.korev.addEventListener' call
var tmp16_addEventListener = Korge$prepareViewsBase$lambda_11(views);
tmp$ret$17 = eventDispatcher.nc3(getKClass(ReloadEvent), tmp16_addEventListener);
var renderShown = {_v: false};
views.yfw_1 = clearEachFrame;
views.zfw_1 = bgcolor;
var firstRenderDeferred = CompletableDeferred$default(null, 1, null);
views.hfw_1.nch(Korge$prepareViewsBase$lambda_12(views, renderShown, firstRenderDeferred, fixedSizeStep, moveMouseOutsideInNextFrame));
return firstRenderDeferred;
};
Korge.prototype.kg7 = function (views, eventDispatcher, clearEachFrame, bgcolor, fixedSizeStep, waitForFirstRender, forceRenderEveryFrame, $cont) {
var tmp = new $prepareViewsCOROUTINE$3(this, views, eventDispatcher, clearEachFrame, bgcolor, fixedSizeStep, waitForFirstRender, forceRenderEveryFrame, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
Korge.prototype.ag3 = function (views, eventDispatcher, clearEachFrame, bgcolor, fixedSizeStep, waitForFirstRender, forceRenderEveryFrame, $cont, $mask0, $handler) {
if (!(($mask0 & 4) === 0))
clearEachFrame = true;
if (!(($mask0 & 8) === 0))
bgcolor = Colors_getInstance().x7z_1;
if (!(($mask0 & 16) === 0))
fixedSizeStep = Companion_getInstance_1().m1h_1;
if (!(($mask0 & 32) === 0))
waitForFirstRender = true;
if (!(($mask0 & 64) === 0))
forceRenderEveryFrame = true;
return this.kg7(views, eventDispatcher, clearEachFrame, bgcolor, fixedSizeStep, waitForFirstRender, forceRenderEveryFrame, $cont);
};
Korge.$metadata$ = objectMeta('Korge');
var Korge_instance;
function Korge_getInstance() {
if (Korge_instance == null)
new Korge();
return Korge_instance;
}
function KorgeReload() {
KorgeReload_instance = this;
this.eg7_1 = null;
}
KorgeReload.prototype.fg7 = function (eventDispatcher) {
if (!Companion_getInstance_3().a4z().g4z() ? true : !(Companion_getInstance_9().c19('KORGE_AUTORELOAD') === 'true'))
return Unit_getInstance();
this.eg7_1 = eventDispatcher;
};
KorgeReload.prototype.lg7 = function () {
if (!Companion_getInstance_3().a4z().g4z())
return Unit_getInstance();
if (!(this.eg7_1 == null))
this.eg7_1 = null;
};
KorgeReload.$metadata$ = objectMeta('KorgeReload');
var KorgeReload_instance;
function KorgeReload_getInstance() {
if (KorgeReload_instance == null)
new KorgeReload();
return KorgeReload_instance;
}
function KorgeReloadInternalImpl() {
}
KorgeReloadInternalImpl.prototype.mg7 = function (clazz, context) {
return clazz;
};
KorgeReloadInternalImpl.prototype.ng7 = function (old, new_0) {
return Unit_getInstance();
};
KorgeReloadInternalImpl.$metadata$ = classMeta('KorgeReloadInternalImpl');
function ReloadEvent(refreshedClasses, reloadSuccess) {
Event.call(this);
this.qg7_1 = refreshedClasses;
this.rg7_1 = reloadSuccess;
}
ReloadEvent.prototype.sg7 = function () {
return !this.rg7_1;
};
ReloadEvent.prototype.tg7 = function (clazz, injector) {
return get_KorgeReloadInternal().mg7(clazz, new ReloadClassContext(injector, this.qg7_1));
};
ReloadEvent.prototype.ng7 = function (old, new_0) {
return get_KorgeReloadInternal().ng7(old, new_0);
};
ReloadEvent.prototype.toString = function () {
return 'ReloadEvent(refreshedClasses=' + this.qg7_1 + ', reloadSuccess=' + this.rg7_1 + ')';
};
ReloadEvent.prototype.hashCode = function () {
var result = hashCode(this.qg7_1);
result = imul(result, 31) + (this.rg7_1 | 0) | 0;
return result;
};
ReloadEvent.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof ReloadEvent))
return false;
var tmp0_other_with_cast = other instanceof ReloadEvent ? other : THROW_CCE();
if (!equals(this.qg7_1, tmp0_other_with_cast.qg7_1))
return false;
if (!(this.rg7_1 === tmp0_other_with_cast.rg7_1))
return false;
return true;
};
ReloadEvent.$metadata$ = classMeta('ReloadEvent', undefined, undefined, undefined, undefined, Event.prototype);
function ReloadClassContext(injector, refreshedClasses) {
this.ug7_1 = injector;
this.vg7_1 = refreshedClasses;
}
ReloadClassContext.$metadata$ = classMeta('ReloadClassContext');
function deltaComponent($this, clazz, delta) {
if (delta === 0)
return Unit_getInstance();
$this.yg7().ac4(clazz, $this.yg7().zc3(clazz) + delta | 0);
var tmp0_safe_receiver = $this.zg7();
if (tmp0_safe_receiver == null)
null;
else {
deltaComponent(tmp0_safe_receiver, clazz, delta);
}
}
function DeferWithViewsUpdateComponentWithViews(view, block) {
this.ag8_1 = view;
this.bg8_1 = block;
}
DeferWithViewsUpdateComponentWithViews.prototype.n2u = function () {
return this.ag8_1;
};
DeferWithViewsUpdateComponentWithViews.prototype.cg8 = function (views, dt) {
this.bg8_1(views);
detach(this);
};
DeferWithViewsUpdateComponentWithViews.$metadata$ = classMeta('DeferWithViewsUpdateComponentWithViews', [UpdateComponentWithViews]);
function BaseView() {
this.wg7_1 = null;
var tmp = this;
var tmp$ret$0;
// Inline function 'kotlin.collections.linkedMapOf' call
tmp$ret$0 = LinkedHashMap_init_$Create$();
tmp.xg7_1 = tmp$ret$0;
}
BaseView.prototype.zg7 = function () {
return null;
};
BaseView.prototype.dg8 = function () {
};
BaseView.prototype.yg7 = function () {
if (this.wg7_1 == null)
this.wg7_1 = new EventListenerFastMap();
return ensureNotNull(this.wg7_1);
};
BaseView.prototype.eg8 = function (view, add) {
var tmp0_safe_receiver = view.wg7_1;
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.korev.EventListenerFastMap.forEach' call
var inductionVariable = 0;
var last = tmp0_safe_receiver.i();
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
// Inline function 'com.soywiz.korge.baseview.BaseView.__updateChildListenerCount.<anonymous>' call
var tmp0__anonymous__q1qw7t = tmp0_safe_receiver.sc3_1.m(n);
var tmp1__anonymous__uwfjfc = tmp0_safe_receiver.tc3_1.m(n);
var tmp2__anonymous__z9zvc9 = tmp0_safe_receiver.uc3_1.m(n);
deltaComponent(this, tmp0__anonymous__q1qw7t, add ? +tmp2__anonymous__z9zvc9 : -tmp2__anonymous__z9zvc9 | 0);
}
while (inductionVariable < last);
}
};
BaseView.prototype.fg8 = function (clazz) {
var tmp0_safe_receiver = this.wg7_1;
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zc3(clazz);
return tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
};
BaseView.prototype.gg8 = function (type) {
var tmp0_safe_receiver = this.wg7_1;
var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.bc4(type);
return (tmp == null ? true : tmp instanceof FastArrayList) ? tmp : THROW_CCE();
};
BaseView.prototype.hg8 = function (type, temp, results, block) {
if (temp instanceof FastArrayList)
temp;
else
THROW_CCE();
temp.x7();
try {
this.ig8(type, temp, results);
// Inline function 'com.soywiz.kds.FastArrayList.fastForEach' call
var tmp0_fastForEach = temp;
var array = tmp0_fastForEach.b4r_1;
var n = 0;
while (n < array.length) {
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp0_unsafeCast = array[tmp0];
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_unsafeCast;
tmp$ret$1 = tmp$ret$0;
block(tmp$ret$1);
}
}finally {
temp.x7();
}
};
BaseView.prototype.jg8 = function (type, temp, results, block, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
temp = FastArrayList_init_$Create$();
if (!(($mask0 & 4) === 0))
results = null;
return this.hg8(type, temp, results, block);
};
BaseView.prototype.ig8 = function (type, out, results) {
if (this.fg8(type) <= 0)
return Unit_getInstance();
this.kg8(type, out, results);
var components = this.gg8(type);
var tmp0_safe_receiver = components;
if (tmp0_safe_receiver == null)
null;
else {
var tmp$ret$1;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korge.baseview.BaseView.getComponentOfTypeRecursive.<anonymous>' call
tmp$ret$0 = out.o(tmp0_safe_receiver);
tmp$ret$1 = tmp$ret$0;
}
var tmp1_safe_receiver = results;
if (tmp1_safe_receiver == null)
null;
else {
var tmp$ret$2;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
var tmp0_this = tmp1_safe_receiver;
var tmp1 = tmp0_this.qc3_1;
tmp0_this.qc3_1 = tmp1 + 1 | 0;
var tmp2_this = tmp1_safe_receiver;
var tmp = tmp2_this;
var tmp_0 = tmp2_this.rc3_1;
var tmp3_safe_receiver = components;
var tmp4_elvis_lhs = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.i();
tmp.rc3_1 = tmp_0 + (tmp4_elvis_lhs == null ? 0 : tmp4_elvis_lhs) | 0;
tmp$ret$2 = Unit_getInstance();
}
};
BaseView.prototype.kg8 = function (type, out, results) {
};
BaseView.prototype.lg8 = function (component) {
var type = component.h68();
var tmp$ret$1;
$l$block: {
// Inline function 'com.soywiz.korev.EventListenerFastMap.getOrPutValue' call
var tmp0_getOrPutValue = this.yg7();
var index = tmp0_getOrPutValue.xc3(type);
if (index < 0 ? true : tmp0_getOrPutValue.tc3_1.m(index) == null) {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.baseview.BaseView.addComponent.<anonymous>' call
tmp$ret$0 = FastArrayList_init_$Create$();
var value = tmp$ret$0;
tmp0_getOrPutValue.yc3(type, value, 0, 4, null);
tmp$ret$1 = value;
break $l$block;
}
tmp$ret$1 = ensureNotNull(tmp0_getOrPutValue.tc3_1.m(index));
}
tmp$ret$1.c(component);
deltaComponent(this, type, 1);
return component;
};
BaseView.prototype.mg8 = function (component) {
var tmp0_safe_receiver = this.wg7_1;
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.bc4(component.h68());
if ((tmp1_safe_receiver == null ? null : tmp1_safe_receiver.c5(component)) === true) {
deltaComponent(this, component.h68(), -1);
}
};
BaseView.prototype.ng8 = function (block) {
this.lg8(new DeferWithViewsUpdateComponentWithViews(this, block));
};
BaseView.$metadata$ = classMeta('BaseView');
function drawText(_this__u8e3s4, font, textSize, str, x, y, m, colMul, colAdd, blendMode, filtering) {
drawText_0(font, _this__u8e3s4, textSize, str, x, y, m, colMul, colAdd, blendMode, filtering);
}
function drawText$default(_this__u8e3s4, font, textSize, str, x, y, m, colMul, colAdd, blendMode, filtering, $mask0, $handler) {
if (!(($mask0 & 32) === 0)) {
m = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
}
if (!(($mask0 & 64) === 0))
colMul = Colors_getInstance().s7z_1;
if (!(($mask0 & 128) === 0)) {
var tmp$ret$0;
var tmp$ret$0_0;
// Inline function 'com.soywiz.korim.color.Companion.NEUTRAL' call
var tmp0__get_NEUTRAL__h8d6d8 = Companion_getInstance_10();
tmp$ret$0 = get_ColorAdd_NEUTRAL();
tmp$ret$0_0 = Unit_getInstance();
colAdd = tmp$ret$0;
}
if (!(($mask0 & 256) === 0))
blendMode = Companion_getInstance_53().pg8_1;
if (!(($mask0 & 512) === 0))
filtering = true;
return drawText(_this__u8e3s4, font, textSize, str, x, y, m, colMul, colAdd, blendMode, filtering);
}
function drawText_0(_this__u8e3s4, ctx, textSize, str, x, y, m, colMul, colAdd, blendMode, filtering) {
var m2 = m.z4n();
var scale = textSize / _this__u8e3s4.z8l_1;
m2.o76(x, y);
m2.k76(scale, scale);
var dx = 0.0;
var dy = 0.0;
var tmp$ret$4;
// Inline function 'com.soywiz.korge.render.RenderContext.useBatcher' call
var tmp$ret$3;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.use' call
var tmp1_use = ctx.gga_1;
var tmp0_useBatcher = tmp1_use.vga_1;
if (!(tmp0_useBatcher.tga_1 === tmp1_use)) {
tmp0_useBatcher.mj();
tmp0_useBatcher.tga_1 = tmp1_use;
}
var inductionVariable = 0;
var last = charSequenceLength(str) - 1 | 0;
var tmp;
if (inductionVariable <= last) {
$l$loop: do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var c1 = Char__toInt_impl_vasixd(charSequenceGet(str, n));
if (c1 === 10) {
dx = 0.0;
dy = dy + _this__u8e3s4.z8l_1;
continue $l$loop;
}
var tmp$ret$2;
// Inline function 'kotlin.text.getOrElse' call
var tmp0_getOrElse = n + 1 | 0;
var tmp_0;
if (tmp0_getOrElse >= 0 ? tmp0_getOrElse <= get_lastIndex(str) : false) {
tmp_0 = charSequenceGet(str, tmp0_getOrElse);
} else {
var tmp$ret$1;
// Inline function 'com.soywiz.korge.bitmapfont.drawText.<anonymous>.<anonymous>' call
tmp$ret$1 = _Char___init__impl__6a9atx(32);
tmp_0 = tmp$ret$1;
}
tmp$ret$2 = tmp_0;
var c2 = Char__toInt_impl_vasixd(tmp$ret$2);
var glyph = _this__u8e3s4.m(c1);
var tex = glyph.t8l_1;
var tmp1_tex = ctx.tgc(tex);
var tmp2_x = dx + glyph.u8l_1;
var tmp3_y = dy + glyph.v8l_1;
var tmp4_width = tex.d72();
var tmp5_height = tex.e72();
var tmp6_premultiplied = tex.x8b().s7y_1;
tmp1_use.ugc(tmp1_tex, tmp2_x, tmp3_y, tmp4_width, tmp5_height, m2, filtering, colMul, colAdd, blendMode, null, tmp6_premultiplied, false, 1024, null);
var tmp7_safe_receiver = _this__u8e3s4.d8m_1.m(Companion_getInstance_11().q8l(c1, c2));
var tmp8_elvis_lhs = tmp7_safe_receiver == null ? null : tmp7_safe_receiver.o8m_1;
var kerningOffset = tmp8_elvis_lhs == null ? 0 : tmp8_elvis_lhs;
dx = dx + (glyph.w8l_1 + kerningOffset | 0);
}
while (inductionVariable <= last);
tmp = Unit_getInstance();
}
tmp$ret$3 = tmp;
tmp$ret$4 = tmp$ret$3;
}
function Companion() {
Companion_instance = this;
}
Companion.$metadata$ = objectMeta('Companion', [ComponentType]);
var Companion_instance;
function Companion_getInstance_31() {
if (Companion_instance == null)
new Companion();
return Companion_instance;
}
function UpdateComponentWithViews() {
}
UpdateComponentWithViews.$metadata$ = interfaceMeta('UpdateComponentWithViews', [TypedComponent]);
function removeFromView(_this__u8e3s4) {
_this__u8e3s4.x2c();
}
function Companion_0() {
Companion_instance_0 = this;
}
Companion_0.$metadata$ = objectMeta('Companion', [ComponentType]);
var Companion_instance_0;
function Companion_getInstance_32() {
if (Companion_instance_0 == null)
new Companion_0();
return Companion_instance_0;
}
function Companion_1() {
Companion_instance_1 = this;
}
Companion_1.$metadata$ = objectMeta('Companion', [ComponentType]);
var Companion_instance_1;
function Companion_getInstance_33() {
if (Companion_instance_1 == null)
new Companion_1();
return Companion_instance_1;
}
function Companion_2() {
Companion_instance_2 = this;
}
Companion_2.$metadata$ = objectMeta('Companion', [ComponentType]);
var Companion_instance_2;
function Companion_getInstance_34() {
if (Companion_instance_2 == null)
new Companion_2();
return Companion_instance_2;
}
function KeyComponent() {
}
KeyComponent.$metadata$ = interfaceMeta('KeyComponent', [TypedComponent]);
function detach(_this__u8e3s4) {
_this__u8e3s4.n2u().mg8(_this__u8e3s4);
return _this__u8e3s4;
}
function Companion_3() {
Companion_instance_3 = this;
}
Companion_3.$metadata$ = objectMeta('Companion', [ComponentType]);
var Companion_instance_3;
function Companion_getInstance_35() {
if (Companion_instance_3 == null)
new Companion_3();
return Companion_instance_3;
}
function MouseComponent() {
}
MouseComponent.$metadata$ = interfaceMeta('MouseComponent', [TypedComponent]);
function attach(_this__u8e3s4) {
_this__u8e3s4.n2u().lg8(_this__u8e3s4);
return _this__u8e3s4;
}
function Component() {
}
Component.$metadata$ = interfaceMeta('Component', [CloseableCancellable]);
function ComponentType() {
}
ComponentType.$metadata$ = interfaceMeta('ComponentType');
function Companion_4() {
Companion_instance_4 = this;
}
Companion_4.$metadata$ = objectMeta('Companion', [ComponentType]);
var Companion_instance_4;
function Companion_getInstance_36() {
if (Companion_instance_4 == null)
new Companion_4();
return Companion_instance_4;
}
function UpdateComponent() {
}
UpdateComponent.$metadata$ = interfaceMeta('UpdateComponent', [TypedComponent]);
function Companion_5() {
Companion_instance_5 = this;
}
Companion_5.$metadata$ = objectMeta('Companion', [ComponentType]);
var Companion_instance_5;
function Companion_getInstance_37() {
if (Companion_instance_5 == null)
new Companion_5();
return Companion_instance_5;
}
function TouchComponent() {
}
TouchComponent.$metadata$ = interfaceMeta('TouchComponent', [TypedComponent]);
function ResizeComponent$Companion$invoke$1($view, $block) {
this.agd_1 = $block;
this.zgc_1 = $view;
}
ResizeComponent$Companion$invoke$1.prototype.n2u = function () {
return this.zgc_1;
};
ResizeComponent$Companion$invoke$1.prototype.bgd = function (views, width, height) {
this.agd_1(views, width, height);
};
ResizeComponent$Companion$invoke$1.$metadata$ = classMeta(undefined, [ResizeComponent]);
function Companion_6() {
Companion_instance_6 = this;
}
Companion_6.prototype.cgd = function (view, block) {
return new ResizeComponent$Companion$invoke$1(view, block);
};
Companion_6.$metadata$ = objectMeta('Companion', [ComponentType]);
var Companion_instance_6;
function Companion_getInstance_38() {
if (Companion_instance_6 == null)
new Companion_6();
return Companion_instance_6;
}
function ResizeComponent() {
}
ResizeComponent.$metadata$ = interfaceMeta('ResizeComponent', [TypedComponent]);
function Companion_7() {
Companion_instance_7 = this;
}
Companion_7.$metadata$ = objectMeta('Companion', [ComponentType]);
var Companion_instance_7;
function Companion_getInstance_39() {
if (Companion_instance_7 == null)
new Companion_7();
return Companion_instance_7;
}
function EventComponent() {
}
EventComponent.$metadata$ = interfaceMeta('EventComponent', [TypedComponent]);
function TypedComponent() {
}
TypedComponent.$metadata$ = interfaceMeta('TypedComponent', [Component]);
function cancellable_0(_this__u8e3s4) {
return CloseableCancellable_0(cancellable$lambda(_this__u8e3s4));
}
function onStageResized(_this__u8e3s4, firstTrigger, block) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.component.onStageResized.<anonymous>' call
if (firstTrigger) {
_this__u8e3s4.ng8(onStageResized$lambda(block));
}
_this__u8e3s4.lg8(Companion_getInstance_38().cgd(_this__u8e3s4, block));
tmp$ret$0 = _this__u8e3s4;
return tmp$ret$0;
}
function onStageResized$default(_this__u8e3s4, firstTrigger, block, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
firstTrigger = true;
return onStageResized(_this__u8e3s4, firstTrigger, block);
}
function cancellable$lambda($this_cancellable) {
return function (it) {
detach($this_cancellable);
return Unit_getInstance();
};
}
function onStageResized$lambda($block) {
return function (views) {
$block(views, views.egd(), views.fgd());
return Unit_getInstance();
};
}
function decorateOutOverAlpha(_this__u8e3s4, alpha) {
return decorateOutOver(_this__u8e3s4, decorateOutOverAlpha$lambda(alpha));
}
function decorateOutOver(_this__u8e3s4, onEvent) {
var view = _this__u8e3s4;
onEvent(view, false);
var tmp$ret$2;
// Inline function 'com.soywiz.korge.input.mouse' call
var tmp$ret$1;
// Inline function 'kotlin.run' call
var tmp0_run = get_mouse(_this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korge.component.decorateOutOver.<anonymous>' call
tmp0_run.lgd_1.j54(decorateOutOver$lambda(onEvent, view));
tmp0_run.mgd_1.j54(decorateOutOver$lambda_0(onEvent, view));
tmp$ret$0 = tmp0_run.rgd_1.j54(decorateOutOver$lambda_1(onEvent, view));
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
return _this__u8e3s4;
}
function decorateOutOverAlpha$lambda($alpha) {
return function (view, over) {
view.egh($alpha(over));
return Unit_getInstance();
};
}
function decorateOutOver$lambda($onEvent, $view) {
return function (it) {
$onEvent($view, true);
return Unit_getInstance();
};
}
function decorateOutOver$lambda_0($onEvent, $view) {
return function (it) {
if (it.fgh().ggh() === 0)
$onEvent($view, false);
return Unit_getInstance();
};
}
function decorateOutOver$lambda_1($onEvent, $view) {
return function (it) {
$onEvent($view, false);
return Unit_getInstance();
};
}
function onNewAttachDetach(_this__u8e3s4, views, onAttach, onDetach) {
var view = _this__u8e3s4;
var closeable = new CancellableGroup();
if (!(views == null)) {
registerStageComponent(views);
} else {
closeable.igh(view.lg8(new onNewAttachDetach$3(_this__u8e3s4)));
}
closeable.igh(view.lg8(new onNewAttachDetach$4(view, onAttach, onDetach)));
return closeable;
}
function onNewAttachDetach$default(_this__u8e3s4, views, onAttach, onDetach, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
views = null;
if (!(($mask0 & 2) === 0)) {
onAttach = onNewAttachDetach$lambda;
}
if (!(($mask0 & 4) === 0)) {
onDetach = onNewAttachDetach$lambda_0;
}
return onNewAttachDetach(_this__u8e3s4, views, onAttach, onDetach);
}
function registerStageComponent(_this__u8e3s4) {
var EXTRA_ID = 'Views.registerStageComponent';
if (equals(getExtra(_this__u8e3s4.ofw_1, EXTRA_ID), true))
return Unit_getInstance();
setExtra(_this__u8e3s4.ofw_1, EXTRA_ID, true);
var componentsInStagePrev = FastArrayList_init_$Create$();
var tmp$ret$0;
// Inline function 'kotlin.collections.linkedSetOf' call
tmp$ret$0 = LinkedHashSet_init_$Create$();
var componentsInStageCur = tmp$ret$0;
var tmp$ret$1;
// Inline function 'kotlin.collections.linkedSetOf' call
tmp$ret$1 = LinkedHashSet_init_$Create$();
var componentsInStage = tmp$ret$1;
var tempViews = FastArrayList_init_$Create$();
_this__u8e3s4.yfx_1.j54(registerStageComponent$lambda(componentsInStagePrev, componentsInStageCur, _this__u8e3s4, tempViews, componentsInStage));
}
function Companion_8() {
Companion_instance_8 = this;
}
Companion_8.$metadata$ = objectMeta('Companion', [ComponentType]);
var Companion_instance_8;
function Companion_getInstance_40() {
if (Companion_instance_8 == null)
new Companion_8();
return Companion_instance_8;
}
function StageComponent() {
}
StageComponent.$metadata$ = interfaceMeta('StageComponent', [TypedComponent]);
function onNewAttachDetach$lambda($this$null, it) {
return Unit_getInstance();
}
function onNewAttachDetach$lambda_0($this$null, it) {
return Unit_getInstance();
}
function onNewAttachDetach$3($this_onNewAttachDetach) {
this.lgh_1 = $this_onNewAttachDetach;
}
onNewAttachDetach$3.prototype.n2u = function () {
return this.lgh_1;
};
onNewAttachDetach$3.prototype.cg8 = function (views, dt) {
removeFromView(this);
registerStageComponent(views);
};
onNewAttachDetach$3.$metadata$ = classMeta(undefined, [UpdateComponentWithViews]);
function onNewAttachDetach$4($view, $onAttach, $onDetach) {
this.mgh_1 = $view;
this.ngh_1 = $onAttach;
this.ogh_1 = $onDetach;
}
onNewAttachDetach$4.prototype.n2u = function () {
return this.mgh_1;
};
onNewAttachDetach$4.prototype.jgh = function (views) {
this.ngh_1(views, this.mgh_1);
};
onNewAttachDetach$4.prototype.kgh = function (views) {
this.ogh_1(views, this.mgh_1);
};
onNewAttachDetach$4.$metadata$ = classMeta(undefined, [StageComponent]);
function registerStageComponent$lambda($componentsInStagePrev, $componentsInStageCur, $this_registerStageComponent, $tempViews, $componentsInStage) {
return function (it) {
$componentsInStagePrev.x7();
addAll($componentsInStagePrev, $componentsInStageCur);
$componentsInStageCur.x7();
var stagedViews = getAllDescendantViews$default($this_registerStageComponent.lfx_1, $tempViews, false, 4, null);
var array = stagedViews.b4r_1;
var n = 0;
while (n < array.length) {
// Inline function 'com.soywiz.korge.component.registerStageComponent.<anonymous>.<anonymous>' call
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp0_unsafeCast = array[tmp0];
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_unsafeCast;
tmp$ret$1 = tmp$ret$0;
var tmp0__anonymous__q1qw7t = tmp$ret$1;
var tmp0_safe_receiver = tmp0__anonymous__q1qw7t.gg8(Companion_getInstance_40());
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.kds.FastArrayList.fastForEach' call
var array_0 = tmp0_safe_receiver.b4r_1;
var n_0 = 0;
while (n_0 < array_0.length) {
// Inline function 'com.soywiz.korge.component.registerStageComponent.<anonymous>.<anonymous>.<anonymous>' call
var tmp$ret$3;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0_0 = n_0;
n_0 = tmp0_0 + 1 | 0;
var tmp0_unsafeCast_0 = array_0[tmp0_0];
var tmp$ret$2;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$2 = tmp0_unsafeCast_0;
tmp$ret$3 = tmp$ret$2;
var tmp0__anonymous__q1qw7t_0 = tmp$ret$3;
// Inline function 'kotlin.collections.plusAssign' call
$componentsInStageCur.c(tmp0__anonymous__q1qw7t_0);
if (!$componentsInStage.r(tmp0__anonymous__q1qw7t_0)) {
// Inline function 'kotlin.collections.plusAssign' call
$componentsInStage.c(tmp0__anonymous__q1qw7t_0);
tmp0__anonymous__q1qw7t_0.jgh($this_registerStageComponent.ofw_1);
}
}
}
}
var array_1 = $componentsInStagePrev.b4r_1;
var n_1 = 0;
while (n_1 < array_1.length) {
// Inline function 'com.soywiz.korge.component.registerStageComponent.<anonymous>.<anonymous>' call
var tmp$ret$5;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0_1 = n_1;
n_1 = tmp0_1 + 1 | 0;
var tmp0_unsafeCast_1 = array_1[tmp0_1];
var tmp$ret$4;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$4 = tmp0_unsafeCast_1;
tmp$ret$5 = tmp$ret$4;
var tmp1__anonymous__uwfjfc = tmp$ret$5;
if (!$componentsInStageCur.r(tmp1__anonymous__uwfjfc)) {
tmp1__anonymous__uwfjfc.kgh($this_registerStageComponent.ofw_1);
}
}
return Unit_getInstance();
};
}
function KorgeDebugNode() {
}
KorgeDebugNode.$metadata$ = interfaceMeta('KorgeDebugNode');
function ObservableProperty(name, internalSet, internalGet) {
this.pgh_1 = name;
this.qgh_1 = internalSet;
this.rgh_1 = internalGet;
var tmp = this;
tmp.sgh_1 = Signal_init_$Create$(null, 1, null);
}
ObservableProperty.prototype.tgh = function (value) {
this.qgh_1(value);
this.sgh_1.k54(value);
};
ObservableProperty.prototype.r5f = function (value) {
if (!equals(this.l1(), value)) {
this.tgh(value);
}
};
ObservableProperty.prototype.l1 = function () {
return this.rgh_1();
};
ObservableProperty.prototype.toString = function () {
return 'ObservableProperty(' + this.pgh_1 + ', ' + this.l1() + ')';
};
ObservableProperty.$metadata$ = classMeta('ObservableProperty');
function ObservablePropertyHolder() {
}
ObservablePropertyHolder.$metadata$ = interfaceMeta('ObservablePropertyHolder');
function uiEditableValue(_this__u8e3s4, prop, min, max, clamp, clampMin, clampMax, decimalPlaces, name) {
var tmp = uiEditableValue$lambda(prop);
var obs = new ObservableProperty(name, tmp, uiEditableValue$lambda_0(prop));
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp0_also = new UiRowEditableValue(_this__u8e3s4.hck_1, name, new UiNumberEditableValue(_this__u8e3s4.hck_1, obs, min, max, clampMin, clampMax, decimalPlaces));
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.debug.uiEditableValue.<anonymous>' call
_this__u8e3s4.hcl(tmp0_also);
tmp$ret$0 = tmp0_also;
return tmp$ret$0;
}
function uiEditableValue$default(_this__u8e3s4, prop, min, max, clamp, clampMin, clampMax, decimalPlaces, name, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
min = -1.0;
if (!(($mask0 & 4) === 0))
max = 1.0;
if (!(($mask0 & 8) === 0))
clamp = false;
if (!(($mask0 & 16) === 0))
clampMin = clamp;
if (!(($mask0 & 32) === 0))
clampMax = clamp;
if (!(($mask0 & 64) === 0))
decimalPlaces = 2;
if (!(($mask0 & 128) === 0))
name = prop.callableName;
return uiEditableValue(_this__u8e3s4, prop, min, max, clamp, clampMin, clampMax, decimalPlaces, name);
}
function uiEditableValue$lambda($prop) {
return function (it) {
$prop.set(it);
return Unit_getInstance();
};
}
function uiEditableValue$lambda_0($prop) {
return function () {
return $prop.get();
};
}
function createIcon($this, angle) {
var tmp$ret$1;
// Inline function 'com.soywiz.korim.bitmap.context2d' call
var tmp0_context2d = NativeImage$default($this.ugh_1, $this.ugh_1, null, 4, null);
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.korim.bitmap.Bitmap.lock' call
{
tmp0_context2d.j7z();
}
try {
// Inline function 'com.soywiz.korim.bitmap.context2d.<anonymous>' call
var ctx = tmp0_context2d.b86(true);
try {
// Inline function 'com.soywiz.korge.debug.Companion.createIcon.<anonymous>' call
var s = Companion_getInstance_41().ugh_1;
// Inline function 'com.soywiz.korim.vector.Context2d.fill' call
var tmp0_fill = Colors_getInstance().p81_1;
{
ctx.h8r();
}
// Inline function 'com.soywiz.korge.debug.Companion.createIcon.<anonymous>.<anonymous>' call
if (equals(angle, get_degrees(0))) {
ctx.o8w(s * 0.5, s * 0.25);
} else {
ctx.o8w(s * 0.25, s * 0.5);
}
var tmp = Companion_getInstance_41().ugh_1;
ctx.j8o(tmp, 0.0, 2, null);
ctx.ja4(angle);
ctx.r7e(-0.5, 0.0);
ctx.u7e(0.5, 0.0);
ctx.u7e(0.0, 0.5);
ctx.x2c();
ctx.oa4(new RGBA(tmp0_fill), null);
}finally {
ctx.s1x();
}
}finally {
tmp$ret$0 = tmp0_context2d.k7z(null);
break $l$block;
}
}
tmp$ret$1 = tmp0_context2d;
return tmp$ret$1;
}
function Companion_9() {
Companion_instance_9 = this;
this.ugh_1 = 16;
this.vgh_1 = createIcon(this, get_degrees(0));
this.wgh_1 = createIcon(this, get_degrees(-90));
}
Companion_9.prototype.xgh = function (app, name, block) {
var tmp$ret$1;
// Inline function 'kotlin.also' call
var tmp$ret$0;
// Inline function 'kotlin.collections.listOf' call
tmp$ret$0 = emptyList();
var tmp0_also = new UiCollapsibleSection(app, name, tmp$ret$0);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.debug.Companion.invoke.<anonymous>' call
block(_get_mycontainer__4zobmk(tmp0_also));
tmp$ret$1 = tmp0_also;
return tmp$ret$1;
};
Companion_9.prototype.ygh = function () {
return this.ugh_1;
};
Companion_9.prototype.zgh = function () {
return this.vgh_1;
};
Companion_9.prototype.agi = function () {
return this.wgh_1;
};
Companion_9.$metadata$ = objectMeta('Companion');
var Companion_instance_9;
function Companion_getInstance_41() {
if (Companion_instance_9 == null)
new Companion_9();
return Companion_instance_9;
}
function _get_mycontainer__4zobmk($this) {
var tmp = $this.ogi_1;
if (!(tmp == null))
return tmp;
else {
throwUninitializedPropertyAccessException('mycontainer');
}
}
function UiCollapsibleSection$lambda($tmp2_also) {
return function (it) {
null($tmp2_also, it);
return Unit_getInstance();
};
}
function UiCollapsibleSection$lambda_0(this$0, $tmp3_also) {
return function (it) {
_get_mycontainer__4zobmk(this$0).tch(!_get_mycontainer__4zobmk(this$0).pck());
var tmp0_safe_receiver = _get_mycontainer__4zobmk(this$0).a5k();
if (tmp0_safe_receiver == null)
null;
else {
tmp0_safe_receiver.icl();
}
$tmp3_also.rch(_get_mycontainer__4zobmk(this$0).pck() ? Companion_getInstance_41().vgh_1 : Companion_getInstance_41().wgh_1);
return Unit_getInstance();
};
}
function UiCollapsibleSection(app, name, componentChildren) {
Companion_getInstance_41();
UiContainer_init_$Init$(app, null, 2, null, this);
this.mgi_1 = name;
this.ngi_1 = componentChildren;
var tmp$ret$4;
// Inline function 'com.soywiz.korui.button' call
var tmp0_elvis_lhs = this.mgi_1;
var tmp0_button = tmp0_elvis_lhs == null ? 'Unknown' : tmp0_elvis_lhs;
var tmp$ret$3;
// Inline function 'kotlin.also' call
var tmp$ret$2;
// Inline function 'kotlin.also' call
var tmp$ret$1;
// Inline function 'kotlin.also' call
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp0_also = UiButton_init_$Create$(this.hck_1, null, 2, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korui.button.<anonymous>' call
tmp0_also.gck(tmp0_button);
tmp$ret$0 = tmp0_also;
var tmp1_also = tmp$ret$0;
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korui.button.<anonymous>' call
tmp1_also.ock(this);
tmp$ret$1 = tmp1_also;
var tmp2_also = tmp$ret$1;
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korui.button.<anonymous>' call
if (!(null == null)) {
tmp2_also.tck(UiCollapsibleSection$lambda(tmp2_also));
}
tmp$ret$2 = tmp2_also;
var tmp3_also = tmp$ret$2;
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.debug.UiCollapsibleSection.<anonymous>' call
tmp3_also.rch(Companion_getInstance_41().vgh_1);
tmp3_also.tck(UiCollapsibleSection$lambda_0(this, tmp3_also));
tmp$ret$3 = tmp3_also;
tmp$ret$4 = tmp$ret$3;
var tmp = this;
var tmp$ret$8;
// Inline function 'com.soywiz.korui.container' call
var tmp$ret$7;
// Inline function 'kotlin.also' call
var tmp$ret$6;
// Inline function 'kotlin.also' call
var tmp$ret$5;
// Inline function 'kotlin.also' call
var tmp0_also_0 = UiContainer_init_$Create$(this.hck_1, null, 2, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korui.container.<anonymous>' call
tmp0_also_0.ock(this);
tmp$ret$5 = tmp0_also_0;
var tmp1_also_0 = tmp$ret$5;
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korui.container.<anonymous>' call
tmp1_also_0.qck(this.v8b());
tmp$ret$6 = tmp1_also_0;
var tmp2_also_0 = tmp$ret$6;
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.debug.UiCollapsibleSection.<anonymous>' call
var tmp0_iterator = this.ngi_1.j();
while (tmp0_iterator.k()) {
var child = tmp0_iterator.l();
tmp2_also_0.hcl(child);
}
tmp$ret$7 = tmp2_also_0;
tmp$ret$8 = tmp$ret$7;
tmp.ogi_1 = tmp$ret$8;
}
UiCollapsibleSection.prototype.pgi = function () {
return this.ngi_1;
};
UiCollapsibleSection.$metadata$ = classMeta('UiCollapsibleSection', undefined, undefined, undefined, undefined, UiContainer.prototype);
function uiCollapsibleSection(_this__u8e3s4, name, block) {
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp0_also = Companion_getInstance_41().xgh(_this__u8e3s4.hck_1, name, block);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.debug.uiCollapsibleSection.<anonymous>' call
_this__u8e3s4.hcl(tmp0_also);
tmp$ret$0 = tmp0_also;
return tmp$ret$0;
}
function UiEditableValue(app, prop) {
UiContainer_init_$Init$(app, null, 2, null, this);
this.bgj_1 = prop;
}
UiEditableValue.prototype.cgj = function () {
return this.bgj_1;
};
UiEditableValue.prototype.dgj = function () {
var tmp0_safe_receiver = get_views(this.hck_1);
if (tmp0_safe_receiver == null)
null;
else {
tmp0_safe_receiver.egj(this.cgj());
}
};
UiEditableValue.prototype.fgj = function () {
this.dgj();
};
UiEditableValue.$metadata$ = classMeta('UiEditableValue', [ObservablePropertyHolder], undefined, undefined, undefined, UiContainer.prototype);
function Companion_10() {
Companion_instance_10 = this;
this.ggj_1 = 1000;
}
Companion_10.$metadata$ = objectMeta('Companion');
var Companion_instance_10;
function Companion_getInstance_42() {
if (Companion_instance_10 == null)
new Companion_10();
return Companion_instance_10;
}
function UiNumberEditableValue$evalContext$lambda() {
return null;
}
function UiNumberEditableValue$lambda(this$0) {
return function (it) {
var tmp;
if (!(this$0.cgk_1 === it)) {
this$0.dgk(it, false);
tmp = Unit_getInstance();
}
return Unit_getInstance();
};
}
function UiNumberEditableValue$hideEditor$slambda(this$0, resultContinuation) {
this.mgk_1 = this$0;
CoroutineImpl.call(this, resultContinuation);
}
UiNumberEditableValue$hideEditor$slambda.prototype.ogk = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
UiNumberEditableValue$hideEditor$slambda.prototype.to = function ($cont) {
return this.ogk($cont);
};
UiNumberEditableValue$hideEditor$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 3;
this.o7_1 = 1;
var tmp_0 = '{{ ' + this.mgk_1.bgk_1.u67() + ' }}';
suspendResult = Template$default(tmp_0, null, this, 2, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
this.ngk_1 = suspendResult;
this.o7_1 = 2;
var tmp_1 = this.mgk_1.ygj_1();
suspendResult = this.ngk_1.dfj(tmp_1, null, this, 2, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 2:
return suspendResult;
case 3:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 3) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
UiNumberEditableValue$hideEditor$slambda.prototype.k53 = function (completion) {
var i = new UiNumberEditableValue$hideEditor$slambda(this.mgk_1, completion);
return i;
};
UiNumberEditableValue$hideEditor$slambda.$metadata$ = classMeta('UiNumberEditableValue$hideEditor$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function UiNumberEditableValue$hideEditor$slambda_0(this$0, resultContinuation) {
var i = new UiNumberEditableValue$hideEditor$slambda(this$0, resultContinuation);
var l = function ($cont) {
return i.ogk($cont);
};
l.$arity = 0;
return l;
}
function UiNumberEditableValue$lambda_0(this$0) {
return function (it) {
this$0.pgk();
return Unit_getInstance();
};
}
function UiNumberEditableValue$lambda_1(this$0) {
return function (e) {
var tmp;
if (e.nc5() ? e.gc6_1.equals(Companion_getInstance_12().sca_1) : false) {
this$0.fgj();
tmp = Unit_getInstance();
}
return Unit_getInstance();
};
}
function UiNumberEditableValue$lambda_2(this$0) {
return function (e) {
var tmp;
if (e.tgk()) {
this$0.fgj();
tmp = Unit_getInstance();
}
return Unit_getInstance();
};
}
function UiNumberEditableValue$lambda_3($startX, $startY, $startValue, this$0, $app, $prop) {
return function (e) {
var tmp;
if (e.nc5()) {
$startX._v = e.lc4_1;
$startY._v = e.mc4_1;
$startValue._v = this$0.cgk_1;
tmp = e.ac5_1();
}
var tmp_0;
if (e.mc5()) {
var tmp0_safe_receiver = get_views($app);
if (tmp0_safe_receiver == null)
null;
else {
tmp0_safe_receiver.egj($prop);
}
tmp_0 = Unit_getInstance();
}
var tmp_1;
if (e.lc5()) {
var dx = e.lc4_1 - $startX._v | 0;
var dy = e.mc4_1 - $startY._v | 0;
var tmp$ret$0;
// Inline function 'kotlin.math.absoluteValue' call
tmp$ret$0 = Math.abs(dx);
var lenAbs = convertRange(tmp$ret$0, 0.0, Companion_getInstance_42().ggj_1, 0.0, this$0.ugj_1 - this$0.tgj_1);
var len = withSign(lenAbs, dx);
var tmp_2 = $startValue._v + len;
this$0.ugk(tmp_2, false, 2, null);
tmp_1 = Unit_getInstance();
}
return Unit_getInstance();
};
}
function UiNumberEditableValue(app, prop, min, max, clampMin, clampMax, decimalPlaces) {
Companion_getInstance_42();
UiEditableValue.call(this, app, prop);
this.tgj_1 = min;
this.ugj_1 = max;
this.vgj_1 = clampMin;
this.wgj_1 = clampMax;
this.xgj_1 = decimalPlaces;
var tmp = this;
tmp.ygj_1 = UiNumberEditableValue$evalContext$lambda;
this.zgj_1 = prop.l1();
prop.sgh_1.j54(UiNumberEditableValue$lambda(this));
var tmp_0 = this;
var tmp$ret$1;
// Inline function 'kotlin.also' call
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp0_also = UiLabel_init_$Create$(app, null, 2, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.debug.UiNumberEditableValue.contentText.<anonymous>' call
tmp0_also.gck('');
tmp$ret$0 = tmp0_also;
var tmp1_also = tmp$ret$0;
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.debug.UiNumberEditableValue.contentText.<anonymous>' call
tmp1_also.tch(true);
tmp$ret$1 = tmp1_also;
tmp_0.agk_1 = tmp$ret$1;
var tmp_1 = this;
var tmp$ret$3;
// Inline function 'kotlin.also' call
var tmp$ret$2;
// Inline function 'kotlin.also' call
var tmp0_also_0 = UiTextField_init_$Create$(app, null, 2, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.debug.UiNumberEditableValue.contentTextField.<anonymous>' call
tmp0_also_0.gck(this.agk_1.u67());
tmp$ret$2 = tmp0_also_0;
var tmp1_also_0 = tmp$ret$2;
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.debug.UiNumberEditableValue.contentTextField.<anonymous>' call
tmp1_also_0.tch(false);
tmp$ret$3 = tmp1_also_0;
tmp_1.bgk_1 = tmp$ret$3;
var tmp_2 = this;
DoubleCompanionObject_getInstance();
tmp_2.cgk_1 = NaN;
this.fcl_1 = UiFillLayout_getInstance();
this.tch(true);
this.agk_1.tck(UiNumberEditableValue$lambda_0(this));
this.bgk_1.bcn(UiNumberEditableValue$lambda_1(this));
this.bgk_1.jcl(UiNumberEditableValue$lambda_2(this));
var startX = {_v: 0};
var startY = {_v: 0};
var startValue = {_v: this.cgk_1};
this.agk_1.sck(UiNumberEditableValue$lambda_3(startX, startY, startValue, this, app, prop));
this.ugk(this.zgj_1, false, 2, null);
this.agk_1.rck(UiStandardCursor_RESIZE_EAST_getInstance());
this.hcl(this.agk_1);
this.hcl(this.bgk_1);
}
UiNumberEditableValue.prototype.vgk = function () {
return this.agk_1;
};
UiNumberEditableValue.prototype.wgk = function () {
return !this.agk_1.pck();
};
UiNumberEditableValue.prototype.fgj = function () {
if (!this.wgk())
return Unit_getInstance();
this.agk_1.tch(true);
this.bgk_1.tch(false);
var tmp$ret$0;
// Inline function 'kotlin.text.isNotEmpty' call
var tmp0_isNotEmpty = this.bgk_1.u67();
tmp$ret$0 = charSequenceLength(tmp0_isNotEmpty) > 0;
if (tmp$ret$0) {
var templateResult = runBlockingNoSuspensions(UiNumberEditableValue$hideEditor$slambda_0(this, null));
var tmp0_elvis_lhs = toDoubleOrNull(templateResult);
var tmp = tmp0_elvis_lhs == null ? 0.0 : tmp0_elvis_lhs;
this.ugk(tmp, false, 2, null);
}
UiEditableValue.prototype.fgj.call(this);
};
UiNumberEditableValue.prototype.pgk = function () {
if (this.wgk())
return Unit_getInstance();
this.bgk_1.gck(this.agk_1.u67());
this.agk_1.tch(false);
this.bgk_1.tch(true);
this.bgk_1.zcm(null, 1, null);
this.bgk_1.acn();
};
UiNumberEditableValue.prototype.dgk = function (value, setProperty) {
var rvalue = value;
if (this.vgj_1)
rvalue = coerceAtLeast(rvalue, this.tgj_1);
if (this.wgj_1)
rvalue = coerceAtMost(rvalue, this.ugj_1);
var tmp = rvalue;
var tmp_0 = this.xgj_1;
var valueStr = toStringDecimal$default(tmp, tmp_0, false, 2, null);
if (!(this.cgk_1 === rvalue)) {
this.cgk_1 = rvalue;
if (setProperty) {
this.cgj().r5f(rvalue);
}
this.agk_1.gck(valueStr);
if (!this.wgk()) {
this.bgk_1.gck(valueStr);
}
}
};
UiNumberEditableValue.prototype.ugk = function (value, setProperty, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
setProperty = true;
return this.dgk(value, setProperty);
};
UiNumberEditableValue.$metadata$ = classMeta('UiNumberEditableValue', [ObservablePropertyHolder], undefined, undefined, undefined, UiEditableValue.prototype);
function UiRowEditableValue$lambda(this$0) {
return function (it) {
var tmp;
var tmp_0 = this$0.jgl_1;
if (tmp_0 instanceof UiEditableValue) {
this$0.jgl_1.fgj();
tmp = Unit_getInstance();
}
return Unit_getInstance();
};
}
function UiRowEditableValue(app, labelText, editor) {
UiContainer_init_$Init$(app, null, 2, null, this);
this.igl_1 = labelText;
this.jgl_1 = editor;
var tmp = this;
tmp.kgl_1 = UiLabel_init_$Create$(app, null, 2, null);
var tmp_0 = this;
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = UiLabel_init_$Create$(app, null, 2, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.debug.UiRowEditableValue.label.<anonymous>' call
tmp0_apply.gck(this.igl_1);
set_preferredWidth(tmp0_apply, tmp0_apply.ncm(50));
tmp$ret$0 = tmp0_apply;
tmp_0.lgl_1 = tmp$ret$0;
this.fcl_1 = HorizontalUiLayout_getInstance();
preferredSize(this.kgl_1, this.vcn(16), this.vcn(32));
preferredSize(this.lgl_1, this.ncm(50).bco(this.vcn(16)), this.vcn(32));
preferredSize(this.jgl_1, this.ncm(50), this.vcn(32));
this.hcl(this.kgl_1);
this.hcl(this.lgl_1);
this.hcl(this.jgl_1);
this.lgl_1.tck(UiRowEditableValue$lambda(this));
}
UiRowEditableValue.prototype.mgl = function () {
return this.igl_1;
};
UiRowEditableValue.$metadata$ = classMeta('UiRowEditableValue', undefined, undefined, undefined, undefined, UiContainer.prototype);
var _DefaultFontsCatalog;
function InputKeys() {
this.ngl_1 = booleanArray(Companion_getInstance_12().rca_1);
this.ogl_1 = booleanArray(Companion_getInstance_12().rca_1);
this.pgl_1 = false;
this.qgl_1 = false;
this.rgl_1 = false;
this.sgl_1 = false;
}
InputKeys.prototype.tgl = function (key) {
return this.ugl(key);
};
InputKeys.prototype.ugl = function (key) {
return this.ngl_1[key.q2_1];
};
InputKeys.prototype.vgl = function (e) {
var tmp0_subject = e.ec6_1;
var tmp0 = tmp0_subject.q2_1;
switch (tmp0) {
case 0:
this.ngl_1[e.gc6_1.q2_1] = false;
;
break;
case 1:
this.ngl_1[e.gc6_1.q2_1] = true;
;
break;
default:
;
break;
}
this.pgl_1 = (e.jc6_1 ? true : this.tgl(Key_LEFT_SHIFT_getInstance())) ? true : this.tgl(Key_RIGHT_SHIFT_getInstance());
this.qgl_1 = (e.kc6_1 ? true : this.tgl(Key_LEFT_CONTROL_getInstance())) ? true : this.tgl(Key_RIGHT_CONTROL_getInstance());
this.rgl_1 = (e.lc6_1 ? true : this.tgl(Key_LEFT_ALT_getInstance())) ? true : this.tgl(Key_RIGHT_ALT_getInstance());
this.sgl_1 = e.mc6_1 ? true : this.tgl(Key_META_getInstance());
};
InputKeys.prototype.wgl = function (delta) {
};
InputKeys.prototype.xgl = function (delta) {
arraycopy(this.ngl_1, 0, this.ogl_1, 0, this.ngl_1.length);
};
InputKeys.$metadata$ = classMeta('InputKeys');
function Companion_11() {
Companion_instance_11 = this;
this.ygl_1 = 256;
}
Companion_11.$metadata$ = objectMeta('Companion');
var Companion_instance_11;
function Companion_getInstance_43() {
if (Companion_instance_11 == null)
new Companion_11();
return Companion_instance_11;
}
function endFrameOldKeys($this, delta) {
var inductionVariable = 0;
Companion_getInstance_43();
var last = 256;
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var prev = $this.dg0_1[n];
var curr = $this.cg0_1[n];
$this.ig0_1[n] = prev ? !curr : false;
$this.hg0_1[n] = !prev ? curr : false;
if (curr) {
var tmp1_array = $this.eg0_1;
var tmp2_index0 = n;
tmp1_array[tmp2_index0] = tmp1_array[tmp2_index0] + _TimeSpan___get_nanoseconds__impl__gaf49o(delta);
} else {
$this.eg0_1[n] = 0.0;
$this.fg0_1[n] = 0.0;
}
var triggerPress = false;
var tmp$ret$0;
// Inline function 'com.soywiz.klock.nanoseconds' call
var tmp0__get_nanoseconds__hup2jk = $this.eg0_1[n];
tmp$ret$0 = Companion_getInstance_1().b1i(tmp0__get_nanoseconds__hup2jk);
var pressingTime = tmp$ret$0;
if ($this.eg0_1[n] > 0.0) {
var tmp3_subject = _TimeSpan___get_milliseconds__impl__pb0we5(pressingTime);
var tmp;
if (0.0 <= tmp3_subject ? tmp3_subject <= 1.0 : false) {
var tmp$ret$1;
// Inline function 'com.soywiz.klock.milliseconds' call
tmp$ret$1 = Companion_getInstance_1().o1h(0.0);
tmp = tmp$ret$1;
} else if (1.0 <= tmp3_subject ? tmp3_subject <= 300.0 : false) {
var tmp$ret$2;
// Inline function 'com.soywiz.klock.milliseconds' call
tmp$ret$2 = Companion_getInstance_1().o1h(100.0);
tmp = tmp$ret$2;
} else if (300.0 <= tmp3_subject ? tmp3_subject <= 1000.0 : false) {
var tmp$ret$3;
// Inline function 'com.soywiz.klock.milliseconds' call
tmp$ret$3 = Companion_getInstance_1().o1h(50.0);
tmp = tmp$ret$3;
} else {
var tmp$ret$4;
// Inline function 'com.soywiz.klock.milliseconds' call
tmp$ret$4 = Companion_getInstance_1().o1h(20.0);
tmp = tmp$ret$4;
}
var timeBarrier = tmp;
var tmp$ret$5;
// Inline function 'com.soywiz.klock.nanoseconds' call
var tmp1__get_nanoseconds__vth17j = $this.fg0_1[n];
tmp$ret$5 = Companion_getInstance_1().b1i(tmp1__get_nanoseconds__vth17j);
var elapsedTime = TimeSpan__minus_impl_5w5v8s(pressingTime, tmp$ret$5);
if (TimeSpan__compareTo_impl_zidry4(elapsedTime, timeBarrier) >= 0) {
triggerPress = true;
}
}
if (triggerPress) {
$this.fg0_1[n] = $this.eg0_1[n];
}
$this.gg0_1[n] = triggerPress;
}
while (inductionVariable < last);
Companion_getInstance_43();
arraycopy($this.cg0_1, 0, $this.dg0_1, 0, 256);
}
function Input$_isTouchDeviceGen$lambda() {
return AGOpenglFactory_getInstance().dcp();
}
function Input() {
Companion_getInstance_43();
var tmp = this;
tmp.pfz_1 = Mixin_init_$Create$(null, 1, null);
this.qfz_1 = Companion_getInstance_13().rc9_1;
var tmp_0 = this;
tmp_0.rfz_1 = TouchEvent_init_$Create$(null, 0, null, false, false, 31, null);
var tmp_1 = this;
tmp_1.sfz_1 = Input$_isTouchDeviceGen$lambda;
var tmp_2 = this;
var tmp$ret$0;
// Inline function 'com.soywiz.klock.milliseconds' call
tmp$ret$0 = Companion_getInstance_1().o1h(400.0);
tmp_2.tfz_1 = tmp$ret$0;
this.ufz_1 = 20.0;
this.vfz_1 = new Point(-1000.0, -1000.0);
this.wfz_1 = new Point(-1000.0, -1000.0);
this.xfz_1 = 0;
this.yfz_1 = false;
this.zfz_1 = true;
this.ag0_1 = false;
this.bg0_1 = new InputKeys();
var tmp_3 = this;
Companion_getInstance_43();
tmp_3.cg0_1 = booleanArray(256);
var tmp_4 = this;
Companion_getInstance_43();
tmp_4.dg0_1 = booleanArray(256);
var tmp_5 = this;
Companion_getInstance_43();
tmp_5.eg0_1 = new Float64Array(256);
var tmp_6 = this;
Companion_getInstance_43();
tmp_6.fg0_1 = new Float64Array(256);
var tmp_7 = this;
Companion_getInstance_43();
tmp_7.gg0_1 = booleanArray(256);
var tmp_8 = this;
Companion_getInstance_43();
tmp_8.hg0_1 = booleanArray(256);
var tmp_9 = this;
Companion_getInstance_43();
tmp_9.ig0_1 = booleanArray(256);
var tmp_10 = this;
var tmp$ret$4;
// Inline function 'kotlin.collections.toTypedArray' call
var tmp$ret$3;
// Inline function 'kotlin.collections.map' call
var tmp0_map = until(0, 8);
var tmp$ret$2;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map, 10));
var inductionVariable = tmp0_map.r1_1;
var last = tmp0_map.s1_1;
if (inductionVariable <= last)
do {
var item = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$1;
// Inline function 'com.soywiz.korge.input.Input.gamepads.<anonymous>' call
tmp$ret$1 = GamepadInfo_init_$Create$(item, false, null, null, null, 0, null, 0, 0, 0.0, null, 0, null, 8190, null);
tmp0_mapTo.c(tmp$ret$1);
}
while (!(item === last));
tmp$ret$2 = tmp0_mapTo;
tmp$ret$3 = tmp$ret$2;
var tmp1_toTypedArray = tmp$ret$3;
tmp$ret$4 = copyToArray(tmp1_toTypedArray);
tmp_10.jg0_1 = tmp$ret$4;
var tmp_11 = this;
var tmp$ret$5;
// Inline function 'kotlin.collections.arrayListOf' call
tmp$ret$5 = ArrayList_init_$Create$_0();
tmp_11.kg0_1 = tmp$ret$5;
}
Input.prototype.e4v = function (_set____db54di) {
this.pfz_1.e4v(_set____db54di);
};
Input.prototype.f4v = function () {
return this.pfz_1.f4v();
};
Input.prototype.uc8 = function () {
return this.rfz_1.uc8();
};
Input.prototype.ggh = function () {
return this.uc8().i();
};
Input.prototype.fg4 = function (touchEvent) {
this.rfz_1.nc9(touchEvent);
};
Input.prototype.og0 = function () {
return this.vfz_1;
};
Input.prototype.mg0 = function (x, y, down) {
var point = down ? this.wfz_1 : this.vfz_1;
point.a73(x, y);
};
Input.prototype.lg0 = function (button, down) {
this.xfz_1 = setBits(this.xfz_1, button.kcc_1, down);
};
Input.prototype.zgl = function () {
return this.jg0_1;
};
Input.prototype.agm = function () {
return this.kg0_1;
};
Input.prototype.pg0 = function () {
this.kg0_1.x7();
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = this.jg0_1;
var n = 0;
while (n < tmp0_fastForEach.length) {
// Inline function 'com.soywiz.korge.input.Input.updateConnectedGamepads.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach[tmp0];
if (tmp1__anonymous__uwfjfc.gc7_1) {
var tmp0_this = this;
// Inline function 'kotlin.collections.plusAssign' call
var tmp0_plusAssign = tmp0_this.kg0_1;
tmp0_plusAssign.c(tmp1__anonymous__uwfjfc);
}
}
};
Input.prototype.bgm = function (keyCode, b) {
var pKeyCode = keyCode & 255;
if (0 <= pKeyCode ? pKeyCode <= (this.cg0_1.length - 1 | 0) : false) {
this.cg0_1[pKeyCode] = b;
}
};
Input.prototype.wgl = function (delta) {
var tmp0_safe_receiver = this.f4v();
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.kds.clear' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_safe_receiver;
tmp$ret$0.clear();
}
this.bg0_1.wgl(delta);
};
Input.prototype.xgl = function (delta) {
this.ag0_1 = false;
this.bg0_1.xgl(delta);
endFrameOldKeys(this, delta);
};
Input.prototype.cgm = function (e) {
var tmp0_subject = e.ec6_1;
var tmp0 = tmp0_subject.q2_1;
switch (tmp0) {
case 1:
this.bgm(e.hc6_1, true);
;
break;
case 0:
this.bgm(e.hc6_1, false);
;
break;
case 2:
break;
}
};
Input.$metadata$ = classMeta('Input', [Extra]);
function get_keys_0(_this__u8e3s4) {
init_properties_KeysEvents_kt_pg3k37();
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.kds.PropertyThis.getValue' call
var tmp0_getValue = keys$factory();
var tmp0_elvis_lhs = keys$delegate.k4v_1;
var res = getExtraTyped(_this__u8e3s4, tmp0_elvis_lhs == null ? tmp0_getValue.callableName : tmp0_elvis_lhs);
if (res == null) {
var r = keys$delegate.l4v_1(_this__u8e3s4);
// Inline function 'com.soywiz.kds.PropertyThis.setValueUntransformed' call
var tmp0_elvis_lhs_0 = keys$delegate.k4v_1;
setExtra(_this__u8e3s4, tmp0_elvis_lhs_0 == null ? tmp0_getValue.callableName : tmp0_elvis_lhs_0, r);
tmp$ret$0 = r;
break $l$block;
}
tmp$ret$0 = res;
}
return tmp$ret$0;
}
var keys$delegate;
function KeysEvents$down$slambda($callback, resultContinuation) {
this.lgm_1 = $callback;
CoroutineImpl.call(this, resultContinuation);
}
KeysEvents$down$slambda.prototype.ngm = function (e, $cont) {
var tmp = this.ogm(e, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
KeysEvents$down$slambda.prototype.w7 = function (p1, $cont) {
return this.ngm(p1 instanceof KeyEvent ? p1 : THROW_CCE(), $cont);
};
KeysEvents$down$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.lgm_1(this.mgm_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
KeysEvents$down$slambda.prototype.ogm = function (e, completion) {
var i = new KeysEvents$down$slambda(this.lgm_1, completion);
i.mgm_1 = e;
return i;
};
KeysEvents$down$slambda.$metadata$ = classMeta('KeysEvents$down$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
function KeysEvents$down$slambda_0($callback, resultContinuation) {
var i = new KeysEvents$down$slambda($callback, resultContinuation);
var l = function (e, $cont) {
return i.ngm(e, $cont);
};
l.$arity = 1;
return l;
}
function KeysEvents$up$slambda($callback, resultContinuation) {
this.xgm_1 = $callback;
CoroutineImpl.call(this, resultContinuation);
}
KeysEvents$up$slambda.prototype.ngm = function (e, $cont) {
var tmp = this.ogm(e, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
KeysEvents$up$slambda.prototype.w7 = function (p1, $cont) {
return this.ngm(p1 instanceof KeyEvent ? p1 : THROW_CCE(), $cont);
};
KeysEvents$up$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.xgm_1(this.ygm_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
KeysEvents$up$slambda.prototype.ogm = function (e, completion) {
var i = new KeysEvents$up$slambda(this.xgm_1, completion);
i.ygm_1 = e;
return i;
};
KeysEvents$up$slambda.$metadata$ = classMeta('KeysEvents$up$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
function KeysEvents$up$slambda_0($callback, resultContinuation) {
var i = new KeysEvents$up$slambda($callback, resultContinuation);
var l = function (e, $cont) {
return i.ngm(e, $cont);
};
l.$arity = 1;
return l;
}
function KeysEvents$typed$slambda($callback, resultContinuation) {
this.hgn_1 = $callback;
CoroutineImpl.call(this, resultContinuation);
}
KeysEvents$typed$slambda.prototype.ngm = function (e, $cont) {
var tmp = this.ogm(e, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
KeysEvents$typed$slambda.prototype.w7 = function (p1, $cont) {
return this.ngm(p1 instanceof KeyEvent ? p1 : THROW_CCE(), $cont);
};
KeysEvents$typed$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.hgn_1(this.ign_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
KeysEvents$typed$slambda.prototype.ogm = function (e, completion) {
var i = new KeysEvents$typed$slambda(this.hgn_1, completion);
i.ign_1 = e;
return i;
};
KeysEvents$typed$slambda.$metadata$ = classMeta('KeysEvents$typed$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
function KeysEvents$typed$slambda_0($callback, resultContinuation) {
var i = new KeysEvents$typed$slambda($callback, resultContinuation);
var l = function (e, $cont) {
return i.ngm(e, $cont);
};
l.$arity = 1;
return l;
}
function KeysEvents$onKeyEvent$slambda(this$0, $event, resultContinuation) {
this.rgn_1 = this$0;
this.sgn_1 = $event;
CoroutineImpl.call(this, resultContinuation);
}
KeysEvents$onKeyEvent$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
KeysEvents$onKeyEvent$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
KeysEvents$onKeyEvent$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.rgn_1.xgn_1.s55(this.sgn_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
KeysEvents$onKeyEvent$slambda.prototype.k53 = function (completion) {
var i = new KeysEvents$onKeyEvent$slambda(this.rgn_1, this.sgn_1, completion);
return i;
};
KeysEvents$onKeyEvent$slambda.$metadata$ = classMeta('KeysEvents$onKeyEvent$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function KeysEvents$onKeyEvent$slambda_0(this$0, $event, resultContinuation) {
var i = new KeysEvents$onKeyEvent$slambda(this$0, $event, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function KeysEvents$onKeyEvent$slambda_1(this$0, $event, resultContinuation) {
this.ggo_1 = this$0;
this.hgo_1 = $event;
CoroutineImpl.call(this, resultContinuation);
}
KeysEvents$onKeyEvent$slambda_1.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
KeysEvents$onKeyEvent$slambda_1.prototype.to = function ($cont) {
return this.z56($cont);
};
KeysEvents$onKeyEvent$slambda_1.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.ggo_1.vgn_1.s55(this.hgo_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
KeysEvents$onKeyEvent$slambda_1.prototype.k53 = function (completion) {
var i = new KeysEvents$onKeyEvent$slambda_1(this.ggo_1, this.hgo_1, completion);
return i;
};
KeysEvents$onKeyEvent$slambda_1.$metadata$ = classMeta('KeysEvents$onKeyEvent$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function KeysEvents$onKeyEvent$slambda_2(this$0, $event, resultContinuation) {
var i = new KeysEvents$onKeyEvent$slambda_1(this$0, $event, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function KeysEvents$onKeyEvent$slambda_3(this$0, $event, resultContinuation) {
this.qgo_1 = this$0;
this.rgo_1 = $event;
CoroutineImpl.call(this, resultContinuation);
}
KeysEvents$onKeyEvent$slambda_3.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
KeysEvents$onKeyEvent$slambda_3.prototype.to = function ($cont) {
return this.z56($cont);
};
KeysEvents$onKeyEvent$slambda_3.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.qgo_1.wgn_1.s55(this.rgo_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
KeysEvents$onKeyEvent$slambda_3.prototype.k53 = function (completion) {
var i = new KeysEvents$onKeyEvent$slambda_3(this.qgo_1, this.rgo_1, completion);
return i;
};
KeysEvents$onKeyEvent$slambda_3.$metadata$ = classMeta('KeysEvents$onKeyEvent$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function KeysEvents$onKeyEvent$slambda_4(this$0, $event, resultContinuation) {
var i = new KeysEvents$onKeyEvent$slambda_3(this$0, $event, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function KeysEvents(view) {
this.tgn_1 = view;
var tmp = this;
tmp.vgn_1 = AsyncSignal_init_$Create$(null, 1, null);
var tmp_0 = this;
tmp_0.wgn_1 = AsyncSignal_init_$Create$(null, 1, null);
var tmp_1 = this;
tmp_1.xgn_1 = AsyncSignal_init_$Create$(null, 1, null);
}
KeysEvents.prototype.n2u = function () {
return this.tgn_1;
};
KeysEvents.prototype.sgo = function (callback) {
return this.vgn_1.r55(KeysEvents$down$slambda_0(callback, null));
};
KeysEvents.prototype.tgo = function (callback) {
return this.wgn_1.r55(KeysEvents$up$slambda_0(callback, null));
};
KeysEvents.prototype.ugo = function (callback) {
return this.xgn_1.r55(KeysEvents$typed$slambda_0(callback, null));
};
KeysEvents.prototype.vgc = function (_this__u8e3s4, event) {
this.ugn_1 = _this__u8e3s4;
var tmp0_subject = event.ec6_1;
var tmp0 = tmp0_subject.q2_1;
switch (tmp0) {
case 2:
launchImmediately_0(_this__u8e3s4.ofw_1.bfw_1, KeysEvents$onKeyEvent$slambda_0(this, event, null));
;
break;
case 1:
launchImmediately_0(_this__u8e3s4.ofw_1.bfw_1, KeysEvents$onKeyEvent$slambda_2(this, event, null));
;
break;
case 0:
launchImmediately_0(_this__u8e3s4.ofw_1.bfw_1, KeysEvents$onKeyEvent$slambda_4(this, event, null));
;
break;
}
};
KeysEvents.prototype.x2c = function () {
detach(this);
};
KeysEvents.$metadata$ = classMeta('KeysEvents', [KeyComponent, Closeable]);
function keys(_this__u8e3s4, callback) {
init_properties_KeysEvents_kt_pg3k37();
var tmp$ret$0;
// Inline function 'kotlin.run' call
var tmp0_run = get_keys_0(_this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
tmp$ret$0 = callback(tmp0_run);
return tmp$ret$0;
}
function newKeys(_this__u8e3s4, callback) {
init_properties_KeysEvents_kt_pg3k37();
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp0_also = new KeysEvents(_this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.input.newKeys.<anonymous>' call
_this__u8e3s4.lg8(tmp0_also);
callback(tmp0_also);
tmp$ret$0 = tmp0_also;
return tmp$ret$0;
}
function keys$delegate$lambda($this$$receiver) {
init_properties_KeysEvents_kt_pg3k37();
var tmp$ret$4;
// Inline function 'com.soywiz.korge.baseview.BaseView.getOrCreateComponentKey' call
var tmp$ret$3;
// Inline function 'com.soywiz.korge.baseview.BaseView.getOrCreateComponentTyped' call
var tmp0_getOrCreateComponentTyped = Companion_getInstance_34();
var tmp0_safe_receiver = $this$$receiver.gg8(tmp0_getOrCreateComponentTyped);
var tmp;
if (tmp0_safe_receiver == null) {
tmp = null;
} else {
var tmp$ret$1;
$l$block: {
// Inline function 'kotlin.collections.firstOrNull' call
var tmp0_iterator = tmp0_safe_receiver.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l();
var tmp$ret$0;
// Inline function 'com.soywiz.korge.baseview.BaseView.getOrCreateComponentTyped.<anonymous>' call
tmp$ret$0 = element instanceof KeysEvents;
if (tmp$ret$0) {
tmp$ret$1 = element;
break $l$block;
}
}
tmp$ret$1 = null;
}
tmp = tmp$ret$1;
}
var tmp_0 = tmp;
var tmp1_elvis_lhs = (tmp_0 == null ? true : tmp_0 instanceof KeysEvents) ? tmp_0 : null;
var tmp_1;
if (tmp1_elvis_lhs == null) {
var tmp$ret$2;
// Inline function 'com.soywiz.korge.input.keys$delegate.<anonymous>.<anonymous>' call
tmp$ret$2 = new KeysEvents($this$$receiver);
var tmp_2 = $this$$receiver.lg8(tmp$ret$2);
tmp_1 = tmp_2 instanceof KeysEvents ? tmp_2 : THROW_CCE();
} else {
tmp_1 = tmp1_elvis_lhs;
}
tmp$ret$3 = tmp_1;
tmp$ret$4 = tmp$ret$3;
return tmp$ret$4;
}
function keys$factory() {
return getPropertyCallableRef('keys', 1, KProperty1, function (receiver) {
return get_keys_0(receiver);
}, null);
}
var properties_initialized_KeysEvents_kt_1mffin;
function init_properties_KeysEvents_kt_pg3k37() {
if (properties_initialized_KeysEvents_kt_1mffin) {
} else {
properties_initialized_KeysEvents_kt_1mffin = true;
keys$delegate = PropertyThis_init_$Create$(null, keys$delegate$lambda, 1, null);
}
}
function onMouseDrag(_this__u8e3s4, timeProvider, info, callback) {
return onMouseDragInternal(_this__u8e3s4, timeProvider, info, callback).d_1;
}
function onMouseDrag$default(_this__u8e3s4, timeProvider, info, callback, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
timeProvider = Companion_getInstance_7();
if (!(($mask0 & 2) === 0)) {
info = MouseDragInfo_init_$Create$(_this__u8e3s4, 0.0, 0.0, false, false, null, null, 126, null);
}
return onMouseDrag(_this__u8e3s4, timeProvider, info, callback);
}
function MouseDragInfo_init_$Init$(view, dx, dy, start, end, startTime, time, $mask0, $marker, $this) {
if (!(($mask0 & 2) === 0))
dx = 0.0;
if (!(($mask0 & 4) === 0))
dy = 0.0;
if (!(($mask0 & 8) === 0))
start = false;
if (!(($mask0 & 16) === 0))
end = false;
if (!(($mask0 & 32) === 0))
startTime = Companion_getInstance_0().z1g_1;
if (!(($mask0 & 64) === 0))
time = Companion_getInstance_0().z1g_1;
MouseDragInfo.call($this, view, dx, dy, start, end, startTime, time);
return $this;
}
function MouseDragInfo_init_$Create$(view, dx, dy, start, end, startTime, time, $mask0, $marker) {
return MouseDragInfo_init_$Init$(view, dx, dy, start, end, startTime, time, $mask0, $marker, Object.create(MouseDragInfo.prototype));
}
function MouseDragInfo(view, dx, dy, start, end, startTime, time) {
this.vgo_1 = view;
this.wgo_1 = dx;
this.xgo_1 = dy;
this.ygo_1 = start;
this.zgo_1 = end;
this.agp_1 = startTime;
this.bgp_1 = time;
var tmp = this;
DoubleCompanionObject_getInstance();
tmp.dgp_1 = NaN;
var tmp_0 = this;
DoubleCompanionObject_getInstance();
tmp_0.egp_1 = NaN;
this.fgp_1 = 0.0;
this.ggp_1 = 0.0;
}
MouseDragInfo.prototype.hgp = function () {
return DateTime__minus_impl_10njw8(this.bgp_1, this.agp_1);
};
MouseDragInfo.prototype.igp = function () {
return this.jgp(this.vgo_1);
};
MouseDragInfo.prototype.kgp = function () {
return this.lgp(this.vgo_1);
};
MouseDragInfo.prototype.jgp = function (view) {
var tmp0_safe_receiver = view.e5n();
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.mgp(0.0, 0.0, this.wgo_1, this.xgo_1);
return tmp1_elvis_lhs == null ? this.wgo_1 : tmp1_elvis_lhs;
};
MouseDragInfo.prototype.lgp = function (view) {
var tmp0_safe_receiver = view.e5n();
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ngp(0.0, 0.0, this.wgo_1, this.xgo_1);
return tmp1_elvis_lhs == null ? this.xgo_1 : tmp1_elvis_lhs;
};
MouseDragInfo.prototype.d2p = function () {
var tmp = this;
DoubleCompanionObject_getInstance();
tmp.dgp_1 = NaN;
var tmp_0 = this;
DoubleCompanionObject_getInstance();
tmp_0.egp_1 = NaN;
this.fgp_1 = 0.0;
this.ggp_1 = 0.0;
this.wgo_1 = 0.0;
this.xgo_1 = 0.0;
};
MouseDragInfo.prototype.ogp = function (dx, dy, start, end, time) {
this.wgo_1 = dx;
this.xgo_1 = dy;
if (!isNaN_0(this.dgp_1) ? !isNaN_0(this.egp_1) : false) {
this.fgp_1 = this.dgp_1 - dx;
this.ggp_1 = this.egp_1 - dy;
}
this.dgp_1 = dx;
this.egp_1 = dy;
this.ygo_1 = start;
this.zgo_1 = end;
if (start)
this.agp_1 = time;
this.bgp_1 = time;
return this;
};
MouseDragInfo.$metadata$ = classMeta('MouseDragInfo');
function OnMouseDragCloseable(onDownCloseable, onUpAnywhereCloseable, onMoveAnywhereCloseable) {
this.pgp_1 = onDownCloseable;
this.qgp_1 = onUpAnywhereCloseable;
this.rgp_1 = onMoveAnywhereCloseable;
}
OnMouseDragCloseable.prototype.x2c = function () {
this.pgp_1.x2c();
this.qgp_1.x2c();
this.rgp_1.x2c();
};
OnMouseDragCloseable.prototype.toString = function () {
return 'OnMouseDragCloseable(onDownCloseable=' + this.pgp_1 + ', onUpAnywhereCloseable=' + this.qgp_1 + ', onMoveAnywhereCloseable=' + this.rgp_1 + ')';
};
OnMouseDragCloseable.prototype.hashCode = function () {
var result = hashCode(this.pgp_1);
result = imul(result, 31) + hashCode(this.qgp_1) | 0;
result = imul(result, 31) + hashCode(this.rgp_1) | 0;
return result;
};
OnMouseDragCloseable.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof OnMouseDragCloseable))
return false;
var tmp0_other_with_cast = other instanceof OnMouseDragCloseable ? other : THROW_CCE();
if (!equals(this.pgp_1, tmp0_other_with_cast.pgp_1))
return false;
if (!equals(this.qgp_1, tmp0_other_with_cast.qgp_1))
return false;
if (!equals(this.rgp_1, tmp0_other_with_cast.rgp_1))
return false;
return true;
};
OnMouseDragCloseable.$metadata$ = classMeta('OnMouseDragCloseable', [Closeable]);
function onMouseDragInternal(_this__u8e3s4, timeProvider, info, callback) {
var dragging = {_v: false};
var sx = {_v: 0.0};
var sy = {_v: 0.0};
var cx = {_v: 0.0};
var cy = {_v: 0.0};
var view = _this__u8e3s4;
var mousePos = Companion_getInstance_8().zp();
var onDownCloseable = null;
var onUpAnywhereCloseable = null;
var onMoveAnywhereCloseable = null;
var tmp$ret$7;
// Inline function 'com.soywiz.korge.input.mouse' call
var tmp$ret$6;
// Inline function 'kotlin.run' call
var tmp0_run = get_mouse(_this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$1;
// Inline function 'com.soywiz.korge.input.MouseEvents.onDownCloseable' call
var tmp1_onDownCloseable = onMouseDragInternal$slambda_0(dragging, info, mousePos, sx, sy, cx, cy, callback, timeProvider, view, null);
var tmp$ret$0;
// Inline function 'com.soywiz.korge.input.MouseEvents._mouseEventCloseable' call
var tmp0__mouseEventCloseable = down$factory();
var tmp = tmp0__mouseEventCloseable.get(tmp0_run);
tmp$ret$0 = tmp.d54(onMouseDragInternal$lambda(tmp0_run, tmp1_onDownCloseable));
tmp$ret$1 = tmp$ret$0;
onDownCloseable = tmp$ret$1;
var tmp$ret$3;
// Inline function 'com.soywiz.korge.input.MouseEvents.onUpAnywhereCloseable' call
var tmp3_onUpAnywhereCloseable = onMouseDragInternal$slambda_2(dragging, info, mousePos, sx, sy, cx, cy, callback, timeProvider, view, null);
var tmp$ret$2;
// Inline function 'com.soywiz.korge.input.MouseEvents._mouseEventCloseable' call
var tmp2__mouseEventCloseable = upAnywhere$factory();
var tmp_0 = tmp2__mouseEventCloseable.get(tmp0_run);
tmp$ret$2 = tmp_0.d54(onMouseDragInternal$lambda_0(tmp0_run, tmp3_onUpAnywhereCloseable));
tmp$ret$3 = tmp$ret$2;
onUpAnywhereCloseable = tmp$ret$3;
var tmp$ret$5;
// Inline function 'com.soywiz.korge.input.MouseEvents.onMoveAnywhereCloseable' call
var tmp5_onMoveAnywhereCloseable = onMouseDragInternal$slambda_4(dragging, info, mousePos, sx, sy, cx, cy, callback, timeProvider, view, null);
var tmp$ret$4;
// Inline function 'com.soywiz.korge.input.MouseEvents._mouseEventCloseable' call
var tmp4__mouseEventCloseable = moveAnywhere$factory();
var tmp_1 = tmp4__mouseEventCloseable.get(tmp0_run);
tmp$ret$4 = tmp_1.d54(onMouseDragInternal$lambda_1(tmp0_run, tmp5_onMoveAnywhereCloseable));
tmp$ret$5 = tmp$ret$4;
onMoveAnywhereCloseable = tmp$ret$5;
tmp$ret$6 = Unit_getInstance();
tmp$ret$7 = tmp$ret$6;
var tmp_2;
if (onDownCloseable == null) {
throwUninitializedPropertyAccessException('onDownCloseable');
} else {
tmp_2 = onDownCloseable;
}
var tmp_3 = tmp_2;
var tmp_4;
if (onUpAnywhereCloseable == null) {
throwUninitializedPropertyAccessException('onUpAnywhereCloseable');
} else {
tmp_4 = onUpAnywhereCloseable;
}
var tmp_5 = tmp_4;
var tmp_6;
if (onMoveAnywhereCloseable == null) {
throwUninitializedPropertyAccessException('onMoveAnywhereCloseable');
} else {
tmp_6 = onMoveAnywhereCloseable;
}
return to(_this__u8e3s4, new OnMouseDragCloseable(tmp_3, tmp_5, tmp_6));
}
var MouseDragState_START_instance;
var MouseDragState_DRAG_instance;
var MouseDragState_END_instance;
var MouseDragState_entriesInitialized;
function MouseDragState_initEntries() {
if (MouseDragState_entriesInitialized)
return Unit_getInstance();
MouseDragState_entriesInitialized = true;
MouseDragState_START_instance = new MouseDragState('START', 0);
MouseDragState_DRAG_instance = new MouseDragState('DRAG', 1);
MouseDragState_END_instance = new MouseDragState('END', 2);
}
function MouseDragState(name, ordinal) {
Enum.call(this, name, ordinal);
}
MouseDragState.prototype.pc9 = function () {
return this.equals(MouseDragState_START_getInstance());
};
MouseDragState.prototype.qc9 = function () {
return this.equals(MouseDragState_END_getInstance());
};
MouseDragState.$metadata$ = classMeta('MouseDragState', undefined, undefined, undefined, undefined, Enum.prototype);
function onMouseDragInternal$views(view) {
return ensureNotNull(view.pgs()).hgs_1;
}
function onMouseDragInternal$updateMouse(mousePos, view) {
var views = onMouseDragInternal$views(view);
mousePos.u7a(views.qgs());
}
function onMouseDragInternal$handle(dragging, $info, mousePos, sx, sy, cx, cy, $callback, $timeProvider, view, it, state) {
if (!state.equals(MouseDragState_START_getInstance()) ? !dragging._v : false)
return Unit_getInstance();
onMouseDragInternal$updateMouse(mousePos, view);
$info.cgp_1 = it;
var px = mousePos.y72_1;
var py = mousePos.z72_1;
var tmp0_subject = state;
var tmp0 = tmp0_subject.q2_1;
switch (tmp0) {
case 0:
dragging._v = true;
sx._v = px;
sy._v = py;
$info.d2p();
;
break;
case 2:
dragging._v = false;
;
break;
default:
;
break;
}
cx._v = mousePos.y72_1;
cy._v = mousePos.z72_1;
var dx = cx._v - sx._v;
var dy = cy._v - sy._v;
$callback(onMouseDragInternal$views(view), $info.ogp(dx, dy, state.pc9(), state.qc9(), $timeProvider.d1h()));
}
function onMouseDragInternal$slambda($dragging, $info, $mousePos, $sx, $sy, $cx, $cy, $callback, $timeProvider, $view, resultContinuation) {
this.zgs_1 = $dragging;
this.agt_1 = $info;
this.bgt_1 = $mousePos;
this.cgt_1 = $sx;
this.dgt_1 = $sy;
this.egt_1 = $cx;
this.fgt_1 = $cy;
this.ggt_1 = $callback;
this.hgt_1 = $timeProvider;
this.igt_1 = $view;
CoroutineImpl.call(this, resultContinuation);
}
onMouseDragInternal$slambda.prototype.kgt = function (it, $cont) {
var tmp = this.lgt(it, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
onMouseDragInternal$slambda.prototype.w7 = function (p1, $cont) {
return this.kgt(p1 instanceof MouseEvents ? p1 : THROW_CCE(), $cont);
};
onMouseDragInternal$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
if (tmp === 0) {
this.p7_1 = 1;
onMouseDragInternal$handle(this.zgs_1, this.agt_1, this.bgt_1, this.cgt_1, this.dgt_1, this.egt_1, this.fgt_1, this.ggt_1, this.hgt_1, this.igt_1, this.jgt_1, MouseDragState_START_getInstance());
return Unit_getInstance();
} else if (tmp === 1) {
throw this.r7_1;
}
} catch ($p) {
throw $p;
}
while (true);
};
onMouseDragInternal$slambda.prototype.lgt = function (it, completion) {
var i = new onMouseDragInternal$slambda(this.zgs_1, this.agt_1, this.bgt_1, this.cgt_1, this.dgt_1, this.egt_1, this.fgt_1, this.ggt_1, this.hgt_1, this.igt_1, completion);
i.jgt_1 = it;
return i;
};
onMouseDragInternal$slambda.$metadata$ = classMeta('onMouseDragInternal$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
function onMouseDragInternal$slambda_0($dragging, $info, $mousePos, $sx, $sy, $cx, $cy, $callback, $timeProvider, $view, resultContinuation) {
var i = new onMouseDragInternal$slambda($dragging, $info, $mousePos, $sx, $sy, $cx, $cy, $callback, $timeProvider, $view, resultContinuation);
var l = function (it, $cont) {
return i.kgt(it, $cont);
};
l.$arity = 1;
return l;
}
function onMouseDragInternal$lambda$slambda($tmp1_onDownCloseable, $it, resultContinuation) {
this.ugt_1 = $tmp1_onDownCloseable;
this.vgt_1 = $it;
CoroutineImpl.call(this, resultContinuation);
}
onMouseDragInternal$lambda$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
onMouseDragInternal$lambda$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
onMouseDragInternal$lambda$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.ugt_1(this.vgt_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
onMouseDragInternal$lambda$slambda.prototype.k53 = function (completion) {
var i = new onMouseDragInternal$lambda$slambda(this.ugt_1, this.vgt_1, completion);
return i;
};
onMouseDragInternal$lambda$slambda.$metadata$ = classMeta('onMouseDragInternal$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function onMouseDragInternal$lambda$slambda_0($tmp1_onDownCloseable, $it, resultContinuation) {
var i = new onMouseDragInternal$lambda$slambda($tmp1_onDownCloseable, $it, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function onMouseDragInternal$lambda($tmp0_run, $tmp1_onDownCloseable) {
return function (it) {
var tmp = $tmp0_run.b1u();
launchImmediately_0(tmp, onMouseDragInternal$lambda$slambda_0($tmp1_onDownCloseable, it, null));
return Unit_getInstance();
};
}
function onMouseDragInternal$slambda_1($dragging, $info, $mousePos, $sx, $sy, $cx, $cy, $callback, $timeProvider, $view, resultContinuation) {
this.egu_1 = $dragging;
this.fgu_1 = $info;
this.ggu_1 = $mousePos;
this.hgu_1 = $sx;
this.igu_1 = $sy;
this.jgu_1 = $cx;
this.kgu_1 = $cy;
this.lgu_1 = $callback;
this.mgu_1 = $timeProvider;
this.ngu_1 = $view;
CoroutineImpl.call(this, resultContinuation);
}
onMouseDragInternal$slambda_1.prototype.kgt = function (it, $cont) {
var tmp = this.lgt(it, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
onMouseDragInternal$slambda_1.prototype.w7 = function (p1, $cont) {
return this.kgt(p1 instanceof MouseEvents ? p1 : THROW_CCE(), $cont);
};
onMouseDragInternal$slambda_1.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
if (tmp === 0) {
this.p7_1 = 1;
onMouseDragInternal$handle(this.egu_1, this.fgu_1, this.ggu_1, this.hgu_1, this.igu_1, this.jgu_1, this.kgu_1, this.lgu_1, this.mgu_1, this.ngu_1, this.ogu_1, MouseDragState_END_getInstance());
return Unit_getInstance();
} else if (tmp === 1) {
throw this.r7_1;
}
} catch ($p) {
throw $p;
}
while (true);
};
onMouseDragInternal$slambda_1.prototype.lgt = function (it, completion) {
var i = new onMouseDragInternal$slambda_1(this.egu_1, this.fgu_1, this.ggu_1, this.hgu_1, this.igu_1, this.jgu_1, this.kgu_1, this.lgu_1, this.mgu_1, this.ngu_1, completion);
i.ogu_1 = it;
return i;
};
onMouseDragInternal$slambda_1.$metadata$ = classMeta('onMouseDragInternal$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
function onMouseDragInternal$slambda_2($dragging, $info, $mousePos, $sx, $sy, $cx, $cy, $callback, $timeProvider, $view, resultContinuation) {
var i = new onMouseDragInternal$slambda_1($dragging, $info, $mousePos, $sx, $sy, $cx, $cy, $callback, $timeProvider, $view, resultContinuation);
var l = function (it, $cont) {
return i.kgt(it, $cont);
};
l.$arity = 1;
return l;
}
function onMouseDragInternal$lambda$slambda_1($tmp3_onUpAnywhereCloseable, $it, resultContinuation) {
this.xgu_1 = $tmp3_onUpAnywhereCloseable;
this.ygu_1 = $it;
CoroutineImpl.call(this, resultContinuation);
}
onMouseDragInternal$lambda$slambda_1.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
onMouseDragInternal$lambda$slambda_1.prototype.to = function ($cont) {
return this.z56($cont);
};
onMouseDragInternal$lambda$slambda_1.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.xgu_1(this.ygu_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
onMouseDragInternal$lambda$slambda_1.prototype.k53 = function (completion) {
var i = new onMouseDragInternal$lambda$slambda_1(this.xgu_1, this.ygu_1, completion);
return i;
};
onMouseDragInternal$lambda$slambda_1.$metadata$ = classMeta('onMouseDragInternal$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function onMouseDragInternal$lambda$slambda_2($tmp3_onUpAnywhereCloseable, $it, resultContinuation) {
var i = new onMouseDragInternal$lambda$slambda_1($tmp3_onUpAnywhereCloseable, $it, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function onMouseDragInternal$lambda_0($tmp0_run, $tmp3_onUpAnywhereCloseable) {
return function (it) {
var tmp = $tmp0_run.b1u();
launchImmediately_0(tmp, onMouseDragInternal$lambda$slambda_2($tmp3_onUpAnywhereCloseable, it, null));
return Unit_getInstance();
};
}
function onMouseDragInternal$slambda_3($dragging, $info, $mousePos, $sx, $sy, $cx, $cy, $callback, $timeProvider, $view, resultContinuation) {
this.hgv_1 = $dragging;
this.igv_1 = $info;
this.jgv_1 = $mousePos;
this.kgv_1 = $sx;
this.lgv_1 = $sy;
this.mgv_1 = $cx;
this.ngv_1 = $cy;
this.ogv_1 = $callback;
this.pgv_1 = $timeProvider;
this.qgv_1 = $view;
CoroutineImpl.call(this, resultContinuation);
}
onMouseDragInternal$slambda_3.prototype.kgt = function (it, $cont) {
var tmp = this.lgt(it, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
onMouseDragInternal$slambda_3.prototype.w7 = function (p1, $cont) {
return this.kgt(p1 instanceof MouseEvents ? p1 : THROW_CCE(), $cont);
};
onMouseDragInternal$slambda_3.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
if (tmp === 0) {
this.p7_1 = 1;
onMouseDragInternal$handle(this.hgv_1, this.igv_1, this.jgv_1, this.kgv_1, this.lgv_1, this.mgv_1, this.ngv_1, this.ogv_1, this.pgv_1, this.qgv_1, this.rgv_1, MouseDragState_DRAG_getInstance());
return Unit_getInstance();
} else if (tmp === 1) {
throw this.r7_1;
}
} catch ($p) {
throw $p;
}
while (true);
};
onMouseDragInternal$slambda_3.prototype.lgt = function (it, completion) {
var i = new onMouseDragInternal$slambda_3(this.hgv_1, this.igv_1, this.jgv_1, this.kgv_1, this.lgv_1, this.mgv_1, this.ngv_1, this.ogv_1, this.pgv_1, this.qgv_1, completion);
i.rgv_1 = it;
return i;
};
onMouseDragInternal$slambda_3.$metadata$ = classMeta('onMouseDragInternal$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
function onMouseDragInternal$slambda_4($dragging, $info, $mousePos, $sx, $sy, $cx, $cy, $callback, $timeProvider, $view, resultContinuation) {
var i = new onMouseDragInternal$slambda_3($dragging, $info, $mousePos, $sx, $sy, $cx, $cy, $callback, $timeProvider, $view, resultContinuation);
var l = function (it, $cont) {
return i.kgt(it, $cont);
};
l.$arity = 1;
return l;
}
function onMouseDragInternal$lambda$slambda_3($tmp5_onMoveAnywhereCloseable, $it, resultContinuation) {
this.agw_1 = $tmp5_onMoveAnywhereCloseable;
this.bgw_1 = $it;
CoroutineImpl.call(this, resultContinuation);
}
onMouseDragInternal$lambda$slambda_3.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
onMouseDragInternal$lambda$slambda_3.prototype.to = function ($cont) {
return this.z56($cont);
};
onMouseDragInternal$lambda$slambda_3.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.agw_1(this.bgw_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
onMouseDragInternal$lambda$slambda_3.prototype.k53 = function (completion) {
var i = new onMouseDragInternal$lambda$slambda_3(this.agw_1, this.bgw_1, completion);
return i;
};
onMouseDragInternal$lambda$slambda_3.$metadata$ = classMeta('onMouseDragInternal$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function onMouseDragInternal$lambda$slambda_4($tmp5_onMoveAnywhereCloseable, $it, resultContinuation) {
var i = new onMouseDragInternal$lambda$slambda_3($tmp5_onMoveAnywhereCloseable, $it, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function onMouseDragInternal$lambda_1($tmp0_run, $tmp5_onMoveAnywhereCloseable) {
return function (it) {
var tmp = $tmp0_run.b1u();
launchImmediately_0(tmp, onMouseDragInternal$lambda$slambda_4($tmp5_onMoveAnywhereCloseable, it, null));
return Unit_getInstance();
};
}
function MouseDragState_START_getInstance() {
MouseDragState_initEntries();
return MouseDragState_START_instance;
}
function MouseDragState_DRAG_getInstance() {
MouseDragState_initEntries();
return MouseDragState_DRAG_instance;
}
function MouseDragState_END_getInstance() {
MouseDragState_initEntries();
return MouseDragState_END_instance;
}
function down$factory() {
return getPropertyCallableRef('down', 1, KProperty1, function (receiver) {
return receiver.ngd_1;
}, null);
}
function upAnywhere$factory() {
return getPropertyCallableRef('upAnywhere', 1, KProperty1, function (receiver) {
return receiver.ugd_1;
}, null);
}
function moveAnywhere$factory() {
return getPropertyCallableRef('moveAnywhere', 1, KProperty1, function (receiver) {
return receiver.wgd_1;
}, null);
}
function get_mouse(_this__u8e3s4) {
init_properties_MouseEvents_kt_sclau();
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.kds.PropertyThis.getValue' call
var tmp0_getValue = mouse$factory();
var tmp0_elvis_lhs = mouse$delegate.k4v_1;
var res = getExtraTyped(_this__u8e3s4, tmp0_elvis_lhs == null ? tmp0_getValue.callableName : tmp0_elvis_lhs);
if (res == null) {
var r = mouse$delegate.l4v_1(_this__u8e3s4);
// Inline function 'com.soywiz.kds.PropertyThis.setValueUntransformed' call
var tmp0_elvis_lhs_0 = mouse$delegate.k4v_1;
setExtra(_this__u8e3s4, tmp0_elvis_lhs_0 == null ? tmp0_getValue.callableName : tmp0_elvis_lhs_0, r);
tmp$ret$0 = r;
break $l$block;
}
tmp$ret$0 = res;
}
return tmp$ret$0;
}
var mouse$delegate;
function set_cursor(_this__u8e3s4, _set____db54di) {
init_properties_MouseEvents_kt_sclau();
var tmp0_setValue = cursor$factory();
var tmp0_elvis_lhs = cursor$delegate.g4v_1;
var tmp = tmp0_elvis_lhs == null ? tmp0_setValue.callableName : tmp0_elvis_lhs;
var tmp$ret$2;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = _set____db54di;
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
return setExtra(_this__u8e3s4, tmp, tmp$ret$2);
}
function get_cursor(_this__u8e3s4) {
init_properties_MouseEvents_kt_sclau();
var tmp$ret$8;
$l$block: {
// Inline function 'com.soywiz.kds.Property.getValue' call
var tmp0_getValue = cursor$factory_0();
var tmp$ret$4;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp1_safe_receiver = _this__u8e3s4.f4v();
var tmp;
if (tmp1_safe_receiver == null) {
tmp = null;
} else {
var tmp$ret$1;
// Inline function 'com.soywiz.kds.get' call
var tmp0_elvis_lhs = cursor$delegate.g4v_1;
var tmp0_get = tmp0_elvis_lhs == null ? tmp0_getValue.callableName : tmp0_elvis_lhs;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp1_safe_receiver;
tmp$ret$1 = tmp$ret$0.get(tmp0_get);
tmp = tmp$ret$1;
}
var tmp1_fastCastTo = tmp;
var tmp$ret$3;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$2;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$2 = tmp1_fastCastTo;
tmp$ret$3 = tmp$ret$2;
tmp$ret$4 = tmp$ret$3;
var res = tmp$ret$4;
if (res == null) {
var r = cursor$delegate.h4v_1();
var tmp_0;
if (!(r == null)) {
tmp_0 = true;
} else {
var tmp2_elvis_lhs = cursor$delegate.g4v_1;
tmp_0 = hasExtra(_this__u8e3s4, tmp2_elvis_lhs == null ? tmp0_getValue.callableName : tmp2_elvis_lhs);
}
if (tmp_0) {
// Inline function 'com.soywiz.kds.Property.setValue' call
var tmp0_elvis_lhs_0 = cursor$delegate.g4v_1;
var tmp_1 = tmp0_elvis_lhs_0 == null ? tmp0_getValue.callableName : tmp0_elvis_lhs_0;
var tmp$ret$7;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp$ret$6;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$5;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$5 = r;
tmp$ret$6 = tmp$ret$5;
tmp$ret$7 = tmp$ret$6;
setExtra(_this__u8e3s4, tmp_1, tmp$ret$7);
}
tmp$ret$8 = r;
break $l$block;
}
tmp$ret$8 = res;
}
return tmp$ret$8;
}
var cursor$delegate;
function mouseHitTest($this, views) {
if (!$this.mgw(views.efw_1)) {
$this.ggw(views.efw_1, true);
$this.kgw(views.efw_1, views.lfx_1.jgw(views.hgw(), views.igw()));
var view = $this.lgw(views.efw_1);
$l$loop: while (!(view == null)) {
if (!(get_cursor(view) == null)) {
break $l$loop;
}
view = view.e5n();
}
var tmp0_safe_receiver = view;
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : get_cursor(tmp0_safe_receiver);
var newCursor = tmp1_elvis_lhs == null ? Cursor_DEFAULT_getInstance() : tmp1_elvis_lhs;
if (!equals(views.hfw_1.jch(), newCursor)) {
views.hfw_1.ich(newCursor);
}
}
return $this.lgw(views.efw_1);
}
function MouseEvents$Companion$mouseHitSearch$delegate$lambda() {
return false;
}
function MouseEvents$Companion$mouseHitResult$delegate$lambda() {
return null;
}
function MouseEvents$Companion$mouseHitResultUsed$delegate$lambda() {
return null;
}
function MouseEvents$Companion$mouseDebugHandlerOnce$delegate$lambda() {
return new Once();
}
function MouseEvents$Companion$installDebugExtensionOnce$lambda($views) {
return function ($this$null, ctx) {
var scale = ctx.ig9_1.zb8() * ctx.dga_1;
var tmp$ret$0;
// Inline function 'kotlin.math.max' call
var tmp0_max = 1 * scale;
tmp$ret$0 = Math.max(tmp0_max, 2.0);
var space = tmp$ret$0;
var matrix = $views.ngw();
var yy = 60.0 * scale;
var lineHeight = 8.0 * scale;
var mouseHit = mouseHitTest(Companion_getInstance_44(), $views);
var tmp;
if (!(mouseHit == null)) {
var bounds = mouseHit.ogw(false, 1, null);
var tmp$ret$4;
// Inline function 'com.soywiz.korge.render.RenderContext.useBatcher' call
var tmp3_useBatcher = $this$null.xfw_1;
var tmp$ret$3;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.use' call
var tmp2_use = tmp3_useBatcher.gga_1;
var tmp1_useBatcher = tmp2_use.vga_1;
if (!(tmp1_useBatcher.tga_1 === tmp2_use)) {
tmp1_useBatcher.mj();
tmp1_useBatcher.tga_1 = tmp2_use;
}
var tmp$ret$1;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.white' call
var tmp0__get_white__j8g7zy = Bitmaps_getInstance();
tmp$ret$1 = get_Bitmaps_white();
var tmp0_tex = ctx.tgc(tmp$ret$1);
var tmp1_x = bounds.v71_1;
var tmp2_y = bounds.w71_1;
var tmp3_width = bounds.x71_1;
var tmp4_height = bounds.y71_1;
var tmp5_colorMul = Companion_getInstance_14().u8i(255, 0, 0, 63);
var tmp6_m = mouseHit.pgw();
var tmp$ret$2;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.white' call
var tmp1__get_white__o34v7h = Bitmaps_getInstance();
tmp$ret$2 = get_Bitmaps_white();
var tmp7_premultiplied = tmp$ret$2.b7z();
tmp2_use.ugc(tmp0_tex, tmp1_x, tmp2_y, tmp3_width, tmp4_height, tmp6_m, false, tmp5_colorMul, null, null, null, tmp7_premultiplied, false, 1856, null);
var tmp8_$receiver = $this$null.xfw_1;
var tmp9_font = $this$null.qgw();
var tmp10_str = '' + mouseHit + ' : ' + $views.hgw() + ',' + $views.igw();
var tmp11_y = numberToInt(yy);
var tmp12_colMul = ctx.ega_1;
var tmp13_blendMode = Companion_getInstance_53().yg8_1;
drawText$default(tmp8_$receiver, tmp9_font, lineHeight, tmp10_str, 0, tmp11_y, matrix, tmp12_colMul, null, tmp13_blendMode, false, 128, null);
tmp$ret$3 = Unit_getInstance();
tmp$ret$4 = tmp$ret$3;
yy = yy + lineHeight;
yy = yy + space;
tmp = Unit_getInstance();
}
var mouseHitResultUsed = Companion_getInstance_44().rgw($this$null.efw_1);
var tmp_0;
if (!(mouseHitResultUsed == null)) {
var bounds_0 = mouseHitResultUsed.ogw(false, 1, null);
var tmp$ret$8;
// Inline function 'com.soywiz.korge.render.RenderContext.useBatcher' call
var tmp6_useBatcher = $this$null.xfw_1;
var tmp$ret$7;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.use' call
var tmp5_use = tmp6_useBatcher.gga_1;
var tmp4_useBatcher = tmp5_use.vga_1;
if (!(tmp4_useBatcher.tga_1 === tmp5_use)) {
tmp4_useBatcher.mj();
tmp4_useBatcher.tga_1 = tmp5_use;
}
var tmp$ret$5;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.white' call
var tmp0__get_white__j8g7zy_0 = Bitmaps_getInstance();
tmp$ret$5 = get_Bitmaps_white();
var tmp0_tex_0 = ctx.tgc(tmp$ret$5);
var tmp1_x_0 = bounds_0.v71_1;
var tmp2_y_0 = bounds_0.w71_1;
var tmp3_width_0 = bounds_0.x71_1;
var tmp4_height_0 = bounds_0.y71_1;
var tmp5_colorMul_0 = Companion_getInstance_14().u8i(0, 0, 255, 63);
var tmp6_m_0 = mouseHitResultUsed.pgw();
var tmp$ret$6;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.white' call
var tmp1__get_white__o34v7h_0 = Bitmaps_getInstance();
tmp$ret$6 = get_Bitmaps_white();
var tmp7_premultiplied_0 = tmp$ret$6.b7z();
tmp5_use.ugc(tmp0_tex_0, tmp1_x_0, tmp2_y_0, tmp3_width_0, tmp4_height_0, tmp6_m_0, false, tmp5_colorMul_0, null, null, null, tmp7_premultiplied_0, false, 1856, null);
var vview = mouseHitResultUsed;
while (!(vview == null)) {
var tmp8_$receiver_0 = $this$null.xfw_1;
var tmp9_font_0 = $this$null.qgw();
var tmp10_str_0 = vview.toString();
var tmp11_y_0 = numberToInt(yy);
var tmp12_colMul_0 = ctx.ega_1;
var tmp13_blendMode_0 = Companion_getInstance_53().yg8_1;
drawText$default(tmp8_$receiver_0, tmp9_font_0, lineHeight, tmp10_str_0, 0, tmp11_y_0, matrix, tmp12_colMul_0, null, tmp13_blendMode_0, false, 128, null);
vview = vview.e5n();
yy = yy + lineHeight;
yy = yy + space;
}
tmp$ret$7 = Unit_getInstance();
tmp$ret$8 = tmp$ret$7;
tmp_0 = tmp$ret$8;
}
return Unit_getInstance();
};
}
function Companion_12() {
Companion_instance_12 = this;
var tmp = this;
tmp.cgw_1 = Property_init_$Create$(null, MouseEvents$Companion$mouseHitSearch$delegate$lambda, 1, null);
var tmp_0 = this;
tmp_0.dgw_1 = Property_init_$Create$(null, MouseEvents$Companion$mouseHitResult$delegate$lambda, 1, null);
var tmp_1 = this;
tmp_1.egw_1 = Property_init_$Create$(null, MouseEvents$Companion$mouseHitResultUsed$delegate$lambda, 1, null);
var tmp_2 = this;
tmp_2.fgw_1 = Property_init_$Create$(null, MouseEvents$Companion$mouseDebugHandlerOnce$delegate$lambda, 1, null);
}
Companion_12.prototype.ggw = function (_this__u8e3s4, _set____db54di) {
var tmp0_setValue = mouseHitSearch$factory();
var tmp0_elvis_lhs = this.cgw_1.g4v_1;
var tmp = tmp0_elvis_lhs == null ? tmp0_setValue.callableName : tmp0_elvis_lhs;
var tmp$ret$2;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = _set____db54di;
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
return setExtra(_this__u8e3s4, tmp, tmp$ret$2);
};
Companion_12.prototype.mgw = function (_this__u8e3s4) {
var tmp$ret$8;
$l$block: {
// Inline function 'com.soywiz.kds.Property.getValue' call
var tmp0_getValue = mouseHitSearch$factory_0();
var tmp$ret$4;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp1_safe_receiver = _this__u8e3s4.f4v();
var tmp;
if (tmp1_safe_receiver == null) {
tmp = null;
} else {
var tmp$ret$1;
// Inline function 'com.soywiz.kds.get' call
var tmp0_elvis_lhs = this.cgw_1.g4v_1;
var tmp0_get = tmp0_elvis_lhs == null ? tmp0_getValue.callableName : tmp0_elvis_lhs;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp1_safe_receiver;
tmp$ret$1 = tmp$ret$0.get(tmp0_get);
tmp = tmp$ret$1;
}
var tmp1_fastCastTo = tmp;
var tmp$ret$3;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$2;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$2 = tmp1_fastCastTo;
tmp$ret$3 = tmp$ret$2;
tmp$ret$4 = tmp$ret$3;
var res = tmp$ret$4;
if (res == null) {
var r = this.cgw_1.h4v_1();
var tmp_0;
if (!(r == null)) {
tmp_0 = true;
} else {
var tmp2_elvis_lhs = this.cgw_1.g4v_1;
tmp_0 = hasExtra(_this__u8e3s4, tmp2_elvis_lhs == null ? tmp0_getValue.callableName : tmp2_elvis_lhs);
}
if (tmp_0) {
// Inline function 'com.soywiz.kds.Property.setValue' call
var tmp0_elvis_lhs_0 = this.cgw_1.g4v_1;
var tmp_1 = tmp0_elvis_lhs_0 == null ? tmp0_getValue.callableName : tmp0_elvis_lhs_0;
var tmp$ret$7;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp$ret$6;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$5;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$5 = r;
tmp$ret$6 = tmp$ret$5;
tmp$ret$7 = tmp$ret$6;
setExtra(_this__u8e3s4, tmp_1, tmp$ret$7);
}
tmp$ret$8 = r;
break $l$block;
}
tmp$ret$8 = res;
}
return tmp$ret$8;
};
Companion_12.prototype.kgw = function (_this__u8e3s4, _set____db54di) {
var tmp0_setValue = mouseHitResult$factory();
var tmp0_elvis_lhs = this.dgw_1.g4v_1;
var tmp = tmp0_elvis_lhs == null ? tmp0_setValue.callableName : tmp0_elvis_lhs;
var tmp$ret$2;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = _set____db54di;
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
return setExtra(_this__u8e3s4, tmp, tmp$ret$2);
};
Companion_12.prototype.lgw = function (_this__u8e3s4) {
var tmp$ret$8;
$l$block: {
// Inline function 'com.soywiz.kds.Property.getValue' call
var tmp0_getValue = mouseHitResult$factory_0();
var tmp$ret$4;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp1_safe_receiver = _this__u8e3s4.f4v();
var tmp;
if (tmp1_safe_receiver == null) {
tmp = null;
} else {
var tmp$ret$1;
// Inline function 'com.soywiz.kds.get' call
var tmp0_elvis_lhs = this.dgw_1.g4v_1;
var tmp0_get = tmp0_elvis_lhs == null ? tmp0_getValue.callableName : tmp0_elvis_lhs;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp1_safe_receiver;
tmp$ret$1 = tmp$ret$0.get(tmp0_get);
tmp = tmp$ret$1;
}
var tmp1_fastCastTo = tmp;
var tmp$ret$3;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$2;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$2 = tmp1_fastCastTo;
tmp$ret$3 = tmp$ret$2;
tmp$ret$4 = tmp$ret$3;
var res = tmp$ret$4;
if (res == null) {
var r = this.dgw_1.h4v_1();
var tmp_0;
if (!(r == null)) {
tmp_0 = true;
} else {
var tmp2_elvis_lhs = this.dgw_1.g4v_1;
tmp_0 = hasExtra(_this__u8e3s4, tmp2_elvis_lhs == null ? tmp0_getValue.callableName : tmp2_elvis_lhs);
}
if (tmp_0) {
// Inline function 'com.soywiz.kds.Property.setValue' call
var tmp0_elvis_lhs_0 = this.dgw_1.g4v_1;
var tmp_1 = tmp0_elvis_lhs_0 == null ? tmp0_getValue.callableName : tmp0_elvis_lhs_0;
var tmp$ret$7;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp$ret$6;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$5;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$5 = r;
tmp$ret$6 = tmp$ret$5;
tmp$ret$7 = tmp$ret$6;
setExtra(_this__u8e3s4, tmp_1, tmp$ret$7);
}
tmp$ret$8 = r;
break $l$block;
}
tmp$ret$8 = res;
}
return tmp$ret$8;
};
Companion_12.prototype.sgw = function (_this__u8e3s4, _set____db54di) {
var tmp0_setValue = mouseHitResultUsed$factory();
var tmp0_elvis_lhs = this.egw_1.g4v_1;
var tmp = tmp0_elvis_lhs == null ? tmp0_setValue.callableName : tmp0_elvis_lhs;
var tmp$ret$2;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = _set____db54di;
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
return setExtra(_this__u8e3s4, tmp, tmp$ret$2);
};
Companion_12.prototype.rgw = function (_this__u8e3s4) {
var tmp$ret$8;
$l$block: {
// Inline function 'com.soywiz.kds.Property.getValue' call
var tmp0_getValue = mouseHitResultUsed$factory_0();
var tmp$ret$4;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp1_safe_receiver = _this__u8e3s4.f4v();
var tmp;
if (tmp1_safe_receiver == null) {
tmp = null;
} else {
var tmp$ret$1;
// Inline function 'com.soywiz.kds.get' call
var tmp0_elvis_lhs = this.egw_1.g4v_1;
var tmp0_get = tmp0_elvis_lhs == null ? tmp0_getValue.callableName : tmp0_elvis_lhs;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp1_safe_receiver;
tmp$ret$1 = tmp$ret$0.get(tmp0_get);
tmp = tmp$ret$1;
}
var tmp1_fastCastTo = tmp;
var tmp$ret$3;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$2;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$2 = tmp1_fastCastTo;
tmp$ret$3 = tmp$ret$2;
tmp$ret$4 = tmp$ret$3;
var res = tmp$ret$4;
if (res == null) {
var r = this.egw_1.h4v_1();
var tmp_0;
if (!(r == null)) {
tmp_0 = true;
} else {
var tmp2_elvis_lhs = this.egw_1.g4v_1;
tmp_0 = hasExtra(_this__u8e3s4, tmp2_elvis_lhs == null ? tmp0_getValue.callableName : tmp2_elvis_lhs);
}
if (tmp_0) {
// Inline function 'com.soywiz.kds.Property.setValue' call
var tmp0_elvis_lhs_0 = this.egw_1.g4v_1;
var tmp_1 = tmp0_elvis_lhs_0 == null ? tmp0_getValue.callableName : tmp0_elvis_lhs_0;
var tmp$ret$7;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp$ret$6;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$5;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$5 = r;
tmp$ret$6 = tmp$ret$5;
tmp$ret$7 = tmp$ret$6;
setExtra(_this__u8e3s4, tmp_1, tmp$ret$7);
}
tmp$ret$8 = r;
break $l$block;
}
tmp$ret$8 = res;
}
return tmp$ret$8;
};
Companion_12.prototype.tgw = function (_this__u8e3s4, _set____db54di) {
var tmp0_setValue = mouseDebugHandlerOnce$factory();
var tmp0_elvis_lhs = this.fgw_1.g4v_1;
var tmp = tmp0_elvis_lhs == null ? tmp0_setValue.callableName : tmp0_elvis_lhs;
var tmp$ret$2;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = _set____db54di;
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
return setExtra(_this__u8e3s4, tmp, tmp$ret$2);
};
Companion_12.prototype.ugw = function (_this__u8e3s4) {
var tmp$ret$8;
$l$block: {
// Inline function 'com.soywiz.kds.Property.getValue' call
var tmp0_getValue = mouseDebugHandlerOnce$factory_0();
var tmp$ret$4;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp1_safe_receiver = _this__u8e3s4.f4v();
var tmp;
if (tmp1_safe_receiver == null) {
tmp = null;
} else {
var tmp$ret$1;
// Inline function 'com.soywiz.kds.get' call
var tmp0_elvis_lhs = this.fgw_1.g4v_1;
var tmp0_get = tmp0_elvis_lhs == null ? tmp0_getValue.callableName : tmp0_elvis_lhs;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp1_safe_receiver;
tmp$ret$1 = tmp$ret$0.get(tmp0_get);
tmp = tmp$ret$1;
}
var tmp1_fastCastTo = tmp;
var tmp$ret$3;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$2;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$2 = tmp1_fastCastTo;
tmp$ret$3 = tmp$ret$2;
tmp$ret$4 = tmp$ret$3;
var res = tmp$ret$4;
if (res == null) {
var r = this.fgw_1.h4v_1();
var tmp_0;
if (!(r == null)) {
tmp_0 = true;
} else {
var tmp2_elvis_lhs = this.fgw_1.g4v_1;
tmp_0 = hasExtra(_this__u8e3s4, tmp2_elvis_lhs == null ? tmp0_getValue.callableName : tmp2_elvis_lhs);
}
if (tmp_0) {
// Inline function 'com.soywiz.kds.Property.setValue' call
var tmp0_elvis_lhs_0 = this.fgw_1.g4v_1;
var tmp_1 = tmp0_elvis_lhs_0 == null ? tmp0_getValue.callableName : tmp0_elvis_lhs_0;
var tmp$ret$7;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp$ret$6;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$5;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$5 = r;
tmp$ret$6 = tmp$ret$5;
tmp$ret$7 = tmp$ret$6;
setExtra(_this__u8e3s4, tmp_1, tmp$ret$7);
}
tmp$ret$8 = r;
break $l$block;
}
tmp$ret$8 = res;
}
return tmp$ret$8;
};
Companion_12.prototype.vgw = function (views) {
// Inline function 'com.soywiz.korio.util.Once.invoke' call
var tmp0_invoke = this.ugw(views);
if (!tmp0_invoke.q6u_1) {
tmp0_invoke.q6u_1 = true;
// Inline function 'com.soywiz.korge.input.Companion.installDebugExtensionOnce.<anonymous>' call
var tmp0_this = views;
// Inline function 'kotlin.collections.plusAssign' call
var tmp0_plusAssign = tmp0_this.rfx_1;
tmp0_plusAssign.c(MouseEvents$Companion$installDebugExtensionOnce$lambda(views));
}
};
Companion_12.$metadata$ = objectMeta('Companion');
var Companion_instance_12;
function Companion_getInstance_44() {
if (Companion_instance_12 == null)
new Companion_12();
return Companion_instance_12;
}
function MouseEventsUpdate($outer, view) {
this.ygw_1 = $outer;
this.wgw_1 = view;
var tmp = this;
tmp.xgw_1 = Mixin_init_$Create$(null, 1, null);
}
MouseEventsUpdate.prototype.n2u = function () {
return this.wgw_1;
};
MouseEventsUpdate.prototype.e4v = function (_set____db54di) {
this.xgw_1.e4v(_set____db54di);
};
MouseEventsUpdate.prototype.f4v = function () {
return this.xgw_1.f4v();
};
MouseEventsUpdate.prototype.cg8 = function (views, dt) {
this.ygw_1.cg8(views, dt);
};
MouseEventsUpdate.$metadata$ = classMeta('MouseEventsUpdate', [UpdateComponentWithViews, Extra]);
function temporalLastEvent($this, lastEventNew, block) {
var old = $this.agf_1;
var tmp = $this;
var tmp0_elvis_lhs = lastEventNew;
tmp.agf_1 = tmp0_elvis_lhs == null ? $this.agf_1 : tmp0_elvis_lhs;
try {
return block();
}finally {
$this.agf_1 = old;
}
}
function MouseEvents$_mouseEvent$lambda$slambda($handler, $it, resultContinuation) {
this.hgx_1 = $handler;
this.igx_1 = $it;
CoroutineImpl.call(this, resultContinuation);
}
MouseEvents$_mouseEvent$lambda$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
MouseEvents$_mouseEvent$lambda$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
MouseEvents$_mouseEvent$lambda$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.hgx_1(this.igx_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
MouseEvents$_mouseEvent$lambda$slambda.prototype.k53 = function (completion) {
var i = new MouseEvents$_mouseEvent$lambda$slambda(this.hgx_1, this.igx_1, completion);
return i;
};
MouseEvents$_mouseEvent$lambda$slambda.$metadata$ = classMeta('MouseEvents$_mouseEvent$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function MouseEvents$_mouseEvent$lambda$slambda_0($handler, $it, resultContinuation) {
var i = new MouseEvents$_mouseEvent$lambda$slambda($handler, $it, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function MouseEvents$_mouseEvent$lambda(this$0, $handler) {
return function (it) {
var tmp = this$0.b1u();
launchImmediately_0(tmp, MouseEvents$_mouseEvent$lambda$slambda_0($handler, it, null));
return Unit_getInstance();
};
}
function MouseEvents$onOver$lambda$slambda($handler, $it, resultContinuation) {
this.rgx_1 = $handler;
this.sgx_1 = $it;
CoroutineImpl.call(this, resultContinuation);
}
MouseEvents$onOver$lambda$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
MouseEvents$onOver$lambda$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
MouseEvents$onOver$lambda$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.rgx_1(this.sgx_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
MouseEvents$onOver$lambda$slambda.prototype.k53 = function (completion) {
var i = new MouseEvents$onOver$lambda$slambda(this.rgx_1, this.sgx_1, completion);
return i;
};
MouseEvents$onOver$lambda$slambda.$metadata$ = classMeta('MouseEvents$onOver$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function MouseEvents$onOver$lambda$slambda_0($handler, $it, resultContinuation) {
var i = new MouseEvents$onOver$lambda$slambda($handler, $it, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function MouseEvents$onOver$lambda(this$0, $handler) {
return function (it) {
var tmp = this$0.b1u();
launchImmediately_0(tmp, MouseEvents$onOver$lambda$slambda_0($handler, it, null));
return Unit_getInstance();
};
}
function MouseEvents$onOut$lambda$slambda($handler, $it, resultContinuation) {
this.bgy_1 = $handler;
this.cgy_1 = $it;
CoroutineImpl.call(this, resultContinuation);
}
MouseEvents$onOut$lambda$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
MouseEvents$onOut$lambda$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
MouseEvents$onOut$lambda$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.bgy_1(this.cgy_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
MouseEvents$onOut$lambda$slambda.prototype.k53 = function (completion) {
var i = new MouseEvents$onOut$lambda$slambda(this.bgy_1, this.cgy_1, completion);
return i;
};
MouseEvents$onOut$lambda$slambda.$metadata$ = classMeta('MouseEvents$onOut$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function MouseEvents$onOut$lambda$slambda_0($handler, $it, resultContinuation) {
var i = new MouseEvents$onOut$lambda$slambda($handler, $it, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function MouseEvents$onOut$lambda(this$0, $handler) {
return function (it) {
var tmp = this$0.b1u();
launchImmediately_0(tmp, MouseEvents$onOut$lambda$slambda_0($handler, it, null));
return Unit_getInstance();
};
}
function MouseEvents$onDown$lambda$slambda($handler, $it, resultContinuation) {
this.lgy_1 = $handler;
this.mgy_1 = $it;
CoroutineImpl.call(this, resultContinuation);
}
MouseEvents$onDown$lambda$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
MouseEvents$onDown$lambda$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
MouseEvents$onDown$lambda$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.lgy_1(this.mgy_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
MouseEvents$onDown$lambda$slambda.prototype.k53 = function (completion) {
var i = new MouseEvents$onDown$lambda$slambda(this.lgy_1, this.mgy_1, completion);
return i;
};
MouseEvents$onDown$lambda$slambda.$metadata$ = classMeta('MouseEvents$onDown$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function MouseEvents$onDown$lambda$slambda_0($handler, $it, resultContinuation) {
var i = new MouseEvents$onDown$lambda$slambda($handler, $it, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function MouseEvents$onDown$lambda(this$0, $handler) {
return function (it) {
var tmp = this$0.b1u();
launchImmediately_0(tmp, MouseEvents$onDown$lambda$slambda_0($handler, it, null));
return Unit_getInstance();
};
}
function MouseEvents$onUpAnywhere$lambda$slambda($handler, $it, resultContinuation) {
this.vgy_1 = $handler;
this.wgy_1 = $it;
CoroutineImpl.call(this, resultContinuation);
}
MouseEvents$onUpAnywhere$lambda$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
MouseEvents$onUpAnywhere$lambda$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
MouseEvents$onUpAnywhere$lambda$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.vgy_1(this.wgy_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
MouseEvents$onUpAnywhere$lambda$slambda.prototype.k53 = function (completion) {
var i = new MouseEvents$onUpAnywhere$lambda$slambda(this.vgy_1, this.wgy_1, completion);
return i;
};
MouseEvents$onUpAnywhere$lambda$slambda.$metadata$ = classMeta('MouseEvents$onUpAnywhere$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function MouseEvents$onUpAnywhere$lambda$slambda_0($handler, $it, resultContinuation) {
var i = new MouseEvents$onUpAnywhere$lambda$slambda($handler, $it, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function MouseEvents$onUpAnywhere$lambda(this$0, $handler) {
return function (it) {
var tmp = this$0.b1u();
launchImmediately_0(tmp, MouseEvents$onUpAnywhere$lambda$slambda_0($handler, it, null));
return Unit_getInstance();
};
}
function MouseEvents$_mouseEventCloseable$lambda$slambda($handler, $it, resultContinuation) {
this.fgz_1 = $handler;
this.ggz_1 = $it;
CoroutineImpl.call(this, resultContinuation);
}
MouseEvents$_mouseEventCloseable$lambda$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
MouseEvents$_mouseEventCloseable$lambda$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
MouseEvents$_mouseEventCloseable$lambda$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.fgz_1(this.ggz_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
MouseEvents$_mouseEventCloseable$lambda$slambda.prototype.k53 = function (completion) {
var i = new MouseEvents$_mouseEventCloseable$lambda$slambda(this.fgz_1, this.ggz_1, completion);
return i;
};
MouseEvents$_mouseEventCloseable$lambda$slambda.$metadata$ = classMeta('MouseEvents$_mouseEventCloseable$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function MouseEvents$_mouseEventCloseable$lambda$slambda_0($handler, $it, resultContinuation) {
var i = new MouseEvents$_mouseEventCloseable$lambda$slambda($handler, $it, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function MouseEvents$_mouseEventCloseable$lambda(this$0, $handler) {
return function (it) {
var tmp = this$0.b1u();
launchImmediately_0(tmp, MouseEvents$_mouseEventCloseable$lambda$slambda_0($handler, it, null));
return Unit_getInstance();
};
}
function MouseEvents$onDownCloseable$lambda$slambda($handler, $it, resultContinuation) {
this.pgz_1 = $handler;
this.qgz_1 = $it;
CoroutineImpl.call(this, resultContinuation);
}
MouseEvents$onDownCloseable$lambda$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
MouseEvents$onDownCloseable$lambda$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
MouseEvents$onDownCloseable$lambda$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.pgz_1(this.qgz_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
MouseEvents$onDownCloseable$lambda$slambda.prototype.k53 = function (completion) {
var i = new MouseEvents$onDownCloseable$lambda$slambda(this.pgz_1, this.qgz_1, completion);
return i;
};
MouseEvents$onDownCloseable$lambda$slambda.$metadata$ = classMeta('MouseEvents$onDownCloseable$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function MouseEvents$onDownCloseable$lambda$slambda_0($handler, $it, resultContinuation) {
var i = new MouseEvents$onDownCloseable$lambda$slambda($handler, $it, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function MouseEvents$onDownCloseable$lambda(this$0, $handler) {
return function (it) {
var tmp = this$0.b1u();
launchImmediately_0(tmp, MouseEvents$onDownCloseable$lambda$slambda_0($handler, it, null));
return Unit_getInstance();
};
}
function MouseEvents$onUpAnywhereCloseable$lambda$slambda($handler, $it, resultContinuation) {
this.zgz_1 = $handler;
this.ah0_1 = $it;
CoroutineImpl.call(this, resultContinuation);
}
MouseEvents$onUpAnywhereCloseable$lambda$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
MouseEvents$onUpAnywhereCloseable$lambda$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
MouseEvents$onUpAnywhereCloseable$lambda$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.zgz_1(this.ah0_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
MouseEvents$onUpAnywhereCloseable$lambda$slambda.prototype.k53 = function (completion) {
var i = new MouseEvents$onUpAnywhereCloseable$lambda$slambda(this.zgz_1, this.ah0_1, completion);
return i;
};
MouseEvents$onUpAnywhereCloseable$lambda$slambda.$metadata$ = classMeta('MouseEvents$onUpAnywhereCloseable$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function MouseEvents$onUpAnywhereCloseable$lambda$slambda_0($handler, $it, resultContinuation) {
var i = new MouseEvents$onUpAnywhereCloseable$lambda$slambda($handler, $it, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function MouseEvents$onUpAnywhereCloseable$lambda(this$0, $handler) {
return function (it) {
var tmp = this$0.b1u();
launchImmediately_0(tmp, MouseEvents$onUpAnywhereCloseable$lambda$slambda_0($handler, it, null));
return Unit_getInstance();
};
}
function MouseEvents$onMoveAnywhereCloseable$lambda$slambda($handler, $it, resultContinuation) {
this.jh0_1 = $handler;
this.kh0_1 = $it;
CoroutineImpl.call(this, resultContinuation);
}
MouseEvents$onMoveAnywhereCloseable$lambda$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
MouseEvents$onMoveAnywhereCloseable$lambda$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
MouseEvents$onMoveAnywhereCloseable$lambda$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.jh0_1(this.kh0_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
MouseEvents$onMoveAnywhereCloseable$lambda$slambda.prototype.k53 = function (completion) {
var i = new MouseEvents$onMoveAnywhereCloseable$lambda$slambda(this.jh0_1, this.kh0_1, completion);
return i;
};
MouseEvents$onMoveAnywhereCloseable$lambda$slambda.$metadata$ = classMeta('MouseEvents$onMoveAnywhereCloseable$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function MouseEvents$onMoveAnywhereCloseable$lambda$slambda_0($handler, $it, resultContinuation) {
var i = new MouseEvents$onMoveAnywhereCloseable$lambda$slambda($handler, $it, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function MouseEvents$onMoveAnywhereCloseable$lambda(this$0, $handler) {
return function (it) {
var tmp = this$0.b1u();
launchImmediately_0(tmp, MouseEvents$onMoveAnywhereCloseable$lambda$slambda_0($handler, it, null));
return Unit_getInstance();
};
}
function MouseEvents$update$lambda($over, this$0) {
return function () {
var tmp;
if ($over) {
this$0.qgd_1.k54(this$0);
tmp = Unit_getInstance();
} else {
this$0.rgd_1.k54(this$0);
this$0.tgd_1.k54(this$0);
tmp = Unit_getInstance();
}
this$0.ugd_1.k54(this$0);
return Unit_getInstance();
};
}
function MouseEvents(view) {
Companion_getInstance_44();
this.ggd_1 = view;
var tmp = this;
tmp.hgd_1 = Mixin_init_$Create$(null, 1, null);
this.ggd_1.lh0(true);
var tmp_0 = this;
tmp_0.jgd_1 = Signal_init_$Create$(null, 1, null);
var tmp_1 = this;
tmp_1.kgd_1 = Signal_init_$Create$(null, 1, null);
var tmp_2 = this;
tmp_2.lgd_1 = Signal_init_$Create$(null, 1, null);
var tmp_3 = this;
tmp_3.mgd_1 = Signal_init_$Create$(null, 1, null);
var tmp_4 = this;
tmp_4.ngd_1 = Signal_init_$Create$(null, 1, null);
var tmp_5 = this;
tmp_5.ogd_1 = Signal_init_$Create$(null, 1, null);
var tmp_6 = this;
tmp_6.pgd_1 = Signal_init_$Create$(null, 1, null);
var tmp_7 = this;
tmp_7.qgd_1 = Signal_init_$Create$(null, 1, null);
var tmp_8 = this;
tmp_8.rgd_1 = Signal_init_$Create$(null, 1, null);
var tmp_9 = this;
tmp_9.sgd_1 = Signal_init_$Create$(null, 1, null);
var tmp_10 = this;
tmp_10.tgd_1 = Signal_init_$Create$(null, 1, null);
var tmp_11 = this;
tmp_11.ugd_1 = Signal_init_$Create$(null, 1, null);
var tmp_12 = this;
tmp_12.vgd_1 = Signal_init_$Create$(null, 1, null);
var tmp_13 = this;
tmp_13.wgd_1 = Signal_init_$Create$(null, 1, null);
var tmp_14 = this;
tmp_14.xgd_1 = Signal_init_$Create$(null, 1, null);
var tmp_15 = this;
tmp_15.ygd_1 = Signal_init_$Create$(null, 1, null);
var tmp_16 = this;
tmp_16.zgd_1 = Signal_init_$Create$(null, 1, null);
var tmp_17 = this;
tmp_17.age_1 = Signal_init_$Create$(null, 1, null);
var tmp_18 = this;
tmp_18.bge_1 = Signal_init_$Create$(null, 1, null);
this.cge_1 = null;
this.dge_1 = false;
this.ege_1 = false;
this.fge_1 = false;
this.gge_1 = PerformanceCounter_getInstance().x1h();
this.hge_1 = PerformanceCounter_getInstance().x1h();
this.ige_1 = Companion_getInstance_8().zp();
this.jge_1 = Companion_getInstance_8().zp();
this.kge_1 = Companion_getInstance_8().zp();
this.lge_1 = Companion_getInstance_8().zp();
this.mge_1 = Companion_getInstance_8().zp();
this.nge_1 = Companion_getInstance_8().zp();
this.oge_1 = Companion_getInstance_8().zp();
this.pge_1 = Companion_getInstance_8().zp();
this.qge_1 = Companion_getInstance_8().zp();
this.rge_1 = Companion_getInstance_8().zp();
this.sge_1 = Companion_getInstance_8().zp();
this.tge_1 = Companion_getInstance_8().zp();
this.uge_1 = Companion_getInstance_8().zp();
this.vge_1 = Companion_getInstance_8().zp();
this.wge_1 = Companion_getInstance_8().zp();
this.xge_1 = 0;
this.yge_1 = false;
this.zge_1 = null;
var tmp_19 = this;
tmp_19.agf_1 = MouseEvent_init_$Create$(null, 0, 0, 0, null, 0, 0.0, 0.0, 0.0, false, false, false, false, false, false, null, 65535, null);
this.bgf_1 = false;
var tmp_20 = this;
tmp_20.cgf_1 = MouseEvent_init_$Create$(null, 0, 0, 0, null, 0, 0.0, 0.0, 0.0, false, false, false, false, false, false, null, 65535, null);
this.dgf_1 = attach(new MouseEventsUpdate(this, this.ggd_1));
}
MouseEvents.prototype.n2u = function () {
return this.ggd_1;
};
MouseEvents.prototype.e4v = function (_set____db54di) {
this.hgd_1.e4v(_set____db54di);
};
MouseEvents.prototype.f4v = function () {
return this.hgd_1.f4v();
};
MouseEvents.prototype.mh0 = function () {
var tmp = this.igd_1;
if (!(tmp == null))
return tmp;
else {
throwUninitializedPropertyAccessException('views');
}
};
MouseEvents.prototype.b1u = function () {
return this.mh0().bfw_1;
};
MouseEvents.prototype.fgh = function () {
return this.mh0().efw_1;
};
MouseEvents.prototype.nh0 = function () {
return this.jgd_1;
};
MouseEvents.prototype.oh0 = function () {
return this.lgd_1;
};
MouseEvents.prototype.l6t = function () {
return this.mgd_1;
};
MouseEvents.prototype.ph0 = function () {
return this.ngd_1;
};
MouseEvents.prototype.qh0 = function () {
return this.ogd_1;
};
MouseEvents.prototype.rh0 = function () {
return this.rgd_1;
};
MouseEvents.prototype.sh0 = function () {
return this.ugd_1;
};
MouseEvents.prototype.th0 = function () {
return this.wgd_1;
};
MouseEvents.prototype.uh0 = function () {
return this.zgd_1;
};
MouseEvents.prototype.vh0 = function (prop, handler) {
var tmp = prop.get(this);
tmp.d54(MouseEvents$_mouseEvent$lambda(this, handler));
return this;
};
MouseEvents.prototype.wh0 = function (handler) {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.input.MouseEvents._mouseEvent' call
var tmp0__mouseEvent = over$factory();
var tmp = tmp0__mouseEvent.get(this);
tmp.d54(MouseEvents$onOver$lambda(this, handler));
tmp$ret$0 = this;
return tmp$ret$0;
};
MouseEvents.prototype.xh0 = function (handler) {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.input.MouseEvents._mouseEvent' call
var tmp0__mouseEvent = out$factory();
var tmp = tmp0__mouseEvent.get(this);
tmp.d54(MouseEvents$onOut$lambda(this, handler));
tmp$ret$0 = this;
return tmp$ret$0;
};
MouseEvents.prototype.yh0 = function (handler) {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.input.MouseEvents._mouseEvent' call
var tmp0__mouseEvent = down$factory_0();
var tmp = tmp0__mouseEvent.get(this);
tmp.d54(MouseEvents$onDown$lambda(this, handler));
tmp$ret$0 = this;
return tmp$ret$0;
};
MouseEvents.prototype.zh0 = function (handler) {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.input.MouseEvents._mouseEvent' call
var tmp0__mouseEvent = upAnywhere$factory_0();
var tmp = tmp0__mouseEvent.get(this);
tmp.d54(MouseEvents$onUpAnywhere$lambda(this, handler));
tmp$ret$0 = this;
return tmp$ret$0;
};
MouseEvents.prototype.ah1 = function (prop, handler) {
var tmp = prop.get(this);
return tmp.d54(MouseEvents$_mouseEventCloseable$lambda(this, handler));
};
MouseEvents.prototype.bh1 = function (handler) {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.input.MouseEvents._mouseEventCloseable' call
var tmp0__mouseEventCloseable = down$factory_1();
var tmp = tmp0__mouseEventCloseable.get(this);
tmp$ret$0 = tmp.d54(MouseEvents$onDownCloseable$lambda(this, handler));
return tmp$ret$0;
};
MouseEvents.prototype.ch1 = function (handler) {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.input.MouseEvents._mouseEventCloseable' call
var tmp0__mouseEventCloseable = upAnywhere$factory_1();
var tmp = tmp0__mouseEventCloseable.get(this);
tmp$ret$0 = tmp.d54(MouseEvents$onUpAnywhereCloseable$lambda(this, handler));
return tmp$ret$0;
};
MouseEvents.prototype.dh1 = function (handler) {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.input.MouseEvents._mouseEventCloseable' call
var tmp0__mouseEventCloseable = moveAnywhere$factory_0();
var tmp = tmp0__mouseEventCloseable.get(this);
tmp$ret$0 = tmp.d54(MouseEvents$onMoveAnywhereCloseable$lambda(this, handler));
return tmp$ret$0;
};
MouseEvents.prototype.eh1 = function () {
return this.ggd_1.fh1(this.lge_1, this.qge_1);
};
MouseEvents.prototype.gh1 = function () {
return this.ggd_1.fh1(this.mge_1, this.rge_1);
};
MouseEvents.prototype.ic3 = function () {
var tmp0_safe_receiver = this.zge_1;
if (tmp0_safe_receiver == null)
null;
else {
tmp0_safe_receiver.ic3();
}
};
MouseEvents.prototype.hh1 = function () {
var tmp0_safe_receiver = this.cge_1;
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hasAncestor(tmp0_safe_receiver, this.ggd_1);
return tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
};
MouseEvents.prototype.ih1 = function () {
return this.agf_1.nc4_1;
};
MouseEvents.prototype.tc5 = function () {
var tmp$ret$0;
// Inline function 'com.soywiz.korev.MouseEvent.scrollDeltaXPixels' call
var tmp0__get_scrollDeltaXPixels__ye1nk9 = this.agf_1;
tmp$ret$0 = tmp0__get_scrollDeltaXPixels__ye1nk9.qc5(ScrollDeltaMode_PIXEL_getInstance());
return tmp$ret$0;
};
MouseEvents.prototype.uc5 = function () {
var tmp$ret$0;
// Inline function 'com.soywiz.korev.MouseEvent.scrollDeltaYPixels' call
var tmp0__get_scrollDeltaYPixels__5kf6i2 = this.agf_1;
tmp$ret$0 = tmp0__get_scrollDeltaYPixels__5kf6i2.rc5(ScrollDeltaMode_PIXEL_getInstance());
return tmp$ret$0;
};
MouseEvents.prototype.jh1 = function () {
return this.agf_1.uc4_1;
};
MouseEvents.prototype.kh1 = function () {
return !(this.mh0().efw_1.xfz_1 === 0);
};
MouseEvents.prototype.toString = function () {
return this.agf_1.toString();
};
MouseEvents.prototype.wgc = function (views, event) {
if (!this.ggd_1.lh1())
return Unit_getInstance();
this.igd_1 = views;
this.zge_1 = event;
this.agf_1.pc5(event);
this.bgf_1 = event.xc4_1;
this.yge_1 = true;
var tmp0_subject = event.jc4_1;
var tmp0 = tmp0_subject.q2_1;
switch (tmp0) {
case 2:
this.cgf_1.pc5(event);
this.jge_1.u7a(views.efw_1.og0());
;
this.gge_1 = PerformanceCounter_getInstance().x1h();
var elapsedTime = TimeSpan__minus_impl_5w5v8s(this.gge_1, this.hge_1);
if (this.jge_1.z7a(this.ige_1) < views.efw_1.ufz_1 ? TimeSpan__compareTo_impl_zidry4(elapsedTime, views.efw_1.tfz_1) < 0 : false) {
var tmp1_this = this;
var tmp2 = tmp1_this.xge_1;
tmp1_this.xge_1 = tmp2 + 1 | 0;
if (this.hh1()) {
this.kgd_1.k54(this);
if (this.kgd_1.p54() > 0) {
preventDefault(this.ggd_1);
}
}
}
break;
case 3:
this.hge_1 = PerformanceCounter_getInstance().x1h();
this.ige_1.u7a(views.efw_1.og0());
;
if (this.jgd_1.q54()) {
if (this.hh1()) {
this.jgd_1.k54(this);
}
}
break;
case 7:
if (this.hh1()) {
this.zgd_1.k54(this);
} else {
this.bge_1.k54(this);
}
this.age_1.k54(this);
;
break;
default:
;
break;
}
};
MouseEvents.prototype.cg8 = function (views, dt) {
if (!this.ggd_1.lh1())
return Unit_getInstance();
this.igd_1 = views;
Companion_getInstance_44().vgw(views);
this.cge_1 = mouseHitTest(Companion_getInstance_44(), views);
var over = this.hh1();
var inside = views.efw_1.zfz_1;
if (over) {
Companion_getInstance_44().sgw(views.efw_1, this.ggd_1);
}
var overChanged = !(this.dge_1 === over);
var insideChanged = !(this.ege_1 === inside);
var pressingChanged = !(this.kh1() === this.fge_1);
this.mge_1.u7a(views.efw_1.og0());
if ((!overChanged ? over : false) ? !this.mge_1.equals(this.lge_1) : false) {
this.vgd_1.k54(this);
}
if ((!overChanged ? !over : false) ? !this.mge_1.equals(this.lge_1) : false) {
this.xgd_1.k54(this);
}
if (!this.mge_1.equals(this.lge_1)) {
this.wgd_1.k54(this);
}
if (overChanged ? over : false) {
this.lgd_1.k54(this);
}
if (overChanged ? !over : false) {
this.mgd_1.k54(this);
}
if (pressingChanged ? this.kh1() : false) {
this.kge_1.u7a(this.mge_1);
if (over) {
this.ngd_1.k54(this);
}
if (!over) {
this.ogd_1.k54(this);
}
}
if (overChanged ? this.kh1() : false) {
this.pgd_1.k54(this);
}
if (pressingChanged ? !this.kh1() : false) {
var tmp = this.cgf_1;
temporalLastEvent(this, tmp, MouseEvents$update$lambda(over, this));
}
if (over ? this.xge_1 > 0 : false) {
}
if (insideChanged ? !inside : false) {
this.xgd_1.k54(this);
this.mgd_1.k54(this);
this.sgd_1.k54(this);
this.tgd_1.k54(this);
this.ygd_1.k54(this);
}
this.dge_1 = over;
this.ege_1 = inside;
this.fge_1 = this.kh1();
this.lge_1.u7a(this.mge_1);
this.xge_1 = 0;
};
MouseEvents.prototype.x2c = function () {
detach(this);
};
MouseEvents.$metadata$ = classMeta('MouseEvents', [MouseComponent, Extra, Closeable]);
function onClick(_this__u8e3s4, handler) {
init_properties_MouseEvents_kt_sclau();
var tmp$ret$2;
// Inline function 'com.soywiz.korge.input.doMouseEvent' call
var tmp0_doMouseEvent = click$factory();
var tmp0_safe_receiver = _this__u8e3s4;
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_mouse(tmp0_safe_receiver);
if (tmp1_safe_receiver == null)
null;
else {
var tmp$ret$1;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korge.input.doMouseEvent.<anonymous>' call
var tmp = tmp0_doMouseEvent.get(tmp1_safe_receiver);
tmp$ret$0 = tmp.d54(onClick$lambda(tmp1_safe_receiver, handler));
tmp$ret$1 = tmp$ret$0;
}
tmp$ret$2 = _this__u8e3s4;
return tmp$ret$2;
}
function mouse(_this__u8e3s4, callback) {
init_properties_MouseEvents_kt_sclau();
var tmp$ret$0;
// Inline function 'kotlin.run' call
var tmp0_run = get_mouse(_this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
tmp$ret$0 = callback(tmp0_run);
return tmp$ret$0;
}
function doMouseEvent(_this__u8e3s4, prop, handler) {
init_properties_MouseEvents_kt_sclau();
var tmp0_safe_receiver = _this__u8e3s4;
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : get_mouse(tmp0_safe_receiver);
if (tmp1_safe_receiver == null)
null;
else {
var tmp$ret$1;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korge.input.doMouseEvent.<anonymous>' call
var tmp = prop.get(tmp1_safe_receiver);
tmp$ret$0 = tmp.d54(doMouseEvent$lambda(tmp1_safe_receiver, handler));
tmp$ret$1 = tmp$ret$0;
}
return _this__u8e3s4;
}
function doubleClick(_this__u8e3s4, callback) {
init_properties_MouseEvents_kt_sclau();
return multiClick(_this__u8e3s4, 2, callback);
}
function newMouse(_this__u8e3s4, callback) {
init_properties_MouseEvents_kt_sclau();
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp0_also = new MouseEvents(_this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.input.newMouse.<anonymous>' call
_this__u8e3s4.lg8(tmp0_also);
callback(tmp0_also);
tmp$ret$0 = tmp0_also;
return tmp$ret$0;
}
function multiClick(_this__u8e3s4, count, callback) {
init_properties_MouseEvents_kt_sclau();
var clickCount = {_v: 0};
var lastClickTime = {_v: new DateTime(Companion_getInstance_0().z1g_1)};
return _this__u8e3s4.kgd_1.j54(multiClick$lambda(lastClickTime, clickCount, count, callback));
}
function mouse$delegate$lambda($this$$receiver) {
init_properties_MouseEvents_kt_sclau();
var tmp$ret$4;
// Inline function 'com.soywiz.korge.baseview.BaseView.getOrCreateComponentMouse' call
var tmp$ret$3;
// Inline function 'com.soywiz.korge.baseview.BaseView.getOrCreateComponentTyped' call
var tmp0_getOrCreateComponentTyped = Companion_getInstance_35();
var tmp0_safe_receiver = $this$$receiver.gg8(tmp0_getOrCreateComponentTyped);
var tmp;
if (tmp0_safe_receiver == null) {
tmp = null;
} else {
var tmp$ret$1;
$l$block: {
// Inline function 'kotlin.collections.firstOrNull' call
var tmp0_iterator = tmp0_safe_receiver.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l();
var tmp$ret$0;
// Inline function 'com.soywiz.korge.baseview.BaseView.getOrCreateComponentTyped.<anonymous>' call
tmp$ret$0 = element instanceof MouseEvents;
if (tmp$ret$0) {
tmp$ret$1 = element;
break $l$block;
}
}
tmp$ret$1 = null;
}
tmp = tmp$ret$1;
}
var tmp_0 = tmp;
var tmp1_elvis_lhs = (tmp_0 == null ? true : tmp_0 instanceof MouseEvents) ? tmp_0 : null;
var tmp_1;
if (tmp1_elvis_lhs == null) {
var tmp$ret$2;
// Inline function 'com.soywiz.korge.input.mouse$delegate.<anonymous>.<anonymous>' call
tmp$ret$2 = new MouseEvents($this$$receiver);
var tmp_2 = $this$$receiver.lg8(tmp$ret$2);
tmp_1 = tmp_2 instanceof MouseEvents ? tmp_2 : THROW_CCE();
} else {
tmp_1 = tmp1_elvis_lhs;
}
tmp$ret$3 = tmp_1;
var tmp_3 = tmp$ret$3;
tmp$ret$4 = tmp_3 instanceof MouseEvents ? tmp_3 : THROW_CCE();
return tmp$ret$4;
}
function cursor$delegate$lambda() {
init_properties_MouseEvents_kt_sclau();
return null;
}
function onClick$lambda$slambda($handler, $it, resultContinuation) {
this.uh1_1 = $handler;
this.vh1_1 = $it;
CoroutineImpl.call(this, resultContinuation);
}
onClick$lambda$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
onClick$lambda$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
onClick$lambda$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.uh1_1(this.vh1_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
onClick$lambda$slambda.prototype.k53 = function (completion) {
var i = new onClick$lambda$slambda(this.uh1_1, this.vh1_1, completion);
return i;
};
onClick$lambda$slambda.$metadata$ = classMeta('onClick$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function onClick$lambda$slambda_0($handler, $it, resultContinuation) {
var i = new onClick$lambda$slambda($handler, $it, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function onClick$lambda($tmp1_safe_receiver, $handler) {
return function (it) {
var tmp = $tmp1_safe_receiver.b1u();
launchImmediately_0(tmp, onClick$lambda$slambda_0($handler, it, null));
return Unit_getInstance();
};
}
function doMouseEvent$lambda$slambda($handler, $it, resultContinuation) {
this.eh2_1 = $handler;
this.fh2_1 = $it;
CoroutineImpl.call(this, resultContinuation);
}
doMouseEvent$lambda$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
doMouseEvent$lambda$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
doMouseEvent$lambda$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.eh2_1(this.fh2_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
doMouseEvent$lambda$slambda.prototype.k53 = function (completion) {
var i = new doMouseEvent$lambda$slambda(this.eh2_1, this.fh2_1, completion);
return i;
};
doMouseEvent$lambda$slambda.$metadata$ = classMeta('doMouseEvent$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function doMouseEvent$lambda$slambda_0($handler, $it, resultContinuation) {
var i = new doMouseEvent$lambda$slambda($handler, $it, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function doMouseEvent$lambda($tmp1_safe_receiver, $handler) {
return function (it) {
var tmp = $tmp1_safe_receiver.b1u();
launchImmediately_0(tmp, doMouseEvent$lambda$slambda_0($handler, it, null));
return Unit_getInstance();
};
}
function multiClick$lambda($lastClickTime, $clickCount, $count, $callback) {
return function (it) {
var currentClickTime = Companion_getInstance_0().d1h();
var tmp;
var tmp_0 = DateTime__minus_impl_10njw8(currentClickTime, $lastClickTime._v.p1h_1);
var tmp$ret$0;
// Inline function 'com.soywiz.klock.seconds' call
tmp$ret$0 = Companion_getInstance_1().c1i(0.3);
if (TimeSpan__compareTo_impl_zidry4(tmp_0, tmp$ret$0) > 0) {
$clickCount._v = 0;
tmp = Unit_getInstance();
}
$lastClickTime._v = new DateTime(currentClickTime);
var tmp0 = $clickCount._v;
$clickCount._v = tmp0 + 1 | 0;
it.xge_1 = $clickCount._v;
var tmp_1;
if ($clickCount._v === $count) {
tmp_1 = $callback(it);
}
return Unit_getInstance();
};
}
function mouse$factory() {
return getPropertyCallableRef('mouse', 1, KProperty1, function (receiver) {
return get_mouse(receiver);
}, null);
}
function cursor$factory() {
return getPropertyCallableRef('cursor', 1, KMutableProperty1, function (receiver) {
return get_cursor(receiver);
}, function (receiver, value) {
return set_cursor(receiver, value);
});
}
function cursor$factory_0() {
return getPropertyCallableRef('cursor', 1, KMutableProperty1, function (receiver) {
return get_cursor(receiver);
}, function (receiver, value) {
return set_cursor(receiver, value);
});
}
function mouseHitSearch$factory() {
return getPropertyCallableRef('mouseHitSearch', 2, KMutableProperty2, function (receiver1, receiver2) {
return receiver1.mgw(receiver2);
}, function (receiver1, receiver2, value) {
return receiver1.ggw(receiver2, value);
});
}
function mouseHitSearch$factory_0() {
return getPropertyCallableRef('mouseHitSearch', 2, KMutableProperty2, function (receiver1, receiver2) {
return receiver1.mgw(receiver2);
}, function (receiver1, receiver2, value) {
return receiver1.ggw(receiver2, value);
});
}
function mouseHitResult$factory() {
return getPropertyCallableRef('mouseHitResult', 2, KMutableProperty2, function (receiver1, receiver2) {
return receiver1.lgw(receiver2);
}, function (receiver1, receiver2, value) {
return receiver1.kgw(receiver2, value);
});
}
function mouseHitResult$factory_0() {
return getPropertyCallableRef('mouseHitResult', 2, KMutableProperty2, function (receiver1, receiver2) {
return receiver1.lgw(receiver2);
}, function (receiver1, receiver2, value) {
return receiver1.kgw(receiver2, value);
});
}
function mouseHitResultUsed$factory() {
return getPropertyCallableRef('mouseHitResultUsed', 2, KMutableProperty2, function (receiver1, receiver2) {
return receiver1.rgw(receiver2);
}, function (receiver1, receiver2, value) {
return receiver1.sgw(receiver2, value);
});
}
function mouseHitResultUsed$factory_0() {
return getPropertyCallableRef('mouseHitResultUsed', 2, KMutableProperty2, function (receiver1, receiver2) {
return receiver1.rgw(receiver2);
}, function (receiver1, receiver2, value) {
return receiver1.sgw(receiver2, value);
});
}
function mouseDebugHandlerOnce$factory() {
return getPropertyCallableRef('mouseDebugHandlerOnce', 2, KMutableProperty2, function (receiver1, receiver2) {
return receiver1.ugw(receiver2);
}, function (receiver1, receiver2, value) {
return receiver1.tgw(receiver2, value);
});
}
function mouseDebugHandlerOnce$factory_0() {
return getPropertyCallableRef('mouseDebugHandlerOnce', 2, KMutableProperty2, function (receiver1, receiver2) {
return receiver1.ugw(receiver2);
}, function (receiver1, receiver2, value) {
return receiver1.tgw(receiver2, value);
});
}
function over$factory() {
return getPropertyCallableRef('over', 1, KProperty1, function (receiver) {
return receiver.lgd_1;
}, null);
}
function out$factory() {
return getPropertyCallableRef('out', 1, KProperty1, function (receiver) {
return receiver.mgd_1;
}, null);
}
function down$factory_0() {
return getPropertyCallableRef('down', 1, KProperty1, function (receiver) {
return receiver.ngd_1;
}, null);
}
function upAnywhere$factory_0() {
return getPropertyCallableRef('upAnywhere', 1, KProperty1, function (receiver) {
return receiver.ugd_1;
}, null);
}
function down$factory_1() {
return getPropertyCallableRef('down', 1, KProperty1, function (receiver) {
return receiver.ngd_1;
}, null);
}
function upAnywhere$factory_1() {
return getPropertyCallableRef('upAnywhere', 1, KProperty1, function (receiver) {
return receiver.ugd_1;
}, null);
}
function moveAnywhere$factory_0() {
return getPropertyCallableRef('moveAnywhere', 1, KProperty1, function (receiver) {
return receiver.wgd_1;
}, null);
}
function click$factory() {
return getPropertyCallableRef('click', 1, KProperty1, function (receiver) {
return receiver.kgd_1;
}, null);
}
var properties_initialized_MouseEvents_kt_t0zz8y;
function init_properties_MouseEvents_kt_sclau() {
if (properties_initialized_MouseEvents_kt_t0zz8y) {
} else {
properties_initialized_MouseEvents_kt_t0zz8y = true;
mouse$delegate = PropertyThis_init_$Create$(null, mouse$delegate$lambda, 1, null);
var tmp$ret$0;
// Inline function 'com.soywiz.kds.extraProperty' call
var tmp0_extraProperty = cursor$delegate$lambda;
tmp$ret$0 = new Property(null, tmp0_extraProperty);
cursor$delegate = tmp$ret$0;
}
}
function Info_init_$Init$(index, id, local, startLocal, startTime, global, startGlobal, time, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
index = -1;
if (!(($mask0 & 2) === 0))
id = 0;
if (!(($mask0 & 4) === 0))
local = Companion_getInstance_8().zp();
if (!(($mask0 & 8) === 0))
startLocal = Companion_getInstance_8().zp();
if (!(($mask0 & 16) === 0))
startTime = Companion_getInstance_0().z1g_1;
if (!(($mask0 & 32) === 0))
global = Companion_getInstance_8().zp();
if (!(($mask0 & 64) === 0))
startGlobal = Companion_getInstance_8().zp();
if (!(($mask0 & 128) === 0))
time = Companion_getInstance_0().z1g_1;
Info.call($this, index, id, local, startLocal, startTime, global, startGlobal, time);
return $this;
}
function Info_init_$Create$(index, id, local, startLocal, startTime, global, startGlobal, time, $mask0, $marker) {
return Info_init_$Init$(index, id, local, startLocal, startTime, global, startGlobal, time, $mask0, $marker, Object.create(Info.prototype));
}
function Info(index, id, local, startLocal, startTime, global, startGlobal, time) {
this.gh2_1 = index;
this.hh2_1 = id;
this.ih2_1 = local;
this.jh2_1 = startLocal;
this.kh2_1 = startTime;
this.lh2_1 = global;
this.mh2_1 = startGlobal;
this.nh2_1 = time;
var tmp = this;
tmp.oh2_1 = Mixin_init_$Create$(null, 1, null);
}
Info.prototype.cc5 = function (_set____db54di) {
this.hh2_1 = _set____db54di;
};
Info.prototype.c1n = function () {
return this.hh2_1;
};
Info.prototype.qh2 = function () {
return this.ih2_1;
};
Info.prototype.rh2 = function () {
return this.jh2_1;
};
Info.prototype.sh2 = function (_set____db54di) {
this.kh2_1 = _set____db54di;
};
Info.prototype.u5f = function () {
return this.lh2_1;
};
Info.prototype.th2 = function () {
return this.mh2_1;
};
Info.prototype.uh2 = function (_set____db54di) {
this.nh2_1 = _set____db54di;
};
Info.prototype.e4v = function (_set____db54di) {
this.oh2_1.e4v(_set____db54di);
};
Info.prototype.f4v = function () {
return this.oh2_1.f4v();
};
Info.prototype.vh2 = function () {
return DateTime__minus_impl_10njw8(this.nh2_1, this.kh2_1);
};
Info.prototype.wh2 = function (_set____db54di) {
this.ph2_1 = _set____db54di;
};
Info.prototype.mh0 = function () {
var tmp = this.ph2_1;
if (!(tmp == null))
return tmp;
else {
throwUninitializedPropertyAccessException('views');
}
};
Info.prototype.xh2 = function () {
return this.ih2_1.y72_1;
};
Info.prototype.yh2 = function () {
return this.ih2_1.z72_1;
};
Info.prototype.toString = function () {
return 'Touch[' + this.hh2_1 + '](' + numberToInt(this.xh2()) + ', ' + numberToInt(this.yh2()) + ')';
};
Info.prototype.hashCode = function () {
var result = this.gh2_1;
result = imul(result, 31) + this.hh2_1 | 0;
result = imul(result, 31) + this.ih2_1.hashCode() | 0;
result = imul(result, 31) + this.jh2_1.hashCode() | 0;
result = imul(result, 31) + DateTime__hashCode_impl_yf0bc9(this.kh2_1) | 0;
result = imul(result, 31) + this.lh2_1.hashCode() | 0;
result = imul(result, 31) + this.mh2_1.hashCode() | 0;
result = imul(result, 31) + DateTime__hashCode_impl_yf0bc9(this.nh2_1) | 0;
return result;
};
Info.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof Info))
return false;
var tmp0_other_with_cast = other instanceof Info ? other : THROW_CCE();
if (!(this.gh2_1 === tmp0_other_with_cast.gh2_1))
return false;
if (!(this.hh2_1 === tmp0_other_with_cast.hh2_1))
return false;
if (!this.ih2_1.equals(tmp0_other_with_cast.ih2_1))
return false;
if (!this.jh2_1.equals(tmp0_other_with_cast.jh2_1))
return false;
if (!equals(this.kh2_1, tmp0_other_with_cast.kh2_1))
return false;
if (!this.lh2_1.equals(tmp0_other_with_cast.lh2_1))
return false;
if (!this.mh2_1.equals(tmp0_other_with_cast.mh2_1))
return false;
if (!equals(this.nh2_1, tmp0_other_with_cast.nh2_1))
return false;
return true;
};
Info.$metadata$ = classMeta('Info', [Extra]);
function TouchEvents$infoPool$lambda(it) {
return Info_init_$Create$(it, 0, null, null, null, null, null, null, 254, null);
}
function TouchEvents(view) {
this.zh2_1 = view;
var tmp = this;
tmp.ah3_1 = Signal_init_$Create$(null, 1, null);
var tmp_0 = this;
tmp_0.bh3_1 = Signal_init_$Create$(null, 1, null);
var tmp_1 = this;
tmp_1.ch3_1 = Signal_init_$Create$(null, 1, null);
var tmp_2 = this;
tmp_2.dh3_1 = Signal_init_$Create$(null, 1, null);
var tmp_3 = this;
tmp_3.eh3_1 = Signal_init_$Create$(null, 1, null);
var tmp_4 = this;
tmp_4.fh3_1 = Signal_init_$Create$(null, 1, null);
var tmp_5 = this;
tmp_5.gh3_1 = Signal_init_$Create$(null, 1, null);
var tmp_6 = this;
tmp_6.hh3_1 = Pool_init_$Create$(0, TouchEvents$infoPool$lambda, 1, null);
this.ih3_1 = FastIntMap();
this.jh3_1 = FastArrayList_init_$Create$();
}
TouchEvents.prototype.n2u = function () {
return this.zh2_1;
};
TouchEvents.prototype.v = function () {
return this.ah3_1;
};
TouchEvents.prototype.kh3 = function () {
return this.bh3_1;
};
TouchEvents.prototype.lh3 = function () {
return this.eh3_1;
};
TouchEvents.prototype.mh3 = function () {
return this.gh3_1;
};
TouchEvents.prototype.nh3 = function (_this__u8e3s4, touch) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.input.TouchEvents.copyFrom.<anonymous>' call
_this__u8e3s4.hh2_1 = touch.ac9_1;
_this__u8e3s4.lh2_1.a73(touch.bc9_1, touch.cc9_1);
this.zh2_1.oh3(touch.bc9_1, touch.cc9_1, _this__u8e3s4.ih2_1);
tmp$ret$0 = _this__u8e3s4;
return tmp$ret$0;
};
TouchEvents.prototype.ph3 = function (_this__u8e3s4) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.input.TouchEvents.start.<anonymous>' call
_this__u8e3s4.jh2_1.u7a(_this__u8e3s4.ih2_1);
_this__u8e3s4.mh2_1.u7a(_this__u8e3s4.lh2_1);
tmp$ret$0 = _this__u8e3s4;
return tmp$ret$0;
};
TouchEvents.prototype.x7i = function () {
return this.jh3_1;
};
TouchEvents.prototype.ygc = function (views, e) {
this.jh3_1.x7();
var now = views.ffw_1.d1h();
if (e.hc8_1.equals(Type_START_getInstance())) {
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = e.tc8();
var n = 0;
while (n < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korge.input.TouchEvents.onTouchEvent.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.m(tmp0);
if (!tmp1__anonymous__uwfjfc.ec9_1.equals(Status_KEEP_getInstance())) {
var info = this.ph3(this.nh3(this.hh3_1.t4t(), tmp1__anonymous__uwfjfc));
info.kh2_1 = now;
info.ph2_1 = views;
// Inline function 'com.soywiz.kds.set' call
var tmp0_set = this.ih3_1;
var tmp1_set = info.hh2_1;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_set;
tmp$ret$0.set(tmp1_set, info);
this.ah3_1.k54(info);
}
}
}
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp2_fastForEach = e.tc8();
var n_0 = 0;
while (n_0 < tmp2_fastForEach.i()) {
// Inline function 'com.soywiz.korge.input.TouchEvents.onTouchEvent.<anonymous>' call
var tmp0_0 = n_0;
n_0 = tmp0_0 + 1 | 0;
var tmp3__anonymous__ufb84q = tmp2_fastForEach.m(tmp0_0);
var tmp$ret$2;
// Inline function 'com.soywiz.kds.get' call
var tmp0_get = this.ih3_1;
var tmp1_get = tmp3__anonymous__ufb84q.ac9_1;
var tmp$ret$1;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$1 = tmp0_get;
tmp$ret$2 = tmp$ret$1.get(tmp1_get);
var info_0 = tmp$ret$2;
if (!(info_0 == null)) {
info_0.nh2_1 = now;
this.jh3_1.c(this.nh3(info_0, tmp3__anonymous__ufb84q));
}
}
if (e.hc8_1.equals(Type_START_getInstance())) {
this.ch3_1.k54(this);
}
if (e.hc8_1.equals(Type_MOVE_getInstance())) {
// Inline function 'com.soywiz.kds.FastArrayList.fastForEach' call
var tmp4_fastForEach = this.jh3_1;
var array = tmp4_fastForEach.b4r_1;
var n_1 = 0;
while (n_1 < array.length) {
// Inline function 'com.soywiz.korge.input.TouchEvents.onTouchEvent.<anonymous>' call
var tmp$ret$4;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0_1 = n_1;
n_1 = tmp0_1 + 1 | 0;
var tmp0_unsafeCast = array[tmp0_1];
var tmp$ret$3;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$3 = tmp0_unsafeCast;
tmp$ret$4 = tmp$ret$3;
var tmp5__anonymous__kpxxpo = tmp$ret$4;
this.bh3_1.k54(tmp5__anonymous__kpxxpo);
}
this.dh3_1.k54(this);
}
if (e.hc8_1.equals(Type_END_getInstance())) {
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp6_fastForEach = e.tc8();
var n_2 = 0;
while (n_2 < tmp6_fastForEach.i()) {
// Inline function 'com.soywiz.korge.input.TouchEvents.onTouchEvent.<anonymous>' call
var tmp0_2 = n_2;
n_2 = tmp0_2 + 1 | 0;
var tmp7__anonymous__b0knam = tmp6_fastForEach.m(tmp0_2);
if (!tmp7__anonymous__b0knam.ec9_1.equals(Status_KEEP_getInstance())) {
var tmp$ret$6;
// Inline function 'com.soywiz.kds.get' call
var tmp0_get_0 = this.ih3_1;
var tmp1_get_0 = tmp7__anonymous__b0knam.ac9_1;
var tmp$ret$5;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$5 = tmp0_get_0;
tmp$ret$6 = tmp$ret$5.get(tmp1_get_0);
var info_1 = tmp$ret$6;
if (!(info_1 == null)) {
this.gh3_1.k54(this.nh3(info_1, tmp7__anonymous__b0knam));
this.eh3_1.k54(this);
// Inline function 'com.soywiz.kds.remove' call
var tmp2_remove = this.ih3_1;
var tmp3_remove = info_1.hh2_1;
var tmp$ret$7;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$7 = tmp2_remove;
tmp$ret$7.delete(tmp3_remove);
this.hh3_1.u4t(info_1);
}
}
}
}
this.fh3_1.k54(this);
};
TouchEvents.$metadata$ = classMeta('TouchEvents', [TouchComponent]);
function singleTouch(_this__u8e3s4, removeTouch, supportStartAnywhere, block) {
var ids = FastIntMap();
touch(_this__u8e3s4, singleTouch$lambda(_this__u8e3s4, supportStartAnywhere, ids, block, removeTouch));
}
function singleTouch$default(_this__u8e3s4, removeTouch, supportStartAnywhere, block, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
removeTouch = false;
if (!(($mask0 & 2) === 0))
supportStartAnywhere = false;
return singleTouch(_this__u8e3s4, removeTouch, supportStartAnywhere, block);
}
function SingleTouchHandler() {
var tmp = this;
tmp.qh3_1 = Signal_init_$Create$(null, 1, null);
var tmp_0 = this;
tmp_0.rh3_1 = Signal_init_$Create$(null, 1, null);
var tmp_1 = this;
tmp_1.sh3_1 = Signal_init_$Create$(null, 1, null);
var tmp_2 = this;
tmp_2.th3_1 = Signal_init_$Create$(null, 1, null);
var tmp_3 = this;
tmp_3.uh3_1 = Signal_init_$Create$(null, 1, null);
var tmp_4 = this;
tmp_4.vh3_1 = Signal_init_$Create$(null, 1, null);
var tmp_5 = this;
tmp_5.wh3_1 = Signal_init_$Create$(null, 1, null);
var tmp_6 = this;
tmp_6.xh3_1 = Signal_init_$Create$(null, 1, null);
}
SingleTouchHandler.$metadata$ = classMeta('SingleTouchHandler');
function touch(_this__u8e3s4, block) {
var tmp$ret$4;
// Inline function 'com.soywiz.korge.baseview.BaseView.getOrCreateComponentTouch' call
var tmp$ret$3;
// Inline function 'com.soywiz.korge.baseview.BaseView.getOrCreateComponentTyped' call
var tmp0_getOrCreateComponentTyped = Companion_getInstance_37();
var tmp0_safe_receiver = _this__u8e3s4.gg8(tmp0_getOrCreateComponentTyped);
var tmp;
if (tmp0_safe_receiver == null) {
tmp = null;
} else {
var tmp$ret$1;
$l$block: {
// Inline function 'kotlin.collections.firstOrNull' call
var tmp0_iterator = tmp0_safe_receiver.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l();
var tmp$ret$0;
// Inline function 'com.soywiz.korge.baseview.BaseView.getOrCreateComponentTyped.<anonymous>' call
tmp$ret$0 = element instanceof TouchEvents;
if (tmp$ret$0) {
tmp$ret$1 = element;
break $l$block;
}
}
tmp$ret$1 = null;
}
tmp = tmp$ret$1;
}
var tmp_0 = tmp;
var tmp1_elvis_lhs = (tmp_0 == null ? true : tmp_0 instanceof TouchEvents) ? tmp_0 : null;
var tmp_1;
if (tmp1_elvis_lhs == null) {
var tmp$ret$2;
// Inline function 'com.soywiz.korge.input.touch.<anonymous>' call
tmp$ret$2 = new TouchEvents(_this__u8e3s4);
var tmp_2 = _this__u8e3s4.lg8(tmp$ret$2);
tmp_1 = tmp_2 instanceof TouchEvents ? tmp_2 : THROW_CCE();
} else {
tmp_1 = tmp1_elvis_lhs;
}
tmp$ret$3 = tmp_1;
tmp$ret$4 = tmp$ret$3;
block(tmp$ret$4);
}
function singleTouch$getById(ids, $block, id) {
var tmp$ret$2;
$l$block: {
// Inline function 'com.soywiz.kds.getOrPut' call
var tmp$ret$1;
// Inline function 'com.soywiz.kds.get' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = ids;
tmp$ret$1 = tmp$ret$0.get(id);
var res = tmp$ret$1;
if (!(res == null)) {
tmp$ret$2 = res;
break $l$block;
}
var tmp$ret$4;
// Inline function 'com.soywiz.korge.input.singleTouch.getById.<anonymous>' call
var tmp$ret$3;
// Inline function 'kotlin.also' call
var tmp0_also = SingleTouchInfo_init_$Create$(null, false, 3, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.input.singleTouch.getById.<anonymous>.<anonymous>' call
$block(tmp0_also.yh3_1, id);
tmp$ret$3 = tmp0_also;
tmp$ret$4 = tmp$ret$3;
var out = tmp$ret$4;
// Inline function 'com.soywiz.kds.set' call
var tmp$ret$5;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$5 = ids;
tmp$ret$5.set(id, out);
tmp$ret$2 = out;
}
return tmp$ret$2;
}
function SingleTouchInfo_init_$Init$(handler, startedInside, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
handler = new SingleTouchHandler();
if (!(($mask0 & 2) === 0))
startedInside = false;
singleTouch$SingleTouchInfo.call($this, handler, startedInside);
return $this;
}
function SingleTouchInfo_init_$Create$(handler, startedInside, $mask0, $marker) {
return SingleTouchInfo_init_$Init$(handler, startedInside, $mask0, $marker, Object.create(singleTouch$SingleTouchInfo.prototype));
}
function singleTouch$SingleTouchInfo(handler, startedInside) {
this.yh3_1 = handler;
this.zh3_1 = startedInside;
}
singleTouch$SingleTouchInfo.prototype.b3d = function () {
return this.yh3_1;
};
singleTouch$SingleTouchInfo.$metadata$ = classMeta('SingleTouchInfo');
function singleTouch$lambda$lambda($this_singleTouch, $supportStartAnywhere, $ids, $block) {
return function (it) {
var info = singleTouch$getById($ids, $block, it.hh2_1);
var handler = info.yh3_1;
info.zh3_1 = !(hitTest($this_singleTouch, it.lh2_1) == null);
var tmp;
if (handler.qh3_1.q54() ? info.zh3_1 : false) {
handler.qh3_1.k54(it);
tmp = Unit_getInstance();
}
var tmp_0;
if ($supportStartAnywhere) {
handler.rh3_1.k54(it);
tmp_0 = Unit_getInstance();
}
return Unit_getInstance();
};
}
function singleTouch$lambda$lambda_0($supportStartAnywhere, $this_singleTouch, $ids, $block) {
return function (it) {
var info = singleTouch$getById($ids, $block, it.hh2_1);
var tmp;
if (!$supportStartAnywhere ? !info.zh3_1 : false) {
return Unit_getInstance();
}
var handler = info.yh3_1;
var tmp_0;
if (handler.sh3_1.q54() ? !(hitTest($this_singleTouch, it.lh2_1) == null) : false) {
handler.sh3_1.k54(it);
tmp_0 = Unit_getInstance();
}
handler.th3_1.k54(it);
return Unit_getInstance();
};
}
function singleTouch$lambda$lambda_1($supportStartAnywhere, $this_singleTouch, $removeTouch, $ids, $block) {
return function (it) {
var info = singleTouch$getById($ids, $block, it.hh2_1);
var tmp;
if (!$supportStartAnywhere ? !info.zh3_1 : false) {
return Unit_getInstance();
}
var handler = info.yh3_1;
var hitTest_0 = (handler.uh3_1.q54() ? true : handler.wh3_1.q54()) ? !(hitTest($this_singleTouch, it.lh2_1) == null) : false;
var tmp_0;
if (hitTest_0) {
handler.uh3_1.k54(it);
tmp_0 = Unit_getInstance();
}
handler.vh3_1.k54(it);
var tmp_1;
if (Companion_getInstance_8().l7a(it.mh2_1, it.lh2_1) <= it.mh0().efw_1.ufz_1 ? TimeSpan__compareTo_impl_zidry4(it.vh2(), it.mh0().efw_1.tfz_1) <= 0 : false) {
if (info.zh3_1 ? hitTest_0 : false) {
handler.wh3_1.k54(it);
}
handler.xh3_1.k54(it);
tmp_1 = Unit_getInstance();
}
var tmp_2;
if ($removeTouch) {
var tmp0_remove = it.hh2_1;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = $ids;
tmp_2 = tmp$ret$0.delete(tmp0_remove);
}
return Unit_getInstance();
};
}
function singleTouch$lambda($this_singleTouch, $supportStartAnywhere, $ids, $block, $removeTouch) {
return function ($this$touch) {
$this$touch.ah3_1.j54(singleTouch$lambda$lambda($this_singleTouch, $supportStartAnywhere, $ids, $block));
$this$touch.bh3_1.j54(singleTouch$lambda$lambda_0($supportStartAnywhere, $this_singleTouch, $ids, $block));
$this$touch.gh3_1.j54(singleTouch$lambda$lambda_1($supportStartAnywhere, $this_singleTouch, $removeTouch, $ids, $block));
return Unit_getInstance();
};
}
function DefaultViewport() {
DefaultViewport_instance = this;
this.ah4_1 = 1280;
this.bh4_1 = 720;
}
DefaultViewport.$metadata$ = objectMeta('DefaultViewport');
var DefaultViewport_instance;
function DefaultViewport_getInstance() {
if (DefaultViewport_instance == null)
new DefaultViewport();
return DefaultViewport_instance;
}
function configureLoggerFromProperties(file, $cont) {
var tmp = new $configureLoggerFromPropertiesCOROUTINE$4(file, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
}
function configureLoggerFromProperties_0(str) {
var props = Companion_getInstance_45().lh4(str);
var tmp$ret$0;
// Inline function 'kotlin.collections.iterator' call
tmp$ret$0 = props.j1().j();
var tmp0_iterator = tmp$ret$0;
while (tmp0_iterator.k()) {
var tmp1_loop_parameter = tmp0_iterator.l();
var tmp$ret$1;
// Inline function 'kotlin.collections.component1' call
tmp$ret$1 = tmp1_loop_parameter.k1();
var key = tmp$ret$1;
var tmp$ret$2;
// Inline function 'kotlin.collections.component2' call
tmp$ret$2 = tmp1_loop_parameter.l1();
var value = tmp$ret$2;
try {
var tmp = Companion_getInstance_4().h51(key);
var tmp$ret$4;
// Inline function 'kotlin.text.toUpperCase' call
var tmp$ret$3;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$3 = value;
tmp$ret$4 = tmp$ret$3.toUpperCase();
tmp.p51(valueOf(tmp$ret$4));
} catch ($p) {
if ($p instanceof Error) {
printStackTrace($p);
} else {
throw $p;
}
}
}
}
function Props_init_$Init$(props, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
props = LinkedHashMap_init_$Create$();
Props.call($this, props);
return $this;
}
function Props_init_$Create$(props, $mask0, $marker) {
return Props_init_$Init$(props, $mask0, $marker, Object.create(Props.prototype));
}
function Companion_13() {
Companion_instance_13 = this;
}
Companion_13.prototype.lh4 = function (str) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = Props_init_$Create$(null, 1, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.logger.Companion.load.<anonymous>' call
tmp0_apply.nh4(str);
tmp$ret$0 = tmp0_apply;
return tmp$ret$0;
};
Companion_13.$metadata$ = objectMeta('Companion');
var Companion_instance_13;
function Companion_getInstance_45() {
if (Companion_instance_13 == null)
new Companion_13();
return Companion_instance_13;
}
function Props(props) {
Companion_getInstance_45();
this.mh4_1 = props;
}
Props.prototype.j1 = function () {
return this.mh4_1.j1();
};
Props.prototype.v3 = function () {
return this.mh4_1.v3();
};
Props.prototype.i = function () {
return this.mh4_1.i();
};
Props.prototype.lh = function () {
return this.mh4_1.lh();
};
Props.prototype.x7 = function () {
this.mh4_1.x7();
};
Props.prototype.b19 = function (key) {
return this.mh4_1.r3(key);
};
Props.prototype.r3 = function (key) {
if (!(!(key == null) ? typeof key === 'string' : false))
return false;
return this.b19((!(key == null) ? typeof key === 'string' : false) ? key : THROW_CCE());
};
Props.prototype.c19 = function (key) {
return this.mh4_1.q(key);
};
Props.prototype.q = function (key) {
if (!(!(key == null) ? typeof key === 'string' : false))
return null;
return this.c19((!(key == null) ? typeof key === 'string' : false) ? key : THROW_CCE());
};
Props.prototype.p = function () {
return this.mh4_1.p();
};
Props.prototype.oh4 = function (key, value) {
return this.mh4_1.a(key, value);
};
Props.prototype.a = function (key, value) {
var tmp = (!(key == null) ? typeof key === 'string' : false) ? key : THROW_CCE();
return this.oh4(tmp, (!(value == null) ? typeof value === 'string' : false) ? value : THROW_CCE());
};
Props.prototype.ph4 = function (from) {
this.mh4_1.u4(from);
};
Props.prototype.u4 = function (from) {
return this.ph4(from);
};
Props.prototype.i2w = function (key) {
return this.mh4_1.y4(key);
};
Props.prototype.y4 = function (key) {
if (!(!(key == null) ? typeof key === 'string' : false))
return null;
return this.i2w((!(key == null) ? typeof key === 'string' : false) ? key : THROW_CCE());
};
Props.prototype.qh4 = function (str) {
var tmp0_iterator = split$default(str, ['\n'], false, 0, 6, null).j();
$l$loop_0: while (tmp0_iterator.k()) {
var line = tmp0_iterator.l();
var tmp = _Char___init__impl__6a9atx(35);
if (startsWith$default(line, tmp, false, 2, null))
continue $l$loop_0;
if (isBlank(line))
continue $l$loop_0;
var tmp_0 = charArrayOf([_Char___init__impl__6a9atx(61)]);
var parts = split$default_0(line, tmp_0, false, 2, 2, null);
var tmp$ret$0;
// Inline function 'kotlin.text.trim' call
var tmp0_trim = parts.m(0);
tmp$ret$0 = toString(trim(isCharSequence(tmp0_trim) ? tmp0_trim : THROW_CCE()));
var key = tmp$ret$0;
var tmp$ret$3;
// Inline function 'kotlin.text.trim' call
var tmp$ret$2;
// Inline function 'kotlin.collections.getOrElse' call
var tmp_1;
if (1 <= get_lastIndex_0(parts)) {
tmp_1 = parts.m(1);
} else {
var tmp$ret$1;
// Inline function 'com.soywiz.korge.logger.Props.deserializeAdd.<anonymous>' call
tmp$ret$1 = ' ';
tmp_1 = tmp$ret$1;
}
tmp$ret$2 = tmp_1;
var tmp1_trim = tmp$ret$2;
tmp$ret$3 = toString(trim(isCharSequence(tmp1_trim) ? tmp1_trim : THROW_CCE()));
var value = tmp$ret$3;
// Inline function 'kotlin.collections.set' call
var tmp2_set = this.mh4_1;
tmp2_set.a(key, value);
}
};
Props.prototype.nh4 = function (str) {
this.x7();
this.qh4(str);
};
Props.$metadata$ = classMeta('Props', [MutableMap]);
function $configureLoggerFromPropertiesCOROUTINE$4(file, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.kh4_1 = file;
}
$configureLoggerFromPropertiesCOROUTINE$4.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 3;
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.kh4_1.k5n(null, this, 1, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
var ARGUMENT = suspendResult;
configureLoggerFromProperties_0(ARGUMENT);
this.p7_1 = 3;
this.o7_1 = 4;
continue $sm;
case 2:
this.p7_1 = 3;
var tmp_0 = this.r7_1;
if (tmp_0 instanceof Error) {
var e = this.r7_1;
this.o7_1 = 4;
continue $sm;
} else {
throw this.r7_1;
}
break;
case 3:
throw this.r7_1;
case 4:
this.p7_1 = 3;
return Unit_getInstance();
}
} catch ($p) {
if (this.p7_1 === 3) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$configureLoggerFromPropertiesCOROUTINE$4.$metadata$ = classMeta('$configureLoggerFromPropertiesCOROUTINE$4', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function BitmapTextureInfo() {
this.rh4_1 = 0;
this.sh4_1 = new TextureBase(null, 0, 0);
this.th4_1 = FastIdentityMap();
}
BitmapTextureInfo.prototype.uh4 = function () {
return this.sh4_1;
};
BitmapTextureInfo.prototype.d2p = function () {
this.sh4_1.vh4_1 = null;
this.sh4_1.yh4_1 = -1;
this.sh4_1.wh4_1 = 0;
this.sh4_1.xh4_1 = 0;
clear(this.th4_1);
};
BitmapTextureInfo.$metadata$ = classMeta('BitmapTextureInfo');
function getTextureInfo($this, bitmap) {
if ($this.ih5_1 === bitmap ? ensureNotNull($this.jh5_1).sh4_1.yh4_1 === bitmap.v7y_1 : false)
return ensureNotNull($this.jh5_1);
if ($this.kh5_1 === bitmap ? ensureNotNull($this.lh5_1).sh4_1.yh4_1 === bitmap.v7y_1 : false)
return ensureNotNull($this.lh5_1);
$this.ch5_1.sh5(bitmap);
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.kds.getOrPut' call
var tmp0_getOrPut = $this.hh5_1;
var res = get(tmp0_getOrPut, bitmap);
if (!(res == null)) {
tmp$ret$0 = res;
break $l$block;
}
var tmp$ret$2;
// Inline function 'com.soywiz.korge.render.AgBitmapTextureManager.getTextureInfo.<anonymous>' call
var tmp$ret$1;
// Inline function 'kotlin.also' call
var tmp0_also = $this.gh5_1.t4t();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.render.AgBitmapTextureManager.getTextureInfo.<anonymous>.<anonymous>' call
var base = tmp0_also.sh4_1;
base.yh4_1 = -1;
var tmp = base;
var tmp_0 = bitmap.s7y_1;
var tmp0_subject = bitmap;
var tmp_1;
if (tmp0_subject instanceof MultiBitmap) {
tmp_1 = TextureTargetKind_TEXTURE_CUBE_MAP_getInstance();
} else {
tmp_1 = TextureTargetKind_TEXTURE_2D_getInstance();
}
tmp.vh4_1 = $this.zh4_1.hb9(tmp_0, tmp_1);
base.wh4_1 = bitmap.d72();
base.xh4_1 = bitmap.e72();
tmp$ret$1 = tmp0_also;
tmp$ret$2 = tmp$ret$1;
var out = tmp$ret$2;
set(tmp0_getOrPut, bitmap, out);
tmp$ret$0 = out;
}
var textureInfo = tmp$ret$0;
$this.kh5_1 = $this.ih5_1;
$this.lh5_1 = $this.jh5_1;
var base_0 = textureInfo.sh4_1;
$this.ih5_1 = bitmap;
$this.jh5_1 = textureInfo;
if (!(bitmap.v7y_1 === base_0.yh4_1)) {
base_0.yh4_1 = bitmap.v7y_1;
var tmp0_this = $this;
var tmp_2 = tmp0_this;
var tmp$ret$3;
// Inline function 'kotlin.Long.minus' call
var tmp1_minus = tmp0_this.fh5_1;
var tmp2_minus = textureInfo.rh4_1;
tmp$ret$3 = tmp1_minus.a2(toLong(tmp2_minus));
tmp_2.fh5_1 = tmp$ret$3;
try {
base_0.th5(bitmap, bitmap.z7y_1);
}finally {
textureInfo.rh4_1 = _get_estimateSizeInBytes__tshb4c(bitmap, $this);
var tmp1_this = $this;
var tmp_3 = tmp1_this;
var tmp$ret$4;
// Inline function 'kotlin.Long.plus' call
var tmp3_plus = tmp1_this.fh5_1;
var tmp4_plus = textureInfo.rh4_1;
tmp$ret$4 = tmp3_plus.v8(toLong(tmp4_plus));
tmp_3.fh5_1 = tmp$ret$4;
}
bitmap.i7z();
}
return textureInfo;
}
function _get_estimateSizeInBytes__tshb4c(_this__u8e3s4, $this) {
return imul(_this__u8e3s4.e72(), imul(_this__u8e3s4.d72(), _this__u8e3s4.p7y_1) / 8 | 0);
}
function _getTexture($this, slice) {
if ($this.mh5_1 === slice)
return ensureNotNull($this.nh5_1);
if ($this.oh5_1 === slice)
return ensureNotNull($this.ph5_1);
var info = getTextureInfo($this, slice.x8b());
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.kds.getOrPut' call
var tmp0_getOrPut = info.th4_1;
var res = get(tmp0_getOrPut, slice);
if (!(res == null)) {
tmp$ret$0 = res;
break $l$block;
}
var tmp$ret$1;
// Inline function 'com.soywiz.korge.render.AgBitmapTextureManager._getTexture.<anonymous>' call
var tmp;
if (slice instanceof BmpSlice) {
var tmp_0 = info.sh4_1;
tmp = Texture_init_$Create$(tmp_0, 0, 0, 0, 0, 30, null).dh6(Companion_getInstance_15().k7c(slice.b74(), slice.y73(), slice.d72(), slice.e72()));
} else {
var tmp_1 = info.sh4_1;
tmp = BmpCoordsWithInstance_init_$Create$(tmp_1, slice, null, null, 12, null);
}
tmp$ret$1 = tmp;
var out = tmp$ret$1;
set(tmp0_getOrPut, slice, out);
tmp$ret$0 = out;
}
var texture = tmp$ret$0;
$this.oh5_1 = $this.mh5_1;
$this.ph5_1 = $this.nh5_1;
$this.mh5_1 = slice;
$this.nh5_1 = texture;
return texture;
}
function clearFastCacheAccess($this) {
$this.ih5_1 = null;
$this.jh5_1 = null;
$this.kh5_1 = null;
$this.lh5_1 = null;
$this.mh5_1 = null;
$this.nh5_1 = null;
$this.oh5_1 = null;
$this.ph5_1 = null;
}
function AgBitmapTextureManager$textureInfoPool$lambda(it) {
it.d2p();
return Unit_getInstance();
}
function AgBitmapTextureManager$textureInfoPool$lambda_0(it) {
return new BitmapTextureInfo();
}
function AgBitmapTextureManager(ag) {
this.zh4_1 = ag;
this.ah5_1 = new Long(0, 0);
this.bh5_1 = new AgFastSet();
this.ch5_1 = new AgFastSet();
this.dh5_1 = FastArrayList_init_$Create$();
this.eh5_1 = 60;
this.fh5_1 = new Long(0, 0);
var tmp = this;
var tmp_0 = AgBitmapTextureManager$textureInfoPool$lambda;
tmp.gh5_1 = Pool_init_$Create$_0(tmp_0, 0, AgBitmapTextureManager$textureInfoPool$lambda_0, 2, null);
this.hh5_1 = FastIdentityMap();
this.ih5_1 = null;
this.jh5_1 = null;
this.kh5_1 = null;
this.lh5_1 = null;
this.mh5_1 = null;
this.nh5_1 = null;
this.oh5_1 = null;
this.ph5_1 = null;
this.qh5_1 = 0;
}
AgBitmapTextureManager.prototype.kch = function () {
return this.zh4_1;
};
AgBitmapTextureManager.prototype.eh6 = function () {
return this.ah5_1;
};
AgBitmapTextureManager.prototype.fh6 = function () {
return this.fh5_1;
};
AgBitmapTextureManager.prototype.gh6 = function (bitmap) {
return ensureNotNull(getTextureInfo(this, bitmap).sh4_1);
};
AgBitmapTextureManager.prototype.hh6 = function (slice) {
var tmp = _getTexture(this, slice);
return tmp instanceof Texture ? tmp : THROW_CCE();
};
AgBitmapTextureManager.prototype.ih6 = function (slice) {
return _getTexture(this, slice);
};
AgBitmapTextureManager.prototype.jh6 = function () {
clearFastCacheAccess(this);
var tmp0_this = this;
var tmp1 = tmp0_this.qh5_1;
tmp0_this.qh5_1 = tmp1 + 1 | 0;
if (this.qh5_1 >= this.eh5_1) {
this.qh5_1 = 0;
this.kh6();
}
};
AgBitmapTextureManager.prototype.kh6 = function () {
// Inline function 'com.soywiz.kds.FastArrayList.fastForEach' call
var tmp0_fastForEach = this.dh5_1;
var array = tmp0_fastForEach.b4r_1;
var n = 0;
while (n < array.length) {
// Inline function 'com.soywiz.korge.render.AgBitmapTextureManager.gc.<anonymous>' call
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp0_unsafeCast = array[tmp0];
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_unsafeCast;
tmp$ret$1 = tmp$ret$0;
var tmp1__anonymous__uwfjfc = tmp$ret$1;
if (this.ch5_1.y1(tmp1__anonymous__uwfjfc))
;
else if (this.ah5_1.x1(this.fh5_1) < 0) {
this.lh6(tmp1__anonymous__uwfjfc, 'GC');
} else {
this.bh5_1.sh5(tmp1__anonymous__uwfjfc);
}
}
this.dh5_1.x7();
this.dh5_1.o(this.ch5_1.rh5_1);
this.dh5_1.o(this.bh5_1.rh5_1);
this.ch5_1.x7();
};
AgBitmapTextureManager.prototype.lh6 = function (bmp, reason) {
var tmp0_elvis_lhs = getAndRemove(this.hh5_1, bmp);
var tmp;
if (tmp0_elvis_lhs == null) {
return Unit_getInstance();
} else {
tmp = tmp0_elvis_lhs;
}
var info = tmp;
this.ch5_1.mh6(bmp);
if (this.jh5_1 === info ? true : this.lh5_1 === info) {
clearFastCacheAccess(this);
}
info.sh4_1.x2c();
this.gh5_1.u4t(info);
var tmp1_this = this;
var tmp_0 = tmp1_this;
var tmp$ret$0;
// Inline function 'kotlin.Long.minus' call
var tmp0_minus = tmp1_this.fh5_1;
var tmp1_minus = info.rh4_1;
tmp$ret$0 = tmp0_minus.a2(toLong(tmp1_minus));
tmp_0.fh5_1 = tmp$ret$0;
this.bh5_1.mh6(bmp);
};
AgBitmapTextureManager.prototype.x2c = function () {
clearFastCacheAccess(this);
var tmp0_iterator = toList(get_keys(this.hh5_1)).j();
while (tmp0_iterator.k()) {
var bmp = tmp0_iterator.l();
this.lh6(bmp, 'close');
}
clear(this.hh5_1);
this.dh5_1.x7();
this.ch5_1.x7();
this.bh5_1.x7();
this.gh5_1.x7();
};
AgBitmapTextureManager.$metadata$ = classMeta('AgBitmapTextureManager', [Closeable]);
function removeCache($this) {
}
function AgBufferManager$bufferPool$lambda(this$0) {
return function (it) {
return this$0.nh6_1.ub4();
};
}
function AgBufferManager(ag) {
this.nh6_1 = ag;
this.oh6_1 = FastIdentityMap();
this.ph6_1 = new AgFastSet();
var tmp = this;
tmp.qh6_1 = Pool_init_$Create$(0, AgBufferManager$bufferPool$lambda(this), 1, null);
this.rh6_1 = 0;
this.sh6_1 = 60;
this.th6_1 = Companion_getInstance_16().p4w(0);
}
AgBufferManager.prototype.uh6 = function (cached) {
this.ph6_1.sh5(cached);
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.kds.getOrPut' call
var tmp0_getOrPut = this.oh6_1;
var res = get(tmp0_getOrPut, cached);
if (!(res == null)) {
tmp$ret$0 = res;
break $l$block;
}
var tmp$ret$2;
// Inline function 'com.soywiz.korge.render.AgBufferManager.getBuffer.<anonymous>' call
var tmp$ret$1;
// Inline function 'kotlin.also' call
var tmp0_also = this.qh6_1.t4t();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.render.AgBufferManager.getBuffer.<anonymous>.<anonymous>' call
tmp0_also.yaz(cached.vh6_1, cached.wh6_1, cached.xh6_1);
tmp$ret$1 = tmp0_also;
tmp$ret$2 = tmp$ret$1;
var out = tmp$ret$2;
set(tmp0_getOrPut, cached, out);
tmp$ret$0 = out;
}
return tmp$ret$0;
};
AgBufferManager.prototype.jh6 = function () {
removeCache(this);
var tmp0_this = this;
var tmp1 = tmp0_this.rh6_1;
tmp0_this.rh6_1 = tmp1 + 1 | 0;
if (this.rh6_1 >= this.sh6_1) {
this.rh6_1 = 0;
this.kh6();
}
};
AgBufferManager.prototype.kh6 = function () {
this.yh6(this.ph6_1.rh5_1);
this.ph6_1.x7();
};
AgBufferManager.prototype.yh6 = function (buffer) {
var tmp$ret$0;
// Inline function 'com.soywiz.korag.AG.commandsNoWait' call
var tmp0_commandsNoWait = this.nh6_1;
// Inline function 'kotlin.contracts.contract' call
var tmp1__anonymous__uwfjfc = tmp0_commandsNoWait.hay_1;
var n = 0;
while (n < buffer.i()) {
// Inline function 'com.soywiz.korge.render.AgBufferManager.delete.<anonymous>.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp0__anonymous__q1qw7t = buffer.m(tmp0);
this.zh6(tmp0__anonymous__q1qw7t, tmp1__anonymous__uwfjfc);
}
var result = Unit_getInstance();
if (!tmp0_commandsNoWait.xay()) {
tmp0_commandsNoWait.way(tmp0_commandsNoWait.hay_1);
}
tmp$ret$0 = result;
};
AgBufferManager.prototype.zh6 = function (buffer, list) {
var buf = getAndRemove(this.oh6_1, buffer);
var tmp0_safe_receiver = buf;
if (tmp0_safe_receiver == null)
null;
else {
var tmp$ret$0;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
tmp0_safe_receiver.xaz(this.th6_1, 0, 0, 6, null);
this.qh6_1.u4t(buf);
tmp$ret$0 = Unit_getInstance();
}
};
AgBufferManager.$metadata$ = classMeta('AgBufferManager');
function AgCachedBuffer_init_$Init$(data, dataOffset, dataLen, $mask0, $marker, $this) {
if (!(($mask0 & 2) === 0))
dataOffset = 0;
if (!(($mask0 & 4) === 0))
dataLen = -1;
AgCachedBuffer.call($this, data, dataOffset, dataLen);
return $this;
}
function AgCachedBuffer_init_$Create$(data, dataOffset, dataLen, $mask0, $marker) {
return AgCachedBuffer_init_$Init$(data, dataOffset, dataLen, $mask0, $marker, Object.create(AgCachedBuffer.prototype));
}
function AgCachedBuffer(data, dataOffset, dataLen) {
this.vh6_1 = data;
this.wh6_1 = dataOffset;
this.xh6_1 = dataLen;
}
AgCachedBuffer.prototype.s3l = function () {
return this.vh6_1;
};
AgCachedBuffer.prototype.ah7 = function () {
return this.wh6_1;
};
AgCachedBuffer.prototype.bh7 = function () {
return this.xh6_1;
};
AgCachedBuffer.$metadata$ = classMeta('AgCachedBuffer');
function AgFastSet() {
AbstractMutableSet.call(this);
this.rh5_1 = FastArrayList_init_$Create$();
}
AgFastSet.prototype.i = function () {
return this.rh5_1.i();
};
AgFastSet.prototype.j = function () {
return this.rh5_1.j();
};
AgFastSet.prototype.sh5 = function (element) {
if (this.rh5_1.r(element))
return false;
this.rh5_1.c(element);
return true;
};
AgFastSet.prototype.c = function (element) {
return this.sh5((element == null ? true : isObject(element)) ? element : THROW_CCE());
};
AgFastSet.prototype.mh6 = function (element) {
return this.rh5_1.c5(element);
};
AgFastSet.prototype.c5 = function (element) {
if (!(element == null ? true : isObject(element)))
return false;
return this.mh6((element == null ? true : isObject(element)) ? element : THROW_CCE());
};
AgFastSet.prototype.y1 = function (element) {
return this.rh5_1.r(element);
};
AgFastSet.prototype.r = function (element) {
if (!(element == null ? true : isObject(element)))
return false;
return this.y1((element == null ? true : isObject(element)) ? element : THROW_CCE());
};
AgFastSet.prototype.x7 = function () {
this.rh5_1.x7();
};
AgFastSet.$metadata$ = classMeta('AgFastSet', undefined, undefined, undefined, undefined, AbstractMutableSet.prototype);
function get_logger() {
init_properties_BatchBuilder2D_kt_aoms9l();
return logger;
}
var logger;
function get_BATCH_BUILDER2D_PROGRAMS() {
init_properties_BatchBuilder2D_kt_aoms9l();
return BATCH_BUILDER2D_PROGRAMS;
}
var BATCH_BUILDER2D_PROGRAMS;
function get_BB_MAX_TEXTURES() {
init_properties_BatchBuilder2D_kt_aoms9l();
return BB_MAX_TEXTURES;
}
var BB_MAX_TEXTURES;
var AddType_NO_ADD_instance;
var AddType_POST_ADD_instance;
var AddType_PRE_ADD_instance;
var AddType_entriesInitialized;
function AddType_initEntries() {
if (AddType_entriesInitialized)
return Unit_getInstance();
AddType_entriesInitialized = true;
AddType_NO_ADD_instance = new AddType('NO_ADD', 0, 0);
AddType_POST_ADD_instance = new AddType('POST_ADD', 1, 1);
AddType_PRE_ADD_instance = new AddType('PRE_ADD', 2, 2);
}
function getShaderProgramIndex($this, add) {
return insert(0, add.eh7_1, 0, 2);
}
function getOrCreateStandardProgram($this, preaddType) {
var index = getShaderProgramIndex($this, preaddType);
if (get_BATCH_BUILDER2D_PROGRAMS()[index] == null) {
get_BATCH_BUILDER2D_PROGRAMS()[index] = _createProgramUncached($this, preaddType);
}
return ensureNotNull(get_BATCH_BUILDER2D_PROGRAMS()[index]);
}
function _createProgramUncached($this, addType) {
var fragment = $this.fh7(addType);
var tmp0_subject = addType;
var tmp0 = tmp0_subject.q2_1;
var tmp;
switch (tmp0) {
case 0:
tmp = '.NoAdd';
break;
case 2:
tmp = '.PreAdd';
break;
case 1:
tmp = '.PostAdd';
break;
default:
noWhenBranchMatchedException();
break;
}
var addString = tmp;
return new Program($this.cg7_1, fragment, 'BatchBuilder2D.Tinted' + addString);
}
function BatchBuilder2D$Companion$buildTextureLookupFragment$lambda($tmp0_also) {
return function ($this$null) {
$this$null.fb5($this$null.jb5($tmp0_also.ebg(), 'xy'), $this$null.jb5($tmp0_also.cbg(), 'xy'));
return Unit_getInstance();
};
}
function BatchBuilder2D$Companion$buildTextureLookupFragment$lambda_0($tmp0_also) {
return function ($this$IF_ELSE_BINARY_LOOKUP, n) {
$this$IF_ELSE_BINARY_LOOKUP.fb5($this$IF_ELSE_BINARY_LOOKUP.l6t(), $this$IF_ELSE_BINARY_LOOKUP.kb5(Companion_getInstance_46().yg6_1[n], $this$IF_ELSE_BINARY_LOOKUP.jb5($tmp0_also.ebg(), 'xy')));
return Unit_getInstance();
};
}
function _addIndices($this, indicesI16, pos, i0, i1, i2, i3, i4, i5) {
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set = pos + 0 | 0;
var tmp1_set = toShort(i0);
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = indicesI16;
tmp$ret$0[tmp0_set] = tmp1_set;
// Inline function 'com.soywiz.kmem.set' call
var tmp2_set = pos + 1 | 0;
var tmp3_set = toShort(i1);
var tmp$ret$1;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$1 = indicesI16;
tmp$ret$1[tmp2_set] = tmp3_set;
// Inline function 'com.soywiz.kmem.set' call
var tmp4_set = pos + 2 | 0;
var tmp5_set = toShort(i2);
var tmp$ret$2;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$2 = indicesI16;
tmp$ret$2[tmp4_set] = tmp5_set;
// Inline function 'com.soywiz.kmem.set' call
var tmp6_set = pos + 3 | 0;
var tmp7_set = toShort(i3);
var tmp$ret$3;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$3 = indicesI16;
tmp$ret$3[tmp6_set] = tmp7_set;
// Inline function 'com.soywiz.kmem.set' call
var tmp8_set = pos + 4 | 0;
var tmp9_set = toShort(i4);
var tmp$ret$4;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$4 = indicesI16;
tmp$ret$4[tmp8_set] = tmp9_set;
// Inline function 'com.soywiz.kmem.set' call
var tmp10_set = pos + 5 | 0;
var tmp11_set = toShort(i5);
var tmp$ret$5;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$5 = indicesI16;
tmp$ret$5[tmp10_set] = tmp11_set;
return 6;
}
function applyMatrix($this, matrix, idx, vcount) {
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.FBuffer.f32' call
var tmp0__get_f32__2k2skm = $this.fgb_1;
tmp$ret$0 = tmp0__get_f32__2k2skm.x4w_1;
var f32 = tmp$ret$0;
var idx_0 = idx;
var ma = matrix.x75();
var mb = matrix.y75();
var mc = matrix.z75();
var md = matrix.a76();
var mtx = matrix.b76();
var mty = matrix.c76();
var inductionVariable = 0;
if (inductionVariable < vcount)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$2;
// Inline function 'com.soywiz.kmem.get' call
var tmp1_get = idx_0 + 0 | 0;
var tmp$ret$1;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$1 = f32;
tmp$ret$2 = tmp$ret$1[tmp1_get];
var x = tmp$ret$2;
var tmp$ret$4;
// Inline function 'com.soywiz.kmem.get' call
var tmp2_get = idx_0 + 1 | 0;
var tmp$ret$3;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$3 = f32;
tmp$ret$4 = tmp$ret$3[tmp2_get];
var y = tmp$ret$4;
// Inline function 'com.soywiz.kmem.set' call
var tmp3_set = idx_0 + 0 | 0;
var tmp4_set = Companion_getInstance_17().q74(ma, mb, mc, md, mtx, mty, x, y);
var tmp$ret$5;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$5 = f32;
tmp$ret$5[tmp3_set] = tmp4_set;
// Inline function 'com.soywiz.kmem.set' call
var tmp5_set = idx_0 + 1 | 0;
var tmp6_set = Companion_getInstance_17().r74(ma, mb, mc, md, mtx, mty, x, y);
var tmp$ret$6;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$6 = f32;
tmp$ret$6[tmp5_set] = tmp6_set;
idx_0 = idx_0 + get_VERTEX_INDEX_SIZE() | 0;
}
while (inductionVariable < vcount);
}
function checkAvailable($this, indices, vertices) {
return ($this.rgb_1 + indices | 0) < $this.egb_1 ? true : ($this.qgb_1 + vertices | 0) < $this.dgb_1;
}
function AddType(name, ordinal, index) {
Enum.call(this, name, ordinal);
this.eh7_1 = index;
}
AddType.$metadata$ = classMeta('AddType', undefined, undefined, undefined, undefined, Enum.prototype);
function Companion_14() {
Companion_instance_14 = this;
this.pg6_1 = 16383;
this.qg6_1 = 4096;
var tmp$ret$1;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace = get_logger();
var tmp0_log = Level_TRACE_getInstance();
var tmp;
if (tmp0_trace.s51(tmp0_log)) {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.render.Companion.<anonymous>' call
tmp$ret$0 = 'BatchBuilder2D.Companion[0]';
tmp0_trace.u51(tmp0_log, tmp$ret$0);
tmp = Unit_getInstance();
}
tmp$ret$1 = tmp;
var tmp_0 = this;
var tmp_1 = VarType_Byte4_getInstance();
tmp_0.rg6_1 = Attribute_init_$Create$('a_Col2', tmp_1, true, null, 8, null);
var tmp$ret$3;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace_0 = get_logger();
var tmp0_log_0 = Level_TRACE_getInstance();
var tmp_2;
if (tmp0_trace_0.s51(tmp0_log_0)) {
var tmp$ret$2;
// Inline function 'com.soywiz.korge.render.Companion.<anonymous>' call
tmp$ret$2 = 'BatchBuilder2D.Companion[1]';
tmp0_trace_0.u51(tmp0_log_0, tmp$ret$2);
tmp_2 = Unit_getInstance();
}
tmp$ret$3 = tmp_2;
var tmp_3 = this;
var tmp_4 = VarType_Float4_getInstance();
tmp_3.sg6_1 = Varying_init_$Create$('v_Col2', tmp_4, null, 4, null);
this.tg6_1 = Attribute_init_$Create$_0('a_TexIndex', VarType_UByte1_getInstance(), false, Precision_LOW_getInstance());
this.ug6_1 = Attribute_init_$Create$_0('a_Wrap', VarType_UByte1_getInstance(), false, Precision_LOW_getInstance());
this.vg6_1 = Varying_init_$Create$_0('v_TexIndex', VarType_Float1_getInstance(), Precision_LOW_getInstance());
this.wg6_1 = Varying_init_$Create$_0('v_Wrap', VarType_Float1_getInstance(), Precision_LOW_getInstance());
var tmp_5 = this;
var tmp_6 = VarType_Bool1_getInstance();
tmp_5.xg6_1 = Uniform_init_$Create$('u_OutputPre', tmp_6, null, 4, null);
var tmp_7 = this;
var tmp_8 = 0;
var tmp_9 = get_BB_MAX_TEXTURES();
var tmp$ret$4;
// Inline function 'kotlin.arrayOfNulls' call
tmp$ret$4 = fillArrayVal(Array(tmp_9), null);
var tmp_10 = tmp$ret$4;
while (tmp_8 < tmp_9) {
var tmp_11 = tmp_8;
var tmp$ret$5;
// Inline function 'com.soywiz.korge.render.Companion.u_TexN.<anonymous>' call
var tmp_12 = 'u_Tex' + tmp_11;
var tmp_13 = VarType_Sampler2D_getInstance();
tmp$ret$5 = Uniform_init_$Create$(tmp_12, tmp_13, null, 4, null);
tmp_10[tmp_11] = tmp$ret$5;
tmp_8 = tmp_8 + 1 | 0;
}
tmp_7.yg6_1 = tmp_10;
var tmp$ret$7;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace_1 = get_logger();
var tmp0_log_1 = Level_TRACE_getInstance();
var tmp_14;
if (tmp0_trace_1.s51(tmp0_log_1)) {
var tmp$ret$6;
// Inline function 'com.soywiz.korge.render.Companion.<anonymous>' call
tmp$ret$6 = 'BatchBuilder2D.Companion[2]';
tmp0_trace_1.u51(tmp0_log_1, tmp$ret$6);
tmp_14 = Unit_getInstance();
}
tmp$ret$7 = tmp_14;
this.zg6_1 = ProgramLayout_init_$Create$([DefaultShaders_getInstance().kas_1, DefaultShaders_getInstance().las_1, this.gh7(), this.rg6_1]);
this.ag7_1 = ProgramLayout_init_$Create$([this.tg6_1]);
this.bg7_1 = ProgramLayout_init_$Create$([this.ug6_1]);
var tmp_15 = this;
var tmp$ret$9;
// Inline function 'com.soywiz.korag.VertexShaderDefault' call
var tmp$ret$8;
// Inline function 'kotlin.also' call
var tmp0_also = new ProgramBuilderDefault();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.render.Companion.VERTEX.<anonymous>' call
tmp0_also.fb5(tmp0_also.cbg(), tmp0_also.abg());
tmp0_also.fb5(Companion_getInstance_46().vg6_1, Companion_getInstance_46().tg6_1);
tmp0_also.fb5(Companion_getInstance_46().wg6_1, Companion_getInstance_46().ug6_1);
tmp0_also.fb5(Companion_getInstance_46().hh7(), tmp0_also.hb5([tmp0_also.ubf(tmp0_also.jb5(Companion_getInstance_46().gh7(), 'rgb'), tmp0_also.jb5(Companion_getInstance_46().gh7(), 'a')), tmp0_also.jb5(Companion_getInstance_46().gh7(), 'a')]));
tmp0_also.fb5(Companion_getInstance_46().sg6_1, Companion_getInstance_46().rg6_1);
tmp0_also.fb5(tmp0_also.l6t(), tmp0_also.ubf(tmp0_also.ubf(tmp0_also.xbf(), tmp0_also.ybf()), tmp0_also.hb5([tmp0_also.zbf(), tmp0_also.gb5(0.0), tmp0_also.gb5(1.0)])));
tmp$ret$8 = tmp0_also;
tmp$ret$9 = VertexShader(tmp$ret$8.ib5());
tmp_15.cg7_1 = tmp$ret$9;
var tmp$ret$11;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace_2 = get_logger();
var tmp0_log_2 = Level_TRACE_getInstance();
var tmp_16;
if (tmp0_trace_2.s51(tmp0_log_2)) {
var tmp$ret$10;
// Inline function 'com.soywiz.korge.render.Companion.<anonymous>' call
tmp$ret$10 = 'BatchBuilder2D.Companion[3]';
tmp0_trace_2.u51(tmp0_log_2, tmp$ret$10);
tmp_16 = Unit_getInstance();
}
tmp$ret$11 = tmp_16;
this.dg7_1 = getOrCreateStandardProgram(this, AddType_NO_ADD_getInstance());
var tmp$ret$13;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace_3 = get_logger();
var tmp0_log_3 = Level_TRACE_getInstance();
var tmp_17;
if (tmp0_trace_3.s51(tmp0_log_3)) {
var tmp$ret$12;
// Inline function 'com.soywiz.korge.render.Companion.<anonymous>' call
tmp$ret$12 = 'BatchBuilder2D.Companion[4]';
tmp0_trace_3.u51(tmp0_log_3, tmp$ret$12);
tmp_17 = Unit_getInstance();
}
tmp$ret$13 = tmp_17;
}
Companion_14.prototype.gh7 = function () {
return DefaultShaders_getInstance().mas_1;
};
Companion_14.prototype.ih7 = function () {
return this.rg6_1;
};
Companion_14.prototype.hh7 = function () {
return DefaultShaders_getInstance().oas_1;
};
Companion_14.prototype.jh7 = function () {
return this.sg6_1;
};
Companion_14.prototype.kh7 = function () {
return this.tg6_1;
};
Companion_14.prototype.lh7 = function () {
return this.ug6_1;
};
Companion_14.prototype.mh7 = function () {
return this.vg6_1;
};
Companion_14.prototype.nh7 = function () {
return this.wg6_1;
};
Companion_14.prototype.oh7 = function () {
return this.xg6_1;
};
Companion_14.prototype.ph7 = function () {
return this.yg6_1;
};
Companion_14.prototype.qh7 = function (builder, out, u_OutputPre) {
var tmp$ret$1;
// Inline function 'kotlin.apply' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.render.Companion.DO_OUTPUT_FROM.<anonymous>' call
var tmp$ret$0;
// Inline function 'com.soywiz.korag.shader.Builder.IF' call
var tmp0_IF = builder.gbh(u_OutputPre);
var body = builder.ibg();
// Inline function 'com.soywiz.korge.render.Companion.DO_OUTPUT_FROM.<anonymous>.<anonymous>' call
body.fb5(body.jb5(out, 'rgb'), body.vbf(body.jb5(out, 'rgb'), body.jb5(out, 'a')));
var tmp = body.jbg();
var stmIf = If_init_$Create$(tmp0_IF, tmp, null, 4, null);
var tmp0_this = builder;
// Inline function 'kotlin.collections.plusAssign' call
var tmp0_plusAssign = tmp0_this.eb5_1;
tmp0_plusAssign.c(stmIf);
tmp$ret$0 = stmIf;
tmp$ret$1 = builder;
};
Companion_14.prototype.rh7 = function (builder, out, u_OutputPre, $mask0, $handler) {
if (!(($mask0 & 4) === 0))
u_OutputPre = Companion_getInstance_46().xg6_1;
return this.qh7(builder, out, u_OutputPre);
};
Companion_14.prototype.sh7 = function (add) {
return getOrCreateStandardProgram(this, add);
};
Companion_14.prototype.fh7 = function (add) {
var tmp$ret$3;
// Inline function 'com.soywiz.korag.FragmentShaderDefault' call
var tmp$ret$2;
// Inline function 'kotlin.also' call
var tmp0_also = new ProgramBuilderDefault();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.render.Companion.buildTextureLookupFragment.<anonymous>' call
var tmp$ret$0;
// Inline function 'com.soywiz.korag.shader.Builder.IF' call
var tmp0_IF = tmp0_also.kbh(Companion_getInstance_46().wg6_1, tmp0_also.gb5(0.0));
var body = tmp0_also.ibg();
// Inline function 'com.soywiz.korge.render.Companion.buildTextureLookupFragment.<anonymous>.<anonymous>' call
body.fb5(body.jb5(tmp0_also.ebg(), 'xy'), body.xbg(body.jb5(tmp0_also.cbg(), 'xy')));
var tmp = body.jbg();
var stmIf = If_init_$Create$(tmp0_IF, tmp, null, 4, null);
var tmp0_this = tmp0_also;
// Inline function 'kotlin.collections.plusAssign' call
var tmp0_plusAssign = tmp0_this.eb5_1;
tmp0_plusAssign.c(stmIf);
tmp$ret$0 = stmIf;
var tmp_0 = tmp$ret$0;
tmp0_also.lbg(tmp_0, BatchBuilder2D$Companion$buildTextureLookupFragment$lambda(tmp0_also));
var tmp_1 = Companion_getInstance_46().vg6_1;
var tmp_2 = get_BB_MAX_TEXTURES() - 1 | 0;
tmp0_also.nbg(tmp_1, 0, tmp_2, BatchBuilder2D$Companion$buildTextureLookupFragment$lambda_0(tmp0_also));
if (add.equals(AddType_NO_ADD_getInstance())) {
tmp0_also.fb5(tmp0_also.l6t(), tmp0_also.ubf(tmp0_also.l6t(), Companion_getInstance_46().hh7()));
} else {
tmp0_also.fb5(tmp0_also.ebg(), tmp0_also.ubf(tmp0_also.hbh(Companion_getInstance_46().sg6_1, tmp0_also.hb5([tmp0_also.gb5(0.5)])), tmp0_also.gb5(2.0)));
var tmp0_subject = add;
var tmp0 = tmp0_subject.q2_1;
if (tmp0 === 1) {
tmp0_also.fb5(tmp0_also.l6t(), tmp0_also.ibh(tmp0_also.ubf(tmp0_also.l6t(), Companion_getInstance_46().hh7()), tmp0_also.ebg()));
} else {
tmp0_also.fb5(tmp0_also.l6t(), tmp0_also.ubf(tmp0_also.ybg(tmp0_also.ibh(tmp0_also.l6t(), tmp0_also.ebg()), tmp0_also.gb5(0.0), tmp0_also.gb5(1.0)), Companion_getInstance_46().hh7()));
}
}
var tmp$ret$1;
// Inline function 'com.soywiz.korag.shader.Builder.IF' call
var tmp1_IF = tmp0_also.mbh(tmp0_also.jb5(tmp0_also.l6t(), 'a'), tmp0_also.gb5(0.0));
var body_0 = tmp0_also.ibg();
// Inline function 'com.soywiz.korge.render.Companion.buildTextureLookupFragment.<anonymous>.<anonymous>' call
body_0.pbg();
var tmp_3 = body_0.jbg();
var stmIf_0 = If_init_$Create$(tmp1_IF, tmp_3, null, 4, null);
var tmp0_this_0 = tmp0_also;
// Inline function 'kotlin.collections.plusAssign' call
var tmp0_plusAssign_0 = tmp0_this_0.eb5_1;
tmp0_plusAssign_0.c(stmIf_0);
tmp$ret$1 = stmIf_0;
var tmp_4 = Companion_getInstance_46();
var tmp_5 = tmp0_also.l6t();
tmp_4.rh7(tmp0_also, tmp_5, null, 4, null);
tmp$ret$2 = tmp0_also;
tmp$ret$3 = FragmentShader(tmp$ret$2.ib5());
return tmp$ret$3;
};
Companion_14.$metadata$ = objectMeta('Companion');
var Companion_instance_14;
function Companion_getInstance_46() {
if (Companion_instance_14 == null)
new Companion_14();
return Companion_instance_14;
}
function BatchBuilder2D$lambda(this$0) {
return function (it) {
this$0.th7(false, false, 3, null);
return Unit_getInstance();
};
}
function AddType_NO_ADD_getInstance() {
AddType_initEntries();
return AddType_NO_ADD_instance;
}
function BatchBuilder2D(ctx, reqMaxQuads) {
Companion_getInstance_46();
this.vga_1 = ctx;
this.wga_1 = reqMaxQuads;
this.xga_1 = get_BB_MAX_TEXTURES();
var tmp = this;
var tmp$ret$0;
// Inline function 'kotlin.math.min' call
var tmp0_min = this.wga_1;
var tmp1_min = Companion_getInstance_46().pg6_1;
tmp$ret$0 = Math.min(tmp0_min, tmp1_min);
tmp.yga_1 = tmp$ret$0;
this.zga_1 = this.vga_1.yg9_1;
this.agb_1 = this.vga_1.ig9_1;
var tmp$ret$2;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace = get_logger();
var tmp0_log = Level_TRACE_getInstance();
var tmp_0;
if (tmp0_trace.s51(tmp0_log)) {
var tmp$ret$1;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.<anonymous>' call
tmp$ret$1 = 'BatchBuilder2D[0]';
tmp0_trace.u51(tmp0_log, tmp$ret$1);
tmp_0 = Unit_getInstance();
}
tmp$ret$2 = tmp_0;
this.vga_1.aga_1.d54(BatchBuilder2D$lambda(this));
this.bgb_1 = true;
this.cgb_1 = this.yga_1 + 9 | 0;
this.dgb_1 = imul(this.yga_1, 4);
this.egb_1 = imul(this.yga_1, 6);
var tmp$ret$4;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace_0 = get_logger();
var tmp0_log_0 = Level_TRACE_getInstance();
var tmp_1;
if (tmp0_trace_0.s51(tmp0_log_0)) {
var tmp$ret$3;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.<anonymous>' call
tmp$ret$3 = 'BatchBuilder2D[1]';
tmp0_trace_0.u51(tmp0_log_0, tmp$ret$3);
tmp_1 = Unit_getInstance();
}
tmp$ret$4 = tmp_1;
this.fgb_1 = Companion_getInstance_16().k2n(imul(24, this.dgb_1));
this.ggb_1 = new Int8Array(this.dgb_1);
this.hgb_1 = new Int8Array(this.dgb_1);
this.igb_1 = new Int8Array(this.dgb_1);
this.jgb_1 = Companion_getInstance_16().k2n(imul(2, this.egb_1));
var tmp_2 = this;
var tmp$ret$5;
// Inline function 'com.soywiz.kmem.FBuffer.i16' call
var tmp0__get_i16__2k4o59 = this.jgb_1;
tmp$ret$5 = tmp0__get_i16__2k4o59.v4w_1;
tmp_2.kgb_1 = tmp$ret$5;
var tmp_3 = this;
var tmp$ret$6;
// Inline function 'com.soywiz.kmem.FBuffer.i32' call
var tmp0__get_i32__2k4pj7 = this.fgb_1;
tmp$ret$6 = tmp0__get_i32__2k4pj7.w4w_1;
tmp_3.lgb_1 = tmp$ret$6;
var tmp_4 = this;
var tmp$ret$7;
// Inline function 'com.soywiz.kmem.FBuffer.f32' call
var tmp0__get_f32__2k2skm = this.fgb_1;
tmp$ret$7 = tmp0__get_f32__2k2skm.x4w_1;
tmp_4.mgb_1 = tmp$ret$7;
this.ngb_1 = this.fgb_1.t4w_1;
this.ogb_1 = this.fgb_1.z4w_1;
var tmp$ret$9;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace_1 = get_logger();
var tmp0_log_1 = Level_TRACE_getInstance();
var tmp_5;
if (tmp0_trace_1.s51(tmp0_log_1)) {
var tmp$ret$8;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.<anonymous>' call
tmp$ret$8 = 'BatchBuilder2D[2]';
tmp0_trace_1.u51(tmp0_log_1, tmp$ret$8);
tmp_5 = Unit_getInstance();
}
tmp$ret$9 = tmp_5;
this.pgb_1 = 0;
this.qgb_1 = 0;
this.rgb_1 = 0;
this.sgb_1 = 0;
var tmp_6 = this;
var tmp_7 = 0;
var tmp_8 = this.xga_1;
var tmp$ret$10;
// Inline function 'kotlin.arrayOfNulls' call
tmp$ret$10 = fillArrayVal(Array(tmp_8), null);
var tmp_9 = tmp$ret$10;
while (tmp_7 < tmp_8) {
var tmp_10 = tmp_7;
var tmp$ret$11;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.currentTexN.<anonymous>' call
tmp$ret$11 = null;
tmp_9[tmp_10] = tmp$ret$11;
tmp_7 = tmp_7 + 1 | 0;
}
tmp_6.tgb_1 = tmp_9;
this.ugb_1 = false;
this.vgb_1 = Companion_getInstance_53().og8_1;
this.wgb_1 = null;
var tmp$ret$13;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace_2 = get_logger();
var tmp0_log_2 = Level_TRACE_getInstance();
var tmp_11;
if (tmp0_trace_2.s51(tmp0_log_2)) {
var tmp$ret$12;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.<anonymous>' call
tmp$ret$12 = 'BatchBuilder2D[3]';
tmp0_trace_2.u51(tmp0_log_2, tmp$ret$12);
tmp_11 = Unit_getInstance();
}
tmp$ret$13 = tmp_11;
this.xgb_1 = this.agb_1.jb9();
this.ygb_1 = this.agb_1.jb9();
this.zgb_1 = this.agb_1.jb9();
this.agc_1 = this.agb_1.ib9();
var tmp$ret$15;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace_3 = get_logger();
var tmp0_log_3 = Level_TRACE_getInstance();
var tmp_12;
if (tmp0_trace_3.s51(tmp0_log_3)) {
var tmp$ret$14;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.<anonymous>' call
tmp$ret$14 = 'BatchBuilder2D[4]';
tmp0_trace_3.u51(tmp0_log_3, tmp$ret$14);
tmp_12 = Unit_getInstance();
}
tmp$ret$15 = tmp_12;
var tmp_13 = this;
tmp_13.bgc_1 = StencilState_init_$Create$(false, null, null, null, null, null, 0, 0, 0, 511, null);
var tmp$ret$17;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace_4 = get_logger();
var tmp0_log_4 = Level_TRACE_getInstance();
var tmp_14;
if (tmp0_trace_4.s51(tmp0_log_4)) {
var tmp$ret$16;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.<anonymous>' call
tmp$ret$16 = 'BatchBuilder2D[5]';
tmp0_trace_4.u51(tmp0_log_4, tmp$ret$16);
tmp_14 = Unit_getInstance();
}
tmp$ret$17 = tmp_14;
var tmp_15 = this;
tmp_15.cgc_1 = ColorMaskState_init_$Create$(false, 1, null);
var tmp$ret$19;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace_5 = get_logger();
var tmp0_log_5 = Level_TRACE_getInstance();
var tmp_16;
if (tmp0_trace_5.s51(tmp0_log_5)) {
var tmp$ret$18;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.<anonymous>' call
tmp$ret$18 = 'BatchBuilder2D[6]';
tmp0_trace_5.u51(tmp0_log_5, tmp$ret$18);
tmp_16 = Unit_getInstance();
}
tmp$ret$19 = tmp_16;
this.dgc_1 = null;
var tmp_17 = this;
tmp_17.egc_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
var tmp$ret$21;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace_6 = get_logger();
var tmp0_log_6 = Level_TRACE_getInstance();
var tmp_18;
if (tmp0_trace_6.s51(tmp0_log_6)) {
var tmp$ret$20;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.<anonymous>' call
tmp$ret$20 = 'BatchBuilder2D[7]';
tmp0_trace_6.u51(tmp0_log_6, tmp$ret$20);
tmp_18 = Unit_getInstance();
}
tmp$ret$21 = tmp_18;
this.fgc_1 = Companion_getInstance_8().zp();
this.ggc_1 = Companion_getInstance_8().zp();
this.hgc_1 = Companion_getInstance_8().zp();
this.igc_1 = Companion_getInstance_8().zp();
this.jgc_1 = Companion_getInstance_8().zp();
this.kgc_1 = Companion_getInstance_8().zp();
this.lgc_1 = Companion_getInstance_8().zp();
this.mgc_1 = Companion_getInstance_8().zp();
this.ngc_1 = Companion_getInstance_8().zp();
this.ogc_1 = Companion_getInstance_8().zp();
var tmp$ret$23;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace_7 = get_logger();
var tmp0_log_7 = Level_TRACE_getInstance();
var tmp_19;
if (tmp0_trace_7.s51(tmp0_log_7)) {
var tmp$ret$22;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.<anonymous>' call
tmp$ret$22 = 'BatchBuilder2D[8]';
tmp0_trace_7.u51(tmp0_log_7, tmp$ret$22);
tmp_19 = Unit_getInstance();
}
tmp$ret$23 = tmp_19;
var tmp$ret$25;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace_8 = get_logger();
var tmp0_log_8 = Level_TRACE_getInstance();
var tmp_20;
if (tmp0_trace_8.s51(tmp0_log_8)) {
var tmp$ret$24;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.<anonymous>' call
tmp$ret$24 = 'BatchBuilder2D[9]';
tmp0_trace_8.u51(tmp0_log_8, tmp$ret$24);
tmp_20 = Unit_getInstance();
}
tmp$ret$25 = tmp_20;
var tmp_21 = this;
var tmp_22 = 0;
var tmp_23 = this.xga_1;
var tmp$ret$26;
// Inline function 'kotlin.arrayOfNulls' call
tmp$ret$26 = fillArrayVal(Array(tmp_23), null);
var tmp_24 = tmp$ret$26;
while (tmp_22 < tmp_23) {
var tmp_25 = tmp_22;
var tmp$ret$27;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.textureUnitN.<anonymous>' call
tmp$ret$27 = TextureUnit_init_$Create$(null, false, null, 4, null);
tmp_24[tmp_25] = tmp$ret$27;
tmp_22 = tmp_22 + 1 | 0;
}
tmp_21.pgc_1 = tmp_24;
var tmp$ret$29;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace_9 = get_logger();
var tmp0_log_9 = Level_TRACE_getInstance();
var tmp_26;
if (tmp0_trace_9.s51(tmp0_log_9)) {
var tmp$ret$28;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.<anonymous>' call
tmp$ret$28 = 'BatchBuilder2D[10]';
tmp0_trace_9.u51(tmp0_log_9, tmp$ret$28);
tmp_26 = Unit_getInstance();
}
tmp$ret$29 = tmp_26;
var tmp_27 = this.vga_1.uh7();
var tmp_28 = 0;
var tmp_29 = this.xga_1;
var tmp$ret$30;
// Inline function 'kotlin.arrayOfNulls' call
tmp$ret$30 = fillArrayVal(Array(tmp_29), null);
var tmp_30 = tmp$ret$30;
while (tmp_28 < tmp_29) {
var tmp_31 = tmp_28;
var tmp$ret$31;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.<anonymous>' call
tmp$ret$31 = to(Companion_getInstance_46().yg6_1[tmp_31], this.pgc_1[tmp_31]);
tmp_30[tmp_31] = tmp$ret$31;
tmp_28 = tmp_28 + 1 | 0;
}
tmp_27.qb6(UniformValues_init_$Create$(tmp_30.slice()));
var tmp$ret$33;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace_10 = get_logger();
var tmp0_log_10 = Level_TRACE_getInstance();
var tmp_32;
if (tmp0_trace_10.s51(tmp0_log_10)) {
var tmp$ret$32;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.<anonymous>' call
tmp$ret$32 = 'BatchBuilder2D[11]';
tmp0_trace_10.u51(tmp0_log_10, tmp$ret$32);
tmp_32 = Unit_getInstance();
}
tmp$ret$33 = tmp_32;
var tmp_33 = this;
tmp_33.qgc_1 = Signal_init_$Create$(null, 1, null);
var tmp_34 = this;
tmp_34.rgc_1 = Signal_init_$Create$(null, 1, null);
this.sgc_1 = fastArrayListOf([new VertexData(this.xgb_1, Companion_getInstance_46().zg6_1), new VertexData(this.ygb_1, Companion_getInstance_46().ag7_1), new VertexData(this.zgb_1, Companion_getInstance_46().bg7_1)]);
}
BatchBuilder2D.prototype.za8 = function () {
return this.vga_1;
};
BatchBuilder2D.prototype.vh7 = function () {
return this.vga_1.sg9_1;
};
BatchBuilder2D.prototype.uh7 = function () {
return this.vga_1.uh7();
};
BatchBuilder2D.prototype.wh7 = function (block) {
var tmp0_useBatcher = this.vga_1;
if (!(tmp0_useBatcher.tga_1 === this)) {
tmp0_useBatcher.mj();
tmp0_useBatcher.tga_1 = this;
}
return block(this);
};
BatchBuilder2D.prototype.ib1 = function (value) {
this.pgb_1 = value;
};
BatchBuilder2D.prototype.xh7 = function () {
return this.pgb_1;
};
BatchBuilder2D.prototype.rb1 = function (_set____db54di) {
this.dgc_1 = _set____db54di;
};
BatchBuilder2D.prototype.yh7 = function () {
return this.dgc_1;
};
BatchBuilder2D.prototype.zh7 = function () {
return this.pgc_1;
};
BatchBuilder2D.prototype.ah8 = function (vd, vp, x, y, u, v, colorMul, colorAdd, texIndex, premultiplied, wrap) {
// Inline function 'com.soywiz.kmem.setF' call
var tmp0_setF = vp + 0 | 0;
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set = vd.m4z_1;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_set;
tmp$ret$0[tmp0_setF] = x;
// Inline function 'com.soywiz.kmem.setF' call
var tmp1_setF = vp + 1 | 0;
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set_0 = vd.m4z_1;
var tmp$ret$1;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$1 = tmp0_set_0;
tmp$ret$1[tmp1_setF] = y;
// Inline function 'com.soywiz.kmem.setF' call
var tmp2_setF = vp + 2 | 0;
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set_1 = vd.m4z_1;
var tmp$ret$2;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$2 = tmp0_set_1;
tmp$ret$2[tmp2_setF] = u;
// Inline function 'com.soywiz.kmem.setF' call
var tmp3_setF = vp + 3 | 0;
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set_2 = vd.m4z_1;
var tmp$ret$3;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$3 = tmp0_set_2;
tmp$ret$3[tmp3_setF] = v;
// Inline function 'com.soywiz.kmem.setI' call
var tmp4_setI = vp + 4 | 0;
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set_3 = vd.n4z_1;
var tmp$ret$4;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$4 = tmp0_set_3;
tmp$ret$4[tmp4_setI] = colorMul;
// Inline function 'com.soywiz.kmem.setI' call
var tmp5_setI = vp + 5 | 0;
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set_4 = vd.n4z_1;
var tmp$ret$5;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$5 = tmp0_set_4;
tmp$ret$5[tmp5_setI] = colorAdd;
this.ggb_1[vp / 6 | 0] = toByte(texIndex);
var tmp = vp / 6 | 0;
var tmp$ret$6;
// Inline function 'com.soywiz.kmem.toByte' call
tmp$ret$6 = premultiplied ? 1 : 0;
this.hgb_1[tmp] = tmp$ret$6;
var tmp_0 = vp / 6 | 0;
var tmp$ret$7;
// Inline function 'com.soywiz.kmem.toByte' call
tmp$ret$7 = wrap ? 1 : 0;
this.igb_1[tmp_0] = tmp$ret$7;
return get_TEXTURED_ARRAY_COMPONENTS_PER_VERTEX();
};
BatchBuilder2D.prototype.bh8 = function (x0, y0, x1, y1, x2, y2, x3, y3, tex, colorMul, colorAdd, texIndex, premultiplied, wrap) {
this.ch8(6, 4);
this.dh8(0, 1, null);
var vp = this.qgb_1;
var vd = this.ogb_1;
vp = vp + this.ah8(vd, vp, x0, y0, tex.a8c(), tex.b8c(), _RGBA___get_value__impl__hhco8v(colorMul), _ColorAdd___get_value__impl__up0ct3(colorAdd), texIndex, premultiplied, wrap) | 0;
vp = vp + this.ah8(vd, vp, x1, y1, tex.c8c(), tex.d8c(), _RGBA___get_value__impl__hhco8v(colorMul), _ColorAdd___get_value__impl__up0ct3(colorAdd), texIndex, premultiplied, wrap) | 0;
vp = vp + this.ah8(vd, vp, x2, y2, tex.e8c(), tex.f8c(), _RGBA___get_value__impl__hhco8v(colorMul), _ColorAdd___get_value__impl__up0ct3(colorAdd), texIndex, premultiplied, wrap) | 0;
vp = vp + this.ah8(vd, vp, x3, y3, tex.g8c(), tex.h8c(), _RGBA___get_value__impl__hhco8v(colorMul), _ColorAdd___get_value__impl__up0ct3(colorAdd), texIndex, premultiplied, wrap) | 0;
this.qgb_1 = vp;
var tmp0_this = this;
tmp0_this.ib1(tmp0_this.xh7() + 4 | 0);
};
BatchBuilder2D.prototype.eh8 = function (x0, y0, x1, y1, x2, y2, x3, y3, tex, colorMul, colorAdd, texIndex, premultiplied, wrap, $mask0, $handler) {
if (!(($mask0 & 2048) === 0))
texIndex = this.sgb_1;
if (!(($mask0 & 4096) === 0))
premultiplied = tex.b7z();
if (!(($mask0 & 8192) === 0))
wrap = false;
return this.bh8(x0, y0, x1, y1, x2, y2, x3, y3, tex, colorMul, colorAdd, texIndex, premultiplied, wrap);
};
BatchBuilder2D.prototype.fh8 = function (vc) {
var tmp0_this = this;
tmp0_this.rgb_1 = tmp0_this.rgb_1 + _addIndices(this, this.kgb_1, this.rgb_1, vc + 0 | 0, vc + 1 | 0, vc + 2 | 0, vc + 3 | 0, vc + 0 | 0, vc + 2 | 0) | 0;
};
BatchBuilder2D.prototype.dh8 = function (vc, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
vc = this.xh7();
return this.fh8(vc);
};
BatchBuilder2D.prototype.gh8 = function (array, matrix, vcount, icount, texIndex, premultiplied, wrap) {
this.ch8(icount, vcount);
var i16 = this.kgb_1;
var ip = this.rgb_1;
var vc = this.xh7();
var arrayIndices = array.hh8_1;
var tmp$ret$0;
// Inline function 'kotlin.math.min' call
var tmp0_min = array.kh8_1;
tmp$ret$0 = Math.min(icount, tmp0_min);
var icount_0 = tmp$ret$0;
arraycopy_0(arrayIndices, 0, i16, ip, icount_0);
arrayadd(i16, toShort(vc), ip, ip + icount_0 | 0);
var vp = this.qgb_1;
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.FBuffer.i32' call
var tmp1__get_i32__r5q70c = array.lh8_1;
tmp$ret$1 = tmp1__get_i32__r5q70c.w4w_1;
var src = tmp$ret$1;
var tmp$ret$2;
// Inline function 'com.soywiz.kmem.FBuffer.i32' call
var tmp2__get_i32__e5iyf9 = this.fgb_1;
tmp$ret$2 = tmp2__get_i32__e5iyf9.w4w_1;
var dst = tmp$ret$2;
arraycopy_1(src, 0, dst, vp, imul(vcount, 6));
var vp6 = this.qgb_1 / 6 | 0;
arrayfill(this.ggb_1, toByte(texIndex), vp6, vp6 + vcount | 0);
var tmp$ret$3;
// Inline function 'com.soywiz.kmem.toByte' call
tmp$ret$3 = premultiplied ? 1 : 0;
arrayfill(this.hgb_1, tmp$ret$3, vp6, vp6 + vcount | 0);
var tmp$ret$4;
// Inline function 'com.soywiz.kmem.toByte' call
tmp$ret$4 = wrap ? 1 : 0;
arrayfill(this.igb_1, tmp$ret$4, vp6, vp6 + vcount | 0);
if (!(matrix == null)) {
applyMatrix(this, matrix, this.qgb_1, vcount);
}
var tmp0_this = this;
tmp0_this.pgb_1 = tmp0_this.pgb_1 + vcount | 0;
var tmp1_this = this;
tmp1_this.qgb_1 = tmp1_this.qgb_1 + imul(vcount, 6) | 0;
var tmp2_this = this;
tmp2_this.rgb_1 = tmp2_this.rgb_1 + icount_0 | 0;
};
BatchBuilder2D.prototype.ph8 = function (array, matrix, vcount, icount, texIndex, premultiplied, wrap, $mask0, $handler) {
if (!(($mask0 & 4) === 0))
vcount = array.jh8_1;
if (!(($mask0 & 8) === 0))
icount = array.kh8_1;
if (!(($mask0 & 16) === 0))
texIndex = this.sgb_1;
return this.gh8(array, matrix, vcount, icount, texIndex, premultiplied, wrap);
};
BatchBuilder2D.prototype.ch8 = function (indices, vertices) {
if (indices === 0 ? vertices === 0 : false)
return false;
var doFlush = !checkAvailable(this, indices, vertices);
if (doFlush) {
this.th7(false, false, 3, null);
}
if (!checkAvailable(this, indices, vertices)) {
// Inline function 'kotlin.error' call
var tmp0_error = 'Too much vertices: indices=' + indices + ', vertices=' + vertices;
throw IllegalStateException_init_$Create$(toString(tmp0_error));
}
return doFlush;
};
BatchBuilder2D.prototype.qh8 = function (tex, smoothing, blendMode, program, icount, vcount) {
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.setStateFast' call
var tmp0_setStateFast = tex.vh4_1;
this.ch8(icount, vcount);
var isCurrentStateFast = this.rh8(tmp0_setStateFast, smoothing, blendMode, program);
if (isCurrentStateFast) {
tmp$ret$0 = Unit_getInstance();
break $l$block;
}
this.th7(false, false, 3, null);
this.sgb_1 = 0;
this.tgb_1[0] = tmp0_setStateFast;
this.ugb_1 = smoothing;
this.vgb_1 = blendMode;
this.wgb_1 = program;
}
};
BatchBuilder2D.prototype.sh8 = function (tex, smoothing, blendMode, program, icount, vcount) {
this.ch8(icount, vcount);
var isCurrentStateFast = this.rh8(tex, smoothing, blendMode, program);
if (isCurrentStateFast)
return Unit_getInstance();
this.th7(false, false, 3, null);
this.sgb_1 = 0;
this.tgb_1[0] = tex;
this.ugb_1 = smoothing;
this.vgb_1 = blendMode;
this.wgb_1 = program;
};
BatchBuilder2D.prototype.th8 = function (tex) {
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = this.tgb_1;
var n = 0;
while (n < tmp0_fastForEach.length) {
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.hasTex.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach[tmp0];
if (tmp1__anonymous__uwfjfc === tex)
return true;
}
return false;
};
BatchBuilder2D.prototype.rh8 = function (tex, smoothing, blendMode, program) {
var hasTex = this.th8(tex);
if (!(this.tgb_1[0] === null) ? !hasTex : false) {
var inductionVariable = 1;
var last = this.tgb_1.length;
if (inductionVariable < last)
$l$loop: do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
if (this.tgb_1[n] === null) {
this.tgb_1[n] = tex;
hasTex = true;
break $l$loop;
}
}
while (inductionVariable < last);
}
var inductionVariable_0 = 0;
var last_0 = this.tgb_1.length - 1 | 0;
if (inductionVariable_0 <= last_0)
$l$loop_0: do {
var n_0 = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
if (tex === this.tgb_1[n_0]) {
this.sgb_1 = n_0;
break $l$loop_0;
}
}
while (inductionVariable_0 <= last_0);
return ((hasTex ? this.ugb_1 === smoothing : false) ? this.vgb_1 === blendMode : false) ? this.wgb_1 === program : false;
};
BatchBuilder2D.prototype.uh8 = function (tex, smoothing, blendMode, program, icount, vcount) {
this.qh8(this.zga_1.gh6(tex), smoothing, blendMode, program, icount, vcount);
};
BatchBuilder2D.prototype.vh8 = function (tex, x, y, width, height, m, filtering, colorMul, colorAdd, blendMode, program, premultiplied, wrap) {
return this.wh8(tex, x, y, width, height, m, filtering, colorMul, colorAdd, blendMode, program, premultiplied, wrap, Unit_getInstance());
};
BatchBuilder2D.prototype.ugc = function (tex, x, y, width, height, m, filtering, colorMul, colorAdd, blendMode, program, premultiplied, wrap, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
x = 0.0;
if (!(($mask0 & 4) === 0))
y = 0.0;
if (!(($mask0 & 8) === 0))
width = tex.d72();
if (!(($mask0 & 16) === 0))
height = tex.e72();
if (!(($mask0 & 32) === 0))
m = this.egc_1;
if (!(($mask0 & 64) === 0))
filtering = true;
if (!(($mask0 & 128) === 0))
colorMul = Colors_getInstance().s7z_1;
if (!(($mask0 & 256) === 0)) {
var tmp$ret$0;
var tmp$ret$0_0;
// Inline function 'com.soywiz.korim.color.Companion.NEUTRAL' call
var tmp0__get_NEUTRAL__h8d6d8 = Companion_getInstance_10();
tmp$ret$0 = get_ColorAdd_NEUTRAL();
tmp$ret$0_0 = Unit_getInstance();
colorAdd = tmp$ret$0;
}
if (!(($mask0 & 512) === 0))
blendMode = Companion_getInstance_53().og8_1;
if (!(($mask0 & 1024) === 0))
program = null;
if (!(($mask0 & 2048) === 0))
premultiplied = tex.b7z();
if (!(($mask0 & 4096) === 0))
wrap = false;
return this.vh8(tex, x, y, width, height, m, filtering, colorMul, colorAdd, blendMode, program, premultiplied, wrap);
};
BatchBuilder2D.prototype.wh8 = function (tex, x, y, width, height, m, filtering, colorMul, colorAdd, blendMode, program, premultiplied, wrap, unit) {
var x0 = x;
var x1 = x + width;
var y0 = y;
var y1 = y + height;
this.qh8(tex.x8b(), filtering, blendMode, program, 6, 4);
var tmp = m.m77(x0, y0);
var tmp_0 = m.n77(x0, y0);
var tmp_1 = m.m77(x1, y0);
var tmp_2 = m.n77(x1, y0);
var tmp_3 = m.m77(x1, y1);
var tmp_4 = m.n77(x1, y1);
var tmp_5 = m.m77(x0, y1);
var tmp_6 = m.n77(x0, y1);
this.eh8(tmp, tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, tmp_6, tex, colorMul, colorAdd, 0, premultiplied, wrap, 2048, null);
};
BatchBuilder2D.prototype.xh8 = function () {
this.xgb_1.waz(this.fgb_1, 0, imul(this.qgb_1, 4));
this.ygb_1.raz(this.ggb_1, 0, this.qgb_1 / 6 | 0);
this.zgb_1.raz(this.igb_1, 0, this.qgb_1 / 6 | 0);
};
BatchBuilder2D.prototype.yh8 = function () {
this.agc_1.waz(this.jgb_1, 0, imul(this.rgb_1, 2));
};
BatchBuilder2D.prototype.zh8 = function () {
this.vga_1.zh8();
var inductionVariable = 0;
var last = this.xga_1;
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var textureUnit = this.pgc_1[n];
var tmp = this.tgb_1[n];
var tmp_0 = this.ugb_1;
textureUnit.paz(tmp, tmp_0, null, 4, null);
}
while (inductionVariable < last);
this.ah9();
};
BatchBuilder2D.prototype.ah9 = function () {
this.uh7().nb6(Companion_getInstance_46().xg6_1, this.agb_1.nba());
};
BatchBuilder2D.prototype.bh9 = function (uploadVertices, uploadIndices) {
if (this.xh7() > 0) {
this.zh8();
var factors = this.vgb_1;
if (uploadVertices) {
this.xh8();
}
if (uploadIndices) {
this.yh8();
}
var tmp0_elvis_lhs = this.wgb_1;
var program = tmp0_elvis_lhs == null ? Companion_getInstance_46().dg7_1 : tmp0_elvis_lhs;
var tmp1_$this = this.agb_1;
var tmp2_vertexData = this.sgc_1;
var tmp3_indices = this.agc_1;
var tmp4_type = DrawType_TRIANGLES_getInstance();
var tmp5_vertexCount = this.rgb_1;
var tmp6_blending = factors.gh9(this.agb_1.nba());
var tmp7_uniforms = this.uh7();
var tmp8_stencil = this.bgc_1;
var tmp9_colorMask = this.cgc_1;
var tmp10_scissor = this.dgc_1;
tmp1_$this.qb9(tmp2_vertexData, program, tmp4_type, tmp5_vertexCount, tmp3_indices, null, 0, tmp6_blending, tmp7_uniforms, tmp8_stencil, tmp9_colorMask, null, tmp10_scissor, 0, 10336, null);
this.qgc_1.k54(this);
}
this.ib1(0);
this.qgb_1 = 0;
this.rgb_1 = 0;
var inductionVariable = 0;
var last = this.xga_1;
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
this.tgb_1[n] = null;
}
while (inductionVariable < last);
this.sgb_1 = 0;
};
BatchBuilder2D.prototype.th7 = function (uploadVertices, uploadIndices, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
uploadVertices = true;
if (!(($mask0 & 2) === 0))
uploadIndices = true;
return this.bh9(uploadVertices, uploadIndices);
};
BatchBuilder2D.prototype.hh9 = function (vertexCount) {
var oldVertexCount = this.xh7();
this.ib1(vertexCount);
try {
this.qgc_1.k54(this);
}finally {
this.ib1(oldVertexCount);
}
};
BatchBuilder2D.prototype.ih9 = function (matrix, callback) {
var tmp1_setViewMatrixTemp = this.vga_1;
var tmp$ret$1;
$l$block_0: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var tmp0_alloc = tmp1_setViewMatrixTemp.mga_1;
var temp = tmp0_alloc.t4t();
try {
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var tmp0_alloc_0 = tmp1_setViewMatrixTemp.lga_1;
var temp_0 = tmp0_alloc_0.t4t();
try {
tmp1_setViewMatrixTemp.mj();
temp.v79(tmp1_setViewMatrixTemp.rg9_1);
temp_0.f76(tmp1_setViewMatrixTemp.sg9_1);
tmp1_setViewMatrixTemp.sg9_1.f76(matrix);
copyFrom(tmp1_setViewMatrixTemp.rg9_1, matrix);
var tmp;
try {
tmp = callback();
}finally {
tmp1_setViewMatrixTemp.mj();
tmp1_setViewMatrixTemp.rg9_1.v79(temp);
tmp1_setViewMatrixTemp.sg9_1.f76(temp_0);
}
tmp$ret$0 = tmp;
break $l$block;
}finally {
tmp0_alloc_0.u4t(temp_0);
}
}
tmp$ret$1 = tmp$ret$0;
break $l$block_0;
}finally {
tmp0_alloc.u4t(temp);
}
}
return tmp$ret$1;
};
BatchBuilder2D.prototype.jh9 = function (uniform, value, flush, callback) {
var tmp0_setTemporalUniform = this.vga_1;
var old = tmp0_setTemporalUniform.uh7().fb6(uniform);
if (flush) {
tmp0_setTemporalUniform.mj();
}
tmp0_setTemporalUniform.uh7().ob6(uniform, value);
var tmp;
try {
tmp = callback(tmp0_setTemporalUniform.uh7());
}finally {
if (flush) {
tmp0_setTemporalUniform.mj();
}
tmp0_setTemporalUniform.uh7().ob6(uniform, old);
}
return tmp;
};
BatchBuilder2D.prototype.kh9 = function (uniforms, callback) {
var tmp1_setTemporalUniforms = this.vga_1;
var tmp$ret$1;
// Inline function 'com.soywiz.kds.Pool.invoke' call
var tmp0_invoke = tmp1_setTemporalUniforms.xg9_1;
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var temp = tmp0_invoke.t4t();
try {
if (!(uniforms == null) ? uniforms.t4o() : false) {
tmp1_setTemporalUniforms.mj();
temp.rb6(tmp1_setTemporalUniforms.uh7());
tmp1_setTemporalUniforms.uh7().qb6(uniforms);
}
var tmp;
try {
tmp = callback(tmp1_setTemporalUniforms.uh7());
}finally {
if (!(uniforms == null) ? uniforms.t4o() : false) {
tmp1_setTemporalUniforms.mj();
tmp1_setTemporalUniforms.uh7().rb6(temp);
}
}
tmp$ret$0 = tmp;
break $l$block;
}finally {
tmp0_invoke.u4t(temp);
}
}
tmp$ret$1 = tmp$ret$0;
return tmp$ret$1;
};
BatchBuilder2D.$metadata$ = classMeta('BatchBuilder2D');
var properties_initialized_BatchBuilder2D_kt_532b2j;
function init_properties_BatchBuilder2D_kt_aoms9l() {
if (properties_initialized_BatchBuilder2D_kt_532b2j) {
} else {
properties_initialized_BatchBuilder2D_kt_532b2j = true;
logger = Companion_getInstance_4().h51('BatchBuilder2D');
var tmp$ret$0;
// Inline function 'kotlin.arrayOfNulls' call
tmp$ret$0 = fillArrayVal(Array(64), null);
BATCH_BUILDER2D_PROGRAMS = tmp$ret$0;
var tmp0_subject = OS_getInstance().m6u();
switch (tmp0_subject) {
case 'linuxArm32Hfp':
case 'iosArm32':
BB_MAX_TEXTURES = 1;
break;
default:
BB_MAX_TEXTURES = 4;
break;
}
}
}
function get_debugLineRenderContext(_this__u8e3s4) {
init_properties_LineRenderBatcher_kt_hetf9l();
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.kds.PropertyThis.getValue' call
var tmp0_getValue = debugLineRenderContext$factory();
var tmp0_elvis_lhs = debugLineRenderContext$delegate.k4v_1;
var res = getExtraTyped(_this__u8e3s4, tmp0_elvis_lhs == null ? tmp0_getValue.callableName : tmp0_elvis_lhs);
if (res == null) {
var r = debugLineRenderContext$delegate.l4v_1(_this__u8e3s4);
// Inline function 'com.soywiz.kds.PropertyThis.setValueUntransformed' call
var tmp0_elvis_lhs_0 = debugLineRenderContext$delegate.k4v_1;
setExtra(_this__u8e3s4, tmp0_elvis_lhs_0 == null ? tmp0_getValue.callableName : tmp0_elvis_lhs_0, r);
tmp$ret$0 = r;
break $l$block;
}
tmp$ret$0 = res;
}
return tmp$ret$0;
}
var debugLineRenderContext$delegate;
function addVertex($this, x, y, color, m) {
$this.vh9_1.x4x($this.aha_1 + 0 | 0, m.m77(x, y));
$this.vh9_1.x4x($this.aha_1 + 1 | 0, m.n77(x, y));
$this.vh9_1.v4x($this.aha_1 + 2 | 0, _RGBA___get_value__impl__hhco8v(color));
var tmp0_this = $this;
var tmp = tmp0_this;
var tmp_0 = tmp0_this.aha_1;
IntCompanionObject_getInstance();
tmp.aha_1 = tmp_0 + ($this.ph9_1.cb5_1 / 4 | 0) | 0;
var tmp1_this = $this;
var tmp2 = tmp1_this.zh9_1;
tmp1_this.zh9_1 = tmp2 + 1 | 0;
}
function LineRenderBatcher$lambda(this$0) {
return function (it) {
this$0.mj();
return Unit_getInstance();
};
}
function LineRenderBatcher$tempViewMat$lambda(it) {
return new Matrix3D();
}
function LineRenderBatcher(ctx) {
this.lh9_1 = ctx;
var tmp = this;
tmp.mh9_1 = Signal_init_$Create$(null, 1, null);
this.lh9_1.aga_1.d54(LineRenderBatcher$lambda(this));
this.nh9_1 = this.lh9_1.ig9_1;
this.oh9_1 = Colors_getInstance().i85_1;
this.ph9_1 = ProgramLayout_init_$Create$([DefaultShaders_getInstance().kas_1, DefaultShaders_getInstance().mas_1]);
var tmp_0 = this;
var tmp$ret$1;
// Inline function 'com.soywiz.korag.shader.VertexShader' call
var builder = Builder_init_$Create$(ShaderType_VERTEX_getInstance());
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.VERTEX.<anonymous>' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = DefaultShaders_getInstance();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.VERTEX.<anonymous>.<anonymous>' call
builder.fb5(builder.l6t(), builder.ubf(builder.ubf(tmp0_apply.ias_1, tmp0_apply.jas_1), builder.hb5([tmp0_apply.kas_1, builder.gb5(0.0), builder.gb5(1.0)])));
builder.fb5(tmp0_apply.oas_1, tmp0_apply.mas_1);
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = VertexShader(builder.ib5());
tmp_0.qh9_1 = tmp$ret$1;
var tmp_1 = this;
var tmp$ret$3;
// Inline function 'com.soywiz.korag.shader.FragmentShader' call
var builder_0 = Builder_init_$Create$(ShaderType_FRAGMENT_getInstance());
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.FRAGMENT.<anonymous>' call
var tmp$ret$2;
// Inline function 'kotlin.apply' call
var tmp0_apply_0 = DefaultShaders_getInstance();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.FRAGMENT.<anonymous>.<anonymous>' call
builder_0.fb5(builder_0.l6t(), tmp0_apply_0.oas_1);
tmp$ret$2 = tmp0_apply_0;
tmp$ret$3 = FragmentShader(builder_0.ib5());
tmp_1.rh9_1 = tmp$ret$3;
this.sh9_1 = this.nh9_1.jb9();
var tmp_2 = this;
tmp_2.th9_1 = Program_init_$Create$(this.qh9_1, this.rh9_1, null, 4, null);
this.uh9_1 = 1024;
this.vh9_1 = Companion_getInstance_16().k2n(imul(24, this.uh9_1));
this.wh9_1 = Companion_getInstance_15().zp();
this.xh9_1 = new Matrix3D();
var tmp_3 = this;
tmp_3.yh9_1 = Pool_init_$Create$(0, LineRenderBatcher$tempViewMat$lambda, 1, null);
this.zh9_1 = 0;
this.aha_1 = 0;
this.bha_1 = Companion_getInstance_53().og8_1;
var tmp_4 = this;
tmp_4.cha_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
}
LineRenderBatcher.prototype.dha = function (block) {
var tmp0_useBatcher = this.lh9_1;
if (!(tmp0_useBatcher.tga_1 === this)) {
tmp0_useBatcher.mj();
tmp0_useBatcher.tga_1 = this;
}
return block(this);
};
LineRenderBatcher.prototype.uh7 = function () {
return this.lh9_1.uh7();
};
LineRenderBatcher.prototype.eha = function (x0, y0, x1, y1, color0, color1, m) {
if (this.zh9_1 >= (this.uh9_1 - 2 | 0)) {
this.mj();
}
addVertex(this, x0, y0, color0, m);
addVertex(this, x1, y1, color1, m);
};
LineRenderBatcher.prototype.fha = function (x0, y0, x1, y1, color0, color1, m, $mask0, $handler) {
if (!(($mask0 & 16) === 0))
color0 = this.oh9_1;
if (!(($mask0 & 32) === 0))
color1 = color0;
if (!(($mask0 & 64) === 0))
m = this.cha_1;
return this.eha(x0, y0, x1, y1, color0, color1, m);
};
LineRenderBatcher.prototype.gha = function (x0, y0, x1, y1, color0, color1, m) {
return this.eha(x0, y0, x1, y1, color0, color1, m);
};
LineRenderBatcher.prototype.hha = function (x0, y0, x1, y1, color0, color1, m, $mask0, $handler) {
if (!(($mask0 & 16) === 0))
color0 = this.oh9_1;
if (!(($mask0 & 32) === 0))
color1 = color0;
if (!(($mask0 & 64) === 0))
m = this.cha_1;
return this.gha(x0, y0, x1, y1, color0, color1, m);
};
LineRenderBatcher.prototype.iha = function (path, m) {
var lastX = {_v: 0.0};
var lastY = {_v: 0.0};
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2' call
var ix = 0.0;
var iy = 0.0;
var lx = {_v: 0.0};
var ly = {_v: 0.0};
var tmp$ret$0;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
tmp$ret$0 = Unit_getInstance();
// Inline function 'com.soywiz.korma.geom.vector.VectorPath.visitCmds' call
var n = 0;
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = path.f7j_1;
var n_0 = 0;
while (n_0 < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korma.geom.vector.VectorPath.visitCmds.<anonymous>' call
var tmp0 = n_0;
n_0 = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.t4n(tmp0);
var tmp0_subject = tmp1__anonymous__uwfjfc;
Command_getInstance();
if (tmp0_subject === 0) {
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
var tmp1 = n;
n = tmp1 + 1 | 0;
var tmp2__anonymous__z9zvc9 = path.g7j_1.m(tmp1);
var tmp2 = n;
n = tmp2 + 1 | 0;
var tmp3__anonymous__ufb84q = path.g7j_1.m(tmp2);
ix = tmp2__anonymous__z9zvc9;
iy = tmp3__anonymous__ufb84q;
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.drawVector.<anonymous>' call
if (false) {
var tmp = lastX._v;
var tmp_0 = lastY._v;
this.hha(tmp, tmp_0, tmp2__anonymous__z9zvc9, tmp3__anonymous__ufb84q, null, null, m, 48, null);
}
lastX._v = tmp2__anonymous__z9zvc9;
lastY._v = tmp3__anonymous__ufb84q;
lx._v = tmp2__anonymous__z9zvc9;
ly._v = tmp3__anonymous__ufb84q;
} else {
Command_getInstance();
if (tmp0_subject === 1) {
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
var tmp3 = n;
n = tmp3 + 1 | 0;
var tmp4__anonymous__pkmkx7 = path.g7j_1.m(tmp3);
var tmp4 = n;
n = tmp4 + 1 | 0;
var tmp5__anonymous__kpxxpo = path.g7j_1.m(tmp4);
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.drawVector.<anonymous>' call
{
var tmp_1 = lastX._v;
var tmp_2 = lastY._v;
this.hha(tmp_1, tmp_2, tmp4__anonymous__pkmkx7, tmp5__anonymous__kpxxpo, null, null, m, 48, null);
}
lastX._v = tmp4__anonymous__pkmkx7;
lastY._v = tmp5__anonymous__kpxxpo;
lx._v = tmp4__anonymous__pkmkx7;
ly._v = tmp5__anonymous__kpxxpo;
var tmp$ret$1;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
tmp$ret$1 = Unit_getInstance();
} else {
Command_getInstance();
if (tmp0_subject === 2) {
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
var tmp5 = n;
n = tmp5 + 1 | 0;
var tmp6__anonymous__fv9ai5 = path.g7j_1.m(tmp5);
var tmp6 = n;
n = tmp6 + 1 | 0;
var tmp7__anonymous__b0knam = path.g7j_1.m(tmp6);
var tmp7 = n;
n = tmp7 + 1 | 0;
var tmp8__anonymous__65w033 = path.g7j_1.m(tmp7);
var tmp8 = n;
n = tmp8 + 1 | 0;
var tmp9__anonymous__1b7cvk = path.g7j_1.m(tmp8);
var sum = Companion_getInstance_8().i7a(lx._v, ly._v, tmp6__anonymous__fv9ai5, tmp7__anonymous__b0knam) + Companion_getInstance_8().i7a(tmp6__anonymous__fv9ai5, tmp7__anonymous__b0knam, tmp8__anonymous__65w033, tmp9__anonymous__1b7cvk);
// Inline function 'com.soywiz.korma.geom.shape.approximateCurve' call
var tmp0_approximateCurve = numberToInt(sum);
var tmp$ret$2;
// Inline function 'kotlin.math.max' call
tmp$ret$2 = Math.max(tmp0_approximateCurve, 20);
var rcurveSteps = tmp$ret$2;
var dt = 1.0 / rcurveSteps;
var lastX_0 = {_v: 0.0};
var lastY_0 = {_v: 0.0};
var prevX = {_v: 0.0};
var prevY = {_v: 0.0};
var emittedCount = {_v: 0};
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>.<anonymous>' call
var tmp$ret$3;
// Inline function 'com.soywiz.korma.geom.bezier.Companion.quadCalc' call
var tmp0_quadCalc = Companion_getInstance_18();
var tmp1_quadCalc = lx._v;
var tmp2_quadCalc = ly._v;
// Inline function 'kotlin.contracts.contract' call
var t1 = 1.0;
var a = t1 * t1;
var c = 0.0;
var b = 2 * t1 * 0.0;
var tmp3__anonymous__ufb84q_0 = a * tmp1_quadCalc + b * tmp6__anonymous__fv9ai5 + c * tmp8__anonymous__65w033;
var tmp4__anonymous__pkmkx7_0 = a * tmp2_quadCalc + b * tmp7__anonymous__b0knam + c * tmp9__anonymous__1b7cvk;
lastX_0._v = tmp3__anonymous__ufb84q_0;
lastY_0._v = tmp4__anonymous__pkmkx7_0;
tmp$ret$3 = Unit_getInstance();
var nStart = false ? 0 : 1;
var nEnd = rcurveSteps;
var inductionVariable = nStart;
if (inductionVariable <= nEnd)
do {
var n_1 = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var ratio = n_1 * dt;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>.<anonymous>' call
var tmp$ret$5;
// Inline function 'com.soywiz.korma.geom.bezier.Companion.quadCalc' call
var tmp0_quadCalc_0 = Companion_getInstance_18();
var tmp1_quadCalc_0 = lx._v;
var tmp2_quadCalc_0 = ly._v;
// Inline function 'kotlin.contracts.contract' call
var t1_0 = 1 - ratio;
var a_0 = t1_0 * t1_0;
var c_0 = ratio * ratio;
var b_0 = 2 * t1_0 * ratio;
var tmp3__anonymous__ufb84q_1 = a_0 * tmp1_quadCalc_0 + b_0 * tmp6__anonymous__fv9ai5 + c_0 * tmp8__anonymous__65w033;
var tmp4__anonymous__pkmkx7_1 = a_0 * tmp2_quadCalc_0 + b_0 * tmp7__anonymous__b0knam + c_0 * tmp9__anonymous__1b7cvk;
var tmp$ret$4;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>.<anonymous>' call
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.drawVector.<anonymous>' call
{
var tmp_3 = lastX._v;
var tmp_4 = lastY._v;
this.hha(tmp_3, tmp_4, tmp3__anonymous__ufb84q_1, tmp4__anonymous__pkmkx7_1, null, null, m, 48, null);
}
lastX._v = tmp3__anonymous__ufb84q_1;
lastY._v = tmp4__anonymous__pkmkx7_1;
var tmp0_0 = emittedCount._v;
emittedCount._v = tmp0_0 + 1 | 0;
lastX_0._v = prevX._v;
lastY_0._v = prevY._v;
tmp$ret$4 = Unit_getInstance();
prevX._v = tmp3__anonymous__ufb84q_1;
prevY._v = tmp4__anonymous__pkmkx7_1;
tmp$ret$5 = Unit_getInstance();
}
while (!(n_1 === nEnd));
lx._v = tmp8__anonymous__65w033;
ly._v = tmp9__anonymous__1b7cvk;
var tmp$ret$6;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
tmp$ret$6 = Unit_getInstance();
} else {
Command_getInstance();
if (tmp0_subject === 3) {
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
var tmp9 = n;
n = tmp9 + 1 | 0;
var tmp10__anonymous__yfiz50 = path.g7j_1.m(tmp9);
var tmp10 = n;
n = tmp10 + 1 | 0;
var tmp11__anonymous__tkubxh = path.g7j_1.m(tmp10);
var tmp11 = n;
n = tmp11 + 1 | 0;
var tmp12__anonymous__oq5opy = path.g7j_1.m(tmp11);
var tmp12 = n;
n = tmp12 + 1 | 0;
var tmp13__anonymous__jvh1if = path.g7j_1.m(tmp12);
var tmp13 = n;
n = tmp13 + 1 | 0;
var tmp14__anonymous__f0seaw = path.g7j_1.m(tmp13);
var tmp14 = n;
n = tmp14 + 1 | 0;
var tmp15__anonymous__a63r3d = path.g7j_1.m(tmp14);
var sum_0 = Companion_getInstance_8().i7a(lx._v, ly._v, tmp10__anonymous__yfiz50, tmp11__anonymous__tkubxh) + Companion_getInstance_8().i7a(tmp10__anonymous__yfiz50, tmp11__anonymous__tkubxh, tmp12__anonymous__oq5opy, tmp13__anonymous__jvh1if) + Companion_getInstance_8().i7a(tmp12__anonymous__oq5opy, tmp13__anonymous__jvh1if, tmp14__anonymous__f0seaw, tmp15__anonymous__a63r3d);
// Inline function 'com.soywiz.korma.geom.shape.approximateCurve' call
var tmp0_approximateCurve_0 = numberToInt(sum_0);
var tmp$ret$7;
// Inline function 'kotlin.math.max' call
tmp$ret$7 = Math.max(tmp0_approximateCurve_0, 20);
var rcurveSteps_0 = tmp$ret$7;
var dt_0 = 1.0 / rcurveSteps_0;
var lastX_1 = {_v: 0.0};
var lastY_1 = {_v: 0.0};
var prevX_0 = {_v: 0.0};
var prevY_0 = {_v: 0.0};
var emittedCount_0 = {_v: 0};
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>.<anonymous>' call
var tmp$ret$8;
// Inline function 'com.soywiz.korma.geom.bezier.Companion.cubicCalc' call
var tmp0_cubicCalc = Companion_getInstance_18();
var tmp1_cubicCalc = lx._v;
var tmp2_cubicCalc = ly._v;
// Inline function 'kotlin.contracts.contract' call
var cx = 3.0 * (tmp10__anonymous__yfiz50 - tmp1_cubicCalc);
var bx = 3.0 * (tmp12__anonymous__oq5opy - tmp10__anonymous__yfiz50) - cx;
var ax = tmp14__anonymous__f0seaw - tmp1_cubicCalc - cx - bx;
var cy = 3.0 * (tmp11__anonymous__tkubxh - tmp2_cubicCalc);
var by = 3.0 * (tmp13__anonymous__jvh1if - tmp11__anonymous__tkubxh) - cy;
var ay = tmp15__anonymous__a63r3d - tmp2_cubicCalc - cy - by;
var tSquared = 0.0;
var tCubed = tSquared * 0.0;
var tmp3__anonymous__ufb84q_2 = ax * tCubed + bx * tSquared + cx * 0.0 + tmp1_cubicCalc;
var tmp4__anonymous__pkmkx7_2 = ay * tCubed + by * tSquared + cy * 0.0 + tmp2_cubicCalc;
lastX_1._v = tmp3__anonymous__ufb84q_2;
lastY_1._v = tmp4__anonymous__pkmkx7_2;
tmp$ret$8 = Unit_getInstance();
var nStart_0 = false ? 0 : 1;
var nEnd_0 = rcurveSteps_0;
var inductionVariable_0 = nStart_0;
if (inductionVariable_0 <= nEnd_0)
do {
var n_2 = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var ratio_0 = n_2 * dt_0;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>.<anonymous>' call
var tmp$ret$10;
// Inline function 'com.soywiz.korma.geom.bezier.Companion.cubicCalc' call
var tmp0_cubicCalc_0 = Companion_getInstance_18();
var tmp1_cubicCalc_0 = lx._v;
var tmp2_cubicCalc_0 = ly._v;
// Inline function 'kotlin.contracts.contract' call
var cx_0 = 3.0 * (tmp10__anonymous__yfiz50 - tmp1_cubicCalc_0);
var bx_0 = 3.0 * (tmp12__anonymous__oq5opy - tmp10__anonymous__yfiz50) - cx_0;
var ax_0 = tmp14__anonymous__f0seaw - tmp1_cubicCalc_0 - cx_0 - bx_0;
var cy_0 = 3.0 * (tmp11__anonymous__tkubxh - tmp2_cubicCalc_0);
var by_0 = 3.0 * (tmp13__anonymous__jvh1if - tmp11__anonymous__tkubxh) - cy_0;
var ay_0 = tmp15__anonymous__a63r3d - tmp2_cubicCalc_0 - cy_0 - by_0;
var tSquared_0 = ratio_0 * ratio_0;
var tCubed_0 = tSquared_0 * ratio_0;
var tmp3__anonymous__ufb84q_3 = ax_0 * tCubed_0 + bx_0 * tSquared_0 + cx_0 * ratio_0 + tmp1_cubicCalc_0;
var tmp4__anonymous__pkmkx7_3 = ay_0 * tCubed_0 + by_0 * tSquared_0 + cy_0 * ratio_0 + tmp2_cubicCalc_0;
var tmp$ret$9;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>.<anonymous>' call
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.drawVector.<anonymous>' call
{
var tmp_5 = lastX._v;
var tmp_6 = lastY._v;
this.hha(tmp_5, tmp_6, tmp3__anonymous__ufb84q_3, tmp4__anonymous__pkmkx7_3, null, null, m, 48, null);
}
lastX._v = tmp3__anonymous__ufb84q_3;
lastY._v = tmp4__anonymous__pkmkx7_3;
var tmp0_1 = emittedCount_0._v;
emittedCount_0._v = tmp0_1 + 1 | 0;
lastX_1._v = prevX_0._v;
lastY_1._v = prevY_0._v;
tmp$ret$9 = Unit_getInstance();
prevX_0._v = tmp3__anonymous__ufb84q_3;
prevY_0._v = tmp4__anonymous__pkmkx7_3;
tmp$ret$10 = Unit_getInstance();
}
while (!(n_2 === nEnd_0));
lx._v = tmp14__anonymous__f0seaw;
ly._v = tmp15__anonymous__a63r3d;
var tmp$ret$11;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
tmp$ret$11 = Unit_getInstance();
} else {
Command_getInstance();
if (tmp0_subject === 4) {
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.drawVector.<anonymous>' call
var tmp0__anonymous__q1qw7t = ix;
var tmp1__anonymous__uwfjfc_0 = iy;
{
var tmp_7 = lastX._v;
var tmp_8 = lastY._v;
this.hha(tmp_7, tmp_8, tmp0__anonymous__q1qw7t, tmp1__anonymous__uwfjfc_0, null, null, m, 48, null);
}
lastX._v = tmp0__anonymous__q1qw7t;
lastY._v = tmp1__anonymous__uwfjfc_0;
var tmp$ret$12;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
tmp$ret$12 = Unit_getInstance();
var tmp$ret$13;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
tmp$ret$13 = Unit_getInstance();
}
}
}
}
}
}
var tmp$ret$14;
// Inline function 'com.soywiz.korma.geom.shape.emitPoints2.<anonymous>' call
tmp$ret$14 = Unit_getInstance();
};
LineRenderBatcher.prototype.jha = function (m, block) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = VectorPath_init_$Create$(null, null, null, false, 15, null);
// Inline function 'kotlin.contracts.contract' call
block(tmp0_apply);
tmp$ret$0 = tmp0_apply;
this.iha(tmp$ret$0, m);
};
LineRenderBatcher.prototype.kha = function (color, m, block) {
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.color' call
var oldColor = this.oh9_1;
this.oh9_1 = color;
try {
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.drawVector.<anonymous>' call
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.drawVector' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = VectorPath_init_$Create$(null, null, null, false, 15, null);
// Inline function 'kotlin.contracts.contract' call
block(tmp0_apply);
tmp$ret$0 = tmp0_apply;
this.iha(tmp$ret$0, m);
}finally {
this.oh9_1 = oldColor;
}
};
LineRenderBatcher.prototype.lha = function (blending, block) {
var doUpdate = !(this.bha_1 === blending);
var old = this.bha_1;
try {
if (doUpdate) {
this.lh9_1.mj();
this.bha_1 = blending;
}
return block();
}finally {
if (doUpdate) {
this.lh9_1.mj();
}
this.bha_1 = old;
}
};
LineRenderBatcher.prototype.mj = function () {
if (this.zh9_1 > 0) {
this.mh9_1.k54(this);
this.sh9_1.waz(this.vh9_1, 0, imul(this.aha_1, 4));
this.lh9_1.zh8();
var tmp0_$this = this.nh9_1;
var tmp1_vertices = this.sh9_1;
var tmp2_program = this.th9_1;
var tmp3_type = DrawType_LINES_getInstance();
var tmp4_vertexLayout = this.ph9_1;
var tmp5_vertexCount = this.zh9_1;
var tmp6_uniforms = this.uh7();
var tmp7_blending = this.bha_1.ch9_1;
tmp0_$this.ob9(tmp1_vertices, tmp2_program, tmp3_type, tmp4_vertexLayout, tmp5_vertexCount, null, null, 0, tmp7_blending, tmp6_uniforms, null, null, null, null, 0, 31968, null);
}
this.zh9_1 = 0;
this.aha_1 = 0;
};
LineRenderBatcher.prototype.mha = function (matrix, block) {
var tmp$ret$1;
$l$block: {
// Inline function 'com.soywiz.korma.geom.Matrix.keepMatrix' call
var tmp0_keepMatrix = this.cha_1;
var a = tmp0_keepMatrix.i74_1;
var b = tmp0_keepMatrix.j74_1;
var c = tmp0_keepMatrix.k74_1;
var d = tmp0_keepMatrix.l74_1;
var tx = tmp0_keepMatrix.m74_1;
var ty = tmp0_keepMatrix.n74_1;
try {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.drawWithGlobalMatrix.<anonymous>' call
if (!(matrix == null)) {
tmp0_keepMatrix.f76(matrix);
}
tmp$ret$0 = block();
tmp$ret$1 = tmp$ret$0;
break $l$block;
}finally {
tmp0_keepMatrix.i74_1 = a;
tmp0_keepMatrix.j74_1 = b;
tmp0_keepMatrix.k74_1 = c;
tmp0_keepMatrix.l74_1 = d;
tmp0_keepMatrix.m74_1 = tx;
tmp0_keepMatrix.n74_1 = ty;
}
}
return tmp$ret$1;
};
LineRenderBatcher.prototype.nha = function (color, block) {
var oldColor = this.oh9_1;
this.oh9_1 = color;
try {
block();
}finally {
this.oh9_1 = oldColor;
}
};
LineRenderBatcher.$metadata$ = classMeta('LineRenderBatcher');
function useLineBatcher(_this__u8e3s4, matrix, block) {
init_properties_LineRenderBatcher_kt_hetf9l();
var tmp$ret$3;
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.use' call
var tmp0_use = get_debugLineRenderContext(_this__u8e3s4);
var tmp0_useBatcher = tmp0_use.lh9_1;
if (!(tmp0_useBatcher.tga_1 === tmp0_use)) {
tmp0_useBatcher.mj();
tmp0_useBatcher.tga_1 = tmp0_use;
}
var tmp$ret$2;
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.drawWithGlobalMatrix' call
var tmp0_drawWithGlobalMatrix = get_debugLineRenderContext(_this__u8e3s4);
var tmp$ret$1;
$l$block: {
// Inline function 'com.soywiz.korma.geom.Matrix.keepMatrix' call
var tmp0_keepMatrix = tmp0_drawWithGlobalMatrix.cha_1;
var a = tmp0_keepMatrix.i74_1;
var b = tmp0_keepMatrix.j74_1;
var c = tmp0_keepMatrix.k74_1;
var d = tmp0_keepMatrix.l74_1;
var tx = tmp0_keepMatrix.m74_1;
var ty = tmp0_keepMatrix.n74_1;
try {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.drawWithGlobalMatrix.<anonymous>' call
if (!(matrix == null)) {
tmp0_keepMatrix.f76(matrix);
}
tmp$ret$0 = block(tmp0_use);
tmp$ret$1 = tmp$ret$0;
break $l$block;
}finally {
tmp0_keepMatrix.i74_1 = a;
tmp0_keepMatrix.j74_1 = b;
tmp0_keepMatrix.k74_1 = c;
tmp0_keepMatrix.l74_1 = d;
tmp0_keepMatrix.m74_1 = tx;
tmp0_keepMatrix.n74_1 = ty;
}
}
tmp$ret$2 = tmp$ret$1;
tmp$ret$3 = tmp$ret$2;
return tmp$ret$3;
}
function debugLineRenderContext$delegate$lambda($this$$receiver) {
init_properties_LineRenderBatcher_kt_hetf9l();
return new LineRenderBatcher($this$$receiver);
}
function debugLineRenderContext$factory() {
return getPropertyCallableRef('debugLineRenderContext', 1, KProperty1, function (receiver) {
return get_debugLineRenderContext(receiver);
}, null);
}
var properties_initialized_LineRenderBatcher_kt_urwcod;
function init_properties_LineRenderBatcher_kt_hetf9l() {
if (properties_initialized_LineRenderBatcher_kt_urwcod) {
} else {
properties_initialized_LineRenderBatcher_kt_urwcod = true;
debugLineRenderContext$delegate = PropertyThis_init_$Create$(null, debugLineRenderContext$delegate$lambda, 1, null);
}
}
function RenderContext$uniforms$delegate$lambda(this$0) {
return function () {
return UniformValues_init_$Create$([to(DefaultShaders_getInstance().ias_1, this$0.qg9_1), to(DefaultShaders_getInstance().jas_1, this$0.rg9_1)]);
};
}
function RenderContext$tempOldUniformsList$lambda(it) {
return new UniformValues();
}
function RenderContext$dynamicVertexBufferPool$lambda(this$0) {
return function (it) {
return this$0.ig9_1.jb9();
};
}
function RenderContext$dynamicVertexDataPool$lambda(this$0) {
return function (it) {
return this$0.ig9_1.lb9([], null, 3, null);
};
}
function RenderContext$dynamicIndexBufferPool$lambda(this$0) {
return function (it) {
return this$0.ig9_1.ib9();
};
}
function RenderContext$matrixPool$lambda(it) {
it.o74();
return Unit_getInstance();
}
function RenderContext$matrixPool$lambda_0(it) {
return Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
}
function RenderContext$matrix3DPool$lambda(it) {
it.o74();
return Unit_getInstance();
}
function RenderContext$matrix3DPool$lambda_0(it) {
return new Matrix3D();
}
function RenderContext$pointPool$lambda(it) {
it.r7a(0, 0);
return Unit_getInstance();
}
function RenderContext$pointPool$lambda_0(it) {
return Companion_getInstance_8().zp();
}
function RenderContext$rectPool$lambda(it) {
it.t7c(0, 0, 0, 0);
return Unit_getInstance();
}
function RenderContext$rectPool$lambda_0(it) {
return Companion_getInstance_15().zp();
}
function RenderContext$renderToTextureScissors$lambda(it) {
return Scissor_init_$Create$(null, 1, null);
}
function RenderContext(ag, bp, stats, coroutineContext, batchMaxQuads) {
this.ig9_1 = ag;
this.jg9_1 = bp;
this.kg9_1 = stats;
this.lg9_1 = coroutineContext;
this.mg9_1 = batchMaxQuads;
var tmp = this;
tmp.ng9_1 = Mixin_init_$Create$(null, 1, null);
var tmp_0 = this;
tmp_0.og9_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
var tmp_1 = this;
tmp_1.pg9_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
this.qg9_1 = new Matrix3D();
this.rg9_1 = new Matrix3D();
var tmp_2 = this;
tmp_2.sg9_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
var tmp_3 = this;
tmp_3.tg9_1 = lazy(RenderContext$uniforms$delegate$lambda(this));
this.ug9_1 = true;
this.vg9_1 = Companion_getInstance_15().zp();
this.wg9_1 = new Matrix3D();
var tmp_4 = this;
tmp_4.xg9_1 = Pool_init_$Create$(0, RenderContext$tempOldUniformsList$lambda, 1, null);
this.yg9_1 = new AgBitmapTextureManager(this.ig9_1);
this.zg9_1 = new AgBufferManager(this.ig9_1);
var tmp_5 = this;
tmp_5.aga_1 = Signal_init_$Create$(null, 1, null);
var tmp_6 = this;
var tmp_7 = this.jg9_1;
tmp_6.bga_1 = tmp_7 instanceof Views ? tmp_7 : null;
this.cga_1 = null;
this.dga_1 = 1.0;
this.ega_1 = Colors_getInstance().s7z_1;
this.fga_1 = 0;
this.gga_1 = new BatchBuilder2D(this, this.mg9_1);
var tmp_8 = this;
tmp_8.hga_1 = Pool_init_$Create$(0, RenderContext$dynamicVertexBufferPool$lambda(this), 1, null);
var tmp_9 = this;
tmp_9.iga_1 = Pool_init_$Create$(0, RenderContext$dynamicVertexDataPool$lambda(this), 1, null);
var tmp_10 = this;
tmp_10.jga_1 = Pool_init_$Create$(0, RenderContext$dynamicIndexBufferPool$lambda(this), 1, null);
this.kga_1 = new RenderContext2D(this.gga_1, this.yg9_1);
var tmp_11 = this;
var tmp_12 = RenderContext$matrixPool$lambda;
tmp_11.lga_1 = new Pool(tmp_12, 8, RenderContext$matrixPool$lambda_0);
var tmp_13 = this;
var tmp_14 = RenderContext$matrix3DPool$lambda;
tmp_13.mga_1 = new Pool(tmp_14, 8, RenderContext$matrix3DPool$lambda_0);
var tmp_15 = this;
var tmp_16 = RenderContext$pointPool$lambda;
tmp_15.nga_1 = new Pool(tmp_16, 8, RenderContext$pointPool$lambda_0);
var tmp_17 = this;
var tmp_18 = RenderContext$rectPool$lambda;
tmp_17.oga_1 = new Pool(tmp_18, 8, RenderContext$rectPool$lambda_0);
var tmp_19 = this;
tmp_19.pga_1 = MutableMarginInt_init_$Create$(0, 0, 0, 0, 15, null);
var tmp_20 = this;
tmp_20.qga_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
var tmp_21 = this;
tmp_21.rga_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
this.sga_1 = true;
this.tga_1 = null;
var tmp_22 = this;
tmp_22.uga_1 = Pool_init_$Create$(0, RenderContext$renderToTextureScissors$lambda, 1, null);
}
RenderContext.prototype.kch = function () {
return this.ig9_1;
};
RenderContext.prototype.oha = function () {
return this.jg9_1;
};
RenderContext.prototype.e4v = function (_set____db54di) {
this.ng9_1.e4v(_set____db54di);
};
RenderContext.prototype.f4v = function () {
return this.ng9_1.f4v();
};
RenderContext.prototype.pha = function () {
return this.jg9_1.pha();
};
RenderContext.prototype.fgd = function () {
return this.jg9_1.fgd();
};
RenderContext.prototype.qha = function () {
return this.jg9_1.qha();
};
RenderContext.prototype.egd = function () {
return this.jg9_1.egd();
};
RenderContext.prototype.rha = function () {
return this.jg9_1.rha();
};
RenderContext.prototype.sha = function () {
return this.jg9_1.sha();
};
RenderContext.prototype.tha = function () {
return this.jg9_1.tha();
};
RenderContext.prototype.ngw = function () {
return this.jg9_1.ngw();
};
RenderContext.prototype.uha = function () {
return this.jg9_1.uha();
};
RenderContext.prototype.vha = function () {
return this.jg9_1.vha();
};
RenderContext.prototype.ofz = function (x, y, out) {
return this.jg9_1.ofz(x, y, out);
};
RenderContext.prototype.xha = function () {
return this.rg9_1;
};
RenderContext.prototype.vh7 = function () {
return this.sg9_1;
};
RenderContext.prototype.uh7 = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = uniforms$factory();
tmp$ret$0 = this.tg9_1.l1();
return tmp$ret$0;
};
RenderContext.prototype.zh8 = function () {
if (this.ug9_1 ? this.ig9_1.oba() : false) {
this.qg9_1.x79(this.vg9_1.b72(0, this.ig9_1.gb9(), this.ig9_1.fb9(), 0), -1.0, 1.0);
} else {
this.qg9_1.x79(this.vg9_1.b72(0, 0, this.ig9_1.fb9(), this.ig9_1.gb9()), -1.0, 1.0);
this.qg9_1.u79(this.qg9_1, toMatrix3D(this.og9_1, this.wg9_1));
}
};
RenderContext.prototype.ih9 = function (matrix, callback) {
var tmp$ret$1;
$l$block_0: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var tmp0_alloc = this.mga_1;
var temp = tmp0_alloc.t4t();
try {
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var tmp0_alloc_0 = this.lga_1;
var temp_0 = tmp0_alloc_0.t4t();
try {
this.mj();
temp.v79(this.rg9_1);
temp_0.f76(this.sg9_1);
this.sg9_1.f76(matrix);
copyFrom(this.rg9_1, matrix);
var tmp;
try {
tmp = callback();
}finally {
this.mj();
this.rg9_1.v79(temp);
this.sg9_1.f76(temp_0);
}
tmp$ret$0 = tmp;
break $l$block;
}finally {
tmp0_alloc_0.u4t(temp_0);
}
}
tmp$ret$1 = tmp$ret$0;
break $l$block_0;
}finally {
tmp0_alloc.u4t(temp);
}
}
};
RenderContext.prototype.yha = function () {
return this.yg9_1;
};
RenderContext.prototype.mh0 = function () {
return this.bga_1;
};
RenderContext.prototype.zha = function () {
return this.dga_1;
};
RenderContext.prototype.ahb = function () {
return this.ega_1;
};
RenderContext.prototype.bhb = function () {
return this.gga_1;
};
RenderContext.prototype.chb = function (block) {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.use' call
var tmp0_use = this.gga_1;
var tmp0_useBatcher = tmp0_use.vga_1;
if (!(tmp0_useBatcher.tga_1 === tmp0_use)) {
tmp0_useBatcher.mj();
tmp0_useBatcher.tga_1 = tmp0_use;
}
tmp$ret$0 = block(tmp0_use);
return tmp$ret$0;
};
RenderContext.prototype.dhb = function () {
return this.kga_1;
};
RenderContext.prototype.ehb = function (block) {
// Inline function 'com.soywiz.korge.render.RenderContext.useBatcher' call
var tmp0_useBatcher = this.gga_1;
if (!(this.tga_1 === tmp0_useBatcher)) {
this.mj();
this.tga_1 = tmp0_useBatcher;
}
// Inline function 'com.soywiz.korge.render.RenderContext.useCtx2d.<anonymous>' call
block(this.kga_1);
};
RenderContext.prototype.fhb = function () {
return this.lga_1;
};
RenderContext.prototype.ghb = function () {
return this.mga_1;
};
RenderContext.prototype.hhb = function (_set____db54di) {
this.tga_1 = _set____db54di;
};
RenderContext.prototype.ihb = function () {
return this.tga_1;
};
RenderContext.prototype.mj = function () {
this.tga_1 = null;
this.aga_1.k54(Unit_getInstance());
};
RenderContext.prototype.jhb = function () {
return this.uga_1;
};
RenderContext.prototype.khb = function (frameBuffer, clear, render) {
this.mj();
// Inline function 'com.soywiz.korag.AG.setRenderBufferTemporally' call
var tmp0_setRenderBufferTemporally = this.ig9_1;
tmp0_setRenderBufferTemporally.qba(frameBuffer);
try {
// Inline function 'com.soywiz.korge.render.RenderContext.renderToFrameBuffer.<anonymous>' call
var tmp$ret$2;
// Inline function 'com.soywiz.korge.render.RenderContext.useBatcher' call
var tmp$ret$1;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.use' call
var tmp0_use = this.gga_1;
var tmp0_useBatcher = tmp0_use.vga_1;
if (!(tmp0_useBatcher.tga_1 === tmp0_use)) {
tmp0_useBatcher.mj();
tmp0_useBatcher.tga_1 = tmp0_use;
}
var oldScissors = tmp0_use.dgc_1;
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var tmp0_alloc = this.uga_1;
var temp = tmp0_alloc.t4t();
try {
tmp0_use.dgc_1 = temp.t7c(0, 0, frameBuffer.d72(), frameBuffer.e72());
var tmp;
try {
if (clear) {
var tmp_0 = Colors_getInstance().x7z_1;
this.ig9_1.kba(tmp_0, 0.0, 0, false, false, false, null, 126, null);
}
render(frameBuffer);
this.mj();
tmp = Unit_getInstance();
}finally {
tmp0_use.dgc_1 = oldScissors;
}
tmp$ret$0 = tmp;
break $l$block;
}finally {
tmp0_alloc.u4t(temp);
}
}
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
}finally {
tmp0_setRenderBufferTemporally.rba();
}
};
RenderContext.prototype.lhb = function (width, height, render, hasDepth, hasStencil, msamples, use) {
this.mj();
// Inline function 'com.soywiz.korag.AG.tempAllocateFrameBuffer' call
var tmp0_tempAllocateFrameBuffer = this.ig9_1;
var rb = tmp0_tempAllocateFrameBuffer.vba(width, height, hasDepth, hasStencil, msamples);
try {
// Inline function 'com.soywiz.korge.render.RenderContext.renderToTexture.<anonymous>' call
// Inline function 'com.soywiz.korge.render.RenderContext.renderToFrameBuffer' call
this.mj();
// Inline function 'com.soywiz.korag.AG.setRenderBufferTemporally' call
var tmp0_setRenderBufferTemporally = this.ig9_1;
tmp0_setRenderBufferTemporally.qba(rb);
try {
// Inline function 'com.soywiz.korge.render.RenderContext.renderToFrameBuffer.<anonymous>' call
var tmp$ret$2;
// Inline function 'com.soywiz.korge.render.RenderContext.useBatcher' call
var tmp$ret$1;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.use' call
var tmp0_use = this.gga_1;
var tmp0_useBatcher = tmp0_use.vga_1;
if (!(tmp0_useBatcher.tga_1 === tmp0_use)) {
tmp0_useBatcher.mj();
tmp0_useBatcher.tga_1 = tmp0_use;
}
var oldScissors = tmp0_use.dgc_1;
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var tmp0_alloc = this.uga_1;
var temp = tmp0_alloc.t4t();
try {
tmp0_use.dgc_1 = temp.t7c(0, 0, rb.d72(), rb.e72());
var tmp;
try {
{
var tmp_0 = Colors_getInstance().x7z_1;
this.ig9_1.kba(tmp_0, 0.0, 0, false, false, false, null, 126, null);
}
// Inline function 'com.soywiz.korge.render.RenderContext.renderToTexture.<anonymous>.<anonymous>' call
render(rb);
this.mj();
tmp = Unit_getInstance();
}finally {
tmp0_use.dgc_1 = oldScissors;
}
tmp$ret$0 = tmp;
break $l$block;
}finally {
tmp0_alloc.u4t(temp);
}
}
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
}finally {
tmp0_setRenderBufferTemporally.rba();
}
use(Companion_getInstance_47().mhb(rb).nhb(0, 0, width, height));
this.mj();
}finally {
tmp0_tempAllocateFrameBuffer.wba(rb);
}
};
RenderContext.prototype.a2z = function () {
this.ig9_1.eba();
};
RenderContext.prototype.tgc = function (bmp) {
return this.yg9_1.hh6(bmp);
};
RenderContext.prototype.ohb = function (bmp) {
return this.yg9_1.ih6(bmp);
};
RenderContext.prototype.uh6 = function (buffer) {
return this.zg9_1.uh6(buffer);
};
RenderContext.prototype.phb = function (bmp) {
return this.yg9_1.gh6(bmp);
};
RenderContext.prototype.jh6 = function () {
this.mj();
this.a2z();
this.yg9_1.jh6();
this.zg9_1.jh6();
};
RenderContext.prototype.qhb = function (batcher, block) {
if (!(this.tga_1 === batcher)) {
this.mj();
this.tga_1 = batcher;
}
block(batcher);
};
RenderContext.$metadata$ = classMeta('RenderContext', [Extra, BoundsProvider, AGFeatures]);
function uniforms$factory() {
return getPropertyCallableRef('uniforms', 1, KProperty1, function (receiver) {
return receiver.uh7();
}, null);
}
function get_logger_0() {
init_properties_RenderContext2D_kt_9z3ilz();
return logger_0;
}
var logger_0;
function RenderContext2D$mpool$lambda(it) {
return Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
}
function RenderContext2D$scissorPool$lambda(it) {
return Scissor_init_$Create$(null, 1, null);
}
function RenderContext2D(batch, agBitmapTextureManager) {
this.rhb_1 = batch;
this.shb_1 = agBitmapTextureManager;
var tmp = this;
tmp.thb_1 = Mixin_init_$Create$(null, 1, null);
var tmp$ret$1;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace = get_logger_0();
var tmp0_log = Level_TRACE_getInstance();
var tmp_0;
if (tmp0_trace.s51(tmp0_log)) {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.render.RenderContext2D.<anonymous>' call
tmp$ret$0 = 'RenderContext2D[0]';
tmp0_trace.u51(tmp0_log, tmp$ret$0);
tmp_0 = Unit_getInstance();
}
tmp$ret$1 = tmp_0;
var tmp_1 = this;
tmp_1.uhb_1 = Pool_init_$Create$(0, RenderContext2D$mpool$lambda, 1, null);
var tmp$ret$3;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace_0 = get_logger_0();
var tmp0_log_0 = Level_TRACE_getInstance();
var tmp_2;
if (tmp0_trace_0.s51(tmp0_log_0)) {
var tmp$ret$2;
// Inline function 'com.soywiz.korge.render.RenderContext2D.<anonymous>' call
tmp$ret$2 = 'RenderContext2D[1]';
tmp0_trace_0.u51(tmp0_log_0, tmp$ret$2);
tmp_2 = Unit_getInstance();
}
tmp$ret$3 = tmp_2;
var tmp_3 = this;
tmp_3.vhb_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
this.whb_1 = Companion_getInstance_53().og8_1;
this.xhb_1 = Colors_getInstance().s7z_1;
this.yhb_1 = true;
var tmp$ret$5;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace_1 = get_logger_0();
var tmp0_log_1 = Level_TRACE_getInstance();
var tmp_4;
if (tmp0_trace_1.s51(tmp0_log_1)) {
var tmp$ret$4;
// Inline function 'com.soywiz.korge.render.RenderContext2D.<anonymous>' call
tmp$ret$4 = 'RenderContext2D[2]';
tmp0_trace_1.u51(tmp0_log_1, tmp$ret$4);
tmp_4 = Unit_getInstance();
}
tmp$ret$5 = tmp_4;
var tmp_5 = this;
tmp_5.zhb_1 = Pool_init_$Create$_1(8, RenderContext2D$scissorPool$lambda);
var tmp_6 = this;
tmp_6.ahc_1 = Scissor_init_$Create$(null, 1, null);
}
RenderContext2D.prototype.bhb = function () {
return this.rhb_1;
};
RenderContext2D.prototype.e4v = function (_set____db54di) {
this.thb_1.e4v(_set____db54di);
};
RenderContext2D.prototype.f4v = function () {
return this.thb_1.f4v();
};
RenderContext2D.prototype.hh6 = function (slice) {
return this.shb_1.hh6(slice);
};
RenderContext2D.prototype.bhc = function () {
return this.uhb_1;
};
RenderContext2D.prototype.chc = function () {
return this.vhb_1;
};
RenderContext2D.prototype.dhc = function (_set____db54di) {
this.whb_1 = _set____db54di;
};
RenderContext2D.prototype.ehc = function () {
return this.whb_1;
};
RenderContext2D.prototype.fhc = function (_set____db54di) {
this.xhb_1 = _set____db54di;
};
RenderContext2D.prototype.ghc = function () {
return this.xhb_1;
};
RenderContext2D.prototype.hhc = function (_set____db54di) {
this.yhb_1 = _set____db54di;
};
RenderContext2D.prototype.ihc = function () {
return this.yhb_1;
};
RenderContext2D.prototype.jhc = function (callback) {
var tmp$ret$1;
$l$block: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var tmp0_alloc = this.uhb_1;
var temp = tmp0_alloc.t4t();
try {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.render.RenderContext2D.keepMatrix.<anonymous>' call
temp.f76(this.vhb_1);
var tmp;
try {
tmp = callback();
}finally {
this.vhb_1.f76(temp);
}
tmp$ret$0 = tmp;
tmp$ret$1 = tmp$ret$0;
break $l$block;
}finally {
tmp0_alloc.u4t(temp);
}
}
return tmp$ret$1;
};
RenderContext2D.prototype.khc = function (callback) {
var oldBlendFactors = this.whb_1;
try {
return callback();
}finally {
this.whb_1 = oldBlendFactors;
}
};
RenderContext2D.prototype.lhc = function (callback) {
var multiplyColor = this.xhb_1;
try {
return callback();
}finally {
this.xhb_1 = multiplyColor;
}
};
RenderContext2D.prototype.mhc = function (callback) {
var filtering = this.yhb_1;
try {
return callback();
}finally {
this.yhb_1 = filtering;
}
};
RenderContext2D.prototype.nhc = function (callback) {
var tmp$ret$9;
// Inline function 'com.soywiz.korge.render.RenderContext2D.keepMatrix' call
var tmp$ret$8;
$l$block_2: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var tmp0_alloc = this.uhb_1;
var temp = tmp0_alloc.t4t();
try {
var tmp$ret$7;
// Inline function 'com.soywiz.korge.render.RenderContext2D.keepMatrix.<anonymous>' call
temp.f76(this.vhb_1);
var tmp;
try {
var tmp$ret$6;
// Inline function 'com.soywiz.korge.render.RenderContext2D.keep.<anonymous>' call
var tmp$ret$5;
$l$block_1: {
// Inline function 'com.soywiz.korge.render.RenderContext2D.keepBlendMode' call
var oldBlendFactors = this.whb_1;
try {
var tmp$ret$4;
// Inline function 'com.soywiz.korge.render.RenderContext2D.keep.<anonymous>.<anonymous>' call
var tmp$ret$3;
$l$block_0: {
// Inline function 'com.soywiz.korge.render.RenderContext2D.keepColor' call
var multiplyColor = this.xhb_1;
try {
var tmp$ret$2;
// Inline function 'com.soywiz.korge.render.RenderContext2D.keep.<anonymous>.<anonymous>.<anonymous>' call
var tmp$ret$1;
$l$block: {
// Inline function 'com.soywiz.korge.render.RenderContext2D.keepFiltering' call
var filtering = this.yhb_1;
try {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.render.RenderContext2D.keep.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
tmp$ret$0 = callback();
tmp$ret$1 = tmp$ret$0;
break $l$block;
}finally {
this.yhb_1 = filtering;
}
}
tmp$ret$2 = tmp$ret$1;
tmp$ret$3 = tmp$ret$2;
break $l$block_0;
}finally {
this.xhb_1 = multiplyColor;
}
}
tmp$ret$4 = tmp$ret$3;
tmp$ret$5 = tmp$ret$4;
break $l$block_1;
}finally {
this.whb_1 = oldBlendFactors;
}
}
tmp$ret$6 = tmp$ret$5;
tmp = tmp$ret$6;
}finally {
this.vhb_1.f76(temp);
}
tmp$ret$7 = tmp;
tmp$ret$8 = tmp$ret$7;
break $l$block_2;
}finally {
tmp0_alloc.u4t(temp);
}
}
tmp$ret$9 = tmp$ret$8;
return tmp$ret$9;
};
RenderContext2D.prototype.ohc = function (matrix) {
this.vhb_1.f76(matrix);
};
RenderContext2D.prototype.phc = function (x, y, width, height, color, filtering) {
var tmp0_$this = this.rhb_1;
var tmp$ret$1;
// Inline function 'com.soywiz.korge.render.RenderContext2D.getTexture' call
var tmp$ret$0;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.white' call
var tmp0__get_white__j8g7zy = Bitmaps_getInstance();
tmp$ret$0 = get_Bitmaps_white();
var tmp1_getTexture = tmp$ret$0;
tmp$ret$1 = this.shb_1.hh6(tmp1_getTexture);
var tmp1_tex = tmp$ret$1;
var tmp2_x = x;
var tmp3_y = y;
var tmp4_width = width;
var tmp5_height = height;
var tmp6_m = this.vhb_1;
var tmp7_blendMode = this.whb_1;
var tmp$ret$2;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.white' call
var tmp2__get_white__sxtif0 = Bitmaps_getInstance();
tmp$ret$2 = get_Bitmaps_white();
var tmp8_premultiplied = tmp$ret$2.b7z();
tmp0_$this.ugc(tmp1_tex, tmp2_x, tmp3_y, tmp4_width, tmp5_height, tmp6_m, filtering, color, null, tmp7_blendMode, null, tmp8_premultiplied, false, 1280, null);
};
RenderContext2D.prototype.qhc = function (x, y, width, height, border, color, filtering) {
this.phc(x, y, width, border, color, filtering);
this.phc(x, y, border, height, color, filtering);
this.phc(x + width - border, y, border, height, color, filtering);
this.phc(x, y + height - border, width, border, color, filtering);
};
RenderContext2D.prototype.rhc = function (rect, block) {
var tmp0_safe_receiver = rect;
var tmp;
if (tmp0_safe_receiver == null) {
tmp = null;
} else {
var tmp$ret$1;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korge.render.RenderContext2D.scissor.<anonymous>' call
tmp$ret$0 = this.ahc_1.dav(tmp0_safe_receiver);
tmp$ret$1 = tmp$ret$0;
tmp = tmp$ret$1;
}
var tmp0_scissor = tmp;
var oldScissor = this.rhb_1.dgc_1;
var returnScissor = this.shc(tmp0_scissor);
var tmp_0;
try {
tmp_0 = block();
}finally {
this.thc(oldScissor, returnScissor);
}
return tmp_0;
};
RenderContext2D.prototype.uhc = function (scissor, block) {
var oldScissor = this.rhb_1.dgc_1;
var returnScissor = this.shc(scissor);
try {
block();
}finally {
this.thc(oldScissor, returnScissor);
}
};
RenderContext2D.prototype.shc = function (scissor) {
var returnScissor = null;
this.rhb_1.th7(false, false, 3, null);
if (!(scissor == null)) {
var left = this.vhb_1.h77(scissor.b74(), scissor.y73());
var top = this.vhb_1.i77(scissor.b74(), scissor.y73());
var right = this.vhb_1.h77(scissor.z73(), scissor.a74());
var bottom = this.vhb_1.i77(scissor.z73(), scissor.a74());
returnScissor = this.zhb_1.t4t().u72(left, top, right - left, bottom - top);
this.rhb_1.dgc_1 = returnScissor;
} else {
this.rhb_1.dgc_1 = null;
}
return returnScissor;
};
RenderContext2D.prototype.thc = function (oldScissor, returnScissor) {
if (!(returnScissor == null)) {
this.zhb_1.u4t(returnScissor);
}
this.rhb_1.th7(false, false, 3, null);
this.rhb_1.dgc_1 = oldScissor;
};
RenderContext2D.prototype.vhc = function () {
return this.ahc_1;
};
RenderContext2D.$metadata$ = classMeta('RenderContext2D', [Extra]);
var properties_initialized_RenderContext2D_kt_ica10b;
function init_properties_RenderContext2D_kt_9z3ilz() {
if (properties_initialized_RenderContext2D_kt_ica10b) {
} else {
properties_initialized_RenderContext2D_kt_ica10b = true;
logger_0 = Companion_getInstance_4().h51('RenderContext2D');
}
}
function Texture_init_$Init$(base, left, top, right, bottom, $mask0, $marker, $this) {
if (!(($mask0 & 2) === 0))
left = 0;
if (!(($mask0 & 4) === 0))
top = 0;
if (!(($mask0 & 8) === 0))
right = base.wh4_1;
if (!(($mask0 & 16) === 0))
bottom = base.xh4_1;
Texture.call($this, base, left, top, right, bottom);
return $this;
}
function Texture_init_$Create$(base, left, top, right, bottom, $mask0, $marker) {
return Texture_init_$Init$(base, left, top, right, bottom, $mask0, $marker, Object.create(Texture.prototype));
}
function Companion_15() {
Companion_instance_15 = this;
}
Companion_15.prototype.whc = function (agBase, width, height) {
return new Texture(new TextureBase(agBase, width, height), 0, 0, width, height);
};
Companion_15.prototype.mhb = function (frameBuffer) {
return this.whc(frameBuffer.u9z(), frameBuffer.d72(), frameBuffer.e72());
};
Companion_15.$metadata$ = objectMeta('Companion');
var Companion_instance_15;
function Companion_getInstance_47() {
if (Companion_instance_15 == null)
new Companion_15();
return Companion_instance_15;
}
function Texture(base, left, top, right, bottom) {
Companion_getInstance_47();
this.uh5_1 = base;
this.vh5_1 = left;
this.wh5_1 = top;
this.xh5_1 = right;
this.yh5_1 = bottom;
this.zh5_1 = this.vh5_1 / this.uh5_1.wh4_1;
this.ah6_1 = this.xh5_1 / this.uh5_1.wh4_1;
this.bh6_1 = this.wh5_1 / this.uh5_1.xh4_1;
this.ch6_1 = this.yh5_1 / this.uh5_1.xh4_1;
}
Texture.prototype.x8b = function () {
return this.uh5_1;
};
Texture.prototype.b74 = function () {
return this.vh5_1;
};
Texture.prototype.y73 = function () {
return this.wh5_1;
};
Texture.prototype.b7z = function () {
return this.uh5_1.b7z();
};
Texture.prototype.d1n = function () {
return this.vh5_1;
};
Texture.prototype.e1n = function () {
return this.wh5_1;
};
Texture.prototype.d72 = function () {
return this.xh5_1 - this.vh5_1 | 0;
};
Texture.prototype.e72 = function () {
return this.yh5_1 - this.wh5_1 | 0;
};
Texture.prototype.a8c = function () {
return this.zh5_1;
};
Texture.prototype.b8c = function () {
return this.bh6_1;
};
Texture.prototype.c8c = function () {
return this.ah6_1;
};
Texture.prototype.d8c = function () {
return this.bh6_1;
};
Texture.prototype.g8c = function () {
return this.zh5_1;
};
Texture.prototype.h8c = function () {
return this.ch6_1;
};
Texture.prototype.e8c = function () {
return this.ah6_1;
};
Texture.prototype.f8c = function () {
return this.ch6_1;
};
Texture.prototype.nhb = function (x, y, width, height) {
return this.xhc(x, y, x + width | 0, y + height | 0);
};
Texture.prototype.dh6 = function (rect) {
return this.nhb(numberToInt(rect.v71_1), numberToInt(rect.w71_1), numberToInt(rect.x71_1), numberToInt(rect.y71_1));
};
Texture.prototype.xhc = function (left, top, right, bottom) {
var tleft = clamp(this.d1n() + left | 0, this.vh5_1, this.xh5_1);
var tright = clamp(this.d1n() + right | 0, this.vh5_1, this.xh5_1);
var ttop = clamp(this.e1n() + top | 0, this.wh5_1, this.yh5_1);
var tbottom = clamp(this.e1n() + bottom | 0, this.wh5_1, this.yh5_1);
return new Texture(this.uh5_1, tleft, ttop, tright, tbottom);
};
Texture.prototype.x2c = function () {
return this.uh5_1.x2c();
};
Texture.prototype.toString = function () {
return 'Texture(' + this.uh5_1 + ', (x=' + this.d1n() + ', y=' + this.e1n() + ', width=' + this.d72() + ', height=' + this.e72() + '))';
};
Texture.$metadata$ = classMeta('Texture', [Closeable, BmpCoordsWithT]);
function TextureBase(base, width, height) {
this.vh4_1 = base;
this.wh4_1 = width;
this.xh4_1 = height;
this.yh4_1 = -1;
}
TextureBase.prototype.yhc = function (_set____db54di) {
this.vh4_1 = _set____db54di;
};
TextureBase.prototype.r9d = function (_set____db54di) {
this.wh4_1 = _set____db54di;
};
TextureBase.prototype.d72 = function () {
return this.wh4_1;
};
TextureBase.prototype.q9d = function (_set____db54di) {
this.xh4_1 = _set____db54di;
};
TextureBase.prototype.e72 = function () {
return this.xh4_1;
};
TextureBase.prototype.zhc = function (_set____db54di) {
this.yh4_1 = _set____db54di;
};
TextureBase.prototype.b7z = function () {
var tmp0_safe_receiver = this.vh4_1;
return (tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b7z()) === true;
};
TextureBase.prototype.x2c = function () {
var tmp0_safe_receiver = this.vh4_1;
if (tmp0_safe_receiver == null)
null;
else {
tmp0_safe_receiver.x2c();
}
this.vh4_1 = null;
};
TextureBase.prototype.th5 = function (bmp, mipmaps) {
if (bmp instanceof MultiBitmap) {
var tmp0_safe_receiver = this.vh4_1;
if (tmp0_safe_receiver == null)
null;
else
tmp0_safe_receiver.caz(bmp.nhd_1, bmp.d72(), bmp.e72());
} else {
var tmp1_safe_receiver = this.vh4_1;
if (tmp1_safe_receiver == null)
null;
else
tmp1_safe_receiver.eaz(bmp, mipmaps);
}
};
TextureBase.prototype.toString = function () {
return 'TextureBase(' + this.vh4_1 + ')';
};
TextureBase.$metadata$ = classMeta('TextureBase', [Closeable, ISizeInt]);
function get_TEXTURED_ARRAY_QUAD_INDICES() {
init_properties_TexturedVertexArray_kt_vs1pqg();
return TEXTURED_ARRAY_QUAD_INDICES;
}
var TEXTURED_ARRAY_QUAD_INDICES;
var TEXTURED_ARRAY_EMPTY_INT_ARRAY;
function get_TEXTURED_ARRAY_EMPTY_SHORT_ARRAY() {
init_properties_TexturedVertexArray_kt_vs1pqg();
return TEXTURED_ARRAY_EMPTY_SHORT_ARRAY;
}
var TEXTURED_ARRAY_EMPTY_SHORT_ARRAY;
function get_TEXTURED_ARRAY_COMPONENTS_PER_VERTEX() {
return TEXTURED_ARRAY_COMPONENTS_PER_VERTEX;
}
var TEXTURED_ARRAY_COMPONENTS_PER_VERTEX;
function TexturedVertexArray_init_$Init$(vcount, indices, icount, $mask0, $marker, $this) {
if (!(($mask0 & 4) === 0))
icount = indices.length;
TexturedVertexArray.call($this, vcount, indices, icount);
return $this;
}
function TexturedVertexArray_init_$Create$(vcount, indices, icount, $mask0, $marker) {
return TexturedVertexArray_init_$Init$(vcount, indices, icount, $mask0, $marker, Object.create(TexturedVertexArray.prototype));
}
function Companion_16() {
Companion_instance_16 = this;
var tmp = this;
var tmp_0 = new Int16Array(0);
tmp.ohd_1 = TexturedVertexArray_init_$Create$(0, tmp_0, 0, 4, null);
}
Companion_16.prototype.phd = function (quadCount) {
var tmp = imul(quadCount, 4);
var tmp$ret$0;
// Inline function 'com.soywiz.korge.render.Companion.quadIndices' call
tmp$ret$0 = TEXTURED_ARRAY_quadIndices(quadCount);
var tmp_0 = tmp$ret$0;
return TexturedVertexArray_init_$Create$(tmp, tmp_0, 0, 4, null);
};
Companion_16.prototype.qhd = function () {
return get_TEXTURED_ARRAY_QUAD_INDICES();
};
Companion_16.prototype.rhd = function (quadCount) {
return TEXTURED_ARRAY_quadIndices(quadCount);
};
Companion_16.$metadata$ = objectMeta('Companion');
var Companion_instance_16;
function Companion_getInstance_48() {
if (Companion_instance_16 == null)
new Companion_16();
return Companion_instance_16;
}
function TexturedVertexArray(vcount, indices, icount) {
Companion_getInstance_48();
this.hh8_1 = indices;
this.ih8_1 = vcount;
this.jh8_1 = vcount;
this.kh8_1 = icount;
this.lh8_1 = Companion_getInstance_16().o4w(imul(imul(6, this.ih8_1), 4));
this.mh8_1 = this.lh8_1.z4w_1;
this.nh8_1 = 0;
this.oh8_1 = new BoundsBuilder();
}
TexturedVertexArray.prototype.shd = function (x, y) {
var tmp$ret$3;
// Inline function 'com.soywiz.korge.render.TexturedVertexArray.setY' call
var tmp$ret$1;
// Inline function 'com.soywiz.korge.render.TexturedVertexArray.setX' call
// Inline function 'com.soywiz.kmem.setF' call
var tmp0_setF = this.mh8_1;
var tmp1_setF = this.nh8_1 + 0 | 0;
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set = tmp0_setF.m4z_1;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_set;
tmp$ret$0[tmp1_setF] = x;
tmp$ret$1 = this;
var tmp4_setY = tmp$ret$1;
// Inline function 'com.soywiz.kmem.setF' call
var tmp2_setF = tmp4_setY.mh8_1;
var tmp3_setF = tmp4_setY.nh8_1 + 1 | 0;
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set_0 = tmp2_setF.m4z_1;
var tmp$ret$2;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$2 = tmp0_set_0;
tmp$ret$2[tmp3_setF] = y;
tmp$ret$3 = tmp4_setY;
};
TexturedVertexArray.prototype.thd = function (i) {
this.nh8_1 = imul(i, 6);
return this;
};
TexturedVertexArray.prototype.uhd = function (v) {
// Inline function 'com.soywiz.kmem.setF' call
var tmp0_setF = this.mh8_1;
var tmp1_setF = this.nh8_1 + 0 | 0;
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set = tmp0_setF.m4z_1;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_set;
tmp$ret$0[tmp1_setF] = v;
return this;
};
TexturedVertexArray.prototype.vhd = function (v) {
// Inline function 'com.soywiz.kmem.setF' call
var tmp0_setF = this.mh8_1;
var tmp1_setF = this.nh8_1 + 1 | 0;
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set = tmp0_setF.m4z_1;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_set;
tmp$ret$0[tmp1_setF] = v;
return this;
};
TexturedVertexArray.prototype.whd = function (fast, pos, x, y, u, v, colMul, colAdd) {
// Inline function 'com.soywiz.kmem.setF' call
var tmp0_setF = pos + 0 | 0;
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set = fast.m4z_1;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_set;
tmp$ret$0[tmp0_setF] = x;
// Inline function 'com.soywiz.kmem.setF' call
var tmp1_setF = pos + 1 | 0;
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set_0 = fast.m4z_1;
var tmp$ret$1;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$1 = tmp0_set_0;
tmp$ret$1[tmp1_setF] = y;
// Inline function 'com.soywiz.kmem.setF' call
var tmp2_setF = pos + 2 | 0;
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set_1 = fast.m4z_1;
var tmp$ret$2;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$2 = tmp0_set_1;
tmp$ret$2[tmp2_setF] = u;
// Inline function 'com.soywiz.kmem.setF' call
var tmp3_setF = pos + 3 | 0;
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set_2 = fast.m4z_1;
var tmp$ret$3;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$3 = tmp0_set_2;
tmp$ret$3[tmp3_setF] = v;
// Inline function 'com.soywiz.kmem.setI' call
var tmp4_setI = pos + 4 | 0;
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set_3 = fast.n4z_1;
var tmp$ret$4;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$4 = tmp0_set_3;
tmp$ret$4[tmp4_setI] = colMul;
// Inline function 'com.soywiz.kmem.setI' call
var tmp5_setI = pos + 5 | 0;
// Inline function 'com.soywiz.kmem.set' call
var tmp0_set_4 = fast.n4z_1;
var tmp$ret$5;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$5 = tmp0_set_4;
tmp$ret$5[tmp5_setI] = colAdd;
return 6;
};
TexturedVertexArray.prototype.xhd = function (index, x, y, width, height, matrix, bmp, colMul, colAdd) {
this.yhd(index, x, y, width, height, matrix, bmp, colMul, colAdd);
};
TexturedVertexArray.prototype.yhd = function (index, x, y, width, height, matrix, bmp, colMul, colAdd) {
this.zhd(index, x, y, width, height, matrix, bmp.a8c(), bmp.b8c(), bmp.c8c(), bmp.d8c(), bmp.g8c(), bmp.h8c(), bmp.e8c(), bmp.f8c(), colMul, colAdd);
};
TexturedVertexArray.prototype.zhd = function (index, x, y, width, height, matrix, tl_x, tl_y, tr_x, tr_y, bl_x, bl_y, br_x, br_y, colMul, colAdd) {
var xw = x + width;
var yh = y + height;
var af = matrix.x75();
var cf = matrix.z75();
var txf = matrix.b76();
var x0 = af * x + cf * y + txf;
var x1 = af * xw + cf * y + txf;
var x2 = af * xw + cf * yh + txf;
var x3 = af * x + cf * yh + txf;
var df = matrix.a76();
var bf = matrix.y75();
var tyf = matrix.c76();
var y0 = df * y + bf * x + tyf;
var y1 = df * y + bf * xw + tyf;
var y2 = df * yh + bf * xw + tyf;
var y3 = df * yh + bf * x + tyf;
var fast = this.mh8_1;
var pos = imul(index, 6);
var cm = _RGBA___get_value__impl__hhco8v(colMul);
var ca = _ColorAdd___get_value__impl__up0ct3(colAdd);
pos = pos + this.whd(fast, pos, x0, y0, tl_x, tl_y, cm, ca) | 0;
pos = pos + this.whd(fast, pos, x1, y1, tr_x, tr_y, cm, ca) | 0;
pos = pos + this.whd(fast, pos, x2, y2, br_x, br_y, cm, ca) | 0;
pos = pos + this.whd(fast, pos, x3, y3, bl_x, bl_y, cm, ca) | 0;
};
TexturedVertexArray.prototype.d1n = function () {
var tmp$ret$2;
// Inline function 'com.soywiz.kmem.getF' call
var tmp0_getF = this.mh8_1;
var tmp1_getF = this.nh8_1 + 0 | 0;
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.get' call
var tmp0_get = tmp0_getF.m4z_1;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_get;
tmp$ret$1 = tmp$ret$0[tmp1_getF];
tmp$ret$2 = tmp$ret$1;
return tmp$ret$2;
};
TexturedVertexArray.prototype.e1n = function () {
var tmp$ret$2;
// Inline function 'com.soywiz.kmem.getF' call
var tmp0_getF = this.mh8_1;
var tmp1_getF = this.nh8_1 + 1 | 0;
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.get' call
var tmp0_get = tmp0_getF.m4z_1;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_get;
tmp$ret$1 = tmp$ret$0[tmp1_getF];
tmp$ret$2 = tmp$ret$1;
return tmp$ret$2;
};
TexturedVertexArray.prototype.ahe = function (other) {
arraycopy_1(other.lh8_1.w4w_1, 0, this.lh8_1.w4w_1, 0, this.lh8_1.s4w_1 / 4 | 0);
arraycopy_2(other.hh8_1, 0, this.hh8_1, 0, this.hh8_1.length);
};
TexturedVertexArray.prototype.bhe = function (matrix) {
var inductionVariable = 0;
var last = this.jh8_1;
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$0;
// Inline function 'com.soywiz.korge.render.TexturedVertexArray.select' call
this.nh8_1 = imul(n, 6);
tmp$ret$0 = this;
var x = this.d1n();
var y = this.e1n();
this.shd(matrix.m77(x, y), matrix.n77(x, y));
}
while (inductionVariable < last);
};
TexturedVertexArray.$metadata$ = classMeta('TexturedVertexArray');
function get_VERTEX_INDEX_SIZE() {
return VERTEX_INDEX_SIZE;
}
var VERTEX_INDEX_SIZE;
function TEXTURED_ARRAY_quadIndices(quadCount) {
init_properties_TexturedVertexArray_kt_vs1pqg();
if (quadCount === 0)
return get_TEXTURED_ARRAY_EMPTY_SHORT_ARRAY();
var out = new Int16Array(imul(quadCount, 6));
var m = 0;
var base = 0;
var inductionVariable = 0;
if (inductionVariable < quadCount)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tmp1 = m;
m = tmp1 + 1 | 0;
out[tmp1] = toShort(base + 0 | 0);
var tmp2 = m;
m = tmp2 + 1 | 0;
out[tmp2] = toShort(base + 1 | 0);
var tmp3 = m;
m = tmp3 + 1 | 0;
out[tmp3] = toShort(base + 2 | 0);
var tmp4 = m;
m = tmp4 + 1 | 0;
out[tmp4] = toShort(base + 3 | 0);
var tmp5 = m;
m = tmp5 + 1 | 0;
out[tmp5] = toShort(base + 0 | 0);
var tmp6 = m;
m = tmp6 + 1 | 0;
out[tmp6] = toShort(base + 2 | 0);
base = base + 4 | 0;
}
while (inductionVariable < quadCount);
return out;
}
var properties_initialized_TexturedVertexArray_kt_ouua70;
function init_properties_TexturedVertexArray_kt_vs1pqg() {
if (properties_initialized_TexturedVertexArray_kt_ouua70) {
} else {
properties_initialized_TexturedVertexArray_kt_ouua70 = true;
var tmp$ret$0;
// Inline function 'kotlin.shortArrayOf' call
tmp$ret$0 = new Int16Array([0, 1, 2, 3, 0, 2]);
TEXTURED_ARRAY_QUAD_INDICES = tmp$ret$0;
TEXTURED_ARRAY_EMPTY_INT_ARRAY = new Int32Array(0);
TEXTURED_ARRAY_EMPTY_SHORT_ARRAY = new Int16Array(0);
}
}
function _get_root__dd8asp($this) {
var tmp = $this.che_1;
if (!(tmp == null))
return tmp;
else {
throwUninitializedPropertyAccessException('root');
}
}
function _get_mountable__707cy($this) {
var tmp = $this.dhe_1;
if (!(tmp == null))
return tmp;
else {
throwUninitializedPropertyAccessException('mountable');
}
}
function ResourcesRoot$init$slambda(this$0, resultContinuation) {
this.mhe_1 = this$0;
CoroutineImpl.call(this, resultContinuation);
}
ResourcesRoot$init$slambda.prototype.ohe = function ($this$MountableVfs, $cont) {
var tmp = this.phe($this$MountableVfs, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
ResourcesRoot$init$slambda.prototype.w7 = function (p1, $cont) {
return this.ohe((!(p1 == null) ? isInterface(p1, Mountable) : false) ? p1 : THROW_CCE(), $cont);
};
ResourcesRoot$init$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
if (tmp === 0) {
this.p7_1 = 1;
this.mhe_1.dhe_1 = this.nhe_1;
return Unit_getInstance();
} else if (tmp === 1) {
throw this.r7_1;
}
} catch ($p) {
throw $p;
}
while (true);
};
ResourcesRoot$init$slambda.prototype.phe = function ($this$MountableVfs, completion) {
var i = new ResourcesRoot$init$slambda(this.mhe_1, completion);
i.nhe_1 = $this$MountableVfs;
return i;
};
ResourcesRoot$init$slambda.$metadata$ = classMeta('ResourcesRoot$init$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
function ResourcesRoot$init$slambda_0(this$0, resultContinuation) {
var i = new ResourcesRoot$init$slambda(this$0, resultContinuation);
var l = function ($this$MountableVfs, $cont) {
return i.ohe($this$MountableVfs, $cont);
};
l.$arity = 1;
return l;
}
function $initCOROUTINE$5(_this__u8e3s4, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.yhe_1 = _this__u8e3s4;
}
$initCOROUTINE$5.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = MountableVfs$default(false, ResourcesRoot$init$slambda_0(this.yhe_1, null), this, 1, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
var ARGUMENT = suspendResult;
this.yhe_1.che_1 = ARGUMENT;
this.yhe_1.zhe('/', get_resourcesVfs());
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$initCOROUTINE$5.$metadata$ = classMeta('$initCOROUTINE$5', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function ResourcesRoot() {
}
ResourcesRoot.prototype.zhe = function (path, file) {
_get_mountable__707cy(this).r5r(path, file);
};
ResourcesRoot.prototype.k5g = function ($cont) {
var tmp = new $initCOROUTINE$5(this, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
ResourcesRoot.prototype.toString = function () {
return 'ResourcesRoot[' + _get_root__dd8asp(this) + ']';
};
ResourcesRoot.$metadata$ = classMeta('ResourcesRoot', [AsyncDependency]);
var debugBmpFontOrNull;
function debugBmpFont(tex) {
var fntAdvance = 7.0;
var fntWidth = 8.0;
var fntHeight = 8.0;
var fntBlockX = 2.0;
var fntBlockY = 2.0;
var fntBlockWidth = 12.0;
var fntBlockHeight = 12.0;
var tmp = fntHeight - 1.0;
var tmp$ret$2;
// Inline function 'kotlin.collections.associateWith' call
var tmp0_associateWith = until(0, 256);
var result = LinkedHashMap_init_$Create$_0(coerceAtLeast_0(mapCapacity(collectionSizeOrDefault(tmp0_associateWith, 10)), 16));
var tmp$ret$1;
// Inline function 'kotlin.collections.associateWithTo' call
var inductionVariable = tmp0_associateWith.r1_1;
var last = tmp0_associateWith.s1_1;
if (inductionVariable <= last)
do {
var element = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$0;
// Inline function 'com.soywiz.korge.scene.debugBmpFont.<anonymous>' call
var x = element % 16 | 0;
var y = element / 16 | 0;
var tmp_0 = numberToInt(x * fntBlockWidth + fntBlockX);
var tmp_1 = numberToInt(y * fntBlockHeight + fntBlockY);
var tmp_2 = numberToInt(fntWidth);
var tmp_3 = numberToInt(fntHeight);
tmp$ret$0 = new Glyph(fntHeight, element, tex.r8b(tmp_0, tmp_1, tmp_2, tmp_3, null, null, 48, null), 0, 0, numberToInt(fntAdvance));
result.a(element, tmp$ret$0);
}
while (!(element === last));
tmp$ret$1 = result;
tmp$ret$2 = tmp$ret$1;
var tmp_4 = toIntMap(tmp$ret$2);
var tmp_5 = IntMap_init_$Create$(0, 0.0, 3, null);
return BitmapFont_init_$Create$(fntHeight, fntHeight, tmp, tmp_4, tmp_5, null, null, 96, null);
}
function get_DEBUG_FONT_BYTES() {
return fromBase64$default('iVBORw0KGgoAAAANSUhEUgAAAMAAAADAAQMAAABoEv5EAAAABlBMVEVHcEz///+flKJDAAAAAXRSTlMAQObYZgAABelJREFUeAHFlAGEXNsZx3/f3LOzZzdj7rmbPJnn7cu5Yl8F6BSeRJM3Z/MggMVDUQwKeFhAEXxXikUwKIIiKAooAOBuF4KHAIJiAEVxEFwMeu6Za/OSbquC6d/nc67f/M/3+eZz+AxJ55u/GtYGFm2KxyWbsl3CyCyuuukA4rydOP2D/f7HBP747VXnWU9ZPrp89Ytwx2lyxMGxeJFYnF/aX56+d6r2+z8l8H5+GX3RLTSDp65E7VUPfveoXU+L3/jtVU/dWPTL4ao2GMJQ/G/Ov9BHL37M7Sr0xXO7l+txwZwlu1CNHbPybQdLQ+BaD3lYsjppXkKcEsa0sDJFx3ekdlcnuu77JhSiTl5NE0hTSlcdNw6WX8hZ+nTFxkvsHQmYxvmmMxK3joWu+xpeMbr2Gg3rVCPdvNBAjS2T48Xc68ddAWNA1hQbdq9wwGoME4JBPwVlc3FEsIRq6NhmIJ2T1QR11NMBuB6QHNRfKAksmoh0UGeQThruwwfHkFl5XiWwrWHAoMNVY5l9rcN3D4QbZNmZSkJJHEm3L106ACMwRJy2rrFjwYpNB0MwiYmlagJqDyU63BZY6QTLkYaC8yOspy7phvmp446GCXah1mlwagELQs0sfTd2JFvg+hrSjYBSote4T8ztrRPIXdX8m5RdzmrpOb8nnddzp+uiuTiWlzPtZ7WyenHARcpOg7Cy8sOdxnK3sbbB6utDIYPXVk6OEkiwlATWU8H3oLViquzoBoc8TI6qdxiXgBM71OAig5VtMijFbrs65veuv/ClT0Aj/1d5Yh+X1p2aFP5yXcvaALaxKY5Oe9CPq8FRHzIARtKDPc5EsNQVUIotiRmcjKhHgqGuFaw8OMQmYJuTPWojJAxgiQfSgz05sVrbU2QLjpkc570a8c6F89QVzZr/pF29XQZmIErRHwKNTq6BBRSj+YAaskZES0Sj4f0tWtGVkXd3iYC91dhpCrETDehrIyezxgLd5JSqf9it7UGbgOtB+uGprRoMXQIuOzJgc0vjtI1T7EzXTl9NE/horyQCJbuX4VpzQzvRG0Aw1Lep+Yp3X9H5vFeVWJ8BnDFp5pMGk/fqsF8XhRlc9MBqNHmvUjZbhxhu8dZiTTNLe3VIZ6+BxR1LLPhH2qsK63NXyIZjHn40rp2qhILotDVQip2w8rROl7jGIZYspwC1MiYBKFlP+4hlH8sJywPoHU6d4ETS2TqtDbXTSCnOa/6t4JvOZ+AbSyHOiatSEHsj2dF0oF1JV2qKWa5xPuU8P2Rc65xdq4D9dgk6RhHrtB6L+27byAErp+GA0M+O+oDXt3mG56eKa6VfdFbiPQKWuW/7kbjG5uCYUElkyqaS9H0dJMftNjnEXYNS+6vyCx/w/LPKV6VAlyW1J1RPw6d/M9TAo0Z3NKu5wETflKwN5HExaIS7LfNKHEDhfkUwTc2UfnBAAtlRH2k/VoS6FOvlotS1lc6/ePdEwxHPKKnzPJ4BTkD/fKihd1QDeOCbNGBoJnfbXKPU8zzz2TCS0bzWwE16jrIr2eaHb1N/hD2As5T3ODPA/dFfvr4RDI6i3YPHxdu9Ij7h7PHW8WsdHAa3h5OfOx4X7ZMiZsfbRX9oP9TIV5+lTK+QHTeCXOMmsAsZAjlyZYYg/A9gvz3ba58/udrsXW1S/siRzxiy9q82i/b54mqz3/42xeLq74MDMAwO+hgqfQ7YgbZbY4YcKDYUbXG1+S8gnTjbb5+nvGhvcIRPHYs8q+Toh3bVbnPRAsPWbrcEU3w+2J285sxyzDnYgghErxunVPxkWB2gM3VGLJNT65ozS1fJfCrW6fKbEG0CR010nI2lrqgr6ZzG+6cPygQqsQlYqe9pAvZA7Denzz44XFM76imrBGYatzVIwGubgGH5pUaEIgGErWrwZI3YnYKhLghjmAA8vke7HV8YJaYJvDkCqCup6SVR0ASQ+QAI5QcHwSsTlhloeV0jAXgDy3ECst46AMwojGUOUNRAua3hm64HbPWan8uIMmjJZ+pf9psaQCuD8LwAAAAASUVORK5CYII=', false, false, 3, null);
}
function debugBmpFont_0($cont) {
var tmp = new $debugBmpFontCOROUTINE$8($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
}
function $debugBmpFontCOROUTINE$8(resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
}
$debugBmpFontCOROUTINE$8.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
var tmp_0 = get_DEBUG_FONT_BYTES();
var tmp_1 = openAsync$default(tmp_0, null, 1, null);
suspendResult = readBitmap$default(tmp_1, null, this, 1, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
var ARGUMENT = suspendResult;
var ARGUMENT_0 = slice$default(ARGUMENT, null, null, null, 7, null);
return debugBmpFont(ARGUMENT_0);
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$debugBmpFontCOROUTINE$8.$metadata$ = classMeta('$debugBmpFontCOROUTINE$8', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function Module$constructedScene$lambda($this$null, it) {
return Unit_getInstance();
}
function Module$constructedViews$lambda(it) {
return Unit_getInstance();
}
function Module() {
var tmp = this;
var tmp$ret$0;
// Inline function 'kotlin.collections.listOf' call
tmp$ret$0 = emptyList();
tmp.ihf_1 = tmp$ret$0;
this.jhf_1 = Colors_getInstance().t7z_1;
this.khf_1 = 'Game';
this.lhf_1 = null;
this.mhf_1 = Quality_PERFORMANCE_getInstance();
this.nhf_1 = null;
this.ohf_1 = null;
var tmp_0 = this;
tmp_0.phf_1 = Module$constructedScene$lambda;
var tmp_1 = this;
tmp_1.qhf_1 = Module$constructedViews$lambda;
this.rhf_1 = true;
this.shf_1 = 0.0;
this.thf_1 = Companion_getInstance_5().v6z_1;
this.uhf_1 = Companion_getInstance_6().m7d_1;
this.vhf_1 = true;
this.whf_1 = null;
}
Module.$metadata$ = classMeta('Module');
function Scene$coroutineContext$delegate$lambda(this$0) {
return function () {
return this$0.mh0().bfw_1.p8(new AsyncInjectorContext(this$0.hhg())).p8(Job(this$0.mh0().bfw_1.i8(Key_getInstance())));
};
}
function Scene$sceneView$delegate$lambda(this$0) {
return function () {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = this$0.zhi(this$0.ihg().d72(), this$0.ihg().e72());
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.scene.Scene.sceneView$delegate.<anonymous>.<anonymous>' call
var tmp0_this = this$0;
tmp0_this.chg_1.ihl(tmp0_apply);
tmp$ret$0 = tmp0_apply;
return tmp$ret$0;
};
}
function Scene$resources$delegate$lambda(this$0) {
return function () {
var tmp$ret$0;
// Inline function 'com.soywiz.korinject.AsyncInjector.getSync' call
var tmp0_getSync = this$0.hhg();
var tmp1_getSync = new RequestContext(getKClass(Resources));
tmp$ret$0 = tmp0_getSync.ye0(getKClass(Resources), tmp1_getSync);
return tmp$ret$0;
};
}
function $initCOROUTINE$9(_this__u8e3s4, injector, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.rhl_1 = _this__u8e3s4;
this.shl_1 = injector;
}
$initCOROUTINE$9.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 4;
this.rhl_1.yhf_1 = this.shl_1;
this.o7_1 = 1;
var tmp_0 = getKClass(Views);
suspendResult = this.shl_1.ze0(tmp_0, null, this, 2, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
this.thl_1 = suspendResult;
this.rhl_1.wh2(this.thl_1);
this.o7_1 = 2;
var tmp_1 = getKClass(SceneContainer);
suspendResult = this.shl_1.ze0(tmp_1, null, this, 2, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 2:
this.uhl_1 = suspendResult;
this.rhl_1.ahg_1 = this.uhl_1;
this.o7_1 = 3;
var tmp_2 = getKClass(ResourcesRoot);
suspendResult = this.shl_1.ze0(tmp_2, null, this, 2, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 3:
var ARGUMENT = suspendResult;
this.rhl_1.bhg_1 = ARGUMENT;
return Unit_getInstance();
case 4:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 4) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$initCOROUTINE$9.$metadata$ = classMeta('$initCOROUTINE$9', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function $sceneAfterDestroyInternalCOROUTINE$10(_this__u8e3s4, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.dhm_1 = _this__u8e3s4;
}
$sceneAfterDestroyInternalCOROUTINE$10.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 4;
this.o7_1 = 1;
suspendResult = this.dhm_1.ehm(this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
this.p7_1 = 2;
var tmp_0 = this.dhm_1.b1u();
cancel$default(tmp_0, null, 1, null);
;
this.p7_1 = 4;
this.o7_1 = 3;
continue $sm;
case 2:
this.p7_1 = 4;
var tmp_1 = this.r7_1;
if (tmp_1 instanceof Error) {
var e = this.r7_1;
if (e instanceof CancellationException)
throw e;
printStackTrace(e);
this.o7_1 = 3;
continue $sm;
} else {
throw this.r7_1;
}
break;
case 3:
this.p7_1 = 4;
return Unit_getInstance();
case 4:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 4) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$sceneAfterDestroyInternalCOROUTINE$10.$metadata$ = classMeta('$sceneAfterDestroyInternalCOROUTINE$10', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function Scene() {
var tmp = this;
tmp.xhf_1 = Mixin_init_$Create$(null, 1, null);
this.chg_1 = new Container();
this.dhg_1 = new CancellableGroup();
var tmp_0 = this;
tmp_0.ehg_1 = lazy(Scene$coroutineContext$delegate$lambda(this));
var tmp_1 = this;
tmp_1.fhg_1 = lazy(Scene$sceneView$delegate$lambda(this));
var tmp_2 = this;
tmp_2.ghg_1 = lazy(Scene$resources$delegate$lambda(this));
}
Scene.prototype.e4v = function (_set____db54di) {
this.xhf_1.e4v(_set____db54di);
};
Scene.prototype.f4v = function () {
return this.xhf_1.f4v();
};
Scene.prototype.hhg = function () {
var tmp = this.yhf_1;
if (!(tmp == null))
return tmp;
else {
throwUninitializedPropertyAccessException('injector');
}
};
Scene.prototype.wh2 = function (_set____db54di) {
this.zhf_1 = _set____db54di;
};
Scene.prototype.mh0 = function () {
var tmp = this.zhf_1;
if (!(tmp == null))
return tmp;
else {
throwUninitializedPropertyAccessException('views');
}
};
Scene.prototype.ihg = function () {
var tmp = this.ahg_1;
if (!(tmp == null))
return tmp;
else {
throwUninitializedPropertyAccessException('sceneContainer');
}
};
Scene.prototype.fhm = function () {
return this.chg_1;
};
Scene.prototype.b1u = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = coroutineContext$factory();
tmp$ret$0 = this.ehg_1.l1();
return tmp$ret$0;
};
Scene.prototype.ghm = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = sceneView$factory();
tmp$ret$0 = this.fhg_1.l1();
return tmp$ret$0;
};
Scene.prototype.zhi = function (width, height) {
return SContainer_init_$Create$(width, height, false, 4, null);
};
Scene.prototype.de0 = function (injector, $cont) {
var tmp = new $initCOROUTINE$9(this, injector, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
Scene.prototype.hhm = function (_this__u8e3s4, $cont) {
return Unit_getInstance();
};
Scene.prototype.ihm = function (_this__u8e3s4, $cont) {
return Unit_getInstance();
};
Scene.prototype.jhm = function ($cont) {
return Unit_getInstance();
};
Scene.prototype.khm = function ($cont) {
return Unit_getInstance();
};
Scene.prototype.lhm = function ($cont) {
return Unit_getInstance();
};
Scene.prototype.mhm = function ($cont) {
cancel(this.dhg_1);
return this.hhg().se0($cont);
};
Scene.prototype.ehm = function ($cont) {
return Unit_getInstance();
};
Scene.prototype.nhm = function ($cont) {
var tmp = new $sceneAfterDestroyInternalCOROUTINE$10(this, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
Scene.prototype.ohm = function (width, height) {
this.ghm().phm(width, height);
};
Scene.$metadata$ = classMeta('Scene', [InjectorAsyncDependency, ViewsContainer, CoroutineScope, KorgeDebugNode, ResourcesContainer, Extra]);
function EmptyScene() {
Scene.call(this);
}
EmptyScene.prototype.hhm = function (_this__u8e3s4, $cont) {
return Unit_getInstance();
};
EmptyScene.$metadata$ = classMeta('EmptyScene', undefined, undefined, undefined, undefined, Scene.prototype);
function coroutineContext$factory() {
return getPropertyCallableRef('coroutineContext', 1, KProperty1, function (receiver) {
return receiver.b1u();
}, null);
}
function sceneView$factory() {
return getPropertyCallableRef('sceneView', 1, KProperty1, function (receiver) {
return receiver.ghm();
}, null);
}
function SceneContainer$lambda$slambda$slambda($sceneInjector, $sceneClass, $event, $scene, resultContinuation) {
this.ihn_1 = $sceneInjector;
this.jhn_1 = $sceneClass;
this.khn_1 = $event;
this.lhn_1 = $scene;
CoroutineImpl.call(this, resultContinuation);
}
SceneContainer$lambda$slambda$slambda.prototype.nhn = function ($this$mapPrototype, $cont) {
var tmp = this.lg3($this$mapPrototype, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
SceneContainer$lambda$slambda$slambda.prototype.w7 = function (p1, $cont) {
return this.nhn(p1 instanceof AsyncInjector ? p1 : THROW_CCE(), $cont);
};
SceneContainer$lambda$slambda$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.ihn_1.ze0(this.jhn_1, null, this, 2, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
var tmp0_also = suspendResult;
try {
this.khn_1.ng7(this.lhn_1, tmp0_also);
} catch ($p) {
if ($p instanceof Error) {
printStackTrace($p);
} else {
throw $p;
}
}
return tmp0_also;
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
SceneContainer$lambda$slambda$slambda.prototype.lg3 = function ($this$mapPrototype, completion) {
var i = new SceneContainer$lambda$slambda$slambda(this.ihn_1, this.jhn_1, this.khn_1, this.lhn_1, completion);
i.mhn_1 = $this$mapPrototype;
return i;
};
SceneContainer$lambda$slambda$slambda.$metadata$ = classMeta('SceneContainer$lambda$slambda$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
function SceneContainer$lambda$slambda$slambda_0($sceneInjector, $sceneClass, $event, $scene, resultContinuation) {
var i = new SceneContainer$lambda$slambda$slambda($sceneInjector, $sceneClass, $event, $scene, resultContinuation);
var l = function ($this$mapPrototype, $cont) {
return i.nhn($this$mapPrototype, $cont);
};
l.$arity = 1;
return l;
}
function VisitEntry(clazz, injects) {
this.ohn_1 = clazz;
this.phn_1 = injects;
}
VisitEntry.prototype.toString = function () {
return 'VisitEntry(clazz=' + this.ohn_1 + ', injects=' + this.phn_1 + ')';
};
VisitEntry.prototype.hashCode = function () {
var result = this.ohn_1.hashCode();
result = imul(result, 31) + hashCode(this.phn_1) | 0;
return result;
};
VisitEntry.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof VisitEntry))
return false;
var tmp0_other_with_cast = other instanceof VisitEntry ? other : THROW_CCE();
if (!this.ohn_1.equals(tmp0_other_with_cast.ohn_1))
return false;
if (!equals(this.phn_1, tmp0_other_with_cast.phn_1))
return false;
return true;
};
VisitEntry.$metadata$ = classMeta('VisitEntry');
function Companion_17() {
Companion_instance_17 = this;
var tmp = this;
var tmp_0 = getKClass(EmptyScene);
var tmp$ret$0;
// Inline function 'kotlin.collections.listOf' call
tmp$ret$0 = emptyList();
tmp.qhn_1 = new VisitEntry(tmp_0, tmp$ret$0);
}
Companion_17.$metadata$ = objectMeta('Companion');
var Companion_instance_17;
function Companion_getInstance_49() {
if (Companion_instance_17 == null)
new Companion_17();
return Companion_instance_17;
}
function SceneContainer$lambda$lambda(this$0) {
return function (it) {
var tmp;
if (it instanceof SceneContainer) {
tmp = !equals(it, this$0);
} else {
tmp = false;
}
return tmp;
};
}
function SceneContainer$lambda$slambda(this$0, $event, resultContinuation) {
this.zhn_1 = this$0;
this.aho_1 = $event;
CoroutineImpl.call(this, resultContinuation);
}
SceneContainer$lambda$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
SceneContainer$lambda$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
SceneContainer$lambda$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 6;
this.bho_1 = this.zhn_1.dhr_1;
if (!(this.bho_1 == null)) {
println('[ReloadEvent] Reloading ' + this.zhn_1.dhr_1 + ' . doFullReload=' + this.aho_1.sg7());
var tmp_0 = this;
var tmp_1;
if (this.aho_1.sg7()) {
tmp_1 = this.aho_1.tg7(getKClassFromExpression(this.bho_1), this.bho_1.hhg());
} else {
tmp_1 = getKClassFromExpression(this.bho_1);
}
var tmp_2 = tmp_1;
tmp_0.cho_1 = isInterface(tmp_2, KClass) ? tmp_2 : THROW_CCE();
var tmp_3 = this;
tmp_3.dho_1 = Companion_getInstance_1().c1i(0.0);
var tmp_4 = this;
tmp_4.eho_1 = this.zhn_1.bhr_1;
this.fho_1 = this.zhn_1.ahr_1.dfw_1.ve0().te0(getKClass(SceneContainer), this.zhn_1).te0(getKClass(Resources), new Resources(this.zhn_1.b1u(), this.zhn_1.ahr_1.gg7().d65_1, this.zhn_1.ahr_1.gg7()));
this.gho_1 = 0;
while (this.gho_1 < [].length) {
var tmp_5 = this;
var tmp0 = this.gho_1;
this.gho_1 = tmp0 + 1 | 0;
tmp_5.hho_1 = [][tmp0];
var tmp_6 = getKClassFromExpression(this.hho_1);
this.fho_1.te0(isInterface(tmp_6, KClass) ? tmp_6 : THROW_CCE(), this.hho_1);
}
this.o7_1 = 1;
suspendResult = this.fho_1.ze0(this.cho_1, null, this, 2, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
this.o7_1 = 5;
continue $sm;
}
break;
case 1:
this.iho_1 = suspendResult;
try {
this.aho_1.ng7(this.bho_1, this.iho_1);
} catch ($p) {
if ($p instanceof Error) {
printStackTrace($p);
} else {
throw $p;
}
}
this.jho_1 = this.iho_1;
println('Changing scene to... ' + this.cho_1 + ' ... ' + this.jho_1);
if (false) {
this.o7_1 = 2;
suspendResult = this.jho_1.de0(this.fho_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
this.o7_1 = 3;
continue $sm;
}
break;
case 2:
var tmp_7 = getKClassFromExpression(this.jho_1);
var tmp_8 = isInterface(tmp_7, KClass) ? tmp_7 : THROW_CCE();
this.zhn_1.ahr_1.dfw_1.xe0(tmp_8, SceneContainer$lambda$slambda$slambda_0(this.fho_1, this.cho_1, this.aho_1, this.bho_1, null));
;
this.o7_1 = 3;
continue $sm;
case 3:
this.o7_1 = 4;
suspendResult = this.zhn_1.ghr(this.jho_1, this.dho_1, this.eho_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 4:
var scene = suspendResult;
scene.mh0().hhr(scene.ghm());
this.o7_1 = 5;
continue $sm;
case 5:
return Unit_getInstance();
case 6:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 6) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
SceneContainer$lambda$slambda.prototype.k53 = function (completion) {
var i = new SceneContainer$lambda$slambda(this.zhn_1, this.aho_1, completion);
return i;
};
SceneContainer$lambda$slambda.$metadata$ = classMeta('SceneContainer$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function SceneContainer$lambda$slambda_0(this$0, $event, resultContinuation) {
var i = new SceneContainer$lambda$slambda(this$0, $event, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function SceneContainer$lambda(this$0) {
return function (event) {
var tmp$ret$0;
// Inline function 'kotlin.collections.isNotEmpty' call
var tmp0_isNotEmpty = descendantsWith$default(this$0, null, SceneContainer$lambda$lambda(this$0), 1, null);
tmp$ret$0 = !tmp0_isNotEmpty.p();
var hasChildScenes = tmp$ret$0;
var tmp;
if (hasChildScenes) {
println('[ReloadEvent] Scene ' + this$0.dhr_1 + ' not reloaded because has child scenes...');
return Unit_getInstance();
}
launchImmediately(this$0, SceneContainer$lambda$slambda_0(this$0, event, null));
return Unit_getInstance();
};
}
function _no_name_provided__qut3iv(this$0, $tmp0_addOnEvent) {
this.jhr_1 = $tmp0_addOnEvent;
this.ihr_1 = this$0;
}
_no_name_provided__qut3iv.prototype.n2u = function () {
return this.ihr_1;
};
_no_name_provided__qut3iv.prototype.dgd = function (event) {
if (event instanceof ReloadEvent)
this.jhr_1(event);
};
_no_name_provided__qut3iv.$metadata$ = classMeta(undefined, [EventComponent]);
function SceneContainer$_changeTo$slambda($newScene, resultContinuation) {
this.shr_1 = $newScene;
CoroutineImpl.call(this, resultContinuation);
}
SceneContainer$_changeTo$slambda.prototype.uhr = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
SceneContainer$_changeTo$slambda.prototype.to = function ($cont) {
return this.uhr($cont);
};
SceneContainer$_changeTo$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
var tmp_0 = this;
tmp_0.thr_1 = this.shr_1.ghm();
this.o7_1 = 1;
suspendResult = this.shr_1.hhm(this.thr_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
;
return this.thr_1;
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
SceneContainer$_changeTo$slambda.prototype.k53 = function (completion) {
var i = new SceneContainer$_changeTo$slambda(this.shr_1, completion);
return i;
};
SceneContainer$_changeTo$slambda.$metadata$ = classMeta('SceneContainer$_changeTo$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function SceneContainer$_changeTo$slambda_0($newScene, resultContinuation) {
var i = new SceneContainer$_changeTo$slambda($newScene, resultContinuation);
var l = function ($cont) {
return i.uhr($cont);
};
l.$arity = 0;
return l;
}
function SceneContainer$_changeTo$slambda_1($newScene, resultContinuation) {
this.dhs_1 = $newScene;
CoroutineImpl.call(this, resultContinuation);
}
SceneContainer$_changeTo$slambda_1.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
SceneContainer$_changeTo$slambda_1.prototype.to = function ($cont) {
return this.z56($cont);
};
SceneContainer$_changeTo$slambda_1.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
var tmp_0 = this;
tmp_0.ehs_1 = this.dhs_1.ghm();
this.o7_1 = 1;
suspendResult = this.dhs_1.ihm(this.ehs_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
;
;
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
SceneContainer$_changeTo$slambda_1.prototype.k53 = function (completion) {
var i = new SceneContainer$_changeTo$slambda_1(this.dhs_1, completion);
return i;
};
SceneContainer$_changeTo$slambda_1.$metadata$ = classMeta('SceneContainer$_changeTo$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function SceneContainer$_changeTo$slambda_2($newScene, resultContinuation) {
var i = new SceneContainer$_changeTo$slambda_1($newScene, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function SceneContainer$_changeTo$slambda_3($oldScene, resultContinuation) {
this.nhs_1 = $oldScene;
CoroutineImpl.call(this, resultContinuation);
}
SceneContainer$_changeTo$slambda_3.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
SceneContainer$_changeTo$slambda_3.prototype.to = function ($cont) {
return this.z56($cont);
};
SceneContainer$_changeTo$slambda_3.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.nhs_1.khm(this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
SceneContainer$_changeTo$slambda_3.prototype.k53 = function (completion) {
var i = new SceneContainer$_changeTo$slambda_3(this.nhs_1, completion);
return i;
};
SceneContainer$_changeTo$slambda_3.$metadata$ = classMeta('SceneContainer$_changeTo$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function SceneContainer$_changeTo$slambda_4($oldScene, resultContinuation) {
var i = new SceneContainer$_changeTo$slambda_3($oldScene, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function _interpolate$ref() {
var l = function (p0, p1, p2) {
return _interpolate(p0, p1, p2);
};
l.callableName = '_interpolate';
return l;
}
function SceneContainer$_changeTo$slambda_5($oldScene, resultContinuation) {
this.whs_1 = $oldScene;
CoroutineImpl.call(this, resultContinuation);
}
SceneContainer$_changeTo$slambda_5.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
SceneContainer$_changeTo$slambda_5.prototype.to = function ($cont) {
return this.z56($cont);
};
SceneContainer$_changeTo$slambda_5.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 3;
this.o7_1 = 1;
suspendResult = this.whs_1.lhm(this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
this.o7_1 = 2;
suspendResult = this.whs_1.mhm(this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 2:
return Unit_getInstance();
case 3:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 3) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
SceneContainer$_changeTo$slambda_5.prototype.k53 = function (completion) {
var i = new SceneContainer$_changeTo$slambda_5(this.whs_1, completion);
return i;
};
SceneContainer$_changeTo$slambda_5.$metadata$ = classMeta('SceneContainer$_changeTo$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function SceneContainer$_changeTo$slambda_6($oldScene, resultContinuation) {
var i = new SceneContainer$_changeTo$slambda_5($oldScene, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function SceneContainer$_changeTo$slambda_7($oldScene, resultContinuation) {
this.fht_1 = $oldScene;
CoroutineImpl.call(this, resultContinuation);
}
SceneContainer$_changeTo$slambda_7.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
SceneContainer$_changeTo$slambda_7.prototype.to = function ($cont) {
return this.z56($cont);
};
SceneContainer$_changeTo$slambda_7.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.fht_1.nhm(this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
SceneContainer$_changeTo$slambda_7.prototype.k53 = function (completion) {
var i = new SceneContainer$_changeTo$slambda_7(this.fht_1, completion);
return i;
};
SceneContainer$_changeTo$slambda_7.$metadata$ = classMeta('SceneContainer$_changeTo$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function SceneContainer$_changeTo$slambda_8($oldScene, resultContinuation) {
var i = new SceneContainer$_changeTo$slambda_7($oldScene, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function SceneContainer$_changeTo$slambda_9($newScene, resultContinuation) {
this.oht_1 = $newScene;
CoroutineImpl.call(this, resultContinuation);
}
SceneContainer$_changeTo$slambda_9.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
SceneContainer$_changeTo$slambda_9.prototype.to = function ($cont) {
return this.z56($cont);
};
SceneContainer$_changeTo$slambda_9.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.oht_1.jhm(this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
SceneContainer$_changeTo$slambda_9.prototype.k53 = function (completion) {
var i = new SceneContainer$_changeTo$slambda_9(this.oht_1, completion);
return i;
};
SceneContainer$_changeTo$slambda_9.$metadata$ = classMeta('SceneContainer$_changeTo$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function SceneContainer$_changeTo$slambda_10($newScene, resultContinuation) {
var i = new SceneContainer$_changeTo$slambda_9($newScene, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function $_changeToCOROUTINE$14(_this__u8e3s4, newScene, time, transition, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.xht_1 = _this__u8e3s4;
this.yht_1 = newScene;
this.zht_1 = time;
this.ahu_1 = transition;
}
$_changeToCOROUTINE$14.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 10;
this.bhu_1 = this.xht_1.dhr_1;
this.xht_1.dhr_1 = this.yht_1;
this.xht_1.chr_1.ohw(this.yht_1.chg_1, this.ahu_1);
this.p7_1 = 2;
this.o7_1 = 1;
var tmp_0 = this.yht_1.b1u();
suspendResult = launchUnscopedAndWait(tmp_0, SceneContainer$_changeTo$slambda_0(this.yht_1, null), this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
;
this.p7_1 = 10;
this.o7_1 = 3;
continue $sm;
case 2:
this.p7_1 = 10;
var tmp_1 = this.r7_1;
if (tmp_1 instanceof Error) {
this.chu_1 = this.r7_1;
var tmp_2 = this.chu_1;
if (tmp_2 instanceof CancellationException)
throw this.chu_1;
printStackTrace(this.chu_1);
this.o7_1 = 3;
continue $sm;
} else {
throw this.r7_1;
}
break;
case 3:
this.p7_1 = 10;
launchUnscoped(this.yht_1, SceneContainer$_changeTo$slambda_2(this.yht_1, null));
if (!(this.bhu_1 == null)) {
this.o7_1 = 4;
var tmp_3 = this.bhu_1.b1u();
suspendResult = launchUnscopedAndWait(tmp_3, SceneContainer$_changeTo$slambda_4(this.bhu_1, null), this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
this.o7_1 = 5;
continue $sm;
}
break;
case 4:
this.o7_1 = 5;
continue $sm;
case 5:
if (TimeSpan__compareTo_impl_zidry4(this.zht_1, Companion_getInstance_1().c1i(0.0)) > 0) {
this.o7_1 = 6;
var tmp_4 = this;
tmp_4.dhu_1 = ratio$factory(this.xht_1.chr_1);
var tmp_5 = _interpolate$ref();
var tmp_6 = [V2_init_$Create$(this.dhu_1, 0.0, 1.0, tmp_5, true, null, null, null, 224, null)];
suspendResult = tween$default(this.xht_1.chr_1, tmp_6, this.zht_1, null, null, false, false, null, this, 124, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
this.xht_1.chr_1.phw(1.0);
this.o7_1 = 7;
continue $sm;
}
break;
case 6:
this.o7_1 = 7;
continue $sm;
case 7:
this.xht_1.chr_1.qhw();
if (!(this.bhu_1 == null)) {
this.o7_1 = 8;
var tmp_7 = this.bhu_1.b1u();
suspendResult = launchUnscopedAndWait(tmp_7, SceneContainer$_changeTo$slambda_6(this.bhu_1, null), this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
this.o7_1 = 9;
continue $sm;
}
break;
case 8:
launchUnscoped(this.bhu_1, SceneContainer$_changeTo$slambda_8(this.bhu_1, null));
this.o7_1 = 9;
continue $sm;
case 9:
var tmp_8 = this.yht_1.b1u();
launchUnscoped_0(tmp_8, SceneContainer$_changeTo$slambda_10(this.yht_1, null));
return this.yht_1;
case 10:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 10) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$_changeToCOROUTINE$14.$metadata$ = classMeta('$_changeToCOROUTINE$14', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function SceneContainer(views, defaultTransition, name, width, height) {
Companion_getInstance_49();
UIView.call(this, width, height);
this.ahr_1 = views;
this.bhr_1 = defaultTransition;
this.rgf_1 = name;
var tmp = this;
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp0_also = new TransitionView();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.scene.SceneContainer.transitionView.<anonymous>' call
this.ihl(tmp0_also);
tmp$ret$0 = tmp0_also;
tmp.chr_1 = tmp$ret$0;
this.dhr_1 = null;
var tmp$ret$1;
// Inline function 'com.soywiz.korge.baseview.BaseView.addOnEvent' call
var tmp0_addOnEvent = SceneContainer$lambda(this);
tmp$ret$1 = cancellable_0(this.lg8(new _no_name_provided__qut3iv(this, tmp0_addOnEvent)));
this.ehr_1 = arrayListOf([Companion_getInstance_49().qhn_1]);
this.fhr_1 = 0;
}
SceneContainer.prototype.b1u = function () {
return this.ahr_1.bfw_1;
};
SceneContainer.prototype.rhw = function () {
var tmp0_safe_receiver = this.dhr_1;
if (tmp0_safe_receiver == null)
null;
else {
tmp0_safe_receiver.ohm(this.d72(), this.e72());
}
};
SceneContainer.prototype.ghr = function (newScene, time, transition, $cont) {
var tmp = new $_changeToCOROUTINE$14(this, newScene, time, transition, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
SceneContainer.$metadata$ = classMeta('SceneContainer', [CoroutineScope], undefined, undefined, undefined, UIView.prototype);
function ratio$factory($b0) {
return getPropertyCallableRef('ratio', 0, KMutableProperty0, function () {
return $b0.yi2();
}, function (value) {
return $b0.phw(value);
});
}
function get_AlphaTransition() {
init_properties_Transition_kt_8hemat();
return AlphaTransition;
}
var AlphaTransition;
function Transition() {
}
Transition.$metadata$ = interfaceMeta('Transition');
function Transition_0(render) {
init_properties_Transition_kt_8hemat();
return new Transition$1(render);
}
function TransitionProcess() {
}
TransitionProcess.$metadata$ = interfaceMeta('TransitionProcess');
function _get_transitionProcess__5hlux5($this) {
var tmp = $this.nhw_1;
if (!(tmp == null))
return tmp;
else {
throwUninitializedPropertyAccessException('transitionProcess');
}
}
function TransitionView() {
Container.call(this);
dummyView(this);
dummyView(this);
this.mhw_1 = get_AlphaTransition();
}
TransitionView.prototype.di3 = function () {
return this.m(0);
};
TransitionView.prototype.t2p = function () {
return this.m(1);
};
TransitionView.prototype.ohw = function (next, transition) {
this.mhw_1 = transition;
this.phw(0.0);
this.nhw_1 = transition.zi2();
this.ei3(this.t2p(), next);
_get_transitionProcess__5hlux5(this).ai3(this.di3(), this.t2p());
};
TransitionView.prototype.qhw = function () {
this.phw(1.0);
_get_transitionProcess__5hlux5(this).bi3(this.di3(), this.t2p());
this.ei3(dummyView(this), this.t2p());
};
TransitionView.prototype.ei3 = function (prev, next) {
this.rhz();
this.shz(prev);
this.shz(next);
};
TransitionView.prototype.xhw = function (ctx) {
if (this.yi2() <= 0.0) {
this.di3().oi1(ctx);
} else if (this.yi2() >= 1.0) {
this.t2p().oi1(ctx);
} else {
_get_transitionProcess__5hlux5(this).ci3(ctx, this.di3(), this.t2p(), this.yi2());
}
};
TransitionView.$metadata$ = classMeta('TransitionView', undefined, undefined, undefined, undefined, Container.prototype);
function AlphaTransition$lambda(ctx, prev, next, ratio) {
init_properties_Transition_kt_8hemat();
var prevAlpha = prev.ea2();
var nextAlpha = next.ea2();
try {
prev.egh(1.0 - ratio);
next.egh(ratio);
prev.oi1(ctx);
next.oi1(ctx);
}finally {
prev.egh(prevAlpha);
next.egh(nextAlpha);
}
return Unit_getInstance();
}
function Transition$1($render) {
this.fi3_1 = $render;
}
Transition$1.prototype.zi2 = function () {
return this;
};
Transition$1.prototype.ci3 = function (ctx, prev, next, ratio) {
return this.fi3_1(ctx, prev, next, ratio);
};
Transition$1.$metadata$ = classMeta(undefined, [Transition, TransitionProcess]);
var properties_initialized_Transition_kt_wb2qvd;
function init_properties_Transition_kt_8hemat() {
if (properties_initialized_Transition_kt_wb2qvd) {
} else {
properties_initialized_Transition_kt_wb2qvd = true;
AlphaTransition = Transition_0(AlphaTransition$lambda);
}
}
function IStorage() {
}
IStorage.$metadata$ = interfaceMeta('IStorage');
var storage$delegate;
function toMap(_this__u8e3s4) {
init_properties_NativeStorage_kt_k00tps();
var tmp$ret$2;
// Inline function 'kotlin.collections.associateWith' call
var tmp0_associateWith = _this__u8e3s4.hi3();
var result = LinkedHashMap_init_$Create$_0(coerceAtLeast_0(mapCapacity(collectionSizeOrDefault(tmp0_associateWith, 10)), 16));
var tmp$ret$1;
// Inline function 'kotlin.collections.associateWithTo' call
var tmp0_iterator = tmp0_associateWith.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l();
var tmp$ret$0;
// Inline function 'com.soywiz.korge.service.storage.toMap.<anonymous>' call
tmp$ret$0 = _this__u8e3s4.ii3(element);
result.a(element, tmp$ret$0);
}
tmp$ret$1 = result;
tmp$ret$2 = tmp$ret$1;
return tmp$ret$2;
}
function storage$delegate$lambda($this$$receiver) {
init_properties_NativeStorage_kt_k00tps();
return new NativeStorage($this$$receiver);
}
var properties_initialized_NativeStorage_kt_ewqgpg;
function init_properties_NativeStorage_kt_k00tps() {
if (properties_initialized_NativeStorage_kt_ewqgpg) {
} else {
properties_initialized_NativeStorage_kt_ewqgpg = true;
storage$delegate = PropertyThis_init_$Create$(null, storage$delegate$lambda, 1, null);
}
}
function Storage(views) {
this.ji3_1 = new NativeStorage(views);
}
Storage.prototype.ii3 = function (key) {
return this.ji3_1.ii3(key);
};
Storage.prototype.n2x = function (key) {
this.ji3_1.n2x(key);
};
Storage.prototype.j2x = function (key, value) {
this.ji3_1.j2x(key, value);
};
Storage.$metadata$ = classMeta('Storage', [IStorage]);
function RCollection() {
this.ki3_1 = ArrayList_init_$Create$_0();
this.li3_1 = LinkedHashMap_init_$Create$();
}
RCollection.$metadata$ = classMeta('RCollection');
function Stats() {
this.mi3_1 = new RCollection();
this.ni3_1 = new RCollection();
}
Stats.prototype.gba = function () {
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = this.mi3_1.ki3_1;
var n = 0;
while (n < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korge.stat.Stats.startFrame.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.m(tmp0);
tmp1__anonymous__uwfjfc.gba();
}
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp2_fastForEach = this.ni3_1.ki3_1;
var n_0 = 0;
while (n_0 < tmp2_fastForEach.i()) {
// Inline function 'com.soywiz.korge.stat.Stats.startFrame.<anonymous>' call
var tmp0_0 = n_0;
n_0 = tmp0_0 + 1 | 0;
var tmp3__anonymous__ufb84q = tmp2_fastForEach.m(tmp0_0);
tmp3__anonymous__ufb84q.gba();
}
};
Stats.$metadata$ = classMeta('Stats');
function addTimer($this, autoRemove, callback) {
if ($this.yi3_1.t4o()) {
var index = $this.yi3_1.z4($this.yi3_1.i() - 1 | 0);
$this.wi3_1.a5(index, callback);
var tmp$ret$0;
// Inline function 'com.soywiz.kmem.toInt' call
tmp$ret$0 = autoRemove ? 1 : 0;
$this.xi3_1.r4o(index, tmp$ret$0);
return _TimerRef___init__impl__cysrar(index);
}
var tmp0_this = $this;
// Inline function 'kotlin.collections.plusAssign' call
var tmp0_plusAssign = tmp0_this.wi3_1;
tmp0_plusAssign.c(callback);
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.toInt' call
tmp$ret$1 = autoRemove ? 1 : 0;
$this.xi3_1.m4o(tmp$ret$1);
return _TimerRef___init__impl__cysrar($this.wi3_1.i() - 1 | 0);
}
function removeTimer($this, ref) {
$this.wi3_1.a5(_TimerRef___get_index__impl__pnrx4q(ref), null);
$this.xi3_1.r4o(_TimerRef___get_index__impl__pnrx4q(ref), 0);
$this.yi3_1.m4o(_TimerRef___get_index__impl__pnrx4q(ref));
}
function _interval($this, time, repeat, callback) {
var tmp$ret$0;
// Inline function 'com.soywiz.klock.milliseconds' call
tmp$ret$0 = Companion_getInstance_1().o1h(0.0);
var elapsed = {_v: new TimeSpan(tmp$ret$0)};
var ref = {_v: new TimerRef(_TimerRef___init__impl__cysrar(-1))};
ref._v = new TimerRef(addTimer($this, false, TimerComponents$_interval$lambda(elapsed, time, repeat, $this, ref, callback)));
var tmp = Companion_getInstance_19();
return tmp.p5y(TimerComponents$_interval$lambda_0($this, ref));
}
function TimerComponents$_interval$lambda($elapsed, $time, $repeat, this$0, $ref, $callback) {
return function (deltaMs) {
$elapsed._v = new TimeSpan(TimeSpan__plus_impl_qdd6zo($elapsed._v.y1h_1, deltaMs.y1h_1));
$l$loop: while (TimeSpan__compareTo_impl_zidry4($elapsed._v.y1h_1, $time) >= 0) {
if (!$repeat) {
removeTimer(this$0, $ref._v.zi3_1);
}
$elapsed._v = new TimeSpan(TimeSpan__minus_impl_5w5v8s($elapsed._v.y1h_1, $time));
$callback();
if (!$repeat)
break $l$loop;
}
return Unit_getInstance();
};
}
function TimerComponents$_interval$lambda_0(this$0, $ref) {
return function () {
removeTimer(this$0, $ref._v.zi3_1);
return Unit_getInstance();
};
}
function TimerComponents(view) {
this.vi3_1 = view;
var tmp = this;
var tmp$ret$0;
// Inline function 'kotlin.collections.arrayListOf' call
tmp$ret$0 = ArrayList_init_$Create$_0();
tmp.wi3_1 = tmp$ret$0;
var tmp_0 = this;
tmp_0.xi3_1 = IntArrayList_init_$Create$(0, 1, null);
var tmp_1 = this;
tmp_1.yi3_1 = IntArrayList_init_$Create$(0, 1, null);
}
TimerComponents.prototype.n2u = function () {
return this.vi3_1;
};
TimerComponents.prototype.xgc = function (dt) {
// Inline function 'com.soywiz.kds.iterators.fastForEachWithIndex' call
var tmp0_fastForEachWithIndex = this.wi3_1;
var n = 0;
while (n < tmp0_fastForEachWithIndex.i()) {
// Inline function 'com.soywiz.korge.time.TimerComponents.update.<anonymous>' call
var tmp1__anonymous__uwfjfc = n;
var tmp2__anonymous__z9zvc9 = tmp0_fastForEachWithIndex.m(n);
var tmp0_safe_receiver = tmp2__anonymous__z9zvc9;
if (tmp0_safe_receiver == null)
null;
else
tmp0_safe_receiver(new TimeSpan(dt));
if (!(this.xi3_1.m(tmp1__anonymous__uwfjfc) === 0)) {
removeTimer(this, _TimerRef___init__impl__cysrar(tmp1__anonymous__uwfjfc));
}
var tmp0 = n;
n = tmp0 + 1 | 0;
}
};
TimerComponents.prototype.ai4 = function (time, callback) {
return _interval(this, time, true, callback);
};
TimerComponents.$metadata$ = classMeta('TimerComponents', [UpdateComponent]);
function get_timers(_this__u8e3s4) {
var tmp$ret$4;
// Inline function 'com.soywiz.korge.baseview.BaseView.getOrCreateComponentUpdate' call
var tmp$ret$3;
// Inline function 'com.soywiz.korge.baseview.BaseView.getOrCreateComponentTyped' call
var tmp0_getOrCreateComponentTyped = Companion_getInstance_36();
var tmp0_safe_receiver = _this__u8e3s4.gg8(tmp0_getOrCreateComponentTyped);
var tmp;
if (tmp0_safe_receiver == null) {
tmp = null;
} else {
var tmp$ret$1;
$l$block: {
// Inline function 'kotlin.collections.firstOrNull' call
var tmp0_iterator = tmp0_safe_receiver.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l();
var tmp$ret$0;
// Inline function 'com.soywiz.korge.baseview.BaseView.getOrCreateComponentTyped.<anonymous>' call
tmp$ret$0 = element instanceof TimerComponents;
if (tmp$ret$0) {
tmp$ret$1 = element;
break $l$block;
}
}
tmp$ret$1 = null;
}
tmp = tmp$ret$1;
}
var tmp_0 = tmp;
var tmp1_elvis_lhs = (tmp_0 == null ? true : tmp_0 instanceof TimerComponents) ? tmp_0 : null;
var tmp_1;
if (tmp1_elvis_lhs == null) {
var tmp$ret$2;
// Inline function 'com.soywiz.korge.time.<get-timers>.<anonymous>' call
tmp$ret$2 = new TimerComponents(_this__u8e3s4);
var tmp_2 = _this__u8e3s4.lg8(tmp$ret$2);
tmp_1 = tmp_2 instanceof TimerComponents ? tmp_2 : THROW_CCE();
} else {
tmp_1 = tmp1_elvis_lhs;
}
tmp$ret$3 = tmp_1;
tmp$ret$4 = tmp$ret$3;
return tmp$ret$4;
}
function _TimerRef___init__impl__cysrar(index) {
return index;
}
function _TimerRef___get_index__impl__pnrx4q($this) {
return $this;
}
function TimerRef__toString_impl_8hh2j7($this) {
return 'TimerRef(index=' + $this + ')';
}
function TimerRef__hashCode_impl_d9ou9o($this) {
return $this;
}
function TimerRef__equals_impl_2fvpr4($this, other) {
if (!(other instanceof TimerRef))
return false;
var tmp0_other_with_cast = other instanceof TimerRef ? other.zi3_1 : THROW_CCE();
if (!($this === tmp0_other_with_cast))
return false;
return true;
}
function TimerRef(index) {
this.zi3_1 = index;
}
TimerRef.prototype.toString = function () {
return TimerRef__toString_impl_8hh2j7(this.zi3_1);
};
TimerRef.prototype.hashCode = function () {
return TimerRef__hashCode_impl_d9ou9o(this.zi3_1);
};
TimerRef.prototype.equals = function (other) {
return TimerRef__equals_impl_2fvpr4(this.zi3_1, other);
};
TimerRef.$metadata$ = classMeta('TimerRef');
function get_DEFAULT_EASING() {
init_properties_tween_kt_7tiubb();
return DEFAULT_EASING;
}
var DEFAULT_EASING;
function get_DEFAULT_TIME() {
init_properties_tween_kt_7tiubb();
return DEFAULT_TIME;
}
var DEFAULT_TIME;
function tween(_this__u8e3s4, vs, time, easing, waitTime, timeout, autoInvalidate, callback, $cont) {
var tmp = new $tweenCOROUTINE$16(_this__u8e3s4, vs, time, easing, waitTime, timeout, autoInvalidate, callback, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
}
function tween$default(_this__u8e3s4, vs, time, easing, waitTime, timeout, autoInvalidate, callback, $cont, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
time = get_DEFAULT_TIME();
if (!(($mask0 & 4) === 0))
easing = get_DEFAULT_EASING();
if (!(($mask0 & 8) === 0))
waitTime = Companion_getInstance_1().m1h_1;
if (!(($mask0 & 16) === 0))
timeout = false;
if (!(($mask0 & 32) === 0))
autoInvalidate = true;
if (!(($mask0 & 64) === 0)) {
callback = tween$lambda;
}
return tween(_this__u8e3s4, vs, time, easing, waitTime, timeout, autoInvalidate, callback, $cont);
}
function TweenComponent$lambda(this$0) {
return function (it) {
this$0.ci5_1 = true;
return Unit_getInstance();
};
}
function TweenComponent(view, vs, time, easing, callback, c, waitTime, autoInvalidate) {
this.si4_1 = view;
this.ti4_1 = vs;
this.ui4_1 = time;
this.vi4_1 = easing;
this.wi4_1 = callback;
this.xi4_1 = c;
this.yi4_1 = waitTime;
this.zi4_1 = autoInvalidate;
var tmp = this;
var tmp$ret$0;
// Inline function 'com.soywiz.klock.milliseconds' call
tmp$ret$0 = Companion_getInstance_1().o1h(0.0);
tmp.ai5_1 = tmp$ret$0;
var tmp_0 = this;
var tmp_1;
if (!equals(this.ui4_1, Companion_getInstance_1().m1h_1)) {
tmp_1 = this.ui4_1;
} else {
var tmp$ret$4;
// Inline function 'com.soywiz.klock.nanoseconds' call
var tmp$ret$3;
// Inline function 'kotlin.collections.map' call
var tmp0_map = this.ti4_1;
var tmp$ret$2;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map, 10));
var tmp0_iterator = tmp0_map.j();
while (tmp0_iterator.k()) {
var item = tmp0_iterator.l();
var tmp$ret$1;
// Inline function 'com.soywiz.korge.tween.TweenComponent.hrtime.<anonymous>' call
tmp$ret$1 = _TimeSpan___get_nanoseconds__impl__gaf49o(item.ni5_1);
tmp0_mapTo.c(tmp$ret$1);
}
tmp$ret$2 = tmp0_mapTo;
tmp$ret$3 = tmp$ret$2;
var tmp0_elvis_lhs = maxOrNull(tmp$ret$3);
var tmp1__get_nanoseconds__vth17j = tmp0_elvis_lhs == null ? 0.0 : tmp0_elvis_lhs;
tmp$ret$4 = Companion_getInstance_1().b1i(tmp1__get_nanoseconds__vth17j);
tmp_1 = tmp$ret$4;
}
tmp_0.bi5_1 = tmp_1;
this.ci5_1 = false;
this.di5_1 = false;
this.ei5_1 = false;
var tmp0_safe_receiver = this.xi4_1;
if (tmp0_safe_receiver == null)
null;
else {
tmp0_safe_receiver.n1x(TweenComponent$lambda(this));
}
var tmp$ret$5;
// Inline function 'com.soywiz.klock.milliseconds' call
tmp$ret$5 = Companion_getInstance_1().o1h(0.0);
this.xgc(tmp$ret$5);
}
TweenComponent.prototype.n2u = function () {
return this.si4_1;
};
TweenComponent.prototype.oi5 = function () {
return this.vi4_1;
};
TweenComponent.prototype.pi5 = function () {
return this.bi5_1;
};
TweenComponent.prototype.qi5 = function () {
if (this.ei5_1)
return Unit_getInstance();
this.ei5_1 = true;
var tmp0_safe_receiver = this.xi4_1;
if (tmp0_safe_receiver == null)
null;
else {
var tmp$ret$1;
// Inline function 'kotlin.coroutines.resume' call
var tmp$ret$0;
// Inline function 'kotlin.Companion.success' call
var tmp0_success = Companion_getInstance_20();
tmp$ret$0 = _Result___init__impl__xyqfz8(Unit_getInstance());
tmp0_safe_receiver.n5(tmp$ret$0);
tmp$ret$1 = Unit_getInstance();
}
};
TweenComponent.prototype.ri5 = function () {
if (this.di5_1)
return Unit_getInstance();
this.di5_1 = true;
detach(this);
this.qi5();
};
TweenComponent.prototype.xgc = function (dt) {
if (this.zi4_1) {
this.si4_1.dg8();
}
if (this.ci5_1) {
return this.ri5();
}
var tmp0_this = this;
tmp0_this.ai5_1 = TimeSpan__plus_impl_qdd6zo(tmp0_this.ai5_1, dt);
var ratio = clamp_0(TimeSpan__div_impl_l42f2r(this.ai5_1, this.bi5_1), 0.0, 1.0);
this.si5(this.ai5_1);
this.wi4_1(this.vi4_1.k7u(ratio));
if (!equals(this.yi4_1, Companion_getInstance_1().m1h_1) ? TimeSpan__compareTo_impl_zidry4(this.ai5_1, this.yi4_1) >= 0 : false) {
this.qi5();
}
if (ratio >= 1.0) {
return this.ri5();
}
};
TweenComponent.prototype.si5 = function (elapsed) {
var tmp = new TimeSpan(elapsed);
var tmp$ret$0;
// Inline function 'com.soywiz.klock.milliseconds' call
tmp$ret$0 = Companion_getInstance_1().o1h(0.0);
if (equals(tmp, new TimeSpan(tmp$ret$0))) {
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = this.ti4_1;
var n = 0;
while (n < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korge.tween.TweenComponent.setTo.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.m(tmp0);
tmp1__anonymous__uwfjfc.ab2();
}
}
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp2_fastForEach = this.ti4_1;
var n_0 = 0;
while (n_0 < tmp2_fastForEach.i()) {
// Inline function 'com.soywiz.korge.tween.TweenComponent.setTo.<anonymous>' call
var tmp0_0 = n_0;
n_0 = tmp0_0 + 1 | 0;
var tmp3__anonymous__ufb84q = tmp2_fastForEach.m(tmp0_0);
var tmp$ret$2;
// Inline function 'com.soywiz.klock.coalesce' call
var tmp0_coalesce = tmp3__anonymous__ufb84q.li5_1;
var tmp_0;
if (!equals(tmp0_coalesce, Companion_getInstance_1().m1h_1)) {
tmp_0 = tmp0_coalesce;
} else {
var tmp$ret$1;
// Inline function 'com.soywiz.korge.tween.TweenComponent.setTo.<anonymous>.<anonymous>' call
tmp$ret$1 = TimeSpan__minus_impl_5w5v8s(this.bi5_1, tmp3__anonymous__ufb84q.ki5_1);
tmp_0 = tmp$ret$1;
}
tmp$ret$2 = tmp_0;
var durationInTween = tmp$ret$2;
var tmp_1 = TimeSpan__minus_impl_5w5v8s(elapsed, tmp3__anonymous__ufb84q.ki5_1);
var tmp$ret$3;
// Inline function 'com.soywiz.klock.milliseconds' call
tmp$ret$3 = Companion_getInstance_1().o1h(0.0);
var elapsedInTween = clamp_1(tmp_1, tmp$ret$3, durationInTween);
var tmp_2;
var tmp_3;
var tmp$ret$4;
// Inline function 'com.soywiz.klock.milliseconds' call
tmp$ret$4 = Companion_getInstance_1().o1h(0.0);
if (TimeSpan__compareTo_impl_zidry4(durationInTween, tmp$ret$4) <= 0) {
tmp_3 = true;
} else {
tmp_3 = TimeSpan__compareTo_impl_zidry4(elapsedInTween, durationInTween) >= 0;
}
if (tmp_3) {
tmp_2 = 1.0;
} else {
tmp_2 = TimeSpan__div_impl_l42f2r(elapsedInTween, durationInTween);
}
var ratioInTween = tmp_2;
var easedRatioInTween = this.vi4_1.k7u(ratioInTween);
tmp3__anonymous__ufb84q.ti5(easedRatioInTween);
}
};
TweenComponent.prototype.toString = function () {
return 'TweenComponent(' + this.si4_1 + ')';
};
TweenComponent.$metadata$ = classMeta('TweenComponent', [UpdateComponent]);
function tween$lambda(it) {
init_properties_tween_kt_7tiubb();
return Unit_getInstance();
}
function tween$slambda($this_tween, $tc, $vs, $time, $easing, $callback, $waitTime, $autoInvalidate, resultContinuation) {
this.ci6_1 = $this_tween;
this.di6_1 = $tc;
this.ei6_1 = $vs;
this.fi6_1 = $time;
this.gi6_1 = $easing;
this.hi6_1 = $callback;
this.ii6_1 = $waitTime;
this.ji6_1 = $autoInvalidate;
CoroutineImpl.call(this, resultContinuation);
}
tween$slambda.prototype.h2n = function ($this$withTimeout, $cont) {
var tmp = this.i2n($this$withTimeout, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
tween$slambda.prototype.w7 = function (p1, $cont) {
return this.h2n((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $cont);
};
tween$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
var tmp_0 = this;
tmp_0.li6_1 = this;
this.mi6_1 = new CancellableContinuationImpl(intercepted(this.li6_1), get_MODE_CANCELLABLE());
this.mi6_1.d1z();
this.ni6_1 = this.ci6_1;
var tmp_1 = this;
tmp_1.oi6_1 = new TweenComponent(this.ni6_1, toList_0(this.ei6_1), this.fi6_1, this.gi6_1, this.hi6_1, this.mi6_1, this.ii6_1, this.ji6_1);
attach(this.oi6_1);
;
this.di6_1._v = this.oi6_1;
;
suspendResult = returnIfSuspended(this.mi6_1.d1w(), this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
tween$slambda.prototype.i2n = function ($this$withTimeout, completion) {
var i = new tween$slambda(this.ci6_1, this.di6_1, this.ei6_1, this.fi6_1, this.gi6_1, this.hi6_1, this.ii6_1, this.ji6_1, completion);
i.ki6_1 = $this$withTimeout;
return i;
};
tween$slambda.$metadata$ = classMeta('tween$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
function tween$slambda_0($this_tween, $tc, $vs, $time, $easing, $callback, $waitTime, $autoInvalidate, resultContinuation) {
var i = new tween$slambda($this_tween, $tc, $vs, $time, $easing, $callback, $waitTime, $autoInvalidate, resultContinuation);
var l = function ($this$withTimeout, $cont) {
return i.h2n($this$withTimeout, $cont);
};
l.$arity = 1;
return l;
}
function $tweenCOROUTINE$16(_this__u8e3s4, vs, time, easing, waitTime, timeout, autoInvalidate, callback, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.ji4_1 = _this__u8e3s4;
this.ki4_1 = vs;
this.li4_1 = time;
this.mi4_1 = easing;
this.ni4_1 = waitTime;
this.oi4_1 = timeout;
this.pi4_1 = autoInvalidate;
this.qi4_1 = callback;
}
$tweenCOROUTINE$16.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 5;
if (!(this.ji4_1 == null)) {
this.ri4_1 = {_v: null};
this.p7_1 = 2;
this.o7_1 = 1;
var tmp_0;
if (this.oi4_1) {
var tmp_1 = TimeSpan__times_impl_86ofia(this.li4_1, 2);
tmp_0 = TimeSpan__plus_impl_qdd6zo(tmp_1, Companion_getInstance_1().o1h(300.0));
} else {
tmp_0 = Companion_getInstance_1().m1h_1;
}
var tmp_2 = tmp_0;
suspendResult = withTimeout(tmp_2, tween$slambda_0(this.ji4_1, this.ri4_1, this.ki4_1, this.li4_1, this.mi4_1, this.qi4_1, this.ni4_1, this.pi4_1, null), this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
this.o7_1 = 4;
continue $sm;
}
break;
case 1:
this.p7_1 = 5;
this.o7_1 = 3;
continue $sm;
case 2:
this.p7_1 = 5;
var tmp_3 = this.r7_1;
if (tmp_3 instanceof TimeoutCancellationException) {
var e = this.r7_1;
var tmp0_safe_receiver = this.ri4_1._v;
if (tmp0_safe_receiver == null)
null;
else {
tmp0_safe_receiver.si5(this.li4_1);
}
this.o7_1 = 3;
continue $sm;
} else {
throw this.r7_1;
}
break;
case 3:
this.p7_1 = 5;
this.o7_1 = 4;
continue $sm;
case 4:
return Unit_getInstance();
case 5:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 5) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$tweenCOROUTINE$16.$metadata$ = classMeta('$tweenCOROUTINE$16', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
var properties_initialized_tween_kt_p0n8nv;
function init_properties_tween_kt_7tiubb() {
if (properties_initialized_tween_kt_p0n8nv) {
} else {
properties_initialized_tween_kt_p0n8nv = true;
DEFAULT_EASING = Companion_getInstance_21().j7u();
var tmp$ret$0;
// Inline function 'com.soywiz.klock.seconds' call
tmp$ret$0 = Companion_getInstance_1().c1i(1.0);
DEFAULT_TIME = tmp$ret$0;
}
}
function V2_init_$Init$(key, initial, end, interpolator, includeStart, startTime, duration, initialization, $mask0, $marker, $this) {
if (!(($mask0 & 32) === 0)) {
var tmp$ret$0;
var tmp$ret$0_0;
// Inline function 'com.soywiz.klock.nanoseconds' call
tmp$ret$0 = Companion_getInstance_1().b1i(0.0);
tmp$ret$0_0 = Unit_getInstance();
startTime = tmp$ret$0;
}
if (!(($mask0 & 64) === 0))
duration = Companion_getInstance_1().m1h_1;
if (!(($mask0 & 128) === 0))
initialization = null;
V2.call($this, key, initial, end, interpolator, includeStart, startTime, duration, initialization);
return $this;
}
function V2_init_$Create$(key, initial, end, interpolator, includeStart, startTime, duration, initialization, $mask0, $marker) {
return V2_init_$Init$(key, initial, end, interpolator, includeStart, startTime, duration, initialization, $mask0, $marker, Object.create(V2.prototype));
}
function V2(key, initial, end, interpolator, includeStart, startTime, duration, initialization) {
this.fi5_1 = key;
this.gi5_1 = initial;
this.hi5_1 = end;
this.ii5_1 = interpolator;
this.ji5_1 = includeStart;
this.ki5_1 = startTime;
this.li5_1 = duration;
this.mi5_1 = initialization;
var tmp = this;
var tmp$ret$3;
// Inline function 'com.soywiz.klock.coalesce' call
var tmp0_coalesce = this.li5_1;
var tmp_0;
if (!equals(tmp0_coalesce, Companion_getInstance_1().m1h_1)) {
tmp_0 = tmp0_coalesce;
} else {
var tmp$ret$2;
// Inline function 'com.soywiz.korge.tween.V2.endTime.<anonymous>' call
var tmp$ret$1;
// Inline function 'com.soywiz.klock.nanoseconds' call
tmp$ret$1 = Companion_getInstance_1().b1i(0.0);
tmp$ret$2 = tmp$ret$1;
tmp_0 = tmp$ret$2;
}
tmp$ret$3 = tmp_0;
tmp.ni5_1 = TimeSpan__plus_impl_qdd6zo(this.ki5_1, tmp$ret$3);
}
V2.prototype.pi6 = function () {
return this.ki5_1;
};
V2.prototype.qi6 = function () {
return this.li5_1;
};
V2.prototype.ri6 = function () {
return this.ni5_1;
};
V2.prototype.ab2 = function () {
if (!this.ji5_1) {
this.gi5_1 = this.fi5_1.get();
}
var tmp0_safe_receiver = this.mi5_1;
if (tmp0_safe_receiver == null)
null;
else
tmp0_safe_receiver();
};
V2.prototype.ti5 = function (ratio) {
this.fi5_1.set(this.ii5_1(ratio, this.gi5_1, this.hi5_1));
};
V2.prototype.toString = function () {
return 'V2(key=' + this.fi5_1.callableName + ', range=[' + this.gi5_1 + '-' + this.hi5_1 + '], startTime=' + new TimeSpan(this.ki5_1) + ', duration=' + new TimeSpan(this.li5_1) + ')';
};
V2.prototype.hashCode = function () {
var result = hashCode(this.fi5_1);
result = imul(result, 31) + (this.gi5_1 == null ? 0 : hashCode(this.gi5_1)) | 0;
result = imul(result, 31) + (this.hi5_1 == null ? 0 : hashCode(this.hi5_1)) | 0;
result = imul(result, 31) + hashCode(this.ii5_1) | 0;
result = imul(result, 31) + (this.ji5_1 | 0) | 0;
result = imul(result, 31) + TimeSpan__hashCode_impl_izs3k5(this.ki5_1) | 0;
result = imul(result, 31) + TimeSpan__hashCode_impl_izs3k5(this.li5_1) | 0;
result = imul(result, 31) + (this.mi5_1 == null ? 0 : hashCode(this.mi5_1)) | 0;
return result;
};
V2.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof V2))
return false;
var tmp0_other_with_cast = other instanceof V2 ? other : THROW_CCE();
if (!equals(this.fi5_1, tmp0_other_with_cast.fi5_1))
return false;
if (!equals(this.gi5_1, tmp0_other_with_cast.gi5_1))
return false;
if (!equals(this.hi5_1, tmp0_other_with_cast.hi5_1))
return false;
if (!equals(this.ii5_1, tmp0_other_with_cast.ii5_1))
return false;
if (!(this.ji5_1 === tmp0_other_with_cast.ji5_1))
return false;
if (!equals(this.ki5_1, tmp0_other_with_cast.ki5_1))
return false;
if (!equals(this.li5_1, tmp0_other_with_cast.li5_1))
return false;
if (!equals(this.mi5_1, tmp0_other_with_cast.mi5_1))
return false;
return true;
};
V2.$metadata$ = classMeta('V2');
function get_0(_this__u8e3s4, initial, end) {
var tmp = _interpolate$ref_0();
return V2_init_$Create$(_this__u8e3s4, initial, end, tmp, true, null, null, null, 224, null);
}
function _interpolate(ratio, l, r) {
return interpolate(ratio, l, r);
}
function get_1(_this__u8e3s4, end) {
var tmp = _this__u8e3s4.get();
var tmp_0 = _interpolate$ref_1();
return V2_init_$Create$(_this__u8e3s4, tmp, end, tmp_0, false, null, null, null, 224, null);
}
function _interpolate$ref_0() {
var l = function (p0, p1, p2) {
return _interpolate(p0, p1, p2);
};
l.callableName = '_interpolate';
return l;
}
function _interpolate$ref_1() {
var l = function (p0, p1, p2) {
return _interpolate(p0, p1, p2);
};
l.callableName = '_interpolate';
return l;
}
function UIButton_init_$Init$(width, height, text, icon, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
width = 128.0;
if (!(($mask0 & 2) === 0))
height = 32.0;
if (!(($mask0 & 4) === 0))
text = '';
if (!(($mask0 & 8) === 0))
icon = null;
UIButton.call($this, width, height, text, icon);
return $this;
}
function UIButton_init_$Create$(width, height, text, icon, $mask0, $marker) {
return UIButton_init_$Init$(width, height, text, icon, $mask0, $marker, Object.create(UIButton.prototype));
}
function Companion_18() {
Companion_instance_18 = this;
this.si6_1 = 100.0;
this.ti6_1 = 32.0;
}
Companion_18.$metadata$ = objectMeta('Companion');
var Companion_instance_18;
function Companion_getInstance_50() {
if (Companion_instance_18 == null)
new Companion_18();
return Companion_instance_18;
}
function UIButton$lambda$lambda(this$0) {
return function (it) {
this$0.ti9();
return Unit_getInstance();
};
}
function UIButton$lambda$lambda_0(this$0) {
return function (it) {
this$0.ui9();
return Unit_getInstance();
};
}
function UIButton$lambda$lambda_1(this$0) {
return function (it) {
this$0.si9_1.k54(it);
return Unit_getInstance();
};
}
function UIButton$lambda(this$0) {
return function ($this$singleTouch, it) {
$this$singleTouch.qh3_1.j54(UIButton$lambda$lambda(this$0));
$this$singleTouch.vh3_1.j54(UIButton$lambda$lambda_0(this$0));
$this$singleTouch.wh3_1.j54(UIButton$lambda$lambda_1(this$0));
return Unit_getInstance();
};
}
function UIButton$slambda(this$0, resultContinuation) {
this.dia_1 = this$0;
CoroutineImpl.call(this, resultContinuation);
}
UIButton$slambda.prototype.kgt = function (it, $cont) {
var tmp = this.lgt(it, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
UIButton$slambda.prototype.w7 = function (p1, $cont) {
return this.kgt(p1 instanceof MouseEvents ? p1 : THROW_CCE(), $cont);
};
UIButton$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
if (tmp === 0) {
this.p7_1 = 1;
this.dia_1.fia();
return Unit_getInstance();
} else if (tmp === 1) {
throw this.r7_1;
}
} catch ($p) {
throw $p;
}
while (true);
};
UIButton$slambda.prototype.lgt = function (it, completion) {
var i = new UIButton$slambda(this.dia_1, completion);
i.eia_1 = it;
return i;
};
UIButton$slambda.$metadata$ = classMeta('UIButton$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
function UIButton$slambda_0(this$0, resultContinuation) {
var i = new UIButton$slambda(this$0, resultContinuation);
var l = function (it, $cont) {
return i.kgt(it, $cont);
};
l.$arity = 1;
return l;
}
function UIButton$lambda$slambda($tmp0_onOver, $it, resultContinuation) {
this.oia_1 = $tmp0_onOver;
this.pia_1 = $it;
CoroutineImpl.call(this, resultContinuation);
}
UIButton$lambda$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
UIButton$lambda$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
UIButton$lambda$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.oia_1(this.pia_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
UIButton$lambda$slambda.prototype.k53 = function (completion) {
var i = new UIButton$lambda$slambda(this.oia_1, this.pia_1, completion);
return i;
};
UIButton$lambda$slambda.$metadata$ = classMeta('UIButton$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function UIButton$lambda$slambda_0($tmp0_onOver, $it, resultContinuation) {
var i = new UIButton$lambda$slambda($tmp0_onOver, $it, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function UIButton$lambda_0($tmp0_run, $tmp0_onOver) {
return function (it) {
var tmp = $tmp0_run.b1u();
launchImmediately_0(tmp, UIButton$lambda$slambda_0($tmp0_onOver, it, null));
return Unit_getInstance();
};
}
function UIButton$slambda_1(this$0, resultContinuation) {
this.yia_1 = this$0;
CoroutineImpl.call(this, resultContinuation);
}
UIButton$slambda_1.prototype.kgt = function (it, $cont) {
var tmp = this.lgt(it, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
UIButton$slambda_1.prototype.w7 = function (p1, $cont) {
return this.kgt(p1 instanceof MouseEvents ? p1 : THROW_CCE(), $cont);
};
UIButton$slambda_1.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
if (tmp === 0) {
this.p7_1 = 1;
this.yia_1.aib();
return Unit_getInstance();
} else if (tmp === 1) {
throw this.r7_1;
}
} catch ($p) {
throw $p;
}
while (true);
};
UIButton$slambda_1.prototype.lgt = function (it, completion) {
var i = new UIButton$slambda_1(this.yia_1, completion);
i.zia_1 = it;
return i;
};
UIButton$slambda_1.$metadata$ = classMeta('UIButton$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
function UIButton$slambda_2(this$0, resultContinuation) {
var i = new UIButton$slambda_1(this$0, resultContinuation);
var l = function (it, $cont) {
return i.kgt(it, $cont);
};
l.$arity = 1;
return l;
}
function UIButton$lambda$slambda_1($tmp1_onOut, $it, resultContinuation) {
this.jib_1 = $tmp1_onOut;
this.kib_1 = $it;
CoroutineImpl.call(this, resultContinuation);
}
UIButton$lambda$slambda_1.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
UIButton$lambda$slambda_1.prototype.to = function ($cont) {
return this.z56($cont);
};
UIButton$lambda$slambda_1.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.jib_1(this.kib_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
UIButton$lambda$slambda_1.prototype.k53 = function (completion) {
var i = new UIButton$lambda$slambda_1(this.jib_1, this.kib_1, completion);
return i;
};
UIButton$lambda$slambda_1.$metadata$ = classMeta('UIButton$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function UIButton$lambda$slambda_2($tmp1_onOut, $it, resultContinuation) {
var i = new UIButton$lambda$slambda_1($tmp1_onOut, $it, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function UIButton$lambda_1($tmp0_run, $tmp1_onOut) {
return function (it) {
var tmp = $tmp0_run.b1u();
launchImmediately_0(tmp, UIButton$lambda$slambda_2($tmp1_onOut, it, null));
return Unit_getInstance();
};
}
function UIButton(width, height, text, icon) {
Companion_getInstance_50();
UIView.call(this, width, height);
this.ki9_1 = text;
this.li9_1 = icon;
this.mi9_1 = false;
var tmp = this;
var tmp$ret$3;
// Inline function 'com.soywiz.korge.view.ninePatch' call
var tmp$ret$2;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp1_addTo = new NinePatchEx(null, width, height);
var tmp$ret$1;
// Inline function 'kotlin.apply' call
var tmp0_apply = addTo(tmp1_addTo, this);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korge.view.ninePatch.<anonymous>' call
tmp$ret$0 = Unit_getInstance();
tmp$ret$1 = tmp0_apply;
tmp$ret$2 = tmp$ret$1;
tmp$ret$3 = tmp$ret$2;
tmp.ni9_1 = tmp$ret$3;
var tmp_0 = this;
var tmp$ret$7;
// Inline function 'com.soywiz.korge.view.text' call
var tmp2_text = Colors_getInstance().s7z_1;
var tmp3_text = get_DefaultTtfFont();
var tmp4_text = Companion_getInstance_22().i8s_1;
var tmp5_text = get_DefaultStringTextRenderer();
var tmp6_text = Companion_getInstance_55().mib_1;
var tmp$ret$6;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp1_addTo_0 = new Text('', 16.0, tmp2_text, tmp3_text, tmp4_text, tmp5_text, tmp6_text, null, null);
var tmp$ret$5;
// Inline function 'kotlin.apply' call
var tmp0_apply_0 = addTo(tmp1_addTo_0, this);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$4;
// Inline function 'com.soywiz.korge.view.text.<anonymous>' call
tmp$ret$4 = Unit_getInstance();
tmp$ret$5 = tmp0_apply_0;
tmp$ret$6 = tmp$ret$5;
tmp$ret$7 = tmp$ret$6;
tmp_0.oi9_1 = tmp$ret$7;
var tmp_1 = this;
var tmp$ret$12;
// Inline function 'com.soywiz.korge.view.image' call
var tmp$ret$8;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.transparent' call
var tmp0__get_transparent__6k58e1 = Bitmaps_getInstance();
tmp$ret$8 = get_Bitmaps_transparent();
var tmp3_image = tmp$ret$8;
var tmp$ret$11;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp2_addTo = Image_init_$Create$(tmp3_image, 0.0, 0.0, null, false, 24, null);
var tmp$ret$10;
// Inline function 'kotlin.apply' call
var tmp1_apply = addTo(tmp2_addTo, this);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$9;
// Inline function 'com.soywiz.korge.view.image.<anonymous>' call
tmp$ret$9 = Unit_getInstance();
tmp$ret$10 = tmp1_apply;
tmp$ret$11 = tmp$ret$10;
tmp$ret$12 = tmp$ret$11;
tmp_1.pi9_1 = tmp$ret$12;
this.qi9_1 = false;
this.ri9_1 = false;
var tmp_2 = this;
tmp_2.si9_1 = Signal_init_$Create$(null, 1, null);
singleTouch$default(this, false, false, UIButton$lambda(this), 3, null);
var tmp$ret$19;
// Inline function 'com.soywiz.korge.input.mouse' call
var tmp$ret$18;
// Inline function 'kotlin.run' call
var tmp0_run = get_mouse(this);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$17;
// Inline function 'com.soywiz.korge.ui.UIButton.<anonymous>' call
var tmp$ret$14;
// Inline function 'com.soywiz.korge.input.MouseEvents.onOver' call
var tmp0_onOver = UIButton$slambda_0(this, null);
var tmp$ret$13;
// Inline function 'com.soywiz.korge.input.MouseEvents._mouseEvent' call
var tmp0__mouseEvent = over$factory_0();
var tmp_3 = tmp0__mouseEvent.get(tmp0_run);
tmp_3.d54(UIButton$lambda_0(tmp0_run, tmp0_onOver));
tmp$ret$13 = tmp0_run;
tmp$ret$14 = tmp$ret$13;
var tmp$ret$16;
// Inline function 'com.soywiz.korge.input.MouseEvents.onOut' call
var tmp1_onOut = UIButton$slambda_2(this, null);
var tmp$ret$15;
// Inline function 'com.soywiz.korge.input.MouseEvents._mouseEvent' call
var tmp0__mouseEvent_0 = out$factory_0();
var tmp_4 = tmp0__mouseEvent_0.get(tmp0_run);
tmp_4.d54(UIButton$lambda_1(tmp0_run, tmp1_onOut));
tmp$ret$15 = tmp0_run;
tmp$ret$16 = tmp$ret$15;
tmp$ret$17 = tmp$ret$16;
tmp$ret$18 = tmp$ret$17;
tmp$ret$19 = tmp$ret$18;
}
UIButton.prototype.xhw = function (ctx) {
var skin = get_realUiSkin(this);
this.ni9_1.aie(!this.kcl() ? get_buttonDisabled(skin) : (this.ri9_1 ? true : this.mi9_1) ? get_buttonDown(skin) : this.qi9_1 ? get_buttonOver(skin) : get_buttonNormal(skin));
this.ni9_1.cav(this.d72());
this.ni9_1.p7c(this.e72());
var tmp = Companion_getInstance_52();
var tmp0_elvis_lhs = this.li9_1;
var tmp_0;
if (tmp0_elvis_lhs == null) {
var tmp$ret$0;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.transparent' call
var tmp0__get_transparent__6k58e1 = Bitmaps_getInstance();
tmp$ret$0 = get_Bitmaps_transparent();
tmp_0 = tmp$ret$0;
} else {
tmp_0 = tmp0_elvis_lhs;
}
tmp.bie(this.pi9_1, tmp_0, this.ni9_1.oid_1, this.ni9_1.pid_1, Companion_getInstance_5().v6z_1);
this.pi9_1.egh(!this.kcl() ? 0.5 : this.qi9_1 ? 1.0 : 1.0);
var tmp$ret$1;
// Inline function 'kotlin.text.isNotEmpty' call
var tmp1_isNotEmpty = this.ki9_1;
tmp$ret$1 = charSequenceLength(tmp1_isNotEmpty) > 0;
if (tmp$ret$1) {
var alignment = get_buttonTextAlignment(skin);
var font = get_textFont(skin);
var text = this.ki9_1;
var textSize = get_textSize(skin);
this.oi9_1.vih(new Rectangle(0.0, 0.0, this.d72(), this.e72()));
this.oi9_1.tch(true);
this.oi9_1.gck(text);
this.oi9_1.wih(alignment);
this.oi9_1.xih(font);
this.oi9_1.yih(textSize);
this.oi9_1.zih(get_textColor(skin));
} else {
this.oi9_1.tch(false);
}
UIView.prototype.xhw.call(this, ctx);
};
UIButton.prototype.fia = function () {
if (this.qi9_1)
return Unit_getInstance();
this.qi9_1 = true;
this.baz();
};
UIButton.prototype.aib = function () {
if (!this.qi9_1)
return Unit_getInstance();
this.qi9_1 = false;
this.baz();
};
UIButton.prototype.ti9 = function () {
if (this.ri9_1)
return Unit_getInstance();
this.ri9_1 = true;
this.baz();
};
UIButton.prototype.ui9 = function () {
if (!this.ri9_1)
return Unit_getInstance();
this.ri9_1 = false;
this.baz();
};
UIButton.prototype.aii = function () {
return this.si9_1;
};
UIButton.$metadata$ = classMeta('UIButton', undefined, undefined, undefined, undefined, UIView.prototype);
function uiButton(_this__u8e3s4, label, icon, width, height, block) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = addTo(new UIButton(width, height, label, icon), _this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
block(tmp0_apply);
tmp$ret$0 = tmp0_apply;
return tmp$ret$0;
}
function over$factory_0() {
return getPropertyCallableRef('over', 1, KProperty1, function (receiver) {
return receiver.lgd_1;
}, null);
}
function out$factory_0() {
return getPropertyCallableRef('out', 1, KProperty1, function (receiver) {
return receiver.mgd_1;
}, null);
}
function get_UI_DEFAULT_WIDTH() {
return UI_DEFAULT_WIDTH;
}
var UI_DEFAULT_WIDTH;
function get_UI_DEFAULT_HEIGHT() {
return UI_DEFAULT_HEIGHT;
}
var UI_DEFAULT_HEIGHT;
var UIDirection_HORIZONTAL_instance;
var UIDirection_VERTICAL_instance;
var UIDirection_entriesInitialized;
function UIDirection_initEntries() {
if (UIDirection_entriesInitialized)
return Unit_getInstance();
UIDirection_entriesInitialized = true;
UIDirection_HORIZONTAL_instance = new UIDirection('HORIZONTAL', 0, 0);
UIDirection_VERTICAL_instance = new UIDirection('VERTICAL', 1, 1);
}
function UIDirection(name, ordinal, index) {
Enum.call(this, name, ordinal);
this.dii_1 = index;
}
UIDirection.prototype.eii = function () {
return this.equals(UIDirection_HORIZONTAL_getInstance());
};
UIDirection.$metadata$ = classMeta('UIDirection', undefined, undefined, undefined, undefined, Enum.prototype);
function UIDirection_HORIZONTAL_getInstance() {
UIDirection_initEntries();
return UIDirection_HORIZONTAL_instance;
}
function UIDirection_VERTICAL_getInstance() {
UIDirection_initEntries();
return UIDirection_VERTICAL_instance;
}
function set__focusable(_this__u8e3s4, _set____db54di) {
init_properties_UIFocusManager_kt_5lxjtb();
var tmp0_setValue = _focusable$factory();
var tmp0_elvis_lhs = _focusable$delegate.g4v_1;
var tmp = tmp0_elvis_lhs == null ? tmp0_setValue.callableName : tmp0_elvis_lhs;
var tmp$ret$2;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = _set____db54di;
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
return setExtra(_this__u8e3s4, tmp, tmp$ret$2);
}
function get__focusable(_this__u8e3s4) {
init_properties_UIFocusManager_kt_5lxjtb();
var tmp$ret$8;
$l$block: {
// Inline function 'com.soywiz.kds.Property.getValue' call
var tmp0_getValue = _focusable$factory_0();
var tmp$ret$4;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp1_safe_receiver = _this__u8e3s4.f4v();
var tmp;
if (tmp1_safe_receiver == null) {
tmp = null;
} else {
var tmp$ret$1;
// Inline function 'com.soywiz.kds.get' call
var tmp0_elvis_lhs = _focusable$delegate.g4v_1;
var tmp0_get = tmp0_elvis_lhs == null ? tmp0_getValue.callableName : tmp0_elvis_lhs;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp1_safe_receiver;
tmp$ret$1 = tmp$ret$0.get(tmp0_get);
tmp = tmp$ret$1;
}
var tmp1_fastCastTo = tmp;
var tmp$ret$3;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$2;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$2 = tmp1_fastCastTo;
tmp$ret$3 = tmp$ret$2;
tmp$ret$4 = tmp$ret$3;
var res = tmp$ret$4;
if (res == null) {
var r = _focusable$delegate.h4v_1();
var tmp_0;
if (!(r == null)) {
tmp_0 = true;
} else {
var tmp2_elvis_lhs = _focusable$delegate.g4v_1;
tmp_0 = hasExtra(_this__u8e3s4, tmp2_elvis_lhs == null ? tmp0_getValue.callableName : tmp2_elvis_lhs);
}
if (tmp_0) {
// Inline function 'com.soywiz.kds.Property.setValue' call
var tmp0_elvis_lhs_0 = _focusable$delegate.g4v_1;
var tmp_1 = tmp0_elvis_lhs_0 == null ? tmp0_getValue.callableName : tmp0_elvis_lhs_0;
var tmp$ret$7;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp$ret$6;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$5;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$5 = r;
tmp$ret$6 = tmp$ret$5;
tmp$ret$7 = tmp$ret$6;
setExtra(_this__u8e3s4, tmp_1, tmp$ret$7);
}
tmp$ret$8 = r;
break $l$block;
}
tmp$ret$8 = res;
}
return tmp$ret$8;
}
var _focusable$delegate;
function UIFocusable() {
}
UIFocusable.$metadata$ = interfaceMeta('UIFocusable');
function sam$kotlin_Comparator$0(function_0) {
this.iii_1 = function_0;
}
sam$kotlin_Comparator$0.prototype.b1 = function (a, b) {
return this.iii_1(a, b);
};
sam$kotlin_Comparator$0.prototype.compare = function (a, b) {
return this.b1(a, b);
};
sam$kotlin_Comparator$0.$metadata$ = classMeta('sam$kotlin_Comparator$0', [Comparator]);
function UIFocusManager$onKeyEvent$lambda(it) {
return !(get_focusable(it) == null);
}
function UIFocusManager$onKeyEvent$lambda_0(a, b) {
var tmp$ret$2;
// Inline function 'kotlin.comparisons.compareValuesBy' call
var tmp$ret$0;
// Inline function 'com.soywiz.korge.ui.UIFocusManager.onKeyEvent.<anonymous>' call
tmp$ret$0 = a.gii();
var tmp = tmp$ret$0;
var tmp$ret$1;
// Inline function 'com.soywiz.korge.ui.UIFocusManager.onKeyEvent.<anonymous>' call
tmp$ret$1 = b.gii();
tmp$ret$2 = compareValues(tmp, tmp$ret$1);
return tmp$ret$2;
}
function UIFocusManager(view) {
this.jii_1 = view;
this.kii_1 = this.jii_1;
this.lii_1 = null;
}
UIFocusManager.prototype.n2u = function () {
return this.jii_1;
};
UIFocusManager.prototype.pgs = function () {
return this.kii_1;
};
UIFocusManager.prototype.mii = function () {
return this.jii_1.mii();
};
UIFocusManager.prototype.nii = function (show, view) {
if (show) {
if (!(view == null)) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.ui.UIFocusManager.requestToggleSoftKeyboard.<anonymous>' call
var tmp = this.mii();
var tmp_0 = view.fii(this);
tmp.ech(tmp_0.ii2(this.kii_1, null, 2, null));
tmp$ret$0 = view;
}
var tmp_1 = this.mii();
tmp_1.gch(false, (view == null ? true : isInterface(view, ISoftKeyboardConfig)) ? view : null, 1, null);
} else {
this.mii().hch();
}
};
UIFocusManager.prototype.vgc = function (_this__u8e3s4, event) {
if (event.ec6_1.equals(Type_DOWN_getInstance_0()) ? event.gc6_1.equals(Key_TAB_getInstance()) : false) {
var shift = event.jc6_1;
var dir = shift ? -1 : 1;
var tmp$ret$3;
// Inline function 'kotlin.collections.mapNotNull' call
var tmp0_mapNotNull = descendantsWith$default(_this__u8e3s4.lfx_1, null, UIFocusManager$onKeyEvent$lambda, 1, null);
var tmp$ret$2;
// Inline function 'kotlin.collections.mapNotNullTo' call
var tmp0_mapNotNullTo = ArrayList_init_$Create$_0();
// Inline function 'kotlin.collections.forEach' call
var tmp0_iterator = tmp0_mapNotNull.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l();
// Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
var tmp$ret$0;
// Inline function 'com.soywiz.korge.ui.UIFocusManager.onKeyEvent.<anonymous>' call
tmp$ret$0 = get_focusable(element);
var tmp0_safe_receiver = tmp$ret$0;
if (tmp0_safe_receiver == null)
null;
else {
var tmp$ret$1;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
tmp0_mapNotNullTo.c(tmp0_safe_receiver);
tmp$ret$1 = Unit_getInstance();
}
}
tmp$ret$2 = tmp0_mapNotNullTo;
tmp$ret$3 = tmp$ret$2;
var focusables = tmp$ret$3;
var tmp$ret$5;
// Inline function 'kotlin.collections.sortedBy' call
var tmp$ret$4;
// Inline function 'kotlin.comparisons.compareBy' call
var tmp = UIFocusManager$onKeyEvent$lambda_0;
tmp$ret$4 = new sam$kotlin_Comparator$0(tmp);
tmp$ret$5 = sortedWith(focusables, tmp$ret$4);
var sortedFocusables = tmp$ret$5;
var tmp$ret$7;
// Inline function 'kotlin.takeIf' call
var tmp1_takeIf = indexOf(sortedFocusables, this.lii_1);
// Inline function 'kotlin.contracts.contract' call
var tmp_0;
var tmp$ret$6;
// Inline function 'com.soywiz.korge.ui.UIFocusManager.onKeyEvent.<anonymous>' call
tmp$ret$6 = tmp1_takeIf >= 0;
if (tmp$ret$6) {
tmp_0 = tmp1_takeIf;
} else {
tmp_0 = null;
}
tmp$ret$7 = tmp_0;
var index = tmp$ret$7;
var tmp0_safe_receiver_0 = getCyclicOrNull(sortedFocusables, !(index == null) ? index + dir | 0 : shift ? -1 : 0);
if (tmp0_safe_receiver_0 == null)
null;
else {
focus(tmp0_safe_receiver_0);
}
}
};
UIFocusManager.$metadata$ = classMeta('UIFocusManager', [KeyComponent]);
function set_focusable(_this__u8e3s4, value) {
init_properties_UIFocusManager_kt_5lxjtb();
set__focusable(_this__u8e3s4, value);
}
function get_focusable(_this__u8e3s4) {
init_properties_UIFocusManager_kt_5lxjtb();
var tmp0_elvis_lhs = isInterface(_this__u8e3s4, UIFocusable) ? _this__u8e3s4 : null;
return tmp0_elvis_lhs == null ? get__focusable(_this__u8e3s4) : tmp0_elvis_lhs;
}
function focus(_this__u8e3s4) {
init_properties_UIFocusManager_kt_5lxjtb();
_this__u8e3s4.hii(true);
}
function get_uiFocusManager(_this__u8e3s4) {
init_properties_UIFocusManager_kt_5lxjtb();
var tmp$ret$4;
// Inline function 'com.soywiz.korge.baseview.BaseView.getOrCreateComponentKey' call
var tmp$ret$3;
// Inline function 'com.soywiz.korge.baseview.BaseView.getOrCreateComponentTyped' call
var tmp0_getOrCreateComponentTyped = Companion_getInstance_34();
var tmp0_safe_receiver = _this__u8e3s4.gg8(tmp0_getOrCreateComponentTyped);
var tmp;
if (tmp0_safe_receiver == null) {
tmp = null;
} else {
var tmp$ret$1;
$l$block: {
// Inline function 'kotlin.collections.firstOrNull' call
var tmp0_iterator = tmp0_safe_receiver.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l();
var tmp$ret$0;
// Inline function 'com.soywiz.korge.baseview.BaseView.getOrCreateComponentTyped.<anonymous>' call
tmp$ret$0 = element instanceof UIFocusManager;
if (tmp$ret$0) {
tmp$ret$1 = element;
break $l$block;
}
}
tmp$ret$1 = null;
}
tmp = tmp$ret$1;
}
var tmp_0 = tmp;
var tmp1_elvis_lhs = (tmp_0 == null ? true : tmp_0 instanceof UIFocusManager) ? tmp_0 : null;
var tmp_1;
if (tmp1_elvis_lhs == null) {
var tmp$ret$2;
// Inline function 'com.soywiz.korge.ui.<get-uiFocusManager>.<anonymous>' call
tmp$ret$2 = new UIFocusManager(_this__u8e3s4);
var tmp_2 = _this__u8e3s4.lg8(tmp$ret$2);
tmp_1 = tmp_2 instanceof UIFocusManager ? tmp_2 : THROW_CCE();
} else {
tmp_1 = tmp1_elvis_lhs;
}
tmp$ret$3 = tmp_1;
tmp$ret$4 = tmp$ret$3;
return tmp$ret$4;
}
function blur(_this__u8e3s4) {
init_properties_UIFocusManager_kt_5lxjtb();
_this__u8e3s4.hii(false);
}
function set_uiFocusedView(_this__u8e3s4, value) {
init_properties_UIFocusManager_kt_5lxjtb();
get_uiFocusManager(_this__u8e3s4).lii_1 = value;
}
function get_uiFocusedView(_this__u8e3s4) {
init_properties_UIFocusManager_kt_5lxjtb();
return get_uiFocusManager(_this__u8e3s4).lii_1;
}
function _focusable$delegate$lambda() {
init_properties_UIFocusManager_kt_5lxjtb();
return null;
}
function _focusable$factory() {
return getPropertyCallableRef('_focusable', 1, KMutableProperty1, function (receiver) {
return get__focusable(receiver);
}, function (receiver, value) {
return set__focusable(receiver, value);
});
}
function _focusable$factory_0() {
return getPropertyCallableRef('_focusable', 1, KMutableProperty1, function (receiver) {
return get__focusable(receiver);
}, function (receiver, value) {
return set__focusable(receiver, value);
});
}
var properties_initialized_UIFocusManager_kt_a5rjit;
function init_properties_UIFocusManager_kt_5lxjtb() {
if (properties_initialized_UIFocusManager_kt_a5rjit) {
} else {
properties_initialized_UIFocusManager_kt_a5rjit = true;
var tmp$ret$0;
// Inline function 'com.soywiz.kds.extraProperty' call
var tmp0_extraProperty = _focusable$delegate$lambda;
tmp$ret$0 = new Property(null, tmp0_extraProperty);
_focusable$delegate = tmp$ret$0;
}
}
function UIObservable(initial, observe) {
this.oii_1 = initial;
this.pii_1 = observe;
this.qii_1 = this.oii_1;
}
UIObservable.prototype.rii = function (obj, prop) {
return this.qii_1;
};
UIObservable.prototype.sii = function (obj, prop, value) {
if (!equals(this.qii_1, value)) {
this.qii_1 = value;
this.pii_1(value);
}
};
UIObservable.$metadata$ = classMeta('UIObservable');
function uiObservable(value, observe) {
return new UIObservable(value, observe);
}
function MyScrollbarInfo(scrollable, direction, view) {
this.tii_1 = scrollable;
this.uii_1 = direction;
this.vii_1 = view;
this.wii_1 = this.eii() ? x$factory(this.vii_1) : y$factory(this.vii_1);
this.xii_1 = this.eii() ? x$factory_0(this.vii_1) : y$factory_0(this.vii_1);
this.yii_1 = this.eii() ? scaledWidth$factory(this.vii_1) : scaledHeight$factory(this.vii_1);
this.zii_1 = this.eii() ? x$factory_1(this.dij()) : y$factory_1(this.dij());
var tmp = this;
tmp.aij_1 = Signal_init_$Create$(null, 1, null);
this.bij_1 = 0.0;
this.cij_1 = 0.0;
}
MyScrollbarInfo.prototype.eij = function () {
return this.tii_1;
};
MyScrollbarInfo.prototype.n2u = function () {
return this.vii_1;
};
MyScrollbarInfo.prototype.eii = function () {
return this.uii_1.eii();
};
MyScrollbarInfo.prototype.dij = function () {
return this.tii_1.xil_1;
};
MyScrollbarInfo.prototype.mim = function (_set____db54di) {
var tmp0_setValue = scrollBarPos$factory();
return this.wii_1.set(_set____db54di);
};
MyScrollbarInfo.prototype.nim = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = scrollBarPos$factory_0();
tmp$ret$0 = this.wii_1.get();
return tmp$ret$0;
};
MyScrollbarInfo.prototype.oim = function (_set____db54di) {
var tmp0_setValue = viewPos$factory();
return this.xii_1.set(_set____db54di);
};
MyScrollbarInfo.prototype.pim = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = viewPos$factory_0();
tmp$ret$0 = this.xii_1.get();
return tmp$ret$0;
};
MyScrollbarInfo.prototype.qim = function (_set____db54di) {
var tmp0_setValue = viewScaledSize$factory();
return this.yii_1.set(_set____db54di);
};
MyScrollbarInfo.prototype.rim = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = viewScaledSize$factory_0();
tmp$ret$0 = this.yii_1.get();
return tmp$ret$0;
};
MyScrollbarInfo.prototype.sim = function () {
return this.i() / this.yc2();
};
MyScrollbarInfo.prototype.tim = function () {
return this.i() * this.sim();
};
MyScrollbarInfo.prototype.uim = function () {
return this.eii() ? this.vii_1.wi0() : this.vii_1.xi0();
};
MyScrollbarInfo.prototype.vim = function (_set____db54di) {
var tmp0_setValue = containerPos$factory();
return this.zii_1.set(_set____db54di);
};
MyScrollbarInfo.prototype.wim = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = containerPos$factory_0();
tmp$ret$0 = this.zii_1.get();
return tmp$ret$0;
};
MyScrollbarInfo.prototype.xim = function () {
return this.eii() ? this.tii_1.zim() : this.tii_1.yim();
};
MyScrollbarInfo.prototype.ain = function () {
return this.eii() ? this.tii_1.cin() : this.tii_1.bin();
};
MyScrollbarInfo.prototype.i = function () {
return this.eii() ? this.tii_1.d72() : this.tii_1.e72();
};
MyScrollbarInfo.prototype.din = function () {
return this.i() < this.yc2();
};
MyScrollbarInfo.prototype.yc2 = function () {
var tmp$ret$3;
// Inline function 'kotlin.let' call
var tmp = this.dij();
var tmp0_let = tmp.ui2(false, 1, null);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$2;
// Inline function 'com.soywiz.korge.ui.MyScrollbarInfo.<get-totalSize>.<anonymous>' call
var tmp_0;
if (this.eii()) {
var tmp$ret$0;
// Inline function 'kotlin.math.max' call
var tmp0_max = this.tii_1.d72();
var tmp1_max = tmp0_let.z73();
tmp$ret$0 = Math.max(tmp0_max, tmp1_max);
tmp_0 = tmp$ret$0;
} else {
var tmp$ret$1;
// Inline function 'kotlin.math.max' call
var tmp2_max = this.tii_1.e72();
var tmp3_max = tmp0_let.a74();
tmp$ret$1 = Math.max(tmp2_max, tmp3_max);
tmp_0 = tmp$ret$1;
}
tmp$ret$2 = tmp_0;
tmp$ret$3 = tmp$ret$2;
return tmp$ret$3;
};
MyScrollbarInfo.prototype.ein = function () {
return this.yc2() - this.i();
};
MyScrollbarInfo.prototype.fin = function (value) {
var oldValue = -this.wim();
var newValue = this.tii_1.vil_1 ? -clamp_0(value, -this.xim(), this.ein() + this.ain()) : -clamp_0(value, 0.0, this.ein());
if (!(newValue === oldValue)) {
this.vim(newValue);
this.aij_1.k54(this.tii_1);
}
};
MyScrollbarInfo.prototype.fw = function () {
return -this.wim();
};
MyScrollbarInfo.prototype.gin = function (pos) {
var d = this.i() - this.uim();
if (d === 0.0)
return 0.0;
return pos / d * this.ein();
};
MyScrollbarInfo.prototype.hin = function (pos) {
var d = this.ein();
if (d === 0.0)
return 0.0;
return pos / d * (this.i() - this.uim());
};
MyScrollbarInfo.prototype.iin = function (value) {
this.fin(this.ein() * value);
};
MyScrollbarInfo.prototype.jin = function () {
return this.fw() / this.ein();
};
MyScrollbarInfo.prototype.kin = function (_set____db54di) {
this.bij_1 = _set____db54di;
};
MyScrollbarInfo.prototype.lin = function () {
return this.bij_1;
};
MyScrollbarInfo.$metadata$ = classMeta('MyScrollbarInfo');
function showScrollBar($this) {
$this.zil_1.vii_1.egh($this.jim_1);
$this.yil_1.vii_1.egh($this.jim_1);
var tmp = $this;
var tmp$ret$0;
// Inline function 'com.soywiz.klock.seconds' call
tmp$ret$0 = Companion_getInstance_1().c1i(0.0);
tmp.him_1 = tmp$ret$0;
}
function UIScrollable$lambda(this$0) {
return function (it) {
this$0.vil_1 = false;
showScrollBar(this$0);
var axisY = !this$0.zil_1.din() ? this$0.yil_1 : !this$0.yil_1.din() ? this$0.zil_1 : it.jh1() ? this$0.zil_1 : this$0.yil_1;
var axisX = it.jh1() ? this$0.yil_1 : this$0.zil_1;
var tmp;
if (axisX.din()) {
axisX.fin(axisX.fw() + it.tc5() * (axisY.i() / 16.0));
var tmp_0;
if (!(it.tc5() === 0.0)) {
axisX.bij_1 = 0.0;
tmp_0 = Unit_getInstance();
}
tmp = tmp_0;
}
var tmp_1;
if (axisY.din()) {
axisY.fin(axisY.fw() + it.uc5() * (axisY.i() / 16.0));
var tmp_2;
if (!(it.uc5() === 0.0)) {
axisY.bij_1 = 0.0;
tmp_2 = Unit_getInstance();
}
tmp_1 = tmp_2;
}
it.ic3();
return Unit_getInstance();
};
}
function UIScrollable$lambda_0(this$0) {
return function (it) {
return it ? 1.0 : this$0.jim_1;
};
}
function UIScrollable$lambda_1($info, $startScrollBarPos) {
return function ($this$onMouseDrag, it) {
var tmp;
if (!$info.din()) {
return Unit_getInstance();
}
var dxy = $info.eii() ? it.igp() : it.kgp();
var tmp_0;
if (it.ygo_1) {
$startScrollBarPos._v = $info.nim();
tmp_0 = Unit_getInstance();
}
$info.fin(clamp_0($info.gin($startScrollBarPos._v + dxy), 0.0, $info.ein()));
return Unit_getInstance();
};
}
function UIScrollable$lambda_2(this$0, $dragging) {
return function ($this$onMouseDrag, it) {
this$0.vil_1 = true;
var tmp;
if (it.ygo_1) {
showScrollBar(this$0);
$dragging._v = true;
var indexedObject = this$0.aim_1;
var inductionVariable = 0;
var last = indexedObject.length;
$l$loop: while (inductionVariable < last) {
var info = indexedObject[inductionVariable];
inductionVariable = inductionVariable + 1 | 0;
if (!info.din() ? true : !this$0.lim_1)
continue $l$loop;
info.cij_1 = info.fw();
info.bij_1 = 0.0;
}
tmp = Unit_getInstance();
}
var indexedObject_0 = this$0.aim_1;
var inductionVariable_0 = 0;
var last_0 = indexedObject_0.length;
$l$loop_0: while (inductionVariable_0 < last_0) {
var info_0 = indexedObject_0[inductionVariable_0];
inductionVariable_0 = inductionVariable_0 + 1 | 0;
if (!info_0.din() ? true : !this$0.lim_1)
continue $l$loop_0;
var tmp$ret$0;
// Inline function 'kotlin.math.absoluteValue' call
var tmp0__get_absoluteValue__nukmtt = info_0.bij_1;
tmp$ret$0 = Math.abs(tmp0__get_absoluteValue__nukmtt);
if (tmp$ret$0 < 1.0E-4) {
info_0.bij_1 = 0.0;
}
}
var indexedObject_1 = this$0.aim_1;
var inductionVariable_1 = 0;
var last_1 = indexedObject_1.length;
$l$loop_1: while (inductionVariable_1 < last_1) {
var info_1 = indexedObject_1[inductionVariable_1];
inductionVariable_1 = inductionVariable_1 + 1 | 0;
if (!info_1.din() ? true : !this$0.lim_1)
continue $l$loop_1;
var localDXY = info_1.eii() ? it.igp() : it.kgp();
info_1.fin(info_1.cij_1 - localDXY);
if (it.zgo_1) {
$dragging._v = false;
info_1.bij_1 = 300.0;
var elapsedTime = it.hgp();
info_1.bij_1 = -(localDXY * 1.1) / _TimeSpan___get_seconds__impl__cx2k1c(elapsedTime);
}
}
return Unit_getInstance();
};
}
function UIScrollable$lambda_3($dragging) {
return function ($this$addUpdater, it) {
var tmp;
if (_TimeSpan___get_milliseconds__impl__pb0we5(it.y1h_1) === 0.0) {
return Unit_getInstance();
}
var tmp0_fastForEach = $this$addUpdater.aim_1;
var n = 0;
while (n < tmp0_fastForEach.length) {
// Inline function 'com.soywiz.korge.ui.UIScrollable.<anonymous>.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach[tmp0];
tmp1__anonymous__uwfjfc.vii_1.tch(tmp1__anonymous__uwfjfc.din());
var tmp$ret$0;
// Inline function 'kotlin.math.max' call
var tmp0_max = tmp1__anonymous__uwfjfc.tim();
tmp$ret$0 = Math.max(tmp0_max, 10.0);
tmp1__anonymous__uwfjfc.qim(tmp$ret$0);
tmp1__anonymous__uwfjfc.oim(tmp1__anonymous__uwfjfc.hin(tmp1__anonymous__uwfjfc.fw()));
var tmp$ret$1;
// Inline function 'kotlin.math.absoluteValue' call
var tmp1__get_absoluteValue__rcem8i = tmp1__anonymous__uwfjfc.bij_1;
tmp$ret$1 = Math.abs(tmp1__get_absoluteValue__rcem8i);
if (tmp$ret$1 <= 1.0) {
tmp1__anonymous__uwfjfc.bij_1 = 0.0;
}
if (!(tmp1__anonymous__uwfjfc.bij_1 === 0.0)) {
var oldScrollPos = tmp1__anonymous__uwfjfc.fw();
var tmp0_this = tmp1__anonymous__uwfjfc;
tmp0_this.fin(tmp0_this.fw() + tmp1__anonymous__uwfjfc.bij_1 * _TimeSpan___get_seconds__impl__cx2k1c(it.y1h_1));
if (oldScrollPos === tmp1__anonymous__uwfjfc.fw()) {
tmp1__anonymous__uwfjfc.bij_1 = 0.0;
}
} else {
if (!$dragging._v ? tmp1__anonymous__uwfjfc.fw() < 0.0 ? true : tmp1__anonymous__uwfjfc.fw() > tmp1__anonymous__uwfjfc.ein() : false) {
var destScrollPos = tmp1__anonymous__uwfjfc.fw() < 0.0 ? 0.0 : tmp1__anonymous__uwfjfc.ein();
var tmp$ret$2;
// Inline function 'kotlin.math.absoluteValue' call
var tmp2__get_absoluteValue__uu8ln7 = destScrollPos - tmp1__anonymous__uwfjfc.fw();
tmp$ret$2 = Math.abs(tmp2__get_absoluteValue__uu8ln7);
if (tmp$ret$2 < 0.1) {
tmp1__anonymous__uwfjfc.fin(destScrollPos);
} else {
tmp1__anonymous__uwfjfc.fin(interpolate(0.5 * (_TimeSpan___get_seconds__impl__cx2k1c(it.y1h_1) * 10.0), tmp1__anonymous__uwfjfc.fw(), destScrollPos));
}
}
if (!$dragging._v ? $this$addUpdater.iim_1 : false) {
var tmp_0 = $this$addUpdater.him_1;
var tmp$ret$3;
// Inline function 'com.soywiz.klock.seconds' call
tmp$ret$3 = Companion_getInstance_1().c1i(1.0);
if (TimeSpan__compareTo_impl_zidry4(tmp_0, tmp$ret$3) >= 0) {
var tmp1_this = tmp1__anonymous__uwfjfc.vii_1;
tmp1_this.egh(tmp1_this.ea2() * 0.9);
} else {
var tmp2_this = $this$addUpdater;
tmp2_this.him_1 = TimeSpan__plus_impl_qdd6zo(tmp2_this.him_1, it.y1h_1);
}
}
}
}
return Unit_getInstance();
};
}
function UIScrollable$lambda_4($this$addFixedUpdater) {
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = $this$addFixedUpdater.aim_1;
var n = 0;
while (n < tmp0_fastForEach.length) {
// Inline function 'com.soywiz.korge.ui.UIScrollable.<anonymous>.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach[tmp0];
var tmp0_this = tmp1__anonymous__uwfjfc;
tmp0_this.bij_1 = tmp0_this.bij_1 * $this$addFixedUpdater.fim_1;
}
return Unit_getInstance();
}
function UIScrollable(width, height) {
UIView.call(this, width, height);
this.vil_1 = true;
var tmp = this;
var tmp$ret$3;
// Inline function 'com.soywiz.korge.view.fixedSizeContainer' call
var tmp$ret$2;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp1_addTo = new FixedSizeContainer(width, height, true);
var tmp$ret$1;
// Inline function 'kotlin.apply' call
var tmp0_apply = addTo(tmp1_addTo, this);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korge.view.fixedSizeContainer.<anonymous>' call
tmp$ret$0 = Unit_getInstance();
tmp$ret$1 = tmp0_apply;
tmp$ret$2 = tmp$ret$1;
tmp$ret$3 = tmp$ret$2;
tmp.wil_1 = tmp$ret$3;
var tmp_0 = this;
var tmp$ret$7;
// Inline function 'com.soywiz.korge.view.container' call
var tmp2_container = this.wil_1;
var tmp$ret$6;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp1_addTo_0 = new Container();
var tmp$ret$5;
// Inline function 'kotlin.apply' call
var tmp0_apply_0 = addTo(tmp1_addTo_0, tmp2_container);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$4;
// Inline function 'com.soywiz.korge.view.container.<anonymous>' call
tmp$ret$4 = Unit_getInstance();
tmp$ret$5 = tmp0_apply_0;
tmp$ret$6 = tmp$ret$5;
tmp$ret$7 = tmp$ret$6;
tmp_0.xil_1 = tmp$ret$7;
var tmp_1 = this;
var tmp_2 = UIDirection_VERTICAL_getInstance();
var tmp$ret$11;
// Inline function 'com.soywiz.korge.view.solidRect' call
var tmp2_solidRect = height / 2;
var tmp3_solidRect = Colors_getInstance().l8k('#57577a');
var tmp$ret$10;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp1_addTo_1 = new SolidRect(10.0, tmp2_solidRect, tmp3_solidRect);
var tmp$ret$9;
// Inline function 'kotlin.apply' call
var tmp0_apply_1 = addTo(tmp1_addTo_1, this);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$8;
// Inline function 'com.soywiz.korge.view.solidRect.<anonymous>' call
tmp$ret$8 = Unit_getInstance();
tmp$ret$9 = tmp0_apply_1;
tmp$ret$10 = tmp$ret$9;
tmp$ret$11 = tmp$ret$10;
tmp_1.yil_1 = new MyScrollbarInfo(this, tmp_2, tmp$ret$11);
var tmp_3 = this;
var tmp_4 = UIDirection_HORIZONTAL_getInstance();
var tmp$ret$15;
// Inline function 'com.soywiz.korge.view.solidRect' call
var tmp2_solidRect_0 = width / 2;
var tmp3_solidRect_0 = Colors_getInstance().l8k('#57577a');
var tmp$ret$14;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp1_addTo_2 = new SolidRect(tmp2_solidRect_0, 10.0, tmp3_solidRect_0);
var tmp$ret$13;
// Inline function 'kotlin.apply' call
var tmp0_apply_2 = addTo(tmp1_addTo_2, this);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$12;
// Inline function 'com.soywiz.korge.view.solidRect.<anonymous>' call
tmp$ret$12 = Unit_getInstance();
tmp$ret$13 = tmp0_apply_2;
tmp$ret$14 = tmp$ret$13;
tmp$ret$15 = tmp$ret$14;
tmp_3.zil_1 = new MyScrollbarInfo(this, tmp_4, tmp$ret$15);
var tmp_5 = this;
var tmp$ret$18;
// Inline function 'kotlin.arrayOf' call
var tmp0_arrayOf = [this.zil_1, this.yil_1];
var tmp$ret$17;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$16;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$16 = tmp0_arrayOf;
tmp$ret$17 = tmp$ret$16;
tmp$ret$18 = tmp$ret$17;
tmp_5.aim_1 = tmp$ret$18;
this.bim_1 = position$factory(this.zil_1);
this.cim_1 = positionRatio$factory(this.zil_1);
this.dim_1 = position$factory_0(this.yil_1);
this.eim_1 = positionRatio$factory_0(this.yil_1);
this.fim_1 = 0.75;
this.gim_1 = 0.1;
var tmp_6 = this;
var tmp$ret$19;
// Inline function 'com.soywiz.klock.seconds' call
tmp$ret$19 = Companion_getInstance_1().c1i(0.0);
tmp_6.him_1 = tmp$ret$19;
this.iim_1 = false;
this.jim_1 = 0.75;
this.kim_1 = Colors_getInstance().l8k('#161a1d');
this.lim_1 = true;
this.xil_1.o7c(0.0);
showScrollBar(this);
this.rhw();
var tmp$ret$22;
// Inline function 'com.soywiz.korge.input.mouse' call
var tmp$ret$21;
// Inline function 'kotlin.run' call
var tmp0_run = get_mouse(this);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$20;
// Inline function 'com.soywiz.korge.ui.UIScrollable.<anonymous>' call
tmp$ret$20 = tmp0_run.zgd_1.j54(UIScrollable$lambda(this));
tmp$ret$21 = tmp$ret$20;
tmp$ret$22 = tmp$ret$21;
var dragging = {_v: false};
var indexedObject = this.aim_1;
var inductionVariable = 0;
var last = indexedObject.length;
while (inductionVariable < last) {
var info = indexedObject[inductionVariable];
inductionVariable = inductionVariable + 1 | 0;
decorateOutOverAlpha(info.vii_1, UIScrollable$lambda_0(this));
}
var indexedObject_0 = this.aim_1;
var inductionVariable_0 = 0;
var last_0 = indexedObject_0.length;
while (inductionVariable_0 < last_0) {
var info_0 = indexedObject_0[inductionVariable_0];
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var startScrollBarPos = {_v: 0.0};
onMouseDrag$default(info_0.vii_1, null, null, UIScrollable$lambda_1(info_0, startScrollBarPos), 3, null);
}
onMouseDrag$default(this.wil_1, null, null, UIScrollable$lambda_2(this, dragging), 3, null);
addUpdater(this, UIScrollable$lambda_3(dragging));
var tmp$ret$23;
// Inline function 'com.soywiz.klock.seconds' call
tmp$ret$23 = Companion_getInstance_1().c1i(0.1);
var tmp_7 = tmp$ret$23;
addFixedUpdater$default(this, tmp_7, false, 0, UIScrollable$lambda_4, 6, null);
}
UIScrollable.prototype.min = function (_set____db54di) {
this.vil_1 = _set____db54di;
};
UIScrollable.prototype.dij = function () {
return this.xil_1;
};
UIScrollable.prototype.nin = function (_set____db54di) {
var tmp0_setValue = scrollLeftRatio$factory();
return this.cim_1.set(_set____db54di);
};
UIScrollable.prototype.oin = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = scrollLeftRatio$factory_0();
tmp$ret$0 = this.cim_1.get();
return tmp$ret$0;
};
UIScrollable.prototype.pin = function (_set____db54di) {
var tmp0_setValue = scrollTopRatio$factory();
return this.eim_1.set(_set____db54di);
};
UIScrollable.prototype.qin = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = scrollTopRatio$factory_0();
tmp$ret$0 = this.eim_1.get();
return tmp$ret$0;
};
UIScrollable.prototype.rin = function () {
return this.fim_1;
};
UIScrollable.prototype.sin = function () {
return this.e72() * this.gim_1;
};
UIScrollable.prototype.tin = function () {
return this.d72() * this.gim_1;
};
UIScrollable.prototype.yim = function () {
return this.sin();
};
UIScrollable.prototype.bin = function () {
return this.sin();
};
UIScrollable.prototype.zim = function () {
return this.tin();
};
UIScrollable.prototype.cin = function () {
return this.tin();
};
UIScrollable.prototype.uin = function (_set____db54di) {
this.him_1 = _set____db54di;
};
UIScrollable.prototype.vin = function () {
return this.him_1;
};
UIScrollable.prototype.win = function () {
return this.iim_1;
};
UIScrollable.prototype.xin = function (_set____db54di) {
this.kim_1 = _set____db54di;
};
UIScrollable.prototype.xhw = function (ctx) {
var tmp$ret$2;
// Inline function 'com.soywiz.korge.render.RenderContext.useBatcher' call
var tmp$ret$1;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.use' call
var tmp0_use = ctx.gga_1;
var tmp0_useBatcher = tmp0_use.vga_1;
if (!(tmp0_useBatcher.tga_1 === tmp0_use)) {
tmp0_useBatcher.mj();
tmp0_useBatcher.tga_1 = tmp0_use;
}
var tmp$ret$0;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.white' call
var tmp0__get_white__j8g7zy = Bitmaps_getInstance();
tmp$ret$0 = get_Bitmaps_white();
var tmp = ctx.tgc(tmp$ret$0);
var tmp_0 = this.d72();
var tmp_1 = this.e72();
var tmp_2 = this.pgw();
var tmp_3 = RGBA__times_impl_wehs9n(this.kim_1, this.ei1());
tmp0_use.ugc(tmp, 0.0, 0.0, tmp_0, tmp_1, tmp_2, false, tmp_3, null, null, null, false, false, 8000, null);
tmp$ret$1 = Unit_getInstance();
tmp$ret$2 = tmp$ret$1;
UIView.prototype.xhw.call(this, ctx);
};
UIScrollable.prototype.rhw = function () {
size(this.wil_1, this.d72(), this.e72());
position(this.yil_1.vii_1, this.d72() - 10.0, 0.0);
position(this.zil_1.vii_1, 0.0, this.e72() - 10.0);
UIView.prototype.rhw.call(this);
};
UIScrollable.$metadata$ = classMeta('UIScrollable', undefined, undefined, undefined, undefined, UIView.prototype);
function uiScrollable(_this__u8e3s4, width, height, config, block) {
var tmp$ret$1;
// Inline function 'kotlin.also' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = addTo(new UIScrollable(width, height), _this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
config(tmp0_apply);
tmp$ret$0 = tmp0_apply;
var tmp1_also = tmp$ret$0;
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.ui.uiScrollable.<anonymous>' call
block(tmp1_also.xil_1, tmp1_also);
tmp$ret$1 = tmp1_also;
return tmp$ret$1;
}
function position$factory($b0) {
return getPropertyCallableRef('position', 0, KMutableProperty0, function () {
return $b0.fw();
}, function (value) {
return $b0.fin(value);
});
}
function positionRatio$factory($b0) {
return getPropertyCallableRef('positionRatio', 0, KMutableProperty0, function () {
return $b0.jin();
}, function (value) {
return $b0.iin(value);
});
}
function position$factory_0($b0) {
return getPropertyCallableRef('position', 0, KMutableProperty0, function () {
return $b0.fw();
}, function (value) {
return $b0.fin(value);
});
}
function positionRatio$factory_0($b0) {
return getPropertyCallableRef('positionRatio', 0, KMutableProperty0, function () {
return $b0.jin();
}, function (value) {
return $b0.iin(value);
});
}
function x$factory($b0) {
return getPropertyCallableRef('x', 0, KMutableProperty0, function () {
return $b0.d1n();
}, function (value) {
return $b0.w8w(value);
});
}
function y$factory($b0) {
return getPropertyCallableRef('y', 0, KMutableProperty0, function () {
return $b0.e1n();
}, function (value) {
return $b0.o7c(value);
});
}
function x$factory_0($b0) {
return getPropertyCallableRef('x', 0, KMutableProperty0, function () {
return $b0.d1n();
}, function (value) {
return $b0.w8w(value);
});
}
function y$factory_0($b0) {
return getPropertyCallableRef('y', 0, KMutableProperty0, function () {
return $b0.e1n();
}, function (value) {
return $b0.o7c(value);
});
}
function scaledWidth$factory($b0) {
return getPropertyCallableRef('scaledWidth', 0, KMutableProperty0, function () {
return $b0.wi0();
}, function (value) {
return $b0.yin(value);
});
}
function scaledHeight$factory($b0) {
return getPropertyCallableRef('scaledHeight', 0, KMutableProperty0, function () {
return $b0.xi0();
}, function (value) {
return $b0.zin(value);
});
}
function x$factory_1($b0) {
return getPropertyCallableRef('x', 0, KMutableProperty0, function () {
return $b0.d1n();
}, function (value) {
return $b0.w8w(value);
});
}
function y$factory_1($b0) {
return getPropertyCallableRef('y', 0, KMutableProperty0, function () {
return $b0.e1n();
}, function (value) {
return $b0.o7c(value);
});
}
function scrollBarPos$factory() {
return getPropertyCallableRef('scrollBarPos', 1, KMutableProperty1, function (receiver) {
return receiver.nim();
}, function (receiver, value) {
return receiver.mim(value);
});
}
function scrollBarPos$factory_0() {
return getPropertyCallableRef('scrollBarPos', 1, KMutableProperty1, function (receiver) {
return receiver.nim();
}, function (receiver, value) {
return receiver.mim(value);
});
}
function viewPos$factory() {
return getPropertyCallableRef('viewPos', 1, KMutableProperty1, function (receiver) {
return receiver.pim();
}, function (receiver, value) {
return receiver.oim(value);
});
}
function viewPos$factory_0() {
return getPropertyCallableRef('viewPos', 1, KMutableProperty1, function (receiver) {
return receiver.pim();
}, function (receiver, value) {
return receiver.oim(value);
});
}
function viewScaledSize$factory() {
return getPropertyCallableRef('viewScaledSize', 1, KMutableProperty1, function (receiver) {
return receiver.rim();
}, function (receiver, value) {
return receiver.qim(value);
});
}
function viewScaledSize$factory_0() {
return getPropertyCallableRef('viewScaledSize', 1, KMutableProperty1, function (receiver) {
return receiver.rim();
}, function (receiver, value) {
return receiver.qim(value);
});
}
function containerPos$factory() {
return getPropertyCallableRef('containerPos', 1, KMutableProperty1, function (receiver) {
return receiver.wim();
}, function (receiver, value) {
return receiver.vim(value);
});
}
function containerPos$factory_0() {
return getPropertyCallableRef('containerPos', 1, KMutableProperty1, function (receiver) {
return receiver.wim();
}, function (receiver, value) {
return receiver.vim(value);
});
}
function scrollLeftRatio$factory() {
return getPropertyCallableRef('scrollLeftRatio', 1, KMutableProperty1, function (receiver) {
return receiver.oin();
}, function (receiver, value) {
return receiver.nin(value);
});
}
function scrollLeftRatio$factory_0() {
return getPropertyCallableRef('scrollLeftRatio', 1, KMutableProperty1, function (receiver) {
return receiver.oin();
}, function (receiver, value) {
return receiver.nin(value);
});
}
function scrollTopRatio$factory() {
return getPropertyCallableRef('scrollTopRatio', 1, KMutableProperty1, function (receiver) {
return receiver.qin();
}, function (receiver, value) {
return receiver.pin(value);
});
}
function scrollTopRatio$factory_0() {
return getPropertyCallableRef('scrollTopRatio', 1, KMutableProperty1, function (receiver) {
return receiver.qin();
}, function (receiver, value) {
return receiver.pin(value);
});
}
var DEFAULT_UI_SKIN_IMG_OR_NULL;
function UISkinable() {
}
UISkinable.$metadata$ = interfaceMeta('UISkinable');
function getSkinProperty(_this__u8e3s4, property, default_0) {
var res = _this__u8e3s4.thw(property);
if (res == null) {
var value = default_0(_this__u8e3s4);
_this__u8e3s4.shw(property, value);
return value;
}
return res;
}
function set_uiSkinBitmap(_this__u8e3s4, value) {
_this__u8e3s4.shw('uiSkinBitmap', value);
}
function get_uiSkinBitmap(_this__u8e3s4) {
return getSkinProperty(_this__u8e3s4, 'uiSkinBitmap', _get_uiSkinBitmap_$lambda_mmmu4g);
}
function get_DEFAULT_UI_SKIN_IMG() {
if (DEFAULT_UI_SKIN_IMG_OR_NULL == null) {
var tmp$ret$4;
// Inline function 'kotlin.also' call
var tmp$ret$2;
// Inline function 'com.soywiz.korim.bitmap.context2d' call
var tmp0_context2d = NativeImage$default(512, 512, null, 4, null);
var tmp$ret$1;
$l$block: {
// Inline function 'com.soywiz.korim.bitmap.Bitmap.lock' call
{
tmp0_context2d.j7z();
}
try {
// Inline function 'com.soywiz.korim.bitmap.context2d.<anonymous>' call
var ctx = tmp0_context2d.b86(true);
try {
// Inline function 'com.soywiz.korge.ui.<get-DEFAULT_UI_SKIN_IMG>.<anonymous>' call
var tmp0_iterator = listOf([UiSkinKind_BUTTON_getInstance(), UiSkinKind_RADIO_getInstance()]).j();
while (tmp0_iterator.k()) {
var kind = tmp0_iterator.l();
var inductionVariable = 0;
if (inductionVariable < 4)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.vector.Context2d.drawImage' call
var tmp0_drawImage = buildDefaultButton(_UiSkinType___init__impl__kunrii(n), kind);
var tmp1_drawImage = imul(kind.cio_1, 256) + imul(n, 64) | 0;
var tmp2_drawImage = tmp0_drawImage.d72();
var tmp3_drawImage = tmp0_drawImage.e72();
ctx.n8o(tmp0_drawImage, numberToDouble(tmp1_drawImage), 0.0, numberToDouble(tmp2_drawImage), numberToDouble(tmp3_drawImage));
tmp$ret$0 = Unit_getInstance();
}
while (inductionVariable < 4);
}
var inductionVariable_0 = 0;
if (inductionVariable_0 < 5)
do {
var n_0 = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var tmp3_iterator = listOf([false, true]).j();
while (tmp3_iterator.k()) {
var enabled = tmp3_iterator.l();
var tmp = buildDefaultShape(n_0, enabled);
var tmp_0 = 64.0 * (enabled ? 0 : 1);
var tmp_1 = 64 + 64.0 * n_0;
ctx.ya4(tmp, tmp_0, tmp_1, 0.0, 0.0, 24, null);
}
}
while (inductionVariable_0 < 5);
}finally {
ctx.s1x();
}
}finally {
tmp$ret$1 = tmp0_context2d.k7z(null);
break $l$block;
}
}
tmp$ret$2 = tmp0_context2d;
var tmp1_also = mipmaps(tmp$ret$2, true).w86();
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$3;
// Inline function 'com.soywiz.korge.ui.<get-DEFAULT_UI_SKIN_IMG>.<anonymous>' call
tmp$ret$3 = Unit_getInstance();
tmp$ret$4 = tmp1_also;
DEFAULT_UI_SKIN_IMG_OR_NULL = tmp$ret$4;
}
return ensureNotNull(DEFAULT_UI_SKIN_IMG_OR_NULL);
}
var UiSkinKind_BUTTON_instance;
var UiSkinKind_RADIO_instance;
var UiSkinKind_entriesInitialized;
function UiSkinKind_initEntries() {
if (UiSkinKind_entriesInitialized)
return Unit_getInstance();
UiSkinKind_entriesInitialized = true;
UiSkinKind_BUTTON_instance = new UiSkinKind('BUTTON', 0, 0);
UiSkinKind_RADIO_instance = new UiSkinKind('RADIO', 1, 1);
}
function UiSkinKind(name, ordinal, id) {
Enum.call(this, name, ordinal);
this.cio_1 = id;
}
UiSkinKind.prototype.c1n = function () {
return this.cio_1;
};
UiSkinKind.$metadata$ = classMeta('UiSkinKind', undefined, undefined, undefined, undefined, Enum.prototype);
function buildDefaultButton(index, kind) {
var tmp$ret$1;
// Inline function 'com.soywiz.korim.bitmap.context2d' call
var tmp0_context2d = NativeImage$default(64, 64, null, 4, null);
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.korim.bitmap.Bitmap.lock' call
{
tmp0_context2d.j7z();
}
try {
// Inline function 'com.soywiz.korim.bitmap.context2d.<anonymous>' call
var ctx = tmp0_context2d.b86(true);
try {
// Inline function 'com.soywiz.korge.ui.buildDefaultButton.<anonymous>' call
var tmp0_subject = index;
var tmp;
if (tmp0_subject === Companion_getInstance_51().dio_1) {
tmp = new RGBA(Companion_getInstance_14().a8l(Companion_getInstance_14().a8l(Colors_getInstance().p81_1)));
} else if (tmp0_subject === Companion_getInstance_51().eio_1) {
tmp = new RGBA(Companion_getInstance_14().a8l(Companion_getInstance_14().a8l(Colors_getInstance().l8k('#6b6b6b'))));
} else if (tmp0_subject === Companion_getInstance_51().fio_1) {
tmp = new RGBA(Companion_getInstance_14().a8l(Companion_getInstance_14().a8l(Colors_getInstance().l8k('#4f4f4f'))));
} else if (tmp0_subject === Companion_getInstance_51().gio_1) {
tmp = new RGBA(Companion_getInstance_14().a8l(Companion_getInstance_14().a8l(Colors_getInstance().l8k('#494949'))));
} else {
throw NotImplementedError_init_$Create$(null, 1, null);
}
var gradient = tmp;
var tmp1_subject = index;
var border = tmp1_subject === Companion_getInstance_51().dio_1 ? gradient : tmp1_subject === Companion_getInstance_51().eio_1 ? new RGBA(Companion_getInstance_14().a8l(Colors_getInstance().l8k('#b4b4b4'))) : tmp1_subject === Companion_getInstance_51().fio_1 ? new RGBA(Companion_getInstance_14().a8l(Colors_getInstance().l8k('#c8c8c8'))) : tmp1_subject === Companion_getInstance_51().gio_1 ? gradient : new RGBA(Companion_getInstance_14().a8l(Colors_getInstance().l8k('#3c3e3e')));
// Inline function 'com.soywiz.korim.vector.Context2d.fill' call
{
ctx.h8r();
}
// Inline function 'com.soywiz.korge.ui.buildDefaultButton.<anonymous>.<anonymous>' call
// Inline function 'com.soywiz.korim.vector.Context2d.stroke' call
var tmp0_stroke = ctx.r8u();
var tmp1_stroke = ctx.s8u();
var tmp2_stroke = ctx.t8u();
var tmp3_stroke = ctx.u8u();
var tmp4_stroke = ctx.v8u();
{
ctx.h8r();
}
// Inline function 'com.soywiz.korge.ui.buildDefaultButton.<anonymous>.<anonymous>.<anonymous>' call
var tmp0_subject_0 = kind;
var tmp0 = tmp0_subject_0.q2_1;
if (tmp0 === 1) {
circle(ctx, 32.0, 32.0, 28.0);
} else if (tmp0 === 0) {
roundRect(ctx, 4, 4, 56, 56, 6, 6);
}
// Inline function 'com.soywiz.korim.vector.Context2d.keep' call
ctx.w8u();
try {
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
ctx.x8u(8.0);
ctx.y8u(tmp0_stroke);
ctx.z8u(tmp1_stroke);
ctx.a8v(tmp2_stroke);
ctx.b8v(tmp3_stroke);
ctx.c8v(tmp4_stroke);
ctx.d8v(border);
}finally {
ctx.e8v();
}
ctx.oa4(gradient, null);
}finally {
ctx.s1x();
}
}finally {
tmp$ret$0 = tmp0_context2d.k7z(null);
break $l$block;
}
}
tmp$ret$1 = tmp0_context2d;
return tmp$ret$1;
}
function _UiSkinType___init__impl__kunrii(index) {
return index;
}
function Companion_19() {
Companion_instance_19 = this;
this.dio_1 = _UiSkinType___init__impl__kunrii(0);
this.eio_1 = _UiSkinType___init__impl__kunrii(1);
this.fio_1 = _UiSkinType___init__impl__kunrii(2);
this.gio_1 = _UiSkinType___init__impl__kunrii(3);
}
Companion_19.prototype.hio = function () {
return this.dio_1;
};
Companion_19.prototype.iio = function () {
return this.eio_1;
};
Companion_19.prototype.jio = function () {
return this.fio_1;
};
Companion_19.prototype.kio = function () {
return this.gio_1;
};
Companion_19.$metadata$ = objectMeta('Companion');
var Companion_instance_19;
function Companion_getInstance_51() {
if (Companion_instance_19 == null)
new Companion_19();
return Companion_instance_19;
}
function UiSkinType__toString_impl_yumglm($this) {
return 'UiSkinType(index=' + $this + ')';
}
function UiSkinType__hashCode_impl_efbokn($this) {
return $this;
}
function UiSkinType__equals_impl_dmpnb7($this, other) {
if (!(other instanceof UiSkinType))
return false;
var tmp0_other_with_cast = other instanceof UiSkinType ? other.lio_1 : THROW_CCE();
if (!($this === tmp0_other_with_cast))
return false;
return true;
}
function UiSkinType(index) {
Companion_getInstance_51();
this.lio_1 = index;
}
UiSkinType.prototype.toString = function () {
return UiSkinType__toString_impl_yumglm(this.lio_1);
};
UiSkinType.prototype.hashCode = function () {
return UiSkinType__hashCode_impl_efbokn(this.lio_1);
};
UiSkinType.prototype.equals = function (other) {
return UiSkinType__equals_impl_dmpnb7(this.lio_1, other);
};
UiSkinType.$metadata$ = classMeta('UiSkinType');
function buildDefaultShape(index, enabled) {
var color = Companion_getInstance_14().a8l(enabled ? Colors_getInstance().l8k('#484848') : Colors_getInstance().l8k('#737373'));
var lineWidth = 8.0;
var tmp$ret$3;
// Inline function 'com.soywiz.korim.bitmap.context2d' call
var tmp0_context2d = NativeImage$default(64, 64, null, 4, null);
var tmp$ret$2;
$l$block: {
// Inline function 'com.soywiz.korim.bitmap.Bitmap.lock' call
{
tmp0_context2d.j7z();
}
try {
// Inline function 'com.soywiz.korim.bitmap.context2d.<anonymous>' call
var ctx = tmp0_context2d.b86(true);
try {
// Inline function 'com.soywiz.korge.ui.buildDefaultShape.<anonymous>' call
var tmp0_subject = index;
if (tmp0_subject === 0) {
var tmp$ret$0;
// Inline function 'com.soywiz.korim.vector.Context2d.translate' call
ctx.o8w(27.0, 41.0);
tmp$ret$0 = Unit_getInstance();
ctx.ja4(get_degrees(45));
// Inline function 'com.soywiz.korim.vector.Context2d.stroke' call
var tmp0_stroke = LineCap_BUTT_getInstance();
var tmp1_stroke = ctx.s8u();
var tmp2_stroke = ctx.t8u();
var tmp3_stroke = ctx.u8u();
var tmp4_stroke = ctx.v8u();
{
ctx.h8r();
}
// Inline function 'com.soywiz.korge.ui.buildDefaultShape.<anonymous>.<anonymous>' call
moveTo(ctx, -16, 0);
lineTo(ctx, 0, 0);
lineTo(ctx, 0, -32);
// Inline function 'com.soywiz.korim.vector.Context2d.keep' call
ctx.w8u();
try {
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
ctx.x8u(lineWidth);
ctx.y8u(tmp0_stroke);
ctx.z8u(tmp1_stroke);
ctx.a8v(tmp2_stroke);
ctx.b8v(tmp3_stroke);
ctx.c8v(tmp4_stroke);
ctx.d8v(new RGBA(color));
}finally {
ctx.e8v();
}
} else {
var tmp$ret$1;
// Inline function 'com.soywiz.korim.vector.Context2d.translate' call
ctx.o8w(32.0, 32.0);
tmp$ret$1 = Unit_getInstance();
ctx.ja4(get_degrees(45 + imul(90, index - 1 | 0) | 0));
var offsetX = -8;
var offsetY = -8;
var lineLength = 20;
// Inline function 'com.soywiz.korim.vector.Context2d.stroke' call
var tmp5_stroke = LineCap_SQUARE_getInstance();
var tmp6_stroke = ctx.s8u();
var tmp7_stroke = ctx.t8u();
var tmp8_stroke = ctx.u8u();
var tmp9_stroke = ctx.v8u();
{
ctx.h8r();
}
// Inline function 'com.soywiz.korge.ui.buildDefaultShape.<anonymous>.<anonymous>' call
line(ctx, offsetX + 0 | 0, offsetY + 0 | 0, offsetX + 0 | 0, offsetY + lineLength | 0);
line(ctx, offsetX + 0 | 0, offsetY + 0 | 0, offsetX + lineLength | 0, offsetY + 0 | 0);
// Inline function 'com.soywiz.korim.vector.Context2d.keep' call
ctx.w8u();
try {
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
ctx.x8u(lineWidth);
ctx.y8u(tmp5_stroke);
ctx.z8u(tmp6_stroke);
ctx.a8v(tmp7_stroke);
ctx.b8v(tmp8_stroke);
ctx.c8v(tmp9_stroke);
ctx.d8v(new RGBA(color));
}finally {
ctx.e8v();
}
}
}finally {
ctx.s1x();
}
}finally {
tmp$ret$2 = tmp0_context2d.k7z(null);
break $l$block;
}
}
tmp$ret$3 = tmp0_context2d;
return tmp$ret$3;
}
function UISkin_init_$Init$(name, skins, parent, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
name = null;
if (!(($mask0 & 2) === 0)) {
var tmp$ret$0;
var tmp$ret$0_0;
// Inline function 'kotlin.collections.listOf' call
tmp$ret$0 = emptyList();
tmp$ret$0_0 = Unit_getInstance();
skins = tmp$ret$0;
}
if (!(($mask0 & 4) === 0))
parent = null;
UISkin.call($this, name, skins, parent);
return $this;
}
function UISkin_init_$Create$(name, skins, parent, $mask0, $marker) {
return UISkin_init_$Init$(name, skins, parent, $mask0, $marker, Object.create(UISkin.prototype));
}
function UISkin(name, skins, parent) {
this.mio_1 = name;
this.nio_1 = skins;
this.oio_1 = parent;
this.pio_1 = FastStringMap();
}
UISkin.prototype.shw = function (property, value) {
var tmp$ret$2;
// Inline function 'com.soywiz.kds.set' call
var tmp0_set = this.pio_1;
var tmp$ret$1;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_set;
tmp$ret$1 = tmp$ret$0.set(property, value);
tmp$ret$2 = tmp$ret$1;
};
UISkin.prototype.thw = function (property) {
var tmp$ret$1;
// Inline function 'com.soywiz.kds.get' call
var tmp0_get = this.pio_1;
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_get;
tmp$ret$1 = tmp$ret$0.get(property);
var tmp0_safe_receiver = tmp$ret$1;
if (tmp0_safe_receiver == null)
null;
else {
var tmp$ret$5;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$4;
// Inline function 'com.soywiz.kds.fastCastTo' call
var tmp$ret$3;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$2;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$2 = tmp0_safe_receiver;
tmp$ret$3 = tmp$ret$2;
tmp$ret$4 = tmp$ret$3;
return tmp$ret$4;
}
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp1_fastForEach = this.nio_1;
var n = 0;
while (n < tmp1_fastForEach.i()) {
// Inline function 'com.soywiz.korge.ui.UISkin.getSkinPropertyOrNull.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp2__anonymous__z9zvc9 = tmp1_fastForEach.m(tmp0);
var tmp0_safe_receiver_0 = tmp2__anonymous__z9zvc9.thw(property);
if (tmp0_safe_receiver_0 == null)
null;
else {
var tmp$ret$6;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
return tmp0_safe_receiver_0;
}
}
var tmp1_safe_receiver = this.oio_1;
return tmp1_safe_receiver == null ? null : tmp1_safe_receiver.thw(property);
};
UISkin.prototype.toString = function () {
return 'UISkin(' + this.mio_1 + ')';
};
UISkin.$metadata$ = classMeta('UISkin', [UISkinable]);
function UISkin_0(name, block) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = UISkin_init_$Create$(name, null, null, 6, null);
// Inline function 'kotlin.contracts.contract' call
block(tmp0_apply);
tmp$ret$0 = tmp0_apply;
return tmp$ret$0;
}
function get_buttonDisabled(_this__u8e3s4) {
return getSkinProperty(_this__u8e3s4, 'buttonDisabled', _get_buttonDisabled_$lambda_9s19de);
}
function get_buttonDown(_this__u8e3s4) {
return getSkinProperty(_this__u8e3s4, 'buttonDown', _get_buttonDown_$lambda_imuvhw);
}
function get_buttonOver(_this__u8e3s4) {
return getSkinProperty(_this__u8e3s4, 'buttonOver', _get_buttonOver_$lambda_dvwdsq);
}
function get_buttonNormal(_this__u8e3s4) {
return getSkinProperty(_this__u8e3s4, 'buttonNormal', _get_buttonNormal_$lambda_25a29l);
}
function get_buttonTextAlignment(_this__u8e3s4) {
return getSkinProperty(_this__u8e3s4, 'buttonTextAlignment', _get_buttonTextAlignment_$lambda_9w8kgy);
}
function get_textFont(_this__u8e3s4) {
return getSkinProperty(_this__u8e3s4, 'textFont', _get_textFont_$lambda_lp11b0);
}
function set_textSize(_this__u8e3s4, value) {
_this__u8e3s4.shw('textSize', value);
}
function get_textSize(_this__u8e3s4) {
return getSkinProperty(_this__u8e3s4, 'textSize', _get_textSize_$lambda_252bn6);
}
function get_textColor(_this__u8e3s4) {
return getSkinProperty(_this__u8e3s4, 'textColor', _get_textColor_$lambda_shpg0g).n8k_1;
}
function get_DefaultUIFont() {
return get_DefaultUIVectorFont();
}
function get_DefaultUIVectorFont() {
return get_DefaultTtfFont();
}
function BoxUISkin_init_$Init$(bgColor, borderColor, borderSize, bgColorFocused, borderColorFocused, bgColorOver, borderColorOver, outlineColor, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
bgColor = Colors_getInstance().l8k('#c3c3c3');
if (!(($mask0 & 2) === 0))
borderColor = Colors_getInstance().l8k('#1f1f1f');
if (!(($mask0 & 4) === 0))
borderSize = 1.0;
if (!(($mask0 & 8) === 0))
bgColorFocused = Colors_getInstance().s7z_1;
if (!(($mask0 & 16) === 0))
borderColorFocused = Colors_getInstance().t7z_1;
if (!(($mask0 & 32) === 0))
bgColorOver = mix(bgColor, bgColorFocused, 0.5);
if (!(($mask0 & 64) === 0))
borderColorOver = mix(borderColor, borderColorFocused, 0.5);
if (!(($mask0 & 128) === 0))
outlineColor = Colors_getInstance().l8k('#621a99');
BoxUISkin.call($this, bgColor, borderColor, borderSize, bgColorFocused, borderColorFocused, bgColorOver, borderColorOver, outlineColor);
return $this;
}
function BoxUISkin_init_$Create$(bgColor, borderColor, borderSize, bgColorFocused, borderColorFocused, bgColorOver, borderColorOver, outlineColor, $mask0, $marker) {
return BoxUISkin_init_$Init$(bgColor, borderColor, borderSize, bgColorFocused, borderColorFocused, bgColorOver, borderColorOver, outlineColor, $mask0, $marker, Object.create(BoxUISkin.prototype));
}
function BoxUISkin(bgColor, borderColor, borderSize, bgColorFocused, borderColorFocused, bgColorOver, borderColorOver, outlineColor) {
this.qio_1 = bgColor;
this.rio_1 = borderColor;
this.sio_1 = borderSize;
this.tio_1 = bgColorFocused;
this.uio_1 = borderColorFocused;
this.vio_1 = bgColorOver;
this.wio_1 = borderColorOver;
this.xio_1 = outlineColor;
}
BoxUISkin.prototype.yio = function (_this__u8e3s4) {
if (_this__u8e3s4.yit_1 ? _RGBA___get_ad__impl__pt5rdj(this.xio_1) > 0.0 : false) {
_this__u8e3s4.dhb().qhc(_this__u8e3s4.d1n() - 1, _this__u8e3s4.e1n() - 1, _this__u8e3s4.d72() + 2, _this__u8e3s4.e72() + 2, this.sio_1, this.xio_1, false);
}
_this__u8e3s4.dhb().phc(0.0, 0.0, _this__u8e3s4.d72(), _this__u8e3s4.e72(), _this__u8e3s4.yit_1 ? this.tio_1 : _this__u8e3s4.zit_1 ? this.vio_1 : this.qio_1, false);
_this__u8e3s4.dhb().qhc(_this__u8e3s4.d1n(), _this__u8e3s4.e1n(), _this__u8e3s4.d72(), _this__u8e3s4.e72(), this.sio_1, _this__u8e3s4.yit_1 ? this.uio_1 : _this__u8e3s4.zit_1 ? this.wio_1 : this.rio_1, false);
};
BoxUISkin.$metadata$ = classMeta('BoxUISkin', [ViewRenderer]);
function get_textAlignment(_this__u8e3s4) {
return getSkinProperty(_this__u8e3s4, 'textAlignment', _get_textAlignment_$lambda_hlz034);
}
function _get_uiSkinBitmap_$lambda_mmmu4g($this$getSkinProperty) {
return get_DEFAULT_UI_SKIN_IMG();
}
function _get_buttonDisabled_$lambda_9s19de($this$getSkinProperty) {
var tmp = get_uiSkinBitmap($this$getSkinProperty);
return asNinePatchSimple(sliceWithSize$default(tmp, 192, 0, 64, 64, null, null, 48, null), 16, 16, 48, 48);
}
function _get_buttonDown_$lambda_imuvhw($this$getSkinProperty) {
var tmp = get_uiSkinBitmap($this$getSkinProperty);
return asNinePatchSimple(sliceWithSize$default(tmp, 128, 0, 64, 64, null, null, 48, null), 16, 16, 48, 48);
}
function _get_buttonOver_$lambda_dvwdsq($this$getSkinProperty) {
var tmp = get_uiSkinBitmap($this$getSkinProperty);
return asNinePatchSimple(sliceWithSize$default(tmp, 64, 0, 64, 64, null, null, 48, null), 16, 16, 48, 48);
}
function _get_buttonNormal_$lambda_25a29l($this$getSkinProperty) {
var tmp = get_uiSkinBitmap($this$getSkinProperty);
return asNinePatchSimple(sliceWithSize$default(tmp, 0, 0, 64, 64, null, null, 48, null), 16, 16, 48, 48);
}
function _get_buttonTextAlignment_$lambda_9w8kgy($this$getSkinProperty) {
return Companion_getInstance_22().v8s_1;
}
function _get_textFont_$lambda_lp11b0($this$getSkinProperty) {
return get_DefaultUIFont();
}
function _get_textSize_$lambda_252bn6($this$getSkinProperty) {
return 16.0;
}
function _get_textColor_$lambda_shpg0g($this$getSkinProperty) {
return new RGBA(Colors_getInstance().s7z_1);
}
function _get_textAlignment_$lambda_hlz034($this$getSkinProperty) {
return Companion_getInstance_22().q8s_1;
}
function UiSkinKind_BUTTON_getInstance() {
UiSkinKind_initEntries();
return UiSkinKind_BUTTON_instance;
}
function UiSkinKind_RADIO_getInstance() {
UiSkinKind_initEntries();
return UiSkinKind_RADIO_instance;
}
function UIText$bover$delegate$lambda(this$0) {
return function (it) {
this$0.whw();
return Unit_getInstance();
};
}
function UIText$bpressing$delegate$lambda(this$0) {
return function (it) {
this$0.whw();
return Unit_getInstance();
};
}
function UIText$slambda(this$0, resultContinuation) {
this.gix_1 = this$0;
CoroutineImpl.call(this, resultContinuation);
}
UIText$slambda.prototype.kgt = function (it, $cont) {
var tmp = this.lgt(it, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
UIText$slambda.prototype.w7 = function (p1, $cont) {
return this.kgt(p1 instanceof MouseEvents ? p1 : THROW_CCE(), $cont);
};
UIText$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
if (tmp === 0) {
this.p7_1 = 1;
this.gix_1.fia();
return Unit_getInstance();
} else if (tmp === 1) {
throw this.r7_1;
}
} catch ($p) {
throw $p;
}
while (true);
};
UIText$slambda.prototype.lgt = function (it, completion) {
var i = new UIText$slambda(this.gix_1, completion);
i.hix_1 = it;
return i;
};
UIText$slambda.$metadata$ = classMeta('UIText$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
function UIText$slambda_0(this$0, resultContinuation) {
var i = new UIText$slambda(this$0, resultContinuation);
var l = function (it, $cont) {
return i.kgt(it, $cont);
};
l.$arity = 1;
return l;
}
function UIText$lambda$slambda($tmp0_onOver, $it, resultContinuation) {
this.qix_1 = $tmp0_onOver;
this.rix_1 = $it;
CoroutineImpl.call(this, resultContinuation);
}
UIText$lambda$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
UIText$lambda$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
UIText$lambda$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.qix_1(this.rix_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
UIText$lambda$slambda.prototype.k53 = function (completion) {
var i = new UIText$lambda$slambda(this.qix_1, this.rix_1, completion);
return i;
};
UIText$lambda$slambda.$metadata$ = classMeta('UIText$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function UIText$lambda$slambda_0($tmp0_onOver, $it, resultContinuation) {
var i = new UIText$lambda$slambda($tmp0_onOver, $it, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function UIText$lambda($tmp0_run, $tmp0_onOver) {
return function (it) {
var tmp = $tmp0_run.b1u();
launchImmediately_0(tmp, UIText$lambda$slambda_0($tmp0_onOver, it, null));
return Unit_getInstance();
};
}
function UIText$slambda_1(this$0, resultContinuation) {
this.aiy_1 = this$0;
CoroutineImpl.call(this, resultContinuation);
}
UIText$slambda_1.prototype.kgt = function (it, $cont) {
var tmp = this.lgt(it, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
UIText$slambda_1.prototype.w7 = function (p1, $cont) {
return this.kgt(p1 instanceof MouseEvents ? p1 : THROW_CCE(), $cont);
};
UIText$slambda_1.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
if (tmp === 0) {
this.p7_1 = 1;
this.aiy_1.aib();
return Unit_getInstance();
} else if (tmp === 1) {
throw this.r7_1;
}
} catch ($p) {
throw $p;
}
while (true);
};
UIText$slambda_1.prototype.lgt = function (it, completion) {
var i = new UIText$slambda_1(this.aiy_1, completion);
i.biy_1 = it;
return i;
};
UIText$slambda_1.$metadata$ = classMeta('UIText$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
function UIText$slambda_2(this$0, resultContinuation) {
var i = new UIText$slambda_1(this$0, resultContinuation);
var l = function (it, $cont) {
return i.kgt(it, $cont);
};
l.$arity = 1;
return l;
}
function UIText$lambda$slambda_1($tmp1_onOut, $it, resultContinuation) {
this.kiy_1 = $tmp1_onOut;
this.liy_1 = $it;
CoroutineImpl.call(this, resultContinuation);
}
UIText$lambda$slambda_1.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
UIText$lambda$slambda_1.prototype.to = function ($cont) {
return this.z56($cont);
};
UIText$lambda$slambda_1.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.kiy_1(this.liy_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
UIText$lambda$slambda_1.prototype.k53 = function (completion) {
var i = new UIText$lambda$slambda_1(this.kiy_1, this.liy_1, completion);
return i;
};
UIText$lambda$slambda_1.$metadata$ = classMeta('UIText$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function UIText$lambda$slambda_2($tmp1_onOut, $it, resultContinuation) {
var i = new UIText$lambda$slambda_1($tmp1_onOut, $it, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function UIText$lambda_0($tmp0_run, $tmp1_onOut) {
return function (it) {
var tmp = $tmp0_run.b1u();
launchImmediately_0(tmp, UIText$lambda$slambda_2($tmp1_onOut, it, null));
return Unit_getInstance();
};
}
function UIText$slambda_3(this$0, resultContinuation) {
this.uiy_1 = this$0;
CoroutineImpl.call(this, resultContinuation);
}
UIText$slambda_3.prototype.kgt = function (it, $cont) {
var tmp = this.lgt(it, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
UIText$slambda_3.prototype.w7 = function (p1, $cont) {
return this.kgt(p1 instanceof MouseEvents ? p1 : THROW_CCE(), $cont);
};
UIText$slambda_3.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
if (tmp === 0) {
this.p7_1 = 1;
this.uiy_1.ti9();
return Unit_getInstance();
} else if (tmp === 1) {
throw this.r7_1;
}
} catch ($p) {
throw $p;
}
while (true);
};
UIText$slambda_3.prototype.lgt = function (it, completion) {
var i = new UIText$slambda_3(this.uiy_1, completion);
i.viy_1 = it;
return i;
};
UIText$slambda_3.$metadata$ = classMeta('UIText$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
function UIText$slambda_4(this$0, resultContinuation) {
var i = new UIText$slambda_3(this$0, resultContinuation);
var l = function (it, $cont) {
return i.kgt(it, $cont);
};
l.$arity = 1;
return l;
}
function UIText$lambda$slambda_3($tmp2_onDown, $it, resultContinuation) {
this.eiz_1 = $tmp2_onDown;
this.fiz_1 = $it;
CoroutineImpl.call(this, resultContinuation);
}
UIText$lambda$slambda_3.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
UIText$lambda$slambda_3.prototype.to = function ($cont) {
return this.z56($cont);
};
UIText$lambda$slambda_3.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.eiz_1(this.fiz_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
UIText$lambda$slambda_3.prototype.k53 = function (completion) {
var i = new UIText$lambda$slambda_3(this.eiz_1, this.fiz_1, completion);
return i;
};
UIText$lambda$slambda_3.$metadata$ = classMeta('UIText$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function UIText$lambda$slambda_4($tmp2_onDown, $it, resultContinuation) {
var i = new UIText$lambda$slambda_3($tmp2_onDown, $it, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function UIText$lambda_1($tmp0_run, $tmp2_onDown) {
return function (it) {
var tmp = $tmp0_run.b1u();
launchImmediately_0(tmp, UIText$lambda$slambda_4($tmp2_onDown, it, null));
return Unit_getInstance();
};
}
function UIText$slambda_5(this$0, resultContinuation) {
this.oiz_1 = this$0;
CoroutineImpl.call(this, resultContinuation);
}
UIText$slambda_5.prototype.kgt = function (it, $cont) {
var tmp = this.lgt(it, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
UIText$slambda_5.prototype.w7 = function (p1, $cont) {
return this.kgt(p1 instanceof MouseEvents ? p1 : THROW_CCE(), $cont);
};
UIText$slambda_5.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
if (tmp === 0) {
this.p7_1 = 1;
this.oiz_1.ui9();
return Unit_getInstance();
} else if (tmp === 1) {
throw this.r7_1;
}
} catch ($p) {
throw $p;
}
while (true);
};
UIText$slambda_5.prototype.lgt = function (it, completion) {
var i = new UIText$slambda_5(this.oiz_1, completion);
i.piz_1 = it;
return i;
};
UIText$slambda_5.$metadata$ = classMeta('UIText$slambda', undefined, undefined, undefined, [1], CoroutineImpl.prototype);
function UIText$slambda_6(this$0, resultContinuation) {
var i = new UIText$slambda_5(this$0, resultContinuation);
var l = function (it, $cont) {
return i.kgt(it, $cont);
};
l.$arity = 1;
return l;
}
function UIText$lambda$slambda_5($tmp3_onUpAnywhere, $it, resultContinuation) {
this.yiz_1 = $tmp3_onUpAnywhere;
this.ziz_1 = $it;
CoroutineImpl.call(this, resultContinuation);
}
UIText$lambda$slambda_5.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
UIText$lambda$slambda_5.prototype.to = function ($cont) {
return this.z56($cont);
};
UIText$lambda$slambda_5.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.yiz_1(this.ziz_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
UIText$lambda$slambda_5.prototype.k53 = function (completion) {
var i = new UIText$lambda$slambda_5(this.yiz_1, this.ziz_1, completion);
return i;
};
UIText$lambda$slambda_5.$metadata$ = classMeta('UIText$lambda$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function UIText$lambda$slambda_6($tmp3_onUpAnywhere, $it, resultContinuation) {
var i = new UIText$lambda$slambda_5($tmp3_onUpAnywhere, $it, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function UIText$lambda_2($tmp0_run, $tmp3_onUpAnywhere) {
return function (it) {
var tmp = $tmp0_run.b1u();
launchImmediately_0(tmp, UIText$lambda$slambda_6($tmp3_onUpAnywhere, it, null));
return Unit_getInstance();
};
}
function UIText(text, width, height) {
UIView.call(this, width, height);
this.riw_1 = text;
var tmp = this;
var tmp$ret$0;
// Inline function 'com.soywiz.korge.ui.uiObservable' call
var tmp0_uiObservable = UIText$bover$delegate$lambda(this);
tmp$ret$0 = new UIObservable(false, tmp0_uiObservable);
tmp.siw_1 = tmp$ret$0;
var tmp_0 = this;
var tmp$ret$1;
// Inline function 'com.soywiz.korge.ui.uiObservable' call
var tmp0_uiObservable_0 = UIText$bpressing$delegate$lambda(this);
tmp$ret$1 = new UIObservable(false, tmp0_uiObservable_0);
tmp_0.tiw_1 = tmp$ret$1;
var tmp_1 = this;
var tmp$ret$5;
// Inline function 'com.soywiz.korge.view.solidRect' call
var tmp2_solidRect = Colors_getInstance().x7z_1;
var tmp$ret$4;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp1_addTo = new SolidRect(width, height, tmp2_solidRect);
var tmp$ret$3;
// Inline function 'kotlin.apply' call
var tmp0_apply = addTo(tmp1_addTo, this);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$2;
// Inline function 'com.soywiz.korge.view.solidRect.<anonymous>' call
tmp$ret$2 = Unit_getInstance();
tmp$ret$3 = tmp0_apply;
tmp$ret$4 = tmp$ret$3;
tmp$ret$5 = tmp$ret$4;
tmp_1.uiw_1 = tmp$ret$5;
var tmp_2 = this;
var tmp$ret$9;
// Inline function 'com.soywiz.korge.view.text' call
var tmp2_text = this.riw_1;
var tmp3_text = Companion_getInstance_55().lib_1;
var tmp4_text = Colors_getInstance().s7z_1;
var tmp5_text = get_DefaultTtfFont();
var tmp6_text = Companion_getInstance_22().i8s_1;
var tmp7_text = get_DefaultStringTextRenderer();
var tmp8_text = Companion_getInstance_55().mib_1;
var tmp$ret$8;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp1_addTo_0 = new Text(tmp2_text, tmp3_text, tmp4_text, tmp5_text, tmp6_text, tmp7_text, tmp8_text, null, null);
var tmp$ret$7;
// Inline function 'kotlin.apply' call
var tmp0_apply_0 = addTo(tmp1_addTo_0, this);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$6;
// Inline function 'com.soywiz.korge.view.text.<anonymous>' call
tmp$ret$6 = Unit_getInstance();
tmp$ret$7 = tmp0_apply_0;
tmp$ret$8 = tmp$ret$7;
tmp$ret$9 = tmp$ret$8;
tmp_2.viw_1 = tmp$ret$9;
this.wiw_1 = Colors_getInstance().x7z_1;
var tmp$ret$20;
// Inline function 'com.soywiz.korge.input.mouse' call
var tmp$ret$19;
// Inline function 'kotlin.run' call
var tmp0_run = get_mouse(this);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$18;
// Inline function 'com.soywiz.korge.ui.UIText.<anonymous>' call
var tmp$ret$11;
// Inline function 'com.soywiz.korge.input.MouseEvents.onOver' call
var tmp0_onOver = UIText$slambda_0(this, null);
var tmp$ret$10;
// Inline function 'com.soywiz.korge.input.MouseEvents._mouseEvent' call
var tmp0__mouseEvent = over$factory_1();
var tmp_3 = tmp0__mouseEvent.get(tmp0_run);
tmp_3.d54(UIText$lambda(tmp0_run, tmp0_onOver));
tmp$ret$10 = tmp0_run;
tmp$ret$11 = tmp$ret$10;
var tmp$ret$13;
// Inline function 'com.soywiz.korge.input.MouseEvents.onOut' call
var tmp1_onOut = UIText$slambda_2(this, null);
var tmp$ret$12;
// Inline function 'com.soywiz.korge.input.MouseEvents._mouseEvent' call
var tmp0__mouseEvent_0 = out$factory_1();
var tmp_4 = tmp0__mouseEvent_0.get(tmp0_run);
tmp_4.d54(UIText$lambda_0(tmp0_run, tmp1_onOut));
tmp$ret$12 = tmp0_run;
tmp$ret$13 = tmp$ret$12;
var tmp$ret$15;
// Inline function 'com.soywiz.korge.input.MouseEvents.onDown' call
var tmp2_onDown = UIText$slambda_4(this, null);
var tmp$ret$14;
// Inline function 'com.soywiz.korge.input.MouseEvents._mouseEvent' call
var tmp0__mouseEvent_1 = down$factory_2();
var tmp_5 = tmp0__mouseEvent_1.get(tmp0_run);
tmp_5.d54(UIText$lambda_1(tmp0_run, tmp2_onDown));
tmp$ret$14 = tmp0_run;
tmp$ret$15 = tmp$ret$14;
var tmp$ret$17;
// Inline function 'com.soywiz.korge.input.MouseEvents.onUpAnywhere' call
var tmp3_onUpAnywhere = UIText$slambda_6(this, null);
var tmp$ret$16;
// Inline function 'com.soywiz.korge.input.MouseEvents._mouseEvent' call
var tmp0__mouseEvent_2 = upAnywhere$factory_2();
var tmp_6 = tmp0__mouseEvent_2.get(tmp0_run);
tmp_6.d54(UIText$lambda_2(tmp0_run, tmp3_onUpAnywhere));
tmp$ret$16 = tmp0_run;
tmp$ret$17 = tmp$ret$16;
tmp$ret$18 = tmp$ret$17;
tmp$ret$19 = tmp$ret$18;
tmp$ret$20 = tmp$ret$19;
this.xiw_1 = Companion_getInstance_15().zp();
}
UIText.prototype.aj0 = function (_set____db54di) {
return this.siw_1.sii(this, bover$factory(), _set____db54di);
};
UIText.prototype.bj0 = function () {
return this.siw_1.rii(this, bover$factory_0());
};
UIText.prototype.cj0 = function (_set____db54di) {
return this.tiw_1.sii(this, bpressing$factory(), _set____db54di);
};
UIText.prototype.dj0 = function () {
return this.tiw_1.rii(this, bpressing$factory_0());
};
UIText.prototype.fia = function () {
this.aj0(true);
};
UIText.prototype.aib = function () {
this.aj0(false);
};
UIText.prototype.ti9 = function () {
this.cj0(true);
};
UIText.prototype.ui9 = function () {
this.cj0(false);
};
UIText.prototype.xhw = function (ctx) {
this.uiw_1.tch(!(_RGBA___get_a__impl__6msvu7(this.wiw_1) === 0));
this.uiw_1.x8j(this.wiw_1);
this.xiw_1.u72(0.0, 0.0, this.d72(), this.e72());
this.viw_1.ej0(get_textFont(this), numberToInt(get_textSize(this)), get_textColor(this), get_textAlignment(this));
this.viw_1.vih(this.xiw_1);
this.viw_1.gck(this.riw_1);
UIView.prototype.xhw.call(this, ctx);
};
UIText.prototype.whw = function () {
UIView.prototype.whw.call(this);
};
UIText.$metadata$ = classMeta('UIText', undefined, undefined, undefined, undefined, UIView.prototype);
function uiText(_this__u8e3s4, text, width, height, block) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = addTo(new UIText(text, width, height), _this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
block(tmp0_apply);
tmp$ret$0 = tmp0_apply;
return tmp$ret$0;
}
function over$factory_1() {
return getPropertyCallableRef('over', 1, KProperty1, function (receiver) {
return receiver.lgd_1;
}, null);
}
function out$factory_1() {
return getPropertyCallableRef('out', 1, KProperty1, function (receiver) {
return receiver.mgd_1;
}, null);
}
function down$factory_2() {
return getPropertyCallableRef('down', 1, KProperty1, function (receiver) {
return receiver.ngd_1;
}, null);
}
function upAnywhere$factory_2() {
return getPropertyCallableRef('upAnywhere', 1, KProperty1, function (receiver) {
return receiver.ugd_1;
}, null);
}
function bover$factory() {
return getPropertyCallableRef('bover', 1, KMutableProperty1, function (receiver) {
return receiver.bj0();
}, function (receiver, value) {
return receiver.aj0(value);
});
}
function bover$factory_0() {
return getPropertyCallableRef('bover', 1, KMutableProperty1, function (receiver) {
return receiver.bj0();
}, function (receiver, value) {
return receiver.aj0(value);
});
}
function bpressing$factory() {
return getPropertyCallableRef('bpressing', 1, KMutableProperty1, function (receiver) {
return receiver.dj0();
}, function (receiver, value) {
return receiver.cj0(value);
});
}
function bpressing$factory_0() {
return getPropertyCallableRef('bpressing', 1, KMutableProperty1, function (receiver) {
return receiver.dj0();
}, function (receiver, value) {
return receiver.cj0(value);
});
}
function registerUISupportOnce($this) {
if ($this.yhi_1)
return Unit_getInstance();
var tmp0_elvis_lhs = $this.pgs();
var tmp;
if (tmp0_elvis_lhs == null) {
return Unit_getInstance();
} else {
tmp = tmp0_elvis_lhs;
}
var stage = tmp;
$this.yhi_1 = true;
if (equals(getExtra(stage, 'uiSupport'), true))
return Unit_getInstance();
setExtra(stage, 'uiSupport', true);
var tmp$ret$2;
// Inline function 'com.soywiz.korge.input.keys' call
var tmp$ret$1;
// Inline function 'kotlin.run' call
var tmp0_run = get_keys_0(stage);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korge.ui.UIView.registerUISupportOnce.<anonymous>' call
tmp$ret$0 = Unit_getInstance();
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
var tmp$ret$7;
// Inline function 'com.soywiz.korge.baseview.BaseView.getOrCreateComponentUpdateWithViews' call
var tmp$ret$6;
// Inline function 'com.soywiz.korge.baseview.BaseView.getOrCreateComponentTyped' call
var tmp0_getOrCreateComponentTyped = Companion_getInstance_31();
var tmp0_safe_receiver = stage.gg8(tmp0_getOrCreateComponentTyped);
var tmp_0;
if (tmp0_safe_receiver == null) {
tmp_0 = null;
} else {
var tmp$ret$4;
$l$block: {
// Inline function 'kotlin.collections.firstOrNull' call
var tmp0_iterator = tmp0_safe_receiver.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l();
var tmp$ret$3;
// Inline function 'com.soywiz.korge.baseview.BaseView.getOrCreateComponentTyped.<anonymous>' call
tmp$ret$3 = element instanceof DummyUpdateComponentWithViews;
if (tmp$ret$3) {
tmp$ret$4 = element;
break $l$block;
}
}
tmp$ret$4 = null;
}
tmp_0 = tmp$ret$4;
}
var tmp_1 = tmp_0;
var tmp1_elvis_lhs = (tmp_1 == null ? true : tmp_1 instanceof DummyUpdateComponentWithViews) ? tmp_1 : null;
var tmp_2;
if (tmp1_elvis_lhs == null) {
var tmp$ret$5;
// Inline function 'com.soywiz.korge.ui.UIView.registerUISupportOnce.<anonymous>' call
tmp$ret$5 = new DummyUpdateComponentWithViews(stage);
var tmp_3 = stage.lg8(tmp$ret$5);
tmp_2 = tmp_3 instanceof DummyUpdateComponentWithViews ? tmp_3 : THROW_CCE();
} else {
tmp_2 = tmp1_elvis_lhs;
}
tmp$ret$6 = tmp_2;
tmp$ret$7 = tmp$ret$6;
}
function Companion_20() {
Companion_instance_20 = this;
}
Companion_20.prototype.bie = function (iconView, bmp, width, height, anchor_0) {
var iconScaleX = width / bmp.d72();
var iconScaleY = height / bmp.e72();
var tmp$ret$0;
// Inline function 'kotlin.math.min' call
tmp$ret$0 = Math.min(iconScaleX, iconScaleY);
var iconScale = tmp$ret$0;
iconView.pj2(bmp);
anchor(iconView, anchor_0);
position(iconView, width * anchor_0.a70_1, height * anchor_0.b70_1);
scale(iconView, iconScale, iconScale);
};
Companion_20.$metadata$ = objectMeta('Companion');
var Companion_instance_20;
function Companion_getInstance_52() {
if (Companion_instance_20 == null)
new Companion_20();
return Companion_instance_20;
}
function UIView$width$delegate$lambda(this$0) {
return function (it) {
this$0.rhw();
return Unit_getInstance();
};
}
function UIView$height$delegate$lambda(this$0) {
return function (it) {
this$0.rhw();
return Unit_getInstance();
};
}
function UIView(width, height) {
Companion_getInstance_52();
FixedSizeContainer_init_$Init$(width, height, false, 4, null, this);
var tmp = this;
var tmp$ret$0;
// Inline function 'com.soywiz.korge.ui.uiObservable' call
var tmp0_uiObservable = UIView$width$delegate$lambda(this);
tmp$ret$0 = new UIObservable(width, tmp0_uiObservable);
tmp.whi_1 = tmp$ret$0;
var tmp_0 = this;
var tmp$ret$1;
// Inline function 'com.soywiz.korge.ui.uiObservable' call
var tmp0_uiObservable_0 = UIView$height$delegate$lambda(this);
tmp$ret$1 = new UIObservable(height, tmp0_uiObservable_0);
tmp_0.xhi_1 = tmp$ret$1;
this.yhi_1 = false;
}
UIView.prototype.shw = function (property, value) {
get_uiSkinSure(this).shw(property, value);
this.dg8();
};
UIView.prototype.thw = function (property) {
var tmp0_safe_receiver = get_uiSkin(this);
var tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.thw(property);
var tmp1_elvis_lhs = (tmp == null ? true : isObject(tmp)) ? tmp : null;
return tmp1_elvis_lhs == null ? get_realUiSkin(this).thw(property) : tmp1_elvis_lhs;
};
UIView.prototype.cav = function (_set____db54di) {
return this.whi_1.sii(this, width$factory(), _set____db54di);
};
UIView.prototype.d72 = function () {
return this.whi_1.rii(this, width$factory_0());
};
UIView.prototype.p7c = function (_set____db54di) {
return this.xhi_1.sii(this, height$factory(), _set____db54di);
};
UIView.prototype.e72 = function () {
return this.xhi_1.rii(this, height$factory_0());
};
UIView.prototype.uhw = function (out) {
out.u72(0.0, 0.0, this.d72(), this.e72());
};
UIView.prototype.kcl = function () {
return this.lh1();
};
UIView.prototype.rhw = function () {
};
UIView.prototype.vhw = function () {
this.whw();
};
UIView.prototype.whw = function () {
this.baz();
};
UIView.prototype.xhw = function (ctx) {
registerUISupportOnce(this);
FixedSizeContainer.prototype.xhw.call(this, ctx);
};
UIView.$metadata$ = classMeta('UIView', [UISkinable], undefined, undefined, undefined, FixedSizeContainer.prototype);
function get_uiSkinSure(_this__u8e3s4) {
if (!hasExtra(_this__u8e3s4, 'uiSkin')) {
setExtra(_this__u8e3s4, 'uiSkin', UISkin_init_$Create$(null, null, null, 7, null));
}
return ensureNotNull(get_uiSkin(_this__u8e3s4));
}
function set_uiSkin(_this__u8e3s4, value) {
setExtra(_this__u8e3s4, 'uiSkin', value);
_this__u8e3s4.dg8();
}
function get_uiSkin(_this__u8e3s4) {
var tmp = getExtra(_this__u8e3s4, 'uiSkin');
return (tmp == null ? true : tmp instanceof UISkin) ? tmp : null;
}
function get_realUiSkin(_this__u8e3s4) {
var tmp1_elvis_lhs = get_uiSkin(_this__u8e3s4);
var tmp;
if (tmp1_elvis_lhs == null) {
var tmp0_safe_receiver = _this__u8e3s4.e5n();
tmp = tmp0_safe_receiver == null ? null : get_realUiSkin(tmp0_safe_receiver);
} else {
tmp = tmp1_elvis_lhs;
}
var tmp2_elvis_lhs = tmp;
return tmp2_elvis_lhs == null ? get__defaultUiSkin(_this__u8e3s4.a5k()) : tmp2_elvis_lhs;
}
function DummyUpdateComponentWithViews(view) {
this.qj2_1 = view;
}
DummyUpdateComponentWithViews.prototype.n2u = function () {
return this.qj2_1;
};
DummyUpdateComponentWithViews.prototype.cg8 = function (views, dt) {
};
DummyUpdateComponentWithViews.$metadata$ = classMeta('DummyUpdateComponentWithViews', [UpdateComponentWithViews]);
function get__defaultUiSkin(_this__u8e3s4) {
return extraCache(_this__u8e3s4, '_defaultUiSkin', _get__defaultUiSkin_$lambda_hjvqul);
}
function _get__defaultUiSkin_$lambda_hjvqul() {
var tmp$ret$2;
// Inline function 'com.soywiz.korge.ui.UISkin' call
var tmp$ret$1;
// Inline function 'kotlin.apply' call
var tmp0_apply = UISkin_init_$Create$('defaultUiSkin', null, null, 6, null);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korge.ui.<get-_defaultUiSkin>.<anonymous>.<anonymous>' call
tmp$ret$0 = Unit_getInstance();
tmp$ret$1 = tmp0_apply;
tmp$ret$2 = tmp$ret$1;
return tmp$ret$2;
}
function width$factory() {
return getPropertyCallableRef('width', 1, KMutableProperty1, function (receiver) {
return receiver.d72();
}, function (receiver, value) {
return receiver.cav(value);
});
}
function width$factory_0() {
return getPropertyCallableRef('width', 1, KMutableProperty1, function (receiver) {
return receiver.d72();
}, function (receiver, value) {
return receiver.cav(value);
});
}
function height$factory() {
return getPropertyCallableRef('height', 1, KMutableProperty1, function (receiver) {
return receiver.e72();
}, function (receiver, value) {
return receiver.p7c(value);
});
}
function height$factory_0() {
return getPropertyCallableRef('height', 1, KMutableProperty1, function (receiver) {
return receiver.e72();
}, function (receiver, value) {
return receiver.p7c(value);
});
}
function CancellableGroup() {
var tmp = this;
var tmp$ret$0;
// Inline function 'kotlin.collections.arrayListOf' call
tmp$ret$0 = ArrayList_init_$Create$_0();
tmp.hgh_1 = tmp$ret$0;
}
CancellableGroup.prototype.igh = function (c) {
var tmp0_this = this;
// Inline function 'kotlin.collections.plusAssign' call
var tmp0_plusAssign = tmp0_this.hgh_1;
tmp0_plusAssign.c(c);
};
CancellableGroup.prototype.rj2 = function (c) {
var tmp0_this = this;
// Inline function 'kotlin.collections.plusAssign' call
var tmp0_plusAssign = tmp0_this.hgh_1;
var tmp1_plusAssign = cancellable(c);
tmp0_plusAssign.c(tmp1_plusAssign);
};
CancellableGroup.prototype.x2c = function () {
this.r5y(CancellationException_init_$Create$());
};
CancellableGroup.prototype.r5y = function (e) {
cancel_0(this.hgh_1, e);
};
CancellableGroup.$metadata$ = classMeta('CancellableGroup', [CloseableCancellable]);
function anchor(_this__u8e3s4, anchor) {
return anchor_0(_this__u8e3s4, anchor.a70_1, anchor.b70_1);
}
function Anchorable() {
}
Anchorable.$metadata$ = interfaceMeta('Anchorable');
function anchor_0(_this__u8e3s4, ax, ay) {
_this__u8e3s4.sj2(ax);
_this__u8e3s4.uj2(ay);
return _this__u8e3s4;
}
function anchor_1(_this__u8e3s4, ax, ay) {
return anchor_0(_this__u8e3s4, ax, ay);
}
function BView() {
}
BView.$metadata$ = interfaceMeta('BView');
function _get_bitmapWidth__ndy7bu($this) {
return $this.y8x().d72();
}
function _get_bitmapHeight__5t1vx1($this) {
return $this.y8x().e72();
}
function _getLocalBoundsInternal($this, out, strokes) {
var bounds = boundsUnsafe($this, strokes);
out.u72(bounds.v71_1 - $this.bi0(), bounds.w71_1 - $this.ci0(), bounds.x71_1, bounds.y71_1);
return out;
}
function _getLocalBoundsInternal$default($this, out, strokes, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
out = $this.tj5_1;
if (!(($mask0 & 4) === 0))
strokes = $this.uj5_1;
return _getLocalBoundsInternal($this, out, strokes);
}
function boundsUnsafe($this, strokes) {
if ($this.oj5_1) {
$this.oj5_1 = false;
$this.pj5_1.d2p();
$this.xj5($this.pj5_1, false);
$this.pj5_1.a72($this.wj5_1);
$this.pj5_1.d2p();
$this.xj5($this.pj5_1, true);
$this.pj5_1.a72($this.vj5_1);
}
return strokes ? $this.vj5_1 : $this.wj5_1;
}
function BaseGraphics(autoScaling) {
var tmp$ret$0;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.transparent' call
var tmp0__get_transparent__6k58e1 = Bitmaps_getInstance();
tmp$ret$0 = get_Bitmaps_transparent();
var tmp = tmp$ret$0;
BaseImage_init_$Init$(tmp, 0.0, 0.0, null, false, 30, null, this);
this.gj5_1 = autoScaling;
this.hj5_1 = true;
this.ij5_1 = false;
this.jj5_1 = false;
var tmp_0 = this;
var tmp$ret$1;
// Inline function 'kotlin.collections.arrayListOf' call
tmp$ret$1 = ArrayList_init_$Create$_0();
tmp_0.kj5_1 = tmp$ret$1;
this.lj5_1 = new InternalViewAutoscaling();
this.mj5_1 = 1;
this.nj5_1 = true;
this.oj5_1 = true;
this.pj5_1 = new BoundsBuilder();
this.qj5_1 = 1.0;
this.rj5_1 = 1.0;
this.sj5_1 = true;
this.tj5_1 = Companion_getInstance_15().zp();
this.uj5_1 = true;
this.vj5_1 = Companion_getInstance_15().zp();
this.wj5_1 = Companion_getInstance_15().zp();
}
BaseGraphics.prototype.yj5 = function (value) {
this.hj5_1 = value;
this.zj5();
};
BaseGraphics.prototype.aj6 = function () {
return this.kj5_1;
};
BaseGraphics.prototype.bj6 = function (_set____db54di) {
this.oj5_1 = _set____db54di;
};
BaseGraphics.prototype.zj5 = function () {
this.nj5_1 = true;
this.oj5_1 = true;
};
BaseGraphics.prototype.xhw = function (ctx) {
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = this.kj5_1;
var n = 0;
while (n < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korge.view.BaseGraphics.renderInternal.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.m(tmp0);
var tmp$ret$0;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.transparent' call
var tmp0__get_transparent__6k58e1 = Bitmaps_getInstance();
tmp$ret$0 = get_Bitmaps_transparent();
if (!equals(tmp1__anonymous__uwfjfc, tmp$ret$0.y7x_1)) {
ctx.yg9_1.lh6(tmp1__anonymous__uwfjfc, 'BaseGraphics');
}
}
this.kj5_1.x7();
if (this.cj6()) {
}
BaseImage.prototype.xhw.call(this, ctx);
};
BaseGraphics.prototype.cj6 = function () {
if (this.lj5_1.jj6(this.gj5_1, this.ij5_1, this.pgw())) {
this.nj5_1 = true;
}
if (!this.nj5_1)
return false;
this.nj5_1 = false;
var boundsWithShapes = boundsUnsafe(this, true);
var tmp$ret$1;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korge.view.BaseGraphics.redrawIfRequired.<anonymous>' call
tmp$ret$0 = this.kj5_1.c(this.y8x().x8b());
tmp$ret$1 = tmp$ret$0;
var tmp$ret$4;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
var imageWidth = coerceAtLeast_0(toIntCeil(boundsWithShapes.x71_1 * this.lj5_1.fj6_1), 1);
var imageHeight = coerceAtLeast_0(toIntCeil(boundsWithShapes.y71_1 * this.lj5_1.gj6_1), 1);
var image = NativeImageOrBitmap32(imageWidth + this.mj5_1 | 0, imageHeight + this.mj5_1 | 0, this.hj5_1, true);
this.qj5_1 = this.lj5_1.fj6_1;
this.rj5_1 = this.lj5_1.gj6_1;
var tmp$ret$3;
// Inline function 'com.soywiz.korim.bitmap.context2d' call
var tmp$ret$2;
$l$block: {
// Inline function 'com.soywiz.korim.bitmap.Bitmap.lock' call
{
image.j7z();
}
try {
// Inline function 'com.soywiz.korim.bitmap.context2d.<anonymous>' call
var ctx = image.b86(true);
try {
// Inline function 'com.soywiz.korge.view.BaseGraphics.redrawIfRequired.<anonymous>.<anonymous>' call
ctx.x9k(this.qj5_1, this.rj5_1);
ctx.o8w(-boundsWithShapes.v71_1, -boundsWithShapes.w71_1);
this.kj6(ctx);
}finally {
ctx.s1x();
}
}finally {
tmp$ret$2 = image.k7z(null);
break $l$block;
}
}
tmp$ret$3 = image;
this.pj2(slice$default(image, null, null, null, 7, null));
tmp$ret$4 = Unit_getInstance();
return true;
};
BaseGraphics.prototype.lj6 = function () {
return this.qj5_1;
};
BaseGraphics.prototype.mj6 = function () {
return this.rj5_1;
};
BaseGraphics.prototype.nj6 = function () {
return _get_bitmapWidth__ndy7bu(this) / this.qj5_1;
};
BaseGraphics.prototype.oj6 = function () {
return _get_bitmapHeight__5t1vx1(this) / this.rj5_1;
};
BaseGraphics.prototype.y8b = function () {
return this.nj6();
};
BaseGraphics.prototype.z8b = function () {
return this.oj6();
};
BaseGraphics.prototype.bi0 = function () {
return this.tj2() * this.nj6();
};
BaseGraphics.prototype.ci0 = function () {
return this.vj2() * this.oj6();
};
BaseGraphics.prototype.xj8 = function () {
return _getLocalBoundsInternal$default(this, null, this.sj5_1, 2, null).v71_1;
};
BaseGraphics.prototype.yj8 = function () {
return _getLocalBoundsInternal$default(this, null, this.sj5_1, 2, null).w71_1;
};
BaseGraphics.prototype.uhw = function (out) {
_getLocalBoundsInternal$default(this, out, false, 4, null);
};
BaseGraphics.$metadata$ = classMeta('BaseGraphics', undefined, undefined, undefined, undefined, BaseImage.prototype);
function BlendMode_init_$Init$(factors, nonPremultipliedFactors, name, $mask0, $marker, $this) {
if (!(($mask0 & 2) === 0))
nonPremultipliedFactors = factors;
if (!(($mask0 & 4) === 0))
name = null;
BlendMode.call($this, factors, nonPremultipliedFactors, name);
return $this;
}
function BlendMode_init_$Create$(factors, nonPremultipliedFactors, name, $mask0, $marker) {
return BlendMode_init_$Init$(factors, nonPremultipliedFactors, name, $mask0, $marker, Object.create(BlendMode.prototype));
}
function Companion_21() {
Companion_instance_21 = this;
var tmp = this;
var tmp0_factors = Companion_getInstance_23().far_1;
var tmp1_nonPremultipliedFactors = Companion_getInstance_23().ear_1;
tmp.og8_1 = new BlendMode(tmp0_factors, tmp1_nonPremultipliedFactors, 'NORMAL');
var tmp_0 = this;
tmp_0.pg8_1 = this.og8_1.gj9(null, null, 'INHERIT', 3, null);
var tmp_1 = this;
var tmp_2 = BlendFactor_ONE_getInstance();
var tmp_3 = BlendFactor_ZERO_getInstance();
var tmp0_factors_0 = Blending_init_$Create$(tmp_2, tmp_3, null, 4, null);
tmp_1.qg8_1 = BlendMode_init_$Create$(tmp0_factors_0, null, 'NONE', 2, null);
var tmp_4 = this;
var tmp0_factors_1 = Companion_getInstance_23().har_1;
var tmp1_nonPremultipliedFactors_0 = Companion_getInstance_23().gar_1;
tmp_4.rg8_1 = new BlendMode(tmp0_factors_1, tmp1_nonPremultipliedFactors_0, 'ADD');
var tmp_5 = this;
var tmp_6 = BlendFactor_DESTINATION_COLOR_getInstance();
var tmp_7 = BlendFactor_ONE_MINUS_SOURCE_ALPHA_getInstance();
var tmp0_factors_2 = Blending_init_$Create$(tmp_6, tmp_7, null, 4, null);
tmp_5.sg8_1 = BlendMode_init_$Create$(tmp0_factors_2, null, 'MULTIPLY', 2, null);
var tmp_8 = this;
var tmp_9 = BlendFactor_ONE_getInstance();
var tmp_10 = BlendFactor_ONE_MINUS_SOURCE_COLOR_getInstance();
var tmp0_factors_3 = Blending_init_$Create$(tmp_9, tmp_10, null, 4, null);
tmp_8.tg8_1 = BlendMode_init_$Create$(tmp0_factors_3, null, 'SCREEN', 2, null);
var tmp_11 = this;
var tmp_12 = BlendFactor_ZERO_getInstance();
var tmp_13 = BlendFactor_ONE_MINUS_SOURCE_ALPHA_getInstance();
var tmp0_factors_4 = Blending_init_$Create$(tmp_12, tmp_13, null, 4, null);
tmp_11.ug8_1 = BlendMode_init_$Create$(tmp0_factors_4, null, 'ERASE', 2, null);
var tmp_14 = this;
var tmp_15 = BlendFactor_ZERO_getInstance();
var tmp_16 = BlendFactor_SOURCE_ALPHA_getInstance();
var tmp0_factors_5 = Blending_init_$Create$(tmp_15, tmp_16, null, 4, null);
tmp_14.vg8_1 = BlendMode_init_$Create$(tmp0_factors_5, null, 'MASK', 2, null);
var tmp_17 = this;
var tmp_18 = BlendFactor_ONE_MINUS_DESTINATION_ALPHA_getInstance();
var tmp_19 = BlendFactor_DESTINATION_ALPHA_getInstance();
var tmp0_factors_6 = Blending_init_$Create$(tmp_18, tmp_19, null, 4, null);
tmp_17.wg8_1 = BlendMode_init_$Create$(tmp0_factors_6, null, 'BELOW', 2, null);
var tmp_20 = this;
var tmp_21 = BlendFactor_SOURCE_ALPHA_getInstance();
var tmp_22 = BlendFactor_DESTINATION_ALPHA_getInstance();
var tmp_23 = BlendFactor_ONE_getInstance();
var tmp_24 = BlendFactor_ONE_getInstance();
var tmp_25 = BlendEquation_REVERSE_SUBTRACT_getInstance();
var tmp0_factors_7 = Blending_init_$Create$_0(tmp_21, tmp_22, tmp_23, tmp_24, tmp_25, null, 32, null);
tmp_20.xg8_1 = BlendMode_init_$Create$(tmp0_factors_7, null, 'SUBTRACT', 2, null);
var tmp_26 = this;
var tmp_27 = BlendFactor_ONE_MINUS_DESTINATION_COLOR_getInstance();
var tmp_28 = BlendFactor_ZERO_getInstance();
var tmp0_factors_8 = Blending_init_$Create$(tmp_27, tmp_28, null, 4, null);
tmp_26.yg8_1 = BlendMode_init_$Create$(tmp0_factors_8, null, 'INVERT', 2, null);
var tmp_29 = this;
var tmp_30 = BlendFactor_SOURCE_ALPHA_getInstance();
var tmp_31 = BlendFactor_DESTINATION_ALPHA_getInstance();
var tmp_32 = BlendFactor_ONE_getInstance();
var tmp_33 = BlendFactor_ONE_getInstance();
var tmp0_factors_9 = Blending_init_$Create$_0(tmp_30, tmp_31, tmp_32, tmp_33, null, null, 48, null);
tmp_29.zg8_1 = BlendMode_init_$Create$(tmp0_factors_9, null, 'LIGHTEN', 2, null);
var tmp_34 = this;
var tmp_35 = BlendFactor_SOURCE_ALPHA_getInstance();
var tmp_36 = BlendFactor_DESTINATION_ALPHA_getInstance();
var tmp_37 = BlendFactor_ONE_getInstance();
var tmp_38 = BlendFactor_ONE_getInstance();
var tmp0_factors_10 = Blending_init_$Create$_0(tmp_35, tmp_36, tmp_37, tmp_38, null, null, 48, null);
tmp_34.ag9_1 = BlendMode_init_$Create$(tmp0_factors_10, null, 'DARKEN', 2, null);
var tmp_39 = this;
var tmp_40 = BlendFactor_SOURCE_ALPHA_getInstance();
var tmp_41 = BlendFactor_DESTINATION_ALPHA_getInstance();
var tmp_42 = BlendFactor_ONE_getInstance();
var tmp_43 = BlendFactor_ONE_getInstance();
var tmp0_factors_11 = Blending_init_$Create$_0(tmp_40, tmp_41, tmp_42, tmp_43, null, null, 48, null);
tmp_39.bg9_1 = BlendMode_init_$Create$(tmp0_factors_11, null, 'DIFFERENCE', 2, null);
var tmp_44 = this;
var tmp_45 = BlendFactor_SOURCE_ALPHA_getInstance();
var tmp_46 = BlendFactor_DESTINATION_ALPHA_getInstance();
var tmp_47 = BlendFactor_ONE_getInstance();
var tmp_48 = BlendFactor_ONE_getInstance();
var tmp0_factors_12 = Blending_init_$Create$_0(tmp_45, tmp_46, tmp_47, tmp_48, null, null, 48, null);
tmp_44.cg9_1 = BlendMode_init_$Create$(tmp0_factors_12, null, 'ALPHA', 2, null);
var tmp_49 = this;
var tmp_50 = BlendFactor_SOURCE_ALPHA_getInstance();
var tmp_51 = BlendFactor_DESTINATION_ALPHA_getInstance();
var tmp_52 = BlendFactor_ONE_getInstance();
var tmp_53 = BlendFactor_ONE_getInstance();
var tmp0_factors_13 = Blending_init_$Create$_0(tmp_50, tmp_51, tmp_52, tmp_53, null, null, 48, null);
tmp_49.dg9_1 = BlendMode_init_$Create$(tmp0_factors_13, null, 'HARDLIGHT', 2, null);
var tmp_54 = this;
var tmp$ret$2;
// Inline function 'kotlin.arrayOf' call
var tmp0_arrayOf = [this.pg8_1, this.qg8_1, this.og8_1, this.rg8_1, this.sg8_1, this.tg8_1, this.ug8_1, this.vg8_1, this.wg8_1, this.xg8_1, this.yg8_1, this.zg8_1, this.ag9_1, this.bg9_1, this.cg9_1, this.dg9_1];
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_arrayOf;
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
tmp_54.eg9_1 = tmp$ret$2;
var tmp_55 = this;
var tmp$ret$5;
// Inline function 'kotlin.collections.associateBy' call
var tmp0_associateBy = this.eg9_1;
var capacity = coerceAtLeast_0(mapCapacity(tmp0_associateBy.length), 16);
var tmp$ret$4;
// Inline function 'kotlin.collections.associateByTo' call
var tmp0_associateByTo = LinkedHashMap_init_$Create$_0(capacity);
var indexedObject = tmp0_associateBy;
var inductionVariable = 0;
var last = indexedObject.length;
while (inductionVariable < last) {
var element = indexedObject[inductionVariable];
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$3;
// Inline function 'com.soywiz.korge.view.Companion.BY_NAME.<anonymous>' call
tmp$ret$3 = ensureNotNull(element.eh9_1);
tmp0_associateByTo.a(tmp$ret$3, element);
}
tmp$ret$4 = tmp0_associateByTo;
tmp$ret$5 = tmp$ret$4;
tmp_55.fg9_1 = tmp$ret$5;
this.gg9_1 = toList_0(this.eg9_1);
var tmp_56 = this;
var tmp$ret$8;
// Inline function 'kotlin.collections.associateBy' call
var tmp0_associateBy_0 = get_indices(this.eg9_1);
var capacity_0 = coerceAtLeast_0(mapCapacity(collectionSizeOrDefault(tmp0_associateBy_0, 10)), 16);
var tmp$ret$7;
// Inline function 'kotlin.collections.associateByTo' call
var tmp0_associateByTo_0 = LinkedHashMap_init_$Create$_0(capacity_0);
var inductionVariable_0 = tmp0_associateBy_0.r1_1;
var last_0 = tmp0_associateBy_0.s1_1;
if (inductionVariable_0 <= last_0)
do {
var element_0 = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var tmp$ret$6;
// Inline function 'com.soywiz.korge.view.Companion.TO_ORDINAL.<anonymous>' call
tmp$ret$6 = Companion_getInstance_53().eg9_1[element_0];
tmp0_associateByTo_0.a(tmp$ret$6, element_0);
}
while (!(element_0 === last_0));
tmp$ret$7 = tmp0_associateByTo_0;
tmp$ret$8 = tmp$ret$7;
tmp_56.hg9_1 = tmp$ret$8;
}
Companion_21.prototype.hj9 = function () {
return this.og8_1;
};
Companion_21.prototype.ij9 = function () {
return this.yg8_1;
};
Companion_21.prototype.jj9 = function () {
return this.eg9_1;
};
Companion_21.$metadata$ = objectMeta('Companion');
var Companion_instance_21;
function Companion_getInstance_53() {
if (Companion_instance_21 == null)
new Companion_21();
return Companion_instance_21;
}
function BlendMode(factors, nonPremultipliedFactors, name) {
Companion_getInstance_53();
this.ch9_1 = factors;
this.dh9_1 = nonPremultipliedFactors;
this.eh9_1 = name;
var tmp = this;
var tmp_0 = this.ch9_1.hashCode() + imul(this.dh9_1.hashCode(), 7) | 0;
var tmp$ret$0;
// Inline function 'kotlin.hashCode' call
var tmp0_hashCode = this.eh9_1;
var tmp0_safe_receiver = tmp0_hashCode;
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hashCode(tmp0_safe_receiver);
tmp$ret$0 = tmp1_elvis_lhs == null ? 0 : tmp1_elvis_lhs;
tmp.fh9_1 = tmp_0 + imul(tmp$ret$0, 17) | 0;
}
BlendMode.prototype.kj9 = function () {
return this.ch9_1;
};
BlendMode.prototype.t2 = function () {
return this.eh9_1;
};
BlendMode.prototype.hashCode = function () {
return this.fh9_1;
};
BlendMode.prototype.equals = function (other) {
var tmp;
if (this === other) {
tmp = true;
} else {
var tmp_0;
var tmp_1;
var tmp_2;
if (other instanceof BlendMode) {
tmp_2 = this.ch9_1.equals(other.ch9_1);
} else {
tmp_2 = false;
}
if (tmp_2) {
tmp_1 = this.dh9_1.equals(other.dh9_1);
} else {
tmp_1 = false;
}
if (tmp_1) {
tmp_0 = this.eh9_1 == other.eh9_1;
} else {
tmp_0 = false;
}
tmp = tmp_0;
}
return tmp;
};
BlendMode.prototype.toString = function () {
var tmp0_elvis_lhs = this.eh9_1;
return tmp0_elvis_lhs == null ? anyToString(this) : tmp0_elvis_lhs;
};
BlendMode.prototype.gh9 = function (premultiplied) {
return premultiplied ? this.ch9_1 : this.dh9_1;
};
BlendMode.prototype.lj9 = function (factors, nonPremultipliedFactors, name) {
return new BlendMode(factors, nonPremultipliedFactors, name);
};
BlendMode.prototype.gj9 = function (factors, nonPremultipliedFactors, name, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
factors = this.ch9_1;
if (!(($mask0 & 2) === 0))
nonPremultipliedFactors = this.dh9_1;
if (!(($mask0 & 4) === 0))
name = this.eh9_1;
return this.lj9(factors, nonPremultipliedFactors, name);
};
BlendMode.$metadata$ = classMeta('BlendMode');
function ClipContainer(width, height) {
FixedSizeContainer.call(this, width, height, true);
}
ClipContainer.$metadata$ = classMeta('ClipContainer', undefined, undefined, undefined, undefined, FixedSizeContainer.prototype);
function clipContainer(_this__u8e3s4, width, height, callback) {
var tmp$ret$1;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp1_addTo = new ClipContainer(width, height);
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = addTo(tmp1_addTo, _this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
callback(tmp0_apply);
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0;
return tmp$ret$1;
}
function ZIndexComparator() {
ZIndexComparator_instance = this;
}
ZIndexComparator.prototype.mj9 = function (a, b) {
return compareTo(a.ki0(), b.ki0());
};
ZIndexComparator.prototype.compare = function (a, b) {
var tmp = a instanceof View ? a : THROW_CCE();
return this.mj9(tmp, b instanceof View ? b : THROW_CCE());
};
ZIndexComparator.$metadata$ = objectMeta('ZIndexComparator', [Comparator]);
var ZIndexComparator_instance;
function ZIndexComparator_getInstance() {
if (ZIndexComparator_instance == null)
new ZIndexComparator();
return ZIndexComparator_instance;
}
function Container() {
View.call(this, true);
this.ahl_1 = FastArrayList_init_$Create$();
this.bhl_1 = new ContainerCollection(this, this.ahl_1);
var tmp = this;
tmp.chl_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
this.dhl_1 = new BoundsBuilder();
this.ehl_1 = Companion_getInstance_15().zp();
this.fhl_1 = false;
this.ghl_1 = false;
this.hhl_1 = FastArrayList_init_$Create$();
}
Container.prototype.q1v = function () {
return this.bhl_1;
};
Container.prototype.lhz = function () {
return this.ahl_1;
};
Container.prototype.mhz = function (block) {
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = this.bhl_1;
var n = 0;
while (n < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korge.view.Container.fastForEachChild.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.m(tmp0);
block(tmp1__anonymous__uwfjfc);
}
};
Container.prototype.baz = function () {
View.prototype.baz.call(this);
// Inline function 'com.soywiz.korge.view.Container.fastForEachChild' call
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = this.bhl_1;
var n = 0;
while (n < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korge.view.Container.fastForEachChild.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.m(tmp0);
// Inline function 'com.soywiz.korge.view.Container.invalidate.<anonymous>' call
if (tmp1__anonymous__uwfjfc.vgg_1) {
tmp1__anonymous__uwfjfc.baz();
}
}
};
Container.prototype.nhz = function () {
View.prototype.nhz.call(this);
// Inline function 'com.soywiz.korge.view.Container.fastForEachChild' call
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = this.bhl_1;
var n = 0;
while (n < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korge.view.Container.fastForEachChild.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.m(tmp0);
// Inline function 'com.soywiz.korge.view.Container.invalidateColorTransform.<anonymous>' call
if (tmp1__anonymous__uwfjfc.wgg_1) {
tmp1__anonymous__uwfjfc.nhz();
}
}
};
Container.prototype.pcl = function () {
return this.ahl_1.i();
};
Container.prototype.ohz = function (view) {
};
Container.prototype.tcl = function (index) {
return this.ahl_1.m(index);
};
Container.prototype.phz = function (index) {
return getOrNull_0(this.ahl_1, index);
};
Container.prototype.qhz = function (index) {
return this.ai0(this.phz(index));
};
Container.prototype.rhz = function () {
// Inline function 'com.soywiz.korge.view.Container.fastForEachChild' call
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = this.bhl_1;
var n = 0;
while (n < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korge.view.Container.fastForEachChild.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.m(tmp0);
// Inline function 'com.soywiz.korge.view.Container.removeChildren.<anonymous>' call
tmp1__anonymous__uwfjfc.hi0(null);
tmp1__anonymous__uwfjfc.scb(-1);
}
this.ahl_1.x7();
this.xhz();
};
Container.prototype.shz = function (view) {
return this.zhz(view, this.pcl());
};
Container.prototype.ihl = function (view) {
this.zhz(view, this.pcl());
};
Container.prototype.m = function (index) {
return this.tcl(index);
};
Container.prototype.xhw = function (ctx) {
if (!this.pck())
return Unit_getInstance();
this.thz(ctx);
};
Container.prototype.thz = function (ctx) {
// Inline function 'com.soywiz.korge.view.Container.fastForEachChildRender' call
if (!this.fhl_1) {
this.fhl_1 = true;
this.hhl_1.x7();
this.hhl_1.o(this.bhl_1);
if (this.vhz())
this.ghl_1 = false;
}
if (!this.ghl_1) {
this.ghl_1 = true;
sortWith(this.hhl_1, ZIndexComparator_getInstance());
}
// Inline function 'com.soywiz.kds.FastArrayList.fastForEach' call
var tmp0_fastForEach = this.hhl_1;
var array = tmp0_fastForEach.b4r_1;
var n = 0;
while (n < array.length) {
// Inline function 'com.soywiz.korge.view.Container.fastForEachChildRender.<anonymous>' call
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp0_unsafeCast = array[tmp0];
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_unsafeCast;
tmp$ret$1 = tmp$ret$0;
var tmp1__anonymous__uwfjfc = tmp$ret$1;
// Inline function 'com.soywiz.korge.view.Container.renderChildrenInternal.<anonymous>' call
tmp1__anonymous__uwfjfc.oi1(ctx);
}
};
Container.prototype.uhz = function (ctx) {
// Inline function 'com.soywiz.korge.view.Container.fastForEachChildRender' call
if (!this.fhl_1) {
this.fhl_1 = true;
this.hhl_1.x7();
this.hhl_1.o(this.bhl_1);
if (this.vhz())
this.ghl_1 = false;
}
if (!this.ghl_1) {
this.ghl_1 = true;
sortWith(this.hhl_1, ZIndexComparator_getInstance());
}
// Inline function 'com.soywiz.kds.FastArrayList.fastForEach' call
var tmp0_fastForEach = this.hhl_1;
var array = tmp0_fastForEach.b4r_1;
var n = 0;
while (n < array.length) {
// Inline function 'com.soywiz.korge.view.Container.fastForEachChildRender.<anonymous>' call
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp0_unsafeCast = array[tmp0];
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_unsafeCast;
tmp$ret$1 = tmp$ret$0;
var tmp1__anonymous__uwfjfc = tmp$ret$1;
// Inline function 'com.soywiz.korge.view.Container.renderDebug.<anonymous>' call
tmp1__anonymous__uwfjfc.uhz(ctx);
}
View.prototype.uhz.call(this, ctx);
};
Container.prototype.uhw = function (out) {
this.dhl_1.d2p();
// Inline function 'com.soywiz.korge.view.Container.fastForEachChild' call
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = this.bhl_1;
var n = 0;
while (n < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korge.view.Container.fastForEachChild.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.m(tmp0);
// Inline function 'com.soywiz.korge.view.Container.getLocalBoundsInternal.<anonymous>' call
tmp1__anonymous__uwfjfc.si2(this, this.ehl_1, false, false, false, 28, null);
var tmp$ret$2;
// Inline function 'com.soywiz.korma.geom.BoundsBuilder.add' call
var tmp0_add = this.dhl_1;
var tmp1_add = this.ehl_1;
var tmp0_safe_receiver = tmp1_add;
if (tmp0_safe_receiver == null)
null;
else {
var tmp$ret$1;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korma.geom.BoundsBuilder.add.<anonymous>' call
tmp$ret$0 = tmp0_add.s71(tmp1_add);
tmp$ret$1 = tmp$ret$0;
}
tmp$ret$2 = tmp0_add;
}
this.dhl_1.a72(out);
};
Container.prototype.vhz = function () {
// Inline function 'com.soywiz.kds.FastArrayList.fastForEach' call
var tmp0_fastForEach = this.ahl_1;
var array = tmp0_fastForEach.b4r_1;
var n = 0;
while (n < array.length) {
// Inline function 'com.soywiz.korge.view.Container.shouldSortChildren.<anonymous>' call
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp0_unsafeCast = array[tmp0];
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_unsafeCast;
tmp$ret$1 = tmp$ret$0;
var tmp1__anonymous__uwfjfc = tmp$ret$1;
if (!(tmp1__anonymous__uwfjfc.ki0() === 0.0)) {
return true;
}
}
return false;
};
Container.prototype.whz = function (block) {
if (!this.fhl_1) {
this.fhl_1 = true;
this.hhl_1.x7();
this.hhl_1.o(this.bhl_1);
if (this.vhz())
this.ghl_1 = false;
}
if (!this.ghl_1) {
this.ghl_1 = true;
sortWith(this.hhl_1, ZIndexComparator_getInstance());
}
// Inline function 'com.soywiz.kds.FastArrayList.fastForEach' call
var tmp0_fastForEach = this.hhl_1;
var array = tmp0_fastForEach.b4r_1;
var n = 0;
while (n < array.length) {
// Inline function 'com.soywiz.korge.view.Container.fastForEachChildRender.<anonymous>' call
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp0_unsafeCast = array[tmp0];
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_unsafeCast;
tmp$ret$1 = tmp$ret$0;
var tmp1__anonymous__uwfjfc = tmp$ret$1;
block(tmp1__anonymous__uwfjfc);
}
};
Container.prototype.xhz = function () {
this.fhl_1 = false;
this.yhz();
};
Container.prototype.yhz = function () {
var tmp0_safe_receiver = this.pgs();
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hgs_1;
if (tmp1_safe_receiver == null)
null;
else {
tmp1_safe_receiver.nj9(this);
}
};
Container.prototype.zhz = function (view, index) {
var tmp0_safe_receiver = view.e5n();
if (tmp0_safe_receiver == null)
null;
else {
tmp0_safe_receiver.xhz();
}
view.fi2();
var aindex = clamp(index, 0, this.pcl());
view.scb(aindex);
var children = this.ahl_1;
children.tg(aindex, view);
var inductionVariable = aindex + 1 | 0;
var last = children.i();
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
children.m(n).scb(n);
}
while (inductionVariable < last);
view.hi0(this);
view.baz();
this.ohz(view);
this.xhz();
this.yhz();
this.eg8(view, true);
};
Container.prototype.ai0 = function (view) {
var tmp0_safe_receiver = view;
if (!((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e5n()) === this))
return false;
var inductionVariable = view.m4() + 1 | 0;
var last = this.pcl();
if (inductionVariable < last)
do {
var i = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tmp2_this = this.ahl_1.m(i);
var tmp3 = tmp2_this.m4();
tmp2_this.scb(tmp3 - 1 | 0);
}
while (inductionVariable < last);
this.ahl_1.z4(view.m4());
view.hi0(null);
view.scb(-1);
this.xhz();
this.eg8(view, false);
this.yhz();
return true;
};
Container.prototype.kg8 = function (type, out, results) {
// Inline function 'com.soywiz.korge.view.Container.fastForEachChild' call
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp0_fastForEach = this.bhl_1;
var n = 0;
while (n < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korge.view.Container.fastForEachChild.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.m(tmp0);
// Inline function 'com.soywiz.korge.view.Container.getComponentOfTypeRecursiveChildren.<anonymous>' call
var childEventListenerCount = tmp1__anonymous__uwfjfc.fg8(type);
if (childEventListenerCount > 0) {
tmp1__anonymous__uwfjfc.ig8(type, out, results);
}
}
};
Container.$metadata$ = classMeta('Container', undefined, undefined, undefined, undefined, View.prototype);
function container(_this__u8e3s4, callback) {
var tmp$ret$1;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp1_addTo = new Container();
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = addTo(tmp1_addTo, _this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
callback(tmp0_apply);
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0;
return tmp$ret$1;
}
function addTo(_this__u8e3s4, parent) {
parent.ihl(_this__u8e3s4);
return _this__u8e3s4;
}
function ContainerCollection$iterator$1(this$0) {
this.pj9_1 = this$0;
this.oj9_1 = 0;
}
ContainerCollection$iterator$1.prototype.k = function () {
return this.oj9_1 < this.pj9_1.qj9_1.pcl();
};
ContainerCollection$iterator$1.prototype.l = function () {
var tmp0_this = this;
var tmp1 = tmp0_this.oj9_1;
tmp0_this.oj9_1 = tmp1 + 1 | 0;
return this.pj9_1.qj9_1.tcl(tmp1);
};
ContainerCollection$iterator$1.prototype.b5 = function () {
var tmp0_this = this;
tmp0_this.oj9_1 = tmp0_this.oj9_1 - 1 | 0;
this.pj9_1.qj9_1.qhz(tmp0_this.oj9_1);
};
ContainerCollection$iterator$1.$metadata$ = classMeta(undefined, [MutableIterator]);
function ContainerCollection(container, children) {
this.qj9_1 = container;
this.rj9_1 = children;
}
ContainerCollection.prototype.dij = function () {
return this.qj9_1;
};
ContainerCollection.prototype.m = function (index) {
return this.rj9_1.m(index);
};
ContainerCollection.prototype.sj9 = function (element) {
return this.rj9_1.y(element);
};
ContainerCollection.prototype.y = function (element) {
if (!(element instanceof View))
return -1;
return this.sj9(element instanceof View ? element : THROW_CCE());
};
ContainerCollection.prototype.n = function (index) {
return this.rj9_1.n(index);
};
ContainerCollection.prototype.x = function (fromIndex, toIndex) {
return this.rj9_1.x(fromIndex, toIndex);
};
ContainerCollection.prototype.i = function () {
return this.qj9_1.pcl();
};
ContainerCollection.prototype.tj9 = function (element) {
return element.e5n() === this.qj9_1;
};
ContainerCollection.prototype.r = function (element) {
if (!(element instanceof View))
return false;
return this.tj9(element instanceof View ? element : THROW_CCE());
};
ContainerCollection.prototype.uj9 = function (elements) {
var tmp$ret$0;
$l$block_0: {
// Inline function 'kotlin.collections.all' call
var tmp;
if (isInterface(elements, Collection)) {
tmp = elements.p();
} else {
tmp = false;
}
if (tmp) {
tmp$ret$0 = true;
break $l$block_0;
}
var tmp0_iterator = elements.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l();
var tmp$ret$1;
// Inline function 'com.soywiz.korge.view.ContainerCollection.containsAll.<anonymous>' call
tmp$ret$1 = element.e5n() === this.qj9_1;
if (!tmp$ret$1) {
tmp$ret$0 = false;
break $l$block_0;
}
}
tmp$ret$0 = true;
}
return tmp$ret$0;
};
ContainerCollection.prototype.l2 = function (elements) {
return this.uj9(elements);
};
ContainerCollection.prototype.p = function () {
return this.qj9_1.pcl() === 0;
};
ContainerCollection.prototype.vj9 = function (element) {
this.qj9_1.shz(element);
return true;
};
ContainerCollection.prototype.c = function (element) {
return this.vj9(element instanceof View ? element : THROW_CCE());
};
ContainerCollection.prototype.wj9 = function (elements) {
if (elements.p())
return false;
var tmp0_iterator = elements.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l();
this.qj9_1.shz(element);
}
return true;
};
ContainerCollection.prototype.o = function (elements) {
return this.wj9(elements);
};
ContainerCollection.prototype.x7 = function () {
this.qj9_1.rhz();
};
ContainerCollection.prototype.j = function () {
return new ContainerCollection$iterator$1(this);
};
ContainerCollection.prototype.xj9 = function (element) {
return this.qj9_1.ai0(element);
};
ContainerCollection.prototype.c5 = function (element) {
if (!(element instanceof View))
return false;
return this.xj9(element instanceof View ? element : THROW_CCE());
};
ContainerCollection.$metadata$ = classMeta('ContainerCollection', [MutableCollection, List]);
function addTo_0(_this__u8e3s4, instance, callback) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = addTo(_this__u8e3s4, instance);
// Inline function 'kotlin.contracts.contract' call
callback(tmp0_apply);
tmp$ret$0 = tmp0_apply;
return tmp$ret$0;
}
function CpuGraphics(autoScaling) {
BaseGraphics.call(this, autoScaling);
this.zjc_1 = 0;
this.ajd_1 = null;
this.bjd_1 = true;
this.cjd_1 = -1;
this.djd_1 = -1;
var tmp = this;
var tmp$ret$0;
// Inline function 'kotlin.collections.arrayListOf' call
tmp$ret$0 = ArrayList_init_$Create$_0();
tmp.ejd_1 = tmp$ret$0;
this.fjd_1 = null;
this.gjd_1 = null;
this.bgh_1 = true;
}
CpuGraphics.prototype.hjd = function (value) {
this.ajd_1 = value;
var tmp0_this = this;
var tmp1 = tmp0_this.zjc_1;
tmp0_this.zjc_1 = tmp1 + 1 | 0;
this.zj5();
};
CpuGraphics.prototype.ijd = function (redrawNow, block) {
var tmp$ret$1;
// Inline function 'com.soywiz.korim.vector.buildShape' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = new ShapeBuilder(null, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.CpuGraphics.updateShape.<anonymous>' call
block(tmp0_apply, this);
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0.w9h();
this.hjd(tmp$ret$1);
if (redrawNow) {
this.cj6();
}
this.oj5_1 = true;
return this;
};
CpuGraphics.prototype.fj9 = function (value) {
var tmp = this;
var tmp0_safe_receiver = value;
var tmp_0;
if (tmp0_safe_receiver == null) {
tmp_0 = null;
} else {
var tmp$ret$1;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korge.view.CpuGraphics.<set-hitShape>.<anonymous>' call
tmp$ret$0 = listOf_0(tmp0_safe_receiver);
tmp$ret$1 = tmp$ret$0;
tmp_0 = tmp$ret$1;
}
tmp.gjd_1 = tmp_0;
};
CpuGraphics.prototype.fi0 = function () {
var tmp0_safe_receiver = this.gi0();
return tmp0_safe_receiver == null ? null : firstOrNull(tmp0_safe_receiver);
};
CpuGraphics.prototype.gi0 = function () {
if (!(this.gjd_1 == null))
return this.gjd_1;
if (!(this.cjd_1 === this.zjc_1)) {
this.cjd_1 = this.zjc_1;
this.ejd_1.x7();
var tmp = this.ejd_1;
var tmp0_safe_receiver = this.ajd_1;
var tmp_0;
if (tmp0_safe_receiver == null) {
tmp_0 = null;
} else {
tmp_0 = tmp0_safe_receiver.ca5(null, 1, null);
}
var tmp1_elvis_lhs = tmp_0;
var tmp_1;
if (tmp1_elvis_lhs == null) {
tmp_1 = VectorPath_init_$Create$(null, null, null, false, 15, null);
} else {
tmp_1 = tmp1_elvis_lhs;
}
tmp.c(tmp_1);
}
return this.ejd_1;
};
CpuGraphics.prototype.kj6 = function (ctx) {
var tmp0_safe_receiver = this.ajd_1;
if (tmp0_safe_receiver == null)
null;
else {
tmp0_safe_receiver.c8y(ctx);
}
};
CpuGraphics.prototype.xj5 = function (bb, includeStrokes) {
var tmp0_safe_receiver = this.ajd_1;
if (tmp0_safe_receiver == null)
null;
else {
tmp0_safe_receiver.aa5(bb, includeStrokes);
}
};
CpuGraphics.$metadata$ = classMeta('CpuGraphics', undefined, undefined, undefined, undefined, BaseGraphics.prototype);
function cpuGraphics(_this__u8e3s4, autoScaling, callback) {
var tmp$ret$3;
// Inline function 'kotlin.also' call
var tmp0_also = addTo(new CpuGraphics(autoScaling), _this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.cpuGraphics.<anonymous>' call
var tmp$ret$2;
// Inline function 'com.soywiz.korge.view.CpuGraphics.updateShape' call
var tmp$ret$1;
// Inline function 'com.soywiz.korim.vector.buildShape' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = new ShapeBuilder(null, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.CpuGraphics.updateShape.<anonymous>' call
// Inline function 'com.soywiz.korge.view.cpuGraphics.<anonymous>.<anonymous>' call
callback(tmp0_apply, tmp0_also);
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0.w9h();
tmp0_also.hjd(tmp$ret$1);
if (false) {
tmp0_also.cj6();
}
tmp0_also.oj5_1 = true;
tmp$ret$2 = tmp0_also;
tmp0_also.cj6();
tmp$ret$3 = tmp0_also;
return tmp$ret$3;
}
function CustomContextRenderizableView(width, height) {
RectBase_init_$Init$(0.0, 0.0, null, false, 15, null, this);
this.hir_1 = width;
this.iir_1 = height;
}
CustomContextRenderizableView.prototype.cav = function (v) {
this.hir_1 = v;
this.sgg_1 = true;
};
CustomContextRenderizableView.prototype.d72 = function () {
return this.hir_1;
};
CustomContextRenderizableView.prototype.p7c = function (v) {
this.iir_1 = v;
this.sgg_1 = true;
};
CustomContextRenderizableView.prototype.e72 = function () {
return this.iir_1;
};
CustomContextRenderizableView.prototype.jjd = function (_set____db54di) {
this.jir_1 = _set____db54di;
};
CustomContextRenderizableView.prototype.kjd = function (_set____db54di) {
this.kir_1 = _set____db54di;
};
CustomContextRenderizableView.prototype.dhb = function () {
var tmp = this.kir_1;
if (!(tmp == null))
return tmp;
else {
throwUninitializedPropertyAccessException('ctx2d');
}
};
CustomContextRenderizableView.prototype.xhw = function (ctx) {
if (!this.pck())
return Unit_getInstance();
// Inline function 'com.soywiz.korge.render.RenderContext.useCtx2d' call
// Inline function 'com.soywiz.korge.render.RenderContext.useBatcher' call
var tmp0_useBatcher = ctx.gga_1;
if (!(ctx.tga_1 === tmp0_useBatcher)) {
ctx.mj();
ctx.tga_1 = tmp0_useBatcher;
}
// Inline function 'com.soywiz.korge.render.RenderContext.useCtx2d.<anonymous>' call
// Inline function 'com.soywiz.korge.view.CustomContextRenderizableView.renderInternal.<anonymous>' call
var tmp0__anonymous__q1qw7t = ctx.kga_1;
this.jir_1 = ctx;
this.kir_1 = tmp0__anonymous__q1qw7t;
var tmp$ret$10;
// Inline function 'com.soywiz.korge.render.RenderContext2D.keep' call
var tmp$ret$9;
// Inline function 'com.soywiz.korge.render.RenderContext2D.keepMatrix' call
var tmp$ret$8;
$l$block_2: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var tmp0_alloc = tmp0__anonymous__q1qw7t.uhb_1;
var temp = tmp0_alloc.t4t();
try {
var tmp$ret$7;
// Inline function 'com.soywiz.korge.render.RenderContext2D.keepMatrix.<anonymous>' call
temp.f76(tmp0__anonymous__q1qw7t.vhb_1);
var tmp;
try {
var tmp$ret$6;
// Inline function 'com.soywiz.korge.render.RenderContext2D.keep.<anonymous>' call
var tmp$ret$5;
$l$block_1: {
// Inline function 'com.soywiz.korge.render.RenderContext2D.keepBlendMode' call
var oldBlendFactors = tmp0__anonymous__q1qw7t.whb_1;
try {
var tmp$ret$4;
// Inline function 'com.soywiz.korge.render.RenderContext2D.keep.<anonymous>.<anonymous>' call
var tmp$ret$3;
$l$block_0: {
// Inline function 'com.soywiz.korge.render.RenderContext2D.keepColor' call
var multiplyColor = tmp0__anonymous__q1qw7t.xhb_1;
try {
var tmp$ret$2;
// Inline function 'com.soywiz.korge.render.RenderContext2D.keep.<anonymous>.<anonymous>.<anonymous>' call
var tmp$ret$1;
$l$block: {
// Inline function 'com.soywiz.korge.render.RenderContext2D.keepFiltering' call
var filtering = tmp0__anonymous__q1qw7t.yhb_1;
try {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.render.RenderContext2D.keep.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
tmp0__anonymous__q1qw7t.whb_1 = this.sgf_1;
tmp0__anonymous__q1qw7t.ohc(this.pgw());
this.ljd(tmp0__anonymous__q1qw7t, this.d72(), this.e72());
tmp$ret$0 = Unit_getInstance();
tmp$ret$1 = tmp$ret$0;
break $l$block;
}finally {
tmp0__anonymous__q1qw7t.yhb_1 = filtering;
}
}
tmp$ret$2 = tmp$ret$1;
tmp$ret$3 = tmp$ret$2;
break $l$block_0;
}finally {
tmp0__anonymous__q1qw7t.xhb_1 = multiplyColor;
}
}
tmp$ret$4 = tmp$ret$3;
tmp$ret$5 = tmp$ret$4;
break $l$block_1;
}finally {
tmp0__anonymous__q1qw7t.whb_1 = oldBlendFactors;
}
}
tmp$ret$6 = tmp$ret$5;
tmp = tmp$ret$6;
}finally {
tmp0__anonymous__q1qw7t.vhb_1.f76(temp);
}
tmp$ret$7 = tmp;
tmp$ret$8 = tmp$ret$7;
break $l$block_2;
}finally {
tmp0_alloc.u4t(temp);
}
}
tmp$ret$9 = tmp$ret$8;
tmp$ret$10 = tmp$ret$9;
};
CustomContextRenderizableView.$metadata$ = classMeta('CustomContextRenderizableView', undefined, undefined, undefined, undefined, RectBase.prototype);
function DummyView() {
View_init_$Init$(this);
}
DummyView.prototype.xhw = function (ctx) {
return Unit_getInstance();
};
DummyView.$metadata$ = classMeta('DummyView', undefined, undefined, undefined, undefined, View.prototype);
function dummyView(_this__u8e3s4) {
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp0_also = new DummyView();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.dummyView.<anonymous>' call
_this__u8e3s4.shz(tmp0_also);
tmp$ret$0 = tmp0_also;
return tmp$ret$0;
}
function FixedSizeContainer_init_$Init$(width, height, clip, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
width = 100.0;
if (!(($mask0 & 2) === 0))
height = 100.0;
if (!(($mask0 & 4) === 0))
clip = false;
FixedSizeContainer.call($this, width, height, clip);
return $this;
}
function FixedSizeContainer(width, height, clip) {
Container.call(this);
this.ghz_1 = width;
this.hhz_1 = height;
this.ihz_1 = clip;
this.jhz_1 = Companion_getInstance_15().zp();
this.khz_1 = false;
}
FixedSizeContainer.prototype.cav = function (_set____db54di) {
this.ghz_1 = _set____db54di;
};
FixedSizeContainer.prototype.d72 = function () {
return this.ghz_1;
};
FixedSizeContainer.prototype.p7c = function (_set____db54di) {
this.hhz_1 = _set____db54di;
};
FixedSizeContainer.prototype.e72 = function () {
return this.hhz_1;
};
FixedSizeContainer.prototype.la5 = function () {
return this.ihz_1;
};
FixedSizeContainer.prototype.uhw = function (out) {
var tmp$ret$0;
// Inline function 'com.soywiz.korma.geom.setTo' call
var tmp0_setTo = this.d72();
var tmp1_setTo = this.e72();
tmp$ret$0 = out.u72(0.0, 0.0, numberToDouble(tmp0_setTo), numberToDouble(tmp1_setTo));
};
FixedSizeContainer.prototype.toString = function () {
var out = Container.prototype.toString.call(this);
out = out + (':size=(' + get_niceStr(this.d72()) + 'x' + get_niceStr(this.e72()) + ')');
return out;
};
FixedSizeContainer.prototype.xhw = function (ctx) {
if (this.khz_1) {
return Container.prototype.xhw.call(this, ctx);
}
if (this.la5()) {
var m = this.pgw();
var hasRotation = !(m.j74_1 === 0.0) ? true : !(m.k74_1 === 0.0);
if (hasRotation) {
var old = this.khz_1;
try {
this.khz_1 = true;
var tmp = Companion_getInstance_59();
renderFiltered$default(this, ctx, tmp, false, 4, null);
}finally {
this.khz_1 = old;
}
return Unit_getInstance();
}
// Inline function 'com.soywiz.korge.render.RenderContext.useCtx2d' call
// Inline function 'com.soywiz.korge.render.RenderContext.useBatcher' call
var tmp0_useBatcher = ctx.gga_1;
if (!(ctx.tga_1 === tmp0_useBatcher)) {
ctx.mj();
ctx.tga_1 = tmp0_useBatcher;
}
// Inline function 'com.soywiz.korge.render.RenderContext.useCtx2d.<anonymous>' call
// Inline function 'com.soywiz.korge.view.FixedSizeContainer.renderInternal.<anonymous>' call
var tmp0__anonymous__q1qw7t = ctx.kga_1;
var bounds = this.ki2(ctx, this.jhz_1);
applyTransform(bounds, ctx.sg9_1);
bounds.d7b();
var tmp0_safe_receiver = tmp0__anonymous__q1qw7t.rhb_1.dgc_1;
var rect = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.wau_1;
var intersects = true;
if (!(rect == null)) {
intersects = !(bounds.y7c(bounds, rect) == null);
}
if (intersects) {
var tmp$ret$2;
// Inline function 'com.soywiz.korge.render.RenderContext2D.scissor' call
var tmp0_safe_receiver_0 = bounds;
var tmp_0;
if (tmp0_safe_receiver_0 == null) {
tmp_0 = null;
} else {
var tmp$ret$1;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korge.render.RenderContext2D.scissor.<anonymous>' call
tmp$ret$0 = tmp0__anonymous__q1qw7t.ahc_1.dav(tmp0_safe_receiver_0);
tmp$ret$1 = tmp$ret$0;
tmp_0 = tmp$ret$1;
}
var tmp0_scissor = tmp_0;
var oldScissor = tmp0__anonymous__q1qw7t.rhb_1.dgc_1;
var returnScissor = tmp0__anonymous__q1qw7t.shc(tmp0_scissor);
var tmp_1;
try {
Container.prototype.xhw.call(this, ctx);
tmp_1 = Unit_getInstance();
}finally {
tmp0__anonymous__q1qw7t.thc(oldScissor, returnScissor);
}
tmp$ret$2 = tmp_1;
} else {
Container.prototype.xhw.call(this, ctx);
}
} else {
Container.prototype.xhw.call(this, ctx);
}
};
FixedSizeContainer.$metadata$ = classMeta('FixedSizeContainer', [Reference], undefined, undefined, undefined, Container.prototype);
function fixedSizeContainer(_this__u8e3s4, width, height, clip, callback) {
var tmp$ret$1;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp0_addTo = new FixedSizeContainer(width, height, clip);
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = addTo(tmp0_addTo, _this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
callback(tmp0_apply);
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0;
return tmp$ret$1;
}
function SContainer_init_$Init$(width, height, clip, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
width = 100.0;
if (!(($mask0 & 2) === 0))
height = 100.0;
if (!(($mask0 & 4) === 0))
clip = false;
SContainer.call($this, width, height, clip);
return $this;
}
function SContainer_init_$Create$(width, height, clip, $mask0, $marker) {
return SContainer_init_$Init$(width, height, clip, $mask0, $marker, Object.create(SContainer.prototype));
}
function SContainer(width, height, clip) {
FixedSizeContainer.call(this, width, height, clip);
}
SContainer.$metadata$ = classMeta('SContainer', undefined, undefined, undefined, undefined, FixedSizeContainer.prototype);
function installFpsDebugOverlay(_this__u8e3s4) {
var longWindow = new TimeSlidingWindow(240);
var shortWindow = new TimeSlidingWindow(10);
var previousTime = {_v: new TimeSpan(PerformanceCounter_getInstance().x1h())};
var frames = {_v: 0};
var batchCount = {_v: 0};
var vertexCount = {_v: 0};
var instanceCount = {_v: 0};
var tmp = _this__u8e3s4.mh0().yfx_1;
tmp.j54(installFpsDebugOverlay$lambda(batchCount, vertexCount, instanceCount));
var tmp_0 = get_debugLineRenderContext(_this__u8e3s4.mh0().xfw_1).mh9_1;
tmp_0.j54(installFpsDebugOverlay$lambda_0(batchCount, vertexCount));
var tmp_1 = _this__u8e3s4.mh0().xfw_1.gga_1.qgc_1;
tmp_1.j54(installFpsDebugOverlay$lambda_1(batchCount, vertexCount));
var tmp_2 = _this__u8e3s4.mh0().xfw_1.gga_1.rgc_1;
tmp_2.j54(installFpsDebugOverlay$lambda_2(instanceCount));
var tmp_3 = _this__u8e3s4.mh0();
tmp_3.mjf(installFpsDebugOverlay$lambda_3(previousTime, frames, longWindow, shortWindow, batchCount, vertexCount, instanceCount));
}
function TimeSlidingWindow(capacity) {
this.njf_1 = capacity;
this.ojf_1 = new IntDeque(this.njf_1);
this.pjf_1 = 0;
}
TimeSlidingWindow.prototype.k2o = function () {
return this.njf_1;
};
TimeSlidingWindow.prototype.i = function () {
return this.ojf_1.i();
};
TimeSlidingWindow.prototype.qjf = function () {
var tmp$ret$0;
// Inline function 'com.soywiz.klock.microseconds' call
var tmp0__get_microseconds__mq1imi = this.pjf_1 / this.ojf_1.i();
tmp$ret$0 = Companion_getInstance_1().v1h(tmp0__get_microseconds__mq1imi);
return tmp$ret$0;
};
TimeSlidingWindow.prototype.rjf = function () {
var tmp$ret$0;
// Inline function 'com.soywiz.klock.seconds' call
tmp$ret$0 = Companion_getInstance_1().c1i(1.0);
return TimeSpan__div_impl_l42f2r(tmp$ret$0, this.qjf());
};
TimeSlidingWindow.prototype.sjf = function (index) {
var tmp$ret$0;
// Inline function 'com.soywiz.klock.microseconds' call
var tmp0__get_microseconds__mq1imi = this.ojf_1.m(index);
tmp$ret$0 = Companion_getInstance_1().v1h(tmp0__get_microseconds__mq1imi);
return tmp$ret$0;
};
TimeSlidingWindow.prototype.tjf = function (value) {
var intValue = _TimeSpan___get_microsecondsInt__impl__sej7yz(value);
this.ojf_1.u4p(intValue);
var tmp0_this = this;
tmp0_this.pjf_1 = tmp0_this.pjf_1 + intValue | 0;
if (this.ojf_1.i() > this.njf_1) {
var tmp1_this = this;
tmp1_this.pjf_1 = tmp1_this.pjf_1 - this.ojf_1.s4p() | 0;
}
};
TimeSlidingWindow.$metadata$ = classMeta('TimeSlidingWindow');
function installFpsDebugOverlay$lambda($batchCount, $vertexCount, $instanceCount) {
return function (it) {
$batchCount._v = 0;
$vertexCount._v = 0;
$instanceCount._v = 0;
return Unit_getInstance();
};
}
function installFpsDebugOverlay$lambda_0($batchCount, $vertexCount) {
return function (it) {
var tmp0 = $batchCount._v;
$batchCount._v = tmp0 + 1 | 0;
$vertexCount._v = $vertexCount._v + it.zh9_1 | 0;
return Unit_getInstance();
};
}
function installFpsDebugOverlay$lambda_1($batchCount, $vertexCount) {
return function (it) {
var tmp0 = $batchCount._v;
$batchCount._v = tmp0 + 1 | 0;
$vertexCount._v = $vertexCount._v + it.xh7() | 0;
return Unit_getInstance();
};
}
function installFpsDebugOverlay$lambda_2($instanceCount) {
return function (it) {
$instanceCount._v = $instanceCount._v + it | 0;
return Unit_getInstance();
};
}
function invoke$drawTextWithShadow($this_addDebugRenderer, $ctx, fontSize, matrix, text, x, y) {
var tmp0_font = $this_addDebugRenderer.qgw();
var tmp1_colMul = $ctx.ega_1;
var tmp2_blendMode = Companion_getInstance_53().yg8_1;
drawText$default($ctx, tmp0_font, fontSize, text, x, y, matrix, tmp1_colMul, null, tmp2_blendMode, false, 128, null);
}
function installFpsDebugOverlay$lambda_3($previousTime, $frames, $longWindow, $shortWindow, $batchCount, $vertexCount, $instanceCount) {
return function ($this$addDebugRenderer, ctx) {
var scale = ctx.ig9_1.zb8() * ctx.dga_1;
var fontSize = 8.0 * scale;
var currentTime = PerformanceCounter_getInstance().x1h();
var elapsedTime = TimeSpan__minus_impl_5w5v8s(currentTime, $previousTime._v.y1h_1);
var tmp;
if ($frames._v > 3) {
var tmp_0;
var tmp$ret$0;
// Inline function 'com.soywiz.klock.milliseconds' call
tmp$ret$0 = Companion_getInstance_1().o1h(4.0);
if (TimeSpan__compareTo_impl_zidry4(elapsedTime, tmp$ret$0) > 0) {
$longWindow.tjf(elapsedTime);
$shortWindow.tjf(elapsedTime);
tmp_0 = Unit_getInstance();
}
tmp = tmp_0;
}
var tmp0 = $frames._v;
$frames._v = tmp0 + 1 | 0;
$previousTime._v = new TimeSpan(currentTime);
var matrix = $this$addDebugRenderer.ofw_1.ngw();
invoke$drawTextWithShadow($this$addDebugRenderer, ctx, fontSize, matrix, 'FPS: ' + ('' + roundDecimalPlaces($shortWindow.rjf(), 1)) + (', batchCount=' + $batchCount._v + ', vertexCount=' + $vertexCount._v + ', instanceCount=' + $instanceCount._v) + (', (' + Companion_getInstance_3().b4z() + ')'), 0, 0);
var graphLeft = 1.0;
var graphTop = fontSize * 2;
var overlayLines = 60;
var overlayWidth = 120.0 * scale;
var overlayHeight = 30 * scale;
var overlayHeightGap = 5.0;
var tmp$ret$9;
// Inline function 'com.soywiz.korge.render.useLineBatcher' call
var tmp0_useLineBatcher = $this$addDebugRenderer.xfw_1;
var tmp$ret$8;
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.use' call
var tmp0_use = get_debugLineRenderContext(tmp0_useLineBatcher);
var tmp0_useBatcher = tmp0_use.lh9_1;
if (!(tmp0_useBatcher.tga_1 === tmp0_use)) {
tmp0_useBatcher.mj();
tmp0_useBatcher.tga_1 = tmp0_use;
}
var tmp$ret$7;
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.drawWithGlobalMatrix' call
var tmp0_drawWithGlobalMatrix = get_debugLineRenderContext(tmp0_useLineBatcher);
var tmp$ret$6;
$l$block_0: {
// Inline function 'com.soywiz.korma.geom.Matrix.keepMatrix' call
var tmp0_keepMatrix = tmp0_drawWithGlobalMatrix.cha_1;
var a = tmp0_keepMatrix.i74_1;
var b = tmp0_keepMatrix.j74_1;
var c = tmp0_keepMatrix.k74_1;
var d = tmp0_keepMatrix.l74_1;
var tx = tmp0_keepMatrix.m74_1;
var ty = tmp0_keepMatrix.n74_1;
try {
var tmp$ret$5;
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.drawWithGlobalMatrix.<anonymous>' call
if (!(matrix == null)) {
tmp0_keepMatrix.f76(matrix);
}
var tmp$ret$4;
$l$block: {
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.blending' call
var tmp0_blending = Companion_getInstance_53().yg8_1;
var doUpdate = !(tmp0_use.bha_1 === tmp0_blending);
var old = tmp0_use.bha_1;
try {
if (doUpdate) {
tmp0_use.lh9_1.mj();
tmp0_use.bha_1 = tmp0_blending;
}
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.color' call
var tmp0_color = Colors_getInstance().i85_1;
var oldColor = tmp0_use.oh9_1;
tmp0_use.oh9_1 = tmp0_color;
try {
// Inline function 'com.soywiz.korge.view.installFpsDebugOverlay.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
var tmp_1 = graphTop + overlayHeight;
tmp0_use.fha(graphLeft, graphTop, graphLeft, tmp_1, null, null, null, 112, null);
var tmp_2 = graphTop + overlayHeight;
var tmp_3 = graphLeft + overlayWidth;
var tmp_4 = graphTop + overlayHeight;
tmp0_use.fha(graphLeft, tmp_2, tmp_3, tmp_4, null, null, null, 112, null);
}finally {
tmp0_use.oh9_1 = oldColor;
}
var inductionVariable = 0;
var tmp_5;
if (inductionVariable <= 0) {
do {
var index = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var color = index === 0 ? Colors_getInstance().s7z_1 : Colors_getInstance().t7z_1;
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.color' call
var oldColor_0 = tmp0_use.oh9_1;
tmp0_use.oh9_1 = color;
try {
// Inline function 'com.soywiz.korge.view.installFpsDebugOverlay.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
var ratio = $longWindow.i() / $longWindow.njf_1;
var totalOverlayLines = coerceAtLeast_0(numberToInt(overlayLines * ratio), 1);
if ($longWindow.i() > 0) {
var previousX = 0.0;
var previousY = 0.0;
var minFps = 0.0;
var maxFps = 150.0;
var inductionVariable_0 = 0;
if (inductionVariable_0 < totalOverlayLines)
do {
var n = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
var tmp$ret$3;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$2;
// Inline function 'com.soywiz.korge.view.installFpsDebugOverlay.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
var p0 = convertRange_0(n, 0, totalOverlayLines, 0, coerceAtLeast_0($longWindow.i(), 1));
var p1 = convertRange_0(n + 1 | 0, 0, totalOverlayLines, 0, coerceAtLeast_0($longWindow.i(), 1));
var plen = 0;
var tmp$ret$1;
// Inline function 'com.soywiz.klock.milliseconds' call
tmp$ret$1 = Companion_getInstance_1().o1h(0.0);
var timeSum = tmp$ret$1;
var inductionVariable_1 = p0;
var last = coerceAtMost_0(p1, $longWindow.i());
if (inductionVariable_1 < last)
do {
var m = inductionVariable_1;
inductionVariable_1 = inductionVariable_1 + 1 | 0;
timeSum = TimeSpan__plus_impl_qdd6zo(timeSum, $longWindow.sjf(m));
var tmp1 = plen;
plen = tmp1 + 1 | 0;
}
while (inductionVariable_1 < last);
if (plen === 0) {
timeSum = TimeSpan__plus_impl_qdd6zo(timeSum, $longWindow.sjf(p0));
var tmp2 = plen;
plen = tmp2 + 1 | 0;
}
var time = TimeSpan__div_impl_l42f2r_0(timeSum, plen);
var fps = _Frequency___get_hertz__impl__9m7k6x(toFrequency(time));
tmp$ret$2 = fps;
tmp$ret$3 = tmp$ret$2;
var fps_0 = tmp$ret$3;
var scaledFreq = convertRange(fps_0, minFps, maxFps, overlayHeightGap, overlayHeight);
var y = graphTop + overlayHeight - scaledFreq;
var x = graphLeft + n * overlayWidth / overlayLines;
if (n > 0) {
var tmp_6 = previousX;
var tmp_7 = previousY + index;
var tmp_8 = y + index;
tmp0_use.fha(tmp_6, tmp_7, x, tmp_8, null, null, null, 112, null);
}
previousY = y;
previousX = x;
}
while (inductionVariable_0 < totalOverlayLines);
}
}finally {
tmp0_use.oh9_1 = oldColor_0;
}
}
while (inductionVariable <= 0);
tmp_5 = Unit_getInstance();
}
tmp$ret$4 = tmp_5;
break $l$block;
}finally {
if (doUpdate) {
tmp0_use.lh9_1.mj();
}
tmp0_use.bha_1 = old;
}
}
tmp$ret$5 = tmp$ret$4;
tmp$ret$6 = tmp$ret$5;
break $l$block_0;
}finally {
tmp0_keepMatrix.i74_1 = a;
tmp0_keepMatrix.j74_1 = b;
tmp0_keepMatrix.k74_1 = c;
tmp0_keepMatrix.l74_1 = d;
tmp0_keepMatrix.m74_1 = tx;
tmp0_keepMatrix.n74_1 = ty;
}
}
tmp$ret$7 = tmp$ret$6;
tmp$ret$8 = tmp$ret$7;
tmp$ret$9 = tmp$ret$8;
return Unit_getInstance();
};
}
var GraphicsRenderer_SYSTEM_instance;
var GraphicsRenderer_CPU_instance;
var GraphicsRenderer_GPU_instance;
var GraphicsRenderer_entriesInitialized;
function GraphicsRenderer_initEntries() {
if (GraphicsRenderer_entriesInitialized)
return Unit_getInstance();
GraphicsRenderer_entriesInitialized = true;
GraphicsRenderer_SYSTEM_instance = new GraphicsRenderer('SYSTEM', 0);
GraphicsRenderer_CPU_instance = new GraphicsRenderer('CPU', 1);
GraphicsRenderer_GPU_instance = new GraphicsRenderer('GPU', 2);
}
function GraphicsRenderer(name, ordinal) {
Enum.call(this, name, ordinal);
}
GraphicsRenderer.$metadata$ = classMeta('GraphicsRenderer', undefined, undefined, undefined, undefined, Enum.prototype);
function Graphics_init_$Init$(shape, renderer, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
shape = EmptyShape_getInstance();
if (!(($mask0 & 2) === 0))
renderer = GraphicsRenderer_GPU_getInstance();
Graphics.call($this, shape, renderer);
return $this;
}
function Graphics_init_$Create$(shape, renderer, $mask0, $marker) {
return Graphics_init_$Init$(shape, renderer, $mask0, $marker, Object.create(Graphics.prototype));
}
function _get_anchorable__ebfoik($this) {
var tmp0_elvis_lhs = $this.cji_1;
return ensureNotNull(tmp0_elvis_lhs == null ? $this.dji_1 : tmp0_elvis_lhs);
}
function ensure($this) {
var tmp0_subject = $this.iji_1;
var tmp0 = tmp0_subject.q2_1;
if (tmp0 === 2) {
if (!($this.cji_1 == null)) {
var tmp1_safe_receiver = $this.cji_1;
if (tmp1_safe_receiver == null)
null;
else {
tmp1_safe_receiver.fi2();
}
$this.cji_1 = null;
}
if ($this.dji_1 == null) {
var tmp = $this;
var tmp$ret$5;
// Inline function 'com.soywiz.korge.view.vector.gpuGraphics' call
var tmp$ret$4;
// Inline function 'com.soywiz.korge.view.vector.gpuShapeView' call
var tmp$ret$3;
// Inline function 'kotlin.also' call
var tmp_0 = EmptyShape_getInstance();
var tmp0_also = GpuShapeView_init_$Create$(tmp_0, true, false, 4, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.vector.gpuShapeView.<anonymous>' call
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.updateShape' call
var tmp$ret$2;
// Inline function 'com.soywiz.korim.vector.buildShape' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$1;
// Inline function 'kotlin.apply' call
var tmp0_apply = new ShapeBuilder(null, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.updateShape.<anonymous>' call
// Inline function 'com.soywiz.korge.view.vector.gpuShapeView.<anonymous>.<anonymous>' call
var tmp$ret$0;
// Inline function 'com.soywiz.korge.view.vector.gpuGraphics.<anonymous>' call
tmp$ret$0 = Unit_getInstance();
tmp$ret$1 = tmp0_apply;
tmp$ret$2 = tmp$ret$1.w9h();
tmp0_also.ojl(tmp$ret$2);
tmp$ret$3 = tmp0_also;
tmp$ret$4 = addTo(tmp$ret$3, $this);
tmp$ret$5 = tmp$ret$4;
tmp.dji_1 = tmp$ret$5;
var tmp2_safe_receiver = $this.dji_1;
if (tmp2_safe_receiver == null) {
} else {
tmp2_safe_receiver.pjl($this.eji_1);
}
var tmp3_safe_receiver = $this.dji_1;
if (tmp3_safe_receiver == null) {
} else
tmp3_safe_receiver.jjk_1 = $this.gji_1;
var tmp4_safe_receiver = $this.dji_1;
if (tmp4_safe_receiver == null) {
} else
tmp4_safe_receiver.ljk_1 = $this.fji_1;
}
} else {
if (!($this.dji_1 == null)) {
var tmp5_safe_receiver = $this.dji_1;
if (tmp5_safe_receiver == null)
null;
else {
tmp5_safe_receiver.fi2();
}
$this.dji_1 = null;
}
if ($this.cji_1 == null) {
var tmp_1 = $this;
var tmp$ret$11;
// Inline function 'com.soywiz.korge.view.cpuGraphics' call
var tmp$ret$10;
// Inline function 'kotlin.also' call
var tmp0_also_0 = addTo(new CpuGraphics(false), $this);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.cpuGraphics.<anonymous>' call
var tmp$ret$9;
// Inline function 'com.soywiz.korge.view.CpuGraphics.updateShape' call
var tmp$ret$8;
// Inline function 'com.soywiz.korim.vector.buildShape' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$7;
// Inline function 'kotlin.apply' call
var tmp0_apply_0 = new ShapeBuilder(null, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.CpuGraphics.updateShape.<anonymous>' call
// Inline function 'com.soywiz.korge.view.cpuGraphics.<anonymous>.<anonymous>' call
var tmp$ret$6;
// Inline function 'com.soywiz.korge.view.cpuGraphics.<anonymous>' call
tmp$ret$6 = Unit_getInstance();
tmp$ret$7 = tmp0_apply_0;
tmp$ret$8 = tmp$ret$7.w9h();
tmp0_also_0.hjd(tmp$ret$8);
if (false) {
tmp0_also_0.cj6();
}
tmp0_also_0.oj5_1 = true;
tmp$ret$9 = tmp0_also_0;
tmp0_also_0.cj6();
tmp$ret$10 = tmp0_also_0;
tmp$ret$11 = tmp$ret$10;
tmp_1.cji_1 = tmp$ret$11;
var tmp6_safe_receiver = $this.cji_1;
if (tmp6_safe_receiver == null) {
} else
tmp6_safe_receiver.bjd_1 = $this.eji_1;
var tmp7_safe_receiver = $this.cji_1;
if (tmp7_safe_receiver == null) {
} else
tmp7_safe_receiver.gj5_1 = $this.gji_1;
var tmp8_safe_receiver = $this.cji_1;
if (tmp8_safe_receiver == null) {
} else
tmp8_safe_receiver.pj8_1 = $this.fji_1;
}
var tmp9_safe_receiver = $this.cji_1;
if (tmp9_safe_receiver == null) {
} else {
tmp9_safe_receiver.yj5($this.iji_1.equals(GraphicsRenderer_SYSTEM_getInstance()));
}
}
}
function Graphics(shape, renderer) {
Container.call(this);
this.cji_1 = null;
this.dji_1 = null;
this.eji_1 = true;
this.fji_1 = true;
this.gji_1 = true;
this.hji_1 = EmptyShape_getInstance();
this.iji_1 = renderer;
this.ojl(shape);
}
Graphics.prototype.qjl = function () {
var tmp0_elvis_lhs = this.cji_1;
return ensureNotNull(tmp0_elvis_lhs == null ? this.dji_1 : tmp0_elvis_lhs);
};
Graphics.prototype.rjl = function (value) {
var tmp0_safe_receiver = this.cji_1;
if (tmp0_safe_receiver == null) {
} else
tmp0_safe_receiver.uj5_1 = value;
var tmp1_safe_receiver = this.dji_1;
if (tmp1_safe_receiver == null) {
} else
tmp1_safe_receiver.mjk_1 = value;
this.dg8();
};
Graphics.prototype.sjl = function () {
var tmp0_safe_receiver = this.cji_1;
var tmp2_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.uj5_1;
var tmp;
if (tmp2_elvis_lhs == null) {
var tmp1_safe_receiver = this.dji_1;
tmp = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.mjk_1;
} else {
tmp = tmp2_elvis_lhs;
}
var tmp3_elvis_lhs = tmp;
return tmp3_elvis_lhs == null ? false : tmp3_elvis_lhs;
};
Graphics.prototype.sj2 = function (value) {
_get_anchorable__ebfoik(this).sj2(value);
this.dg8();
};
Graphics.prototype.tj2 = function () {
return _get_anchorable__ebfoik(this).tj2();
};
Graphics.prototype.uj2 = function (value) {
_get_anchorable__ebfoik(this).uj2(value);
this.dg8();
};
Graphics.prototype.vj2 = function () {
return _get_anchorable__ebfoik(this).vj2();
};
Graphics.prototype.bi0 = function () {
return this.qjl().bi0();
};
Graphics.prototype.ci0 = function () {
return this.qjl().ci0();
};
Graphics.prototype.tjl = function (value) {
if (this.fji_1 === value)
return Unit_getInstance();
this.fji_1 = value;
var tmp0_safe_receiver = this.cji_1;
if (tmp0_safe_receiver == null) {
} else
tmp0_safe_receiver.pj8_1 = true;
var tmp1_safe_receiver = this.dji_1;
if (tmp1_safe_receiver == null) {
} else
tmp1_safe_receiver.ljk_1 = true;
this.dg8();
};
Graphics.prototype.ujl = function (value) {
if (this.gji_1 === value)
return Unit_getInstance();
this.gji_1 = value;
var tmp0_safe_receiver = this.cji_1;
if (tmp0_safe_receiver == null) {
} else
tmp0_safe_receiver.gj5_1 = true;
var tmp1_safe_receiver = this.dji_1;
if (tmp1_safe_receiver == null) {
} else
tmp1_safe_receiver.jjk_1 = true;
this.dg8();
};
Graphics.prototype.ojl = function (value) {
if (this.hji_1 === value)
return Unit_getInstance();
this.hji_1 = value;
ensure(this);
var tmp0_safe_receiver = this.cji_1;
if (tmp0_safe_receiver == null) {
} else {
tmp0_safe_receiver.hjd(value);
}
var tmp1_safe_receiver = this.dji_1;
if (tmp1_safe_receiver == null) {
} else {
tmp1_safe_receiver.ojl(value);
}
this.dg8();
};
Graphics.prototype.vjl = function (value) {
if (this.iji_1 === value)
return Unit_getInstance();
this.iji_1 = value;
ensure(this);
};
Graphics.prototype.wjl = function (block) {
var result;
var tmp$ret$1;
// Inline function 'com.soywiz.korim.vector.buildShape' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = new ShapeBuilder(null, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.Graphics.updateShape.<anonymous>' call
result = block(tmp0_apply, this);
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0.w9h();
this.ojl(tmp$ret$1);
return result;
};
Graphics.prototype.xjl = function () {
ensure(this);
var tmp0_safe_receiver = this.cji_1;
if (tmp0_safe_receiver == null)
null;
else
tmp0_safe_receiver.cj6();
};
Graphics.$metadata$ = classMeta('Graphics', [ViewLeaf, Anchorable], undefined, undefined, undefined, Container.prototype);
function graphics(_this__u8e3s4, renderer, callback) {
var tmp$ret$3;
// Inline function 'kotlin.also' call
var tmp0_also = addTo(new Graphics(EmptyShape_getInstance(), renderer), _this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.graphics.<anonymous>' call
var tmp$ret$2;
// Inline function 'com.soywiz.korge.view.Graphics.updateShape' call
var result;
var tmp$ret$1;
// Inline function 'com.soywiz.korim.vector.buildShape' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = new ShapeBuilder(null, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.Graphics.updateShape.<anonymous>' call
result = callback(tmp0_apply, tmp0_also);
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0.w9h();
tmp0_also.ojl(tmp$ret$1);
tmp$ret$2 = result;
tmp0_also.xjl();
tmp$ret$3 = tmp0_also;
return tmp$ret$3;
}
function GraphicsRenderer_SYSTEM_getInstance() {
GraphicsRenderer_initEntries();
return GraphicsRenderer_SYSTEM_instance;
}
function GraphicsRenderer_GPU_getInstance() {
GraphicsRenderer_initEntries();
return GraphicsRenderer_GPU_instance;
}
function Image_init_$Init$(bitmap, anchorX, anchorY, hitShape, smoothing, $mask0, $marker, $this) {
if (!(($mask0 & 2) === 0))
anchorX = 0.0;
if (!(($mask0 & 4) === 0))
anchorY = anchorX;
if (!(($mask0 & 8) === 0))
hitShape = null;
if (!(($mask0 & 16) === 0))
smoothing = true;
Image.call($this, bitmap, anchorX, anchorY, hitShape, smoothing);
return $this;
}
function Image_init_$Create$(bitmap, anchorX, anchorY, hitShape, smoothing, $mask0, $marker) {
return Image_init_$Init$(bitmap, anchorX, anchorY, hitShape, smoothing, $mask0, $marker, Object.create(Image.prototype));
}
function Image_init_$Init$_0(bitmap, anchorX, anchorY, hitShape, smoothing, $this) {
Image.call($this, slice$default(bitmap, null, null, null, 7, null), anchorX, anchorY, hitShape, smoothing);
return $this;
}
function Image_init_$Init$_1(bitmap, anchorX, anchorY, hitShape, smoothing, $mask0, $marker, $this) {
if (!(($mask0 & 2) === 0))
anchorX = 0.0;
if (!(($mask0 & 4) === 0))
anchorY = anchorX;
if (!(($mask0 & 8) === 0))
hitShape = null;
if (!(($mask0 & 16) === 0))
smoothing = true;
Image_init_$Init$_0(bitmap, anchorX, anchorY, hitShape, smoothing, $this);
return $this;
}
function Image_init_$Create$_0(bitmap, anchorX, anchorY, hitShape, smoothing, $mask0, $marker) {
return Image_init_$Init$_1(bitmap, anchorX, anchorY, hitShape, smoothing, $mask0, $marker, Object.create(Image.prototype));
}
function $forceLoadSourceFileCOROUTINE$17(_this__u8e3s4, views, currentVfs, sourceFile, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.gjm_1 = _this__u8e3s4;
this.hjm_1 = views;
this.ijm_1 = currentVfs;
this.jjm_1 = sourceFile;
}
$forceLoadSourceFileCOROUTINE$17.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 5;
this.o7_1 = 1;
suspendResult = this.gjm_1.vjo(this.gjm_1, this.hjm_1, this.ijm_1, this.jjm_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
this.p7_1 = 3;
this.o7_1 = 2;
var tmp_0 = this.ijm_1.c19('' + this.jjm_1);
suspendResult = readBitmapSlice$default(tmp_0, null, null, null, this, 7, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 2:
var ARGUMENT = suspendResult;
this.gjm_1.pj2(ARGUMENT);
this.gjm_1.ni0(1.0);
this.p7_1 = 5;
this.o7_1 = 4;
continue $sm;
case 3:
this.p7_1 = 5;
var tmp_1 = this.r7_1;
if (tmp_1 instanceof Error) {
var e = this.r7_1;
var tmp0__get_white__j8g7zy = Bitmaps_getInstance();
this.gjm_1.pj2(get_Bitmaps_white());
this.gjm_1.ni0(100.0);
this.o7_1 = 4;
continue $sm;
} else {
throw this.r7_1;
}
break;
case 4:
this.p7_1 = 5;
return Unit_getInstance();
case 5:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 5) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$forceLoadSourceFileCOROUTINE$17.$metadata$ = classMeta('$forceLoadSourceFileCOROUTINE$17', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function Image(bitmap, anchorX, anchorY, hitShape, smoothing) {
BaseImage.call(this, bitmap, anchorX, anchorY, hitShape, smoothing);
this.ujo_1 = new Mixin_0();
}
Image.prototype.wjo = function (_set____db54di) {
this.ujo_1.wjo(_set____db54di);
};
Image.prototype.zjo = function (_set____db54di) {
this.ujo_1.xjo_1 = _set____db54di;
};
Image.prototype.ajp = function (ctx, view) {
this.ujo_1.ajp(ctx, view);
};
Image.prototype.vjo = function (_this__u8e3s4, views, currentVfs, sourceFile, $cont) {
return this.ujo_1.vjo(_this__u8e3s4, views, currentVfs, sourceFile, $cont);
};
Image.prototype.xhw = function (ctx) {
this.ajp(ctx, this);
BaseImage.prototype.xhw.call(this, ctx);
};
Image.prototype.bjp = function (views, currentVfs, sourceFile, $cont) {
var tmp = new $forceLoadSourceFileCOROUTINE$17(this, views, currentVfs, sourceFile, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
Image.$metadata$ = classMeta('Image', [ViewFileRef, SmoothedBmpSlice], undefined, undefined, undefined, BaseImage.prototype);
function BaseImage_init_$Init$(bitmap, anchorX, anchorY, hitShape, smoothing, $mask0, $marker, $this) {
if (!(($mask0 & 2) === 0))
anchorX = 0.0;
if (!(($mask0 & 4) === 0))
anchorY = anchorX;
if (!(($mask0 & 8) === 0))
hitShape = null;
if (!(($mask0 & 16) === 0))
smoothing = true;
BaseImage.call($this, bitmap, anchorX, anchorY, hitShape, smoothing);
return $this;
}
function trySetSourceActually($this) {
var source = $this.oj2_1.b65();
if (!(source == null)) {
$this.nj2_1 = true;
$this.cj9(source);
}
}
function BaseImage(bitmap, anchorX, anchorY, hitShape, smoothing) {
RectBase.call(this, anchorX, anchorY, hitShape, smoothing);
this.nj2_1 = false;
this.oj2_1 = bitmap;
this.zj8();
}
BaseImage.prototype.pj2 = function (value) {
if (equals(this.qj8_1, value))
return Unit_getInstance();
this.nj2_1 = true;
this.cj9(value);
};
BaseImage.prototype.y8x = function () {
return this.qj8_1;
};
BaseImage.prototype.zj8 = function () {
if (this.nj2_1)
return Unit_getInstance();
trySetSourceActually(this);
};
BaseImage.prototype.xhw = function (ctx) {
this.zj8();
RectBase.prototype.xhw.call(this, ctx);
};
BaseImage.prototype.nj6 = function () {
return this.qj8_1.d72();
};
BaseImage.prototype.oj6 = function () {
return this.qj8_1.e72();
};
BaseImage.prototype.p8c = function () {
return this.qj8_1.p8c();
};
BaseImage.prototype.q8c = function () {
return this.qj8_1.q8c();
};
BaseImage.prototype.y8b = function () {
return this.qj8_1.y8b();
};
BaseImage.prototype.z8b = function () {
return this.qj8_1.z8b();
};
BaseImage.prototype.aj9 = function () {
return this.tj2() * this.y8b();
};
BaseImage.prototype.bj9 = function () {
return this.vj2() * this.z8b();
};
BaseImage.prototype.bi0 = function () {
return this.aj9() - this.p8c();
};
BaseImage.prototype.ci0 = function () {
return this.bj9() - this.q8c();
};
BaseImage.prototype.uhw = function (out) {
out.u72(-this.aj9(), -this.bj9(), this.y8b(), this.z8b());
};
BaseImage.prototype.toString = function () {
return RectBase.prototype.toString.call(this) + (':bitmap=' + this.y8x());
};
BaseImage.$metadata$ = classMeta('BaseImage', undefined, undefined, undefined, undefined, RectBase.prototype);
function SmoothedBmpSlice() {
}
SmoothedBmpSlice.$metadata$ = interfaceMeta('SmoothedBmpSlice');
function image(_this__u8e3s4, texture, anchorX, anchorY, callback) {
var tmp$ret$1;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp0_addTo = Image_init_$Create$(texture, anchorX, anchorY, null, false, 24, null);
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = addTo(tmp0_addTo, _this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
callback(tmp0_apply);
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0;
return tmp$ret$1;
}
function image_0(_this__u8e3s4, texture, anchorX, anchorY, callback) {
var tmp$ret$1;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp0_addTo = Image_init_$Create$_0(texture, anchorX, anchorY, null, false, 24, null);
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = addTo(tmp0_addTo, _this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
callback(tmp0_apply);
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0;
return tmp$ret$1;
}
function recomputeVerticesIfRequired($this) {
var viewBounds = $this.sid_1;
if ((_RectangleInt___get_rect__impl__gu7bbg($this.zid_1).equals(_RectangleInt___get_rect__impl__gu7bbg(viewBounds)) ? equals($this.yid_1, $this.qid_1) : false) ? $this.xid_1 === $this.ei1() : false)
return Unit_getInstance();
_RectangleInt___get_rect__impl__gu7bbg($this.zid_1).u7c(_RectangleInt___get_rect__impl__gu7bbg(viewBounds));
$this.yid_1 = $this.qid_1;
$this.xid_1 = $this.ei1();
var ninePatch = $this.qid_1;
if (ninePatch == null) {
$this.uid_1 = null;
$this.vid_1 = null;
return Unit_getInstance();
}
var numQuads = ninePatch.c8g_1.q8h();
var tmp$ret$0;
// Inline function 'com.soywiz.korge.render.Companion.quadIndices' call
var tmp0_quadIndices = Companion_getInstance_48();
tmp$ret$0 = TEXTURED_ARRAY_quadIndices(numQuads);
var indices = tmp$ret$0;
var tmp = imul(numQuads, 4);
var tva = TexturedVertexArray_init_$Create$(tmp, indices, 0, 4, null);
var index = {_v: 0};
var matrix = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
ninePatch.c8g_1.u8h(viewBounds, false, NinePatchEx$recomputeVerticesIfRequired$lambda(ninePatch, tva, index, matrix, $this), 2, null);
$this.uid_1 = tva;
var tmp_0 = $this;
var tmp_1 = imul(numQuads, 4);
tmp_0.vid_1 = TexturedVertexArray_init_$Create$(tmp_1, indices, 0, 4, null);
$this.wid_1.t76();
var tmp0_this = $this;
var tmp1 = tmp0_this.tid_1;
tmp0_this.tid_1 = tmp1 + 1 | 0;
}
function NinePatchEx$recomputeVerticesIfRequired$lambda($ninePatch, $tva, $index, $matrix, this$0) {
return function (segment, x, y, width, height) {
var bmpSlice = $ninePatch.e8g(segment);
var tmp0 = $index._v;
$index._v = tmp0 + 1 | 0;
$tva.yhd(imul(tmp0, 4), x, y, width, height, $matrix, bmpSlice, this$0.ei1(), this$0.fi1());
return Unit_getInstance();
};
}
function $forceLoadSourceFileCOROUTINE$18(_this__u8e3s4, views, currentVfs, sourceFile, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.njp_1 = _this__u8e3s4;
this.ojp_1 = views;
this.pjp_1 = currentVfs;
this.qjp_1 = sourceFile;
}
$forceLoadSourceFileCOROUTINE$18.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 5;
this.o7_1 = 1;
suspendResult = this.njp_1.vjo(this.njp_1, this.ojp_1, this.pjp_1, this.qjp_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
this.p7_1 = 3;
this.o7_1 = 2;
var tmp_0 = this.pjp_1.c19('' + this.qjp_1);
suspendResult = readNinePatch$default(tmp_0, null, this, 1, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 2:
this.rjp_1 = suspendResult;
this.p7_1 = 5;
this.o7_1 = 4;
continue $sm;
case 3:
this.p7_1 = 5;
var tmp_1 = this.r7_1;
if (tmp_1 instanceof Error) {
var e = this.r7_1;
var tmp_2 = this;
if (e instanceof CancellationException)
throw e;
tmp_2.rjp_1 = Companion_getInstance_24().z8f(Bitmap32_init_$Create$(62, 62));
this.o7_1 = 4;
continue $sm;
} else {
throw this.r7_1;
}
break;
case 4:
this.p7_1 = 5;
var ARGUMENT = this.rjp_1;
this.njp_1.aie(ARGUMENT);
return Unit_getInstance();
case 5:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 5) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$forceLoadSourceFileCOROUTINE$18.$metadata$ = classMeta('$forceLoadSourceFileCOROUTINE$18', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function NinePatchEx(ninePatch, width, height) {
View_init_$Init$(this);
this.nid_1 = new Mixin_0();
this.oid_1 = width;
this.pid_1 = height;
this.qid_1 = ninePatch;
this.rid_1 = true;
this.sid_1 = Companion_getInstance_25().h7d();
this.tid_1 = 0;
this.uid_1 = null;
this.vid_1 = null;
var tmp = this;
tmp.wid_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
this.xid_1 = Colors_getInstance().s7z_1;
this.yid_1 = null;
this.zid_1 = Companion_getInstance_25().h7d();
}
NinePatchEx.prototype.wjo = function (_set____db54di) {
this.nid_1.wjo(_set____db54di);
};
NinePatchEx.prototype.zjo = function (_set____db54di) {
this.nid_1.xjo_1 = _set____db54di;
};
NinePatchEx.prototype.ajp = function (ctx, view) {
this.nid_1.ajp(ctx, view);
};
NinePatchEx.prototype.vjo = function (_this__u8e3s4, views, currentVfs, sourceFile, $cont) {
return this.nid_1.vjo(_this__u8e3s4, views, currentVfs, sourceFile, $cont);
};
NinePatchEx.prototype.cav = function (value) {
if (this.oid_1 === value)
return Unit_getInstance();
this.oid_1 = value;
this.dg8();
};
NinePatchEx.prototype.d72 = function () {
return this.oid_1;
};
NinePatchEx.prototype.p7c = function (value) {
if (this.pid_1 === value)
return Unit_getInstance();
this.pid_1 = value;
this.dg8();
};
NinePatchEx.prototype.e72 = function () {
return this.pid_1;
};
NinePatchEx.prototype.aie = function (value) {
if (this.qid_1 === value)
return Unit_getInstance();
this.qid_1 = value;
this.dg8();
};
NinePatchEx.prototype.xhw = function (ctx) {
if (!this.pck())
return Unit_getInstance();
this.ajp(ctx, this);
var m = this.pgw();
var xscale = m.i74_1;
var yscale = m.l74_1;
setTo(this.sid_1, 0, 0, numberToInt(this.oid_1 * xscale), numberToInt(this.pid_1 * yscale));
var tmp$ret$3;
$l$block_0: {
// Inline function 'com.soywiz.korma.geom.Matrix.keepMatrix' call
var a = m.i74_1;
var b = m.j74_1;
var c = m.k74_1;
var d = m.l74_1;
var tx = m.m74_1;
var ty = m.n74_1;
try {
m.k76(1.0 / xscale, 1.0 / yscale);
var ninePatch = this.qid_1;
var tmp;
if (!(ninePatch == null)) {
recomputeVerticesIfRequired(this);
var tvaCached = this.vid_1;
var tmp_0;
if (!(tvaCached == null)) {
if (!this.wid_1.equals(m)) {
this.wid_1.f76(m);
tvaCached.ahe(ensureNotNull(this.uid_1));
tvaCached.bhe(m);
}
var tmp$ret$2;
// Inline function 'com.soywiz.korge.render.RenderContext.useBatcher' call
var tmp$ret$1;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.use' call
var tmp0_use = ctx.gga_1;
var tmp0_useBatcher = tmp0_use.vga_1;
if (!(tmp0_useBatcher.tga_1 === tmp0_use)) {
tmp0_useBatcher.mj();
tmp0_useBatcher.tga_1 = tmp0_use;
}
var tmp0_drawVertices = ctx.phb(ninePatch.b8g_1.k8b());
var tmp1_drawVertices = this.rid_1;
var tmp2_drawVertices = this.sgf_1;
var tmp3_drawVertices = ninePatch.b8g_1.k8b().s7y_1;
var tmp4_drawVertices = tvaCached.jh8_1;
var tmp5_drawVertices = tvaCached.kh8_1;
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.setStateFast' call
var tmp0_setStateFast = tmp0_drawVertices.vh4_1;
tmp0_use.ch8(tmp5_drawVertices, tmp4_drawVertices);
var isCurrentStateFast = tmp0_use.rh8(tmp0_setStateFast, tmp1_drawVertices, tmp2_drawVertices, null);
if (isCurrentStateFast) {
tmp$ret$0 = Unit_getInstance();
break $l$block;
}
tmp0_use.th7(false, false, 3, null);
tmp0_use.sgb_1 = 0;
tmp0_use.tgb_1[0] = tmp0_setStateFast;
tmp0_use.ugb_1 = tmp1_drawVertices;
tmp0_use.vgb_1 = tmp2_drawVertices;
tmp0_use.wgb_1 = null;
}
tmp0_use.ph8(tvaCached, null, tmp4_drawVertices, tmp5_drawVertices, 0, tmp3_drawVertices, false, 16, null);
tmp$ret$1 = Unit_getInstance();
tmp$ret$2 = tmp$ret$1;
tmp_0 = tmp$ret$2;
}
tmp = tmp_0;
}
tmp$ret$3 = tmp;
break $l$block_0;
}finally {
m.i74_1 = a;
m.j74_1 = b;
m.k74_1 = c;
m.l74_1 = d;
m.m74_1 = tx;
m.n74_1 = ty;
}
}
};
NinePatchEx.prototype.uhw = function (out) {
out.u72(0.0, 0.0, this.oid_1, this.pid_1);
};
NinePatchEx.prototype.bjp = function (views, currentVfs, sourceFile, $cont) {
var tmp = new $forceLoadSourceFileCOROUTINE$18(this, views, currentVfs, sourceFile, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
NinePatchEx.$metadata$ = classMeta('NinePatchEx', [ViewFileRef], undefined, undefined, undefined, View.prototype);
function ninePatch(_this__u8e3s4, ninePatch, width, height, callback) {
var tmp$ret$1;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp0_addTo = new NinePatchEx(ninePatch, width, height);
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = addTo(tmp0_addTo, _this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
callback(tmp0_apply);
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0;
return tmp$ret$1;
}
function RectBase_init_$Init$(anchorX, anchorY, hitShape, smoothing, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
anchorX = 0.0;
if (!(($mask0 & 2) === 0))
anchorY = anchorX;
if (!(($mask0 & 4) === 0))
hitShape = null;
if (!(($mask0 & 8) === 0))
smoothing = true;
RectBase.call($this, anchorX, anchorY, hitShape, smoothing);
return $this;
}
function RectBase(anchorX, anchorY, hitShape, smoothing) {
View_init_$Init$(this);
this.pj8_1 = smoothing;
this.fj9(hitShape);
var tmp = this;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.white' call
var tmp0__get_white__j8g7zy = Bitmaps_getInstance();
tmp$ret$0 = get_Bitmaps_white();
tmp.qj8_1 = tmp$ret$0;
this.rj8_1 = anchorX;
this.sj8_1 = anchorY;
var tmp_0 = this;
var tmp$ret$1;
// Inline function 'com.soywiz.korge.render.Companion.QUAD_INDICES' call
var tmp0__get_QUAD_INDICES__35d4te = Companion_getInstance_48();
tmp$ret$1 = get_TEXTURED_ARRAY_QUAD_INDICES();
var tmp_1 = tmp$ret$1;
tmp_0.tj8_1 = TexturedVertexArray_init_$Create$(4, tmp_1, 0, 4, null);
this.uj8_1 = false;
this.vj8_1 = null;
this.wj8_1 = null;
}
RectBase.prototype.cj9 = function (v) {
if (!(this.qj8_1 === v)) {
this.qj8_1 = v;
this.sgg_1 = true;
this.dg8();
}
};
RectBase.prototype.sj2 = function (v) {
if (!(this.rj8_1 === v)) {
this.rj8_1 = v;
this.sgg_1 = true;
this.dg8();
}
};
RectBase.prototype.tj2 = function () {
return this.rj8_1;
};
RectBase.prototype.uj2 = function (v) {
if (!(this.sj8_1 === v)) {
this.sj8_1 = v;
this.sgg_1 = true;
this.dg8();
}
};
RectBase.prototype.vj2 = function () {
return this.sj8_1;
};
RectBase.prototype.nj6 = function () {
return 0.0;
};
RectBase.prototype.oj6 = function () {
return 0.0;
};
RectBase.prototype.bi0 = function () {
return this.tj2() * this.nj6();
};
RectBase.prototype.ci0 = function () {
return this.vj2() * this.oj6();
};
RectBase.prototype.xj8 = function () {
return -this.bi0();
};
RectBase.prototype.yj8 = function () {
return -this.ci0();
};
RectBase.prototype.xhw = function (ctx) {
if (!this.pck())
return Unit_getInstance();
var tmp = this.qj8_1;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.transparent' call
var tmp0__get_transparent__6k58e1 = Bitmaps_getInstance();
tmp$ret$0 = get_Bitmaps_transparent();
if (tmp === tmp$ret$0)
return Unit_getInstance();
if (this.sgg_1) {
this.sgg_1 = false;
this.ej9();
}
this.dj9(ctx);
};
RectBase.prototype.dj9 = function (ctx) {
var tmp$ret$5;
// Inline function 'com.soywiz.korge.render.RenderContext.useBatcher' call
var tmp$ret$4;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.use' call
var tmp0_use = ctx.gga_1;
var tmp0_useBatcher = tmp0_use.vga_1;
if (!(tmp0_useBatcher.tga_1 === tmp0_use)) {
tmp0_useBatcher.mj();
tmp0_useBatcher.tga_1 = tmp0_use;
}
var tmp$ret$3;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.setTemporalUniforms' call
var tmp0_setTemporalUniforms = this.wj8_1;
var tmp1_setTemporalUniforms = tmp0_use.vga_1;
var tmp$ret$2;
// Inline function 'com.soywiz.kds.Pool.invoke' call
var tmp0_invoke = tmp1_setTemporalUniforms.xg9_1;
var tmp$ret$1;
$l$block_0: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var temp = tmp0_invoke.t4t();
try {
if (!(tmp0_setTemporalUniforms == null) ? tmp0_setTemporalUniforms.t4o() : false) {
tmp1_setTemporalUniforms.mj();
temp.rb6(tmp1_setTemporalUniforms.uh7());
tmp1_setTemporalUniforms.uh7().qb6(tmp0_setTemporalUniforms);
}
var tmp;
try {
var tmp1__anonymous__uwfjfc = tmp1_setTemporalUniforms.uh7();
var tmp0_drawVertices = this.tj8_1;
var tmp1_drawVertices = ctx.ohb(this.qj8_1).x8b();
var tmp2_drawVertices = this.pj8_1;
var tmp3_drawVertices = this.di1();
var tmp4_drawVertices = this.vj8_1;
var tmp5_drawVertices = this.qj8_1.x8b().s7y_1;
var tmp6_drawVertices = this.uj8_1;
var tmp7_drawVertices = tmp0_drawVertices.jh8_1;
var tmp8_drawVertices = tmp0_drawVertices.kh8_1;
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.setStateFast' call
var tmp0_setStateFast = tmp1_drawVertices.vh4_1;
tmp0_use.ch8(tmp8_drawVertices, tmp7_drawVertices);
var isCurrentStateFast = tmp0_use.rh8(tmp0_setStateFast, tmp2_drawVertices, tmp3_drawVertices, tmp4_drawVertices);
if (isCurrentStateFast) {
tmp$ret$0 = Unit_getInstance();
break $l$block;
}
tmp0_use.th7(false, false, 3, null);
tmp0_use.sgb_1 = 0;
tmp0_use.tgb_1[0] = tmp0_setStateFast;
tmp0_use.ugb_1 = tmp2_drawVertices;
tmp0_use.vgb_1 = tmp3_drawVertices;
tmp0_use.wgb_1 = tmp4_drawVertices;
}
tmp0_use.ph8(tmp0_drawVertices, null, tmp7_drawVertices, tmp8_drawVertices, 0, tmp5_drawVertices, tmp6_drawVertices, 16, null);
tmp = Unit_getInstance();
}finally {
if (!(tmp0_setTemporalUniforms == null) ? tmp0_setTemporalUniforms.t4o() : false) {
tmp1_setTemporalUniforms.mj();
tmp1_setTemporalUniforms.uh7().rb6(temp);
}
}
tmp$ret$1 = tmp;
break $l$block_0;
}finally {
tmp0_invoke.u4t(temp);
}
}
tmp$ret$2 = tmp$ret$1;
tmp$ret$3 = tmp$ret$2;
tmp$ret$4 = tmp$ret$3;
tmp$ret$5 = tmp$ret$4;
};
RectBase.prototype.ej9 = function () {
this.tj8_1.xhd(0, this.xj8(), this.yj8(), this.nj6(), this.oj6(), this.pgw(), this.qj8_1, this.ei1(), this.fi1());
};
RectBase.prototype.uhw = function (out) {
out.u72(this.xj8(), this.yj8(), this.nj6(), this.oj6());
};
RectBase.prototype.toString = function () {
var out = View.prototype.toString.call(this);
if (!(this.tj2() === 0.0) ? true : !(this.vj2() === 0.0))
out = out + (':anchor=(' + this.si1(this.tj2()) + ', ' + this.si1(this.vj2()) + ')');
return out;
};
RectBase.$metadata$ = classMeta('RectBase', [Anchorable], undefined, undefined, undefined, View.prototype);
function Renderable() {
}
Renderable.$metadata$ = interfaceMeta('Renderable');
function ViewRenderer() {
}
ViewRenderer.$metadata$ = interfaceMeta('ViewRenderer');
function RenderableView(width, height, viewRenderer) {
CustomContextRenderizableView.call(this, width, height);
this.xit_1 = viewRenderer;
this.yit_1 = false;
this.zit_1 = false;
this.aiu_1 = false;
}
RenderableView.prototype.sjp = function (_set____db54di) {
this.zit_1 = _set____db54di;
};
RenderableView.prototype.ljd = function (context, width, height) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = this.xit_1;
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.RenderableView.renderer.<anonymous>' call
tmp0_apply.yio(this);
tmp$ret$0 = tmp0_apply;
};
RenderableView.$metadata$ = classMeta('RenderableView', undefined, undefined, undefined, undefined, CustomContextRenderizableView.prototype);
function renderableView(_this__u8e3s4, width, height, viewRenderer) {
return addTo(new RenderableView(width, height, viewRenderer), _this__u8e3s4);
}
function RoundRect_init_$Init$(width, height, rx, ry, fill, stroke, strokeThickness, autoScaling, $mask0, $marker, $this) {
if (!(($mask0 & 8) === 0))
ry = rx;
if (!(($mask0 & 16) === 0))
fill = new RGBA(Colors_getInstance().s7z_1);
if (!(($mask0 & 32) === 0))
stroke = new RGBA(Colors_getInstance().s7z_1);
if (!(($mask0 & 64) === 0))
strokeThickness = 0.0;
if (!(($mask0 & 128) === 0))
autoScaling = true;
RoundRect.call($this, width, height, rx, ry, fill, stroke, strokeThickness, autoScaling);
return $this;
}
function RoundRect_init_$Create$(width, height, rx, ry, fill, stroke, strokeThickness, autoScaling, $mask0, $marker) {
return RoundRect_init_$Init$(width, height, rx, ry, fill, stroke, strokeThickness, autoScaling, $mask0, $marker, Object.create(RoundRect.prototype));
}
function updateGraphics($this) {
// Inline function 'com.soywiz.korge.view.ShapeView.updatePath' call
// Inline function 'com.soywiz.korge.view.RoundRect.updateGraphics.<anonymous>' call
var tmp0__anonymous__q1qw7t = $this.mjs_1;
tmp0__anonymous__q1qw7t.x7();
roundRect_0(tmp0__anonymous__q1qw7t, 0.0, 0.0, $this.d72(), $this.e72(), $this.mjv(), $this.njv());
tmp0__anonymous__q1qw7t.k7j_1 = true;
$this.ijs_1 = $this.mjs_1;
$this.ojv();
}
function RoundRect$width$delegate$lambda(this$0) {
return function (it) {
updateGraphics(this$0);
return Unit_getInstance();
};
}
function RoundRect$height$delegate$lambda(this$0) {
return function (it) {
updateGraphics(this$0);
return Unit_getInstance();
};
}
function RoundRect$rx$delegate$lambda(this$0) {
return function (it) {
updateGraphics(this$0);
return Unit_getInstance();
};
}
function RoundRect$ry$delegate$lambda(this$0) {
return function (it) {
updateGraphics(this$0);
return Unit_getInstance();
};
}
function RoundRect(width, height, rx, ry, fill, stroke, strokeThickness, autoScaling) {
var tmp = VectorPath_init_$Create$(null, null, null, false, 15, null);
ShapeView_init_$Init$(tmp, fill, stroke, strokeThickness, autoScaling, null, 32, null, this);
var tmp_0 = this;
var tmp$ret$0;
// Inline function 'com.soywiz.korge.ui.uiObservable' call
var tmp0_uiObservable = RoundRect$width$delegate$lambda(this);
tmp$ret$0 = new UIObservable(width, tmp0_uiObservable);
tmp_0.hjv_1 = tmp$ret$0;
var tmp_1 = this;
var tmp$ret$1;
// Inline function 'com.soywiz.korge.ui.uiObservable' call
var tmp0_uiObservable_0 = RoundRect$height$delegate$lambda(this);
tmp$ret$1 = new UIObservable(height, tmp0_uiObservable_0);
tmp_1.ijv_1 = tmp$ret$1;
var tmp_2 = this;
var tmp$ret$2;
// Inline function 'com.soywiz.korge.ui.uiObservable' call
var tmp0_uiObservable_1 = RoundRect$rx$delegate$lambda(this);
tmp$ret$2 = new UIObservable(rx, tmp0_uiObservable_1);
tmp_2.jjv_1 = tmp$ret$2;
var tmp_3 = this;
var tmp$ret$3;
// Inline function 'com.soywiz.korge.ui.uiObservable' call
var tmp0_uiObservable_2 = RoundRect$ry$delegate$lambda(this);
tmp$ret$3 = new UIObservable(ry, tmp0_uiObservable_2);
tmp_3.kjv_1 = tmp$ret$3;
this.ljv_1 = colorMul$factory(this);
updateGraphics(this);
}
RoundRect.prototype.cav = function (_set____db54di) {
return this.hjv_1.sii(this, width$factory_1(), _set____db54di);
};
RoundRect.prototype.d72 = function () {
return this.hjv_1.rii(this, width$factory_2());
};
RoundRect.prototype.p7c = function (_set____db54di) {
return this.ijv_1.sii(this, height$factory_1(), _set____db54di);
};
RoundRect.prototype.e72 = function () {
return this.ijv_1.rii(this, height$factory_2());
};
RoundRect.prototype.pjv = function (_set____db54di) {
return this.jjv_1.sii(this, rx$factory(), _set____db54di);
};
RoundRect.prototype.mjv = function () {
return this.jjv_1.rii(this, rx$factory_0());
};
RoundRect.prototype.qjv = function (_set____db54di) {
return this.kjv_1.sii(this, ry$factory(), _set____db54di);
};
RoundRect.prototype.njv = function () {
return this.kjv_1.rii(this, ry$factory_0());
};
RoundRect.$metadata$ = classMeta('RoundRect', undefined, undefined, undefined, undefined, ShapeView.prototype);
function roundRect_1(_this__u8e3s4, width, height, rx, ry, fill, stroke, strokeThickness, autoScaling, callback) {
var tmp$ret$2;
// Inline function 'com.soywiz.korge.view.roundRect' call
var tmp1_roundRect = width;
var tmp2_roundRect = height;
var tmp3_roundRect = rx;
var tmp4_roundRect = ry;
var tmp$ret$1;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp0_addTo = new RoundRect(tmp1_roundRect, tmp2_roundRect, tmp3_roundRect, tmp4_roundRect, fill, stroke, strokeThickness, autoScaling);
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = addTo(tmp0_addTo, _this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
callback(tmp0_apply);
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
return tmp$ret$2;
}
function roundRect_2(_this__u8e3s4, width, height, rx, ry, fill, stroke, strokeThickness, autoScaling, callback) {
var tmp$ret$1;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp0_addTo = new RoundRect(width, height, rx, ry, fill, stroke, strokeThickness, autoScaling);
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = addTo(tmp0_addTo, _this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
callback(tmp0_apply);
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0;
return tmp$ret$1;
}
function colorMul$factory($b0) {
return getPropertyCallableRef('colorMul', 0, KMutableProperty0, function () {
return new RGBA($b0.y8j());
}, function (value) {
return $b0.x8j(value.n8k_1);
});
}
function width$factory_1() {
return getPropertyCallableRef('width', 1, KMutableProperty1, function (receiver) {
return receiver.d72();
}, function (receiver, value) {
return receiver.cav(value);
});
}
function width$factory_2() {
return getPropertyCallableRef('width', 1, KMutableProperty1, function (receiver) {
return receiver.d72();
}, function (receiver, value) {
return receiver.cav(value);
});
}
function height$factory_1() {
return getPropertyCallableRef('height', 1, KMutableProperty1, function (receiver) {
return receiver.e72();
}, function (receiver, value) {
return receiver.p7c(value);
});
}
function height$factory_2() {
return getPropertyCallableRef('height', 1, KMutableProperty1, function (receiver) {
return receiver.e72();
}, function (receiver, value) {
return receiver.p7c(value);
});
}
function rx$factory() {
return getPropertyCallableRef('rx', 1, KMutableProperty1, function (receiver) {
return receiver.mjv();
}, function (receiver, value) {
return receiver.pjv(value);
});
}
function rx$factory_0() {
return getPropertyCallableRef('rx', 1, KMutableProperty1, function (receiver) {
return receiver.mjv();
}, function (receiver, value) {
return receiver.pjv(value);
});
}
function ry$factory() {
return getPropertyCallableRef('ry', 1, KMutableProperty1, function (receiver) {
return receiver.njv();
}, function (receiver, value) {
return receiver.qjv(value);
});
}
function ry$factory_0() {
return getPropertyCallableRef('ry', 1, KMutableProperty1, function (receiver) {
return receiver.njv();
}, function (receiver, value) {
return receiver.qjv(value);
});
}
function ShapeView_init_$Init$(shape, fill, stroke, strokeThickness, autoScaling, renderer, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
shape = null;
if (!(($mask0 & 2) === 0))
fill = new RGBA(Colors_getInstance().s7z_1);
if (!(($mask0 & 4) === 0))
stroke = new RGBA(Colors_getInstance().s7z_1);
if (!(($mask0 & 8) === 0))
strokeThickness = 1.0;
if (!(($mask0 & 16) === 0))
autoScaling = true;
if (!(($mask0 & 32) === 0))
renderer = GraphicsRenderer_GPU_getInstance();
ShapeView.call($this, shape, fill, stroke, strokeThickness, autoScaling, renderer);
return $this;
}
function ShapeView(shape, fill, stroke, strokeThickness, autoScaling, renderer) {
Container.call(this);
var tmp = this;
tmp.bjs_1 = addTo(Graphics_init_$Create$(null, renderer, 1, null), this);
this.bjs_1.ujl(autoScaling);
this.cjs_1 = anchorX$factory(this.bjs_1);
this.djs_1 = anchorY$factory(this.bjs_1);
this.ejs_1 = autoScaling$factory(this.bjs_1);
this.fjs_1 = renderer$factory(this.bjs_1);
this.gjs_1 = smoothing$factory(this.bjs_1);
this.hjs_1 = boundsIncludeStrokes$factory(this.bjs_1);
this.ijs_1 = shape;
this.jjs_1 = fill;
this.kjs_1 = stroke;
this.ljs_1 = strokeThickness;
this.ojv();
var tmp_0 = this;
tmp_0.mjs_1 = VectorPath_init_$Create$(null, null, null, false, 15, null);
}
ShapeView.prototype.sj2 = function (_set____db54di) {
var tmp0_setValue = anchorX$factory_0();
return this.cjs_1.set(_set____db54di);
};
ShapeView.prototype.tj2 = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = anchorX$factory_1();
tmp$ret$0 = this.cjs_1.get();
return tmp$ret$0;
};
ShapeView.prototype.uj2 = function (_set____db54di) {
var tmp0_setValue = anchorY$factory_0();
return this.djs_1.set(_set____db54di);
};
ShapeView.prototype.vj2 = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = anchorY$factory_1();
tmp$ret$0 = this.djs_1.get();
return tmp$ret$0;
};
ShapeView.prototype.bi0 = function () {
return this.bjs_1.bi0();
};
ShapeView.prototype.ci0 = function () {
return this.bjs_1.ci0();
};
ShapeView.prototype.q5n = function () {
return this.ijs_1;
};
ShapeView.prototype.rjv = function (block) {
block(this.mjs_1);
this.ijs_1 = this.mjs_1;
this.ojv();
};
ShapeView.prototype.ojv = function () {
var tmp$ret$5;
// Inline function 'com.soywiz.korge.view.Graphics.updateShape' call
var tmp0_updateShape = this.bjs_1;
var result;
var tmp$ret$4;
// Inline function 'com.soywiz.korim.vector.buildShape' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$3;
// Inline function 'kotlin.apply' call
var tmp0_apply = new ShapeBuilder(null, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.Graphics.updateShape.<anonymous>' call
var shapeView = this;
var shape = shapeView.q5n();
var tmp;
if (!(shape == null) ? isNotEmpty(shape) : false) {
var tmp_0;
if (!(shapeView.ljs_1 === 0.0)) {
var tmp0_fillStroke = shapeView.jjs_1;
var tmp1_fillStroke = shapeView.kjs_1;
var tmp_1 = shapeView.ljs_1;
var tmp2_fillStroke = StrokeInfo_init_$Create$(tmp_1, false, null, null, null, null, 0.0, null, 0.0, 510, null);
// Inline function 'com.soywiz.korge.view.ShapeView._updateShapeGraphics.<anonymous>.<anonymous>' call
tmp0_apply.w9k(shape);
if (!(tmp0_fillStroke == null)) {
tmp0_apply.p8u(tmp0_fillStroke, null, 2, null);
}
var tmp_2;
if (!(tmp1_fillStroke == null)) {
var tmp_3;
if (!(tmp2_fillStroke == null)) {
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.korim.vector.Context2d.stroke' call
if (tmp1_fillStroke == null ? true : tmp2_fillStroke == null) {
tmp$ret$0 = Unit_getInstance();
break $l$block;
}
// Inline function 'com.soywiz.korim.vector.Context2d.stroke' call
var tmp0_stroke = tmp2_fillStroke.t7j_1;
var tmp1_stroke = tmp2_fillStroke.w7j_1;
var tmp2_stroke = tmp2_fillStroke.y7j_1;
var tmp3_stroke = tmp2_fillStroke.z7j_1;
var tmp4_stroke = tmp2_fillStroke.a7k_1;
var tmp5_stroke = tmp2_fillStroke.b7k_1;
if (false) {
tmp0_apply.h8r();
}
var tmp$ret$1;
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
tmp$ret$1 = Unit_getInstance();
// Inline function 'com.soywiz.korim.vector.Context2d.keep' call
tmp0_apply.w8u();
try {
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
tmp0_apply.x8u(tmp0_stroke);
tmp0_apply.y8u(tmp1_stroke);
tmp0_apply.z8u(tmp2_stroke);
tmp0_apply.a8v(tmp3_stroke);
tmp0_apply.b8v(tmp4_stroke);
tmp0_apply.c8v(tmp5_stroke);
tmp0_apply.d8v(tmp1_fillStroke);
}finally {
tmp0_apply.e8v();
}
}
tmp_3 = tmp$ret$0;
} else {
var tmp0_stroke_0 = tmp0_apply.q8u();
var tmp1_stroke_0 = tmp0_apply.r8u();
var tmp2_stroke_0 = tmp0_apply.s8u();
var tmp3_stroke_0 = tmp0_apply.t8u();
var tmp4_stroke_0 = tmp0_apply.u8u();
var tmp5_stroke_0 = tmp0_apply.v8u();
if (false) {
tmp0_apply.h8r();
}
var tmp$ret$2;
// Inline function 'com.soywiz.korim.vector.Context2d.stroke.<anonymous>' call
tmp$ret$2 = Unit_getInstance();
tmp0_apply.w8u();
var tmp_4;
try {
tmp0_apply.x8u(tmp0_stroke_0);
tmp0_apply.y8u(tmp1_stroke_0);
tmp0_apply.z8u(tmp2_stroke_0);
tmp0_apply.a8v(tmp3_stroke_0);
tmp0_apply.b8v(tmp4_stroke_0);
tmp0_apply.c8v(tmp5_stroke_0);
tmp0_apply.d8v(tmp1_fillStroke);
tmp_4 = Unit_getInstance();
}finally {
tmp0_apply.e8v();
}
tmp_3 = tmp_4;
}
tmp_2 = tmp_3;
}
tmp_0 = tmp_2;
} else {
var tmp3_fill = shapeView.jjs_1;
{
tmp0_apply.h8r();
}
// Inline function 'com.soywiz.korge.view.ShapeView._updateShapeGraphics.<anonymous>.<anonymous>' call
tmp0_apply.w9k(shape);
tmp0_apply.oa4(tmp3_fill, null);
tmp_0 = Unit_getInstance();
}
tmp = tmp_0;
}
result = tmp;
tmp$ret$3 = tmp0_apply;
tmp$ret$4 = tmp$ret$3.w9h();
tmp0_updateShape.ojl(tmp$ret$4);
tmp$ret$5 = result;
};
ShapeView.$metadata$ = classMeta('ShapeView', [Anchorable, ViewLeaf], undefined, undefined, undefined, Container.prototype);
function anchorX$factory($b0) {
return getPropertyCallableRef('anchorX', 0, KMutableProperty0, function () {
return $b0.tj2();
}, function (value) {
return $b0.sj2(value);
});
}
function anchorY$factory($b0) {
return getPropertyCallableRef('anchorY', 0, KMutableProperty0, function () {
return $b0.vj2();
}, function (value) {
return $b0.uj2(value);
});
}
function autoScaling$factory($b0) {
return getPropertyCallableRef('autoScaling', 0, KMutableProperty0, function () {
return $b0.gji_1;
}, function (value) {
return $b0.ujl(value);
});
}
function renderer$factory($b0) {
return getPropertyCallableRef('renderer', 0, KMutableProperty0, function () {
return $b0.iji_1;
}, function (value) {
return $b0.vjl(value);
});
}
function smoothing$factory($b0) {
return getPropertyCallableRef('smoothing', 0, KMutableProperty0, function () {
return $b0.fji_1;
}, function (value) {
return $b0.tjl(value);
});
}
function boundsIncludeStrokes$factory($b0) {
return getPropertyCallableRef('boundsIncludeStrokes', 0, KMutableProperty0, function () {
return $b0.sjl();
}, function (value) {
return $b0.rjl(value);
});
}
function anchorX$factory_0() {
return getPropertyCallableRef('anchorX', 1, KMutableProperty1, function (receiver) {
return receiver.tj2();
}, function (receiver, value) {
return receiver.sj2(value);
});
}
function anchorX$factory_1() {
return getPropertyCallableRef('anchorX', 1, KMutableProperty1, function (receiver) {
return receiver.tj2();
}, function (receiver, value) {
return receiver.sj2(value);
});
}
function anchorY$factory_0() {
return getPropertyCallableRef('anchorY', 1, KMutableProperty1, function (receiver) {
return receiver.vj2();
}, function (receiver, value) {
return receiver.uj2(value);
});
}
function anchorY$factory_1() {
return getPropertyCallableRef('anchorY', 1, KMutableProperty1, function (receiver) {
return receiver.vj2();
}, function (receiver, value) {
return receiver.uj2(value);
});
}
function Companion_22() {
Companion_instance_22 = this;
}
Companion_22.$metadata$ = objectMeta('Companion');
var Companion_instance_22;
function Companion_getInstance_54() {
if (Companion_instance_22 == null)
new Companion_22();
return Companion_instance_22;
}
function SolidRect(width, height, color) {
Companion_getInstance_54();
RectBase_init_$Init$(0.0, 0.0, null, false, 15, null, this);
this.ajy_1 = width;
this.bjy_1 = height;
this.x8j(color);
}
SolidRect.prototype.cav = function (v) {
if (!(this.ajy_1 === v)) {
this.ajy_1 = v;
this.sgg_1 = true;
this.dg8();
}
};
SolidRect.prototype.d72 = function () {
return this.ajy_1;
};
SolidRect.prototype.p7c = function (v) {
if (!(this.bjy_1 === v)) {
this.bjy_1 = v;
this.sgg_1 = true;
this.dg8();
}
};
SolidRect.prototype.e72 = function () {
return this.bjy_1;
};
SolidRect.prototype.nj6 = function () {
return this.ajy_1;
};
SolidRect.prototype.oj6 = function () {
return this.bjy_1;
};
SolidRect.prototype.zih = function (value) {
this.x8j(value);
};
SolidRect.$metadata$ = classMeta('SolidRect', undefined, undefined, undefined, undefined, RectBase.prototype);
function solidRect(_this__u8e3s4, width, height, color, callback) {
var tmp$ret$1;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp0_addTo = new SolidRect(width, height, color);
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = addTo(tmp0_addTo, _this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
callback(tmp0_apply);
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0;
return tmp$ret$1;
}
function Stage(views) {
FixedSizeContainer_init_$Init$(0.0, 0.0, false, 7, null, this);
this.hgs_1 = views;
this.igs_1 = new Mixin();
this.jgs_1 = views.lfw_1;
this.kgs_1 = clipBorders$factory(this.hgs_1);
this.lgs_1 = virtualWidthDouble$factory(this.hgs_1);
this.mgs_1 = virtualHeightDouble$factory(this.hgs_1);
this.ngs_1 = this;
this.ogs_1 = new Point(0.0, 0.0);
}
Stage.prototype.mh0 = function () {
return this.hgs_1;
};
Stage.prototype.b1u = function () {
return this.hgs_1.bfw_1;
};
Stage.prototype.nc3 = function (clazz, handler) {
return this.igs_1.nc3(clazz, handler);
};
Stage.prototype.oc3 = function (clazz, event) {
this.igs_1.oc3(clazz, event);
};
Stage.prototype.pha = function () {
return this.jgs_1.pha();
};
Stage.prototype.fgd = function () {
return this.jgs_1.fgd();
};
Stage.prototype.qha = function () {
return this.jgs_1.qha();
};
Stage.prototype.egd = function () {
return this.jgs_1.egd();
};
Stage.prototype.rha = function () {
return this.jgs_1.rha();
};
Stage.prototype.sha = function () {
return this.jgs_1.sha();
};
Stage.prototype.tha = function () {
return this.jgs_1.tha();
};
Stage.prototype.ngw = function () {
return this.jgs_1.ngw();
};
Stage.prototype.uha = function () {
return this.jgs_1.uha();
};
Stage.prototype.vha = function () {
return this.jgs_1.vha();
};
Stage.prototype.ofz = function (x, y, out) {
return this.jgs_1.ofz(x, y, out);
};
Stage.prototype.cjy = function (_set____db54di) {
var tmp0_setValue = clip$factory();
return this.kgs_1.set(_set____db54di);
};
Stage.prototype.la5 = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = clip$factory_0();
tmp$ret$0 = this.kgs_1.get();
return tmp$ret$0;
};
Stage.prototype.cav = function (_set____db54di) {
var tmp0_setValue = width$factory_3();
return this.lgs_1.set(_set____db54di);
};
Stage.prototype.d72 = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = width$factory_4();
tmp$ret$0 = this.lgs_1.get();
return tmp$ret$0;
};
Stage.prototype.p7c = function (_set____db54di) {
var tmp0_setValue = height$factory_3();
return this.mgs_1.set(_set____db54di);
};
Stage.prototype.e72 = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = height$factory_4();
tmp$ret$0 = this.mgs_1.get();
return tmp$ret$0;
};
Stage.prototype.mii = function () {
return this.hgs_1.hfw_1;
};
Stage.prototype.pgs = function () {
return this.ngs_1;
};
Stage.prototype.djy = function () {
this.ogs_1.a73(this.ejy(), this.fjy());
return this.ogs_1;
};
Stage.prototype.ejy = function () {
return this.gi1(this.hgs_1);
};
Stage.prototype.fjy = function () {
return this.hi1(this.hgs_1);
};
Stage.prototype.toString = function () {
return 'Stage';
};
Stage.$metadata$ = classMeta('Stage', [Reference, CoroutineScope, EventDispatcher, ViewsContainer, ResourcesContainer, BoundsProvider], undefined, undefined, undefined, FixedSizeContainer.prototype);
function clipBorders$factory($b0) {
return getPropertyCallableRef('clipBorders', 0, KMutableProperty0, function () {
return $b0.jfx_1;
}, function (value) {
$b0.jfx_1 = value;
return Unit_getInstance();
});
}
function virtualWidthDouble$factory($b0) {
return getPropertyCallableRef('virtualWidthDouble', 0, KMutableProperty0, function () {
return $b0.gjy();
}, function (value) {
return $b0.hjy(value);
});
}
function virtualHeightDouble$factory($b0) {
return getPropertyCallableRef('virtualHeightDouble', 0, KMutableProperty0, function () {
return $b0.ijy();
}, function (value) {
return $b0.jjy(value);
});
}
function clip$factory() {
return getPropertyCallableRef('clip', 1, KMutableProperty1, function (receiver) {
return receiver.la5();
}, function (receiver, value) {
return receiver.cjy(value);
});
}
function clip$factory_0() {
return getPropertyCallableRef('clip', 1, KMutableProperty1, function (receiver) {
return receiver.la5();
}, function (receiver, value) {
return receiver.cjy(value);
});
}
function width$factory_3() {
return getPropertyCallableRef('width', 1, KMutableProperty1, function (receiver) {
return receiver.d72();
}, function (receiver, value) {
return receiver.cav(value);
});
}
function width$factory_4() {
return getPropertyCallableRef('width', 1, KMutableProperty1, function (receiver) {
return receiver.d72();
}, function (receiver, value) {
return receiver.cav(value);
});
}
function height$factory_3() {
return getPropertyCallableRef('height', 1, KMutableProperty1, function (receiver) {
return receiver.e72();
}, function (receiver, value) {
return receiver.p7c(value);
});
}
function height$factory_4() {
return getPropertyCallableRef('height', 1, KMutableProperty1, function (receiver) {
return receiver.e72();
}, function (receiver, value) {
return receiver.p7c(value);
});
}
function Text_init_$Init$(text, textSize, color, font, alignment, renderer, autoScaling, fill, stroke, $mask0, $marker, $this) {
if (!(($mask0 & 2) === 0))
textSize = Companion_getInstance_55().lib_1;
if (!(($mask0 & 4) === 0))
color = Colors_getInstance().s7z_1;
if (!(($mask0 & 8) === 0))
font = get_DefaultTtfFont();
if (!(($mask0 & 16) === 0))
alignment = Companion_getInstance_22().i8s_1;
if (!(($mask0 & 32) === 0))
renderer = get_DefaultStringTextRenderer();
if (!(($mask0 & 64) === 0))
autoScaling = Companion_getInstance_55().mib_1;
if (!(($mask0 & 128) === 0))
fill = null;
if (!(($mask0 & 256) === 0))
stroke = null;
Text.call($this, text, textSize, color, font, alignment, renderer, autoScaling, fill, stroke);
return $this;
}
function Text_init_$Create$(text, textSize, color, font, alignment, renderer, autoScaling, fill, stroke, $mask0, $marker) {
return Text_init_$Init$(text, textSize, color, font, alignment, renderer, autoScaling, fill, stroke, $mask0, $marker, Object.create(Text.prototype));
}
function Companion_23() {
Companion_instance_23 = this;
this.lib_1 = 16.0;
this.mib_1 = true;
}
Companion_23.$metadata$ = objectMeta('Companion');
var Companion_instance_23;
function Companion_getInstance_55() {
if (Companion_instance_23 == null)
new Companion_23();
return Companion_instance_23;
}
function updateLineCount($this) {
var tmp = $this;
var tmp$ret$1;
// Inline function 'kotlin.text.count' call
var tmp0_count = $this.u67();
var count = 0;
var indexedObject = tmp0_count;
var inductionVariable = 0;
var last = indexedObject.length;
while (inductionVariable < last) {
var element = charSequenceGet(indexedObject, inductionVariable);
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$0;
// Inline function 'com.soywiz.korge.view.Text.updateLineCount.<anonymous>' call
tmp$ret$0 = equals(new Char(element), new Char(_Char___init__impl__6a9atx(10)));
if (tmp$ret$0) {
count = count + 1 | 0;
}
}
tmp$ret$1 = count;
tmp.oig_1 = tmp$ret$1 + 1 | 0;
}
function setContainerPosition($this, x, y, baseline) {
if ($this.eih_1) {
setRealContainerPosition($this, x, y);
} else {
setRealContainerPosition($this, x + HorizontalAlign__getOffsetX_impl_urzzxf($this.wig_1.t8t_1, $this.dih_1.x71_1), y - VerticalAlign__getOffsetY_impl_iso0y6($this.wig_1.u8t_1, $this.dih_1.y71_1, baseline));
}
}
function setRealContainerPosition($this, x, y) {
position($this.xig_1, x, y);
}
function Text$_renderInternal$slambda(this$0, $ctx, $fontSource, resultContinuation) {
this.sjy_1 = this$0;
this.tjy_1 = $ctx;
this.ujy_1 = $fontSource;
CoroutineImpl.call(this, resultContinuation);
}
Text$_renderInternal$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
Text$_renderInternal$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
Text$_renderInternal$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.sjy_1.vjy(ensureNotNull(this.tjy_1.bga_1).vfw_1, this.ujy_1, this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
Text$_renderInternal$slambda.prototype.k53 = function (completion) {
var i = new Text$_renderInternal$slambda(this.sjy_1, this.tjy_1, this.ujy_1, completion);
return i;
};
Text$_renderInternal$slambda.$metadata$ = classMeta('Text$_renderInternal$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function Text$_renderInternal$slambda_0(this$0, $ctx, $fontSource, resultContinuation) {
var i = new Text$_renderInternal$slambda(this$0, $ctx, $fontSource, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function $forceLoadFontSourceCOROUTINE$19(_this__u8e3s4, currentVfs, sourceFile, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.ejz_1 = _this__u8e3s4;
this.fjz_1 = currentVfs;
this.gjz_1 = sourceFile;
}
$forceLoadFontSourceCOROUTINE$19.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 3;
this.ejz_1.hjz(this.gjz_1);
this.ejz_1.zig_1 = true;
if (!(this.gjz_1 == null)) {
this.o7_1 = 1;
var tmp_0 = this.fjz_1.c19('' + this.gjz_1);
suspendResult = readFont$default(tmp_0, false, null, false, this, 7, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
} else {
this.o7_1 = 2;
continue $sm;
}
break;
case 1:
var ARGUMENT = suspendResult;
this.ejz_1.xih(ARGUMENT);
this.o7_1 = 2;
continue $sm;
case 2:
return Unit_getInstance();
case 3:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 3) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$forceLoadFontSourceCOROUTINE$19.$metadata$ = classMeta('$forceLoadFontSourceCOROUTINE$19', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function Text(text, textSize, color, font, alignment, renderer, autoScaling, fill, stroke) {
Companion_getInstance_55();
Container.call(this);
this.kig_1 = true;
this.lig_1 = -1;
this.mig_1 = -1;
this.nig_1 = 0;
this.oig_1 = 0;
this.pig_1 = text;
updateLineCount(this);
var tmp = this;
var tmp0_elvis_lhs = fill;
tmp.qig_1 = tmp0_elvis_lhs == null ? new RGBA(color) : tmp0_elvis_lhs;
this.rig_1 = stroke;
this.sig_1 = font;
this.tig_1 = textSize;
this.uig_1 = textSize$factory(this);
this.vig_1 = renderer;
this.wig_1 = alignment;
var tmp_0 = this;
var tmp$ret$3;
// Inline function 'com.soywiz.korge.view.container' call
var tmp$ret$2;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp1_addTo = new Container();
var tmp$ret$1;
// Inline function 'kotlin.apply' call
var tmp0_apply = addTo(tmp1_addTo, this);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korge.view.container.<anonymous>' call
tmp$ret$0 = Unit_getInstance();
tmp$ret$1 = tmp0_apply;
tmp$ret$2 = tmp$ret$1;
tmp$ret$3 = tmp$ret$2;
tmp_0.xig_1 = tmp$ret$3;
this.yig_1 = new Text2TextRendererActions();
this.zig_1 = false;
this.aih_1 = autoScaling;
this.bih_1 = false;
this.cih_1 = null;
this.dih_1 = Companion_getInstance_15().k7c(0, 0, 2048, 2048);
this.eih_1 = true;
this.fih_1 = -1;
var tmp_1 = this;
tmp_1.gih_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
this.hih_1 = false;
this.iih_1 = -1;
this.jih_1 = null;
var tmp_2 = this;
tmp_2.kih_1 = Entry_init_$Create$(null, 0.0, 0.0, 0.0, 0.0, null, 63, null);
var tmp_3 = this;
tmp_3.lih_1 = FontMetrics_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 255, null);
var tmp_4 = this;
tmp_4.mih_1 = TextMetrics_init_$Create$(null, null, null, 0, 15, null);
this.nih_1 = null;
this.oih_1 = null;
this.pih_1 = null;
this.qih_1 = null;
var tmp_5 = this;
tmp_5.rih_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
this.sih_1 = GraphicsRenderer_SYSTEM_getInstance();
this.tih_1 = true;
this.uih_1 = null;
}
Text.prototype.gck = function (value) {
if (!(this.pig_1 === value)) {
this.pig_1 = value;
updateLineCount(this);
var tmp0_this = this;
var tmp1 = tmp0_this.nig_1;
tmp0_this.nig_1 = tmp1 + 1 | 0;
this.baz();
}
};
Text.prototype.u67 = function () {
return this.pig_1;
};
Text.prototype.ijz = function (value) {
if (!equals(this.qig_1, value)) {
this.qig_1 = value;
var tmp0_this = this;
var tmp1 = tmp0_this.nig_1;
tmp0_this.nig_1 = tmp1 + 1 | 0;
}
};
Text.prototype.k8o = function () {
return this.qig_1;
};
Text.prototype.jjz = function () {
return this.rig_1;
};
Text.prototype.zih = function (value) {
this.ijz(new RGBA(value));
};
Text.prototype.s9g = function () {
var tmp = this.qig_1;
var tmp_0;
if (tmp == null ? true : tmp instanceof RGBA) {
var tmp_1 = tmp;
tmp_0 = tmp_1 == null ? null : tmp_1.n8k_1;
} else {
tmp_0 = null;
}
var tmp0_elvis_lhs = tmp_0;
var tmp_2;
var tmp_3 = tmp0_elvis_lhs;
if ((tmp_3 == null ? null : new RGBA(tmp_3)) == null) {
tmp_2 = Colors_getInstance().s7z_1;
} else {
tmp_2 = tmp0_elvis_lhs;
}
return tmp_2;
};
Text.prototype.xih = function (value) {
if (!equals(this.sig_1, value)) {
this.sig_1 = value;
var tmp0_this = this;
var tmp1 = tmp0_this.nig_1;
tmp0_this.nig_1 = tmp1 + 1 | 0;
this.baz();
}
};
Text.prototype.yih = function (value) {
if (!(this.tig_1 === value)) {
this.tig_1 = value;
var tmp0_this = this;
var tmp1 = tmp0_this.nig_1;
tmp0_this.nig_1 = tmp1 + 1 | 0;
this.baz();
}
};
Text.prototype.kjz = function (_set____db54di) {
var tmp0_setValue = fontSize$factory();
return this.uig_1.set(_set____db54di);
};
Text.prototype.ca4 = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = fontSize$factory_0();
tmp$ret$0 = this.uig_1.get();
return tmp$ret$0;
};
Text.prototype.ljz = function () {
return this.vig_1;
};
Text.prototype.wih = function (value) {
if (this.wig_1.equals(value))
return Unit_getInstance();
this.wig_1 = value;
var tmp0_this = this;
var tmp1 = tmp0_this.nig_1;
tmp0_this.nig_1 = tmp1 + 1 | 0;
this.baz();
};
Text.prototype.mjz = function () {
return this.wig_1;
};
Text.prototype.njz = function () {
return this.wig_1.t8t_1;
};
Text.prototype.ojz = function () {
return this.wig_1.u8t_1;
};
Text.prototype.hjz = function (value) {
this.cih_1 = value;
this.zig_1 = false;
this.baz();
};
Text.prototype.vjy = function (currentVfs, sourceFile, $cont) {
var tmp = new $forceLoadFontSourceCOROUTINE$19(this, currentVfs, sourceFile, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
Text.prototype.ej0 = function (face, size, color, align) {
var tmp0_elvis_lhs = face;
this.xih(tmp0_elvis_lhs == null ? get_DefaultTtfFont() : tmp0_elvis_lhs);
this.yih(size);
this.zih(color);
this.wih(align);
};
Text.prototype.vih = function (rect) {
if (this.dih_1.equals(rect) ? !this.eih_1 : false)
return Unit_getInstance();
this.dih_1.u7c(rect);
this.eih_1 = false;
var tmp0_this = this;
var tmp1 = tmp0_this.fih_1;
tmp0_this.fih_1 = tmp1 + 1 | 0;
var tmp2_this = this;
var tmp3 = tmp2_this.nig_1;
tmp2_this.nig_1 = tmp3 + 1 | 0;
this.baz();
};
Text.prototype.uhw = function (out) {
this.pjz(null);
if (!(get_filter(this) == null) ? true : !(get_backdropFilter(this) == null)) {
Container.prototype.uhw.call(this, out);
} else {
out.u7c(this.dih_1);
}
};
Text.prototype.xhw = function (ctx) {
this.pjz(ctx);
var tva = this.qih_1;
if (!(tva == null)) {
this.gih_1.f76(this.pgw());
this.gih_1.o76(this.xig_1.d1n(), this.xig_1.e1n());
var tmp$ret$1;
// Inline function 'com.soywiz.korge.render.RenderContext.useBatcher' call
var tmp$ret$0;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.use' call
var tmp0_use = ctx.gga_1;
var tmp0_useBatcher = tmp0_use.vga_1;
if (!(tmp0_useBatcher.tga_1 === tmp0_use)) {
tmp0_useBatcher.mj();
tmp0_useBatcher.tga_1 = tmp0_use;
}
var tmp = this.sig_1;
var tex = (tmp instanceof BitmapFont ? tmp : THROW_CCE()).o8o();
tmp0_use.uh8(tex, this.kig_1, this.di1(), null, tva.kh8_1, tva.jh8_1);
tmp0_use.ph8(tva, this.gih_1, 0, 0, 0, tex.s7y_1, false, 28, null);
tmp$ret$0 = Unit_getInstance();
tmp$ret$1 = tmp$ret$0;
} else {
Container.prototype.xhw.call(this, ctx);
}
};
Text.prototype.qjz = function () {
this.pjz(null);
if (!(this.iih_1 === this.nig_1)) {
this.iih_1 = this.nig_1;
var tmp = this;
var tmp0_safe_receiver = this.sig_1.b65();
var tmp_0;
if (tmp0_safe_receiver == null) {
tmp_0 = null;
} else {
var tmp_1 = this.ca4();
var tmp_2 = this.u67();
var tmp_3 = this.vig_1;
tmp_0 = getTextBoundsWithGlyphs$default(tmp0_safe_receiver, tmp_1, tmp_2, tmp_3, null, 8, null);
}
tmp.jih_1 = tmp_0;
}
var tmp1_elvis_lhs = this.jih_1;
var tmp_4;
if (tmp1_elvis_lhs == null) {
throw IllegalStateException_init_$Create$('Must ensure font is resolved before calling getGlyphMetrics');
} else {
tmp_4 = tmp1_elvis_lhs;
}
return tmp_4;
};
Text.prototype.pjz = function (ctx) {
if (!(ctx == null)) {
var fontSource = this.cih_1;
if (!this.zig_1 ? !(fontSource == null) : false) {
this.zig_1 = true;
launchImmediately_0(ctx.lg9_1, Text$_renderInternal$slambda_0(this, ctx, fontSource, null));
}
}
var font = this.sig_1.b65();
var tmp;
var tmp_0;
if (this.eih_1) {
tmp_0 = !(font == null) ? isInterface(font, Font) : false;
} else {
tmp_0 = false;
}
if (tmp_0) {
tmp = !(this.fih_1 === this.nig_1);
} else {
tmp = false;
}
if (tmp) {
this.fih_1 = this.nig_1;
var metrics = getTextBounds(font, this.tig_1, this.u67(), this.mih_1, this.vig_1, this.wig_1);
this.dih_1.u7c(metrics.k8r_1);
this.dih_1.y71_1 = font.t8m(this.tig_1, this.lih_1).t8w() * this.oig_1;
this.dih_1.v71_1 = -HorizontalAlign__getOffsetX_impl_urzzxf(this.wig_1.t8t_1, this.dih_1.x71_1) + metrics.b74();
this.dih_1.w71_1 = VerticalAlign__getOffsetY_impl_iso0y6(this.wig_1.u8t_1, this.dih_1.y71_1, -metrics.b8u());
}
var tmp0_subject = font;
if (tmp0_subject == null)
;
else {
if (tmp0_subject instanceof BitmapFont) {
var rversion = this.vig_1.s3r();
if ((!(this.oih_1 === this.kig_1) ? true : !(this.lig_1 === this.nig_1)) ? true : !(this.mig_1 === rversion)) {
this.oih_1 = this.kig_1;
this.mig_1 = rversion;
this.lig_1 = this.nig_1;
if (!(this.uih_1 == null)) {
this.uih_1 = null;
this.xig_1.rhz();
}
this.yig_1.w8w(0.0);
this.yig_1.o7c(0.0);
this.yig_1.ta0();
this.yig_1.ja0_1 = this.ojz();
this.yig_1.ka0_1 = this.njz();
invoke(this.vig_1, this.yig_1, this.u67(), this.tig_1, font);
while (this.xig_1.pcl() < this.yig_1.i()) {
var tmp$ret$4;
// Inline function 'com.soywiz.korge.view.image' call
var tmp1_image = this.xig_1;
var tmp$ret$0;
// Inline function 'com.soywiz.korim.bitmap.Bitmaps.transparent' call
var tmp0__get_transparent__6k58e1 = Bitmaps_getInstance();
tmp$ret$0 = get_Bitmaps_transparent();
var tmp2_image = tmp$ret$0;
var tmp$ret$3;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp0_addTo = Image_init_$Create$(tmp2_image, 0.0, 0.0, null, false, 24, null);
var tmp$ret$2;
// Inline function 'kotlin.apply' call
var tmp0_apply = addTo(tmp0_addTo, tmp1_image);
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$1;
// Inline function 'com.soywiz.korge.view.image.<anonymous>' call
tmp$ret$1 = Unit_getInstance();
tmp$ret$2 = tmp0_apply;
tmp$ret$3 = tmp$ret$2;
tmp$ret$4 = tmp$ret$3;
}
while (this.xig_1.pcl() > this.yig_1.i()) {
this.xig_1.m(this.xig_1.pcl() - 1 | 0).fi2();
}
var textWidth = this.yig_1.d1n();
var dx = -textWidth * _HorizontalAlign___get_ratio__impl__x9wlea(this.njz());
if (this.hih_1) {
this.qih_1 = Companion_getInstance_48().phd(this.yig_1.i());
}
var inductionVariable = 0;
var last = this.yig_1.i();
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var entry = this.yig_1.sa0(n, this.kih_1);
if (this.hih_1) {
var tmp2_safe_receiver = this.qih_1;
if (tmp2_safe_receiver == null)
null;
else {
tmp2_safe_receiver.xhd(imul(n, 4), entry.p9z_1 + dx, entry.q9z_1, entry.o9z_1.d72() * entry.r9z_1, entry.o9z_1.e72() * entry.s9z_1, this.rih_1, entry.o9z_1, this.ei1(), this.fi1());
}
} else {
var tmp_1 = this.xig_1.m(n);
var it = tmp_1 instanceof Image ? tmp_1 : THROW_CCE();
it.x8j(this.s9g());
anchor_1(it, 0, 0);
it.pj8_1 = this.kig_1;
it.pj2(entry.o9z_1);
it.w8w(entry.p9z_1 + dx);
it.o7c(entry.q9z_1);
it.li0(entry.r9z_1);
it.mi0(entry.s9z_1);
it.djp(entry.t9z_1);
}
}
while (inductionVariable < last);
setContainerPosition(this, 0.0, 0.0, font.b8m_1);
}
} else {
if (!(this.oih_1 === this.kig_1) ? true : !(this.pih_1 === this.tih_1)) {
var tmp3_this = this;
var tmp4 = tmp3_this.nig_1;
tmp3_this.nig_1 = tmp4 + 1 | 0;
this.pih_1 = this.tih_1;
this.nih_1 = this.aih_1;
this.oih_1 = this.kig_1;
}
if (!(this.lig_1 === this.nig_1)) {
this.lig_1 = this.nig_1;
var realTextSize = this.tig_1;
if (this.uih_1 == null) {
this.xig_1.rhz();
var tmp_2 = this;
var tmp$ret$10;
// Inline function 'com.soywiz.korge.view.graphics' call
var tmp3_graphics = this.xig_1;
var tmp4_graphics = this.sih_1;
var tmp$ret$9;
// Inline function 'kotlin.also' call
var tmp0_also = addTo(new Graphics(EmptyShape_getInstance(), tmp4_graphics), tmp3_graphics);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.graphics.<anonymous>' call
var tmp$ret$8;
// Inline function 'com.soywiz.korge.view.Graphics.updateShape' call
var result;
var tmp$ret$7;
// Inline function 'com.soywiz.korim.vector.buildShape' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$6;
// Inline function 'kotlin.apply' call
var tmp0_apply_0 = new ShapeBuilder(null, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.Graphics.updateShape.<anonymous>' call
var tmp$ret$5;
// Inline function 'com.soywiz.korge.view.Text._renderInternal.<anonymous>' call
tmp$ret$5 = Unit_getInstance();
result = tmp$ret$5;
tmp$ret$6 = tmp0_apply_0;
tmp$ret$7 = tmp$ret$6.w9h();
tmp0_also.ojl(tmp$ret$7);
tmp$ret$8 = result;
tmp0_also.xjl();
tmp$ret$9 = tmp0_also;
tmp$ret$10 = tmp$ret$9;
tmp_2.uih_1 = tmp$ret$10;
var tmp5_safe_receiver = this.uih_1;
if (tmp5_safe_receiver == null) {
} else {
tmp5_safe_receiver.ujl(true);
}
}
var tmp$ret$14;
// Inline function 'com.soywiz.korge.view.Graphics.updateShape' call
var tmp5_updateShape = ensureNotNull(this.uih_1);
var result_0;
var tmp$ret$13;
// Inline function 'com.soywiz.korim.vector.buildShape' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$12;
// Inline function 'kotlin.apply' call
var tmp0_apply_1 = new ShapeBuilder(null, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.Graphics.updateShape.<anonymous>' call
var tmp$ret$11;
// Inline function 'com.soywiz.korge.view.Text._renderInternal.<anonymous>' call
var tmp0_text = this.u67();
var tmp1_paint = this.s9g();
var tmp2_renderer = this.vig_1;
var tmp3_align = this.wig_1;
var tmp4_outMetrics = TextMetricsResult_init_$Create$(null, null, null, null, 15, null);
var tmp5_fillStyle = this.qig_1;
var tmp6_stroke = this.rig_1;
tmp$ret$11 = tmp0_apply_1.xa4(tmp0_text, 0.0, 0.0, false, new RGBA(tmp1_paint), font, realTextSize, tmp2_renderer, tmp3_align, tmp4_outMetrics, tmp5_fillStyle, tmp6_stroke, 8, null);
result_0 = tmp$ret$11;
tmp$ret$12 = tmp0_apply_1;
tmp$ret$13 = tmp$ret$12.w9h();
tmp5_updateShape.ojl(tmp$ret$13);
tmp$ret$14 = result_0;
var metrics_0 = tmp$ret$14;
this.iih_1 = this.nig_1;
this.jih_1 = metrics_0;
setContainerPosition(this, 0.0, 0.0, font.t8m(this.ca4(), this.lih_1).x8m_1);
}
var tmp6_safe_receiver = this.uih_1;
if (tmp6_safe_receiver == null) {
} else {
tmp6_safe_receiver.tjl(this.kig_1);
}
}
}
};
Text.$metadata$ = classMeta('Text', [IText, ViewLeaf], undefined, undefined, undefined, Container.prototype);
function text(_this__u8e3s4, text, textSize, color, font, alignment, renderer, autoScaling, fill, stroke, block) {
var tmp$ret$1;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp0_addTo = new Text(text, textSize, color, font, alignment, renderer, autoScaling, fill, stroke);
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = addTo(tmp0_addTo, _this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
block(tmp0_apply);
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0;
return tmp$ret$1;
}
function textSize$factory($b0) {
return getPropertyCallableRef('textSize', 0, KMutableProperty0, function () {
return $b0.tig_1;
}, function (value) {
return $b0.yih(value);
});
}
function fontSize$factory() {
return getPropertyCallableRef('fontSize', 1, KMutableProperty1, function (receiver) {
return receiver.ca4();
}, function (receiver, value) {
return receiver.kjz(value);
});
}
function fontSize$factory_0() {
return getPropertyCallableRef('fontSize', 1, KMutableProperty1, function (receiver) {
return receiver.ca4();
}, function (receiver, value) {
return receiver.kjz(value);
});
}
function IText() {
}
IText.$metadata$ = interfaceMeta('IText');
function View_init_$Init$($this) {
View.call($this, false);
return $this;
}
function Reference() {
}
Reference.$metadata$ = interfaceMeta('Reference');
function ColorReference() {
}
ColorReference.$metadata$ = interfaceMeta('ColorReference');
function Companion_24() {
Companion_instance_24 = this;
}
Companion_24.prototype.rjz = function (left, right) {
var l = left;
var r = right;
var lCount = get_ancestorCount(l);
var rCount = get_ancestorCount(r);
while (lCount >= 0 ? true : rCount >= 0) {
if (equals(l, r))
return l;
var ldec = lCount >= rCount;
var rdec = rCount >= lCount;
if (ldec) {
var tmp0 = lCount;
lCount = tmp0 - 1 | 0;
var tmp1_safe_receiver = l;
l = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.e5n();
}
if (rdec) {
var tmp2 = rCount;
rCount = tmp2 - 1 | 0;
var tmp3_safe_receiver = r;
r = tmp3_safe_receiver == null ? null : tmp3_safe_receiver.e5n();
}
}
return null;
};
Companion_24.$metadata$ = objectMeta('Companion');
var Companion_instance_24;
function Companion_getInstance_56() {
if (Companion_instance_24 == null)
new Companion_24();
return Companion_instance_24;
}
function updateRenderColorTransform($this) {
$this.pgg_1 = $this.ugg_1;
$this.wgg_1 = true;
var parent = $this.e5n();
var tmp0_safe_receiver = parent;
if (!((tmp0_safe_receiver == null ? null : get_filter(tmp0_safe_receiver)) == null)) {
$this.ogg_1.d8k($this.ngg_1);
} else {
var tmp;
if (!(parent == null)) {
tmp = !isInterface($this, ColorReference);
} else {
tmp = false;
}
if (tmp) {
$this.ogg_1.e8k($this.ngg_1, parent.ci1());
} else {
$this.ogg_1.d8k($this.ngg_1);
}
}
}
function updateRenderColorTransformIfRequired($this) {
if ($this.pgg_1 === $this.ugg_1)
return Unit_getInstance();
updateRenderColorTransform($this);
}
function updateRenderBlendMode($this) {
$this.rgg_1 = $this.tgg_1;
$this.vgg_1 = true;
var tmp = $this;
var tmp0_subject = $this.sgf_1;
var tmp_0;
if (tmp0_subject.equals(Companion_getInstance_53().pg8_1)) {
var tmp1_safe_receiver = $this.e5n();
var tmp2_elvis_lhs = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.di1();
tmp_0 = tmp2_elvis_lhs == null ? Companion_getInstance_53().og8_1 : tmp2_elvis_lhs;
} else {
tmp_0 = $this.sgf_1;
}
tmp.qgg_1 = tmp_0;
}
function updateRenderBlendModeIfRequired($this) {
if ($this.rgg_1 === $this.tgg_1)
return Unit_getInstance();
updateRenderBlendMode($this);
}
function View$bviewAll$delegate$lambda(this$0) {
return function () {
return listOf_0(this$0);
};
}
function View(isContainer) {
Companion_getInstance_56();
BaseView.call(this);
this.ggf_1 = isContainer;
this.hgf_1 = null;
var tmp = this;
tmp.igf_1 = lazy(View$bviewAll$delegate$lambda(this));
this.jgf_1 = true;
this.kgf_1 = null;
this.lgf_1 = null;
this.mgf_1 = null;
this.ngf_1 = 0.0;
this.ogf_1 = 0;
this.pgf_1 = null;
this.qgf_1 = 1.0;
this.rgf_1 = null;
this.sgf_1 = Companion_getInstance_53().pg8_1;
this.tgf_1 = 0.0;
this.ugf_1 = 0.0;
this.vgf_1 = 1.0;
this.wgf_1 = 1.0;
var tmp_0 = this;
var tmp$ret$0;
// Inline function 'com.soywiz.korma.geom.Companion.ZERO' call
var tmp0__get_ZERO__8316ll = Companion_getInstance_26();
tmp$ret$0 = tmp0__get_ZERO__8316ll.f70(0.0);
tmp_0.xgf_1 = tmp$ret$0;
var tmp_1 = this;
var tmp$ret$1;
// Inline function 'com.soywiz.korma.geom.Companion.ZERO' call
var tmp0__get_ZERO__8316ll_0 = Companion_getInstance_26();
tmp$ret$1 = tmp0__get_ZERO__8316ll_0.f70(0.0);
tmp_1.ygf_1 = tmp$ret$1;
var tmp_2 = this;
var tmp$ret$2;
// Inline function 'com.soywiz.korma.geom.Companion.ZERO' call
var tmp0__get_ZERO__8316ll_1 = Companion_getInstance_26();
tmp$ret$2 = tmp0__get_ZERO__8316ll_1.f70(0.0);
tmp_2.zgf_1 = tmp$ret$2;
this.agg_1 = Companion_getInstance_8().zp();
this.bgg_1 = 0.0;
var tmp_3 = this;
tmp_3.cgg_1 = Transform_init_$Create$(0.0, 0.0, 0.0, 0.0, null, null, null, 127, null);
this.dgg_1 = false;
this.egg_1 = true;
this.fgg_1 = true;
this.ggg_1 = true;
this.hgg_1 = true;
var tmp_4 = this;
tmp_4.igg_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
var tmp_5 = this;
tmp_5.jgg_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
this.kgg_1 = -1;
var tmp_6 = this;
tmp_6.lgg_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
this.mgg_1 = -1;
var tmp_7 = this;
var tmp$ret$5;
// Inline function 'com.soywiz.korim.color.ColorTransform' call
var tmp0_ColorTransform = Colors_getInstance().s7z_1;
var tmp$ret$3;
// Inline function 'com.soywiz.korim.color.Companion.invoke' call
var tmp0_invoke = Companion_getInstance_10();
tmp$ret$3 = _ColorAdd___init__impl__q78um5(ColorAdd_pack(0, 0, 0, 0));
var tmp1_ColorTransform = tmp$ret$3;
var tmp$ret$4;
// Inline function 'com.soywiz.korim.color.ColorTransform' call
var tmp0_ColorTransform_0 = _RGBA___get_rf__impl__kvz75k(tmp0_ColorTransform);
var tmp1_ColorTransform_0 = _RGBA___get_gf__impl__5gcu1f(tmp0_ColorTransform);
var tmp2_ColorTransform = _RGBA___get_bf__impl__1xz5yg(tmp0_ColorTransform);
var tmp3_ColorTransform = _RGBA___get_af__impl__vu36qv(tmp0_ColorTransform);
var tmp4_ColorTransform = _ColorAdd___get_r__impl__j9xkne(tmp1_ColorTransform);
var tmp5_ColorTransform = _ColorAdd___get_g__impl__itrhk1(tmp1_ColorTransform);
var tmp6_ColorTransform = _ColorAdd___get_b__impl__grv87a(tmp1_ColorTransform);
var tmp7_ColorTransform = _ColorAdd___get_a__impl__c1r8ux(tmp1_ColorTransform);
tmp$ret$4 = new ColorTransform(numberToDouble(tmp0_ColorTransform_0), numberToDouble(tmp1_ColorTransform_0), numberToDouble(tmp2_ColorTransform), numberToDouble(tmp3_ColorTransform), numberToInt(tmp4_ColorTransform), numberToInt(tmp5_ColorTransform), numberToInt(tmp6_ColorTransform), numberToInt(tmp7_ColorTransform));
tmp$ret$5 = tmp$ret$4;
tmp_7.ngg_1 = tmp$ret$5;
this.ogg_1 = new ColorTransform(1.0, 1.0, 1.0, 1.0, 0, 0, 0, 0);
this.pgg_1 = -1;
this.qgg_1 = Companion_getInstance_53().pg8_1;
this.rgg_1 = -1;
this.sgg_1 = true;
this.tgg_1 = 0;
this.ugg_1 = 0;
this.vgg_1 = false;
this.wgg_1 = false;
this.xgg_1 = false;
this.ygg_1 = null;
this.zgg_1 = 0;
this.agh_1 = true;
this.bgh_1 = null;
this.cgh_1 = Companion_getInstance_15().zp();
this.dgh_1 = null;
}
View.prototype.e4v = function (_set____db54di) {
this.hgf_1 = _set____db54di;
};
View.prototype.f4v = function () {
return this.hgf_1;
};
View.prototype.bi0 = function () {
return 0.0;
};
View.prototype.ci0 = function () {
return 0.0;
};
View.prototype.lhz = function () {
return null;
};
View.prototype.di0 = function (callback) {
var tmp0_safe_receiver = this.lhz();
var tmp;
if (tmp0_safe_receiver == null) {
tmp = null;
} else {
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var n = 0;
while (n < tmp0_safe_receiver.i()) {
var tmp0 = n;
n = tmp0 + 1 | 0;
callback(tmp0_safe_receiver.m(tmp0));
}
tmp = Unit_getInstance();
}
return tmp;
};
View.prototype.ei0 = function (callback) {
var tmp0_safe_receiver = this.lhz();
var tmp;
if (tmp0_safe_receiver == null) {
tmp = null;
} else {
// Inline function 'com.soywiz.kds.iterators.fastForEachReverse' call
var n = 0;
while (n < tmp0_safe_receiver.i()) {
callback(tmp0_safe_receiver.m((tmp0_safe_receiver.i() - n | 0) - 1 | 0));
var tmp0 = n;
n = tmp0 + 1 | 0;
}
tmp = Unit_getInstance();
}
return tmp;
};
View.prototype.fj9 = function (_set____db54di) {
this.lgf_1 = _set____db54di;
};
View.prototype.fi0 = function () {
return this.lgf_1;
};
View.prototype.gi0 = function () {
return this.mgf_1;
};
View.prototype.phw = function (_set____db54di) {
this.ngf_1 = _set____db54di;
};
View.prototype.yi2 = function () {
return this.ngf_1;
};
View.prototype.scb = function (value) {
this.ogf_1 = value;
};
View.prototype.m4 = function () {
return this.ogf_1;
};
View.prototype.hi0 = function (value) {
if (!(this.pgf_1 === value)) {
this.pgf_1 = value;
this.vhw();
}
};
View.prototype.e5n = function () {
return this.pgf_1;
};
View.prototype.zg7 = function () {
return this.e5n();
};
View.prototype.t2 = function () {
return this.rgf_1;
};
View.prototype.dhc = function (value) {
if (!this.sgf_1.equals(value)) {
this.sgf_1 = value;
this.baz();
}
};
View.prototype.ehc = function () {
return this.sgf_1;
};
View.prototype.ii0 = function () {
return !(this.e5n() == null) ? ensureNotNull(this.e5n()).ii0() * this.qgf_1 : this.qgf_1;
};
View.prototype.ji0 = function (x, y) {
this.yi0();
if (!(this.tgf_1 === x) ? true : !(this.ugf_1 === y)) {
this.tgf_1 = x;
this.ugf_1 = y;
this.ki1();
}
};
View.prototype.sjz = function () {
this.agg_1.a73(this.d1n(), this.e1n());
return this.agg_1;
};
View.prototype.w8w = function (v) {
this.ji0(v, this.e1n());
};
View.prototype.d1n = function () {
this.yi0();
return this.tgf_1;
};
View.prototype.o7c = function (v) {
this.ji0(this.d1n(), v);
};
View.prototype.e1n = function () {
this.yi0();
return this.ugf_1;
};
View.prototype.ki0 = function () {
return this.bgg_1;
};
View.prototype.li0 = function (v) {
this.yi0();
if (!(this.vgf_1 === v)) {
this.vgf_1 = v;
this.ki1();
}
};
View.prototype.m9g = function () {
this.yi0();
return this.vgf_1;
};
View.prototype.mi0 = function (v) {
this.yi0();
if (!(this.wgf_1 === v)) {
this.wgf_1 = v;
this.ki1();
}
};
View.prototype.n9g = function () {
this.yi0();
return this.wgf_1;
};
View.prototype.ni0 = function (v) {
this.li0(v);
this.mi0(v);
};
View.prototype.oi0 = function () {
return (this.m9g() + this.n9g()) / 2.0;
};
View.prototype.pi0 = function () {
this.yi0();
return this.xgf_1;
};
View.prototype.qi0 = function () {
this.yi0();
return this.ygf_1;
};
View.prototype.djp = function (v) {
this.yi0();
if (!equals(this.zgf_1, v)) {
this.zgf_1 = v;
this.ki1();
}
};
View.prototype.ri0 = function () {
this.yi0();
return this.zgf_1;
};
View.prototype.si0 = function () {
var tmp0_safe_receiver = this.e5n();
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.yi1(this.d1n(), this.e1n());
return tmp1_elvis_lhs == null ? this.d1n() : tmp1_elvis_lhs;
};
View.prototype.ti0 = function () {
var tmp0_safe_receiver = this.e5n();
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.zi1(this.d1n(), this.e1n());
return tmp1_elvis_lhs == null ? this.e1n() : tmp1_elvis_lhs;
};
View.prototype.phm = function (width, height) {
this.cav(width);
this.p7c(height);
};
View.prototype.cav = function (value) {
this.li0((this.m9g() === 0.0 ? 1.0 : this.m9g()) * (value / this.d72()));
};
View.prototype.d72 = function () {
return this.ogw(false, 1, null).x71_1;
};
View.prototype.p7c = function (value) {
var tmp = this.n9g() === 0.0 ? 1.0 : this.n9g();
this.mi0(tmp * (value / this.ogw(false, 1, null).y71_1));
};
View.prototype.e72 = function () {
return this.ogw(false, 1, null).y71_1;
};
View.prototype.ui0 = function () {
return this.d72();
};
View.prototype.vi0 = function () {
return this.e72();
};
View.prototype.yin = function (value) {
this.cav(this.m9g() === 0.0 ? value : value / this.m9g());
};
View.prototype.wi0 = function () {
return this.ui0() * this.m9g();
};
View.prototype.zin = function (value) {
this.p7c(this.n9g() === 0.0 ? value : value / this.n9g());
};
View.prototype.xi0 = function () {
return this.vi0() * this.n9g();
};
View.prototype.x8j = function (v) {
if (!(v === this.ngg_1.y8j())) {
this.ngg_1.x8j(v);
this.nhz();
}
};
View.prototype.y8j = function () {
return this.ngg_1.y8j();
};
View.prototype.z8j = function () {
return this.ngg_1.z8j();
};
View.prototype.egh = function (v) {
if (!(v === this.ngg_1.q8j())) {
this.ngg_1.a8k(v);
this.nhz();
}
};
View.prototype.ea2 = function () {
return this.ngg_1.q8j();
};
View.prototype.ejp = function (value) {
this.x8j(value);
};
View.prototype.yi0 = function () {
if (this.ggg_1)
return Unit_getInstance();
this.ggg_1 = true;
var t = this.cgg_1;
t.k75(this.igg_1, 0.0, 0.0, 6, null);
this.tgf_1 = t.y74_1;
this.ugf_1 = t.z74_1;
this.vgf_1 = t.a75_1;
this.wgf_1 = t.b75_1;
this.xgf_1 = t.c75_1;
this.ygf_1 = t.d75_1;
this.zgf_1 = t.e75_1;
};
View.prototype.a5k = function () {
var tmp0_safe_receiver = this.e5n();
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.a5k();
return tmp1_elvis_lhs == null ? this : tmp1_elvis_lhs;
};
View.prototype.pgs = function () {
var tmp = this.a5k();
return tmp instanceof Stage ? tmp : null;
};
View.prototype.lh0 = function (_set____db54di) {
this.dgg_1 = _set____db54di;
};
View.prototype.lh1 = function () {
return this.dgg_1;
};
View.prototype.zi0 = function () {
return this.egg_1;
};
View.prototype.tch = function (value) {
if (!(this.fgg_1 === value)) {
this.fgg_1 = value;
this.baz();
}
};
View.prototype.pck = function () {
return this.fgg_1;
};
View.prototype.ai1 = function () {
if (!this.hgg_1) {
this.hgg_1 = true;
this.vgg_1 = true;
var tmp = this.d1n();
var tmp_0 = this.e1n();
var tmp_1 = this.m9g();
var tmp_2 = this.n9g();
var tmp_3 = this.ri0();
var tmp_4 = this.pi0();
var tmp_5 = this.qi0();
this.igg_1.b77(tmp, tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, tmp_5, 0.0, 0.0, 384, null);
}
return this.igg_1;
};
View.prototype.pgw = function () {
if (!(this.kgg_1 === this.tgg_1)) {
this.kgg_1 = this.tgg_1;
this.vgg_1 = true;
if (!(this.e5n() == null)) {
this.jgg_1.s76(this.ai1(), ensureNotNull(this.e5n()).pgw());
} else {
this.jgg_1.f76(this.ai1());
}
}
return this.jgg_1;
};
View.prototype.bi1 = function () {
if (!(this.mgg_1 === this.tgg_1)) {
this.mgg_1 = this.tgg_1;
this.vgg_1 = true;
this.lgg_1.v76(this.pgw());
}
return this.lgg_1;
};
View.prototype.ci1 = function () {
updateRenderColorTransformIfRequired(this);
return this.ogg_1;
};
View.prototype.di1 = function () {
updateRenderBlendModeIfRequired(this);
return this.qgg_1;
};
View.prototype.ei1 = function () {
updateRenderColorTransformIfRequired(this);
return this.ogg_1.y8j();
};
View.prototype.fi1 = function () {
updateRenderColorTransformIfRequired(this);
return this.ogg_1.z8j();
};
View.prototype.gi1 = function (views) {
return this.bi1().k77(views.efw_1.og0());
};
View.prototype.hi1 = function (views) {
return this.bi1().l77(views.efw_1.og0());
};
View.prototype.ii1 = function (views, target) {
return target.a73(this.gi1(views), this.hi1(views));
};
View.prototype.ji1 = function (views, target, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
target = Companion_getInstance_8().zp();
return this.ii1(views, target);
};
View.prototype.ki1 = function () {
this.hgg_1 = false;
this.baz();
};
View.prototype.li1 = function () {
return this.vgg_1;
};
View.prototype.mi1 = function () {
return this.wgg_1;
};
View.prototype.baz = function () {
var tmp0_this = this;
var tmp1 = tmp0_this.tgg_1;
tmp0_this.tgg_1 = tmp1 + 1 | 0;
this.vgg_1 = false;
this.sgg_1 = true;
this.dg8();
};
View.prototype.vhw = function () {
};
View.prototype.dg8 = function () {
var tmp0_safe_receiver = this.pgs();
var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.hgs_1;
if (tmp1_safe_receiver == null)
null;
else {
tmp1_safe_receiver.nj9(this);
}
};
View.prototype.nhz = function () {
var tmp0_this = this;
var tmp1 = tmp0_this.ugg_1;
tmp0_this.ugg_1 = tmp1 + 1 | 0;
this.wgg_1 = false;
this.sgg_1 = true;
this.dg8();
};
View.prototype.ni1 = function () {
return this.ygg_1;
};
View.prototype.oi1 = function (ctx) {
if (!this.pck())
return Unit_getInstance();
var tmp0_safe_receiver = this.ygg_1;
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.kds.FastArrayList.fastForEach' call
var array = tmp0_safe_receiver.b4r_1;
var n = 0;
while (n < array.length) {
// Inline function 'com.soywiz.korge.view.View.render.<anonymous>' call
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp0_unsafeCast = array[tmp0];
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_unsafeCast;
tmp$ret$1 = tmp$ret$0;
var tmp0__anonymous__q1qw7t = tmp$ret$1;
tmp0__anonymous__q1qw7t.tjz(this, ctx);
}
}
try {
this.pi1(ctx);
}finally {
var tmp1_safe_receiver = this.ygg_1;
if (tmp1_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.kds.FastArrayList.fastForEachReverse' call
var array_0 = tmp1_safe_receiver.b4r_1;
var n_0 = 0;
while (n_0 < array_0.length) {
// Inline function 'com.soywiz.korge.view.View.render.<anonymous>' call
var tmp$ret$3;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0_unsafeCast_0 = array_0[(tmp1_safe_receiver.i() - n_0 | 0) - 1 | 0];
var tmp$ret$2;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$2 = tmp0_unsafeCast_0;
tmp$ret$3 = tmp$ret$2;
var tmp1__anonymous__uwfjfc = tmp$ret$3;
tmp1__anonymous__uwfjfc.ujz(this, ctx);
var tmp0_0 = n_0;
n_0 = tmp0_0 + 1 | 0;
}
}
}
};
View.prototype.pi1 = function (ctx) {
var oldPhase = this.zgg_1;
try {
this.zgg_1 = 0;
this.qi1(ctx);
}finally {
this.zgg_1 = oldPhase;
}
};
View.prototype.qi1 = function (ctx) {
var stages = this.ygg_1;
if (!(stages == null) ? this.zgg_1 < stages.i() : false) {
var tmp0_this = this;
var tmp1 = tmp0_this.zgg_1;
tmp0_this.zgg_1 = tmp1 + 1 | 0;
stages.m(tmp1).vjz(this, ctx);
} else {
var tmp = this.zgg_1;
var tmp2_safe_receiver = stages;
var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.i();
if (tmp === (tmp3_elvis_lhs == null ? 0 : tmp3_elvis_lhs)) {
this.xhw(ctx);
var tmp4_this = this;
var tmp5 = tmp4_this.zgg_1;
tmp4_this.zgg_1 = tmp5 + 1 | 0;
}
}
};
View.prototype.uhz = function (ctx) {
if (this.xgg_1 ? true : this === ctx.cga_1) {
this.ri1(ctx);
}
};
View.prototype.ri1 = function (ctx) {
var local = this.ogw(false, 1, null);
var tmp$ret$9;
// Inline function 'com.soywiz.korge.render.useLineBatcher' call
var tmp$ret$8;
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.use' call
var tmp0_use = get_debugLineRenderContext(ctx);
var tmp0_useBatcher = tmp0_use.lh9_1;
if (!(tmp0_useBatcher.tga_1 === tmp0_use)) {
tmp0_useBatcher.mj();
tmp0_useBatcher.tga_1 = tmp0_use;
}
var tmp$ret$7;
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.drawWithGlobalMatrix' call
var tmp0_drawWithGlobalMatrix = get_debugLineRenderContext(ctx);
var tmp$ret$6;
$l$block_0: {
// Inline function 'com.soywiz.korma.geom.Matrix.keepMatrix' call
var tmp0_keepMatrix = tmp0_drawWithGlobalMatrix.cha_1;
var a = tmp0_keepMatrix.i74_1;
var b = tmp0_keepMatrix.j74_1;
var c = tmp0_keepMatrix.k74_1;
var d = tmp0_keepMatrix.l74_1;
var tx = tmp0_keepMatrix.m74_1;
var ty = tmp0_keepMatrix.n74_1;
try {
var tmp$ret$5;
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.drawWithGlobalMatrix.<anonymous>' call
if (!(null == null)) {
tmp0_keepMatrix.f76(null);
}
var tmp$ret$1;
$l$block: {
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.blending' call
var tmp0_blending = Companion_getInstance_53().yg8_1;
var doUpdate = !(tmp0_use.bha_1 === tmp0_blending);
var old = tmp0_use.bha_1;
try {
if (doUpdate) {
tmp0_use.lh9_1.mj();
tmp0_use.bha_1 = tmp0_blending;
}
var tmp0_drawVector = Colors_getInstance().u7z_1;
var tmp1_drawVector = tmp0_use.cha_1;
var oldColor = tmp0_use.oh9_1;
tmp0_use.oh9_1 = tmp0_drawVector;
var tmp;
try {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = VectorPath_init_$Create$(null, null, null, false, 15, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.View.renderDebugAnnotationsInternal.<anonymous>.<anonymous>.<anonymous>' call
rect(tmp0_apply, this.li2());
tmp$ret$0 = tmp0_apply;
tmp0_use.iha(tmp$ret$0, tmp1_drawVector);
tmp = Unit_getInstance();
}finally {
tmp0_use.oh9_1 = oldColor;
}
tmp$ret$1 = tmp;
break $l$block;
}finally {
if (doUpdate) {
tmp0_use.lh9_1.mj();
}
tmp0_use.bha_1 = old;
}
}
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.drawVector' call
var tmp1_drawVector_0 = Colors_getInstance().u7z_1;
var tmp2_drawVector = tmp0_use.cha_1;
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.color' call
var oldColor_0 = tmp0_use.oh9_1;
tmp0_use.oh9_1 = tmp1_drawVector_0;
try {
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.drawVector.<anonymous>' call
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.drawVector' call
var tmp$ret$2;
// Inline function 'kotlin.apply' call
var tmp0_apply_0 = VectorPath_init_$Create$(null, null, null, false, 15, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.View.renderDebugAnnotationsInternal.<anonymous>.<anonymous>' call
var tmp_0 = new Point(local.b74(), local.y73());
moveTo_0(tmp0_apply_0, this.wi1(tmp_0, null, 2, null));
var tmp_1 = new Point(local.z73(), local.y73());
lineTo_0(tmp0_apply_0, this.wi1(tmp_1, null, 2, null));
var tmp_2 = new Point(local.z73(), local.a74());
lineTo_0(tmp0_apply_0, this.wi1(tmp_2, null, 2, null));
var tmp_3 = new Point(local.b74(), local.a74());
lineTo_0(tmp0_apply_0, this.wi1(tmp_3, null, 2, null));
tmp0_apply_0.x2c();
tmp$ret$2 = tmp0_apply_0;
tmp0_use.iha(tmp$ret$2, tmp2_drawVector);
}finally {
tmp0_use.oh9_1 = oldColor_0;
}
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.drawVector' call
var tmp3_drawVector = Colors_getInstance().i85_1;
var tmp4_drawVector = tmp0_use.cha_1;
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.color' call
var oldColor_1 = tmp0_use.oh9_1;
tmp0_use.oh9_1 = tmp3_drawVector;
try {
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.drawVector.<anonymous>' call
// Inline function 'com.soywiz.korge.render.LineRenderBatcher.drawVector' call
var tmp$ret$3;
// Inline function 'kotlin.apply' call
var tmp0_apply_1 = VectorPath_init_$Create$(null, null, null, false, 15, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.View.renderDebugAnnotationsInternal.<anonymous>.<anonymous>' call
var anchorSize = 6.0 * ensureNotNull(ctx.bga_1).uha();
var tmp_4 = get_topLeft(local);
circle_0(tmp0_apply_1, this.wi1(tmp_4, null, 2, null), anchorSize);
var tmp_5 = get_topRight(local);
circle_0(tmp0_apply_1, this.wi1(tmp_5, null, 2, null), anchorSize);
var tmp_6 = get_bottomRight(local);
circle_0(tmp0_apply_1, this.wi1(tmp_6, null, 2, null), anchorSize);
var tmp_7 = get_bottomLeft(local);
circle_0(tmp0_apply_1, this.wi1(tmp_7, null, 2, null), anchorSize);
var tmp_8 = get_topLeft(local).e7b(0.5, get_topRight(local));
circle_0(tmp0_apply_1, this.wi1(tmp_8, null, 2, null), anchorSize);
var tmp_9 = get_topRight(local).e7b(0.5, get_bottomRight(local));
circle_0(tmp0_apply_1, this.wi1(tmp_9, null, 2, null), anchorSize);
var tmp_10 = get_bottomRight(local).e7b(0.5, get_bottomLeft(local));
circle_0(tmp0_apply_1, this.wi1(tmp_10, null, 2, null), anchorSize);
var tmp_11 = get_bottomLeft(local).e7b(0.5, get_topLeft(local));
circle_0(tmp0_apply_1, this.wi1(tmp_11, null, 2, null), anchorSize);
tmp$ret$3 = tmp0_apply_1;
tmp0_use.iha(tmp$ret$3, tmp4_drawVector);
}finally {
tmp0_use.oh9_1 = oldColor_1;
}
var tmp5_drawVector = Colors_getInstance().w7z_1;
var tmp6_drawVector = tmp0_use.cha_1;
var oldColor_2 = tmp0_use.oh9_1;
tmp0_use.oh9_1 = tmp5_drawVector;
var tmp_12;
try {
var tmp$ret$4;
// Inline function 'kotlin.apply' call
var tmp0_apply_2 = VectorPath_init_$Create$(null, null, null, false, 15, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.View.renderDebugAnnotationsInternal.<anonymous>.<anonymous>' call
var centerX = this.si0();
var centerY = this.ti0();
line_0(tmp0_apply_2, centerX, centerY - 5, centerX, centerY + 5);
line_0(tmp0_apply_2, centerX - 5, centerY, centerX + 5, centerY);
tmp$ret$4 = tmp0_apply_2;
tmp0_use.iha(tmp$ret$4, tmp6_drawVector);
tmp_12 = Unit_getInstance();
}finally {
tmp0_use.oh9_1 = oldColor_2;
}
tmp$ret$5 = tmp_12;
tmp$ret$6 = tmp$ret$5;
break $l$block_0;
}finally {
tmp0_keepMatrix.i74_1 = a;
tmp0_keepMatrix.j74_1 = b;
tmp0_keepMatrix.k74_1 = c;
tmp0_keepMatrix.l74_1 = d;
tmp0_keepMatrix.m74_1 = tx;
tmp0_keepMatrix.n74_1 = ty;
}
}
tmp$ret$7 = tmp$ret$6;
tmp$ret$8 = tmp$ret$7;
tmp$ret$9 = tmp$ret$8;
};
View.prototype.toString = function () {
var out = get_portableSimpleName(getKClassFromExpression(this));
if (!(this.d1n() === 0.0) ? true : !(this.e1n() === 0.0))
out = out + (':pos=(' + this.si1(this.d1n()) + ',' + this.si1(this.e1n()) + ')');
if (!(this.m9g() === 1.0) ? true : !(this.n9g() === 1.0))
out = out + (':scale=(' + this.si1(this.m9g()) + ',' + this.si1(this.n9g()) + ')');
if (!(_Angle___get_radians__impl__n00yt5(this.pi0()) === 0.0) ? true : !(_Angle___get_radians__impl__n00yt5(this.qi0()) === 0.0))
out = out + (':skew=(' + this.si1(_Angle___get_degrees__impl__qg56vw(this.pi0())) + ',' + this.si1(_Angle___get_degrees__impl__qg56vw(this.qi0())) + ')');
if (!equals(get_absoluteValue(this.ri0()), get_radians(0)))
out = out + (':rotation=(' + this.si1(_Angle___get_degrees__impl__qg56vw(this.ri0())) + '\xBA)');
if (!(this.rgf_1 == null))
out = out + (':name=(' + this.rgf_1 + ')');
if (!this.sgf_1.equals(Companion_getInstance_53().pg8_1))
out = out + (':blendMode=(' + this.sgf_1 + ')');
if (!this.pck())
out = out + (':visible=' + this.pck());
if (!(this.ea2() === 1.0))
out = out + (':alpha=' + this.ea2());
if (!(_RGBA___get_rgb__impl__tijaqt(this.y8j()) === _RGBA___get_rgb__impl__tijaqt(Colors_getInstance().s7z_1)))
out = out + (':colorMul=' + _RGBA___get_hexString__impl__kocngm(this.y8j()));
var tmp = new ColorAdd(this.z8j());
var tmp$ret$0;
// Inline function 'com.soywiz.korim.color.Companion.NEUTRAL' call
var tmp0__get_NEUTRAL__h8d6d8 = Companion_getInstance_10();
tmp$ret$0 = get_ColorAdd_NEUTRAL();
if (!equals(tmp, new ColorAdd(tmp$ret$0)))
out = out + (':colorAdd=' + _ColorAdd___get_shex__impl__x5alyq(this.z8j()));
return out;
};
View.prototype.si1 = function (_this__u8e3s4) {
return toStringDecimal(_this__u8e3s4, 2, true);
};
View.prototype.fh1 = function (p, out) {
return this.oh3(p.d1n(), p.e1n(), out);
};
View.prototype.oh3 = function (x, y, out) {
return this.bi1().g77(x, y, out);
};
View.prototype.ti1 = function (x, y) {
return this.bi1().h77(x, y);
};
View.prototype.ui1 = function (x, y) {
return this.bi1().i77(x, y);
};
View.prototype.mgp = function (x0, y0, x1, y1) {
return this.ti1(x1, y1) - this.ti1(x0, y0);
};
View.prototype.ngp = function (x0, y0, x1, y1) {
return this.ui1(x1, y1) - this.ui1(x0, y0);
};
View.prototype.vi1 = function (p, out) {
return this.xi1(p.d1n(), p.e1n(), out);
};
View.prototype.wi1 = function (p, out, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
out = Companion_getInstance_8().zp();
return this.vi1(p, out);
};
View.prototype.xi1 = function (x, y, out) {
return this.pgw().g77(x, y, out);
};
View.prototype.yi1 = function (x, y) {
return this.pgw().h77(x, y);
};
View.prototype.zi1 = function (x, y) {
return this.pgw().i77(x, y);
};
View.prototype.ai2 = function (x, y, direction) {
if (!this.agh_1)
return null;
if (!this.pck())
return null;
var tmp0_safe_receiver = this.lhz();
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.kds.iterators.fastForEachReverse' call
var n = 0;
while (n < tmp0_safe_receiver.i()) {
// Inline function 'com.soywiz.korge.view.View.hitTest.<anonymous>' call
var tmp0__anonymous__q1qw7t = tmp0_safe_receiver.m((tmp0_safe_receiver.i() - n | 0) - 1 | 0);
var tmp0_safe_receiver_0 = tmp0__anonymous__q1qw7t.ai2(x, y, direction);
if (tmp0_safe_receiver_0 == null)
null;
else {
var tmp$ret$0;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
return tmp0_safe_receiver_0;
}
var tmp0 = n;
n = tmp0 + 1 | 0;
}
}
var res = this.ei2(x, y, null, 4, null);
if (!(res == null))
return res;
var tmp;
if (this instanceof Stage) {
tmp = this;
} else {
tmp = null;
}
return tmp;
};
View.prototype.bi2 = function (x, y, direction, $mask0, $handler) {
if (!(($mask0 & 4) === 0))
direction = HitTestDirection_ANY_getInstance();
return $handler == null ? this.ai2(x, y, direction) : $handler(x, y, direction);
};
View.prototype.jgw = function (x, y) {
if (!this.agh_1)
return null;
if (!this.pck())
return null;
if (this.zi0()) {
var tmp0_safe_receiver = this.lhz();
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.kds.iterators.fastForEachReverse' call
var n = 0;
while (n < tmp0_safe_receiver.i()) {
// Inline function 'com.soywiz.korge.view.View.mouseHitTest.<anonymous>' call
var tmp0__anonymous__q1qw7t = tmp0_safe_receiver.m((tmp0_safe_receiver.i() - n | 0) - 1 | 0);
var tmp0_safe_receiver_0 = tmp0__anonymous__q1qw7t.jgw(x, y);
if (tmp0_safe_receiver_0 == null)
null;
else {
var tmp$ret$0;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
return tmp0_safe_receiver_0;
}
var tmp0 = n;
n = tmp0 + 1 | 0;
}
}
}
if (!this.lh1())
return null;
var tmp1_safe_receiver = this.ei2(x, y, null, 4, null);
if (tmp1_safe_receiver == null)
null;
else {
var tmp$ret$4;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$3;
// Inline function 'com.soywiz.korge.view.View.mouseHitTest.<anonymous>' call
var tmp$ret$2;
// Inline function 'com.soywiz.kds.Pool.invoke' call
var tmp0_invoke = Companion_getInstance_15().i71_1;
var tmp$ret$1;
// Inline function 'com.soywiz.kds.Pool.alloc' call
var temp = tmp0_invoke.t4t();
try {
var area = this.ci2(temp);
if (!(area == null) ? !contains(area, x, y) : false)
return null;
return tmp1_safe_receiver;
}finally {
tmp0_invoke.u4t(temp);
}
tmp$ret$2 = tmp$ret$1;
tmp$ret$3 = tmp$ret$2;
tmp$ret$4 = tmp$ret$3;
}
var tmp;
if (this instanceof Stage) {
tmp = this;
} else {
tmp = null;
}
return tmp;
};
View.prototype.ci2 = function (out) {
DoubleCompanionObject_getInstance();
DoubleCompanionObject_getInstance();
DoubleCompanionObject_getInstance();
DoubleCompanionObject_getInstance();
out.u72(-Infinity, -Infinity, Infinity, Infinity);
var count = 0;
var tmp$ret$1;
// Inline function 'com.soywiz.kds.Pool.invoke' call
var tmp0_invoke = Companion_getInstance_15().i71_1;
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var temp = tmp0_invoke.t4t();
try {
var view = this;
if (false) {
var tmp0_safe_receiver = view;
view = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e5n();
}
while (!(view == null)) {
// Inline function 'com.soywiz.korge.view.View.getClippingAreaInternal.<anonymous>.<anonymous>' call
var tmp0__anonymous__q1qw7t = view;
var tmp;
var tmp_0;
if (!(tmp0__anonymous__q1qw7t instanceof Stage)) {
tmp_0 = tmp0__anonymous__q1qw7t instanceof FixedSizeContainer;
} else {
tmp_0 = false;
}
if (tmp_0) {
tmp = tmp0__anonymous__q1qw7t.la5();
} else {
tmp = false;
}
if (tmp) {
tmp0__anonymous__q1qw7t.mi2(temp);
if (count === 0) {
out.u7c(temp);
} else {
out.y7c(out, temp);
}
var tmp0 = count;
count = tmp0 + 1 | 0;
}
view = view.e5n();
}
tmp$ret$0 = Unit_getInstance();
break $l$block;
}finally {
tmp0_invoke.u4t(temp);
}
}
tmp$ret$1 = tmp$ret$0;
return count === 0 ? null : out;
};
View.prototype.di2 = function (x, y, direction) {
if (!this.agh_1)
return null;
var llx = this.ti1(x, y);
var lly = this.ui1(x, y);
var bounds = this.ogw(false, 1, null);
if (!contains(bounds, llx, lly)) {
return null;
}
var anchorDispX = this.bi0();
var anchorDispY = this.ci0();
var lx = llx + anchorDispX;
var ly = lly + anchorDispY;
if (this.bgh_1 === false)
return this;
var hitShape = this.fi0();
var hitShapes = this.gi0();
if (this.bgh_1 == null ? !(hitShape == null) ? true : !(hitShapes == null) : false) {
var tmp0_safe_receiver = hitShapes;
if (tmp0_safe_receiver == null)
null;
else {
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var n = 0;
while (n < tmp0_safe_receiver.i()) {
// Inline function 'com.soywiz.korge.view.View.hitTestInternal.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp0__anonymous__q1qw7t = tmp0_safe_receiver.m(tmp0);
if (tmp0__anonymous__q1qw7t.k7t(lx, ly))
return this;
}
}
if (!(hitShape == null) ? hitShape.k7t(lx, ly) : false)
return this;
return null;
} else {
return this;
}
};
View.prototype.ei2 = function (x, y, direction, $mask0, $handler) {
if (!(($mask0 & 4) === 0))
direction = HitTestDirection_ANY_getInstance();
return $handler == null ? this.di2(x, y, direction) : $handler(x, y, direction);
};
View.prototype.fi2 = function () {
var tmp0_safe_receiver = this.e5n();
if (tmp0_safe_receiver == null)
null;
else
tmp0_safe_receiver.ai0(this);
};
View.prototype.gi2 = function (target, out, inclusive) {
if (target === this.e5n()) {
out.f76(this.ai1());
} else if (target === this) {
out.o74();
} else {
var commonAncestor = Companion_getInstance_56().rjz(this, target);
if (!(commonAncestor === null)) {
if (target.e5n() == null ? inclusive : false) {
return out.f76(this.pgw());
}
out.s76(this.pgw(), target.bi1());
} else {
out.o74();
}
}
if (inclusive) {
out.s76(out, target.ai1());
}
return out;
};
View.prototype.hi2 = function (bp, out) {
return applyTransform(this.mi2(out), bp.rha());
};
View.prototype.ii2 = function (bp, out, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
out = Companion_getInstance_15().zp();
return this.hi2(bp, out);
};
View.prototype.ji2 = function (ctx, out) {
return ctx.ig9_1.mba() ? this.hi2(ctx, out) : this.mi2(out);
};
View.prototype.ki2 = function (ctx, out) {
return this.ji2(ctx, out);
};
View.prototype.li2 = function () {
return this.ni2(null, 1, null);
};
View.prototype.mi2 = function (out) {
var tmp = this.a5k();
return this.si2(tmp, out, false, true, false, 20, null);
};
View.prototype.ni2 = function (out, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
out = Companion_getInstance_15().zp();
return this.mi2(out);
};
View.prototype.oi2 = function (target, out, inclusive, includeFilters) {
return this.ri2(target, out, false, inclusive, includeFilters);
};
View.prototype.pi2 = function (target, out, inclusive, includeFilters, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
target = this;
if (!(($mask0 & 2) === 0))
out = Companion_getInstance_15().zp();
if (!(($mask0 & 4) === 0))
inclusive = false;
if (!(($mask0 & 8) === 0))
includeFilters = true;
return this.oi2(target, out, inclusive, includeFilters);
};
View.prototype.qi2 = function (concat, out, doAnchoring, includeFilters) {
this.wi2(out, doAnchoring, includeFilters);
if (!(concat == null) ? !concat.u76() : false) {
var p1x = out.b74();
var p1y = out.y73();
var p2x = out.z73();
var p2y = out.y73();
var p3x = out.z73();
var p3y = out.a74();
var p4x = out.b74();
var p4y = out.a74();
var tmp$ret$2;
// Inline function 'com.soywiz.kds.Pool.invoke' call
var tmp0_invoke = Companion_getInstance_27().f71_1;
var tmp$ret$1;
$l$block: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var temp = tmp0_invoke.t4t();
try {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.view.View._getBounds.<anonymous>' call
temp.m71(concat.h77(p1x, p1y), concat.i77(p1x, p1y));
temp.m71(concat.h77(p2x, p2y), concat.i77(p2x, p2y));
temp.m71(concat.h77(p3x, p3y), concat.i77(p3x, p3y));
temp.m71(concat.h77(p4x, p4y), concat.i77(p4x, p4y));
tmp$ret$0 = temp.a72(out);
tmp$ret$1 = tmp$ret$0;
break $l$block;
}finally {
tmp0_invoke.u4t(temp);
}
}
tmp$ret$2 = tmp$ret$1;
}
return out;
};
View.prototype.ri2 = function (target, out, doAnchoring, inclusive, includeFilters) {
var tmp$ret$2;
// Inline function 'com.soywiz.kds.Pool.invoke' call
var tmp0_invoke = Companion_getInstance_17().p74_1;
var tmp$ret$1;
$l$block: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var temp = tmp0_invoke.t4t();
try {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.view.View.getBounds.<anonymous>' call
var tmp0_elvis_lhs = target;
tmp$ret$0 = this.qi2(this.gi2(tmp0_elvis_lhs == null ? this : tmp0_elvis_lhs, temp, inclusive), out, doAnchoring, includeFilters);
tmp$ret$1 = tmp$ret$0;
break $l$block;
}finally {
tmp0_invoke.u4t(temp);
}
}
tmp$ret$2 = tmp$ret$1;
return tmp$ret$2;
};
View.prototype.si2 = function (target, out, doAnchoring, inclusive, includeFilters, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
target = this;
if (!(($mask0 & 2) === 0))
out = Companion_getInstance_15().zp();
if (!(($mask0 & 4) === 0))
doAnchoring = true;
if (!(($mask0 & 8) === 0))
inclusive = false;
if (!(($mask0 & 16) === 0))
includeFilters = true;
return this.ri2(target, out, doAnchoring, inclusive, includeFilters);
};
View.prototype.ti2 = function (includeFilters) {
return this.xi2(this.cgh_1, false, includeFilters, 2, null);
};
View.prototype.ui2 = function (includeFilters, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
includeFilters = true;
return this.ti2(includeFilters);
};
View.prototype.vi2 = function (includeFilters) {
return this.wi2(this.cgh_1, true, includeFilters);
};
View.prototype.ogw = function (includeFilters, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
includeFilters = true;
return this.vi2(includeFilters);
};
View.prototype.wi2 = function (out, doAnchoring, includeFilters) {
this.uhw(out);
var it = out;
if (!doAnchoring) {
var tmp0_this = it;
tmp0_this.v71_1 = tmp0_this.v71_1 + this.bi0();
var tmp1_this = it;
tmp1_this.w71_1 = tmp1_this.w71_1 + this.ci0();
}
if (includeFilters) {
var tmp2_safe_receiver = get_filter(this);
if (tmp2_safe_receiver == null)
null;
else {
expandBorderRectangle(tmp2_safe_receiver, out);
}
}
return it;
};
View.prototype.xi2 = function (out, doAnchoring, includeFilters, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
doAnchoring = true;
if (!(($mask0 & 4) === 0))
includeFilters = true;
return this.wi2(out, doAnchoring, includeFilters);
};
View.prototype.uhw = function (out) {
out.zl();
};
View.$metadata$ = classMeta('View', [Renderable, Extra, KorgeDebugNode, BView, XY, HitTestable, WithHitShape2d], undefined, undefined, undefined, BaseView.prototype);
function hasAncestor(_this__u8e3s4, ancestor) {
var tmp;
if (equals(_this__u8e3s4, ancestor)) {
tmp = true;
} else {
var tmp0_safe_receiver = _this__u8e3s4.e5n();
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : hasAncestor(tmp0_safe_receiver, ancestor);
tmp = tmp1_elvis_lhs == null ? false : tmp1_elvis_lhs;
}
return tmp;
}
function position(_this__u8e3s4, x, y) {
return xy(_this__u8e3s4, x, y);
}
function size(_this__u8e3s4, width, height) {
_this__u8e3s4.phm(width, height);
return _this__u8e3s4;
}
function descendantsWith(_this__u8e3s4, out, check) {
if (!(_this__u8e3s4 == null)) {
if (check(_this__u8e3s4)) {
// Inline function 'kotlin.collections.plusAssign' call
out.c(_this__u8e3s4);
}
if (_this__u8e3s4.ggf_1) {
var tmp$ret$1;
// Inline function 'com.soywiz.korge.view.View.forEachChild' call
var tmp0_safe_receiver = _this__u8e3s4.lhz();
var tmp;
if (tmp0_safe_receiver == null) {
tmp = null;
} else {
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var n = 0;
while (n < tmp0_safe_receiver.i()) {
// Inline function 'com.soywiz.korge.view.descendantsWith.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp0__anonymous__q1qw7t = tmp0_safe_receiver.m(tmp0);
descendantsWith(tmp0__anonymous__q1qw7t, out, check);
}
tmp = Unit_getInstance();
}
tmp$ret$1 = tmp;
}
}
return out;
}
function descendantsWith$default(_this__u8e3s4, out, check, $mask0, $handler) {
if (!(($mask0 & 1) === 0)) {
var tmp$ret$0;
var tmp$ret$0_0;
// Inline function 'kotlin.collections.arrayListOf' call
tmp$ret$0 = ArrayList_init_$Create$_0();
tmp$ret$0_0 = Unit_getInstance();
out = tmp$ret$0;
}
return descendantsWith(_this__u8e3s4, out, check);
}
function addUpdater(_this__u8e3s4, updatable) {
return addUpdater_0(_this__u8e3s4, true, updatable);
}
function addFixedUpdater(_this__u8e3s4, time, initial, limitCallsPerFrame, updatable) {
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp0_also = attach(new addFixedUpdater$1(_this__u8e3s4, time, updatable, limitCallsPerFrame));
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.addFixedUpdater.<anonymous>' call
if (initial) {
updatable(_this__u8e3s4);
}
tmp$ret$0 = tmp0_also;
return tmp$ret$0;
}
function addFixedUpdater$default(_this__u8e3s4, time, initial, limitCallsPerFrame, updatable, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
initial = true;
if (!(($mask0 & 4) === 0))
limitCallsPerFrame = 16;
return addFixedUpdater(_this__u8e3s4, time, initial, limitCallsPerFrame, updatable);
}
function scale(_this__u8e3s4, sx, sy) {
_this__u8e3s4.li0(sx);
_this__u8e3s4.mi0(sy);
return _this__u8e3s4;
}
function get_ancestorCount(_this__u8e3s4) {
var count = 0;
var tmp0_safe_receiver = _this__u8e3s4;
var parent = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.e5n();
while (!(parent == null)) {
var tmp1 = count;
count = tmp1 + 1 | 0;
parent = parent.e5n();
}
return count;
}
function ViewRenderPhase() {
}
ViewRenderPhase.$metadata$ = interfaceMeta('ViewRenderPhase');
function xy(_this__u8e3s4, x, y) {
_this__u8e3s4.w8w(x);
_this__u8e3s4.o7c(y);
return _this__u8e3s4;
}
function addUpdater_0(_this__u8e3s4, first, updatable) {
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp0_also = attach(new addUpdater$1(_this__u8e3s4, updatable));
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.addUpdater.<anonymous>' call
if (first) {
tmp0_also.xgc(Companion_getInstance_1().l1h_1);
}
tmp$ret$0 = tmp0_also;
return tmp$ret$0;
}
function ViewLeaf() {
}
ViewLeaf.$metadata$ = interfaceMeta('ViewLeaf');
function hitTest(_this__u8e3s4, pos) {
var tmp = pos.d1n();
var tmp_0 = pos.e1n();
return _this__u8e3s4.bi2(tmp, tmp_0, null, 4, null);
}
function alignLeftToRightOf(_this__u8e3s4, other, padding) {
return alignX(_this__u8e3s4, other, 1.0, false, padding);
}
function alignLeftToRightOf$default(_this__u8e3s4, other, padding, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
padding = 0.0;
return alignLeftToRightOf(_this__u8e3s4, other, padding);
}
function alignTopToBottomOf(_this__u8e3s4, other, padding) {
return alignY(_this__u8e3s4, other, 1.0, false, padding);
}
function alignTopToBottomOf$default(_this__u8e3s4, other, padding, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
padding = 0.0;
return alignTopToBottomOf(_this__u8e3s4, other, padding);
}
function bounds(_this__u8e3s4, rect) {
return bounds_0(_this__u8e3s4, rect.b74(), rect.y73(), rect.z73(), rect.a74());
}
function position_0(_this__u8e3s4, point) {
return position(_this__u8e3s4, point.d1n(), point.e1n());
}
function alignX(_this__u8e3s4, other, ratio, inside, padding) {
return alignXY(_this__u8e3s4, other, ratio, inside, true, padding);
}
function alignY(_this__u8e3s4, other, ratio, inside, padding) {
return alignXY(_this__u8e3s4, other, ratio, inside, false, padding);
}
function bounds_0(_this__u8e3s4, left, top, right, bottom) {
return size(xy(_this__u8e3s4, left, top), right - left, bottom - top);
}
function alignXY(_this__u8e3s4, other, ratio, inside, doX, padding) {
var tmp = _this__u8e3s4.e5n();
var bounds = other.pi2(tmp, null, false, false, 14, null);
var localBounds = _this__u8e3s4.ui2(false, 1, null);
var ratioM1_1 = ratio * 2 - 1;
var rratioM1_1 = inside ? ratioM1_1 : -ratioM1_1;
var iratio = inside ? ratio : 1.0 - ratio;
if (doX) {
_this__u8e3s4.w8w(bounds.v71_1 + bounds.x71_1 * ratio - localBounds.b74() - _this__u8e3s4.wi0() * iratio - padding * rratioM1_1);
} else {
_this__u8e3s4.o7c(bounds.w71_1 + bounds.y71_1 * ratio - localBounds.y73() - _this__u8e3s4.xi0() * iratio - padding * rratioM1_1);
}
return _this__u8e3s4;
}
function addFixedUpdater$1($this_addFixedUpdater, $time, $updatable, $limitCallsPerFrame) {
this.zjz_1 = $this_addFixedUpdater;
this.ak0_1 = $time;
this.bk0_1 = $updatable;
this.ck0_1 = $limitCallsPerFrame;
var tmp = this;
var tmp$ret$0;
// Inline function 'com.soywiz.klock.milliseconds' call
tmp$ret$0 = Companion_getInstance_1().o1h(0.0);
tmp.yjz_1 = tmp$ret$0;
}
addFixedUpdater$1.prototype.n2u = function () {
return this.zjz_1;
};
addFixedUpdater$1.prototype.xgc = function (dt) {
var tmp0_this = this;
tmp0_this.yjz_1 = TimeSpan__plus_impl_qdd6zo(tmp0_this.yjz_1, dt);
var calls = 0;
$l$loop: while (TimeSpan__compareTo_impl_zidry4(this.yjz_1, TimeSpan__times_impl_86ofia_0(this.ak0_1, 0.75)) >= 0) {
var tmp1_this = this;
tmp1_this.yjz_1 = TimeSpan__minus_impl_5w5v8s(tmp1_this.yjz_1, this.ak0_1);
this.bk0_1(this.zjz_1);
var tmp2 = calls;
calls = tmp2 + 1 | 0;
if (calls >= this.ck0_1) {
var tmp = this;
var tmp$ret$0;
// Inline function 'com.soywiz.klock.milliseconds' call
tmp$ret$0 = Companion_getInstance_1().o1h(0.0);
tmp.yjz_1 = tmp$ret$0;
break $l$loop;
}
}
if (calls > 0) {
if (TimeSpan__compareTo_impl_zidry4(this.yjz_1, TimeSpan__times_impl_86ofia_0(this.ak0_1, 0.25)) < 0) {
var tmp_0 = this;
var tmp$ret$1;
// Inline function 'com.soywiz.klock.milliseconds' call
tmp$ret$1 = Companion_getInstance_1().o1h(0.0);
tmp_0.yjz_1 = tmp$ret$1;
}
}
};
addFixedUpdater$1.$metadata$ = classMeta(undefined, [UpdateComponent]);
function addUpdater$1($this_addUpdater, $updatable) {
this.wjz_1 = $this_addUpdater;
this.xjz_1 = $updatable;
}
addUpdater$1.prototype.n2u = function () {
return this.wjz_1;
};
addUpdater$1.prototype.xgc = function (dt) {
this.xjz_1(this.wjz_1, new TimeSpan(dt));
};
addUpdater$1.$metadata$ = classMeta(undefined, [UpdateComponent]);
function get_debugExtraComponents(_this__u8e3s4) {
init_properties_ViewDebugExtra_kt_21yqjs();
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.kds.PropertyThis.getValue' call
var tmp0_getValue = debugExtraComponents$factory();
var tmp0_elvis_lhs = debugExtraComponents$delegate.k4v_1;
var res = getExtraTyped(_this__u8e3s4, tmp0_elvis_lhs == null ? tmp0_getValue.callableName : tmp0_elvis_lhs);
if (res == null) {
var r = debugExtraComponents$delegate.l4v_1(_this__u8e3s4);
// Inline function 'com.soywiz.kds.PropertyThis.setValueUntransformed' call
var tmp0_elvis_lhs_0 = debugExtraComponents$delegate.k4v_1;
setExtra(_this__u8e3s4, tmp0_elvis_lhs_0 == null ? tmp0_getValue.callableName : tmp0_elvis_lhs_0, r);
tmp$ret$0 = r;
break $l$block;
}
tmp$ret$0 = res;
}
return tmp$ret$0;
}
var debugExtraComponents$delegate;
function DebugExtraComponents$lambda$lambda($callbacks, $views) {
return function ($this$uiCollapsibleSection) {
var tmp0_iterator = $callbacks.j();
while (tmp0_iterator.k()) {
var callback = tmp0_iterator.l();
callback($this$uiCollapsibleSection, $views);
}
return Unit_getInstance();
};
}
function DebugExtraComponents$lambda(this$0) {
return function (views, view, container) {
var tmp0_safe_receiver = this$0.fk0_1;
if (tmp0_safe_receiver == null)
null;
else
tmp0_safe_receiver(views, view, container);
var tmp$ret$0;
// Inline function 'kotlin.collections.iterator' call
var tmp0_iterator = this$0.ek0_1;
tmp$ret$0 = tmp0_iterator.j1().j();
var tmp1_iterator = tmp$ret$0;
while (tmp1_iterator.k()) {
var tmp2_loop_parameter = tmp1_iterator.l();
var tmp$ret$1;
// Inline function 'kotlin.collections.component1' call
tmp$ret$1 = tmp2_loop_parameter.k1();
var section = tmp$ret$1;
var tmp$ret$2;
// Inline function 'kotlin.collections.component2' call
tmp$ret$2 = tmp2_loop_parameter.l1();
var callbacks = tmp$ret$2;
var tmp$ret$3;
// Inline function 'kotlin.text.isNullOrBlank' call
// Inline function 'kotlin.contracts.contract' call
tmp$ret$3 = section == null ? true : isBlank(section);
if (tmp$ret$3) {
var tmp3_iterator = callbacks.j();
while (tmp3_iterator.k()) {
var callback = tmp3_iterator.l();
callback(container, views);
}
} else {
uiCollapsibleSection(container, section, DebugExtraComponents$lambda$lambda(callbacks, views));
}
}
return Unit_getInstance();
};
}
function DebugExtraComponents$add$lambda($list, $block) {
return function () {
$list.c5($block);
return Unit_getInstance();
};
}
function DebugExtraComponents(view) {
this.dk0_1 = view;
this.ek0_1 = LinkedHashMap_init_$Create$();
this.fk0_1 = this.dk0_1.dgh_1;
var tmp = this.dk0_1;
tmp.dgh_1 = DebugExtraComponents$lambda(this);
}
DebugExtraComponents.prototype.gk0 = function (section, block) {
var tmp$ret$1;
// Inline function 'kotlin.collections.getOrPut' call
var tmp0_getOrPut = this.ek0_1;
var value = tmp0_getOrPut.q(section);
var tmp;
if (value == null) {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.view.DebugExtraComponents.add.<anonymous>' call
tmp$ret$0 = FastArrayList_init_$Create$();
var answer = tmp$ret$0;
tmp0_getOrPut.a(section, answer);
tmp = answer;
} else {
tmp = value;
}
tmp$ret$1 = tmp;
var list = tmp$ret$1;
list.c(block);
var tmp_0 = Companion_getInstance_19();
return tmp_0.p5y(DebugExtraComponents$add$lambda(list, block));
};
DebugExtraComponents.$metadata$ = classMeta('DebugExtraComponents');
function addDebugExtraComponent(_this__u8e3s4, section, block) {
init_properties_ViewDebugExtra_kt_21yqjs();
return get_debugExtraComponents(_this__u8e3s4).gk0(section, block);
}
function debugExtraComponents$delegate$lambda($this$$receiver) {
init_properties_ViewDebugExtra_kt_21yqjs();
return new DebugExtraComponents($this$$receiver);
}
function debugExtraComponents$factory() {
return getPropertyCallableRef('debugExtraComponents', 1, KProperty1, function (receiver) {
return get_debugExtraComponents(receiver);
}, null);
}
var properties_initialized_ViewDebugExtra_kt_dpqcsc;
function init_properties_ViewDebugExtra_kt_21yqjs() {
if (properties_initialized_ViewDebugExtra_kt_dpqcsc) {
} else {
properties_initialized_ViewDebugExtra_kt_dpqcsc = true;
debugExtraComponents$delegate = PropertyThis_init_$Create$(null, debugExtraComponents$delegate$lambda, 1, null);
}
}
function ViewFileRef$Mixin$lazyLoadRenderInternalActually$slambda($view, $ctx, this$0, resultContinuation) {
this.pk0_1 = $view;
this.qk0_1 = $ctx;
this.rk0_1 = this$0;
CoroutineImpl.call(this, resultContinuation);
}
ViewFileRef$Mixin$lazyLoadRenderInternalActually$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
ViewFileRef$Mixin$lazyLoadRenderInternalActually$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
ViewFileRef$Mixin$lazyLoadRenderInternalActually$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
var tmp_0 = ensureNotNull(this.qk0_1.bga_1);
suspendResult = this.pk0_1.cjp(tmp_0, null, this.rk0_1.yjo_1, this, 2, null);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
ViewFileRef$Mixin$lazyLoadRenderInternalActually$slambda.prototype.k53 = function (completion) {
var i = new ViewFileRef$Mixin$lazyLoadRenderInternalActually$slambda(this.pk0_1, this.qk0_1, this.rk0_1, completion);
return i;
};
ViewFileRef$Mixin$lazyLoadRenderInternalActually$slambda.$metadata$ = classMeta('ViewFileRef$Mixin$lazyLoadRenderInternalActually$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function ViewFileRef$Mixin$lazyLoadRenderInternalActually$slambda_0($view, $ctx, this$0, resultContinuation) {
var i = new ViewFileRef$Mixin$lazyLoadRenderInternalActually$slambda($view, $ctx, this$0, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function Mixin_0() {
this.xjo_1 = true;
this.yjo_1 = null;
}
Mixin_0.prototype.zjo = function (_set____db54di) {
this.xjo_1 = _set____db54di;
};
Mixin_0.prototype.wjo = function (value) {
this.xjo_1 = false;
this.yjo_1 = value;
};
Mixin_0.prototype.vjo = function (_this__u8e3s4, views, currentVfs, sourceFile, $cont) {
_this__u8e3s4.wjo(sourceFile);
_this__u8e3s4.zjo(true);
return Unit_getInstance();
};
Mixin_0.prototype.bjp = function (views, currentVfs, sourceFile, $cont) {
// Inline function 'kotlin.TODO' call
throw new NotImplementedError('An operation is not implemented: Must override this');
};
Mixin_0.prototype.ajp = function (ctx, view) {
if (this.xjo_1)
return Unit_getInstance();
this.sk0(ctx, view);
};
Mixin_0.prototype.sk0 = function (ctx, view) {
if (!this.xjo_1 ? !(this.yjo_1 == null) : false) {
this.xjo_1 = true;
launchImmediately_0(ctx.lg9_1, ViewFileRef$Mixin$lazyLoadRenderInternalActually$slambda_0(view, ctx, this, null));
}
};
Mixin_0.$metadata$ = classMeta('Mixin', [ViewFileRef]);
function ViewFileRef() {
}
ViewFileRef.$metadata$ = interfaceMeta('ViewFileRef');
function set_views(_this__u8e3s4, _set____db54di) {
init_properties_Views_kt_c94q0q();
var tmp0_setValue = views$factory();
var tmp0_setValueUntransformed = views$delegate.m4v_1(_this__u8e3s4, _set____db54di);
var tmp0_elvis_lhs = views$delegate.k4v_1;
setExtra(_this__u8e3s4, tmp0_elvis_lhs == null ? tmp0_setValue.callableName : tmp0_elvis_lhs, tmp0_setValueUntransformed);
return Unit_getInstance();
}
function get_views(_this__u8e3s4) {
init_properties_Views_kt_c94q0q();
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.kds.PropertyThis.getValue' call
var tmp0_getValue = views$factory_0();
var tmp0_elvis_lhs = views$delegate.k4v_1;
var res = getExtraTyped(_this__u8e3s4, tmp0_elvis_lhs == null ? tmp0_getValue.callableName : tmp0_elvis_lhs);
if (res == null) {
var r = views$delegate.l4v_1(_this__u8e3s4);
// Inline function 'com.soywiz.kds.PropertyThis.setValueUntransformed' call
var tmp0_elvis_lhs_0 = views$delegate.k4v_1;
setExtra(_this__u8e3s4, tmp0_elvis_lhs_0 == null ? tmp0_getValue.callableName : tmp0_elvis_lhs_0, r);
tmp$ret$0 = r;
break $l$block;
}
tmp$ret$0 = res;
}
return tmp$ret$0;
}
var views$delegate;
function Views_init_$Init$(coroutineContext, ag, injector, input, timeProvider, stats, gameWindow, gameId, settingsFolder, batchMaxQuads, bp, $mask0, $marker, $this) {
if (!(($mask0 & 128) === 0))
gameId = 'korgegame';
if (!(($mask0 & 256) === 0))
settingsFolder = null;
if (!(($mask0 & 512) === 0))
batchMaxQuads = Companion_getInstance_46().qg6_1;
if (!(($mask0 & 1024) === 0))
bp = new Base();
Views.call($this, coroutineContext, ag, injector, input, timeProvider, stats, gameWindow, gameId, settingsFolder, batchMaxQuads, bp);
return $this;
}
function Views_init_$Create$(coroutineContext, ag, injector, input, timeProvider, stats, gameWindow, gameId, settingsFolder, batchMaxQuads, bp, $mask0, $marker) {
return Views_init_$Init$(coroutineContext, ag, injector, input, timeProvider, stats, gameWindow, gameId, settingsFolder, batchMaxQuads, bp, $mask0, $marker, Object.create(Views.prototype));
}
function SaveEvent(action, view) {
this.tk0_1 = action;
this.uk0_1 = view;
}
SaveEvent.prototype.vk0 = function () {
return this.tk0_1;
};
SaveEvent.prototype.n2u = function () {
return this.uk0_1;
};
SaveEvent.prototype.toString = function () {
var tmp$ret$1;
// Inline function 'kotlin.text.buildString' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = StringBuilder_init_$Create$();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.SaveEvent.toString.<anonymous>' call
tmp0_apply.gc(this.tk0_1);
if (!(this.uk0_1 == null)) {
tmp0_apply.gc(' ');
tmp0_apply.gc(!(this.uk0_1.rgf_1 == null) ? this.uk0_1.rgf_1 : '#' + this.uk0_1.m4());
tmp0_apply.gc(' (' + getKClassFromExpression(this.uk0_1).tj() + ')');
}
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0.toString();
return tmp$ret$1;
};
SaveEvent.prototype.hashCode = function () {
var result = getStringHashCode(this.tk0_1);
result = imul(result, 31) + (this.uk0_1 == null ? 0 : hashCode(this.uk0_1)) | 0;
return result;
};
SaveEvent.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof SaveEvent))
return false;
var tmp0_other_with_cast = other instanceof SaveEvent ? other : THROW_CCE();
if (!(this.tk0_1 === tmp0_other_with_cast.tk0_1))
return false;
if (!equals(this.uk0_1, tmp0_other_with_cast.uk0_1))
return false;
return true;
};
SaveEvent.$metadata$ = classMeta('SaveEvent');
function Views$realSettingsFolder$delegate$lambda(this$0) {
return function () {
return !(this$0.jfw_1 == null) ? ensureNotNull(this$0.jfw_1) : OS_getInstance().t4y() ? '/Users/' + Companion_getInstance_9().c19('USER') + '/Library/Preferences/' + this$0.wk0() : OS_getInstance().r4y() ? '' + Companion_getInstance_9().c19('APPDATA') + '/' + this$0.wk0() : '' + Companion_getInstance_9().c19('HOME') + '/.config/' + this$0.wk0();
};
}
function Views$close$slambda(this$0, resultContinuation) {
this.fk1_1 = this$0;
CoroutineImpl.call(this, resultContinuation);
}
Views$close$slambda.prototype.z56 = function ($cont) {
var tmp = this.k53($cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
Views$close$slambda.prototype.to = function ($cont) {
return this.z56($cont);
};
Views$close$slambda.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = this.fk1_1.gk1(this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
Views$close$slambda.prototype.k53 = function (completion) {
var i = new Views$close$slambda(this.fk1_1, completion);
return i;
};
Views$close$slambda.$metadata$ = classMeta('Views$close$slambda', undefined, undefined, undefined, [0], CoroutineImpl.prototype);
function Views$close$slambda_0(this$0, resultContinuation) {
var i = new Views$close$slambda(this$0, resultContinuation);
var l = function ($cont) {
return i.z56($cont);
};
l.$arity = 0;
return l;
}
function Views$tempViewsPool$lambda(it) {
return FastArrayList_init_$Create$();
}
function Views$tempCompsPool$lambda(it) {
return FastArrayList_init_$Create$();
}
function Views$lambda(this$0) {
return function (it) {
this$0.xfw_1.jh6();
return Unit_getInstance();
};
}
function Views$dispatch$lambda(this$0, $e) {
return function (it) {
it.hk1(this$0.ofw_1, $e);
return Unit_getInstance();
};
}
function Views$dispatch$lambda_0(this$0, $e) {
return function (it) {
it.wgc(this$0.ofw_1, $e);
return Unit_getInstance();
};
}
function Views$dispatch$lambda_1(this$0, $e) {
return function (it) {
it.ygc(this$0.ofw_1, $e);
return Unit_getInstance();
};
}
function Views$dispatch$lambda_2(this$0, $e) {
return function (it) {
it.bgd(this$0.ofw_1, $e.ac6_1, $e.bc6_1);
return Unit_getInstance();
};
}
function Views$dispatch$lambda_3(this$0, $e) {
return function (it) {
var tmp$ret$1;
// Inline function 'kotlin.apply' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.Views.dispatch.<anonymous>.<anonymous>.<anonymous>' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.Views.dispatch.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
it.vgc(this$0, $e);
tmp$ret$0 = this$0;
tmp$ret$1 = it;
return Unit_getInstance();
};
}
function Views$dispatch$lambda_4(this$0, $e) {
return function (it) {
it.ik1(this$0.ofw_1, $e);
return Unit_getInstance();
};
}
function Views$dispatch$lambda_5(this$0, $e) {
return function (it) {
it.jk1(this$0.ofw_1, $e);
return Unit_getInstance();
};
}
function Views$dispatch$lambda_6($e) {
return function (it) {
it.dgd($e);
return Unit_getInstance();
};
}
function $initCOROUTINE$20(_this__u8e3s4, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.sk1_1 = _this__u8e3s4;
}
$initCOROUTINE$20.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 2;
this.o7_1 = 1;
suspendResult = debugBmpFont_0(this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 1:
var ARGUMENT = suspendResult;
this.sk1_1.tfw_1 = ARGUMENT;
return Unit_getInstance();
case 2:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 2) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$initCOROUTINE$20.$metadata$ = classMeta('$initCOROUTINE$20', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function $closeSuspendCOROUTINE$21(_this__u8e3s4, resultContinuation) {
CoroutineImpl.call(this, resultContinuation);
this.bk2_1 = _this__u8e3s4;
}
$closeSuspendCOROUTINE$21.prototype.v7 = function () {
var suspendResult = this.q7_1;
$sm: do
try {
var tmp = this.o7_1;
switch (tmp) {
case 0:
this.p7_1 = 4;
KorgeReload_getInstance().lg7();
var tmp_0 = this;
tmp_0.ck2_1 = this.bk2_1.gfx_1;
this.dk2_1 = 0;
this.o7_1 = 1;
continue $sm;
case 1:
if (!(this.dk2_1 < this.ck2_1.i())) {
this.o7_1 = 3;
continue $sm;
}
var tmp_1 = this;
var tmp0 = this.dk2_1;
this.dk2_1 = tmp0 + 1 | 0;
tmp_1.ek2_1 = this.ck2_1.m(tmp0);
this.o7_1 = 2;
suspendResult = this.ek2_1.x51(this);
if (suspendResult === get_COROUTINE_SUSPENDED()) {
return suspendResult;
}
continue $sm;
case 2:
this.o7_1 = 1;
continue $sm;
case 3:
this.bk2_1.gfx_1.x7();
cancel$default(this.bk2_1.bfw_1, null, 1, null);
this.bk2_1.hfw_1.jci(0, 1, null);
return Unit_getInstance();
case 4:
throw this.r7_1;
}
} catch ($p) {
if (this.p7_1 === 4) {
throw $p;
} else {
this.o7_1 = this.p7_1;
this.r7_1 = $p;
}
}
while (true);
};
$closeSuspendCOROUTINE$21.$metadata$ = classMeta('$closeSuspendCOROUTINE$21', undefined, undefined, undefined, undefined, CoroutineImpl.prototype);
function Views(coroutineContext, ag, injector, input, timeProvider, stats, gameWindow, gameId, settingsFolder, batchMaxQuads, bp) {
this.bfw_1 = coroutineContext;
this.cfw_1 = ag;
this.dfw_1 = injector;
this.efw_1 = input;
this.ffw_1 = timeProvider;
this.gfw_1 = stats;
this.hfw_1 = gameWindow;
this.ifw_1 = gameId;
this.jfw_1 = settingsFolder;
this.kfw_1 = batchMaxQuads;
this.lfw_1 = bp;
var tmp = this;
tmp.mfw_1 = Mixin_init_$Create$(null, 1, null);
this.nfw_1 = new Mixin();
this.ofw_1 = this;
this.pfw_1 = false;
this.qfw_1 = continuousRenderMode$factory(this.hfw_1);
this.rfw_1 = 2.54;
var tmp_0 = this;
tmp_0.sfw_1 = lazy(Views$realSettingsFolder$delegate$lambda(this));
this.ufw_1 = null;
this.vfw_1 = get_resourcesVfs();
this.wfw_1 = get_RegisteredImageFormats();
this.xfw_1 = new RenderContext(this.cfw_1, this, this.gfw_1, this.bfw_1, this.kfw_1);
this.yfw_1 = true;
this.zfw_1 = Colors_getInstance().t7z_1;
var tmp_1 = this;
var tmp$ret$0;
// Inline function 'kotlin.collections.hashMapOf' call
tmp$ret$0 = HashMap_init_$Create$();
tmp_1.afx_1 = tmp$ret$0;
var tmp_2 = this;
var tmp$ret$1;
// Inline function 'com.soywiz.klock.milliseconds' call
tmp$ret$1 = Companion_getInstance_1().o1h(100.0);
tmp_2.bfx_1 = tmp$ret$1;
var tmp_3 = this;
var tmp_4 = this.vfw_1;
tmp_3.cfx_1 = Resources_init_$Create$(this.bfw_1, tmp_4, null, 4, null);
this.dfx_1 = false;
var tmp_5 = this;
DefaultViewport_getInstance();
tmp_5.efx_1 = 1280;
var tmp_6 = this;
DefaultViewport_getInstance();
tmp_6.ffx_1 = 720;
var tmp_7 = this;
var tmp$ret$2;
// Inline function 'kotlin.collections.arrayListOf' call
tmp$ret$2 = ArrayList_init_$Create$_0();
tmp_7.gfx_1 = tmp$ret$2;
this.hfx_1 = Companion_getInstance_6().m7d_1;
this.ifx_1 = Companion_getInstance_5().v6z_1;
this.jfx_1 = true;
var tmp_8 = this;
tmp_8.kfx_1 = ReshapeEvent_init_$Create$(0, 0, 0, 0, 12, null);
this.lfx_1 = new Stage(this);
this.mfx_1 = this.lfx_1;
this.nfx_1 = true;
this.ofx_1 = false;
this.pfx_1 = debugExtraFontScale$factory(this.xfw_1);
this.qfx_1 = debugExtraFontColor$factory(this.xfw_1);
this.rfx_1 = FastArrayList_init_$Create$();
this.sfx_1 = this.ffw_1.d1h();
var tmp_9 = this;
tmp_9.tfx_1 = Pool_init_$Create$(0, Views$tempViewsPool$lambda, 1, null);
var tmp_10 = this;
tmp_10.ufx_1 = Pool_init_$Create$(0, Views$tempCompsPool$lambda, 1, null);
this.vfx_1 = Companion_getInstance().k7d();
this.wfx_1 = Companion_getInstance().k7d();
this.xfx_1 = Companion_getInstance().k7d();
var tmp_11 = this;
tmp_11.yfx_1 = Signal_init_$Create$(null, 1, null);
var tmp_12 = this;
tmp_12.zfx_1 = Signal_init_$Create$(null, 1, null);
this.afy_1 = -1.0;
this.dfw_1.te0(getKClass(CoroutineContext), this.bfw_1);
this.dfw_1.te0(getKClass(AG), this.cfw_1);
this.dfw_1.te0(getKClass(Views), this);
this.zfx_1.j54(Views$lambda(this));
installFpsDebugOverlay(this);
this.bfy_1 = Companion_getInstance_9().c19('SHOW_FRAME_UPDATE_AND_RENDER') === 'true';
var tmp_13 = this;
tmp_13.cfy_1 = EventResult_init_$Create$(0, 0, 3, null);
var tmp_14 = this;
tmp_14.dfy_1 = Signal_init_$Create$(null, 1, null);
var tmp_15 = this;
tmp_15.efy_1 = Signal_init_$Create$(null, 1, null);
var tmp_16 = this;
tmp_16.ffy_1 = Signal_init_$Create$(null, 1, null);
this.gfy_1 = updatedSinceFrame$factory(this.hfw_1);
var tmp_17 = this;
var tmp$ret$3;
// Inline function 'kotlin.collections.arrayListOf' call
tmp$ret$3 = ArrayList_init_$Create$_0();
tmp_17.hfy_1 = tmp$ret$3;
}
Views.prototype.b1u = function () {
return this.bfw_1;
};
Views.prototype.fgh = function () {
return this.efw_1;
};
Views.prototype.e4v = function (_set____db54di) {
this.mfw_1.e4v(_set____db54di);
};
Views.prototype.f4v = function () {
return this.mfw_1.f4v();
};
Views.prototype.nc3 = function (clazz, handler) {
return this.nfw_1.nc3(clazz, handler);
};
Views.prototype.pha = function () {
return this.lfw_1.pha();
};
Views.prototype.fgd = function () {
return this.lfw_1.fgd();
};
Views.prototype.qha = function () {
return this.lfw_1.qha();
};
Views.prototype.egd = function () {
return this.lfw_1.egd();
};
Views.prototype.rha = function () {
return this.lfw_1.rha();
};
Views.prototype.sha = function () {
return this.lfw_1.sha();
};
Views.prototype.tha = function () {
return this.lfw_1.tha();
};
Views.prototype.ngw = function () {
return this.lfw_1.ngw();
};
Views.prototype.uha = function () {
return this.lfw_1.uha();
};
Views.prototype.vha = function () {
return this.lfw_1.vha();
};
Views.prototype.ofz = function (x, y, out) {
return this.lfw_1.ofz(x, y, out);
};
Views.prototype.mh0 = function () {
return this.ofw_1;
};
Views.prototype.hg7 = function (_set____db54di) {
var tmp0_setValue = forceRenderEveryFrame$factory();
return this.qfw_1.set(_set____db54di);
};
Views.prototype.qg0 = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = forceRenderEveryFrame$factory_0();
tmp$ret$0 = this.qfw_1.get();
return tmp$ret$0;
};
Views.prototype.wk0 = function () {
var tmp = replace$default(this.ifw_1, '\\', '', false, 4, null);
var tmp_0 = replace$default(tmp, '/', '', false, 4, null);
return replace$default(tmp_0, '..', '', false, 4, null);
};
Views.prototype.qgw = function () {
var tmp = this.tfw_1;
if (!(tmp == null))
return tmp;
else {
throwUninitializedPropertyAccessException('debugBmpFont');
}
};
Views.prototype.k5g = function ($cont) {
var tmp = new $initCOROUTINE$20(this, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
Views.prototype.fk2 = function () {
return this.xfw_1;
};
Views.prototype.gg7 = function () {
return this.cfx_1;
};
Views.prototype.ig7 = function () {
return this.cfw_1.cb9().d72();
};
Views.prototype.jg7 = function () {
return this.cfw_1.cb9().e72();
};
Views.prototype.hjy = function (value) {
this.efx_1 = numberToInt(value);
};
Views.prototype.gjy = function () {
return this.efx_1;
};
Views.prototype.jjy = function (value) {
this.ffx_1 = numberToInt(value);
};
Views.prototype.ijy = function () {
return this.ffx_1;
};
Views.prototype.x2c = function () {
launchImmediately(this, Views$close$slambda_0(this, null));
};
Views.prototype.gk1 = function ($cont) {
var tmp = new $closeSuspendCOROUTINE$21(this, $cont);
tmp.q7_1 = Unit_getInstance();
tmp.r7_1 = null;
return tmp.v7();
};
Views.prototype.qgs = function () {
return this.lfx_1.djy();
};
Views.prototype.hgw = function () {
return this.lfx_1.ejy();
};
Views.prototype.igw = function () {
return this.lfx_1.fjy();
};
Views.prototype.yg2 = function (_set____db54di) {
var tmp0_setValue = debugFontExtraScale$factory();
return this.pfx_1.set(_set____db54di);
};
Views.prototype.gk2 = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = debugFontExtraScale$factory_0();
tmp$ret$0 = this.pfx_1.get();
return tmp$ret$0;
};
Views.prototype.zg2 = function (_set____db54di) {
var tmp0_setValue = debugFontColor$factory();
return this.qfx_1.set(new RGBA(_set____db54di));
};
Views.prototype.hk2 = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = debugFontColor$factory_0();
tmp$ret$0 = this.qfx_1.get().n8k_1;
return tmp$ret$0;
};
Views.prototype.ik2 = function () {
return this.rfx_1;
};
Views.prototype.mjf = function (block) {
this.rfx_1.c(block);
};
Views.prototype.oc3 = function (clazz, event) {
var e = event;
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var tmp0_alloc = this.ufx_1;
var temp = tmp0_alloc.t4t();
try {
var tmp;
try {
this.lfx_1.oc3(clazz, event);
var tmp0_subject = e;
var tmp_0;
if (tmp0_subject instanceof GestureEvent) {
var tmp_1 = Companion_getInstance_33();
this.lfx_1.jg8(tmp_1, temp, null, Views$dispatch$lambda(this, e), 4, null);
tmp_0 = Unit_getInstance();
} else {
if (tmp0_subject instanceof MouseEvent) {
var tmp_2 = Companion_getInstance_35();
this.lfx_1.jg8(tmp_2, temp, null, Views$dispatch$lambda_0(this, e), 4, null);
tmp_0 = Unit_getInstance();
} else {
if (tmp0_subject instanceof TouchEvent) {
var tmp_3 = Companion_getInstance_37();
this.lfx_1.jg8(tmp_3, temp, null, Views$dispatch$lambda_1(this, e), 4, null);
tmp_0 = Unit_getInstance();
} else {
if (tmp0_subject instanceof ReshapeEvent) {
var tmp_4 = Companion_getInstance_38();
this.lfx_1.jg8(tmp_4, temp, null, Views$dispatch$lambda_2(this, e), 4, null);
tmp_0 = Unit_getInstance();
} else {
if (tmp0_subject instanceof KeyEvent) {
this.efw_1.cgm(e);
this.efw_1.bg0_1.vgl(e);
if ((e.ec6_1.equals(Type_UP_getInstance_0()) ? this.nfx_1 : false) ? e.gc6_1.equals(Key_F12_getInstance()) ? true : e.gc6_1.equals(Key_F7_getInstance()) : false) {
this.ofx_1 = !this.ofx_1;
this.hfw_1.wch(this.ofx_1);
this.nj9(this.lfx_1);
}
var tmp_5 = Companion_getInstance_34();
this.lfx_1.jg8(tmp_5, temp, null, Views$dispatch$lambda_3(this, e), 4, null);
tmp_0 = Unit_getInstance();
} else {
if (tmp0_subject instanceof GamePadConnectionEvent) {
var tmp_6 = Companion_getInstance_32();
this.lfx_1.jg8(tmp_6, temp, null, Views$dispatch$lambda_4(this, e), 4, null);
tmp_0 = Unit_getInstance();
} else {
if (tmp0_subject instanceof GamePadUpdateEvent) {
var tmp_7 = Companion_getInstance_32();
this.lfx_1.jg8(tmp_7, temp, null, Views$dispatch$lambda_5(this, e), 4, null);
tmp_0 = Unit_getInstance();
} else {
var tmp_8 = Companion_getInstance_39();
this.lfx_1.jg8(tmp_8, temp, null, Views$dispatch$lambda_6(e), 4, null);
tmp_0 = Unit_getInstance();
}
}
}
}
}
}
}
tmp = tmp_0;
} catch ($p) {
var tmp_9;
if ($p instanceof PreventDefaultException) {
tmp_9 = Unit_getInstance();
} else {
throw $p;
}
tmp = tmp_9;
}
tmp$ret$0 = tmp;
break $l$block;
}finally {
tmp0_alloc.u4t(temp);
}
}
};
Views.prototype.jk2 = function () {
this.cfw_1.gba();
if (this.yfw_1) {
var tmp0_$this = this.cfw_1;
var tmp1_color = this.zfw_1;
tmp0_$this.kba(tmp1_color, 1.0, 0, true, true, true, null, 64, null);
}
this.yfx_1.k54(this.xfw_1);
this.xfw_1.mj();
this.lfx_1.oi1(this.xfw_1);
this.xfw_1.mj();
this.lfx_1.uhz(this.xfw_1);
if (this.ofx_1) {
var tmp$ret$2;
// Inline function 'kotlin.run' call
// Inline function 'kotlin.contracts.contract' call
var tmp0_fastForEach = this.rfx_1;
var array = tmp0_fastForEach.b4r_1;
var n = 0;
while (n < array.length) {
// Inline function 'com.soywiz.korge.view.Views.render.<anonymous>.<anonymous>' call
var tmp$ret$1;
// Inline function 'kotlin.js.unsafeCast' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp0_unsafeCast = array[tmp0];
var tmp$ret$0;
// Inline function 'kotlin.js.asDynamic' call
tmp$ret$0 = tmp0_unsafeCast;
tmp$ret$1 = tmp$ret$0;
var tmp1__anonymous__uwfjfc = tmp$ret$1;
tmp1__anonymous__uwfjfc(this, this.xfw_1);
}
tmp$ret$2 = Unit_getInstance();
}
this.zfx_1.k54(this.xfw_1);
this.xfw_1.mj();
};
Views.prototype.rg0 = function (fixedSizeStep, forceRender, doUpdate, doRender) {
var currentTime = this.ffw_1.d1h();
this.ofw_1.gfw_1.gba();
var tmp$ret$1;
// Inline function 'com.soywiz.klogger.Logger.trace' call
var tmp0_trace = Korge_getInstance().wg2_1;
var tmp0_log = Level_TRACE_getInstance();
var tmp;
if (tmp0_trace.s51(tmp0_log)) {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.view.Views.frameUpdateAndRender.<anonymous>' call
tmp$ret$0 = 'ag.onRender';
tmp0_trace.u51(tmp0_log, tmp$ret$0);
tmp = Unit_getInstance();
}
tmp$ret$1 = tmp;
var delta = DateTime__minus_impl_10njw8(currentTime, this.sfx_1);
var adelta = TimeSpan__compareTo_impl_zidry4(delta, this.ofw_1.bfx_1) > 0 ? this.ofw_1.bfx_1 : delta;
this.sfx_1 = currentTime;
if (doUpdate) {
if (!equals(fixedSizeStep, Companion_getInstance_1().m1h_1)) {
this.xgc(fixedSizeStep);
} else {
this.xgc(adelta);
}
}
var doRender2 = doRender ? forceRender ? true : this.kk2() > 0 : false;
if (doRender2) {
if (this.bfy_1) {
println('Views.frameUpdateAndRender[' + toString(Companion_getInstance_0().f1h()) + ']: doRender=' + doRender2 + ' -> [forceRender=' + forceRender + ', updatedSinceFrame=' + this.kk2() + ']');
}
this.jk2();
this.gba();
}
};
Views.prototype.xgc = function (elapsed) {
this.efw_1.wgl(elapsed);
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var tmp0_alloc = this.ufx_1;
var temp = tmp0_alloc.t4t();
try {
this.cfy_1.d2p();
updateSingleViewWithViewsAll(this.lfx_1, this, elapsed, temp, this.cfy_1);
tmp$ret$0 = Unit_getInstance();
break $l$block;
}finally {
tmp0_alloc.u4t(temp);
}
}
this.efw_1.xgl(elapsed);
};
Views.prototype.ng0 = function () {
};
Views.prototype.gg4 = function (width, height) {
var actualWidth = width;
var actualHeight = height;
setTo_0(this.wfx_1, actualWidth, actualHeight);
this.lk2();
};
Views.prototype.lk2 = function () {
setBoundsInfo(this.lfw_1, this.efx_1, this.ffx_1, this.wfx_1, this.hfx_1, this.ifx_1, this.vfx_1, this.xfx_1);
this.xfw_1.og9_1.f76(this.lfw_1.rha());
this.xfw_1.pg9_1.f76(this.lfw_1.ngw());
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = this.kfx_1;
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.Views.resized.<anonymous>' call
tmp0_apply.ac6_1 = _SizeInt___get_width__impl__swntg6(this.wfx_1);
tmp0_apply.bc6_1 = _SizeInt___get_height__impl__d3sy61(this.wfx_1);
tmp$ret$0 = tmp0_apply;
var tmp$ret$1;
// Inline function 'com.soywiz.korev.dispatch' call
var tmp1_dispatch = this.lfx_1;
var tmp2_dispatch = this.kfx_1;
tmp1_dispatch.oc3(getKClass(ReshapeEvent), tmp2_dispatch);
tmp$ret$1 = Unit_getInstance();
var tmp$ret$2;
// Inline function 'com.soywiz.korev.dispatch' call
var tmp3_dispatch = this.kfx_1;
this.oc3(getKClass(ReshapeEvent), tmp3_dispatch);
tmp$ret$2 = Unit_getInstance();
this.lfx_1.baz();
};
Views.prototype.hhr = function (viewToHightlight) {
println('debugHightlightView: ' + viewToHightlight);
this.dfy_1.k54(viewToHightlight);
};
Views.prototype.mk2 = function (action, view) {
this.efy_1.k54(new SaveEvent(action, view));
};
Views.prototype.egj = function (prop) {
this.mk2('Adjusted ' + prop.pgh_1, null);
this.ffy_1.k54(Unit_getInstance());
};
Views.prototype.nk2 = function (_set____db54di) {
var tmp0_setValue = updatedSinceFrame$factory_0();
return this.gfy_1.set(_set____db54di);
};
Views.prototype.kk2 = function () {
var tmp$ret$0;
// Inline function 'kotlin.getValue' call
var tmp0_getValue = updatedSinceFrame$factory_1();
tmp$ret$0 = this.gfy_1.get();
return tmp$ret$0;
};
Views.prototype.gba = function () {
this.hfw_1.gba();
};
Views.prototype.nj9 = function (view) {
this.hfw_1.tci();
};
Views.$metadata$ = classMeta('Views', [Extra, EventDispatcher, CoroutineScope, ViewsContainer, BoundsProvider, DialogInterfaceProvider, Closeable, ResourcesContainer]);
function Base() {
var tmp = this;
tmp.ok2_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
var tmp_0 = this;
tmp_0.pk2_1 = Transform_init_$Create$(0.0, 0.0, 0.0, 0.0, null, null, null, 127, null);
var tmp_1 = this;
tmp_1.qk2_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
var tmp_2 = this;
tmp_2.rk2_1 = Transform_init_$Create$(0.0, 0.0, 0.0, 0.0, null, null, null, 127, null);
var tmp_3 = this;
var tmp_4 = Companion_getInstance_15();
DefaultViewport_getInstance();
DefaultViewport_getInstance();
tmp_3.sk2_1 = tmp_4.k7c(0, 0, 1280, 720);
}
Base.prototype.ngw = function () {
return this.ok2_1;
};
Base.prototype.vha = function () {
return this.pk2_1;
};
Base.prototype.rha = function () {
return this.qk2_1;
};
Base.prototype.tha = function () {
return this.rk2_1;
};
Base.prototype.pha = function () {
return this.sk2_1;
};
Base.$metadata$ = classMeta('Base', [BoundsProvider]);
function BoundsProvider() {
}
BoundsProvider.$metadata$ = interfaceMeta('BoundsProvider');
function ViewsContainer() {
}
ViewsContainer.$metadata$ = interfaceMeta('ViewsContainer');
function updateSingleViewWithViewsAll(_this__u8e3s4, views, delta, tempComps, results) {
init_properties_Views_kt_c94q0q();
var tmp = Companion_getInstance_31();
_this__u8e3s4.hg8(tmp, tempComps, results, updateSingleViewWithViewsAll$lambda(views, delta));
var tmp_0 = Companion_getInstance_36();
_this__u8e3s4.hg8(tmp_0, tempComps, results, updateSingleViewWithViewsAll$lambda_0(delta));
}
function setBoundsInfo(_this__u8e3s4, virtualWidth, virtualHeight, actualSize, scaleMode, anchor, virtualSize, targetSize) {
init_properties_Views_kt_c94q0q();
setTo_0(virtualSize, virtualWidth, virtualHeight);
scaleMode.t7d(new SizeInt(virtualSize), new SizeInt(actualSize), targetSize);
var ratioX = _SizeInt___get_width__impl__swntg6(targetSize) / virtualWidth;
var ratioY = _SizeInt___get_height__impl__d3sy61(targetSize) / virtualHeight;
var actualVirtualWidth = toIntRound(_SizeInt___get_width__impl__swntg6(actualSize) / ratioX);
var actualVirtualHeight = toIntRound(_SizeInt___get_height__impl__d3sy61(actualSize) / ratioY);
_this__u8e3s4.rha().o74();
_this__u8e3s4.rha().k76(ratioX, ratioY);
_this__u8e3s4.rha().o76(toIntRound((actualVirtualWidth - virtualWidth | 0) * anchor.a70_1), toIntRound((actualVirtualHeight - virtualHeight | 0) * anchor.b70_1));
_this__u8e3s4.ngw().v76(_this__u8e3s4.rha());
_this__u8e3s4.rha().o77(_this__u8e3s4.tha());
_this__u8e3s4.ngw().o77(_this__u8e3s4.vha());
var tl = _this__u8e3s4.wha(0.0, 0.0, null, 4, null);
var tmp = _SizeInt___get_width__impl__swntg6(actualSize);
var tmp_0 = _SizeInt___get_height__impl__d3sy61(actualSize);
var br = _this__u8e3s4.wha(tmp, tmp_0, null, 4, null);
_this__u8e3s4.pha().s7c(tl.y72_1, tl.z72_1, br.y72_1, br.z72_1);
}
function getAllDescendantViews(view, out, reversed) {
init_properties_Views_kt_c94q0q();
out.x7();
var pos = getAllDescendantViewsBase(view, out, reversed, 0);
while (out.i() > pos) {
out.z4(out.i() - 1 | 0);
}
return out;
}
function getAllDescendantViews$default(view, out, reversed, $mask0, $handler) {
if (!(($mask0 & 2) === 0))
out = FastArrayList_init_$Create$();
if (!(($mask0 & 4) === 0))
reversed = true;
return getAllDescendantViews(view, out, reversed);
}
function getAllDescendantViewsBase(view, out, reversed, cursor) {
init_properties_Views_kt_c94q0q();
var pos = cursor;
if (reversed) {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.view.View.forEachChildReversed' call
var tmp0_safe_receiver = view.lhz();
var tmp;
if (tmp0_safe_receiver == null) {
tmp = null;
} else {
// Inline function 'com.soywiz.kds.iterators.fastForEachReverse' call
var n = 0;
while (n < tmp0_safe_receiver.i()) {
// Inline function 'com.soywiz.korge.view.getAllDescendantViewsBase.<anonymous>' call
var tmp0__anonymous__q1qw7t = tmp0_safe_receiver.m((tmp0_safe_receiver.i() - n | 0) - 1 | 0);
pos = getAllDescendantViewsBase(tmp0__anonymous__q1qw7t, out, reversed, pos);
var tmp0 = n;
n = tmp0 + 1 | 0;
}
tmp = Unit_getInstance();
}
tmp$ret$0 = tmp;
var tmp0_0 = pos;
pos = tmp0_0 + 1 | 0;
replaceOrAdd(out, tmp0_0, view);
} else {
var tmp1 = pos;
pos = tmp1 + 1 | 0;
replaceOrAdd(out, tmp1, view);
var tmp$ret$1;
// Inline function 'com.soywiz.korge.view.View.forEachChild' call
var tmp0_safe_receiver_0 = view.lhz();
var tmp_0;
if (tmp0_safe_receiver_0 == null) {
tmp_0 = null;
} else {
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var n_0 = 0;
while (n_0 < tmp0_safe_receiver_0.i()) {
// Inline function 'com.soywiz.korge.view.getAllDescendantViewsBase.<anonymous>' call
var tmp0_1 = n_0;
n_0 = tmp0_1 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_safe_receiver_0.m(tmp0_1);
pos = getAllDescendantViewsBase(tmp1__anonymous__uwfjfc, out, reversed, pos);
}
tmp_0 = Unit_getInstance();
}
tmp$ret$1 = tmp_0;
}
return pos;
}
function replaceOrAdd(_this__u8e3s4, pos, value) {
init_properties_Views_kt_c94q0q();
if (pos >= _this__u8e3s4.i()) {
_this__u8e3s4.c(value);
} else {
_this__u8e3s4.a5(pos, value);
}
}
function views$delegate$lambda($this$$receiver) {
init_properties_Views_kt_c94q0q();
return null;
}
function updateSingleViewWithViewsAll$lambda($views, $delta) {
return function (comp) {
var tmp = comp.n2u();
comp.cg8($views, TimeSpan__times_impl_86ofia_0($delta, (tmp instanceof View ? tmp : THROW_CCE()).ii0()));
return Unit_getInstance();
};
}
function updateSingleViewWithViewsAll$lambda_0($delta) {
return function (comp) {
var tmp = comp.n2u();
comp.xgc(TimeSpan__times_impl_86ofia_0($delta, (tmp instanceof View ? tmp : THROW_CCE()).ii0()));
return Unit_getInstance();
};
}
function views$factory() {
return getPropertyCallableRef('views', 1, KMutableProperty1, function (receiver) {
return get_views(receiver);
}, function (receiver, value) {
return set_views(receiver, value);
});
}
function views$factory_0() {
return getPropertyCallableRef('views', 1, KMutableProperty1, function (receiver) {
return get_views(receiver);
}, function (receiver, value) {
return set_views(receiver, value);
});
}
function continuousRenderMode$factory($b0) {
return getPropertyCallableRef('continuousRenderMode', 0, KMutableProperty0, function () {
return $b0.nci();
}, function (value) {
return $b0.mci(value);
});
}
function debugExtraFontScale$factory($b0) {
return getPropertyCallableRef('debugExtraFontScale', 0, KMutableProperty0, function () {
return $b0.dga_1;
}, function (value) {
$b0.dga_1 = value;
return Unit_getInstance();
});
}
function debugExtraFontColor$factory($b0) {
return getPropertyCallableRef('debugExtraFontColor', 0, KMutableProperty0, function () {
return new RGBA($b0.ega_1);
}, function (value) {
$b0.ega_1 = value.n8k_1;
return Unit_getInstance();
});
}
function updatedSinceFrame$factory($b0) {
return getPropertyCallableRef('updatedSinceFrame', 0, KMutableProperty0, function () {
return $b0.acf_1;
}, function (value) {
$b0.acf_1 = value;
return Unit_getInstance();
});
}
function forceRenderEveryFrame$factory() {
return getPropertyCallableRef('forceRenderEveryFrame', 1, KMutableProperty1, function (receiver) {
return receiver.qg0();
}, function (receiver, value) {
return receiver.hg7(value);
});
}
function forceRenderEveryFrame$factory_0() {
return getPropertyCallableRef('forceRenderEveryFrame', 1, KMutableProperty1, function (receiver) {
return receiver.qg0();
}, function (receiver, value) {
return receiver.hg7(value);
});
}
function debugFontExtraScale$factory() {
return getPropertyCallableRef('debugFontExtraScale', 1, KMutableProperty1, function (receiver) {
return receiver.gk2();
}, function (receiver, value) {
return receiver.yg2(value);
});
}
function debugFontExtraScale$factory_0() {
return getPropertyCallableRef('debugFontExtraScale', 1, KMutableProperty1, function (receiver) {
return receiver.gk2();
}, function (receiver, value) {
return receiver.yg2(value);
});
}
function debugFontColor$factory() {
return getPropertyCallableRef('debugFontColor', 1, KMutableProperty1, function (receiver) {
return new RGBA(receiver.hk2());
}, function (receiver, value) {
return receiver.zg2(value.n8k_1);
});
}
function debugFontColor$factory_0() {
return getPropertyCallableRef('debugFontColor', 1, KMutableProperty1, function (receiver) {
return new RGBA(receiver.hk2());
}, function (receiver, value) {
return receiver.zg2(value.n8k_1);
});
}
function updatedSinceFrame$factory_0() {
return getPropertyCallableRef('updatedSinceFrame', 1, KMutableProperty1, function (receiver) {
return receiver.kk2();
}, function (receiver, value) {
return receiver.nk2(value);
});
}
function updatedSinceFrame$factory_1() {
return getPropertyCallableRef('updatedSinceFrame', 1, KMutableProperty1, function (receiver) {
return receiver.kk2();
}, function (receiver, value) {
return receiver.nk2(value);
});
}
var properties_initialized_Views_kt_tg94da;
function init_properties_Views_kt_c94q0q() {
if (properties_initialized_Views_kt_tg94da) {
} else {
properties_initialized_Views_kt_tg94da = true;
views$delegate = PropertyThis_init_$Create$(null, views$delegate$lambda, 1, null);
}
}
function Companion_25() {
Companion_instance_25 = this;
var tmp = this;
var tmp_0 = VarType_Float4_getInstance();
tmp.tk2_1 = Uniform_init_$Create$('u_Col', tmp_0, null, 4, null);
var tmp_1 = this;
var tmp_2 = VarType_Mat4_getInstance();
tmp_1.uk2_1 = Uniform_init_$Create$('u_Matrix', tmp_2, null, 4, null);
var tmp_3 = this;
var tmp_4 = DefaultShaders_getInstance().cat_1;
var tmp$ret$1;
// Inline function 'com.soywiz.korag.VertexShaderDefault' call
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp0_also = new ProgramBuilderDefault();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.debug.Companion.PROGRAM.<anonymous>' call
tmp0_also.fb5(tmp0_also.l6t(), tmp0_also.ubf(tmp0_also.ubf(tmp0_also.ubf(tmp0_also.xbf(), tmp0_also.ybf()), Companion_getInstance_57().uk2_1), tmp0_also.hb5([tmp0_also.zbf(), tmp0_also.gb5(0.0), tmp0_also.gb5(1.0)])));
tmp$ret$0 = tmp0_also;
tmp$ret$1 = VertexShader(tmp$ret$0.ib5());
var tmp_5 = tmp$ret$1;
var tmp$ret$2;
// Inline function 'com.soywiz.korag.shader.FragmentShader' call
var builder = Builder_init_$Create$(ShaderType_FRAGMENT_getInstance());
// Inline function 'com.soywiz.korge.view.debug.Companion.PROGRAM.<anonymous>' call
builder.fb5(builder.l6t(), Companion_getInstance_57().tk2_1);
tmp$ret$2 = FragmentShader(builder.ib5());
var tmp_6 = tmp$ret$2;
tmp_3.vk2_1 = tmp_4.gc2(tmp_5, tmp_6, null, 4, null);
}
Companion_25.prototype.wk2 = function () {
return this.tk2_1;
};
Companion_25.prototype.xk2 = function () {
return this.uk2_1;
};
Companion_25.prototype.yk2 = function () {
return this.vk2_1;
};
Companion_25.$metadata$ = objectMeta('Companion');
var Companion_instance_25;
function Companion_getInstance_57() {
if (Companion_instance_25 == null)
new Companion_25();
return Companion_instance_25;
}
function Batch(offset, count) {
this.zk2_1 = offset;
this.ak3_1 = count;
}
Batch.prototype.u9k = function () {
return this.zk2_1;
};
Batch.prototype.q9k = function () {
return this.ak3_1;
};
Batch.$metadata$ = classMeta('Batch');
function updatedPoints($this) {
var tmp = $this;
var tmp$ret$1;
// Inline function 'kotlin.collections.sumOf' call
var tmp0_sumOf = $this.ck5_1;
var sum = 0;
var tmp0_iterator = tmp0_sumOf.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l();
var tmp_0 = sum;
var tmp$ret$0;
// Inline function 'com.soywiz.korge.view.debug.DebugVertexView.updatedPoints.<anonymous>' call
tmp$ret$0 = element.i();
sum = tmp_0 + tmp$ret$0 | 0;
}
tmp$ret$1 = sum;
tmp.ek5_1 = new Float32Array(imul(tmp$ret$1, 2));
var buffer = $this.ek5_1;
var n = 0;
$this.fk5_1.x7();
$this.gk5_1.d2p();
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var tmp1_fastForEach = $this.ck5_1;
var n_0 = 0;
while (n_0 < tmp1_fastForEach.i()) {
// Inline function 'com.soywiz.korge.view.debug.DebugVertexView.updatedPoints.<anonymous>' call
var tmp0 = n_0;
n_0 = tmp0 + 1 | 0;
var tmp2__anonymous__z9zvc9 = tmp1_fastForEach.m(tmp0);
$this.fk5_1.c(new Batch(n / 2 | 0, tmp2__anonymous__z9zvc9.i()));
if (tmp2__anonymous__z9zvc9.m7b() >= 5) {
// Inline function 'com.soywiz.korma.geom.fastForEachGeneric' call
var inductionVariable = 0;
var last = tmp2__anonymous__z9zvc9.i();
if (inductionVariable < last)
do {
var n_1 = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
// Inline function 'com.soywiz.korge.view.debug.DebugVertexView.updatedPoints.<anonymous>.<anonymous>' call
var x = tmp2__anonymous__z9zvc9.l78(n_1, 0);
var y = tmp2__anonymous__z9zvc9.l78(n_1, 1);
var dx = tmp2__anonymous__z9zvc9.l78(n_1, 2);
var dy = tmp2__anonymous__z9zvc9.l78(n_1, 3);
var scale = tmp2__anonymous__z9zvc9.l78(n_1, 4);
var px = x + dx * scale;
var py = y + dy * scale;
var tmp0_0 = n;
n = tmp0_0 + 1 | 0;
buffer[tmp0_0] = px;
var tmp1 = n;
n = tmp1 + 1 | 0;
buffer[tmp1] = py;
$this.gk5_1.n71(px, py);
}
while (inductionVariable < last);
} else {
// Inline function 'com.soywiz.korma.geom.fastForEachGeneric' call
var inductionVariable_0 = 0;
var last_0 = tmp2__anonymous__z9zvc9.i();
if (inductionVariable_0 < last_0)
do {
var n_2 = inductionVariable_0;
inductionVariable_0 = inductionVariable_0 + 1 | 0;
// Inline function 'com.soywiz.korge.view.debug.DebugVertexView.updatedPoints.<anonymous>.<anonymous>' call
var x_0 = tmp2__anonymous__z9zvc9.l78(n_2, 0);
var y_0 = tmp2__anonymous__z9zvc9.l78(n_2, 1);
var tmp0_1 = n;
n = tmp0_1 + 1 | 0;
buffer[tmp0_1] = x_0;
var tmp1_0 = n;
n = tmp1_0 + 1 | 0;
buffer[tmp1_0] = y_0;
$this.gk5_1.n71(x_0, y_0);
}
while (inductionVariable_0 < last_0);
}
}
}
function DebugVertexView(pointsList, color, type) {
Companion_getInstance_57();
View_init_$Init$(this);
this.x8j(color);
this.bk5_1 = colorMul$factory_0(this);
this.ck5_1 = pointsList;
this.dk5_1 = type;
var tmp = this;
var tmp$ret$0;
// Inline function 'kotlin.floatArrayOf' call
tmp$ret$0 = new Float32Array([0.0, 0.0, 100.0, 0.0, 0.0, 100.0, 100.0, 100.0]);
tmp.ek5_1 = tmp$ret$0;
var tmp_0 = this;
var tmp$ret$1;
// Inline function 'kotlin.collections.arrayListOf' call
tmp$ret$1 = ArrayList_init_$Create$_0();
tmp_0.fk5_1 = tmp$ret$1;
this.gk5_1 = new BoundsBuilder();
this.hk5_1 = new UniformValues();
updatedPoints(this);
}
DebugVertexView.prototype.ik5 = function (value) {
if (!(this.ck5_1 === value)) {
this.ck5_1 = value;
updatedPoints(this);
}
};
DebugVertexView.prototype.h68 = function () {
return this.dk5_1;
};
DebugVertexView.prototype.jk5 = function () {
return this.fk5_1;
};
DebugVertexView.prototype.uhw = function (out) {
this.gk5_1.a72(out);
};
DebugVertexView.prototype.xhw = function (ctx) {
ctx.mj();
ctx.zh8();
this.hk5_1.qb6(ctx.uh7());
this.hk5_1.yat(Companion_getInstance_57().tk2_1, new RGBA(this.ei1()));
var tmp = Companion_getInstance_57().uk2_1;
var tmp_0 = this.pgw();
this.hk5_1.yat(tmp, toMatrix3D$default(tmp_0, null, 1, null));
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var tmp0_alloc = ctx.hga_1;
var temp = tmp0_alloc.t4t();
try {
var tmp_1 = this.ek5_1;
temp.taz(tmp_1, 0, 0, 6, null);
var vData = fastArrayListOf([new VertexData(temp, DefaultShaders_getInstance().aat_1)]);
var tmp0_fastForEach = this.fk5_1;
var n = 0;
while (n < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korge.view.debug.DebugVertexView.renderInternal.<anonymous>.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.m(tmp0);
var tmp0_$this = ctx.ig9_1;
var tmp1_type = this.dk5_1;
var tmp2_program = Companion_getInstance_57().vk2_1;
var tmp3_uniforms = this.hk5_1;
var tmp4_vertexCount = tmp1__anonymous__uwfjfc.ak3_1;
var tmp5_offset = tmp1__anonymous__uwfjfc.zk2_1;
var tmp6_blending = this.di1().ch9_1;
tmp0_$this.qb9(vData, tmp2_program, tmp1_type, tmp4_vertexCount, null, null, tmp5_offset, tmp6_blending, tmp3_uniforms, null, null, null, null, 0, 15920, null);
}
tmp$ret$0 = Unit_getInstance();
break $l$block;
}finally {
tmp0_alloc.u4t(temp);
}
}
};
DebugVertexView.$metadata$ = classMeta('DebugVertexView', undefined, undefined, undefined, undefined, View.prototype);
function debugVertexView(_this__u8e3s4, pointsList, color, type, callback) {
var tmp$ret$2;
// Inline function 'com.soywiz.korge.view.addTo' call
var tmp0_addTo = new DebugVertexView(pointsList, color, type);
var tmp$ret$1;
// Inline function 'kotlin.apply' call
var tmp0_apply = addTo(tmp0_addTo, _this__u8e3s4);
// Inline function 'kotlin.contracts.contract' call
callback(tmp0_apply);
tmp$ret$1 = tmp0_apply;
tmp$ret$2 = tmp$ret$1;
return tmp$ret$2;
}
function colorMul$factory_0($b0) {
return getPropertyCallableRef('colorMul', 0, KMutableProperty0, function () {
return new RGBA($b0.y8j());
}, function (value) {
return $b0.x8j(value.n8k_1);
});
}
var renderToTextureResultPool$delegate;
function Companion_26() {
Companion_instance_26 = this;
var tmp = this;
var tmp_0 = VarType_Float2_getInstance();
tmp.kk5_1 = Uniform_init_$Create$('effectTextureSize', tmp_0, null, 4, null);
this.lk5_1 = Companion_getInstance_46().sh7(AddType_NO_ADD_getInstance()).xb5_1;
var tmp_1 = this;
var tmp$ret$0;
// Inline function 'kotlin.doubleArrayOf' call
tmp$ret$0 = new Float64Array([0.03125, 0.0625, 0.125, 0.25, 0.5, 0.75, 1.0]);
tmp_1.mk5_1 = tmp$ret$0;
}
Companion_26.prototype.nk5 = function (scale) {
var tmp$ret$1;
$l$block_0: {
// Inline function 'kotlin.collections.minByOrNull' call
var tmp0_minByOrNull = this.mk5_1;
var tmp$ret$0;
// Inline function 'kotlin.collections.isEmpty' call
tmp$ret$0 = tmp0_minByOrNull.length === 0;
if (tmp$ret$0) {
tmp$ret$1 = null;
break $l$block_0;
}
var minElem = tmp0_minByOrNull[0];
var lastIndex = get_lastIndex_1(tmp0_minByOrNull);
if (lastIndex === 0) {
tmp$ret$1 = minElem;
break $l$block_0;
}
var tmp$ret$3;
// Inline function 'com.soywiz.korge.view.filter.Companion.discretizeFilterScale.<anonymous>' call
var tmp1__anonymous__uwfjfc = minElem;
var tmp$ret$2;
// Inline function 'kotlin.math.absoluteValue' call
var tmp0__get_absoluteValue__nukmtt = scale - tmp1__anonymous__uwfjfc;
tmp$ret$2 = Math.abs(tmp0__get_absoluteValue__nukmtt);
tmp$ret$3 = tmp$ret$2;
var minValue = tmp$ret$3;
var inductionVariable = 1;
if (inductionVariable <= lastIndex)
do {
var i = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var e = tmp0_minByOrNull[i];
var tmp$ret$5;
// Inline function 'com.soywiz.korge.view.filter.Companion.discretizeFilterScale.<anonymous>' call
var tmp$ret$4;
// Inline function 'kotlin.math.absoluteValue' call
var tmp0__get_absoluteValue__nukmtt_0 = scale - e;
tmp$ret$4 = Math.abs(tmp0__get_absoluteValue__nukmtt_0);
tmp$ret$5 = tmp$ret$4;
var v = tmp$ret$5;
if (compareTo(minValue, v) > 0) {
minElem = e;
minValue = v;
}
}
while (!(i === lastIndex));
tmp$ret$1 = minElem;
}
return ensureNotNull(tmp$ret$1);
};
Companion_26.$metadata$ = objectMeta('Companion');
var Companion_instance_26;
function Companion_getInstance_58() {
if (Companion_instance_26 == null)
new Companion_26();
return Companion_instance_26;
}
function Filter() {
}
Filter.$metadata$ = interfaceMeta('Filter', [KorgeDebugNode]);
function expandBorderRectangle(_this__u8e3s4, out) {
init_properties_Filter_kt_dji23i();
var tmp$ret$2;
// Inline function 'com.soywiz.kds.Pool.invoke' call
var tmp0_invoke = Companion_getInstance_28().x73_1;
var tmp$ret$1;
$l$block: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var temp = tmp0_invoke.t4t();
try {
var tmp$ret$0;
// Inline function 'com.soywiz.korge.view.filter.expandBorderRectangle.<anonymous>' call
tmp$ret$0 = expand(out, getBorder(_this__u8e3s4, toIntCeil(out.x71_1), toIntCeil(out.y71_1), temp));
tmp$ret$1 = tmp$ret$0;
break $l$block;
}finally {
tmp0_invoke.u4t(temp);
}
}
tmp$ret$2 = tmp$ret$1;
}
function RenderToTextureResult() {
this.uk5_1 = null;
this.vk5_1 = 0;
this.wk5_1 = 0;
this.xk5_1 = 0;
this.yk5_1 = 0;
this.zk5_1 = 1.0;
var tmp = this;
tmp.ak6_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
this.bk6_1 = null;
this.ck6_1 = null;
this.dk6_1 = null;
this.ek6_1 = null;
var tmp_0 = this;
tmp_0.fk6_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
}
RenderToTextureResult.prototype.za8 = function () {
return this.ek6_1;
};
RenderToTextureResult.prototype.s1x = function () {
if (this.ck6_1 == null ? true : this.ek6_1 == null)
return Unit_getInstance();
var tmp0_safe_receiver = this.ck6_1;
if (tmp0_safe_receiver == null)
null;
else {
var tmp$ret$1;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korge.view.filter.RenderToTextureResult.dispose.<anonymous>' call
var tmp0_safe_receiver_0 = this.ek6_1;
var tmp1_safe_receiver = tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.ig9_1;
var tmp;
if (tmp1_safe_receiver == null) {
tmp = null;
} else {
tmp1_safe_receiver.wba(tmp0_safe_receiver);
tmp = Unit_getInstance();
}
tmp$ret$0 = tmp;
tmp$ret$1 = tmp$ret$0;
}
this.uk5_1 = null;
this.bk6_1 = null;
this.ck6_1 = null;
this.ek6_1 = null;
this.dk6_1 = null;
};
RenderToTextureResult.$metadata$ = classMeta('RenderToTextureResult', [Disposable]);
function getBorder(_this__u8e3s4, texWidth, texHeight, out) {
init_properties_Filter_kt_dji23i();
_this__u8e3s4.rk5(out, texWidth, texHeight);
return out;
}
function renderToTextureResultPool$delegate$lambda() {
init_properties_Filter_kt_dji23i();
var tmp = renderToTextureResultPool$delegate$lambda$lambda;
return Pool_init_$Create$_0(tmp, 0, renderToTextureResultPool$delegate$lambda$lambda_0, 2, null);
}
function renderToTextureResultPool$delegate$lambda$lambda(it) {
init_properties_Filter_kt_dji23i();
it.s1x();
return Unit_getInstance();
}
function renderToTextureResultPool$delegate$lambda$lambda_0(it) {
init_properties_Filter_kt_dji23i();
return new RenderToTextureResult();
}
var properties_initialized_Filter_kt_lkm0w6;
function init_properties_Filter_kt_dji23i() {
if (properties_initialized_Filter_kt_lkm0w6) {
} else {
properties_initialized_Filter_kt_lkm0w6 = true;
renderToTextureResultPool$delegate = Property_init_$Create$(null, renderToTextureResultPool$delegate$lambda, 1, null);
}
}
function Companion_27() {
Companion_instance_27 = this;
IdentityFilter.call(this, true);
}
Companion_27.$metadata$ = objectMeta('Companion', undefined, undefined, undefined, undefined, IdentityFilter.prototype);
var Companion_instance_27;
function Companion_getInstance_59() {
if (Companion_instance_27 == null)
new Companion_27();
return Companion_instance_27;
}
function IdentityFilter(smoothing) {
Companion_getInstance_59();
this.gk6_1 = smoothing;
}
IdentityFilter.prototype.sk5 = function (ctx, matrix, texture, texWidth, texHeight, renderColorAdd, renderColorMul, blendMode, filterScale) {
var tmp$ret$1;
// Inline function 'com.soywiz.korge.render.RenderContext.useBatcher' call
var tmp$ret$0;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.use' call
var tmp0_use = ctx.gga_1;
var tmp0_useBatcher = tmp0_use.vga_1;
if (!(tmp0_useBatcher.tga_1 === tmp0_use)) {
tmp0_useBatcher.mj();
tmp0_useBatcher.tga_1 = tmp0_use;
}
var tmp0_filtering = this.gk6_1;
var tmp1_program = Companion_getInstance_46().sh7(AddType_NO_ADD_getInstance());
var tmp2_premultiplied = texture.b7z();
tmp0_use.ugc(texture, 0.0, 0.0, 0.0, 0.0, matrix, tmp0_filtering, renderColorMul, renderColorAdd, blendMode, tmp1_program, tmp2_premultiplied, false, 30, null);
tmp$ret$0 = Unit_getInstance();
tmp$ret$1 = tmp$ret$0;
};
IdentityFilter.$metadata$ = classMeta('IdentityFilter', [Filter]);
function get_backdropFilter(_this__u8e3s4) {
var tmp$ret$2;
// Inline function 'com.soywiz.korge.view.View.getRenderPhaseOfTypeOrNull' call
var tmp0_safe_receiver = _this__u8e3s4.ygg_1;
var tmp;
if (tmp0_safe_receiver == null) {
tmp = null;
} else {
var tmp$ret$1;
$l$block: {
// Inline function 'kotlin.collections.firstOrNull' call
var tmp0_iterator = tmp0_safe_receiver.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l();
var tmp$ret$0;
// Inline function 'com.soywiz.korge.view.View.getRenderPhaseOfTypeOrNull.<anonymous>' call
tmp$ret$0 = element instanceof ViewRenderPhaseBackdropFilter;
if (tmp$ret$0) {
tmp$ret$1 = element;
break $l$block;
}
}
tmp$ret$1 = null;
}
tmp = tmp$ret$1;
}
var tmp_0 = tmp;
tmp$ret$2 = (tmp_0 == null ? true : tmp_0 instanceof ViewRenderPhaseBackdropFilter) ? tmp_0 : null;
var tmp0_safe_receiver_0 = tmp$ret$2;
return tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.hk6_1;
}
function ViewRenderPhaseBackdropFilter() {
}
ViewRenderPhaseBackdropFilter.$metadata$ = classMeta('ViewRenderPhaseBackdropFilter', [ViewRenderPhase]);
var filterDebugExtra$delegate;
function set_filterScale(_this__u8e3s4, _set____db54di) {
init_properties_ViewFilter_kt_18tupv();
var tmp0_setValue = filterScale$factory();
var tmp0_setValueUntransformed = filterScale$delegate.m4v_1(_this__u8e3s4, _set____db54di);
var tmp0_elvis_lhs = filterScale$delegate.k4v_1;
setExtra(_this__u8e3s4, tmp0_elvis_lhs == null ? tmp0_setValue.callableName : tmp0_elvis_lhs, tmp0_setValueUntransformed);
return Unit_getInstance();
}
function get_filterScale(_this__u8e3s4) {
init_properties_ViewFilter_kt_18tupv();
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.kds.PropertyThis.getValue' call
var tmp0_getValue = filterScale$factory_0();
var tmp0_elvis_lhs = filterScale$delegate.k4v_1;
var res = getExtraTyped(_this__u8e3s4, tmp0_elvis_lhs == null ? tmp0_getValue.callableName : tmp0_elvis_lhs);
if (res == null) {
var r = filterScale$delegate.l4v_1(_this__u8e3s4);
// Inline function 'com.soywiz.kds.PropertyThis.setValueUntransformed' call
var tmp0_elvis_lhs_0 = filterScale$delegate.k4v_1;
setExtra(_this__u8e3s4, tmp0_elvis_lhs_0 == null ? tmp0_getValue.callableName : tmp0_elvis_lhs_0, r);
tmp$ret$0 = r;
break $l$block;
}
tmp$ret$0 = res;
}
return tmp$ret$0;
}
var filterScale$delegate;
function renderFiltered(_this__u8e3s4, ctx, filter, first) {
init_properties_ViewFilter_kt_18tupv();
var bounds = _this__u8e3s4.vi2(false);
if (bounds.x71_1 <= 0.0 ? true : bounds.y71_1 <= 0.0)
return Unit_getInstance();
var tmp$ret$7;
$l$block_2: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var tmp0_alloc = ctx.lga_1;
var temp = tmp0_alloc.t4t();
try {
var tmp = Companion_getInstance_58();
var tmp$ret$0;
// Inline function 'kotlin.math.min' call
var tmp0_min = get_filterScale(_this__u8e3s4);
var tmp1_min = filter.qk5();
tmp$ret$0 = Math.min(tmp0_min, tmp1_min);
var tryFilterScale = tmp.nk5(tmp$ret$0);
var texWidthNoBorder = coerceAtLeast_0(numberToInt(bounds.x71_1 * tryFilterScale), 1);
var texHeightNoBorder = coerceAtLeast_0(numberToInt(bounds.y71_1 * tryFilterScale), 1);
var realFilterScale = clamp_0(texWidthNoBorder / bounds.x71_1, 0.03125, 1.0);
var tmp0_subject = false;
var tmp_0;
switch (tmp0_subject) {
case true:
tmp_0 = clamp(toIntCeil(1.0 / get_filterScale(_this__u8e3s4)), 1, 8);
break;
case false:
tmp_0 = 0;
break;
default:
noWhenBranchMatchedException();
break;
}
var edgeSize = tmp_0;
var texWidth = texWidthNoBorder + imul(edgeSize, 2) | 0;
var texHeight = texHeightNoBorder + imul(edgeSize, 2) | 0;
var addx = -bounds.v71_1 + edgeSize;
var addy = -bounds.w71_1 + edgeSize;
ctx.mj();
var tmp0_tempAllocateFrameBuffer = ctx.ig9_1;
var rb = tmp0_tempAllocateFrameBuffer.vba(texWidth, texHeight, false, true, 1);
var tmp_1;
try {
// Inline function 'com.soywiz.korge.render.RenderContext.renderToFrameBuffer' call
ctx.mj();
// Inline function 'com.soywiz.korag.AG.setRenderBufferTemporally' call
var tmp0_setRenderBufferTemporally = ctx.ig9_1;
tmp0_setRenderBufferTemporally.qba(rb);
try {
// Inline function 'com.soywiz.korge.render.RenderContext.renderToFrameBuffer.<anonymous>' call
var tmp$ret$6;
// Inline function 'com.soywiz.korge.render.RenderContext.useBatcher' call
var tmp$ret$5;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.use' call
var tmp0_use = ctx.gga_1;
var tmp0_useBatcher = tmp0_use.vga_1;
if (!(tmp0_useBatcher.tga_1 === tmp0_use)) {
tmp0_useBatcher.mj();
tmp0_useBatcher.tga_1 = tmp0_use;
}
var oldScissors = tmp0_use.dgc_1;
var tmp$ret$4;
$l$block_1: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var tmp0_alloc_0 = ctx.uga_1;
var temp_0 = tmp0_alloc_0.t4t();
try {
tmp0_use.dgc_1 = temp_0.t7c(0, 0, rb.d72(), rb.e72());
var tmp_2;
try {
{
var tmp_3 = Colors_getInstance().x7z_1;
ctx.ig9_1.kba(tmp_3, 0.0, 0, false, false, false, null, 126, null);
}
// Inline function 'com.soywiz.korge.render.RenderContext.renderToTexture.<anonymous>.<anonymous>' call
// Inline function 'com.soywiz.korge.view.filter.renderFiltered.<anonymous>.<anonymous>' call
temp.f76(_this__u8e3s4.bi1());
temp.m76(addx, addy);
temp.i76(realFilterScale, 0.0, 2, null);
var tmp$ret$3;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.setViewMatrixTemp' call
var tmp0_setViewMatrixTemp = ctx.gga_1;
var tmp1_setViewMatrixTemp = tmp0_setViewMatrixTemp.vga_1;
var tmp$ret$2;
$l$block_0: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var tmp0_alloc_1 = tmp1_setViewMatrixTemp.mga_1;
var temp_1 = tmp0_alloc_1.t4t();
try {
var tmp$ret$1;
$l$block: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var tmp0_alloc_2 = tmp1_setViewMatrixTemp.lga_1;
var temp_2 = tmp0_alloc_2.t4t();
try {
tmp1_setViewMatrixTemp.mj();
temp_1.v79(tmp1_setViewMatrixTemp.rg9_1);
temp_2.f76(tmp1_setViewMatrixTemp.sg9_1);
tmp1_setViewMatrixTemp.sg9_1.f76(temp);
copyFrom(tmp1_setViewMatrixTemp.rg9_1, temp);
var tmp_4;
try {
var tmp_5;
if (first) {
_this__u8e3s4.pi1(ctx);
tmp_5 = Unit_getInstance();
} else {
_this__u8e3s4.qi1(ctx);
tmp_5 = Unit_getInstance();
}
tmp_4 = tmp_5;
}finally {
tmp1_setViewMatrixTemp.mj();
tmp1_setViewMatrixTemp.rg9_1.v79(temp_1);
tmp1_setViewMatrixTemp.sg9_1.f76(temp_2);
}
tmp$ret$1 = tmp_4;
break $l$block;
}finally {
tmp0_alloc_2.u4t(temp_2);
}
}
tmp$ret$2 = tmp$ret$1;
break $l$block_0;
}finally {
tmp0_alloc_1.u4t(temp_1);
}
}
tmp$ret$3 = tmp$ret$2;
ctx.mj();
tmp_2 = Unit_getInstance();
}finally {
tmp0_use.dgc_1 = oldScissors;
}
tmp$ret$4 = tmp_2;
break $l$block_1;
}finally {
tmp0_alloc_0.u4t(temp_0);
}
}
tmp$ret$5 = tmp$ret$4;
tmp$ret$6 = tmp$ret$5;
}finally {
tmp0_setRenderBufferTemporally.rba();
}
// Inline function 'com.soywiz.korge.view.filter.renderFiltered.<anonymous>.<anonymous>' call
var tmp2__anonymous__z9zvc9 = Companion_getInstance_47().mhb(rb).nhb(0, 0, texWidth, texHeight);
temp.f76(_this__u8e3s4.pgw());
temp.o76(-addx, -addy);
var tmp_6 = 1.0 / realFilterScale;
temp.l76(tmp_6, 0.0, 2, null);
filter.sk5(ctx, temp, tmp2__anonymous__z9zvc9, texWidth, texHeight, _this__u8e3s4.fi1(), _this__u8e3s4.ei1(), _this__u8e3s4.sgf_1, realFilterScale);
ctx.mj();
tmp_1 = Unit_getInstance();
}finally {
tmp0_tempAllocateFrameBuffer.wba(rb);
}
tmp$ret$7 = tmp_1;
break $l$block_2;
}finally {
tmp0_alloc.u4t(temp);
}
}
}
function renderFiltered$default(_this__u8e3s4, ctx, filter, first, $mask0, $handler) {
if (!(($mask0 & 4) === 0))
first = true;
return renderFiltered(_this__u8e3s4, ctx, filter, first);
}
function get_filter(_this__u8e3s4) {
init_properties_ViewFilter_kt_18tupv();
var tmp$ret$2;
// Inline function 'com.soywiz.korge.view.View.getRenderPhaseOfTypeOrNull' call
var tmp0_safe_receiver = _this__u8e3s4.ygg_1;
var tmp;
if (tmp0_safe_receiver == null) {
tmp = null;
} else {
var tmp$ret$1;
$l$block: {
// Inline function 'kotlin.collections.firstOrNull' call
var tmp0_iterator = tmp0_safe_receiver.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l();
var tmp$ret$0;
// Inline function 'com.soywiz.korge.view.View.getRenderPhaseOfTypeOrNull.<anonymous>' call
tmp$ret$0 = element instanceof ViewRenderPhaseFilter;
if (tmp$ret$0) {
tmp$ret$1 = element;
break $l$block;
}
}
tmp$ret$1 = null;
}
tmp = tmp$ret$1;
}
var tmp_0 = tmp;
tmp$ret$2 = (tmp_0 == null ? true : tmp_0 instanceof ViewRenderPhaseFilter) ? tmp_0 : null;
var tmp0_safe_receiver_0 = tmp$ret$2;
return tmp0_safe_receiver_0 == null ? null : tmp0_safe_receiver_0.ik6_1;
}
function FilterDebugExtra$lambda$lambda(this$0, $filter, $views) {
return function ($this$uiCollapsibleSection) {
var tmp = filterScale$factory_1(this$0.jk6_1);
uiEditableValue$default($this$uiCollapsibleSection, tmp, 0.0, 1.0, true, false, false, 0, null, 240, null);
$filter.tk5($views, $this$uiCollapsibleSection);
return Unit_getInstance();
};
}
function FilterDebugExtra$lambda(this$0) {
return function ($this$addDebugExtraComponent, views) {
var tmp;
if (this$0.kk6_1) {
var tmp0_safe_receiver = get_filter(this$0.jk6_1);
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.ok5();
var tmp2_iterator = (tmp1_elvis_lhs == null ? emptyList() : tmp1_elvis_lhs).j();
while (tmp2_iterator.k()) {
var filter = tmp2_iterator.l();
var tmp_0 = get_portableSimpleName(getKClassFromExpression(filter));
uiCollapsibleSection($this$addDebugExtraComponent, tmp_0, FilterDebugExtra$lambda$lambda(this$0, filter, views));
}
tmp = Unit_getInstance();
}
return Unit_getInstance();
};
}
function FilterDebugExtra(view) {
this.jk6_1 = view;
this.kk6_1 = true;
addDebugExtraComponent(this.jk6_1, '', FilterDebugExtra$lambda(this));
}
FilterDebugExtra.$metadata$ = classMeta('FilterDebugExtra');
function get_VIEW_FILTER_TRANSPARENT_EDGE() {
return VIEW_FILTER_TRANSPARENT_EDGE;
}
var VIEW_FILTER_TRANSPARENT_EDGE;
function ViewRenderPhaseFilter() {
}
ViewRenderPhaseFilter.$metadata$ = classMeta('ViewRenderPhaseFilter', [ViewRenderPhase]);
function filterDebugExtra$delegate$lambda($this$$receiver) {
init_properties_ViewFilter_kt_18tupv();
return new FilterDebugExtra($this$$receiver);
}
function filterScale$delegate$lambda($this$extraPropertyThis, it) {
init_properties_ViewFilter_kt_18tupv();
return Companion_getInstance_58().nk5(it);
}
function filterScale$delegate$lambda_0($this$extraPropertyThis) {
init_properties_ViewFilter_kt_18tupv();
return 1.0;
}
function filterScale$factory() {
return getPropertyCallableRef('filterScale', 1, KMutableProperty1, function (receiver) {
return get_filterScale(receiver);
}, function (receiver, value) {
return set_filterScale(receiver, value);
});
}
function filterScale$factory_0() {
return getPropertyCallableRef('filterScale', 1, KMutableProperty1, function (receiver) {
return get_filterScale(receiver);
}, function (receiver, value) {
return set_filterScale(receiver, value);
});
}
function filterScale$factory_1($b0) {
return getPropertyCallableRef('filterScale', 0, KMutableProperty0, function () {
return get_filterScale($b0);
}, function (value) {
return set_filterScale($b0, value);
});
}
var properties_initialized_ViewFilter_kt_mku9up;
function init_properties_ViewFilter_kt_18tupv() {
if (properties_initialized_ViewFilter_kt_mku9up) {
} else {
properties_initialized_ViewFilter_kt_mku9up = true;
filterDebugExtra$delegate = PropertyThis_init_$Create$(null, filterDebugExtra$delegate$lambda, 1, null);
var tmp$ret$1;
// Inline function 'com.soywiz.kds.extraPropertyThis' call
var tmp0_extraPropertyThis = filterScale$delegate$lambda;
var tmp1_extraPropertyThis = filterScale$delegate$lambda_0;
var tmp$ret$0;
// Inline function 'com.soywiz.kds.PropertyThis.withTransform' call
var tmp0_withTransform = new PropertyThis(null, tmp1_extraPropertyThis);
tmp0_withTransform.m4v_1 = tmp0_extraPropertyThis;
tmp$ret$0 = tmp0_withTransform;
tmp$ret$1 = tmp$ret$0;
filterScale$delegate = tmp$ret$1;
}
}
function InternalViewAutoscaling() {
this.dj6_1 = 1.0;
this.ej6_1 = 1.0;
this.fj6_1 = 1.0;
this.gj6_1 = 1.0;
this.hj6_1 = 1.0;
var tmp = this;
tmp.ij6_1 = Transform_init_$Create$(0.0, 0.0, 0.0, 0.0, null, null, null, 127, null);
}
InternalViewAutoscaling.prototype.jj6 = function (autoScaling, autoScalingPrecise, globalMatrix) {
if (autoScaling) {
this.ij6_1.k75(globalMatrix, 0.0, 0.0, 6, null);
var tmp$ret$0;
// Inline function 'kotlin.math.abs' call
var tmp0_abs = this.ij6_1.a75_1;
tmp$ret$0 = Math.abs(tmp0_abs);
var sx = tmp$ret$0;
var tmp$ret$1;
// Inline function 'kotlin.math.abs' call
var tmp1_abs = this.ij6_1.b75_1;
tmp$ret$1 = Math.abs(tmp1_abs);
var sy = tmp$ret$1;
var tmp$ret$2;
// Inline function 'kotlin.math.max' call
tmp$ret$2 = Math.max(sx, sy);
var sxy = tmp$ret$2;
var tmp$ret$3;
// Inline function 'kotlin.math.abs' call
var tmp2_abs = sx / this.fj6_1 - 1.0;
tmp$ret$3 = Math.abs(tmp2_abs);
var diffX = tmp$ret$3;
var tmp$ret$4;
// Inline function 'kotlin.math.abs' call
var tmp3_abs = sy / this.gj6_1 - 1.0;
tmp$ret$4 = Math.abs(tmp3_abs);
var diffY = tmp$ret$4;
var tmp0_subject = autoScalingPrecise;
var tmp;
switch (tmp0_subject) {
case true:
tmp = diffX > 0.0 ? true : diffY > 0.0;
break;
case false:
tmp = diffX >= 0.1 ? true : diffY >= 0.1;
break;
default:
noWhenBranchMatchedException();
break;
}
var shouldUpdate = tmp;
if (shouldUpdate) {
this.fj6_1 = sx;
this.gj6_1 = sy;
this.hj6_1 = sxy;
this.dj6_1 = 1.0 / sx;
this.ej6_1 = 1.0 / sy;
return true;
}
} else {
this.fj6_1 = 1.0;
this.gj6_1 = 1.0;
this.hj6_1 = 1.0;
this.dj6_1 = 1.0;
this.ej6_1 = 1.0;
}
return false;
};
InternalViewAutoscaling.$metadata$ = classMeta('InternalViewAutoscaling');
function GpuShapeView_init_$Init$(shape, antialiased, autoScaling, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
shape = EmptyShape_getInstance();
if (!(($mask0 & 2) === 0))
antialiased = true;
if (!(($mask0 & 4) === 0))
autoScaling = true;
GpuShapeView.call($this, shape, antialiased, autoScaling);
return $this;
}
function GpuShapeView_init_$Create$(shape, antialiased, autoScaling, $mask0, $marker) {
return GpuShapeView_init_$Init$(shape, antialiased, autoScaling, $mask0, $marker, Object.create(GpuShapeView.prototype));
}
function _get_shapeBounds__actvvf($this) {
var _bounds = $this.mjk_1 ? $this.fjl_1 : $this.ejl_1;
var valid = $this.mjk_1 ? $this.cjl_1 : $this.bjl_1;
if (!valid) {
if ($this.mjk_1)
$this.cjl_1 = true;
else
$this.bjl_1 = true;
getBounds($this.zjk_1, _bounds, $this.ojk_1, $this.mjk_1);
}
return _bounds;
}
function invalidateShape($this) {
$this.djl_1 = 0;
$this.ajl_1 = false;
$this.bjl_1 = false;
$this.cjl_1 = false;
$this.dg8();
}
function requireShape($this) {
if ($this.ajl_1)
return Unit_getInstance();
$this.ajl_1 = true;
$this.njk_1.x7();
$this.njk_1.xk6(0, 1, null);
$this.njk_1.yk6(null);
$this.gjl_1 = true;
renderShape($this, $this.zjk_1);
$this.njk_1.a2z();
$this.jjl_1 = $this.ijl_1;
}
function renderCommands($this, ctx, doRequireTexture) {
var mat = doRequireTexture ? $this.pgw().c77(ctx.jg9_1.rha()) : $this.pgw();
$this.kjl_1.f76(mat);
$this.kjl_1.o76(-$this.bi0(), -$this.ci0());
requireShape($this);
$this.njk_1.zk6(ctx, $this.kjl_1, $this.ai1(), $this.wjk_1, $this.ei1(), doRequireTexture);
}
function renderShape($this, shape) {
var tmp0_subject = shape;
if (equals(tmp0_subject, EmptyShape_getInstance()))
;
else {
if (tmp0_subject instanceof CompoundShape) {
var tmp1_iterator = shape.qa5_1.j();
while (tmp1_iterator.k()) {
var v = tmp1_iterator.l();
renderShape($this, v);
}
} else {
if (tmp0_subject instanceof TextShape) {
renderShape($this, shape.la6());
} else {
if (tmp0_subject instanceof FillShape) {
var tmp2_this = $this;
var tmp3 = tmp2_this.djl_1;
tmp2_this.djl_1 = tmp3 + 1 | 0;
if ($this.djl_1 > $this.ljl_1)
return Unit_getInstance();
renderFill($this, shape);
} else {
if (tmp0_subject instanceof PolylineShape) {
var tmp4_this = $this;
var tmp5 = tmp4_this.djl_1;
tmp4_this.djl_1 = tmp5 + 1 | 0;
if ($this.djl_1 > $this.ljl_1)
return Unit_getInstance();
renderStroke$default($this, shape.wa5_1, shape.ta5_1, shape.va5_1, shape.ya5_1, shape.xa5_1, null, null, 192, null);
} else {
var tmp0_TODO = 'shape=' + shape;
throw new NotImplementedError('An operation is not implemented: ' + tmp0_TODO);
}
}
}
}
}
}
function SegmentInfo() {
this.ak7_1 = get_degrees(0);
this.bk7_1 = get_degrees(0);
this.ck7_1 = get_degrees(0);
}
SegmentInfo.$metadata$ = classMeta('SegmentInfo');
function renderStroke($this, stateTransform, strokePath, paint, globalAlpha, strokeInfo, forceClosed, stencil) {
var gpuShapeViewCommands = $this.njk_1;
var tmp = toCurvesList(strokePath);
var tmp_0 = StrokePointsMode_SCALABLE_POS_NORMAL_WIDTH_getInstance();
var pointsList = toStrokePointsList$default(tmp, strokeInfo, tmp_0, false, forceClosed, 4, null);
gpuShapeViewCommands.yk6(null);
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var n = 0;
while (n < pointsList.i()) {
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.renderStroke.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp0__anonymous__q1qw7t = pointsList.m(tmp0);
var startIndex = gpuShapeViewCommands.dk7();
var vector = tmp0__anonymous__q1qw7t.s7j();
// Inline function 'com.soywiz.korma.geom.fastForEachGeneric' call
var inductionVariable = 0;
var last = vector.i();
if (inductionVariable < last)
do {
var n_0 = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.renderStroke.<anonymous>.<anonymous>' call
var x = vector.l78(n_0, 0);
var y = vector.l78(n_0, 1);
var dx = vector.l78(n_0, 2);
var dy = vector.l78(n_0, 3);
var len = vector.l78(n_0, 4);
var tmp$ret$0;
// Inline function 'kotlin.math.absoluteValue' call
var tmp0__get_absoluteValue__nukmtt = vector.l78(n_0, 5);
tmp$ret$0 = Math.abs(tmp0__get_absoluteValue__nukmtt);
var maxLen = tmp$ret$0;
var px = x + dx * len;
var py = y + dy * len;
gpuShapeViewCommands.ek7(px, py, $this.yjk_1 ? len : 0.0, $this.yjk_1 ? maxLen : $this.njl_1);
}
while (inductionVariable < last);
var endIndex = gpuShapeViewCommands.fk7();
var info = GpuShapeViewPrograms_getInstance().hk8(stateTransform, paint, globalAlpha, strokeInfo.t7j_1);
var tmp0_drawType = DrawType_TRIANGLE_STRIP_getInstance();
var tmp1_blendMode = Companion_getInstance_53().og8_1;
gpuShapeViewCommands.ik8(tmp0_drawType, info, null, stencil, tmp1_blendMode, null, startIndex, endIndex, 36, null);
}
}
function renderStroke$default($this, stateTransform, strokePath, paint, globalAlpha, strokeInfo, forceClosed, stencil, $mask0, $handler) {
if (!(($mask0 & 64) === 0))
forceClosed = null;
if (!(($mask0 & 128) === 0))
stencil = null;
return renderStroke($this, stateTransform, strokePath, paint, globalAlpha, strokeInfo, forceClosed, stencil);
}
function PointsResult(bounds, vertexCount, vertexStart, vertexEnd) {
this.jk8_1 = bounds;
this.kk8_1 = vertexCount;
this.lk8_1 = vertexStart;
this.mk8_1 = vertexEnd;
}
PointsResult.prototype.o7i = function () {
return this.jk8_1;
};
PointsResult.prototype.nk8 = function () {
return this.lk8_1;
};
PointsResult.prototype.ok8 = function () {
return this.mk8_1;
};
PointsResult.$metadata$ = classMeta('PointsResult');
function getPointsForPath($this, points, type) {
if (points.i() < 3)
return null;
var vertexStart = $this.njk_1.dk7();
var bb = $this.ojk_1;
bb.d2p();
bb.o71(points);
var xMid = (bb.c71_1 + bb.b71_1) / 2;
var yMid = (bb.e71_1 + bb.d71_1) / 2;
var isStrip = type.equals(DrawType_TRIANGLE_STRIP_getInstance());
var antialiased = $this.yjk_1;
var isStripAndAntialiased = antialiased ? isStrip : false;
if (!isStrip) {
$this.njk_1.ek7(xMid, yMid, 0.0, $this.njl_1);
}
var inductionVariable = 0;
var last = points.i() + 1 | 0;
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var x = points.p71(n % points.i() | 0);
var y = points.q71(n % points.i() | 0);
var len = isStripAndAntialiased ? Companion_getInstance_8().i7a(x, y, xMid, yMid) : 0.0;
var maxLen = isStripAndAntialiased ? len : $this.njl_1;
if (isStrip) {
$this.njk_1.ek7(xMid, yMid, 0.0, maxLen);
}
$this.njk_1.ek7(x, y, len, maxLen);
}
while (inductionVariable < last);
var vertexEnd = $this.njk_1.fk7();
return new PointsResult(bb.c72(null, 1, null), points.i() + 2 | 0, vertexStart, vertexEnd);
}
function getPointsForPath_0($this, path, type) {
return getPointsForPath($this, getPoints2$default(path, null, 1, null), type);
}
function getPointsForPathList($this, path, type) {
var tmp$ret$3;
// Inline function 'kotlin.collections.mapNotNull' call
var tmp0_mapNotNull = getPoints2List(path);
var tmp$ret$2;
// Inline function 'kotlin.collections.mapNotNullTo' call
var tmp0_mapNotNullTo = ArrayList_init_$Create$_0();
// Inline function 'kotlin.collections.forEach' call
var tmp0_iterator = tmp0_mapNotNull.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l();
// Inline function 'kotlin.collections.mapNotNullTo.<anonymous>' call
var tmp$ret$0;
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.getPointsForPathList.<anonymous>' call
tmp$ret$0 = getPointsForPath($this, element, type);
var tmp0_safe_receiver = tmp$ret$0;
if (tmp0_safe_receiver == null)
null;
else {
var tmp$ret$1;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
tmp0_mapNotNullTo.c(tmp0_safe_receiver);
tmp$ret$1 = Unit_getInstance();
}
}
tmp$ret$2 = tmp0_mapNotNullTo;
tmp$ret$3 = tmp$ret$2;
return tmp$ret$3;
}
function renderFill($this, shape) {
var tmp0_elvis_lhs = GpuShapeViewPrograms_getInstance().hk8(shape.ha5_1, shape.ga5_1, shape.ia5_1, 1.0E7);
var tmp;
if (tmp0_elvis_lhs == null) {
return Unit_getInstance();
} else {
tmp = tmp0_elvis_lhs;
}
var paintShader = tmp;
var drawFill = !$this.mjl_1;
var drawAntialiasingBorder = $this.mjl_1 ? true : $this.yjk_1;
var shapeIsConvex = shape.oa5();
var isSimpleDraw = (shapeIsConvex ? shape.fa5_1 == null : false) ? !$this.mjl_1 : false;
var pathDataList = getPointsForPathList($this, shape.ea5_1, isSimpleDraw ? DrawType_TRIANGLE_STRIP_getInstance() : DrawType_TRIANGLE_FAN_getInstance());
var tmp$ret$3;
// Inline function 'kotlin.also' call
var tmp0_also = new BoundsBuilder();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.renderFill.<anonymous>' call
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var n = 0;
while (n < pathDataList.i()) {
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.renderFill.<anonymous>.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp0__anonymous__q1qw7t = pathDataList.m(tmp0);
var tmp$ret$2;
// Inline function 'com.soywiz.korma.geom.BoundsBuilder.add' call
var tmp0_add = tmp0__anonymous__q1qw7t.jk8_1;
var tmp0_safe_receiver = tmp0_add;
if (tmp0_safe_receiver == null)
null;
else {
var tmp$ret$1;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'com.soywiz.korma.geom.BoundsBuilder.add.<anonymous>' call
tmp$ret$0 = tmp0_also.s71(tmp0_add);
tmp$ret$1 = tmp$ret$0;
}
tmp$ret$2 = tmp0_also;
}
tmp$ret$3 = tmp0_also;
var tmp_0 = tmp$ret$3;
var pathBoundsNoExpended = tmp_0.c72(null, 1, null);
var pathBounds = expand_0(pathBoundsNoExpended.z4n(), 2, 2, 2, 2);
var clipDataStart = $this.njk_1.dk7();
var tmp1_safe_receiver = shape.fa5_1;
var tmp_1;
if (tmp1_safe_receiver == null) {
tmp_1 = null;
} else {
var tmp$ret$5;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$4;
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.renderFill.<anonymous>' call
tmp$ret$4 = getPointsForPath_0($this, tmp1_safe_receiver, DrawType_TRIANGLE_FAN_getInstance());
tmp$ret$5 = tmp$ret$4;
tmp_1 = tmp$ret$5;
}
var clipData = tmp_1;
var clipDataEnd = $this.njk_1.fk7();
var tmp2_safe_receiver = clipData;
var clipBounds = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.jk8_1;
if (!isSimpleDraw ? true : $this.gjl_1) {
$this.gjl_1 = true;
var tmp_2;
if (isSimpleDraw) {
tmp_2 = null;
} else if (!(clipBounds == null)) {
var tmp$ret$6;
// Inline function 'kotlin.also' call
var tmp1_also = Companion_getInstance_15().zp();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.renderFill.<anonymous>' call
tmp1_also.y7c(pathBounds, clipBounds);
tmp$ret$6 = tmp1_also;
tmp_2 = tmp$ret$6;
} else {
tmp_2 = pathBounds;
}
$this.njk_1.yk6(tmp_2);
}
if (isSimpleDraw) {
$this.gjl_1 = false;
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var n_0 = 0;
while (n_0 < pathDataList.i()) {
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.renderFill.<anonymous>' call
var tmp0_0 = n_0;
n_0 = tmp0_0 + 1 | 0;
var tmp2__anonymous__z9zvc9 = pathDataList.m(tmp0_0);
var tmp0_$this = $this.njk_1;
var tmp1_drawType = DrawType_TRIANGLE_STRIP_getInstance();
var tmp2_startIndex = tmp2__anonymous__z9zvc9.lk8_1;
var tmp3_endIndex = tmp2__anonymous__z9zvc9.mk8_1;
var tmp4_colorMask = ColorMaskState_init_$Create$_0(true);
var tmp5_blendMode = $this.di1();
tmp0_$this.ik8(tmp1_drawType, paintShader, tmp4_colorMask, null, tmp5_blendMode, null, tmp2_startIndex, tmp3_endIndex, 40, null);
}
return Unit_getInstance();
}
var winding = shape.ea5_1.h7j_1;
var stencilReferenceValue = 1;
var stencilCompare = CompareMode_EQUAL_getInstance();
if (drawFill) {
var tmp3_subject = winding;
var tmp0_1 = tmp3_subject.q2_1;
if (tmp0_1 === 0) {
stencilReferenceValue = 1;
stencilCompare = CompareMode_EQUAL_getInstance();
var tmp4_compareMode = CompareMode_ALWAYS_getInstance();
var tmp5_actionOnBothPass = StencilOp_INVERT_getInstance();
var stencil = StencilState_init_$Create$(true, null, tmp4_compareMode, tmp5_actionOnBothPass, null, null, 0, 0, 1, 242, null);
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var n_1 = 0;
while (n_1 < pathDataList.i()) {
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.renderFill.<anonymous>' call
var tmp0_2 = n_1;
n_1 = tmp0_2 + 1 | 0;
var tmp3__anonymous__ufb84q = pathDataList.m(tmp0_2);
writeStencil($this, tmp3__anonymous__ufb84q.lk8_1, tmp3__anonymous__ufb84q.mk8_1, stencil, CullFace_BOTH_getInstance());
}
} else if (tmp0_1 === 1) {
stencilReferenceValue = 0;
stencilCompare = CompareMode_NOT_EQUAL_getInstance();
var tmp6_compareMode = CompareMode_ALWAYS_getInstance();
var tmp7_actionOnBothPass = StencilOp_INVERT_getInstance();
var stencil_0 = StencilState_init_$Create$(true, null, tmp6_compareMode, tmp7_actionOnBothPass, null, null, 0, 0, 255, 242, null);
// Inline function 'com.soywiz.kds.iterators.fastForEach' call
var n_2 = 0;
while (n_2 < pathDataList.i()) {
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.renderFill.<anonymous>' call
var tmp0_3 = n_2;
n_2 = tmp0_3 + 1 | 0;
var tmp4__anonymous__pkmkx7 = pathDataList.m(tmp0_3);
var tmp_3 = StencilOp_INCREMENT_WRAP_getInstance();
writeStencil($this, tmp4__anonymous__pkmkx7.lk8_1, tmp4__anonymous__pkmkx7.mk8_1, stencil_0.bb1(false, null, null, tmp_3, null, null, 0, 0, 0, 503, null), CullFace_FRONT_getInstance());
var tmp_4 = StencilOp_DECREMENT_WRAP_getInstance();
writeStencil($this, tmp4__anonymous__pkmkx7.lk8_1, tmp4__anonymous__pkmkx7.mk8_1, stencil_0.bb1(false, null, null, tmp_4, null, null, 0, 0, 0, 503, null), CullFace_BACK_getInstance());
}
}
if (!(clipData == null)) {
if (winding.equals(Winding_NON_ZERO_getInstance())) {
var tmp8_compareMode = CompareMode_NOT_EQUAL_getInstance();
var tmp9_actionOnBothPass = StencilOp_INVERT_getInstance();
writeStencil($this, clipDataStart, clipDataEnd, StencilState_init_$Create$(true, null, tmp8_compareMode, tmp9_actionOnBothPass, null, null, 0, 0, 255, 114, null), CullFace_FRONT_getInstance());
}
var tmp10_compareMode = CompareMode_ALWAYS_getInstance();
var tmp11_actionOnBothPass = StencilOp_INVERT_getInstance();
writeStencil($this, clipDataStart, clipDataEnd, StencilState_init_$Create$(true, null, tmp10_compareMode, tmp11_actionOnBothPass, null, null, 0, 0, 2, 242, null), CullFace_BOTH_getInstance());
stencilReferenceValue = 3;
}
}
if (drawAntialiasingBorder ? shape.fa5_1 == null : false) {
var tmp_5 = 1.6 / $this.ijl_1;
var tmp_6 = LineScaleMode_NONE_getInstance();
var tmp_7 = LineCap_BUTT_getInstance();
var tmp_8 = LineCap_BUTT_getInstance();
var tmp_9 = LineJoin_MITER_getInstance();
var tmp_10 = StrokeInfo_init_$Create$(tmp_5, false, tmp_6, tmp_7, tmp_8, tmp_9, 5.0, null, 0.0, 386, null);
var tmp_11;
if (!drawFill) {
tmp_11 = null;
} else {
var tmp_12 = stencilCompare.eb0();
var tmp_13 = stencilReferenceValue;
tmp_11 = StencilState_init_$Create$(true, null, tmp_12, null, null, null, tmp_13, 0, 0, 186, null);
}
renderStroke($this, shape.ha5_1, shape.ea5_1, shape.ga5_1, shape.ia5_1, tmp_10, true, tmp_11);
}
if (drawFill) {
writeFill($this, paintShader, stencilReferenceValue, pathBounds, pathDataList, stencilCompare);
$this.njk_1.hao(0);
}
}
function writeStencil($this, pathDataStart, pathDataEnd, stencil, cullFace) {
var tmp0_$this = $this.njk_1;
var tmp1_drawType = DrawType_TRIANGLE_FAN_getInstance();
var tmp2_paintShader = GpuShapeViewPrograms_getInstance().gk8_1;
var tmp3_colorMask = new ColorMaskState(false, false, false, false);
var tmp4_blendMode = Companion_getInstance_53().qg8_1;
tmp0_$this.pk8(tmp1_drawType, tmp2_paintShader, tmp3_colorMask, stencil, tmp4_blendMode, cullFace, pathDataStart, pathDataEnd);
}
function writeFill($this, paintShader, stencilReferenceValue, pathBounds, pathDataList, stencilCompare) {
var vstart = $this.njk_1.dk7();
var x0 = pathBounds.b74();
var y0 = pathBounds.y73();
var x1 = pathBounds.z73();
var y1 = pathBounds.a74();
$this.njk_1.ek7(x0, y0, 0.0, $this.njl_1);
$this.njk_1.ek7(x1, y0, 0.0, $this.njl_1);
$this.njk_1.ek7(x1, y1, 0.0, $this.njl_1);
$this.njk_1.ek7(x0, y1, 0.0, $this.njl_1);
var vend = $this.njk_1.fk7();
var tmp0_$this = $this.njk_1;
var tmp1_drawType = DrawType_TRIANGLE_FAN_getInstance();
var tmp2_colorMask = ColorMaskState_init_$Create$_0(true);
var tmp3_stencil = StencilState_init_$Create$(true, null, stencilCompare, null, null, null, stencilReferenceValue, 0, 0, 186, null);
var tmp4_blendMode = $this.di1();
tmp0_$this.ik8(tmp1_drawType, paintShader, tmp2_colorMask, tmp3_stencil, tmp4_blendMode, null, vstart, vend, 32, null);
}
function GpuShapeView(shape, antialiased, autoScaling) {
View_init_$Init$(this);
this.jjk_1 = autoScaling;
this.kjk_1 = true;
this.ljk_1 = true;
this.mjk_1 = true;
this.njk_1 = new GpuShapeViewCommands();
this.ojk_1 = new BoundsBuilder();
this.pjk_1 = 1000;
this.qjk_1 = 1000;
var tmp = this;
tmp.rjk_1 = PointPool_init_$Create$(128, false, 2, null);
this.sjk_1 = new SegmentInfo();
this.tjk_1 = new SegmentInfo();
this.ujk_1 = 0.0;
this.vjk_1 = 0.0;
this.wjk_1 = true;
this.xjk_1 = false;
this.yjk_1 = antialiased;
this.zjk_1 = shape;
this.ajl_1 = false;
this.bjl_1 = false;
this.cjl_1 = false;
this.djl_1 = 0;
this.ejl_1 = Companion_getInstance_15().zp();
this.fjl_1 = Companion_getInstance_15().zp();
this.gjl_1 = false;
var tmp_0 = this;
tmp_0.hjl_1 = Transform_init_$Create$(0.0, 0.0, 0.0, 0.0, null, null, null, 127, null);
this.ijl_1 = 1.0;
var tmp_1 = this;
DoubleCompanionObject_getInstance();
tmp_1.jjl_1 = NaN;
var tmp_2 = this;
tmp_2.kjl_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
this.ljl_1 = 100000;
this.mjl_1 = false;
this.njl_1 = 10000.0;
invalidateShape(this);
}
GpuShapeView.prototype.qk8 = function (_set____db54di) {
this.pjk_1 = _set____db54di;
};
GpuShapeView.prototype.rk8 = function () {
return this.pjk_1;
};
GpuShapeView.prototype.sk8 = function (_set____db54di) {
this.qjk_1 = _set____db54di;
};
GpuShapeView.prototype.tk8 = function () {
return this.qjk_1;
};
GpuShapeView.prototype.sj2 = function (value) {
this.ujk_1 = value;
this.baz();
};
GpuShapeView.prototype.tj2 = function () {
return this.ujk_1;
};
GpuShapeView.prototype.uj2 = function (value) {
this.vjk_1 = value;
this.baz();
};
GpuShapeView.prototype.vj2 = function () {
return this.vjk_1;
};
GpuShapeView.prototype.pjl = function (value) {
this.yjk_1 = value;
invalidateShape(this);
};
GpuShapeView.prototype.uk8 = function () {
return this.yjk_1;
};
GpuShapeView.prototype.ojl = function (value) {
this.zjk_1 = value;
invalidateShape(this);
};
GpuShapeView.prototype.bi0 = function () {
return _get_shapeBounds__actvvf(this).x71_1 * this.tj2();
};
GpuShapeView.prototype.ci0 = function () {
return _get_shapeBounds__actvvf(this).y71_1 * this.vj2();
};
GpuShapeView.prototype.baz = function () {
View.prototype.baz.call(this);
invalidateShape(this);
};
GpuShapeView.prototype.uhw = function (out) {
out.u72(_get_shapeBounds__actvvf(this).v71_1 - this.bi0(), _get_shapeBounds__actvvf(this).w71_1 - this.ci0(), _get_shapeBounds__actvvf(this).x71_1, _get_shapeBounds__actvvf(this).y71_1);
};
GpuShapeView.prototype.vk8 = function (block) {
var tmp$ret$1;
// Inline function 'com.soywiz.korim.vector.buildShape' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = new ShapeBuilder(null, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.updateShape.<anonymous>' call
block(tmp0_apply);
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0.w9h();
this.ojl(tmp$ret$1);
};
GpuShapeView.prototype.wk8 = function (_this__u8e3s4) {
var tmp0_subject = _this__u8e3s4;
var tmp;
if (equals(tmp0_subject, EmptyShape_getInstance())) {
tmp = false;
} else {
if (tmp0_subject instanceof CompoundShape) {
var tmp$ret$0;
$l$block_0: {
// Inline function 'kotlin.collections.any' call
var tmp0_any = _this__u8e3s4.qa5_1;
var tmp_0;
if (isInterface(tmp0_any, Collection)) {
tmp_0 = tmp0_any.p();
} else {
tmp_0 = false;
}
if (tmp_0) {
tmp$ret$0 = false;
break $l$block_0;
}
var tmp0_iterator = tmp0_any.j();
while (tmp0_iterator.k()) {
var element = tmp0_iterator.l();
var tmp$ret$1;
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.<get-requireStencil>.<anonymous>' call
tmp$ret$1 = this.wk8(element);
if (tmp$ret$1) {
tmp$ret$0 = true;
break $l$block_0;
}
}
tmp$ret$0 = false;
}
tmp = tmp$ret$0;
} else {
if (tmp0_subject instanceof TextShape) {
tmp = this.wk8(_this__u8e3s4.la6());
} else {
if (tmp0_subject instanceof FillShape) {
tmp = !_this__u8e3s4.oa5();
} else {
if (tmp0_subject instanceof PolylineShape) {
tmp = false;
} else {
tmp = true;
}
}
}
}
}
return tmp;
};
GpuShapeView.prototype.xhw = function (ctx) {
var tmp = this;
var tmp_0 = this.pgw();
var tmp_1 = this.hjl_1.m75(tmp_0, 0.0, 0.0, 6, null);
var tmp_2 = this.pgw();
tmp.ijl_1 = tmp_1.m75(tmp_2, 0.0, 0.0, 6, null).f75() * ctx.jg9_1.sha();
if (!(this.jjl_1 === this.ijl_1)) {
invalidateShape(this);
}
ctx.mj();
var doRequireTexture = this.wk8(this.zjk_1);
var tmp$ret$6;
// Inline function 'com.soywiz.klock.measureTime' call
var start = PerformanceCounter_getInstance().u1h();
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.renderInternal.<anonymous>' call
if (doRequireTexture) {
var currentRenderBuffer = ctx.ig9_1.cb9();
this.pjk_1 = currentRenderBuffer.d72();
this.qjk_1 = currentRenderBuffer.e72();
// Inline function 'com.soywiz.korge.render.RenderContext.renderToTexture' call
var tmp0_renderToTexture = this.pjk_1;
var tmp1_renderToTexture = this.qjk_1;
ctx.mj();
// Inline function 'com.soywiz.korag.AG.tempAllocateFrameBuffer' call
var tmp0_tempAllocateFrameBuffer = ctx.ig9_1;
var rb = tmp0_tempAllocateFrameBuffer.vba(tmp0_renderToTexture, tmp1_renderToTexture, false, true, 1);
try {
// Inline function 'com.soywiz.korge.render.RenderContext.renderToTexture.<anonymous>' call
// Inline function 'com.soywiz.korge.render.RenderContext.renderToFrameBuffer' call
ctx.mj();
// Inline function 'com.soywiz.korag.AG.setRenderBufferTemporally' call
var tmp0_setRenderBufferTemporally = ctx.ig9_1;
tmp0_setRenderBufferTemporally.qba(rb);
try {
// Inline function 'com.soywiz.korge.render.RenderContext.renderToFrameBuffer.<anonymous>' call
var tmp$ret$2;
// Inline function 'com.soywiz.korge.render.RenderContext.useBatcher' call
var tmp$ret$1;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.use' call
var tmp0_use = ctx.gga_1;
var tmp0_useBatcher = tmp0_use.vga_1;
if (!(tmp0_useBatcher.tga_1 === tmp0_use)) {
tmp0_useBatcher.mj();
tmp0_useBatcher.tga_1 = tmp0_use;
}
var oldScissors = tmp0_use.dgc_1;
var tmp$ret$0;
$l$block: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var tmp0_alloc = ctx.uga_1;
var temp = tmp0_alloc.t4t();
try {
tmp0_use.dgc_1 = temp.t7c(0, 0, rb.d72(), rb.e72());
var tmp_3;
try {
{
var tmp_4 = Colors_getInstance().x7z_1;
ctx.ig9_1.kba(tmp_4, 0.0, 0, false, false, false, null, 126, null);
}
// Inline function 'com.soywiz.korge.render.RenderContext.renderToTexture.<anonymous>.<anonymous>' call
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.renderInternal.<anonymous>.<anonymous>' call
renderCommands(this, ctx, doRequireTexture);
ctx.mj();
tmp_3 = Unit_getInstance();
}finally {
tmp0_use.dgc_1 = oldScissors;
}
tmp$ret$0 = tmp_3;
break $l$block;
}finally {
tmp0_alloc.u4t(temp);
}
}
tmp$ret$1 = tmp$ret$0;
tmp$ret$2 = tmp$ret$1;
}finally {
tmp0_setRenderBufferTemporally.rba();
}
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.renderInternal.<anonymous>.<anonymous>' call
var tmp2__anonymous__z9zvc9 = Companion_getInstance_47().mhb(rb).nhb(0, 0, tmp0_renderToTexture, tmp1_renderToTexture);
var tmp$ret$4;
// Inline function 'com.soywiz.korge.render.RenderContext.useBatcher' call
var tmp$ret$3;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.use' call
var tmp0_use_0 = ctx.gga_1;
var tmp0_useBatcher_0 = tmp0_use_0.vga_1;
if (!(tmp0_useBatcher_0.tga_1 === tmp0_use_0)) {
tmp0_useBatcher_0.mj();
tmp0_useBatcher_0.tga_1 = tmp0_use_0;
}
var tmp_5 = ctx.jg9_1.ngw();
tmp0_use_0.ugc(tmp2__anonymous__z9zvc9, 0.0, 0.0, 0.0, 0.0, tmp_5, false, null, null, null, null, tmp2__anonymous__z9zvc9.b7z(), false, 2014, null);
tmp$ret$3 = Unit_getInstance();
tmp$ret$4 = tmp$ret$3;
ctx.mj();
}finally {
tmp0_tempAllocateFrameBuffer.wba(rb);
}
} else {
renderCommands(this, ctx, doRequireTexture);
}
var end = PerformanceCounter_getInstance().u1h();
var tmp$ret$5;
// Inline function 'com.soywiz.klock.microseconds' call
var tmp0__get_microseconds__mq1imi = end - start;
tmp$ret$5 = Companion_getInstance_1().v1h(tmp0__get_microseconds__mq1imi);
tmp$ret$6 = tmp$ret$5;
var time = tmp$ret$6;
};
GpuShapeView.prototype.xk8 = function () {
return this.njl_1;
};
GpuShapeView.$metadata$ = classMeta('GpuShapeView', [Anchorable], undefined, undefined, undefined, View.prototype);
function gpuGraphics(_this__u8e3s4, antialiased, callback) {
var tmp$ret$3;
// Inline function 'com.soywiz.korge.view.vector.gpuShapeView' call
var tmp$ret$2;
// Inline function 'kotlin.also' call
var tmp = EmptyShape_getInstance();
var tmp0_also = GpuShapeView_init_$Create$(tmp, antialiased, false, 4, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.vector.gpuShapeView.<anonymous>' call
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.updateShape' call
var tmp$ret$1;
// Inline function 'com.soywiz.korim.vector.buildShape' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = new ShapeBuilder(null, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.updateShape.<anonymous>' call
// Inline function 'com.soywiz.korge.view.vector.gpuShapeView.<anonymous>.<anonymous>' call
callback(tmp0_apply, tmp0_also);
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0.w9h();
tmp0_also.ojl(tmp$ret$1);
tmp$ret$2 = tmp0_also;
tmp$ret$3 = addTo(tmp$ret$2, _this__u8e3s4);
return tmp$ret$3;
}
function gpuShapeView(_this__u8e3s4, antialiased, callback) {
var tmp$ret$2;
// Inline function 'kotlin.also' call
var tmp = EmptyShape_getInstance();
var tmp0_also = GpuShapeView_init_$Create$(tmp, antialiased, false, 4, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.vector.gpuShapeView.<anonymous>' call
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.updateShape' call
var tmp$ret$1;
// Inline function 'com.soywiz.korim.vector.buildShape' call
// Inline function 'kotlin.contracts.contract' call
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = new ShapeBuilder(null, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.vector.GpuShapeView.updateShape.<anonymous>' call
// Inline function 'com.soywiz.korge.view.vector.gpuShapeView.<anonymous>.<anonymous>' call
callback(tmp0_apply, tmp0_also);
tmp$ret$0 = tmp0_apply;
tmp$ret$1 = tmp$ret$0.w9h();
tmp0_also.ojl(tmp$ret$1);
tmp$ret$2 = tmp0_also;
return addTo(tmp$ret$2, _this__u8e3s4);
}
function ShapeCommand_init_$Init$(drawType, vertexIndex, vertexEnd, paintShader, program, colorMask, stencil, blendMode, cullFace, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
drawType = DrawType_LINE_STRIP_getInstance();
if (!(($mask0 & 2) === 0))
vertexIndex = 0;
if (!(($mask0 & 4) === 0))
vertexEnd = 0;
if (!(($mask0 & 16) === 0))
program = null;
if (!(($mask0 & 32) === 0))
colorMask = null;
if (!(($mask0 & 64) === 0))
stencil = null;
if (!(($mask0 & 128) === 0))
blendMode = null;
if (!(($mask0 & 256) === 0))
cullFace = null;
ShapeCommand.call($this, drawType, vertexIndex, vertexEnd, paintShader, program, colorMask, stencil, blendMode, cullFace);
return $this;
}
function ShapeCommand_init_$Create$(drawType, vertexIndex, vertexEnd, paintShader, program, colorMask, stencil, blendMode, cullFace, $mask0, $marker) {
return ShapeCommand_init_$Init$(drawType, vertexIndex, vertexEnd, paintShader, program, colorMask, stencil, blendMode, cullFace, $mask0, $marker, Object.create(ShapeCommand.prototype));
}
function resolve($this, ctx, uniforms, texUniforms) {
// Inline function 'com.soywiz.korag.UniformValues.fastForEach' call
var inductionVariable = 0;
var last = texUniforms.i();
if (inductionVariable < last)
do {
var n = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
// Inline function 'com.soywiz.korge.view.vector.GpuShapeViewCommands.resolve.<anonymous>' call
var tmp0__anonymous__q1qw7t = texUniforms.wat_1.m(n);
var tmp1__anonymous__uwfjfc = texUniforms.xat_1.m(n);
if (tmp1__anonymous__uwfjfc instanceof Bitmap) {
var tex = ctx.ig9_1.dax_1.t4t();
tex.gaz(tmp1__anonymous__uwfjfc, false, 2, null);
uniforms.nb6(tmp0__anonymous__q1qw7t, TextureUnit_init_$Create$(tex, false, null, 6, null));
$this.uk6_1.c(tex);
}
}
while (inductionVariable < last);
}
function ICommand() {
}
ICommand.$metadata$ = interfaceMeta('ICommand');
function ScissorCommand(scissor) {
this.yk8_1 = scissor;
}
ScissorCommand.prototype.yh7 = function () {
return this.yk8_1;
};
ScissorCommand.prototype.toString = function () {
return 'ScissorCommand(scissor=' + this.yk8_1 + ')';
};
ScissorCommand.prototype.hashCode = function () {
return this.yk8_1 == null ? 0 : this.yk8_1.hashCode();
};
ScissorCommand.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof ScissorCommand))
return false;
var tmp0_other_with_cast = other instanceof ScissorCommand ? other : THROW_CCE();
if (!equals(this.yk8_1, tmp0_other_with_cast.yk8_1))
return false;
return true;
};
ScissorCommand.$metadata$ = classMeta('ScissorCommand', [ICommand]);
function ClearCommand(i) {
this.zk8_1 = i;
}
ClearCommand.prototype.ak9 = function () {
return this.zk8_1;
};
ClearCommand.prototype.toString = function () {
return 'ClearCommand(i=' + this.zk8_1 + ')';
};
ClearCommand.prototype.hashCode = function () {
return this.zk8_1;
};
ClearCommand.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof ClearCommand))
return false;
var tmp0_other_with_cast = other instanceof ClearCommand ? other : THROW_CCE();
if (!(this.zk8_1 === tmp0_other_with_cast.zk8_1))
return false;
return true;
};
ClearCommand.$metadata$ = classMeta('ClearCommand', [ICommand]);
function ShapeCommand(drawType, vertexIndex, vertexEnd, paintShader, program, colorMask, stencil, blendMode, cullFace) {
this.bk9_1 = drawType;
this.ck9_1 = vertexIndex;
this.dk9_1 = vertexEnd;
this.ek9_1 = paintShader;
this.fk9_1 = program;
this.gk9_1 = colorMask;
this.hk9_1 = stencil;
this.ik9_1 = blendMode;
this.jk9_1 = cullFace;
}
ShapeCommand.prototype.kk9 = function () {
return this.bk9_1;
};
ShapeCommand.prototype.lk9 = function () {
return this.ck9_1;
};
ShapeCommand.prototype.mk9 = function () {
return this.ek9_1;
};
ShapeCommand.prototype.nk9 = function () {
return this.gk9_1;
};
ShapeCommand.prototype.ok9 = function () {
return this.hk9_1;
};
ShapeCommand.prototype.ehc = function () {
return this.ik9_1;
};
ShapeCommand.prototype.pk9 = function () {
return this.jk9_1;
};
ShapeCommand.prototype.xh7 = function () {
return this.dk9_1 - this.ck9_1 | 0;
};
ShapeCommand.prototype.toString = function () {
return 'ShapeCommand(drawType=' + this.bk9_1 + ', vertexIndex=' + this.ck9_1 + ', vertexEnd=' + this.dk9_1 + ', paintShader=' + this.ek9_1 + ', program=' + this.fk9_1 + ', colorMask=' + this.gk9_1 + ', stencil=' + this.hk9_1 + ', blendMode=' + this.ik9_1 + ', cullFace=' + this.jk9_1 + ')';
};
ShapeCommand.prototype.hashCode = function () {
var result = this.bk9_1.hashCode();
result = imul(result, 31) + this.ck9_1 | 0;
result = imul(result, 31) + this.dk9_1 | 0;
result = imul(result, 31) + (this.ek9_1 == null ? 0 : this.ek9_1.hashCode()) | 0;
result = imul(result, 31) + (this.fk9_1 == null ? 0 : this.fk9_1.hashCode()) | 0;
result = imul(result, 31) + (this.gk9_1 == null ? 0 : this.gk9_1.hashCode()) | 0;
result = imul(result, 31) + (this.hk9_1 == null ? 0 : this.hk9_1.hashCode()) | 0;
result = imul(result, 31) + (this.ik9_1 == null ? 0 : this.ik9_1.hashCode()) | 0;
result = imul(result, 31) + (this.jk9_1 == null ? 0 : this.jk9_1.hashCode()) | 0;
return result;
};
ShapeCommand.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof ShapeCommand))
return false;
var tmp0_other_with_cast = other instanceof ShapeCommand ? other : THROW_CCE();
if (!this.bk9_1.equals(tmp0_other_with_cast.bk9_1))
return false;
if (!(this.ck9_1 === tmp0_other_with_cast.ck9_1))
return false;
if (!(this.dk9_1 === tmp0_other_with_cast.dk9_1))
return false;
if (!equals(this.ek9_1, tmp0_other_with_cast.ek9_1))
return false;
if (!equals(this.fk9_1, tmp0_other_with_cast.fk9_1))
return false;
if (!equals(this.gk9_1, tmp0_other_with_cast.gk9_1))
return false;
if (!equals(this.hk9_1, tmp0_other_with_cast.hk9_1))
return false;
if (!equals(this.ik9_1, tmp0_other_with_cast.ik9_1))
return false;
if (!equals(this.jk9_1, tmp0_other_with_cast.jk9_1))
return false;
return true;
};
ShapeCommand.$metadata$ = classMeta('ShapeCommand', [ICommand]);
function GpuShapeViewCommands() {
this.lk6_1 = 0;
this.mk6_1 = floatArrayListOf(new Float32Array([]));
var tmp = this;
var tmp$ret$0;
// Inline function 'kotlin.collections.arrayListOf' call
tmp$ret$0 = ArrayList_init_$Create$_0();
tmp.nk6_1 = tmp$ret$0;
this.ok6_1 = null;
this.pk6_1 = FastArrayList_init_$Create$();
this.qk6_1 = 0;
this.rk6_1 = 0;
var tmp_0 = this;
tmp_0.sk6_1 = Transform_init_$Create$(0.0, 0.0, 0.0, 0.0, null, null, null, 127, null);
this.tk6_1 = new Float32Array(4);
this.uk6_1 = FastArrayList_init_$Create$();
this.vk6_1 = new UniformValues();
var tmp_1 = this;
tmp_1.wk6_1 = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
}
GpuShapeViewCommands.prototype.x7 = function () {
this.lk6_1 = 0;
this.mk6_1.x7();
this.nk6_1.x7();
};
GpuShapeViewCommands.prototype.ek7 = function (x, y, len, maxLen) {
var tmp;
if (maxLen <= 0.0) {
var tmp0_this = this;
var tmp1 = tmp0_this.qk6_1;
tmp0_this.qk6_1 = tmp1 + 1 | 0;
tmp = tmp1 <= 0;
} else {
tmp = false;
}
if (tmp) {
println('Invalid maxLen=' + maxLen);
}
this.mk6_1.d4o(x, y, len, maxLen);
var tmp2_this = this;
var tmp3 = tmp2_this.lk6_1;
tmp2_this.lk6_1 = tmp3 + 1 | 0;
return tmp3;
};
GpuShapeViewCommands.prototype.dk7 = function () {
this.rk6_1 = this.lk6_1;
return this.rk6_1;
};
GpuShapeViewCommands.prototype.fk7 = function () {
return this.lk6_1;
};
GpuShapeViewCommands.prototype.pk8 = function (drawType, paintShader, colorMask, stencil, blendMode, cullFace, startIndex, endIndex) {
var tmp0_this = this;
// Inline function 'kotlin.collections.plusAssign' call
var tmp0_plusAssign = tmp0_this.nk6_1;
var tmp1_plusAssign = ShapeCommand_init_$Create$(drawType, startIndex, endIndex, paintShader, null, colorMask, stencil, blendMode, cullFace, 16, null);
tmp0_plusAssign.c(tmp1_plusAssign);
};
GpuShapeViewCommands.prototype.ik8 = function (drawType, paintShader, colorMask, stencil, blendMode, cullFace, startIndex, endIndex, $mask0, $handler) {
if (!(($mask0 & 4) === 0))
colorMask = null;
if (!(($mask0 & 8) === 0))
stencil = null;
if (!(($mask0 & 16) === 0))
blendMode = null;
if (!(($mask0 & 32) === 0))
cullFace = null;
if (!(($mask0 & 64) === 0))
startIndex = this.rk6_1;
if (!(($mask0 & 128) === 0))
endIndex = this.lk6_1;
return this.pk8(drawType, paintShader, colorMask, stencil, blendMode, cullFace, startIndex, endIndex);
};
GpuShapeViewCommands.prototype.hao = function (i) {
var tmp0_this = this;
// Inline function 'kotlin.collections.plusAssign' call
var tmp0_plusAssign = tmp0_this.nk6_1;
var tmp1_plusAssign = new ClearCommand(i);
tmp0_plusAssign.c(tmp1_plusAssign);
};
GpuShapeViewCommands.prototype.xk6 = function (i, $mask0, $handler) {
if (!(($mask0 & 1) === 0))
i = 0;
return this.hao(i);
};
GpuShapeViewCommands.prototype.yk6 = function (scissor) {
var tmp0_this = this;
// Inline function 'kotlin.collections.plusAssign' call
var tmp0_plusAssign = tmp0_this.nk6_1;
var tmp1_plusAssign = new ScissorCommand(scissor);
tmp0_plusAssign.c(tmp1_plusAssign);
};
GpuShapeViewCommands.prototype.a2z = function () {
var tmp0_safe_receiver = this.ok6_1;
if (tmp0_safe_receiver == null)
null;
else {
var tmp$ret$0;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
var tmp0_this = this;
var tmp0_plusAssign = tmp0_this.pk6_1;
tmp0_plusAssign.c(tmp0_safe_receiver);
tmp$ret$0 = Unit_getInstance();
}
var tmp = this;
tmp.ok6_1 = AgCachedBuffer_init_$Create$(this.mk6_1, 0, 0, 6, null);
};
GpuShapeViewCommands.prototype.zk6 = function (ctx, globalMatrix, localMatrix, applyScissor, colorMul, doRequireTexture) {
var tmp0_elvis_lhs = this.ok6_1;
var tmp;
if (tmp0_elvis_lhs == null) {
return Unit_getInstance();
} else {
tmp = tmp0_elvis_lhs;
}
var vertices = tmp;
ctx.zg9_1.yh6(this.pk6_1);
this.pk6_1.x7();
ctx.mj();
var ag = ctx.ig9_1;
var tmp$ret$9;
// Inline function 'com.soywiz.korge.render.RenderContext.useBatcher' call
var tmp$ret$8;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.use' call
var tmp0_use = ctx.gga_1;
var tmp0_useBatcher = tmp0_use.vga_1;
if (!(tmp0_useBatcher.tga_1 === tmp0_use)) {
tmp0_useBatcher.mj();
tmp0_useBatcher.tga_1 = tmp0_use;
}
tmp0_use.zh8();
writeFloat$default(colorMul, this.tk6_1, 0, 2, null);
var tmp$ret$7;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.setTemporalUniform' call
var tmp0_setTemporalUniform = GpuShapeViewPrograms_getInstance().jk7_1;
var tmp1_setTemporalUniform = this.tk6_1;
var tmp0_setTemporalUniform_0 = tmp0_use.vga_1;
var old = tmp0_setTemporalUniform_0.uh7().fb6(tmp0_setTemporalUniform);
{
tmp0_setTemporalUniform_0.mj();
}
tmp0_setTemporalUniform_0.uh7().ob6(tmp0_setTemporalUniform, tmp1_setTemporalUniform);
var tmp_0;
try {
var tmp2__anonymous__z9zvc9 = tmp0_setTemporalUniform_0.uh7();
if (doRequireTexture) {
this.wk6_1.o74();
} else {
this.wk6_1.f76(tmp0_use.vh7());
}
this.wk6_1.q76(globalMatrix);
var tmp$ret$6;
// Inline function 'com.soywiz.korge.render.BatchBuilder2D.setViewMatrixTemp' call
var tmp0_setViewMatrixTemp = this.wk6_1;
var tmp1_setViewMatrixTemp = tmp0_use.vga_1;
var tmp$ret$5;
$l$block_1: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var tmp0_alloc = tmp1_setViewMatrixTemp.mga_1;
var temp = tmp0_alloc.t4t();
try {
var tmp$ret$4;
$l$block_0: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var tmp0_alloc_0 = tmp1_setViewMatrixTemp.lga_1;
var temp_0 = tmp0_alloc_0.t4t();
try {
tmp1_setViewMatrixTemp.mj();
temp.v79(tmp1_setViewMatrixTemp.rg9_1);
temp_0.f76(tmp1_setViewMatrixTemp.sg9_1);
tmp1_setViewMatrixTemp.sg9_1.f76(tmp0_setViewMatrixTemp);
copyFrom(tmp1_setViewMatrixTemp.rg9_1, tmp0_setViewMatrixTemp);
var tmp_1;
try {
globalMatrix.o77(this.sk6_1);
var tmp$ret$3;
// Inline function 'com.soywiz.korag.AG.commandsNoWait' call
// Inline function 'kotlin.contracts.contract' call
var tmp0__anonymous__q1qw7t = ag.hay_1;
if (!applyScissor) {
disableScissor(tmp0__anonymous__q1qw7t);
}
// Inline function 'com.soywiz.korag.useProgram' call
var tmp0_useProgram = GpuShapeViewPrograms_getInstance().fk8_1;
tmp0__anonymous__q1qw7t.pbf(ag.zba(tmp0_useProgram, null, 2, null));
// Inline function 'com.soywiz.korag.vertexArrayObjectSet' call
var tmp1_vertexArrayObjectSet = _VertexArrayObject___init__impl__y6yvd1(fastArrayListOf([new VertexData(ctx.uh6(vertices), GpuShapeViewPrograms_getInstance().yk7_1)]));
var vaoId = tmp0__anonymous__q1qw7t.vb9();
try {
tmp0__anonymous__q1qw7t.wb9(vaoId, tmp1_vertexArrayObjectSet);
tmp0__anonymous__q1qw7t.xb9(vaoId);
// Inline function 'com.soywiz.korge.view.vector.GpuShapeViewCommands.render.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
// Inline function 'com.soywiz.korag.uniformsSet' call
var tmp0_uniformsSet = tmp0_use.uh7();
var tmp$ret$2;
$l$block: {
// Inline function 'com.soywiz.kds.Pool.alloc' call
var tmp0_alloc_1 = tmp0__anonymous__q1qw7t.tay_1;
var temp_1 = tmp0_alloc_1.t4t();
try {
var tmp0_elvis_lhs_0 = tmp0_uniformsSet;
tmp0__anonymous__q1qw7t.yb9(temp_1, tmp0_elvis_lhs_0 == null ? new UniformValues() : tmp0_elvis_lhs_0);
tmp0__anonymous__q1qw7t.zb9(temp_1);
var ubo = tmp0__anonymous__q1qw7t.vbd();
var tmp_2;
try {
var tmp0_fastForEach = this.nk6_1;
var n = 0;
while (n < tmp0_fastForEach.i()) {
// Inline function 'com.soywiz.korge.view.vector.GpuShapeViewCommands.render.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>.<anonymous>' call
var tmp0 = n;
n = tmp0 + 1 | 0;
var tmp1__anonymous__uwfjfc = tmp0_fastForEach.m(tmp0);
var tmp0_subject = tmp1__anonymous__uwfjfc;
if (tmp0_subject instanceof ScissorCommand) {
var tmp1_safe_receiver = tmp1__anonymous__uwfjfc.yk8_1;
var rect = tmp1_safe_receiver == null ? null : tmp1_safe_receiver.z4n();
if (applyScissor) {
}
if (!(rect == null)) {
applyTransform(rect, globalMatrix);
setScissorState(tmp0__anonymous__q1qw7t, ag, Scissor_init_$Create$(null, 1, null).dav(rect));
} else {
setScissorState(tmp0__anonymous__q1qw7t, ag, null);
}
} else {
if (tmp0_subject instanceof ClearCommand) {
tmp0__anonymous__q1qw7t.hao(tmp1__anonymous__uwfjfc.zk8_1);
tmp0__anonymous__q1qw7t.yap(255);
tmp0__anonymous__q1qw7t.jba(false, false, true);
} else {
if (tmp0_subject instanceof ShapeCommand) {
var paintShader = tmp1__anonymous__uwfjfc.ek9_1;
tmp0_use.hh9(tmp1__anonymous__uwfjfc.xh7());
this.vk6_1.x7();
var tmp2_safe_receiver = paintShader;
var tmp3_safe_receiver = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.qk9_1;
if (tmp3_safe_receiver == null)
null;
else {
var tmp$ret$0;
// Inline function 'kotlin.let' call
// Inline function 'kotlin.contracts.contract' call
resolve(this, ctx, tmp3_safe_receiver, paintShader.rk9_1);
tmp$ret$0 = Unit_getInstance();
}
var tmp4_safe_receiver = paintShader;
this.vk6_1.qb6(tmp4_safe_receiver == null ? null : tmp4_safe_receiver.qk9_1);
var pixelScale = this.sk6_1.f75() / ctx.jg9_1.sha();
this.vk6_1.yat(GpuShapeViewPrograms_getInstance().lk7_1, pixelScale);
var tmp_3 = this.vk6_1.fb6(DefaultShaders_getInstance().gas_1);
var texUnit = (tmp_3 == null ? true : tmp_3 instanceof TextureUnit) ? tmp_3 : null;
var tmp5_safe_receiver = texUnit;
var tmp6_safe_receiver = tmp5_safe_receiver == null ? null : tmp5_safe_receiver.laz_1;
var tmp7_elvis_lhs = tmp6_safe_receiver == null ? null : tmp6_safe_receiver.b7z();
var premultiplied = tmp7_elvis_lhs == null ? false : tmp7_elvis_lhs;
var outPremultiplied = ag.nba();
var tmp_4 = GpuShapeViewPrograms_getInstance().gk7_1;
var tmp$ret$1;
// Inline function 'com.soywiz.kmem.toInt' call
tmp$ret$1 = premultiplied ? 1 : 0;
this.vk6_1.nb6(tmp_4, tmp$ret$1);
this.vk6_1.nb6(Companion_getInstance_46().xg6_1, outPremultiplied);
tmp0__anonymous__q1qw7t.yb9(ubo, this.vk6_1);
tmp0__anonymous__q1qw7t.zb9(ubo);
setStencilState(tmp0__anonymous__q1qw7t, tmp1__anonymous__uwfjfc.hk9_1);
setColorMaskState(tmp0__anonymous__q1qw7t, tmp1__anonymous__uwfjfc.gk9_1);
var tmp8_elvis_lhs = tmp1__anonymous__uwfjfc.ik9_1;
var tmp9_safe_receiver = tmp8_elvis_lhs == null ? Companion_getInstance_53().og8_1 : tmp8_elvis_lhs;
setBlendingState(tmp0__anonymous__q1qw7t, tmp9_safe_receiver == null ? null : tmp9_safe_receiver.gh9(outPremultiplied));
if (!(tmp1__anonymous__uwfjfc.jk9_1 == null)) {
enableCullFace(tmp0__anonymous__q1qw7t);
tmp0__anonymous__q1qw7t.zbe(ensureNotNull(tmp1__anonymous__uwfjfc.jk9_1));
} else {
disableCullFace(tmp0__anonymous__q1qw7t);
}
var tmp_5 = tmp1__anonymous__uwfjfc.bk9_1;
var tmp_6 = tmp1__anonymous__uwfjfc.xh7();
var tmp_7 = tmp1__anonymous__uwfjfc.ck9_1;
tmp0__anonymous__q1qw7t.rbf(tmp_5, tmp_6, tmp_7, 0, null, null, 56, null);
}
}
}
}
tmp_2 = Unit_getInstance();
}finally {
tmp0__anonymous__q1qw7t.mbe(ubo);
}
tmp$ret$2 = tmp_2;
break $l$block;
}finally {
tmp0_alloc_1.u4t(temp_1);
}
}
}finally {
tmp0__anonymous__q1qw7t.xb9(0);
tmp0__anonymous__q1qw7t.bba(vaoId);
}
disableCullFace(tmp0__anonymous__q1qw7t);
var result = Unit_getInstance();
if (!ag.xay()) {
ag.way(ag.hay_1);
}
tmp$ret$3 = result;
tmp_1 = tmp$ret$3;
}finally {
tmp1_setViewMatrixTemp.mj();
tmp1_setViewMatrixTemp.rg9_1.v79(temp);
tmp1_setViewMatrixTemp.sg9_1.f76(temp_0);
}
tmp$ret$4 = tmp_1;
break $l$block_0;
}finally {
tmp0_alloc_0.u4t(temp_0);
}
}
tmp$ret$5 = tmp$ret$4;
break $l$block_1;
}finally {
tmp0_alloc.u4t(temp);
}
}
tmp$ret$6 = tmp$ret$5;
tmp_0 = tmp$ret$6;
}finally {
{
tmp0_setTemporalUniform_0.mj();
}
tmp0_setTemporalUniform_0.uh7().ob6(tmp0_setTemporalUniform, old);
}
tmp$ret$7 = tmp_0;
tmp$ret$8 = tmp$ret$7;
tmp$ret$9 = tmp$ret$8;
var tmp1_iterator = this.uk6_1.j();
while (tmp1_iterator.k()) {
var tex = tmp1_iterator.l();
ag.dax_1.u4t(tex);
}
this.uk6_1.x7();
};
GpuShapeViewCommands.$metadata$ = classMeta('GpuShapeViewCommands');
function PaintShader_init_$Init$(uniforms, texUniforms, program, $mask0, $marker, $this) {
if (!(($mask0 & 1) === 0))
uniforms = new UniformValues();
if (!(($mask0 & 2) === 0))
texUniforms = new UniformValues();
if (!(($mask0 & 4) === 0))
program = GpuShapeViewPrograms_getInstance().fk8_1;
PaintShader.call($this, uniforms, texUniforms, program);
return $this;
}
function PaintShader_init_$Create$(uniforms, texUniforms, program, $mask0, $marker) {
return PaintShader_init_$Init$(uniforms, texUniforms, program, $mask0, $marker, Object.create(PaintShader.prototype));
}
function PaintShader(uniforms, texUniforms, program) {
this.qk9_1 = uniforms;
this.rk9_1 = texUniforms;
this.sk9_1 = program;
}
PaintShader.prototype.uh7 = function () {
return this.qk9_1;
};
PaintShader.prototype.tk9 = function () {
return this.rk9_1;
};
PaintShader.prototype.toString = function () {
return 'PaintShader(uniforms=' + this.qk9_1 + ', texUniforms=' + this.rk9_1 + ', program=' + this.sk9_1 + ')';
};
PaintShader.prototype.hashCode = function () {
var result = hashCode(this.qk9_1);
result = imul(result, 31) + hashCode(this.rk9_1) | 0;
result = imul(result, 31) + this.sk9_1.hashCode() | 0;
return result;
};
PaintShader.prototype.equals = function (other) {
if (this === other)
return true;
if (!(other instanceof PaintShader))
return false;
var tmp0_other_with_cast = other instanceof PaintShader ? other : THROW_CCE();
if (!equals(this.qk9_1, tmp0_other_with_cast.qk9_1))
return false;
if (!equals(this.rk9_1, tmp0_other_with_cast.rk9_1))
return false;
if (!this.sk9_1.equals(tmp0_other_with_cast.sk9_1))
return false;
return true;
};
PaintShader.$metadata$ = classMeta('PaintShader');
function GpuShapeViewPrograms$PROGRAM_COMBINED$lambda($tmp0_also) {
return function ($this$IF_ELSE_LIST, it) {
var tmp0_subject = it;
var tmp;
GpuShapeViewPrograms_getInstance();
if (tmp0_subject === 0) {
$this$IF_ELSE_LIST.fb5($this$IF_ELSE_LIST.l6t(), GpuShapeViewPrograms_getInstance().ik7_1);
tmp = Unit_getInstance();
} else {
GpuShapeViewPrograms_getInstance();
if (tmp0_subject === 1) {
$this$IF_ELSE_LIST.fb5($this$IF_ELSE_LIST.l6t(), $this$IF_ELSE_LIST.kb5($tmp0_also.wbf(), $this$IF_ELSE_LIST.xbg($this$IF_ELSE_LIST.abh([$this$IF_ELSE_LIST.jb5($this$IF_ELSE_LIST.ubf(GpuShapeViewPrograms_getInstance().mk7_1, $this$IF_ELSE_LIST.hb5([$tmp0_also.cbg(), $this$IF_ELSE_LIST.gb5(0.0), $this$IF_ELSE_LIST.gb5(1.0)])), 'xy')]))));
tmp = Unit_getInstance();
} else {
GpuShapeViewPrograms_getInstance();
if (tmp0_subject === 2) {
$this$IF_ELSE_LIST.fb5($this$IF_ELSE_LIST.l6t(), $this$IF_ELSE_LIST.kb5($tmp0_also.wbf(), $this$IF_ELSE_LIST.jb5($this$IF_ELSE_LIST.ubf(GpuShapeViewPrograms_getInstance().mk7_1, $this$IF_ELSE_LIST.hb5([$this$IF_ELSE_LIST.bbh($tmp0_also.cbg()), $this$IF_ELSE_LIST.cbh($tmp0_also.cbg()), $this$IF_ELSE_LIST.gb5(0.0), $this$IF_ELSE_LIST.gb5(1.0)])), 'xy')));
tmp = Unit_getInstance();
} else {
GpuShapeViewPrograms_getInstance();
if (tmp0_subject === 3) {
var rpoint = $this$IF_ELSE_LIST.sbg(VarType_Float2_getInstance());
$this$IF_ELSE_LIST.fb5($this$IF_ELSE_LIST.jb5(rpoint, 'xy'), $this$IF_ELSE_LIST.jb5($this$IF_ELSE_LIST.ubf(GpuShapeViewPrograms_getInstance().mk7_1, $this$IF_ELSE_LIST.hb5([$this$IF_ELSE_LIST.bbh($tmp0_also.cbg()), $this$IF_ELSE_LIST.cbh($tmp0_also.cbg()), $this$IF_ELSE_LIST.gb5(0.0), $this$IF_ELSE_LIST.gb5(1.0)])), 'xy'));
var x = $this$IF_ELSE_LIST.bbh(rpoint);
var y = $this$IF_ELSE_LIST.cbh(rpoint);
var x0 = $this$IF_ELSE_LIST.bbh(GpuShapeViewPrograms_getInstance().nk7_1);
var y0 = $this$IF_ELSE_LIST.cbh(GpuShapeViewPrograms_getInstance().nk7_1);
var r0 = $this$IF_ELSE_LIST.dbh(GpuShapeViewPrograms_getInstance().nk7_1);
var x1 = $this$IF_ELSE_LIST.bbh(GpuShapeViewPrograms_getInstance().ok7_1);
var y1 = $this$IF_ELSE_LIST.cbh(GpuShapeViewPrograms_getInstance().ok7_1);
var r1 = $this$IF_ELSE_LIST.dbh(GpuShapeViewPrograms_getInstance().ok7_1);
var ratio = $this$IF_ELSE_LIST.bbh($tmp0_also.ebg());
var r0r1_2 = $this$IF_ELSE_LIST.cbh($tmp0_also.ebg());
var r0pow2 = $this$IF_ELSE_LIST.dbh($tmp0_also.ebg());
var r1pow2 = $this$IF_ELSE_LIST.ebh($tmp0_also.ebg());
var y0_y1 = $this$IF_ELSE_LIST.bbh($tmp0_also.obh());
var x0_x1 = $this$IF_ELSE_LIST.cbh($tmp0_also.obh());
var r0_r1 = $this$IF_ELSE_LIST.dbh($tmp0_also.obh());
var radial_scale = $this$IF_ELSE_LIST.ebh($tmp0_also.obh());
$this$IF_ELSE_LIST.fb5(r0r1_2, $this$IF_ELSE_LIST.ubf($this$IF_ELSE_LIST.ubf($this$IF_ELSE_LIST.gb5(2.0), r0), r1));
$this$IF_ELSE_LIST.fb5(r0pow2, GpuShapeViewPrograms_getInstance().uk9(r0));
$this$IF_ELSE_LIST.fb5(r1pow2, GpuShapeViewPrograms_getInstance().uk9(r1));
$this$IF_ELSE_LIST.fb5(x0_x1, $this$IF_ELSE_LIST.hbh(x0, x1));
$this$IF_ELSE_LIST.fb5(y0_y1, $this$IF_ELSE_LIST.hbh(y0, y1));
$this$IF_ELSE_LIST.fb5(r0_r1, $this$IF_ELSE_LIST.hbh(r0, r1));
$this$IF_ELSE_LIST.fb5(radial_scale, $this$IF_ELSE_LIST.vbf($this$IF_ELSE_LIST.gb5(1.0), $this$IF_ELSE_LIST.hbh($this$IF_ELSE_LIST.hbh(GpuShapeViewPrograms_getInstance().uk9($this$IF_ELSE_LIST.hbh(r0, r1)), GpuShapeViewPrograms_getInstance().uk9($this$IF_ELSE_LIST.hbh(x0, x1))), GpuShapeViewPrograms_getInstance().uk9($this$IF_ELSE_LIST.hbh(y0, y1)))));
$this$IF_ELSE_LIST.fb5(ratio, $this$IF_ELSE_LIST.hbh($this$IF_ELSE_LIST.gb5(1.0), $this$IF_ELSE_LIST.ubf($this$IF_ELSE_LIST.hbh($this$IF_ELSE_LIST.ibh($this$IF_ELSE_LIST.ibh($this$IF_ELSE_LIST.ubf($this$IF_ELSE_LIST.fbh(r1), r0_r1), $this$IF_ELSE_LIST.ubf(x0_x1, $this$IF_ELSE_LIST.hbh(x1, x))), $this$IF_ELSE_LIST.ubf(y0_y1, $this$IF_ELSE_LIST.hbh(y1, y))), $this$IF_ELSE_LIST.vbg($this$IF_ELSE_LIST.hbh($this$IF_ELSE_LIST.ibh($this$IF_ELSE_LIST.hbh($this$IF_ELSE_LIST.ubf(r1pow2, $this$IF_ELSE_LIST.ibh(GpuShapeViewPrograms_getInstance().uk9($this$IF_ELSE_LIST.hbh(x0, x)), GpuShapeViewPrograms_getInstance().uk9($this$IF_ELSE_LIST.hbh(y0, y)))), $this$IF_ELSE_LIST.ubf(r0r1_2, $this$IF_ELSE_LIST.ibh($this$IF_ELSE_LIST.ubf($this$IF_ELSE_LIST.hbh(x0, x), $this$IF_ELSE_LIST.hbh(x1, x)), $this$IF_ELSE_LIST.ubf($this$IF_ELSE_LIST.hbh(y0, y), $this$IF_ELSE_LIST.hbh(y1, y))))), $this$IF_ELSE_LIST.ubf(r0pow2, $this$IF_ELSE_LIST.ibh(GpuShapeViewPrograms_getInstance().uk9($this$IF_ELSE_LIST.hbh(x1, x)), GpuShapeViewPrograms_getInstance().uk9($this$IF_ELSE_LIST.hbh(y1, y))))), GpuShapeViewPrograms_getInstance().uk9($this$IF_ELSE_LIST.hbh($this$IF_ELSE_LIST.ibh($this$IF_ELSE_LIST.ibh($this$IF_ELSE_LIST.hbh($this$IF_ELSE_LIST.hbh($this$IF_ELSE_LIST.ubf(x1, y0), $this$IF_ELSE_LIST.ubf(x, y0)), $this$IF_ELSE_LIST.ubf(x0, y1)), $this$IF_ELSE_LIST.ubf(x, y1)), $this$IF_ELSE_LIST.ubf(x0, y)), $this$IF_ELSE_LIST.ubf(x1, y)))))), radial_scale)));
$this$IF_ELSE_LIST.fb5($this$IF_ELSE_LIST.l6t(), $this$IF_ELSE_LIST.kb5($tmp0_also.wbf(), $this$IF_ELSE_LIST.abh([ratio, $this$IF_ELSE_LIST.gb5(0.0)])));
tmp = Unit_getInstance();
} else {
GpuShapeViewPrograms_getInstance();
if (tmp0_subject === 4) {
var rpoint_0 = $this$IF_ELSE_LIST.sbg(VarType_Float2_getInstance());
$this$IF_ELSE_LIST.fb5($this$IF_ELSE_LIST.jb5(rpoint_0, 'xy'), $this$IF_ELSE_LIST.jb5($this$IF_ELSE_LIST.ubf(GpuShapeViewPrograms_getInstance().mk7_1, $this$IF_ELSE_LIST.hb5([$this$IF_ELSE_LIST.bbh($tmp0_also.cbg()), $this$IF_ELSE_LIST.cbh($tmp0_also.cbg()), $this$IF_ELSE_LIST.gb5(0.0), $this$IF_ELSE_LIST.gb5(1.0)])), 'xy'));
var x_0 = $this$IF_ELSE_LIST.bbh(rpoint_0);
var y_0 = $this$IF_ELSE_LIST.cbh(rpoint_0);
var ratio_0 = $this$IF_ELSE_LIST.bbh($tmp0_also.ebg());
var angle = $this$IF_ELSE_LIST.cbh($tmp0_also.ebg());
var x0_0 = $this$IF_ELSE_LIST.bbh(GpuShapeViewPrograms_getInstance().nk7_1);
var y0_0 = $this$IF_ELSE_LIST.cbh(GpuShapeViewPrograms_getInstance().nk7_1);
var PI2 = $this$IF_ELSE_LIST.gb5(get_PI() * 2);
$this$IF_ELSE_LIST.fb5(angle, $this$IF_ELSE_LIST.tbg($this$IF_ELSE_LIST.hbh(y_0, y0_0), $this$IF_ELSE_LIST.hbh(x_0, x0_0)));
var tmp$ret$0;
// Inline function 'com.soywiz.korag.shader.Builder.IF' call
var tmp0_IF = $this$IF_ELSE_LIST.lbh(angle, $this$IF_ELSE_LIST.gb5(0.0));
var body = $this$IF_ELSE_LIST.ibg();
// Inline function 'com.soywiz.korge.view.vector.GpuShapeViewPrograms.PROGRAM_COMBINED.<anonymous>.<anonymous>.<anonymous>' call
body.fb5(angle, body.ibh(angle, PI2));
var tmp_0 = body.jbg();
var stmIf = If_init_$Create$(tmp0_IF, tmp_0, null, 4, null);
var tmp0_this = $this$IF_ELSE_LIST;
// Inline function 'kotlin.collections.plusAssign' call
var tmp0_plusAssign = tmp0_this.eb5_1;
tmp0_plusAssign.c(stmIf);
tmp$ret$0 = stmIf;
$this$IF_ELSE_LIST.fb5(ratio_0, $this$IF_ELSE_LIST.vbf(angle, PI2));
$this$IF_ELSE_LIST.fb5($this$IF_ELSE_LIST.l6t(), $this$IF_ELSE_LIST.kb5($tmp0_also.wbf(), $this$IF_ELSE_LIST.xbg($this$IF_ELSE_LIST.abh([ratio_0, $this$IF_ELSE_LIST.gb5(0.0)]))));
tmp = Unit_getInstance();
}
}
}
}
}
return Unit_getInstance();
};
}
function GpuShapeViewPrograms() {
GpuShapeViewPrograms_instance = this;
var tmp = this;
var tmp_0 = VarType_Float1_getInstance();
tmp.gk7_1 = Uniform_init_$Create$('u_InputPre', tmp_0, null, 4, null);
var tmp_1 = this;
var tmp_2 = VarType_Float1_getInstance();
tmp_1.hk7_1 = Uniform_init_$Create$('u_ProgramType', tmp_2, null, 4, null);
var tmp_3 = this;
var tmp_4 = VarType_Float4_getInstance();
tmp_3.ik7_1 = Uniform_init_$Create$('u_Color', tmp_4, null, 4, null);
var tmp_5 = this;
var tmp_6 = VarType_Float4_getInstance();
tmp_5.jk7_1 = Uniform_init_$Create$('u_ColorMul', tmp_6, null, 4, null);
var tmp_7 = this;
var tmp_8 = VarType_Float1_getInstance();
tmp_7.kk7_1 = Uniform_init_$Create$('u_GlobalAlpha', tmp_8, null, 4, null);
var tmp_9 = this;
var tmp_10 = VarType_Float1_getInstance();
tmp_9.lk7_1 = Uniform_init_$Create$('u_GlobalPixelScale', tmp_10, null, 4, null);
var tmp_11 = this;
var tmp_12 = VarType_Mat4_getInstance();
tmp_11.mk7_1 = Uniform_init_$Create$('u_Transform', tmp_12, null, 4, null);
var tmp_13 = this;
var tmp_14 = VarType_Float3_getInstance();
tmp_13.nk7_1 = Uniform_init_$Create$('u_Gradientp0', tmp_14, null, 4, null);
var tmp_15 = this;
var tmp_16 = VarType_Float3_getInstance();
tmp_15.ok7_1 = Uniform_init_$Create$('u_Gradientp1', tmp_16, null, 4, null);
this.pk7_1 = Attribute_init_$Create$_0('a_MaxDist', VarType_Float1_getInstance(), false, Precision_MEDIUM_getInstance());
this.qk7_1 = Attribute_init_$Create$_0('a_Dist', VarType_Float1_getInstance(), false, Precision_MEDIUM_getInstance());
this.rk7_1 = Varying_init_$Create$_0('v_MaxDist', VarType_Float1_getInstance(), Precision_MEDIUM_getInstance());
this.sk7_1 = Varying_init_$Create$_0('v_Dist', VarType_Float1_getInstance(), Precision_MEDIUM_getInstance());
this.tk7_1 = ProgramLayout_init_$Create$([DefaultShaders_getInstance().kas_1]);
this.uk7_1 = ProgramLayout_init_$Create$([DefaultShaders_getInstance().las_1]);
this.vk7_1 = ProgramLayout_init_$Create$([this.qk7_1]);
this.wk7_1 = ProgramLayout_init_$Create$([DefaultShaders_getInstance().kas_1, DefaultShaders_getInstance().las_1]);
this.xk7_1 = ProgramLayout_init_$Create$([DefaultShaders_getInstance().kas_1, this.qk7_1]);
this.yk7_1 = ProgramLayout_init_$Create$([DefaultShaders_getInstance().kas_1, this.qk7_1, this.pk7_1]);
this.zk7_1 = 0;
this.ak8_1 = 1;
this.bk8_1 = 2;
this.ck8_1 = 3;
this.dk8_1 = 4;
this.ek8_1 = 5;
var tmp_17 = this;
var tmp$ret$1;
// Inline function 'com.soywiz.korag.VertexShaderDefault' call
var tmp$ret$0;
// Inline function 'kotlin.also' call
var tmp0_also = new ProgramBuilderDefault();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.vector.GpuShapeViewPrograms.PROGRAM_COMBINED.<anonymous>' call
tmp0_also.fb5(tmp0_also.l6t(), tmp0_also.ubf(tmp0_also.ubf(tmp0_also.xbf(), tmp0_also.ybf()), tmp0_also.hb5([tmp0_also.zbf(), tmp0_also.gb5(0.0), tmp0_also.gb5(1.0)])));
tmp0_also.fb5(tmp0_also.cbg(), DefaultShaders_getInstance().kas_1);
tmp0_also.fb5(GpuShapeViewPrograms_getInstance().sk7_1, GpuShapeViewPrograms_getInstance().qk7_1);
tmp0_also.fb5(GpuShapeViewPrograms_getInstance().rk7_1, GpuShapeViewPrograms_getInstance().pk7_1);
tmp$ret$0 = tmp0_also;
tmp$ret$1 = VertexShader(tmp$ret$0.ib5());
var tmp0_vertex = tmp$ret$1;
var tmp$ret$5;
// Inline function 'com.soywiz.korag.FragmentShaderDefault' call
var tmp$ret$4;
// Inline function 'kotlin.also' call
var tmp0_also_0 = new ProgramBuilderDefault();
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.vector.GpuShapeViewPrograms.PROGRAM_COMBINED.<anonymous>' call
var tmp$ret$2;
// Inline function 'com.soywiz.korag.shader.Builder.IF' call
var tmp_18 = GpuShapeViewPrograms_getInstance().hk7_1;
GpuShapeViewPrograms_getInstance();
var tmp0_IF = tmp0_also_0.jbh(tmp_18, tmp0_also_0.gb5(5));
var body = tmp0_also_0.ibg();
// Inline function 'com.soywiz.korge.view.vector.GpuShapeViewPrograms.PROGRAM_COMBINED.<anonymous>.<anonymous>' call
body.fb5(body.l6t(), body.hb5([body.gb5(1.0), body.gb5(0.0), body.gb5(0.0), body.gb5(1.0)]));
body.rbg(null, 1, null);
var tmp_19 = body.jbg();
var stmIf = If_init_$Create$(tmp0_IF, tmp_19, null, 4, null);
var tmp0_this = tmp0_also_0;
// Inline function 'kotlin.collections.plusAssign' call
var tmp0_plusAssign = tmp0_this.eb5_1;
tmp0_plusAssign.c(stmIf);
tmp$ret$2 = stmIf;
var tmp$ret$3;
// Inline function 'com.soywiz.korag.shader.Builder.IF' call
var tmp1_IF = tmp0_also_0.nbh(tmp0_also_0.wbg(GpuShapeViewPrograms_getInstance().sk7_1), GpuShapeViewPrograms_getInstance().rk7_1);
var body_0 = tmp0_also_0.ibg();
// Inline function 'com.soywiz.korge.view.vector.GpuShapeViewPrograms.PROGRAM_COMBINED.<anonymous>.<anonymous>' call
body_0.pbg();
var tmp_20 = body_0.jbg();
var stmIf_0 = If_init_$Create$(tmp1_IF, tmp_20, null, 4, null);
var tmp0_this_0 = tmp0_also_0;
// Inline function 'kotlin.collections.plusAssign' call
var tmp0_plusAssign_0 = tmp0_this_0.eb5_1;
tmp0_plusAssign_0.c(stmIf_0);
tmp$ret$3 = stmIf_0;
var tmp_21 = GpuShapeViewPrograms_getInstance().hk7_1;
tmp0_also_0.obg(tmp_21, 0, 4, GpuShapeViewPrograms$PROGRAM_COMBINED$lambda(tmp0_also_0));
var aaAlpha = tmp0_also_0.hbh(tmp0_also_0.gb5(1.0), tmp0_also_0.zbg(tmp0_also_0.hbh(tmp0_also_0.ubf(GpuShapeViewPrograms_getInstance().rk7_1, GpuShapeViewPrograms_getInstance().lk7_1), tmp0_also_0.gb5(1.5)), tmp0_also_0.ubf(GpuShapeViewPrograms_getInstance().rk7_1, GpuShapeViewPrograms_getInstance().lk7_1), tmp0_also_0.wbg(tmp0_also_0.ubf(GpuShapeViewPrograms_getInstance().sk7_1, GpuShapeViewPrograms_getInstance().lk7_1))));
tmp0_also_0.fb5(tmp0_also_0.l6t(), tmp0_also_0.ubf(tmp0_also_0.ubf(tmp0_also_0.ubf(tmp0_also_0.l6t(), GpuShapeViewPrograms_getInstance().jk7_1), GpuShapeViewPrograms_getInstance().kk7_1), aaAlpha));
var tmp_22 = Companion_getInstance_46();
var tmp_23 = tmp0_also_0.l6t();
tmp_22.rh7(tmp0_also_0, tmp_23, null, 4, null);
tmp$ret$4 = tmp0_also_0;
tmp$ret$5 = FragmentShader(tmp$ret$4.ib5());
var tmp1_fragment = tmp$ret$5;
tmp_17.fk8_1 = new Program(tmp0_vertex, tmp1_fragment, 'GpuShapeViewPrograms.Combined');
var tmp_24 = this;
var tmp_25 = UniformValues_init_$Create$([to(this.hk7_1, 5)]);
var tmp_26 = new UniformValues();
tmp_24.gk8_1 = PaintShader_init_$Create$(tmp_25, tmp_26, null, 4, null);
}
GpuShapeViewPrograms.prototype.vk9 = function () {
return this.gk7_1;
};
GpuShapeViewPrograms.prototype.wk9 = function () {
return this.hk7_1;
};
GpuShapeViewPrograms.prototype.xk9 = function () {
return this.ik7_1;
};
GpuShapeViewPrograms.prototype.yk9 = function () {
return this.jk7_1;
};
GpuShapeViewPrograms.prototype.zk9 = function () {
return this.kk7_1;
};
GpuShapeViewPrograms.prototype.aka = function () {
return this.lk7_1;
};
GpuShapeViewPrograms.prototype.bka = function () {
return this.mk7_1;
};
GpuShapeViewPrograms.prototype.cka = function () {
return this.nk7_1;
};
GpuShapeViewPrograms.prototype.dka = function () {
return this.ok7_1;
};
GpuShapeViewPrograms.prototype.eka = function () {
return this.pk7_1;
};
GpuShapeViewPrograms.prototype.fka = function () {
return this.qk7_1;
};
GpuShapeViewPrograms.prototype.gka = function () {
return this.rk7_1;
};
GpuShapeViewPrograms.prototype.hka = function () {
return this.sk7_1;
};
GpuShapeViewPrograms.prototype.uk9 = function (_this__u8e3s4) {
var tmp$ret$1;
// Inline function 'com.soywiz.korag.shader.Companion.invoke' call
var tmp0_invoke = Companion_getInstance_29();
var tmp$ret$0;
// Inline function 'com.soywiz.korge.view.vector.GpuShapeViewPrograms.<get-pow2>.<anonymous>' call
var tmp1__anonymous__uwfjfc = tmp0_invoke.vc1_1;
tmp$ret$0 = tmp1__anonymous__uwfjfc.ubg(_this__u8e3s4, tmp1__anonymous__uwfjfc.gb5(2.0));
tmp$ret$1 = tmp$ret$0;
return tmp$ret$1;
};
GpuShapeViewPrograms.prototype.ika = function () {
return this.zk7_1;
};
GpuShapeViewPrograms.prototype.jka = function () {
return this.ak8_1;
};
GpuShapeViewPrograms.prototype.kka = function () {
return this.bk8_1;
};
GpuShapeViewPrograms.prototype.lka = function () {
return this.ck8_1;
};
GpuShapeViewPrograms.prototype.mka = function () {
return this.dk8_1;
};
GpuShapeViewPrograms.prototype.nka = function () {
return this.ek8_1;
};
GpuShapeViewPrograms.prototype.hk8 = function (stateTransform, paint, globalAlpha, lineWidth) {
var tmp0_subject = paint;
var tmp;
if (tmp0_subject instanceof NonePaint) {
tmp = null;
} else {
if (tmp0_subject instanceof RGBA) {
var tmp_0 = to(this.hk7_1, 0);
var tmp_1 = paint.n8k_1;
var tmp_2 = UniformValues_init_$Create$([tmp_0, to(this.ik7_1, toVector3D$default(tmp_1, null, 1, null)), to(this.kk7_1, globalAlpha)]);
var tmp_3 = new UniformValues();
tmp = PaintShader_init_$Create$(tmp_2, tmp_3, null, 4, null);
} else {
if (tmp0_subject instanceof BitmapPaint) {
var tmp$ret$0;
// Inline function 'kotlin.apply' call
var tmp0_apply = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.vector.GpuShapeViewPrograms.paintToShaderInfo.<anonymous>' call
tmp0_apply.o74();
tmp0_apply.x76(paint.k9x_1);
tmp0_apply.x76(stateTransform);
tmp0_apply.w76(null, 1, null);
tmp0_apply.h76(1.0 / paint.j9x_1.d72(), 1.0 / paint.j9x_1.e72());
tmp$ret$0 = tmp0_apply;
var mat = tmp$ret$0;
var tmp_4 = to(this.hk7_1, 1);
var tmp_5 = UniformValues_init_$Create$([tmp_4, to(this.mk7_1, toMatrix3D$default(mat, null, 1, null)), to(this.kk7_1, globalAlpha)]);
var tmp_6 = UniformValues_init_$Create$([to(DefaultShaders_getInstance().gas_1, paint.j9x_1)]);
tmp = PaintShader_init_$Create$(tmp_5, tmp_6, null, 4, null);
} else {
if (tmp0_subject instanceof GradientPaint) {
var gradientBitmap = Bitmap32_init_$Create$_0(256, 1, null, true, 4, null);
var tmp$ret$1;
$l$block: {
// Inline function 'com.soywiz.korim.bitmap.Bitmap.lock' call
{
gradientBitmap.j7z();
}
try {
// Inline function 'com.soywiz.korge.view.vector.GpuShapeViewPrograms.paintToShaderInfo.<anonymous>' call
paint.x9w(_RgbaPremultipliedArray___init__impl__lx83hy(gradientBitmap.r86_1));
}finally {
tmp$ret$1 = gradientBitmap.k7z(null);
break $l$block;
}
}
var tmp$ret$2;
// Inline function 'kotlin.apply' call
var tmp1_apply = Matrix_init_$Create$(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 63, null);
// Inline function 'kotlin.contracts.contract' call
// Inline function 'com.soywiz.korge.view.vector.GpuShapeViewPrograms.paintToShaderInfo.<anonymous>' call
tmp1_apply.o74();
tmp1_apply.x76(paint.w9e_1);
tmp1_apply.x76(stateTransform);
tmp$ret$2 = tmp1_apply;
var tmp_7 = tmp$ret$2;
var npaint = paint.y9w(null, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, null, null, null, tmp_7, null, null, null, 15359, null);
var tmp1_subject = paint.m9e_1;
var tmp0 = tmp1_subject.q2_1;
var tmp_8;
if (tmp0 === 0) {
tmp_8 = npaint.c9f_1;
} else {
tmp_8 = npaint.w9e_1.z76(null, 1, null);
}
var mat_0 = tmp_8;
var tmp2_subject = paint.m9e_1;
var tmp0_0 = tmp2_subject.q2_1;
var tmp_9 = to(this.hk7_1, tmp0_0 === 1 ? 3 : tmp0_0 === 2 ? 4 : 2);
var tmp_10 = to(this.mk7_1, toMatrix3D$default(mat_0, null, 1, null));
var tmp_11 = Companion_getInstance_30();
var tmp_12 = paint.n9e_1;
var tmp_13 = paint.o9e_1;
var tmp_14 = paint.p9e_1;
var tmp_15 = to(this.nk7_1, tmp_11.d7e(tmp_12, tmp_13, tmp_14, 0.0, 8, null));
var tmp_16 = Companion_getInstance_30();
var tmp_17 = paint.q9e_1;
var tmp_18 = paint.r9e_1;
var tmp_19 = paint.s9e_1;
var tmp_20 = UniformValues_init_$Create$([tmp_9, tmp_10, tmp_15, to(this.ok7_1, tmp_16.d7e(tmp_17, tmp_18, tmp_19, 0.0, 8, null)), to(this.kk7_1, globalAlpha)]);
var tmp_21 = UniformValues_init_$Create$([to(DefaultShaders_getInstance().gas_1, gradientBitmap)]);
tmp = PaintShader_init_$Create$(tmp_20, tmp_21, null, 4, null);
} else {
var tmp2_TODO = 'paint=' + paint;
throw new NotImplementedError('An operation is not implemented: ' + tmp2_TODO);
}
}
}
}
return tmp;
};
GpuShapeViewPrograms.$metadata$ = objectMeta('GpuShapeViewPrograms');
var GpuShapeViewPrograms_instance;
function GpuShapeViewPrograms_getInstance() {
if (GpuShapeViewPrograms_instance == null)
new GpuShapeViewPrograms();
return GpuShapeViewPrograms_instance;
}
function completeViews(views) {
}
function get_KorgeReloadInternal() {
init_properties_KorgeReload_getReloadedClass_kt_iryaui();
return KorgeReloadInternal;
}
var KorgeReloadInternal;
function KorgeReloadInternal$1() {
KorgeReloadInternalImpl.call(this);
}
KorgeReloadInternal$1.$metadata$ = classMeta(undefined, undefined, undefined, undefined, undefined, KorgeReloadInternalImpl.prototype);
var properties_initialized_KorgeReload_getReloadedClass_kt_tswp16;
function init_properties_KorgeReload_getReloadedClass_kt_iryaui() {
if (properties_initialized_KorgeReload_getReloadedClass_kt_tswp16) {
} else {
properties_initialized_KorgeReload_getReloadedClass_kt_tswp16 = true;
KorgeReloadInternal = new KorgeReloadInternal$1();
}
}
function NativeStorage(views) {
this.gi3_1 = views;
}
NativeStorage.prototype.toString = function () {
return 'NativeStorage(' + toMap(this) + ')';
};
NativeStorage.prototype.hi3 = function () {
var keys = Object.keys();
var tmp$ret$2;
// Inline function 'kotlin.collections.map' call
var tmp0_map = until(0, keys.length);
var tmp$ret$1;
// Inline function 'kotlin.collections.mapTo' call
var tmp0_mapTo = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_map, 10));
var inductionVariable = tmp0_map.r1_1;
var last = tmp0_map.s1_1;
if (inductionVariable <= last)
do {
var item = inductionVariable;
inductionVariable = inductionVariable + 1 | 0;
var tmp$ret$0;
// Inline function 'com.soywiz.korge.service.storage.NativeStorage.keys.<anonymous>' call
tmp$ret$0 = keys.get(item);
tmp0_mapTo.c(tmp$ret$0);
}
while (!(item === last));
tmp$ret$1 = tmp0_mapTo;
tmp$ret$2 = tmp$ret$1;
return tmp$ret$2;
};
NativeStorage.prototype.j2x = function (key, value) {
localStorage.setItem(key, value);
};
NativeStorage.prototype.ii3 = function (key) {
return localStorage.getItem(key);
};
NativeStorage.prototype.n2x = function (key) {
localStorage.removeItem(key);
};
NativeStorage.$metadata$ = classMeta('NativeStorage', [IStorage]);
//region block: post-declaration
DeferWithViewsUpdateComponentWithViews.prototype.h68 = get_type;
DeferWithViewsUpdateComponentWithViews.prototype.x2c = close;
DeferWithViewsUpdateComponentWithViews.prototype.r5y = cancel_1;
ResizeComponent$Companion$invoke$1.prototype.h68 = get_type_4;
ResizeComponent$Companion$invoke$1.prototype.x2c = close;
ResizeComponent$Companion$invoke$1.prototype.r5y = cancel_1;
onNewAttachDetach$3.prototype.h68 = get_type;
onNewAttachDetach$3.prototype.x2c = close;
onNewAttachDetach$3.prototype.r5y = cancel_1;
onNewAttachDetach$4.prototype.h68 = get_type_6;
onNewAttachDetach$4.prototype.x2c = close;
onNewAttachDetach$4.prototype.r5y = cancel_1;
UiRowEditableValue.prototype.vcn = get_pt;
UiRowEditableValue.prototype.ncm = get_percent;
KeysEvents.prototype.h68 = get_type_0;
KeysEvents.prototype.r5y = cancel_1;
MouseEventsUpdate.prototype.h68 = get_type;
MouseEventsUpdate.prototype.x2c = close;
MouseEventsUpdate.prototype.r5y = cancel_1;
MouseEvents.prototype.h68 = get_type_1;
MouseEvents.prototype.r5y = cancel_1;
TouchEvents.prototype.h68 = get_type_3;
TouchEvents.prototype.x2c = close;
TouchEvents.prototype.r5y = cancel_1;
RenderContext.prototype.wha = windowToGlobalCoords$default;
Texture.prototype.b65 = getOrNull;
Texture.prototype.n8c = get_baseWidth;
Texture.prototype.o8c = get_baseHeight;
Texture.prototype.t2 = get_name;
Texture.prototype.w8b = get_virtFrame;
Texture.prototype.p8c = get_frameOffsetX;
Texture.prototype.q8c = get_frameOffsetY;
Texture.prototype.y8b = get_frameWidth;
Texture.prototype.z8b = get_frameHeight;
Texture.prototype.r8c = get_isRotatedInBaseDeg90;
_no_name_provided__qut3iv.prototype.h68 = get_type_5;
_no_name_provided__qut3iv.prototype.x2c = close;
_no_name_provided__qut3iv.prototype.r5y = cancel_1;
Transition$1.prototype.ai3 = start;
Transition$1.prototype.bi3 = end;
TimerComponents.prototype.h68 = get_type_2;
TimerComponents.prototype.x2c = close;
TimerComponents.prototype.r5y = cancel_1;
TweenComponent.prototype.h68 = get_type_2;
TweenComponent.prototype.x2c = close;
TweenComponent.prototype.r5y = cancel_1;
UIFocusManager.prototype.h68 = get_type_0;
UIFocusManager.prototype.x2c = close;
UIFocusManager.prototype.r5y = cancel_1;
DummyUpdateComponentWithViews.prototype.h68 = get_type;
DummyUpdateComponentWithViews.prototype.x2c = close;
DummyUpdateComponentWithViews.prototype.r5y = cancel_1;
Image.prototype.cjp = forceLoadSourceFile$default;
NinePatchEx.prototype.cjp = forceLoadSourceFile$default;
Stage.prototype.wha = windowToGlobalCoords$default;
addFixedUpdater$1.prototype.h68 = get_type_2;
addFixedUpdater$1.prototype.x2c = close;
addFixedUpdater$1.prototype.r5y = cancel_1;
addUpdater$1.prototype.h68 = get_type_2;
addUpdater$1.prototype.x2c = close;
addUpdater$1.prototype.r5y = cancel_1;
Mixin_0.prototype.cjp = forceLoadSourceFile$default;
Views.prototype.wha = windowToGlobalCoords$default;
Base.prototype.egd = get_actualVirtualWidth;
Base.prototype.fgd = get_actualVirtualHeight;
Base.prototype.qha = get_actualVirtualRight;
Base.prototype.uha = get_windowToGlobalScaleAvg;
Base.prototype.sha = get_globalToWindowScaleAvg;
Base.prototype.ofz = windowToGlobalCoords;
Base.prototype.wha = windowToGlobalCoords$default;
IdentityFilter.prototype.ok5 = get_allFilters;
IdentityFilter.prototype.pk5 = get_border;
IdentityFilter.prototype.qk5 = get_recommendedFilterScale;
IdentityFilter.prototype.rk5 = computeBorder;
IdentityFilter.prototype.tk5 = buildDebugComponent;
Companion_27.prototype.ok5 = get_allFilters;
Companion_27.prototype.pk5 = get_border;
Companion_27.prototype.qk5 = get_recommendedFilterScale;
Companion_27.prototype.rk5 = computeBorder;
Companion_27.prototype.tk5 = buildDebugComponent;
//endregion
//region block: init
_DefaultFontsCatalog = null;
TEXTURED_ARRAY_COMPONENTS_PER_VERTEX = 6;
VERTEX_INDEX_SIZE = 6;
debugBmpFontOrNull = null;
UI_DEFAULT_WIDTH = 100.0;
UI_DEFAULT_HEIGHT = 32.0;
DEFAULT_UI_SKIN_IMG_OR_NULL = null;
VIEW_FILTER_TRANSPARENT_EDGE = false;
//endregion
//region block: exports
_.$_$ = _.$_$ || {};
_.$_$.a = KeysEvents;
_.$_$.b = MouseEvents;
_.$_$.c = set_cursor;
_.$_$.d = doubleClick;
_.$_$.e = get_keys_0;
_.$_$.f = get_mouse;
_.$_$.g = Storage;
_.$_$.h = get_timers;
_.$_$.i = _interpolate;
_.$_$.j = UIButton;
_.$_$.k = UIFocusable;
_.$_$.l = UIScrollable;
_.$_$.m = UIText;
_.$_$.n = UIView;
_.$_$.o = get_UI_DEFAULT_HEIGHT;
_.$_$.p = get_UI_DEFAULT_WIDTH;
_.$_$.q = blur;
_.$_$.r = set_focusable;
_.$_$.s = focus;
_.$_$.t = get_textSize;
_.$_$.u = set_textSize;
_.$_$.v = get_uiFocusManager;
_.$_$.w = get_uiFocusedView;
_.$_$.x = set_uiFocusedView;
_.$_$.y = set_uiSkin;
_.$_$.z = set_uiSkinBitmap;
_.$_$.a1 = CancellableGroup;
_.$_$.b1 = DebugVertexView;
_.$_$.c1 = ClipContainer;
_.$_$.d1 = Container;
_.$_$.e1 = FixedSizeContainer;
_.$_$.f1 = RenderableView;
_.$_$.g1 = RoundRect;
_.$_$.h1 = SolidRect;
_.$_$.i1 = Stage;
_.$_$.j1 = Text;
_.$_$.k1 = View;
_.$_$.l1 = addTo;
_.$_$.m1 = anchor_0;
_.$_$.n1 = bounds;
_.$_$.o1 = position;
_.$_$.p1 = UiSkinKind_BUTTON_getInstance;
_.$_$.q1 = UiSkinKind_RADIO_getInstance;
_.$_$.r1 = tween;
_.$_$.s1 = onNewAttachDetach$default;
_.$_$.t1 = onStageResized$default;
_.$_$.u1 = alignLeftToRightOf$default;
_.$_$.v1 = alignTopToBottomOf$default;
_.$_$.w1 = tween$default;
_.$_$.x1 = V2_init_$Create$;
_.$_$.y1 = BoxUISkin_init_$Create$;
_.$_$.z1 = UIButton_init_$Create$;
_.$_$.a2 = UISkin_init_$Create$;
_.$_$.b2 = FixedSizeContainer_init_$Init$;
_.$_$.c2 = Image_init_$Create$;
_.$_$.d2 = Image_init_$Create$_0;
_.$_$.e2 = RoundRect_init_$Create$;
_.$_$.f2 = Text_init_$Create$;
_.$_$.g2 = _UiSkinType___init__impl__kunrii;
_.$_$.h2 = Companion_getInstance_51;
_.$_$.i2 = Companion_getInstance_53;
_.$_$.j2 = Companion_getInstance_55;
_.$_$.k2 = Korge_getInstance;
//endregion
return _;
}));
//# sourceMappingURL=korlibs-korge.js.map